aboutsummaryrefslogtreecommitdiff
path: root/data
AgeCommit message (Collapse)Author
2024-06-23LaTeX writer: new method for ensuring images don't overflow.John MacFarlane
Previously we relied on graphicx internals and made global changes to Gin to force images to be resized if they exceed textwidth. This approach is brittle and caused problems with `\includesvg` (see #9660). The new approach uses a new macro `\pandocbounded` that is now defined in the LaTeX template. (Thanks here to Falk Hanisch in https://github.com/mrpiggi/svg/issues/60.) The LaTeX writer has been changed to enclose `\includegraphics` and `\includesvg` commands in this macro when they don't explicitly specify a width or height. In addition, the writer now adds `keepaspectratio` to the `\includegraphics` or `\includesvg` options if `height` is specified without width, or vice versa. Previously, this was set in the preamble as a global option. Compatibility issues: - If custom templates are used with the new LaTeX writer, they will have to be updated to include the new `\pandocbounded` macro, or an error will be raised because of the undefined macro. - Documents that specify explicit dimensions for an image may render differently, if the dimensions are greater than the line width or page height. Previously pandoc would shrink these images to fit, but the new behavior takes the specified dimensions literally. In addition, pandoc previously always enforced `keepaspectratio`, even when width and height were both specified, so images with width and height specified that do not conform to their intrinsic aspect ratio will appear differently. Closes #9660.
2024-06-10LaTeX writer/template: specify language option for `selnolig`...John MacFarlane
...and only include it if `english` or `german` is used. Since 3d8f011, the babel language is not specified as a class option any more; so now we need to explicitly specify the language option when we load `selnolig`. Only `german` and `english` are valid, so we construct the variable `selnolig-langs` in the writer and include `selnolig` if it is nonempty. This should restore proper ligature suppression when lualatex is used. Closes #9863. Supersedes #9864. Thanks to @fkohrt for the initial fix.
2024-06-10LaTeX template: put babel-lang in options to beamer.John MacFarlane
This is required to make beamer use proper localized terms for things like "Section." Closes #9868.
2024-06-08Fix `--toc-depth` with beamer output.John MacFarlane
Previously only top-level sections were ever included in the TOC, regardless of the setting of `--toc-depth`. Closes #9861.
2024-06-03Support `supplementary-material` in metadata for `jats_articlepublishing`.John MacFarlane
See #9818.
2024-05-30Fix typo in fix to template.typst.John MacFarlane
2024-05-30Typst template: use content rather than string...John MacFarlane
...for title, author, date, email. Fixes #9823 (escaped `\@` in rendered email). Allows formatting in title, author, date, and email fields. Since the PDF metadata requires a string, and typst only converts the title to a string (not the authors), we use a small function content-to-string to do this conversion. Background: https://github.com/typst/typst/issues/2196
2024-05-30ConTeXt template: remove `\setupbackend[export=yes]`.John MacFarlane
This doesn't seem necessary for what we're doing, and it causes a crash due to a bug in ConTeXt. Closes #9820.
2024-05-19Fix abstract-title in openxml template.John MacFarlane
2024-05-19Allow OpenXML templates to be used with `docx`.John MacFarlane
The `--reference-doc` option allows customization of styles in docx output, but it does not allow one to adjust the content of the output (e.g., changing the order in which metadata, the table of contents, and the body of the document are displayed), or adding boilerplate text before or after the document body. For these changes, one can now use `--template` with an OpenXML template. (See the default `openxml` template for a sample.) This patch also allows `--include-before-body` and `--include-after-body` to be used with `docx` output. The included files must be OpenXML fragments suitable for inclusion in the document body. Closes #8338 (`--include-before-body`, `--include-after-body`). Closes #9069 (a custom template can be used to omit the title page). Closes #7256. Closes #2928.
2024-05-18Cleaned up Abstract Title and Subtitle in default reference docx.John MacFarlane
Center Subtitle, remove color.
2024-05-15texinfo template: add variables for filename and versionJohn MacFarlane
2024-05-12Add subtitle to Typst template (#9747)Mickaël Canouil
2024-05-02LaTeX template: add `titlegraphicoptions` variable (#9207)Guilhem Saurel
Including a title graphic on a beamer template might require some options, like e.g. `height=1.5cm` to ensure some image will fit at its place in a given template.
2024-04-13reference.docx: use current standard Word theme.John MacFarlane
This includes using the sans-serif font Aptos instead of the serif font Cambria. See #7280.
2024-04-13reference.docx: Remove duplicate DefaultParagraphFont in styles.xml.John MacFarlane
2024-04-13reference.docx: stay closer to Word's current defaults.John MacFarlane
We use the default styles for headings and the title instead of what pandoc was using. See #7280.
2024-03-20Typst writer: support Typst 0.11 table features. (#9593)John MacFarlane
* Typst writer: support Typst 0.11 table features. - colspans - rowspans - cell alignment overrides - relative column widths - header and footer - multiple table bodies with intermediate headers Row heads are not yet supported. The default typst template has been modified so that tables don't have lines by default. As is standard with pandoc, we only add a line under a header or over a footer. However, a different default stroke pattern can easily be added in a template. Closes #9588.
2024-03-16Typst template: set table inset globally.John MacFarlane
2024-03-09Fix block headings support for unnumbered paragraphs (#9542)Oliver Fabel
`block-headings: true` seems to break unnumbered paragraphs and subparagraphs. This is due to the fact, that the unnumbered version uses the star macros \paragraph* and \subparagraph*. See issue #6018 for details.
2024-03-03Korean translations: delete colon in translation for 'to'.John MacFarlane
This was invalid YAML, and not desired anyway, since a colon is added.
2024-03-01Replace polyfill provider in HTML templates.John MacFarlane
The PR replaces polyfill.io with cdnjs.cloudflare.com/polyfill. polyfill.io has been acquired by Funnull, and the service has become unstable. This is essentially a cleaned up version of PR #2384 by @SukkaW; see the PR for more information.
2024-02-13Add djot reader and writer.djotJohn MacFarlane
Djot is a light markup syntax (https://djot.net). This patch adds djot as input and output formats. API changes: Add Text.Pandoc.Readers.Djot Add Text.Pandoc.Writers.Djot
2024-02-03ConTeXt template: support font fallback (#9361)Lawrence Chonavel
This uses the same YAML options as the LaTeX template.
2024-01-20LaTeX writer: set font fallback for babel main fontMax Heller
2024-01-19LaTeX template: support font fallbacklawcho
* LuaLaTeX-specific (uses luaotfload) * Configured in YAML metadata * Sans/main/mono fonts have separate fallback chains
2024-01-05Fix beamer highlightingmh4ckt3mh4ckt1c4s
2023-12-26ODT/opendocument writers: properly handle highlighting styles.John MacFarlane
These styles were going into an office:styles element in content.xml, but this is invalid. Instead they must go in styles.xml. See #9287. The variable `highlighting-styles` no longer has any effect on the default opendocument template, and highlighting styles are not included in opendocument output.
2023-12-20Remove html5shiv from default HTML5 template.John MacFarlane
I don't think we need to support IE < 9 any more!
2023-12-17reference.docx: fix validation error on w:bCsEdwin Török
``` { "Description": "The element has unexpected child element 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:bCs'.", "Path": { "NamespacesDefinitions": [ "xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"" ], "Namespaces": { }, "XPath": "/w:styles[1]/w:style[15]/w:rPr[1]", "PartUri": "/word/styles.xml" }, "Id": "Sch_UnexpectedElementContentExpectingComplex", "ErrorType": "Schema" }, ``` Signed-off-by: Edwin Török <[email protected]>
2023-12-17reference.docx: fix validation error on w:bEdwin Török
From OOXMLValidator: ``` { "Description": "The element has unexpected child element 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:b'.", "Path": { "NamespacesDefinitions": [ "xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"" ], "Namespaces": { }, "XPath": "/w:styles[1]/w:style[9]/w:rPr[1]", "PartUri": "/word/styles.xml" }, "Id": "Sch_UnexpectedElementContentExpectingComplex", "ErrorType": "Schema" }, ``` Signed-off-by: Edwin Török <[email protected]>
2023-12-17reference.docx: fix validation error on doNotTrackMovesEdwin Török
``` { "Description": "The element has unexpected child element 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:doNotTrackMoves'.", "Path": { "NamespacesDefinitions": [ "xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"" ], "Namespaces": { }, "XPath": "/w:settings[1]", "PartUri": "/word/settings.xml" }, "Id": "Sch_UnexpectedElementContentExpectingComplex", "ErrorType": "Schema" } ``` According to `wml.xsd` the order is: ``` <xsd:complexType name="CT_Settings"> <xsd:sequence> <xsd:element name="doNotTrackMoves" type="CT_OnOff" minOccurs="0"/> [...] <xsd:element name="footnotePr" type="CT_FtnDocProps" minOccurs="0"/> ``` Signed-off-by: Edwin Török <[email protected]>
2023-12-17reference.docx: fix validation error on cnfStyleEdwin Török
Error from OOXMLValidator: ``` { "Description": "The required attribute 'val' is missing.", "Path": { "NamespacesDefinitions": [ "xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"" ], "Namespaces": { }, "XPath": "/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:trPr[1]/w:cnfStyle[1]", "PartUri": "/word/document.xml" }, "Id": "Sch_MissRequiredAttribute", "ErrorType": "Schema" }, ``` This is a bitmask where the first bit means 'first row', which is set as an attribute already. Signed-off-by: Edwin Török <[email protected]>
2023-12-17reference.docx: fix validation error on tblWEdwin Török
``` ./tmp/document-pretty.xml:260: element tblW: Schemas validity error : Element '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}tblW', attribute '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}w': '0.0' is not a valid value of the union type '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_MeasurementOrPercent'. ``` See http://officeopenxml.com/WPtableWidth.php, there is a disagreement here between standard versions on whether a `%` is required or not when type=`pct`, but the default is 0 when omitted, so just delete this entry. Signed-off-by: Edwin Török <[email protected]>
2023-12-17reference.docx: fix validation error on pStyleEdwin Török
There were 2 `pStyle` for `Abstract`: ``` ./tmp/document-pretty.xml:47: element pStyle: Schemas validity error : Element '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}pStyle': This element is not expected. Expected is one of ( {http://schemas.openxmlformats.org/wordprocessingml/2006/main}keepNext, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}keepLines, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}pageBreakBefore, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}framePr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}widowControl, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}numPr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}suppressLineNumbers, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}pBdr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}shd, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}tabs ). ``` Signed-off-by: Edwin Török <[email protected]>
2023-12-17reference.docx: Fix validation error on tcBordersEdwin Török
According to `wml.xsd` the order must be: ``` <xsd:sequence> <xsd:element name="tcBorders" type="CT_TcBorders" minOccurs="0" maxOccurs="1"/> [...] <xsd:element name="vAlign" type="CT_VerticalJc" minOccurs="0"/> ``` Signed-off-by: Edwin Török <[email protected]>
2023-12-17reference.docx: fix validation error, remove extra >Edwin Török
There was an extra `>` which showed up as "character content" in the XML: ``` /tmp/styles-pretty.xml:113: element rPr: Schemas validity error : Element '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}rPr': Character content other than whitespace is not allowed because the content type is 'element-only'. ``` Signed-off-by: Edwin Török <[email protected]>
2023-12-17reference.docx: fix validation error on spacingEdwin Török
``` ./tmp/styles-pretty.xml:111: element spacing: Schemas validity error : Element '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}spacing': This element is not expected. Expected is one of ( {http://schemas.openxmlformats.org/wordprocessingml/2006/main}textDirection, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}textAlignment, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}textboxTightWrap, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}outlineLvl, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}divId, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}cnfStyle, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}pPrChange ). ``` According to `wml.xsd` `spacing` must be placed before `jc`: ``` <xsd:sequence> <xsd:element name="spacing" type="CT_Spacing" minOccurs="0"/> [...] <xsd:element name="jc" type="CT_Jc" minOccurs="0"/> ``` Signed-off-by: Edwin Török <[email protected]>
2023-12-17reference.docx: fix validation error on qFormatEdwin Török
``` ./tmp/styles-pretty.xml:30: element qFormat: Schemas validity error : Element '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}qFormat': This element is not expected. Expected is one of ( {http://schemas.openxmlformats.org/wordprocessingml/2006/main}rPr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}tblPr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}trPr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}tcPr, {http://schemas.openxmlformats.org/wordprocessingml/2006/main}tblStylePr ). ``` According to `wml.xsd` it must come before `pPr`: ``` <xsd:complexType name="CT_Style"> <xsd:sequence> [...] <xsd:element name="qFormat" type="CT_OnOff" minOccurs="0"/> [...] <xsd:element name="pPr" type="CT_PPrGeneral" minOccurs="0" maxOccurs="1"/> ``` Signed-off-by: Edwin Török <[email protected]>
2023-12-11Typst template fixes.John MacFarlane
2023-12-09Typst writer: use quote for block quotes.John MacFarlane
Remove custom definitiion of blockquote in default template.
2023-12-08Docx writer: Use different style for block quotes in notes.John MacFarlane
Using "Footnote Block Text" for the style name, so it can be given a different font size if footnotes are. Closes #9243.
2023-12-07Typst writer/template: support `--toc-depth` as in other writers.John MacFarlane
Closes #9242.
2023-11-14Update default.typst to support csl (#9186)Ian Max Andolina
Typst now supports CSL for its native citation engine, so pandoc should use a specified `csl` style in the template, falling back to `bibliographystyle` if `csl` is not specified. https://typst.app/docs/reference/meta/bibliography/
2023-11-03LaTeX template: include bookmark package unconditionally.John MacFarlane
This package produces better PDF bookmarks than hyperref and does it on the first pass. As a consequence, we now default to running LaTeX only once in producing a PDF (instead of twice). If a table of contents is present, we still have to run three times to get the page numbers.
2023-10-28epub.css: add styling for sup and sub.John MacFarlane
Closes #9160.
2023-10-01Update et translationpriiduonu
2023-09-29Updated Norwegian language translation filesStephan Daus
1) Renamed no.yaml (macrolanguage Norwegian) to nb.yaml (Norwegian Bokmål) 2) Created soft symbolic link from no.yaml pointing to nb.yaml.
2023-09-23Apply style to h6samuel-weinhardt
2023-09-23Format stylessamuel-weinhardt