aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/ChunkedHTML.hs
AgeCommit message (Collapse)Author
2023-07-25ChunkedHTML writer: Fix regression including mathjax script.John MacFarlane
The fix for #8620 caused the mathjax script to be included when the table of contents but not the body text of a page contains math. But it broke the case where the table of contents doesn't contain math but the page does. This patch fixes the issue. Closes #8967.
2023-06-20ChunkedHTML writer: Make math work in top-level page.John MacFarlane
Closes #8915.
2023-02-15Retain metadata in processing sections for chunked HTML.John MacFarlane
Previously we suppressed metadata in all but the top page, in order to prevent the title block from being printed on every page. This prevented use of custom variables set by metadata fields. This commit moves to a better solution: a conditional in the default template restricts the title block to the top page. Closes #8620.
2023-02-15Remove unnecessary pragmas.John MacFarlane
2023-01-30Add new `--chunk-template` option (closes #8581).John MacFarlane
* Add `--chunk-template` CLI option, allowing more control over the chunk filenames in chunked HTML output. * Text.Pandoc.App: Add `optChunkTemplate` constructor to Opt [API change]. * Text.Pandoc.Options: add `writerChunkTemplate` contsructor to WriterOptions [API change]. * Text.Pandoc.Chunks: add Data, Typeable, Generic instances for PathTemplate.
2023-01-20Chunked HTML writer: Fix handling of images with absolute URLs.John MacFarlane
Cloess #8567.
2023-01-18Add param to tocToList for numberSections.John MacFarlane
Otherwise sections are always numbered in the TOC, even if `--number-sections` is not used.
2023-01-17Fix spacing errors.John MacFarlane
2023-01-15T.P.Chunks changes.John MacFarlane
+ Re-use `toTocTree` in constructing `chunkedTOC`. Previously we used an entirely different function toTOCTree'. + Improve `tocToList` so that it avoids empty lists of items that are omitted because they are below the toc depth. pandoc-lua-engine: + Fix structure tests in light of last change. T.P.Writers.ChunkedHTML: + Reuse `tocToList` in `buildTOC`. T.P.Writers.EPUB: + Adjust EPUB writer for Chunks changes.
2023-01-13ChunkedHTML writer: use fetchItem to get resources.John MacFarlane
This ensures that they can be gotten from e.g. docx input.
2023-01-12Replace `--epub-chapter-level` with `--split-level`.John MacFarlane
Rationale: we need this splitting level now not just in EPUB but in chunked HTML. `--epub-chapter-level` will still function as a deprecated synonynm. `epub-chapter-level` will also continue to work in defaults files, ande `epub_chapter_level` will still work for Lua marshalling. [API changes] Text.Pandoc.App.Opt: remove `optEpubChapterLevel`, add `optSplitLevel`. Text.Pandoc.Options: remove `writerEpubChapterLevel`, add `writerSplitLevel`.
2023-01-11Add ChunkedHTML writer.John MacFarlane
- Add module Text.Pandoc.Writers.ChunkedHTML, exporting writeChunkedHtml [API change]. - Revised API for Text.Pandoc.Chunks. `chunkNext`, `chunkPrev`, `chunkUp` are now just `Maybe Chunk`. - Fix assignment of navigation elements of Chunks. - Strip off anchor portion of next and prev links. - Remove Ord instances for SecInfo, Chunk. - Derive Show, Eq, Generic for ChunkDoc. - Add `chunkSectionNumber`, `chunkUnlisted`. - Automatically unwrap the zip to a directory if an extensionless output file specified. - Incorporate images with relative paths below working dir.