Commit Graph
17047 Commits
Author SHA1 Message Date
Edwin Török f48fa9ac17 reference.docx: fix validation error on tblW
```
./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-17 10:07:10 -08:00
Edwin Török 79204047a5 reference.docx: fix validation error on pStyle
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-17 10:07:10 -08:00
Edwin Török b7e9a6e0a7 reference.docx: Fix validation error on tcBorders
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-17 10:07:10 -08:00
Edwin Török c0febe86d5 reference.docx: fix validation error, remove extra >
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-17 10:07:10 -08:00
Edwin Török 39b59af8c9 reference.docx: fix validation error on spacing
```
./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-17 10:07:10 -08:00
Edwin Török 6a06f6f608 reference.docx: fix validation error on qFormat
```
./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-17 10:07:10 -08:00
John MacFarlane c3038dcd54 Bump to 3.1.11, update changelog.
pandoc-cli version is updated in sync.
man pages regenerated.
pandoc-cli-3.1.11 3.1.11
2023-12-15 18:56:27 -08:00
John MacFarlane 0f5435a46d Depend on released typst 0.5. 2023-12-15 18:38:39 -08:00
John MacFarlane 9f43da7f81 Logging: add MakePDFWarning constructor to LogMessage.
[API change]

Use this to pass LaTeX warnings on to user as warnings.
2023-12-15 12:23:33 -08:00
John MacFarlane 04acb3f7f7 Logging: add MakePDFInfo constructor to LogMessage.
[API change]

Use this with `report` in Text.Pandoc.PDF instead of manually
writing to stderr.
2023-12-15 11:16:46 -08:00
John MacFarlane bd8e31708a PDF: Refactored PDF generation via LaTeX. 2023-12-15 10:23:41 -08:00
John MacFarlane 53fbce09be Text.Pandoc.PDF: parse logs to determine whether additional runs needed.
Previously we ran a fixed number of times. Closes #9255.
2023-12-15 10:02:26 -08:00
John MacFarlane fd73880a87 Typst writer: emit ; after typst code...
unless followed by space.  Otherwise there's the potential
that the typst code will swallow up a following character.
Closes #9252.
2023-12-14 12:28:04 -08:00
John MacFarlane 272117f112 Use dev version of typst. 2023-12-14 11:55:15 -08:00
John MacFarlane b46d00343a Depend on texmath 0.12.8.6.
This gives us less verbose typst math output.
2023-12-12 19:08:30 -08:00
John MacFarlane 040f3e3e6b Minor changes to release checklist 2023-12-12 19:08:24 -08:00
John MacFarlane 24c50b9730 Makefile: add check that pandoc-cli depends on exact version of pandoc. 2023-12-12 13:40:42 -08:00
John MacFarlane 708bfa5c27 Regenerate man pages with pandoc 3.1.10.
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-12 13:33:59 -08:00
John MacFarlane 6e8fcda326 Makefile: add more prerelease checks.
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-12 13:33:00 -08:00
John MacFarlane 257d5cba7a stack.yaml - bump commonmark-extensions version. 3.1.10 pandoc-server-0.1.0.4 pandoc-cli-3.1.10 2023-12-12 09:29:52 -08:00
John MacFarlane c41f11a12d Cirrus build: set path so it finds ghc 9.6. 2023-12-12 09:11:43 -08:00
John MacFarlane a29049bd76 Fix man page locations in linux and macos package build scripts.
man pages have moved to pandoc-cli/man.
2023-12-11 23:08:40 -08:00
John MacFarlane 4a5e5a4c90 Cirrus build: use ghc 9.6 on macos. 2023-12-11 23:04:44 -08:00
John MacFarlane b98f3eda19 update AUTHORS.md 2023-12-11 22:21:47 -08:00
John MacFarlane 4abf9a28e9 stack.yaml - update toml-parser 2023-12-11 22:19:08 -08:00
John MacFarlane 3d4a6cc4a7 Whitespace fix. 2023-12-11 22:13:27 -08:00
John MacFarlane df403fb3ea Update MANUAL.txt date and man page date. 2023-12-11 22:12:53 -08:00
John MacFarlane e9be7ea451 Bump pandoc/pandoc-cli to 3.1.10, update changelog. 2023-12-11 22:10:56 -08:00
John MacFarlane 705e3e6aaf pandoc-server: bump to 0.1.0.4. 2023-12-11 22:10:38 -08:00
John MacFarlane 4b6fe06ba9 Fix duplicate entry in stack.yaml. 2023-12-11 12:43:53 -08:00
John MacFarlane 4243ae841a Use released versions of commonmark, commonmark-extensions, commonmark-pandoc. 2023-12-11 12:01:30 -08:00
John MacFarlane 55e3bf4ba7 Use texmath 0.12.8.5. 2023-12-11 11:13:31 -08:00
John MacFarlane 14e44385e3 Typst reader: don't include metadata from document element.
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-11 10:44:10 -08:00
John MacFarlane ea9317c73d Typst template fixes. 2023-12-11 10:18:37 -08:00
John MacFarlane 3039f99f3b Depend on released version of typst. 2023-12-10 23:59:19 -08:00
John MacFarlane 42091d1e13 Typst reader: parse metadata from document element. 2023-12-10 12:56:59 -08:00
John MacFarlane b0e8e99c83 Typst reader: add state fields for metadata. 2023-12-10 11:50:25 -08:00
John MacFarlane 8c90b46d8b Typst reader: support sys.version. 2023-12-10 11:22:08 -08:00
John MacFarlane 74b4e10125 Use latest dev typst-hs. 2023-12-10 11:00:42 -08:00
John MacFarlane 2a09252014 LaTeX writer: Add performance optimization to #9168.
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-10 09:54:26 -08:00
John MacFarlane 61314a02df Benchmark: use standalone documents for reader tests.
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-10 09:53:40 -08:00
Hikaru Ibayashi 3be253fb90 LaTeX writer: fix bug with big footnotes inside emphasis (#9168)
Closes #8982.
2023-12-10 09:29:45 -08:00
John MacFarlane aa95770743 Typst writer: use quote for block quotes.
Remove custom definitiion of blockquote in default template.
2023-12-09 23:23:15 -08:00
John MacFarlane d8b5541d61 Typst reader: allow @refs to become citations...
if there is no corresponding label in the document.
2023-12-09 22:51:35 -08:00
John MacFarlane cafca39ec7 Typst reader: collapse adjacent cite elements. 2023-12-09 15:50:01 -08:00
John MacFarlane cf0a050434 Typst reader: fix temporary regression in cite. 2023-12-09 15:28:54 -08:00
John MacFarlane d5e7c0ed1d Typst writer: handle supplements in cite. 2023-12-09 14:56:04 -08:00
John MacFarlane 3d482c2539 Update RELEASE-CHECKLIST. 2023-12-09 10:59:48 -08:00
John MacFarlane 35d44bb666 Link pandoc-cli version to pandoc version.
Henceforth pandoc-cli's version will be synchronized with pandoc's, and
pandoc-cli will depend on an exact pandoc version.

This will avoid confusion by ensuring that `cabal install pandoc-cli-X.Y.Z`
installs pandoc version X.Y.Z.  It will make things more straightforward
for upstream packagers (see #9232).

Note also that the man pages included in this package are for a specific
pandoc version.

This scheme does not follow the Haskell PVP, but that should cause no
harm, because this package does not expose a library.
2023-12-09 10:56:35 -08:00
John MacFarlane c2c45f1c6a Remove tested-with from pandoc-cli.cabal. 2023-12-09 10:20:34 -08:00