Commit Graph
16596 Commits
Author SHA1 Message Date
John MacFarlane 2ddf355c57 Update typst-hs version. 2023-06-06 15:38:47 -07:00
John MacFarlane d017f2669a Bump typst commit. 2023-06-06 14:03:47 -07:00
John MacFarlane 78f1e5a237 Add typst-symbols to stack.yaml. 2023-06-06 13:05:39 -07:00
John MacFarlane 402283e0e2 Update stack.yaml. 2023-06-06 13:00:01 -07:00
John MacFarlane f865341269 Remove support for ghc 8.6, 8.8. 2023-06-06 12:59:49 -07:00
John MacFarlane c7c3758dbd Integrate pandoc-specific things formerly in typst-hs. 2023-06-06 11:31:23 -07:00
John MacFarlane 0d7aae01f1 Update test for new typst-hs output. 2023-06-06 11:31:14 -07:00
John MacFarlane 845c9deff0 Remove unneeded pragmas. 2023-06-06 11:31:07 -07:00
John MacFarlane f08fa655fa Bump typst commit. 2023-06-06 11:13:55 -07:00
John MacFarlane d763c6c380 Move pandoc-specific parts of typst reader from typst-hs...
to here (T.P.Readers.Typst.Math, T.P.Readers.Typst.Parsing).
2023-06-06 11:10:19 -07:00
John MacFarlane a32a705215 Add typst reader.
New module Text.Pandoc.Readers.Typst [API change].
2023-06-06 11:10:19 -07:00
John MacFarlane 9d79c9fcb7 Add tls constraint on cabal.project.
The transition to crypton is causing some problems.
2023-06-06 11:10:01 -07:00
Noah Malmed 7f24c65b86 Improve title and label parsing in the JATS reader (#8840)
Closes #8718.
2023-06-06 11:03:52 -07:00
John MacFarlane 2f7b4032d5 ODT reader: allow lists in table cells. Closes #8892. 2023-06-05 17:01:59 -07:00
John MacFarlane 2c8de4c129 Typst writer: use #footnote for notes.
Closes #8893.
2023-06-05 16:07:36 -07:00
John MacFarlane 5539eecd0b ODT reader: allow frames inside spans.
Closes #8886.
2023-06-04 15:51:43 -07:00
Charlotte Koch dc62e43a1f INSTALL.md: Use more relevant link to NetBSD/pkgsrc entry 2023-06-02 09:24:41 -07:00
John MacFarlane 0e0c00db51 RST redear: Fix sorting on anonymous keys.
This fixes a bug in RST documents that have anonymous links.
Closes #8877.
2023-05-29 13:05:34 -07:00
dependabot[bot] 4ea1980699 Bump cachix/install-nix-action from 20 to 21
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 20 to 21.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v20...v21)

---
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>
2023-05-29 12:27:22 -07:00
sdhoward 4a6950200f MANUAL: fix typo 2023-05-18 19:08:20 -07:00
John MacFarlane 903d11b537 HTML reader: fix iframe with data URI of an image.
Closes #8856.

