Commit Graph
17179 Commits
Author SHA1 Message Date
John MacFarlane bf674e8ddd Markdown writer: use different width fences for nested divs.
Outer divs have longer fences. This aids clarity for the reader,
making it easier to see where the div ends. It also makes the
output compatible with some other implementations, e.g.
micromark, which require different-width fences for nesting.

Closes #9450.
2024-02-12 10:05:36 -08:00
John MacFarlane bd352e41d6 Man reader: move spaces outside of emph/strong.
This is needed to avoid problems in conversion to Markdown
and some other formats. Closes #9445.
2024-02-11 19:06:50 -08:00
John MacFarlane 8c85fbbf2e Powerpoint writer: Fix regression in layout for slides with figures.
Closes #9442.
2024-02-09 16:39:56 -08:00
John MacFarlane 0604fa297d Fix id replacements in SVGs with clipping paths.
This fixes `--embed-resources` when SVGs have `clip-path`
attributes.

Closes #9420.
2024-02-09 16:39:48 -08:00
John MacFarlane ea23868ae4 Fix size of duplicated SVGs with --embed-resources.
Closes #9439.
2024-02-09 16:39:40 -08:00
John MacFarlane 9ccd40f114 Allow zlib 0.7. 2024-02-08 09:07:56 -08:00
John MacFarlane 719f31b26b MediaWiki reader: don't make leading blanks underscores...
in image links. See #9425.

