Commit Graph
17151 Commits
Author SHA1 Message Date
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
Gokul Rajiv e9bd6285e3 add case for "variable" class 2024-01-23 14:13:51 -08:00
John MacFarlane 3e54d3a45d Use reference form (e.g. @jones2000[p. 30]) for citations.
Previously we were using `#cite` and trying to put the supplement
in brackets; but a bracketed supplement only works with the
reference form.
2024-01-22 22:09:01 -08:00
Albert Krewinkel 57774d79e8 Org writer: escape special lines in code blocks
Fixes: #9218
2024-01-22 18:13:34 +01:00
dependabot[bot] 734f860618 build(deps): bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-21 19:21:03 -08:00
John MacFarlane 243bbf699c HTML writer: ensure that an alt attribute is added in EPUB output.
This seems to be required by iBooks; even an empty alt attribute
will satisfy it. Closes #9354.
2024-01-20 10:34:32 -08:00
John MacFarlane f43ffabd3c LaTeX writer: create valid table even when table is empty.
Closes #9350.
2024-01-20 10:19:32 -08:00
Albert Krewinkel c2f7f5c63f Custom writers: fix handling of common state
The CommonState (`PANDOC_STATE` in Lua) may change between the time that
a custom writer script is first loaded and when the writer is run.
However, the writer was always using the initial state, which led to
problems, e.g. when the mediabag was updated in a filter, as those
updates where not visible to the writer.

The state is now updated right before the writer function runs.

Fixes: #9229
2024-01-20 10:14:48 -08:00
Max Heller 74f4ae25d2 LaTeX writer: set font fallback for babel main font 2024-01-20 09:47:12 -08:00
John MacFarlane 40f84c841c Document font fallback variables. 2024-01-19 17:49:04 -08:00
lawcho 0110f59053 LaTeX template: support font fallback
* LuaLaTeX-specific (uses luaotfload)
* Configured in YAML metadata
* Sans/main/mono fonts have separate fallback chains
2024-01-19 17:41:27 -08:00
John MacFarlane df1944f774 Markdown writer: fix output for pipe tables...
...with a huge number of columns. Previously we got invalid pipe
tables when the number of table columns exceeded the setting of
`--columns`.

Closes #9346.
2024-01-18 08:35:21 -08:00
John MacFarlane 18f0b70d40 DocBook reader: better handling of <procedure> and <substeps>.
`<procedure>` now gets parsed as an ordered list, and
`<substeps>` as a sublist. Closes #9341.
2024-01-16 11:58:42 -08:00
George Stagg 032f7c832f Add readMan to Text.Pandoc.Readers exports 2024-01-16 11:24:13 -08:00
dependabot[bot] ff753bdfa6 build(deps): bump cachix/install-nix-action from 24 to 25
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 24 to 25.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v24...v25)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-14 19:40:11 -08:00
Carlos Scheidegger d8ff4ff878 Fix changelog.md typo: 2023-2024 2024-01-08 08:39:02 -08:00
John MacFarlane 2dd98b967b T.P.PDF: reliably detect when TOC has changed.
Sometimes the TOC changes but there are no warnings: this happens
when no labels are present.  In this case we must rerun LaTeX.
So we now take the sha1 hash of the TOC file and rerun LaTeX if it
changes between runs.

Closes #9295.
2024-01-06 11:10:05 -08:00
John MacFarlane 9f58a55280 Typst reader: fix handling of \overline.
Due to a typo, it was being incorrectly rendered as an `\underset`.
Closes #9294.
2024-01-05 22:09:36 -08:00
John MacFarlane e24002ed75 T.P.PDF: increase max number of LaTeX runs to 4.
On some documents, 4 runs are needed (e.g. when a LastPage
reference is used). Closes #9299.
2024-01-05 21:35:55 -08:00
John MacFarlane 80303beb35 getting-started.md: refer to GH discussions instead of pandoc-discuss. 2024-01-05 21:35:55 -08:00
mh4ckt3mh4ckt1c4s dce7f7a6a8 Fix beamer highlighting 2024-01-05 22:26:49 -07:00
John MacFarlane b3a471b09f MANUAL.txt: Add <pre> to list of exceptions for...
`markdown_in_html_blocks` extension. Closes #9305.
2024-01-05 18:54:41 -08:00
John MacFarlane 5d33b5690a Replace references to pandoc-discuss with GitHub discussions. 2024-01-05 18:40:45 -08:00
John MacFarlane 714ed52213 Update AUTHORS.md. pandoc-cli-3.1.11.1 3.1.11.1 2024-01-05 14:55:56 -08:00
John MacFarlane 6d19f174d4 Whitespace cleanup. 2024-01-05 14:50:52 -08:00
John MacFarlane 13ff7d2ece Update man pages. 2024-01-05 14:50:43 -08:00
John MacFarlane 6533296fae Fix make binpath target. 2024-01-05 14:50:27 -08:00
John MacFarlane 89a6fa9b00 Bump pandoc-cli to 3.1.11.1. 2024-01-05 13:41:29 -08:00
John MacFarlane bef21275f2 Update manual date. 2024-01-05 13:41:23 -08:00