summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-12-17Docx writer: ensure that elements in settings are ordered correctly.John MacFarlane
The elements must occur in a specific order. This was being messed up when integrating a custom reference.docx. Closes #9264.
2023-12-17Docx writer: don't emit empty rows.John MacFarlane
These (`<w:tr />`) seem to cause problems for word. Closes #9224.
2023-12-17test/docx/golden: regenerateEdwin Török
Using `make test TESTARGS=--accept` Signed-off-by: Edwin Török <edwin@etorok.net>
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 <edwin@etorok.net>
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 <edwin@etorok.net>
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 <edwin@etorok.net>
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 <edwin@etorok.net>
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 <edwin@etorok.net>
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 <edwin@etorok.net>
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 <edwin@etorok.net>
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 <edwin@etorok.net>
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 <edwin@etorok.net>
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 <edwin@etorok.net>
2023-12-15Bump to 3.1.11, update changelog.John MacFarlane
pandoc-cli version is updated in sync. man pages regenerated.
2023-12-15Depend on released typst 0.5.John MacFarlane
2023-12-15Logging: add MakePDFWarning constructor to LogMessage.John MacFarlane
[API change] Use this to pass LaTeX warnings on to user as warnings.
2023-12-15Logging: add MakePDFInfo constructor to LogMessage.John MacFarlane
[API change] Use this with `report` in Text.Pandoc.PDF instead of manually writing to stderr.
2023-12-15PDF: Refactored PDF generation via LaTeX.John MacFarlane
2023-12-15Text.Pandoc.PDF: parse logs to determine whether additional runs needed.John MacFarlane
Previously we ran a fixed number of times. Closes #9255.
2023-12-14Typst writer: emit `;` after typst code...John MacFarlane
unless followed by space. Otherwise there's the potential that the typst code will swallow up a following character. Closes #9252.
2023-12-14Use dev version of typst.John MacFarlane
2023-12-12Depend on texmath 0.12.8.6.John MacFarlane
This gives us less verbose typst math output.
2023-12-12Minor changes to release checklistJohn MacFarlane
2023-12-12Makefile: add check that pandoc-cli depends on exact version of pandoc.John MacFarlane
2023-12-12Regenerate man pages with pandoc 3.1.10.John MacFarlane
This properly escapes hyphens. Also, we get proper version numbers in pandoc-server and pandoc-lua. The Makefile has already been modified to ensure that all three man pages will be regenerated when there is a new version of pandoc.
2023-12-12Makefile: add more prerelease checks.John MacFarlane
Check for agreement of pandoc and pandoc-cli version. Check for presence of changelog entry for this version. Check that man pages specify this version.
2023-12-12stack.yaml - bump commonmark-extensions version.John MacFarlane
2023-12-12Cirrus build: set path so it finds ghc 9.6.John MacFarlane
2023-12-11Fix man page locations in linux and macos package build scripts.John MacFarlane
man pages have moved to pandoc-cli/man.
2023-12-11Cirrus build: use ghc 9.6 on macos.John MacFarlane
2023-12-11update AUTHORS.mdJohn MacFarlane
2023-12-11stack.yaml - update toml-parserJohn MacFarlane
2023-12-11Whitespace fix.John MacFarlane
2023-12-11Update MANUAL.txt date and man page date.John MacFarlane
2023-12-11Bump pandoc/pandoc-cli to 3.1.10, update changelog.John MacFarlane
2023-12-11pandoc-server: bump to 0.1.0.4.John MacFarlane
2023-12-11Fix duplicate entry in stack.yaml.John MacFarlane
2023-12-11Use released versions of commonmark, commonmark-extensions, commonmark-pandoc.John MacFarlane
2023-12-11Use texmath 0.12.8.5.John MacFarlane
2023-12-11Typst reader: don't include metadata from document element.John MacFarlane
The problem is that typst doesn't print this metadata; it is only used in PDF properties. The title, authors, and so on are represented in the typst document (and there is no standardized method like LaTeX's `\maketitle`). So if we parse this as metadata then converting a typst document will likely lead to a double title.
2023-12-11Typst template fixes.John MacFarlane
2023-12-10Depend on released version of typst.John MacFarlane
2023-12-10Typst reader: parse metadata from document element.John MacFarlane
2023-12-10Typst reader: add state fields for metadata.John MacFarlane
2023-12-10Typst reader: support sys.version.John MacFarlane
2023-12-10Use latest dev typst-hs.John MacFarlane
2023-12-10LaTeX writer: Add performance optimization to #9168.John MacFarlane
We only walk the tree to raise big notes if the document contains big notes (it is fast to check). The removes the slight performance penalty of #9168 for most documents.
2023-12-10Benchmark: use standalone documents for reader tests.John MacFarlane
Otherwise typst reader test fails. Note: this means that we are now parsing longer documents, so bench results on readers won't be comparable to before.
2023-12-10LaTeX writer: fix bug with big footnotes inside emphasis (#9168)Hikaru Ibayashi
Closes #8982.
2023-12-09Typst writer: use quote for block quotes.John MacFarlane
Remove custom definitiion of blockquote in default template.