Commit Graph
16144 Commits
Author SHA1 Message Date
Albert Krewinkel b34ec00607 doc/lua-filters.md: add documentation for pandoc.format 2022-12-03 16:22:19 +01:00
John MacFarlane c5beb1db45 Avoid using 'error' for unassigned table cells.
Instead, throw a regular pandoc error.  This is not necessarily
a programming error, as it can be triggered by inserting a
cell with ColSpan 0 in the AST.  Unfortunately the types
don't prevent that.

Closes #8468.
2022-12-02 14:47:29 -08:00
John MacFarlane 8b01e200f0 Multiple input files with --file-scope:
fix case where the links are URL-encoded, e.g. with `%20`.

Closes #8467.
2022-12-01 19:20:06 -08:00
John MacFarlane ed4bdd059c HTML writer: Add prooftree to list of math environments.
This will cause raw LaTeX prooftree environments to be rendered
appropriately when `--mathjax` is used.

Closes #8462.
2022-11-29 17:07:03 -08:00
John MacFarlane 513bdef40b DocBook writer: Fix position of textobject.
It is a child of `inlinemediaobject`, not `imageobject`.

Add regression tests for #8437.

Closes #8437.
2022-11-29 10:16:41 -08:00
John MacFarlane fe799eea91 AsciiDoc writer: in link text, only replace commas...
...with entities when they're in Str elements.  If a link
contains an image, it may have attributes, and the commas
there should not be converted.

See #8437, #8070.
2022-11-29 09:56:41 -08:00
John MacFarlane 6191be11ff DocBook writer: don't indent contents of title element. 2022-11-29 09:43:11 -08:00
John MacFarlane 6a23ac0d1d DocBook writer: render image alt text using textobject element.
See #8437.
2022-11-29 09:37:31 -08:00
John MacFarlane 8f9e16265b DocBook reader: support href on link...
even in a fragment.  (We now just look for an `href` attribute without
worrying about the namespace.)

