Commit Graph
18188 Commits
Author SHA1 Message Date
John MacFarlane 4ec69b2679 T.P.Writers.Shared: New version of gridTable.
This handles row and colspans. Partially addresses #6344.

It also ensures that cells won't wrap text in places where it
wouldn't normally wrap, even if this means making the cells wider
than requested by the colspec. (Closes #9001.  Closes 7641.)

Parameters are different, so this is a breaking [API change].

Markdown, RST, and Muse writers have been adjusted to
use the new `gridTable`.
2025-05-14 13:11:37 -07:00
Albert Krewinkel be9fbb3f67 pandoc-lua-engine: add all test files to the cabal file 2025-05-13 23:41:03 +02:00
Albert Krewinkel 31f74fac06 Lua: support sandboxed parsing with pandoc.read.
The function `pandoc.read` is now taking an optional fourth parameter
that specifies the environment in which the parser will be run. Passing
the string `sandbox` as the argument causes the reader to run in a
sandbox, thereby preventing all access to the network and file system.

Closes: #10831
2025-05-13 23:38:36 +02:00
Andrew Dunning 2196609989 Add footnote block text sample 2025-05-13 10:31:14 -07:00
Andrew Dunning 3d9d35a371 Remove extra spaces in default reference docx
The line breaks are interpreted as whitespace, resulting in extra leading and trailing spaces in the reference file.
2025-05-13 10:30:53 -07:00
John MacFarlane 605c1d4cde Markdown writer: omit initial newlines in gfm math blocks.
When the input is of the form
```
$$
x=y
$$
```
we would previously get:
````
``` math

x=y
```
````
which is ugly.
2025-05-13 10:18:40 -07:00
John MacFarlane f4676c7dfb Use citeproc 0.9.0.1 2025-05-12 16:07:23 -07:00
John MacFarlane d8efc79dde Use released typst 0.8. 2025-05-12 13:57:08 -07:00
John MacFarlane f239a45b3e Use latest texmath and dev typst. 2025-05-12 13:50:32 -07:00
John MacFarlane d3d5366e51 Use texmath-0.12.10.1 2025-05-12 11:03:27 -07:00
John MacFarlane edc99d4ad5 Update flake.lock. 2025-05-12 10:19:16 -07:00
John MacFarlane 9bb805adb0 Use citeproc-0.9. Bump citeproc bounds for pandoc, pandoc-lua-engine. 2025-05-12 00:43:39 -07:00
John MacFarlane ddcc4e0c65 Remove some redundant code in test. 2025-05-11 18:17:21 -07:00
John MacFarlane 1239eaa4be Add new option --variable-json.
This allows non-string values (booleans, lists, maps)
to be given to template variables on the command line.

Closes #10341.
Supersedes #10342.
2025-05-11 18:10:11 -07:00
John MacFarlane 5901d1ca86 Improve documentation of --variable option. 2025-05-11 18:06:44 -07:00
John MacFarlane bfcff3eb99 Org reader: change handling of inline TeX.
Previously inline TeX was handled in a way that was different
from org's own export, and that could lead to information loss.
This was particularly noticeable for inline math environments
such as `equation`.  Previously, an `equation` environment
starting at the beginning of a line would create a raw block,
splitting up the paragraph containing it (see #10836).
On the other hand, an `equation` environment not at the beginning
of a line would be turned into regular inline elements
representing the math. (This would cause the equation number to
go missing and in some cases degrade the math formatting.)

Now, we parse all of these as raw "latex" inlines, which will be
omitted when converting to formats other than LaTeX (and other
formats like pandoc's Markdown that allow raw LaTex).

Closes #10836.
2025-05-11 17:38:18 -07:00
John MacFarlane 1ce62c95f2 T.P.Readers.LaTeX.Math: export inlineEnvironmentNames.
Internal module, not a change to the public API.
2025-05-11 15:49:56 -07:00
John MacFarlane 3fe70cb7a9 Remove old default.nix. 2025-05-11 11:08:36 -07:00
John MacFarlane 9a09ed52ad flake.nix: add stylish-haskell. 2025-05-11 11:04:06 -07:00
John MacFarlane f37b12d941 Use jq instead of json_reformat in validate-docx-golden-tests2. 2025-05-11 11:01:44 -07:00
John MacFarlane ab67c02359 flake.nix: more dependencies for tests 2025-05-11 11:01:40 -07:00
John MacFarlane 04f27deaf5 flake.nix: add weeder, cabal-plan, hpc. 2025-05-11 10:42:00 -07:00
John MacFarlane bd7d5ae7f1 Makefile: fix typo in latex-package-dependencies target. 2025-05-11 10:41:25 -07:00
John MacFarlane 5d0a395ed9 Flake - require ripgrep. 2025-05-11 10:38:14 -07:00
John MacFarlane c355be2a8e Makefile: use pandoc lua instead of lua.
Reduces dependencies.
2025-05-11 10:38:03 -07:00
John MacFarlane 1f2675e4bb flake.nix; ensure epubcheck is present. 2025-05-11 10:31:19 -07:00
John MacFarlane de13b8338f Makefile: install @daisy/ace from npm if not present. 2025-05-11 10:30:55 -07:00
John MacFarlane 7bd26b515e New, simpler shell.nix. 2025-05-11 10:20:05 -07:00
R. N. West (Nat) f66481f96e Powerpoint writer: use reference-doc font for captions. (#10835)
Closes #9896.
2025-05-10 16:03:56 -07:00
R. N. West (Nat) 4fbc57a278 CONTRIBUTING: fix link to discussion forum. (#10834) 2025-05-10 11:03:46 -07:00
John MacFarlane 8e327ea4e3 DocBook writer: use literallayout element for LineBlock.
See #10825.
2025-05-08 11:28:00 -07:00
John MacFarlane 60b4011902 DocBook reader: improve handling of literallayout.
This is now only made a CodeBlock when there is a `monospaced`
class.

Otherwise it is made a LineBlock.

Closes #10825.
2025-05-08 11:19:54 -07:00
John MacFarlane 6a1679921b Declare git in flake.nix
Otherwise it isn't found when we look for it in the Makefile.
2025-05-08 11:19:54 -07:00
Niklas Eicker 82ff661b1a Mention in the docs, that typst:no-figure is a class, not an attribute (#10826) 2025-05-07 14:56:29 -07:00
John MacFarlane 379bc43cfa flake.nix - include commented out example of overrides. 2025-05-04 12:50:46 -07:00
John MacFarlane 07172ed07d New working flake.nix. 2025-05-04 10:57:22 -07:00
John MacFarlane bd43f4ec93 Use released texmath 0.12.10. 2025-04-29 14:51:45 -07:00
Manolis Stamatogiannakis 7f9c776b97 Plain writer: Support the four_space_rule extension. (#10813)
Allows using `-t plain+four_space_rule` to emulate the output of pandoc
before #7172. This is useful for users that use pandoc e.g. to
autoformat commit messages.
2025-04-28 16:06:31 -07:00
John MacFarlane 8e9d90504c Typst writer: handle equation labels with spaces.
Closes #10805.
2025-04-26 17:32:45 -07:00
John MacFarlane fb5499d7af Typst writer: add equation label if math contains \label{..}.
Closes #10805.
2025-04-25 22:39:56 -07:00
Olivier Benz a32a9ff7e9 Revert "Use int-native subtagged image (#10799)" (#10804)
This reverts commit a14997f92e.
2025-04-25 08:04:07 -07:00
John MacFarlane 8864ad0ec0 COPYRIGHT: fix link to source code. 2025-04-23 16:32:48 -07:00
Olivier Benz a14997f92e Use int-native subtagged image (#10799) 2025-04-23 10:39:33 -07:00
John MacFarlane ec08f03782 OpenDocument writer: fix character styles in footnotes.
Character styles governing the position of the footnote
reference should not be imposed on the footnote text.
Closes #10791.
2025-04-18 10:47:47 -07:00
John MacFarlane 48f881d746 Use latest dev texmath. 2025-04-15 14:05:09 -07:00
John MacFarlane c41d41c0e9 Use latest dev texmath. 2025-04-15 13:54:19 -07:00
John MacFarlane 538249eadf Use latest dev texmath. 2025-04-15 10:41:15 -07:00
John MacFarlane da00a9c628 Use latest dev texmath. 2025-04-15 09:34:32 -07:00
John MacFarlane 3cf722011a LaTeX reader: support more symbol commands.
Closes #10782.

`\textbaht`, `\textblank`, `\textbigcircle`, `\textbrokenbar`,
`\textbullet`, `\textcentoldstyle`, `\textcopyright`, `\textdagger`,
`\textdegree`, `\textdollar`, `\textdong`, `\textlira`, `\textmu`,
`\textmusicalnote`, `\textonehalf`, `\textonequarter`,
`\textparagraph`, `\textpertenthousand`, `\textpeso`,
`\textquotesingle`, `\textregistered`, `\textsection`,
`\textsterling`, `\textthreequarters`, `\textthreesuperior`,
`\texttwosuperior`, `\textyen`.
2025-04-14 10:45:00 -07:00
John MacFarlane 47610fe3de LaTeX reader: disable ligatures inside \texttt.
Closes #10781.
2025-04-14 10:23:26 -07:00