In this case we don't want to try to parse the data at the URL.
Instead, create an image inside a div.
2023-05-17 17:02:59 -07:00
Matt Dodson bb412768d8 doc/lua-filters: use full field name in example (#8857)
Remove old `.c` alias that mimics the JSON representation:
- Since 2.15ish, the lua structure no longer closely resembles that
  JSON representation
- even if it did, introductory examples should be explicit. Using
  an undocumented alias creates ambiguity.
2023-05-17 23:09:23 +02:00
John MacFarlane 5745ac8849 Update to latest dev texmath. 2023-05-13 11:48:15 -07:00
John MacFarlane 055c5e5549 Use latest dev texmath. 2023-05-13 11:36:49 -07:00
John MacFarlane 78933cf5a1 Update texmath commit. 2023-05-11 16:55:58 -07:00
John MacFarlane cfbf83c3d5 Simplify and fix flake.nix.
We don't need the workarounds any more.
We no longer include pandoc-cli, pandoc-server, or pandoc-lua-engine
in the packages. Instead, add some of the heavier dependencies to
the list of build inputs.

This is at least a temporary solution to #8818.
2023-05-09 12:37:13 -07:00
Stephan Meijer 9e8e016076 Rename test/docx/block_quotes_parse_indent.native for consistency 2023-05-09 11:41:42 -07:00
John MacFarlane f1233888c5 Ms writer: coerce titles to inlines.
Block-level formatting is not allowed inside .TL.
Closes #8835.
2023-05-09 11:40:09 -07:00
John MacFarlane 05ad84a0c6 LaTeX writer: better fix for colspecs for multicolumn table.
Improves on the last commit; closes #8831.
2023-05-08 13:09:04 -07:00
John MacFarlane ca5940bf2c LaTeX writer: fix width for multicolumn simple table.
This should help with #8831.  I'm not sure this is the
best solution, but it's certainly better than what we had before!
2023-05-08 12:39:50 -07:00
Stephan Meijer c97db9af26 Introduce support for Intense Quote in Docx conversion
This commit introduces support for the Intense Quote in Docx Conversion.

Previously this was converted to a regular paragraph, but Intense Quote
should be interpreted as a Quote in conversion.
2023-05-08 08:44:29 -07:00
John MacFarlane 65346fa6b1 Use latest texmath 2023-05-06 11:03:51 -07:00
William Lupton 2fd685372e MANUAL: Note that # fancy list markers don't work with commonmark (#8772) 2023-05-05 18:17:51 +02:00
William Lupton 1ccc0f756c MANUAL: add commonmark fenced_div note (#8773)
Note on how CommonMark's fenced divs differ.
2023-05-05 17:42:32 +02:00
Albert Krewinkel a00fba794b Jira writer: use first code block class as highlighting language.
The writer no longer searches the list of classes for a known programming
language but always uses the first class in that list as the language
identifier.

Closes: #8814
2023-05-05 09:54:05 +02:00
William Lupton 9c27262034 Manual: move highlighting documentation (with minor adjustments) 2023-05-04 16:31:08 +02:00
Albert Krewinkel f9bbbf6f40 Markdown reader: disallow escaping of ~ and " in markdown_strict
This matches the behavior of the legacy `markdown.pl` as well as what is
described in the manual.

Fixes: #8777
2023-05-04 11:52:04 +02:00
Albert Krewinkel 05a23af76d LaTeX reader: ignore args to column type in \multicolumn.
The `\multicolumn` command takes the column type as the second argument.
Types like `p` take an additional argument, which is now ignored and no
longer causes the table parser to fail.

Fixes: #8789
2023-05-04 11:36:10 +02:00
John MacFarlane 52196617c8 Use dev version of texmath. 2023-05-01 21:19:02 -07:00
Michael Stahl 737446f33d Writers.OpenDocument: handle row header column cells as header cells
The previous commit prevented header column cells from being dropped on
the floor, this one changes the paragraph style to "Table_20_Heading".

Note that for the test input, the result is not correct: the
AnnotatedTable type cannot represent the HTML input properly, as it only
has a concept of header rows and header columns, but HTML can have an
individual cell that is a header (not 100% sure but they way i read
https://html.spec.whatwg.org/#header-and-data-cell-semantics the <th>
cell here is both a row header cell and a column header cell while the
other cells in the row and column are not header cells), and header
cells may even appear "in the middle" of a table (see example in
https://html.spec.whatwg.org/#the-th-element).

So while this appears like it's the right thing to do for
Writer.OpenDocument, it's not clear if this is going to make things
better or worse overall.

Fixes: #8764
2023-05-01 20:55:37 -07:00
Michael Stahl 2881c12740 Writers.OpenDocument: handle row header column cells as ordinary cells
While ODF 1.3 part 3 does specify a 9.1.11 <table:table-header-columns>
element, in practice it's only implemented by spreadsheet applications,
not word processors.

So simply treat the row header columns as ordinary table columns, at
least they don't get lost then.

Fixes: #8764
2023-05-01 20:55:37 -07:00
Michael Stahl 013351f602 Writers.OpenDocument: fix invalid text:p inside text:p from meta
The only element in meta for which data/templates/default.opendocument
allows block element content appears to be "abstract", which is already
filtered out of meta' at this point, so simply convert all blocks to
linebreak-separated inlines.

Fixes: #8256
2023-05-01 20:39:47 -07:00
John MacFarlane a34a4d8e4a Commonmark writer: use shortcut reference links.
Commonmark supports these.
2023-04-28 22:03:01 -07:00
Michael Stahl 16be353077 Writers.ODT: don't add settings.xml
The way "ooo:configuration-settings" work is that if LibreOffice Writer
loads a file in which it exists, it assumes that an old version of
itself has produced it and it defaults any config-item that it knows but
that doesn't exist in the file to the "backward-compatible" value, which
usually means to enable some layout or text formatting bugs so that the
document looks the same as in the old LO version that created it.

If there is no "ooo:configuration-settings" then it will use the default
values for a new document, which should give the best formatting
results.

Pandoc's documents are obviously not created by LO, so it doesn't make
sense to produce ooo:configuration-settings.

Regarding the "ooo:view-settings", IIRC these mainly set to the
document view to the position where the document was last edited (by
default only if the user in meta.xml matches the user data in LO's
configuration), which is also irrelevant for Pandoc.

So just leave out the settings.xml; only content.xml/styles.xml are
required (see ODF 1.3, part 3, 2.2.1 OpenDocument Document, A.2).

(The settings.xml that is produced for formulas by the documentSettings
function hopefully isn't problematic because LO Math works a bit
differently and stores important formatting attributes in settings.xml
because MathML doesn't allow it in content.xml.)
2023-04-28 12:17:22 -07:00
Michael Stahl 60e72b2542 Writers.ODT: don't add Configurations2 dir
This empty file is some ancient OOo wart and it's quite pointless here.
2023-04-28 12:17:22 -07:00
Michael Stahl 54c0c494a2 Writers.ODT: don't add thumbnail
Quite pointless to add a hardcoded image that doesn't show the
document content.
2023-04-28 12:17:22 -07:00
Michael Stahl ac35c9a31c Writers.ODT: put manifest.version on directory file-entry
See ODF 1.3 part 2, 4.16.14.1 <manifest:file-entry>:

  The manifest:version attribute specifies the format version of a file
  entry. For documents that are composed from multiple files, this
  attribute is specified at the manifest entry that references the
  folder that contains these files.
2023-04-28 12:17:22 -07:00
Michael Stahl f3e1d33ea0 Writers.ODT: stop validator complaints by producing ODF 1.3
The ODF validator complains about an invalid attribute
style:contextual-spacing in styles.xml, ultimately an implementation
error in whatever old version of LibreOffice that produced the
data/odt/styles.xml (should have put it into an extension namespace).

Fortunately the attribute was added to ODF 1.3, which was released a
couple years ago.

So the easiest fix is to simply produce ODF 1.3 instead of 1.2; it's
supposed to be fully backward compatible.
2023-04-28 12:17:22 -07:00
Michael Stahl 3894f88478 add VIM swap files to .gitignore 2023-04-28 12:17:22 -07:00
Gabriel Lewertowski b21dee8198 add lang attribute to html tag in epub tpl 2023-04-27 16:27:08 -07:00