(Not a complete fix for this issue, because `:file:` and the like
are still not handled properly.)
2024-02-07 08:42:20 -08:00
John MacFarlane c46bf5948c MediaWiki reader: allow lowercase image:.
Closes #9424.
2024-02-07 08:28:29 -08:00
John MacFarlane e81a60fdf2 Support "pagetotal" in converting BibLaTeX. 2024-02-07 08:15:47 -08:00
John MacFarlane 5fb0244fa3 Fix stack.yaml. 2024-02-06 20:41:52 -08:00
John MacFarlane 4916cfdd4d Use latest commonmark-extensions. 2024-02-06 19:49:47 -08:00
John MacFarlane 4b8882b459 Add clarification to docs for --resource-path.
Thanks to @cagix for the suggestion (#9417).
2024-02-06 08:03:10 -08:00
Edwin Török 81f7e5789f fix(ci): run 2nd docx validation workflow when script changes
Signed-off-by: Edwin Török <edwin@etorok.net>
2024-02-05 15:07:23 -08:00
Edwin Török b8c921fe7d fix(ci): explicitly choose a .Net version
Upstream OOXML-Validator has added support for building with .Net 8.0 in
commit 29af1086b5c78b6a213e70d2e1cb8da2a8e5b876.
But that means OOXML-Validator can now be built for both .Net 6.0 and 8.0,
so we need to pick which one we want when running, otherwise we get an
error:
```
Unable to run your project
Your project targets multiple frameworks.
Specify which framework to run using '--framework'.
```

Signed-off-by: Edwin Török <edwin@etorok.net>
2024-02-05 15:07:23 -08:00
Olivier Benz 822480c4c8 Use images from Quay (#9411) 2024-02-05 09:04:30 -08:00
John MacFarlane bab30eaf41 Typst reader: improve handling of inline #quote.
Closes #9413.
2024-02-05 08:55:28 -08:00
John MacFarlane 3ef74d1fd2 Typst reader: fix handling of dot(), tilde(), ddot().
See jgm/typst-hs#38.
2024-02-04 22:37:37 -08:00
John MacFarlane 1e05f32ead Typst reader: fix character used for norm.
See jgm/typst-hs#38.
2024-02-04 22:01:26 -08:00
John MacFarlane c38623a7ee Depend on dev typst-hs. 2024-02-04 22:01:10 -08:00
John MacFarlane 0706c7a285 Docx writer: restore ability to center-justify table.
The fix to #5947 caused all tables to be left indented.
This was necessary to avoid extra indentation in table cells
when a table appeared in a list item.  This change makes
the changes conditional, so that they only affect tables
in list items.

Closes #9393.
2024-02-03 22:50:55 -08:00
John MacFarlane 03bb426a4a Shared: makeSections behavior changes.
+ When the optional base level parameter is provided, we no
  longer ensure that the sequence of heading levels is gapless
  [behavior change]. Instead, we set the lowest heading level to
  the specified base level, and adjust the others accordingly. If
  an author wants to skip a level, e.g. from level 1 to level 3,
  they can do that. In general, the heading levels specified
  in the source document are preserved; `makeSections` only
  puts them into a hierarchical structure. Closes #9398.

+ Section numbers are now assigned so that the top level
  gets `1`, no matter what heading level is used. So, even
  if the top heading level is 2, numbers will be `1`, `2`, etc.
  rather than `0.1`, `0.2`, as in the past. Closes #5071.

+ We revert to the old behavior when the `--number-offset` option
  is used. So, for example, if a document begins with a level-3
  heading, and `--number-offset=1,2` is used, the top-level section
  numbers will be `1.2.1`, `1.2.2`, etc. This is mainly for
  backwards-compatibility.
2024-02-03 22:19:29 -08:00
John MacFarlane 6fc8a80c2c Shared.makeSections: more elegant code for section number calculation. 2024-02-03 12:47:48 -08:00
John MacFarlane 4d2992dce4 MANUAL: Revised docs for fontfallback.
Moved ConTeXt-specific docs to the ConTeXt variables section.
2024-02-03 10:36:07 -08:00
Lawrence Chonavel 7164a238dd ConTeXt template: support font fallback (#9361)
This uses the same YAML options as the LaTeX template.
2024-02-03 10:27:31 -08:00
Salim B cd4676e498 Harmonize spelling of Markdown and MultiMarkdown (#9402)
MANUAL.txt: Markdown and MultiMarkdown are proper nouns and thus start with an
uppercase letter.
2024-02-02 15:15:32 -08:00
Tomas Dahlqvist 163be37dd6 Using internal column widths in pptx writer tables (#9392)
The table writer used to only divide all available width evenly
for all columns. In this update the code uses the incoming widths
if they are available. If they are not set the earlier even
distribution is used. Some of the golden templates are adjusted
slightly because of different rounding when using the new
calculation model.

Closes #5706
2024-02-01 10:37:12 -08:00
Iacobus1983 3e7e6f014a EPUB accessibility additions (#9400)
AccessModeSufficient and AccessibilitySummary are added.

These metadata are optional according to the EPUB Accessibility 1.1
standard, but ACE Daisy checker flags ebooks for missing them
(cf daisy/ace#389 and daisy/ace#400).

With this commit:

AccessModeSufficient is defaulted to "textual".
AccessibilitySummary can be included via the metadata block.
2024-02-01 10:19:08 -08:00
John MacFarlane 9ab0ffb99e Typst writer: unescape URI escapes in image paths.
Closes #9389.
2024-01-30 09:20:20 -08:00
John MacFarlane 2f45f1e232 Makefile: Validate generated EPUB as part of prerelease checks. 2024-01-30 08:33:16 -08:00
John MacFarlane b706cb0ec5 Chunks: autogenerate unique ids for sections missing them.
This is needed for TOC generation to work properly. We can't
create TOC links if there are no ids.

This fixes some EPUB validation issues we've been getting since
switching over to Chunks for chunking.

Closes #9383.
2024-01-30 08:29:21 -08:00
John MacFarlane 32b6db15dc Update lua tests for change to toTOCTree. 2024-01-30 08:05:25 -08:00
John MacFarlane ef69842312 Chunks: improve fixTOCTreePaths.
We weren't adding ids for section headings that don't head a
chunk, but these headings are needed for a TOC.
2024-01-29 23:04:45 -08:00
John MacFarlane c1f87fdb37 Typst writer: handle labels and citaiton ids with spaces...
and other special characters. In these cases, we produce an
explicit `label()` rather than using `<>` or `@`.

Cloess #9387.
2024-01-29 12:25:09 -08:00
John MacFarlane 97eb927339 Typst writer: avoid illegal labels.
Closes #9387.
2024-01-29 11:45:15 -08:00
John MacFarlane 75d013f73e LaTeX reader: generate relative widths for \linewidth, \textheight.
Closes #9388.
2024-01-29 11:11:45 -08:00
John MacFarlane 8b539dbf1d Makefile: change default rule to build THEN test.
That way we can play with the executable while the tests complete.
2024-01-29 11:11:39 -08:00
John MacFarlane b6ac32b116 Typst writer escaping improvements.
We no longer escape `(`. The reason we did this before (#9137)
has been addressed in another way (#9252).

We only escape `=`, `+`, `-` at the beginning of a line.

We now also escape `/` at the beginning of a line.

This should reduce unnecessary escapes.

Closes #9386.
2024-01-29 10:53:51 -08:00
Albert Krewinkel d90444d4c8 Lua: catch encoding error in pandoc.read
Fixed a bug that could lead to an un-catchable error and program
termination when `pandoc.read` was called with invalid UTF-8 input.

Fixes: #9385
2024-01-29 17:41:44 +01:00
John MacFarlane ba6fc02b90 Depend on commonmark 0.2.5. 2024-01-28 18:13:36 -08:00
Iacobus1983 b837d59fd5 EPUB writer: add ARA roles for accessibility (#9378)
This commit adds roles to some html element within epub in order to comply with accessibility best practices. Footnote references are given role "doc-noteref",footnote text gets "doc-footnote", and nav gets "doc-toc".
2024-01-27 11:10:58 -08:00
John MacFarlane bc1caab557 EPUB writer: change default accessibilityFeatures.
Don't include ARIA and MathML in general; they won't apply for
epub2 or documents without math.
2024-01-27 10:57:50 -08:00
John MacFarlane 6fe94a316a make validate-epub - produce HTML ace report in ace subdirectory. 2024-01-27 10:57:27 -08:00
John MacFarlane caa73134bc Regenerate epub tests with latest changes to EPUB reader. 2024-01-27 10:34:00 -08:00
John MacFarlane 8d09c4aff4 EPUB reader: don't put # characters in identifiers. 2024-01-26 23:58:42 -08:00
John MacFarlane ebed209627 Add ace check to validate-epub Makefile target. 2024-01-26 10:48:48 -08:00
John MacFarlane e7b2b2bd8b EPUB writer: Add accessibility metadata to EPUB metadata.
accessModes, accessibilityFeatures, accessibilityHazards.

Reasonable default values are used to ensure that pandoc's
EPUBs conform to the EU Accessibilty Act requirements.

Closes #9372.
2024-01-26 10:45:16 -08:00
John MacFarlane 09b6db8c50 EPUB writer: Add xml:lang to package element.
See #9372.
2024-01-25 10:38:57 -08:00
John MacFarlane d9a70d2eaf Add some kerns where needed between quotes in LaTeX output.
Closes #9371.
2024-01-25 09:41:47 -08:00
John MacFarlane 23f67c8458 Depend on dev commonmark-pandoc. 2024-01-23 16:40:09 -08:00
Gokul Rajiv 254ebeb68b add testcase 2024-01-23 14:13:51 -08:00