Commit Graph
17835 Commits
Author SHA1 Message Date
Albert Krewinkel 0f29d8195e Lua: use hslua-module-zip-1.1.3 to fix the windows build 2024-05-05 21:16:31 +02:00
Albert Krewinkel 018922d10f Lua: use newest zip module.
This adds a `symlink` function to Entry objects, allowing to check if an
entry represents a symbolic link.
2024-05-05 17:54:33 +02:00
Albert Krewinkel 32f0ed9ea3 Lua: improve pandoc.json.decode docs. 2024-05-05 00:25:29 +02:00
Albert Krewinkel 1a15c9f6a9 tools/update-lua-module-docs.lua: cleanup, fix code 2024-05-04 23:56:01 +02:00
Albert Krewinkel e8cb6449dc tools/update-lua-module-docs.lua: improve script-internal docs 2024-05-04 23:27:07 +02:00
Albert Krewinkel c45f163b4d Lua: fix generated docs.
Update and fix docs for `pandoc.types.Version` and `pandoc.utils.type`.
2024-05-04 22:17:01 +02:00
John MacFarlane 6000a17394 Markdown reader: allow repeated labels in numbered example lists.
Previously if you tried to use the same label as an earlier
example list item, you'd get a new number, not the old one,
and references to the label would go to the second occurrence.

Now an existing label will be reused, and no new number will
be generated.  Caveat:  this only works reliably when the
re-used example list item occurs by itself in a list, or
occurs in a list of previously used example list items that
occur in exactly the same order as previously.
2024-05-03 12:25:55 -07:00
John MacFarlane 2da454d36b Markdown reader: fix normalCite so it doesn't consume...
...past a closing `]` boundary.  This was causing an
exponential performance bug on long lists of links
containing potential emphasis characters.

