Commit Graph
16949 Commits
Author SHA1 Message Date
John MacFarlane 7d7ae7deef Use dev version of typst-hs. 2023-11-07 08:22:29 -08:00
Stephan Meijer 56f7f11473 ODT reader: Support attr text:continue-numbering (#8998)
Closes #8979.
2023-11-06 19:15:37 -08:00
John MacFarlane 76cd115d3b Markdown reader: make attributes work with reference links.
Closes #9171.
2023-11-05 21:27:03 -08:00
John MacFarlane 6fdebc4afd T.P.Shared: export combineAttr.
[API change]
2023-11-05 21:26:37 -08:00
John MacFarlane 9400f75506 JATS writer: handle case where there is material after refs div.
Previously in such cases the references were not being moved to
back matter. Closes #9166.
2023-11-04 09:46:46 -07:00
John MacFarlane bb36f127e2 LaTeX template: include bookmark package unconditionally.
This package produces better PDF bookmarks than hyperref
and does it on the first pass.

As a consequence, we now default to running LaTeX only
once in producing a PDF (instead of twice). If a table
of contents is present, we still have to run three times
to get the page numbers.
2023-11-03 10:40:38 -07:00
John MacFarlane 5132f1ef33 T.P.RoffChar: escape - as \-.
The groff_man (7)` man page indicates that `-` characters will be
treated as typographic hyphens and are not appropriate for cases
where the output should be copy-pasteable as an ASCII
hyphen-minus character.  (E.g. in command line options.)

However, until a recent update groff man did not actually do this;
it treated `-` and `\-` the same.  With the new update (1.23.0)
the two are distinguished (see https://lwn.net/Articles/947941/
for background), so now it is important that pandoc escape `-`.

This reverts ee60ba5252.
That change was motivated by a problem with backslash-escaping
`-` in a filename for .PSPIC. That's simply a separate issue;
we shouldn't do the normal escapes in such a context. It has
been addressed in the previous commit.
2023-11-02 19:36:25 -07:00
John MacFarlane 051fa7d574 Ms writer: don't do normal escapes in filename arguments...
for PSPIC etc.

Note: I haven't been able to figure out how to make it
work if the filename contains a `"` character.
2023-11-02 19:35:34 -07:00
John MacFarlane db92f61f1e Citeproc: don't link citations if suppress-bibliography specified.
For there will be nothing to link to. Closes #9163.
2023-11-02 11:03:54 -07:00
John MacFarlane d3d0406515 weeder.dhall -> weeder.toml 2023-10-30 17:40:29 -07:00
John MacFarlane 0f3211c339 Shared: improve isTightList...
so that it recognizes an item containing only a list which is
itself tight as potentially an item in a tight list.

Closes #9161.
2023-10-28 10:07:13 -07:00
John MacFarlane 196bf96932 epub.css: add styling for sup and sub.
Closes #9160.
2023-10-28 09:46:56 -07:00
John MacFarlane 9fcb0a0182 Update AUTHORS.md. 3.1.9 2023-10-27 12:59:49 -07:00
John MacFarlane 16fa893ca7 Fix spacing. 2023-10-27 12:56:38 -07:00
John MacFarlane 4f9029caf9 Update README.md. 2023-10-27 12:56:15 -07:00
John MacFarlane 59df1e1948 Update MANUAL.txt date and man page. 2023-10-27 12:55:56 -07:00
John MacFarlane a32f59272f Bump to 3.1.9, update changelog. 2023-10-27 12:34:16 -07:00
John MacFarlane 3a36b43774 Require commonmark-extensions 0.2.4. 2023-10-27 10:35:04 -07:00
John MacFarlane e2081ef9df Update typst-reader test for new typst-hs. 2023-10-27 10:34:28 -07:00
John MacFarlane 517d184c2a Require latest commonmark 0.2.4. 2023-10-27 10:01:33 -07:00
John MacFarlane deafc068f7 Require latest texmath 0.12.8.4. 2023-10-27 09:59:41 -07:00
John MacFarlane 0bb64bd405 stack.yaml - require latest typst 2023-10-27 09:58:24 -07:00
John MacFarlane ada5828812 Require typst 0.3.2.1 2023-10-27 09:57:55 -07:00
John MacFarlane 5ed86e69c4 Make reference-section-title work with jats+element_citations.
Closes #9021.
2023-10-26 17:04:55 -07:00
John MacFarlane 88cb8e699a Add bits as synonym of jats as input format.
Document in MANUAL.txt.
2023-10-26 15:27:00 -07:00
Julia Diaz f2a22e71df Modify JATS reader to handle BITS too (#9138)
Add provision for title-group, book, book-part-wrapper, book-meta,
book-part-meta, book-title, book-title-group, index, toc, legend,
title, collection-meta
2023-10-26 15:18:33 -07:00
John MacFarlane b671e0dfe5 Org writer: escape literal *, |, # at beginning of line with ZWS.
Closes #9159.
2023-10-26 09:18:56 -07:00
John MacFarlane 4457b775d3 ICML writer: prevent doubled attributes.
Closes #9158.
2023-10-24 21:46:03 -07:00
John MacFarlane 6f3ec91a0d CommonMark reader: handle Ext_tex_math_gfm.
Parse GFM-specific math constructions when `tex_math_gfm` enabled.

See <https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions>.

Closes #9121.
2023-10-23 21:08:27 -07:00
John MacFarlane d200cacb5b Extensions: Add Ext_tex_math_gfm constructor to Extension.
[API change]

This handles two GitHub-specific syntaxes for math.

And document in MANUAL.txt.

This is now default for `gfm`, in addition to `tex_math_dollars`.

See #9121.
2023-10-23 21:08:27 -07:00
John MacFarlane 7115edfeb7 Add helpful message on some metadata YAML errors.
Closes #9155.
2023-10-23 10:30:34 -07:00
John MacFarlane a7756b9e9f Allow Diff 0.5. 2023-10-23 08:26:23 -07:00
John MacFarlane 5fa8f292a3 DokuWiki reader: allow autolinks to be avoided...
using e.g. `https:%%//%%...`. Closes #9153.

This is not a fully general fix but it should be enough if
there's a convention of defeating autolinks by putting the
slashes in `%%..%%`.
2023-10-22 17:07:20 -07:00
John MacFarlane fbf9194e34 DokuWiki reader: parse <code> and <file> as block-level code.
Previously we treated them as inline code in some contexts,
but that is not how DokuWiki works.

Closes #9154.
2023-10-22 10:59:07 -07:00
John MacFarlane ad1a745f72 LaTeX reader: better handle spacing commands...
hfill, vfill, hskip, vskip, etc.

Closes #9150.
2023-10-21 18:44:28 -07:00
John MacFarlane a67223c442 Typst writer: add #box around image to make it inline. (#9149)
An `#image` by itself in typst is a block-level element.
To force images to be inline (as they are in pandoc), we need
to add a box with an explicit width. When a width is not given
in image attributes, we compute one from the image itself, when
possible.

Closes #9104, supersedes #9105.
2023-10-20 12:18:46 -07:00
John MacFarlane 5e66811875 Markdown reader: fix blindspot with superscript in links.
Previously `[^super^](#ref)` wasn't parsed as a link, due to
code that was meant to prevent footnote markers from being
recognized as reference links.  This commit tightens up that
code to avoid this bad effect.

We have also added a new restriction on footnote labels: they
cannot contain the characters `^`, `[`, or `]`. Though this is
technically a breaking change, we suspect that the impact will
be minimal, as it's very unlikely people would be using these
characters in their note labels.

Closes #8981.
2023-10-20 10:27:49 -07:00
John MacFarlane 0fdac4984b HTML reader: allow th to close td and vice versa.
Closes #9090.
2023-10-19 11:07:22 -07:00
John MacFarlane 1529ff45e6 Powerpoint writer: fix a corruption error...
caused when the document used both a regular png and a png
in a data URI. (Similarly for any other image format.)
The problem was that duplicate entries in `[Content Types].xml`
were being created, one for the mime type `image/png`, one for
`image/png;base64`.

Closes #9113.
2023-10-18 14:24:59 -07:00
John MacFarlane 992bc86981 LaTeX writer: fix rowspans in tables...
...so they use the width of the column (`=` as the width
parameter). Closes #9140.
2023-10-17 21:22:53 -07:00
John MacFarlane f4baa88f42 LaTeX writer: don't treat table as "simple" if they have col widths.
This should help fix a problem wherein some grid tables with
colspans were overly wide.  See #9140.

The example given there still produces suboptimal
output (overlapping text), so not closing yet.
2023-10-17 21:11:16 -07:00
Julia Diaz fa3513b104 JATS reader: fix handling of alt-text (#9134)
Previously we were looking for an attribute that doesn't exist in
JATS; alt-text is provided by a child element.

Closes #9130.
2023-10-17 09:16:00 -07:00
John MacFarlane 802c610923 Typst writer: escape (.
If it occurs in certain contexts, it can be parsed as function
application.  Simplest thing to do is to escape it always.
Closes #9137.
2023-10-16 22:39:48 -07:00
Tim Stewart 46f7e8a2f2 remove duplicates for Ext_raw_html and Ext_pipe_tables 2023-10-16 21:59:48 -07:00
Sascha Wilde f9dc5b5012 Handle empty cells correctly in creole reader. Fixes #9141 2023-10-16 09:06:56 -07:00
John MacFarlane c76fbe964d Typst writer: don't allow long heading to wrap.
Closes #9132.
2023-10-12 22:26:19 -07:00
Michael McClurg ba07ec0572 Fix incorrect abbreviation for astronomical unit (#9125) 2023-10-08 15:31:30 -07:00
John MacFarlane ddabd85eb8 Man writer: Fix some spacing issues around links.
See #9120.

We need to use `\c` before a `.UR` or `.MT`, to avoid
an extra space, and also after.  To ensure that a space
at the beginning of the following line doesn't get swallowed
up, we escape it with `\`.
2023-10-05 09:38:45 -07:00
John MacFarlane c33b4581c9 T.P.Shared.splitSentences: don't split after initials.
This improves the man and ms writer output, preventing
sentence breaks after initials.
2023-10-05 09:37:35 -07:00
John MacFarlane 5a691e8c3f Man writer: use UR, MT macros for URLs, emails.
Closes #9120.
2023-10-04 22:22:25 -07:00