Commit Graph
9105 Commits
Author SHA1 Message Date
John MacFarlane f3b23afc94 Docx reader: don't add highlighting if highlight color is "none."
Closes #10900.
2025-06-08 13:17:46 -07:00
John MacFarlane 58daa8e2e8 ANSI writer: make --wrap=none work properly.
Closes #10898.
2025-06-05 14:39:16 -07:00
John MacFarlane ccec1e0b65 Docx reader: handle strict OpenXML as well as transitional.
Closes #7691.
2025-06-03 12:15:04 -07:00
John MacFarlane add83e8169 Markdown reader: make definition lists behave like other lists.
If the `four_space_rule` extension is not enabled,
figure out the indentation needed for child blocks dynamically,
by looking at the first nonspace content after the `:` marker.

Previously the four-space rule was always obeyed.

Remove the old `compact_definition_lists` extension. This was
neded to preserve backwards compatibility after pandoc 1.12
was released, but at this point we can get rid of it.

T.P.Extensions: remove `Ext_compact_definition_lists` constructor
for `Extension` [API change].

Fix tight/loose detection for definition lists, to conform to
the documentation.

Closes #10889.
2025-06-02 23:29:47 -07:00
John MacFarlane 75db10f315 Fix whitespace bugs. 2025-05-28 15:20:55 -07:00
Greg c27ceac5cf Adding support for sidebars to Asciidoc writer 2025-05-28 13:38:16 -07:00
John MacFarlane 78efe58641 T.P.Writer.Shared gridTable: more grid table fixes.
Fix headings with colspans. If the heading contains a colspan, we still
need to include information in the header line about the colspecs.

Fix headerless tables.  The top line should encode colspan information.

Closes #10855.
2025-05-28 12:46:00 -07:00
Benjamin Esham ccc0a5a630 HTML writer: use the ID prefix in the ID for the footnotes section.
In commit 9190b19fc, we began to use the ID prefix for the <aside>
holding the footnotes. In commit 41da8ad9e, we started to use a
<section> for this instead and the ID-prefix functionality was lost.
This commit resumes using the ID prefix in the ID of this element so
that multiple documents can be combined into one without ID conflicts.
2025-05-27 08:53:33 -07:00
Nikolay Yakimov 8d93cd7949 Markdown writer: preserve figure attributes
0d2114e introduced a bug where Markdown writer would ignore attributes
on the figure if it has class or key-value attributes set.

This commit fixes that and adds a regression test.

Closes #10867
2025-05-26 20:38:40 -07:00
John MacFarlane 28e01fac74 LaTeX writer: include alt option in \includegraphics.
Closes #6095.
2025-05-26 20:29:20 -07:00
John MacFarlane 5c4ca5b75b SelfContained: fix handling of empty script element.
Previously in this case the closing tag was dropped.

Closes #10862.
2025-05-26 19:02:44 -07:00
John MacFarlane be43c0f16d SelfContained: do not drop data- attributes in script tags.
Closes #10861.
2025-05-26 17:38:35 -07:00
John MacFarlane 728bcf0731 gridTable - small improvements. 2025-05-20 11:35:09 -07:00
John MacFarlane f1e64ee0be RST writer: don't emit alignment markers in grid tables.
Closes #10857.
2025-05-20 10:18:32 -07:00
John MacFarlane 97b7d48333 gridTable: fix (3.7) regression with missing cell alignments.
Closes #10853.
2025-05-19 15:51:40 -07:00
John MacFarlane fbeadcd0ba gridTables: properly handle columns with all empty cells.
See #10848.
2025-05-17 09:59:17 -07:00
John MacFarlane ca321e1b75 Fix problems with gridTable and add tests.
Closes #10848.
2025-05-16 18:10:06 -07:00
John MacFarlane 24cbdbdda5 gridTable: don't ignore row heads. 2025-05-16 11:00:19 -07:00
John MacFarlane 6cd6e81ddd gridTable: fix remaining formatting issues for complex tables. 2025-05-16 10:39:47 -07:00
John MacFarlane e158921412 gridTable: improve merging of borders. 2025-05-15 23:00:58 -07:00
John MacFarlane adc05a6cd4 gridTable: more improvements to colspan handling. 2025-05-15 14:57:45 -07:00
John MacFarlane 7aed3b2693 gridTable: partially fix problems with colspans. 2025-05-15 13:28:29 -07:00
John MacFarlane cf795b0cf5 Fix context writer/template to produce tagged PDFs.
As before, the `tagging` extension must be enabled.
We now add the command that tells ConTeXt to start tagging.

Closes #10846.
2025-05-15 11:37:50 -07:00
John MacFarlane 01257ef6eb 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 14:31:39 -07:00
Albert Krewinkel fb24d42ab7 T.P.Class.Sandbox: add function that can take a FileTree 2025-05-14 09:17:24 -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 f239a45b3e Use latest texmath and dev typst. 2025-05-12 13:50:32 -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 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
R. N. West (Nat) f66481f96e Powerpoint writer: use reference-doc font for captions. (#10835)
Closes #9896.
2025-05-10 16:03:56 -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
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
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 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
John MacFarlane c2482b9107 LaTeX writer: make alignment work within multirow in tables.
Closes #10772.
2025-04-09 22:38:43 -07:00
John MacFarlane c1cb32b3ab Docx writer: don't renumber rels. (#10770)
This fixes a regression introduced by af57648.

We used to renumber the Relationships so they didn't conflict with
the set of fixed Relationships we imposed.

We are now preserving the ids from the reference doc's
document.xml.refs, so we shouldn't renumber them or references
introduced by the user (e.g. in a template) will fail.

Closes #10769.
2025-04-08 15:00:16 -07:00
John MacFarlane 109d13d143 Recognize en as a langid in biblatex bibliographies.
Closes #10764.
2025-04-07 08:53:18 -07:00
John MacFarlane af57648e58 Docx writer: preserve Relationships for images from reference docx.
This should allow one to include an image in a reference.docx and
reference it in an openxml template.

Closes #10759.
2025-04-05 13:48:46 -07:00
John MacFarlane f8f7c29fb8 Allow compilation with random 1.2.*. 2025-04-05 12:31:40 -07:00
John MacFarlane 0d2114ee4e Markdown writer: improve use of implicit figures when possible.
Closes #10758.

When the alt differs from the caption, but only as regards
formatting, we still use an implicit figure.
2025-04-05 11:32:29 -07:00
John MacFarlane 2155b5f9bc Markdown writer: render a figure with Para caption as implicit figure.
Also, when falling back to a Div with class `figure` for a figure
that can't be represented any other way, include a Div with class
`caption` containing the caption.

Closes #10755.
2025-04-04 10:16:23 -07:00
John MacFarlane 82668ff9aa Typst writer: support mark class on spans.
Closes #10747.
2025-04-01 15:35:22 -07:00
John MacFarlane 69feb5ea9a Ms writer: ensure no line breaks in '.pdfhref O'. 2025-03-31 20:42:42 -07:00
John MacFarlane 2a53e25fac JATS writer: fix escaping for writing-review-editing role.
Closes #10744.
2025-03-31 14:11:34 -07:00
John MacFarlane e6974dfecb Require random >= 1.3 and use splitGen.
`split` has been deprecated.
2025-03-31 09:00:42 -07:00