Closes #9710.
2024-05-02 13:02:41 -07:00
John MacFarlane 517f6bb711 Markdown reader: generalize inlinesInBalancedBrackets...
to `inBalancedBrackets`, with a parameter for the inner parser.
2024-05-02 13:02:41 -07:00
Guilhem Saurel bd8529257e LaTeX template: add titlegraphicoptions variable (#9207)
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-05-02 09:35:29 -07:00
Albert Krewinkel 509cc3ac87 T.P.Error: Improve reporting of unsupported extensions errors.
Amend the error message with instructions on how to list all supported
extensions.

Closes: #9247
2024-04-30 10:54:24 +02:00
Salim B c18fd22045 Use latest KaTeX CDN asset (#9707) 2024-04-29 15:40:17 -07:00
Leo Heitmann Ruiz 7c47a214ed INSTALL.md: Minor tweaks. (#9705) 2024-04-29 00:45:38 -04:00
John MacFarlane 5b9a8ea99c Typst writer: add blank line in definition lists with multiple definitions.
See discussion #9704.
2024-04-28 14:58:18 -04:00
guqicun e2f43baac1 Fix some typos (#9638)
Signed-off-by: guqicun <guqicun@outlook.com>
2024-04-26 10:13:37 +02:00
John MacFarlane a3697f91fa LaTeX writer: use polytonicgreek instead of polutonikogreek...
with babel. polutonikogreek is outdated.

Also recognize both in the LaTeX reader.

Closes #9698.
2024-04-26 01:25:24 -04:00
John MacFarlane 03630a2c6e Update copyright dates to 2024. 2024-04-25 18:16:49 -07:00
John MacFarlane 1904fa53fa pandoc-cli: ensure UTF8 when emitting version info. 2024-04-25 17:49:38 -07:00
John MacFarlane 5736c2f8b3 CommandLineOptions: simplify output for OptVersion.
Omit the information about versions of dependencies.
We no longer emit version info at this level anyway;
pandoc-cli intercepts `--version`.

This code would only be called if someone used the pandoc
library function `handleWithOptInfo` in their own program.
2024-04-25 17:46:39 -07:00
John MacFarlane 49df8131a5 Markdown writer: don't try to align columns in pipe tables...
...with lines greater than COLUMNS.

The alignment just reduces readibility when the lines soft wrap.
2024-04-25 14:26:17 -07:00
John MacFarlane f5c7d4dcf7 Markdown writer: don't use raw_attribute syntax for raw...
blocks, unless there is no other option.

Mainly this is motivated by #9677.  If we put raw tex in a
raw_attribute block, then the macros don't get interpreted
when it is read again by pandoc's markdown reader.
2024-04-23 15:45:55 -07:00
Salim B b37ad70959 Harmonize typographic dashes (#9688)
Standardize on `---` with no space.
2024-04-23 15:38:01 -07:00
John MacFarlane 6578dcd912 LaTeX reader: parse flalign, flalign* math environments.
We parse these as Math elements with an `aligned` environment.
Semantically it's not exactly the same, but better than falling
back to raw LaTeX.

Closes #9679.
2024-04-23 15:20:45 -07:00
John MacFarlane b6cff6b96d Docx reader: issue warning rather than error...
when we can't parse EndNote citations.  See #8433.
2024-04-23 15:00:42 -07:00
John MacFarlane 88eff14732 Logging: Make DocxParserWarning a WARNING, not INFO. 2024-04-23 15:00:37 -07:00
John MacFarlane 7534d4f42e Add note to cabal.project so we won't forget skylighting releases. 2024-04-22 19:12:15 -07:00
John MacFarlane 8faa0f009f RTF reader: don't try to handle non-default code pages.
Emit a warning instead.

Closes #9683.
2024-04-22 18:00:00 -07:00
John MacFarlane 148cacc1d7 Logging: add UnsupportedCodePage constructor to LogMessage.
[API change]
2024-04-22 17:59:38 -07:00
John MacFarlane 71c6fecd14 Revert "Depend on encoding and begin to implement code pages in RTF reader."
This reverts commit 6d38ee74f1.
2024-04-22 17:23:08 -07:00
John MacFarlane 8687754554 Revert "RTF reader: remove debugging trace left in by accident."
This reverts commit f54bbcd363.
2024-04-22 17:23:00 -07:00
John MacFarlane f54bbcd363 RTF reader: remove debugging trace left in by accident. 2024-04-22 16:18:13 -07:00
John MacFarlane 6d38ee74f1 Depend on encoding and begin to implement code pages in RTF reader.
See #9683.  TODO: implement language shifting with `\langN` and
`\deflangN`, taking account of `\fcharsetN`.
2024-04-22 16:16:26 -07:00
John MacFarlane fc2ac99296 RTF reader: more changes to handle different ANSI code pages.
So far we don't actually handle any non-default code pages;
this just moves things into position.
2024-04-22 12:21:38 -07:00
John MacFarlane 5962141137 RTF reader: internal refactoring.
We now use a HexChars token instead of HexChar; this allows
us to store sequences of escaped words, which will be important
for handling ANSI code pages that can have mulitbyte sequences.

Also, we add an optional parameter to ANSI for the code page.
So far this doesn't do anthing.

All prep for #9683.
2024-04-22 09:25:43 -07:00
John MacFarlane ef338abbb7 MANUAL: use more descriptive link text for ODT.
Closes #9673.
2024-04-22 07:57:50 -07:00
John MacFarlane 314c32dda3 MANUAL.txt: whitespace. 2024-04-22 07:57:37 -07:00
John MacFarlane f366e5f638 LaTeX reader: fix over-eager macro expansion in conditionals.
Closes #9676.
2024-04-21 09:01:16 -07:00
John MacFarlane 30442b7f9d Change to --file-scope behavior.
Previously a Div with an identifier derived from the filename
would be added around the contents of each file.  This caused
problems for "chunking" files into chapters, e.g. in EPUB.

We no longer add the surrounding Div. This cooperates better with
chunking. Note, however, that if you have relied on the old
behavior to link to the beginning of the contents of a file using
its filename as identifier, that will no longer work.

Closes #8741.
2024-04-20 16:28:42 -07:00
mbracke a331a1c00a Docx reader: fix anchor in header after anchor (#9626)
When the last parPart before a header was a bookmark, no span with an
anchor was added for a bookmark in the header. But the function that
adds header anchors to the anchor map, needs a span with an anchor.
So this commit adds that span.
2024-04-18 09:32:48 -07:00
John MacFarlane 3d902349d1 T.P.App: Move "transforms" after filters.
This will mean that `--shift-heading-level-by` affects a
heading added by `reference-section-title`. See #9664.
2024-04-17 22:48:56 -07:00
John MacFarlane 57dfab5eb9 MANUAL.txt: better document truthiness for conditionals.
Closes #9661.
2024-04-17 09:51:28 -07:00
Albert Krewinkel 5f937eae61 Lua: add new module pandoc.image
The module provides basic querying functions for image properties.
2024-04-16 10:23:08 -07:00
Albert Krewinkel 9a09c89636 T.P.ImageSize: export ImageSize datatype 2024-04-16 10:23:08 -07:00
John MacFarlane 96add8b9cc Command tests: include regular PATH...
...after directory with the test executable.
I want to see if this fixes the CI problem on Windows, which
may be due to problems finding a DLL.
2024-04-15 10:19:41 -07:00
John MacFarlane 0f8086cbd3 Fix command test for #9652. 2024-04-15 10:19:22 -07:00
Carlos Scheidegger 52ee4f109f SelfContained: merge 'class' attr when both img and svg specify it (#9653)
Closes #9652.
2024-04-15 09:44:30 -07:00
John MacFarlane dafa7a2c0c Allow network 3.2. 2024-04-15 09:37:56 -07:00
Gordon Woodhull 99a45917ac Typst writer: property output (#9648)
The Typst writer will pass on specially marked attributes as raw Typst
parameters on selected elements. This allows extensive customization
using filters.

An attribute with key `typst:PROP` will set the PROP parameter on
the corresponding Typst element.

An attribute with key `typst:text:PROP` will set a parameter on a Typst
`#set text()` rule or a text element.

The feature has been implemented for the following elements:

* span text
* div and div text
* table and table text
* table cell and table cell text

It would be possible to support more elements in the future.

A separate document has been added that provides extensive
documentation and examples of the use of this feature.
2024-04-15 09:32:32 -07:00
Ian Max Andolina 7eb2a143e1 Update MANUAL.txt
replace reference.docx with a link
2024-04-14 15:47:43 -07:00
Ian Max Andolina de77169026 Update MANUAL.txt to mention custom-style works with ODT
This commit https://github.com/jgm/pandoc/commit/bde3d7622ddd2cda7adabc309335bb2865c1d520 allowed `custom-style` to work with ODT but this is not mentioned in the manual. I tested what happens when the Style is not present and updated the text accordingly. I edited via Github web interface so hard wrapping is approximate. I hope the anchor to the reference doc works as expected (`#option--reference-doc` is the anchor as far as I could determine)...
2024-04-14 15:47:43 -07:00