See #8437.
2022-11-29 09:23:10 -08:00
John MacFarlane 07ebafcb01 DocBook reader: parse title from imageobject/objectinfo.
See #8437.
2022-11-29 09:13:48 -08:00
vkraven b6622c07b6 Textile Reader:
- Adding a Parser to look for ordered list start attribute numbers if any
 - Add command test for ordered list start attributes (#2465)
 - Cleanup and formatting
2022-11-28 19:30:20 -07:00
Terence Eden 2008a18f0e Fix epub-embed-font documentation
Fixes #8455
2022-11-28 12:01:17 -07:00
John MacFarlane a4bd4d655a Clarify docs for --metadata-file.
Closes #8459.
2022-11-28 10:58:36 -08:00
John MacFarlane f53ab3ca8c LaTeX reader: Add unnumbered class for \part*.
Closes  #8447.
2022-11-25 08:59:33 -07:00
Albert Krewinkel fb5da4a8c6 Fix command test #7743 for Windows 2022-11-23 10:01:46 +01:00
John MacFarlane 7347f3f3f8 stack.yaml: update doctemplates version. 2022-11-21 16:03:43 -08:00
John MacFarlane f038897187 Use doctemplates 0.11.
This avoids a transitive dependency on HsYAML, which we no longer
use in pandoc.
2022-11-21 10:44:59 -08:00
Albert Krewinkel 2dec0ff52d Docx writer: support relative image widths.
Image widths given in percent are interpreted to be relative to the text
width. This is similar to the way percent widths are handled in other
writers, e.g. HTML and LaTeX. Previously, percent widths were taken
relative to the image's native size.
2022-11-21 16:32:41 +01:00
John MacFarlane 4b4771f062 Docx reader: Support parsing of highlighted text. 2022-11-19 13:28:10 -08:00
John MacFarlane bb0fd13bcb RST reader: support mark role for round-trip. 2022-11-19 12:44:25 -08:00
John MacFarlane 127ded4fae LaTeX reader: support more soul commands, including \hl. 2022-11-19 12:44:07 -08:00
John MacFarlane 75435381ac Add support for mark extension for highlighted text.
+ Extensions: Add `Ext_mark` extension.
  This is not part of the pandoc extensions by default.
+ Markdown reader: parse `==..==` if `mark` extension enabled.
+ Markdown writer: support `mark` extension.
+ Docx writer: render Span with class `mark` as highlighted.
  Currently yellow is hardcoded.
+ LaTeX writer: support highlighted text for Span with class `mark`.
+ RST writer: use special `mark` role for Span with class `mark`.
+ Update MANUAL.txt.

Closes #7743.
2022-11-19 12:30:12 -08:00
John MacFarlane 144bf90ab9 LaTeX writer: Use soul instead of ulem for strikeout, underline.
This handles things like hyphenation, line breaks, and nonbreaking
spaces better.

Closes #8411.
2022-11-19 12:28:41 -08:00
Vladimir Alexiev 202eacb686 Update epub.md
minor typo s/above/about/
2022-11-16 10:42:05 -08:00
Alexander Batischev 1bea5e8a54 Allow mtl 2.3.1 2022-11-15 11:35:53 -08:00
John MacFarlane afe096d9e3 Markdown writer: escape ! before [.
See #8254.
2022-11-11 10:58:07 -08:00
Wout Gevaert 323be80838 Use 'literal tag' instead of 'text (T.unpack tag)' in tagWithAttrs 2022-11-11 10:12:07 -08:00
Wout Gevaert e9d2ceb9bd Add tests for the new table features 2022-11-11 10:12:07 -08:00
Wout Gevaert 0b003de6f1 Change the Mediawiki writer to use the 'new' table structure
Now MediaWiki tables can use colspan and rowspan :D
2022-11-11 10:12:07 -08:00
Wout Gevaert c5dbedcd4e [API change] Add functions htmlAddStyle, htmlAlignmentToString and htmlAttrs to Writers/Shared.hs
The functions htmlAddStyle and htmlAlignmentToString are moved from Writers/HTML.hs, where they were called 'addStyle' and 'alignmentToString' respectively.
The function htmlAttrs is split off from tagWithAttrs in Writers/Shared.hs. It creates a representation of an Attr object, as one would see in a tagWithAttrs (but without the tag)
2022-11-11 10:12:07 -08:00
John MacFarlane 61d6608350 Add CITATION.cff.
Closes #8434.
2022-11-10 15:50:41 -08:00
John MacFarlane 314c2d1d32 Better error when parsing EndNote references fails.
(Tell them that it concerns EndNote references.)
2022-11-10 10:14:59 -08:00
Amar Al-Zubaidi 03e478ee2c Add LaTeX variable urlstyle (#8429)
This is set to `same` by default, so users should not experience any change.
2022-11-10 08:39:14 -08:00
Albert Krewinkel 2f780ce45a .gitignore: ignore .stack-work in subdirectories 2022-11-10 14:16:49 +01:00
John MacFarlane 7ef00d7226 pandoc-server: add ContentType to CORS policy.
See #8427.
2022-11-09 17:49:40 -08:00
John MacFarlane 334903bb9d HTML template: remove default font size, line height...
...and font family in default inline css.  Closes #8423
(see comments there for motivation).  `mainfont`, `fontsize`,
and `linestretch` can still be used as before; the only difference
is that we no longer provide opinionated defaults.

This commit also adds a `maxwidth` variable that sets `max-width`;
if not set, 36em is used as a default.
2022-11-09 17:03:12 -08:00
John MacFarlane cb5e3ded12 In --verbose mode add message when running citeproc.
(As with other filters.)
2022-11-09 12:34:56 -08:00
John MacFarlane 1989573074 Ms writer: remove -C option on PSPIC.
Some old versions don't support this option, and since it's
the default it shouldn't be necessary.
2022-11-08 15:20:08 -08:00
John MacFarlane e2899fd52a Add simple CORS support to pandoc-server.
Closes #8427.
2022-11-08 12:45:15 -08:00
John MacFarlane dee186be7d make_artifacts.sh: add quotes. 2022-11-07 13:20:23 -08:00
John MacFarlane bf941efb28 Fix make_artifacts.sh. 2022-11-07 11:36:29 -08:00
John MacFarlane be7d4bd092 Fix CABALOPTS in make_artifacts.sh. 2022-11-07 10:47:57 -08:00
John MacFarlane ca46dc8a66 make_artifacts.sh: add a 'cabal test' as a sanity check.
It's possible that changes in upstream packages could make a
test fail, and we wouldn't want to release.
2022-11-07 08:42:08 -08:00
John MacFarlane 1bc48e9dc5 CI: use cabal 3.8.1.0, --ghc-options=-Werror.
Previously we had to work around a cabal-install bug that caused
`-Werror` to react to dependencies as well as local packages,
but this is fixed in cabal 3.8.1.0.  There are some cases in which
building dependencies only doesn't work (see #8084).
2022-11-07 08:32:54 -08:00
John MacFarlane 452fe5aa17 EPUB writer: refactor to use T.P.Chunks. 2022-11-06 21:31:40 -08:00
John MacFarlane 04973586eb Move SecInfo, toTOCTree to T.P.Chunks.
Also add `secPath` to `SecInfo`.
2022-11-06 21:31:40 -08:00
John MacFarlane 9e2df2a718 Add Text.Pandoc.Chunks.
This module provides functions to split Pandoc documents into
chunks to be rendered in separate files, e.g. one per section.

Internal identifiers are rewritten appropriately to point to
the new locations.

See #6122.
2022-11-06 21:31:34 -08:00
John MacFarlane 2dfa5e06b7 Remove stray character in epub.css. 2022-11-06 20:46:41 -08:00
John MacFarlane 036aac3851 Fix warnings. 2022-11-06 12:47:01 -08:00
John MacFarlane 2682c79e95 EPUB writer: refactor createChaptersAndRefTable. 2022-11-06 09:54:25 -08:00