Commit Graph
16924 Commits
Author SHA1 Message Date
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
John MacFarlane e426b3d885 MANUAL: Clarify that formatting can't cross line boundaries...
in line blocks. Closes #9119.
2023-10-04 09:22:16 -07:00
John MacFarlane d62e5f33db Markdown reader: Don't apply --default-image-extension to data URIs.
Closes #9118.
2023-10-03 09:22:44 -07:00
3w36zj6 33cdce8f5c Fix legacy option for citation (#9114)
Closes #8737.
2023-10-01 17:40:40 -04:00
priiduonu 67ea7cd253 Update et translation 2023-10-01 17:38:16 -04:00
James J Balamuta 4d11ea7d6c Check if supplied FORMAT matches with an HTML slide deck value. Return True for isRawHtml. 2023-09-29 10:04:08 -07:00
Stephan Daus 11facf72cd Updated Norwegian language translation files
1) Renamed no.yaml (macrolanguage Norwegian) to nb.yaml (Norwegian Bokmål)
2) Created soft symbolic link from no.yaml pointing to nb.yaml.
2023-09-29 09:41:21 -07:00
Albert Krewinkel 538b5e3155 stack.yaml: require lpeg-1.1.0 2023-09-28 07:15:46 +02:00
Albert Krewinkel 2c6f22d2b4 Lua: Use the newest LPeg version (lpeg-1.1.*)
Closes: #9107
2023-09-27 21:04:49 +02:00
samuel-weinhardt edbea270f5 Apply style to h6 2023-09-23 22:10:52 -07:00
samuel-weinhardt 957489de85 Format styles 2023-09-23 22:10:52 -07:00
samuel-weinhardt 35b23526b2 Combine identical styles under shared selectors 2023-09-23 22:10:52 -07:00
John MacFarlane a19cd39a6f JATS writer: fix 3.1.4 regression in handling block-level metadata.
Closes #9092.
2023-09-21 14:22:30 -07:00
John MacFarlane 26d077fa21 T.P.Shared: add addPandocAttributes function.
[API change]

This is meant to simplify addition of attributes to Pandoc
elements; for elements that don't have a slot for attributes,
an enclosing Div or Span is added to hold the attributes.

Ideally this would live in pandoc-types, but for now we
reuse some code from commonmark-pandoc.
2023-09-20 11:55:59 -07:00
John MacFarlane e57953b9f0 Fix uneven indents in LaTeX line block output.
Closes #9088.
2023-09-18 15:59:26 -07:00
Seth Speaks 0d27947b96 HTML reader: parse task lists using input elements (#9066)
Allow the HTML reader to parse task lists of the sort produced by pandoc.
Closes #9047
2023-09-16 09:21:01 -07:00
piq9117 138613156a update nix flake with deps 2023-09-16 00:00:50 -07:00
John MacFarlane 30bef24924 Markdown reader: More accurate check that a normalCite...
...is not a link, bracketed span, or reference.

See #9080.
2023-09-14 15:25:58 -07:00
John MacFarlane 3ff206cc4b Ms writer: improvements in image handling.
See #4475.

+ PDFPIC is now used for PDF images in figures.
+ Inline images that are postscript or PDF are rendered using
  PSPIC or PDFPIC. This isn't ideal, because they will still be
  rendered as if in a separate paragraph, but it's probably
  better than just printing the image name.
+ Units are included in height.

For further improvement, we might consider in Text.Pandoc.PDF
using something like `convertImages` (which we currently use for
converting to PDF via LaTeX) to convert SVG (and other?) images
to PDF so they can be rendered in this way.
2023-09-14 11:26:46 -07:00
John MacFarlane 03d25f9469 stack.yaml - add commonmark-extensions. 2023-09-13 20:34:42 -07:00
John MacFarlane 8317c5cec8 Use latest texmath.
This should improve math in powerpoint, fixing empty boxes
around roots in some cases.
2023-09-13 19:55:22 -07:00
John MacFarlane 3f990ad0a1 Require latest commonmark-extensions 2023-09-13 19:54:40 -07:00
John Purnell c9fe8b81ca LaTeX template: fix \CSLBlock vertical space 2023-09-10 21:22:54 -07:00
John MacFarlane ab154a46b0 Switch to actions/checkout@v4. 2023-09-10 21:11:16 -07:00
dependabot[bot] 8d924ef645 Bump cachix/install-nix-action from 22 to 23 (#9074)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 22 to 23.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v22...v23)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-10 21:09:58 -07:00
John MacFarlane cba8bb4658 Allow tasty 1.5. 2023-09-10 11:42:20 -07:00