Commit Graph
16565 Commits
Author SHA1 Message Date
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
John MacFarlane f5c4f2cebc Use new Windows code signing cert. 2023-04-25 23:15:56 -07:00
Frank Seifferth 714be9365b Fix apparent inaccuracy in MANUAL.txt
The section about pandoc's template syntax used to state that
spaces and tabs following the closing delimiter around variables
and control structures will be ignored. Some quick testing with
pandoc version 2.9.2.1 suggests that this is not the case. Spaces
and tabs _preceding_ the closing delimiter, however, are indeed
ignored. I therefore assume that this is simply a slight inaccuracy
in the manual; possibly produced by copying the sentence about the
opening delimiter and forgetting to adjust that word.
2023-04-22 17:46:33 -07:00
John MacFarlane 6d11da1163 Fix Windows install instructions for winget.
Closes #8799.
2023-04-22 10:16:48 -07:00
John MacFarlane 16f28ef5e9 Remove redundant line in pattern match. 2023-04-20 13:33:02 -07:00
John MacFarlane 3f0dd816cf Update cirrus.yml to use ghc 9.4.5.
@benz0li
2023-04-20 09:40:51 -07:00
Olivier Benz 39d7d7afba Use ghc-musl 9.4.5 docker image 2023-04-20 09:39:03 -07:00
thron7 7ec7512aa0 doc/lua-filters.md: fix copy-and-paste error (#8798) 2023-04-20 13:17:12 +02:00
John MacFarlane 2cd8032e98 CONTRIBUTING.md: update info on ghc versions. 2023-04-17 20:35:48 -07:00
John MacFarlane d79c53ba12 Fix YAML in translation files for cs and pl.
The colon needs quoting.

Closes #8787.
2023-04-17 11:26:54 -07:00
John MacFarlane 1b150ce3db Remove unnecessary 'spaces' in parseFromString. 2023-04-17 11:26:54 -07:00
Albert Krewinkel a249f75a30 Lua: fix value of PANDOC_SCRIPT_FILE for custom readers & writers
The value did not hold the actual file path for scripts in the *custom*
folder of the datadir.

Fixes: #8781
2023-04-16 13:53:54 +02:00
John MacFarlane 604d777c03 Fix bug in RTF table parsing.
In certain cases, text before a table was being incorporated into
the table itself.

Closes #8767.
2023-04-14 13:01:01 -07:00
John MacFarlane 9bcf1ff8d6 ImageSize: drop BOM at start of SVG if present.
Otherwise our code can fail to determine image size.
2023-04-07 09:13:49 -07:00
John MacFarlane e89a3edf24 Typst writer: omit bibliography if citations not enabled.
With this change, the typst writer will omit the `#bibliography`
command when `citations` is not enabled.  (If you want to use
pandoc's own `--citeproc`, you should combine it with
`-t typst-citations` to disable native typst citations.

Closes #8763.
2023-04-07 08:24:47 -07:00
Albert Krewinkel 483bfa4b7f DocBook reader: support more emphasis roles.
The role "bf" is taken to indicate "bold face", i.e., "strongly emphasized"
text, while "underline" leads to underlined text.
2023-04-07 16:05:40 +02:00
John MacFarlane 826b8912ad Typst writer: use <..> for labels, create internal links.
Internal links to labels are now supported.
2023-04-05 12:57:25 -07:00
Noah Malmed 0353e11e27 Add rowspan, colspan and alignment to cells in jats table reader (#8726)
Partially addresses #8408
2023-04-05 12:37:22 -07:00
Toni Dietze 9f718da38a doc/lua-filters.md: fix wrong anchor (#8753) 2023-04-05 12:35:52 -07:00
John MacFarlane cf9f4833cc Fix pdf output via typst for the typst 0.1.0 release.
One must now use `typst compile` rather than `typst`.

Closes #8754.
2023-04-05 12:23:42 -07:00
Toni Dietze 2b420a1f89 doc/lua-filters.md: fix wrong anchor 2023-04-05 18:46:10 +02:00
wgevaertandWout Gevaert ce4e4d2c84 Remove links from inside links in mediawiki writer (#8739)
Co-authored-by: Wout Gevaert <wout@wikibase.nl>
2023-04-05 08:04:14 -07:00
wgevaertandWout Gevaert fd0f7332ed Remove links from inside links in mediawiki writer (#8739)
Co-authored-by: Wout Gevaert <wout@wikibase.nl>
2023-04-05 08:03:46 -07:00
Andreas Scherer 6da429f829 Purge double space. 2023-04-05 07:52:52 -07:00
Albert Krewinkel b8c7678fcf Org reader: treat #+NAME as synonym for #+LABEL.
Closes: #8578
2023-04-05 14:50:52 +02:00
Albert Krewinkel ef16a88cde Org reader: require abstract environment to use lowercase 2023-04-01 17:46:08 +02:00
John MacFarlane 509cb9b8fe MANUAL: Better link to citation syntax. 2023-03-31 14:01:16 -07:00
Albert Krewinkel 0d038fccf4 Fix cabal install instructions. 2023-03-31 20:54:16 +02:00
John MacFarlane 3f7c17ce16 stack.yaml - adjust texmath version. 2023-03-30 14:40:19 -07:00
John MacFarlane cd299fb0a7 Require texmath 0.12.7.1.
Improves typst math output.
2023-03-30 13:26:59 -07:00
perro tuerto 2007fdd575 doc/lua-filter.md: Fix typos. (#8734) 2023-03-30 07:18:41 +02:00
Albert Krewinkel d27878063e MANUAL: update link to custom djot writer. 2023-03-29 21:46:06 +02:00