aboutsummaryrefslogtreecommitdiff
path: root/data
AgeCommit message (Collapse)Author
2023-08-25Man writer: improvements to code and code blocks.John MacFarlane
The aim here (see #9020) is to produce more standard and more portable man pages. To that end: - We revert the fanciness introduced in #7506, which employs a custom font name V and a macro that makes this act like boldface in a terminal and monospace in other formats. Unfortunately, this code uses a mechanism that is not portable (and does not work in mandoc). - Instead of using V for inline code, we simply use CR. Note that `\f[CR]` is emitted instead of plain `\f[C]`, because there is no C font in man. (This produces warnings in recent versions of groff.) - For code blocks, we now use the `.EX` and `.EE` macros, together with `.IP` for spacing and indentation. This gives more standard code that can be better interpreted e.g. by mandoc.
2023-08-24Man writer: don't emit `.hy`...John MacFarlane
regardless of setting of `hyphenate` variable. See #9020.
2023-08-13Change semicolon to colonJackson Schuster
2023-08-06ODT writer: Use a style for Highlighted, so color can be adjusted.John MacFarlane
2023-08-04OpenDocument writer: implement syntax highlighting.John MacFarlane
Still unimplemented: global background colors, line numbers. Closes #6710, obsoletes #6717.
2023-08-04Started implementing syntax highlighting for ODT.John MacFarlane
Currently only colors are supported, not other text styles. This change includes a new default opendocumnet template. See #6710.
2023-07-26Add clause for svg to default CSS for HTML.John MacFarlane
Suggested at #8969.
2023-07-05Make modern AsciiDoc the target for `asciidoc`.John MacFarlane
The AsciiDoc community now regards the dialect parsed by `asciidoctor` as the official AsciiDoc syntax, so it should be the target of our `asciidoc` format. Closes #8936. The `asciidoc` output format now behaves like `asciidoctor` used to. `asciidoctor` is a deprecated synonynm. For the old `asciidoc` behavior (targeting the Python script), use `asciidoc_legacy`. The templates have been consolidated. Instead of separate `default.asciidoctor` and `default.asciidoc` templates, there is just `default.asciidoc`. Text.Pandoc.Writers.AsciiDoc API changes: - `writeAsciiDoc` now behaves like `writeAsciiDoctor` used to. - `writeAsciiDoctor` is now a deprecated synonym for `writeAsciiDoc`. - New exported function `writeAsciiDocLegacy` behaves like `writeAsciDoc` used to.
2023-07-03Typst writer: consolidate bibliography files...John MacFarlane
into one `#bibliography` command. (Separate bibliographies are not possible.) Closes #8937.
2023-06-27Remove invalid term "Subject" from translations for tr.John MacFarlane
Closes #8921.
2023-06-22Add Nynorsk (New Norwegian) translationsPer Christian Gaustad
2023-06-05Typst writer: use `#footnote` for notes.John MacFarlane
Closes #8893.
2023-04-28Writers.ODT: don't add settings.xmlMichael Stahl
The way "ooo:configuration-settings" work is that if LibreOffice Writer loads a file in which it exists, it assumes that an old version of itself has produced it and it defaults any config-item that it knows but that doesn't exist in the file to the "backward-compatible" value, which usually means to enable some layout or text formatting bugs so that the document looks the same as in the old LO version that created it. If there is no "ooo:configuration-settings" then it will use the default values for a new document, which should give the best formatting results. Pandoc's documents are obviously not created by LO, so it doesn't make sense to produce ooo:configuration-settings. Regarding the "ooo:view-settings", IIRC these mainly set to the document view to the position where the document was last edited (by default only if the user in meta.xml matches the user data in LO's configuration), which is also irrelevant for Pandoc. So just leave out the settings.xml; only content.xml/styles.xml are required (see ODF 1.3, part 3, 2.2.1 OpenDocument Document, A.2). (The settings.xml that is produced for formulas by the documentSettings function hopefully isn't problematic because LO Math works a bit differently and stores important formatting attributes in settings.xml because MathML doesn't allow it in content.xml.)
2023-04-28Writers.ODT: don't add Configurations2 dirMichael Stahl
This empty file is some ancient OOo wart and it's quite pointless here.
2023-04-28Writers.ODT: don't add thumbnailMichael Stahl
Quite pointless to add a hardcoded image that doesn't show the document content.
2023-04-28Writers.ODT: stop validator complaints by producing ODF 1.3Michael Stahl
The ODF validator complains about an invalid attribute style:contextual-spacing in styles.xml, ultimately an implementation error in whatever old version of LibreOffice that produced the data/odt/styles.xml (should have put it into an extension namespace). Fortunately the attribute was added to ODF 1.3, which was released a couple years ago. So the easiest fix is to simply produce ODF 1.3 instead of 1.2; it's supposed to be fully backward compatible.
2023-04-27add lang attribute to html tag in epub tplGabriel Lewertowski
2023-04-17Fix YAML in translation files for cs and pl.John MacFarlane
The colon needs quoting. Closes #8787.
2023-04-07Typst writer: omit bibliography if `citations` not enabled.John MacFarlane
With this change, the typst writer will omit the `#bibliography` command when `citations` is not enabled. (If you want to use pandoc's own `--citeproc`, you should combine it with `-t typst-citations` to disable native typst citations. Closes #8763.
2023-03-29styles.html: fix task-list styling in reveal.jsAlbert Krewinkel
Fixes: #8731
2023-03-28Fix `\babelfont` in default latex template.John MacFarlane
The first invocation should not specify a language, because it's the default. If we specify a language, we get an error in some cases. Closes #8728.
2023-03-27Typst: Use customized term instead of custom macro for def lists.John MacFarlane
2023-03-26More Typst writer improvements.John MacFarlane
+ Update manual with variables for Typst. + Split `lang` metadata into separate `lang` and `region` for Typst. + Fix label positioning in Divs. + Fix text customizations (lang, region, font, size) so they actually work. + Update tests and man page.
2023-03-26Typst writer improvements.John MacFarlane
+ Fix non-decimal enumerated lists. + Fix endnotes ending with code blocks. + Improve default template to use a typst template. + Factor out definitions and typst template into partials. + Properly escape backslash and quote inside double quotes. + Update tests.
2023-03-25Add typst writer.John MacFarlane
See #8713.
2023-03-25LaTeX template: set mainfontoptions with `\babelfont` too.John MacFarlane
Closes #8721.
2023-03-20Fix highlight/underline with lualatex.John MacFarlane
We need the lua-ul package instead of soul, which doesn't work with lualatex. Updates default latex template. Closes #8707.
2023-03-17Docx writer: include abstract title.John MacFarlane
Closes #8702. Uses localized term for abstract.
2023-03-15Fix template for babelfonts so it conforms with documentation.John MacFarlane
Closes #8697.
2023-03-10Add `babelfonts` variable to default LaTeX template.John MacFarlane
This allows specifying certain fonts to be used with certain babel languages. Thanks to Frederik Elwert.
2023-03-06Fix background image in Beamer when there are figure environments (#8671)Martín Pozo
2023-02-26LaTeX template: Add CJKsansfont and CJKmonofont for XeLaTeX (#8656)Yudong Jin
`CJKsansfont` and `CJKmonofont` will be set for xelatex only if `CJKmainfont` is also provided.
2023-02-21asciidoc{,tor} template: fix revision date when author is unsetarcnmx
Revision line syntax is only valid in combination with an author line, so the date attribute must be set explicitly when the author is missing fixes #8637
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-14Include needed polyfill when MathJaX is used.John MacFarlane
Closes #8625.
2023-02-12URL style in ConTeXt (#8612)Thomas Hodgson
Previously, a URL like this would be in monospace text: `\useURL[url1][https://example.com]`. Now, it will match the main text unless the `linkstyle` variable is set, which controls the styling of all links. Closes #8602. Added documentation for `urlstyle` variable in the ConTeXt template, and added detail to its documentation in the LaTeX template.
2023-01-15ConTeXt writer: support `tagging` extension [API Change]Albert Krewinkel
Paragraphs are enclosed by `\bpar` and `\epar` commands, and `highlight` commands are used for emphasis. This results in much better tagging in PDF output.
2023-01-13Support complex figures. [API change]Albert Krewinkel
Thanks and credit go to Aner Lucero, who laid the groundwork for this feature in the 2021 GSoC project. He contributed many changes, including modifications to the readers for HTML, JATS, and LaTeX, and to the HTML and JATS writers. Shared (Albert Krewinkel): - The new function `figureDiv`, exported from `Text.Pandoc.Shared`, offers a standardized way to convert a figure into a Div element. Readers (Aner Lucero): - HTML reader: `<figure>` elements are parsed as figures, with the caption taken from the respective `<figcaption>` elements. - JATS reader: The `<fig>` and `<caption>` elements are parsed into figure elements, even if the contents is more complex. - LaTeX reader: support for figures with non-image contents and for subfigures. - Markdown reader: paragraphs containing just an image are treated as figures if the `implicit_figures` extension is enabled. The identifier is used as the figure's identifier and the image description is also used as figure caption; all other attributes are treated as belonging to the image. Writers (Aner Lucero, Albert Krewinkel): - DokuWiki, Haddock, Jira, Man, MediaWiki, Ms, Muse, PPTX, RTF, TEI, ZimWiki writers: Figures are rendered like Div elements. - Asciidoc writer: The figure contents is unwrapped; each image in the the figure becomes a separate figure. - Classic custom writers: Figures are passed to the global function `Figure(caption, contents, attr)`, where `caption` and `contents` are strings and `attr` is a table of key-value pairs. - ConTeXt writer: Figures are wrapped in a "placefigure" environment with `\startplacefigure`/`\endplacefigure`, adding the features caption and listing title as properties. Subfigures are place in a single row with the `\startfloatcombination` environment. - DocBook writer: Uses `mediaobject` elements, unless the figure contains subfigures or tables, in which case the figure content is unwrapped. - Docx writer: figures with multiple content blocks are rendered as tables with style `FigureTable`; like before, single-image figures are still output as paragraphs with style `Figure` or `Captioned Figure`, depending on whether a caption is attached. - DokuWiki writer: Caption and "alt-text" are no longer combined. The alt text of a figure will now be lost in the conversion. - FB2 writer: The figure caption is added as alt text to the images in the figure; pre-existing alt texts are kept. - ICML writer: Only single-image figures are supported. The contents of figures with additional elements gets unwrapped. - HTML writer: the alt text is no longer constructed from the caption, as was the case with implicit figures. This reduces duplication, but comes at the risk of images that are missing alt texts. Authors should take care to provide alt texts for all images. Some readers, most notably the Markdown reader with the `implicit_figures` extension, add a caption that's identical to the image description. The writer checks for this and adds an `aria-hidden` attribute to the `<figcaption>` element in that case. - JATS writer: The `<fig>` and `<caption>` elements are used write figures. - LaTeX writer: complex figures, e.g. with non-image contents and subfigures, are supported. The `subfigure` template variable is set if the document contains subfigures, triggering the conditional loading of the *subcaption* package. Contants of figures that contain tables are become unwrapped, as longtable environments are not allowed within figures. - Markdown writer: figures are output as implicit figures if possible, via HTML if the `raw_html` extension is enabled, and as Div elements otherwise. - OpenDocument writer: A separate paragraph is generated for each block element in a figure, each with style `FigureWithCaption`. Behavior for single-image figures therefore remains unchanged. - Org writer: Only the first element in a figure is given a caption; additional block elements in the figure are appended without any caption being added. - RST writer: Single-image figures are supported as before; the contents of more complex images become nested in a container of type `float`. - Texinfo writer: Figures are rendered as float with type `figure`. - Textile writer: Figures are rendered with the help of HTML elements. - XWiki: Figures are placed in a group. Co-authored-by: Aner Lucero <[email protected]>
2023-01-13HTML style template: put Consolas before Lucida Console for code font.John MacFarlane
This is to prevent Lucida Console from being used on Windows, where there seems to be a spacing issue in some applications, with boldface glyphs wider than regular ones. Closes #8543.
2023-01-11LaTeX template: set `\babelfont`...John MacFarlane
when `mainlang` and a lang are specified and pdflatex is not being used. This is needed for good results in Arabic and doesn't seem to hurt for other languages we've tried. Closes #8538.
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.
2023-01-06Add `code { hyphens: manual; }` to HTML and EPUB CSS.John MacFarlane
Closes #8530.
2023-01-02epub.css: comment out flex rules.John MacFarlane
This fixes commit 3666d79ae776ce4839262c9f9cbb9d76471d2eb0 which closed #8379.
2022-12-22Reveal.js template: prevent line-wrapping of parallax optionsAlbert Krewinkel
Fixes: #8503
2022-12-21Fix class name hanging -> hanging-indent in styles.citations.html.John MacFarlane
2022-12-18ConTeXt writer: support syntax highlighting for code.Albert Krewinkel
2022-12-12Update default CSL with latest chicago-author-date.csl.John MacFarlane
This removes some weird punctuation overrides for Portuguese. Closes jgm/citeproc#123.
2022-11-19LaTeX writer: Use soul instead of ulem for strikeout, underline.John MacFarlane
This handles things like hyphenation, line breaks, and nonbreaking spaces better. Closes #8411.
2022-11-10Add LaTeX variable `urlstyle` (#8429)Amar Al-Zubaidi
This is set to `same` by default, so users should not experience any change.
2022-11-09HTML template: remove default font size, line height...John MacFarlane
...and font family in default inline css. Closes #8423 (see comments there for motivation). `mainfont`, `fontsize`, and `linestretch` can still be used as before; the only difference is that we no longer provide opinionated defaults. This commit also adds a `maxwidth` variable that sets `max-width`; if not set, 36em is used as a default.