222 Commits
Author SHA1 Message Date
John MacFarlane 2c299d7991 Use released versions of packages. 2023-01-18 11:05:09 -08:00
John MacFarlane 0eb4f9c03d Use latest dev pandoc-lua-marshall. 2023-01-17 21:32:32 -08:00
John MacFarlane ab32bfc697 Use dev citeproc. 2023-01-16 10:10:01 -08:00
John MacFarlane b2d93afddb Use latest pandoc-types (removing Null). 2023-01-13 15:10:19 -08:00
John MacFarlane cfa5ef7baa Use latest dev pandoc-lua-marshal. 2023-01-13 15:08:47 -08:00
John MacFarlane 0b02f177fb Use latest dev pandoc-lua-marshal. 2023-01-13 12:59:13 -08:00
John MacFarlane aa747f194f Require pandoc-types 1.23, update dependencies.
This fails to build because pandoc-lua-marshal still needs updating.
2023-01-13 10:42:07 -08:00
John MacFarlane 2d72e968e3 Use latest dev pandoc-types. 2023-01-13 10:23:41 -08:00
John MacFarlane af708abb04 Use dev jgm/pandoc-types. 2023-01-13 09:40:46 -08:00
Albert KrewinkelandAner Lucero 909ced5153 Support complex figures. [API change]
Thanks and credit go to Aner Lucero, who laid the groundwork for this
feature in the 2021 GSoC project. He contributed many changes, including
modifications to the readers for HTML, JATS, and LaTeX, and to the HTML
and JATS writers.

Shared (Albert Krewinkel):

- The new function `figureDiv`, exported from `Text.Pandoc.Shared`,
  offers a standardized way to convert a figure into a Div element.

Readers (Aner Lucero):

- HTML reader: `<figure>` elements are parsed as figures, with the
  caption taken from the respective `<figcaption>` elements.

- JATS reader: The `<fig>` and `<caption>` elements are parsed into
  figure elements, even if the contents is more complex.

- LaTeX reader: support for figures with non-image contents and for
  subfigures.

- Markdown reader: paragraphs containing just an image are treated as
  figures if the `implicit_figures` extension is enabled. The identifier
  is used as the figure's identifier and the image description is also
  used as figure caption; all other attributes are treated as belonging
  to the image.

Writers (Aner Lucero, Albert Krewinkel):

- DokuWiki, Haddock, Jira, Man, MediaWiki, Ms, Muse, PPTX, RTF, TEI,
  ZimWiki writers: Figures are rendered like Div elements.

- Asciidoc writer: The figure contents is unwrapped; each image in the
  the figure becomes a separate figure.

- Classic custom writers: Figures are passed to the global function
  `Figure(caption, contents, attr)`, where `caption` and `contents` are
  strings and `attr` is a table of key-value pairs.

- ConTeXt writer: Figures are wrapped in a "placefigure" environment
  with `\startplacefigure`/`\endplacefigure`, adding the features
  caption and listing title as properties. Subfigures are place in a
  single row with the `\startfloatcombination` environment.

- DocBook writer: Uses `mediaobject` elements, unless the figure contains
  subfigures or tables, in which case the figure content is unwrapped.

- Docx writer: figures with multiple content blocks are rendered as
  tables with style `FigureTable`; like before, single-image figures are
  still output as paragraphs with style `Figure` or `Captioned Figure`,
  depending on whether a caption is attached.

- DokuWiki writer: Caption and "alt-text" are no longer combined. The
  alt text of a figure will now be lost in the conversion.

- FB2 writer: The figure caption is added as alt text to the images in
  the figure; pre-existing alt texts are kept.

- ICML writer: Only single-image figures are supported. The contents of
  figures with additional elements gets unwrapped.

- HTML writer: the alt text is no longer constructed from the caption,
  as was the case with implicit figures. This reduces duplication, but
  comes at the risk of images that are missing alt texts. Authors should
  take care to provide alt texts for all images.

  Some readers, most notably the Markdown reader with the
  `implicit_figures` extension, add a caption that's identical to the
  image description. The writer checks for this and adds an
  `aria-hidden` attribute to the `<figcaption>` element in that case.

- JATS writer: The `<fig>` and `<caption>` elements are used write
  figures.

- LaTeX writer: complex figures, e.g. with non-image contents and
  subfigures, are supported. The `subfigure` template variable is set if
  the document contains subfigures, triggering the conditional loading
  of the *subcaption* package. Contants of figures that contain tables
  are become unwrapped, as longtable environments are not allowed within
  figures.

- Markdown writer: figures are output as implicit figures if possible,
  via HTML if the `raw_html` extension is enabled, and as Div elements
  otherwise.

- OpenDocument writer: A separate paragraph is generated for each block
  element in a figure, each with style `FigureWithCaption`. Behavior for
  single-image figures therefore remains unchanged.

- Org writer: Only the first element in a figure is given a caption;
  additional block elements in the figure are appended without any
  caption being added.

- RST writer: Single-image figures are supported as before; the contents
  of more complex images become nested in a container of type `float`.

- Texinfo writer: Figures are rendered as float with type `figure`.

- Textile writer: Figures are rendered with the help of HTML elements.

- XWiki: Figures are placed in a group.

Co-authored-by: Aner Lucero <4rgento@gmail.com>
2023-01-13 09:13:27 -08:00
John MacFarlane 4db5b05abc Use latest dev citeproc.
This gives us better date sorting in apa style.
2023-01-12 23:24:32 -08:00
John MacFarlane cfe001e4d2 Use dev version of texmath 2023-01-12 12:07:17 -08:00
John MacFarlane 091ae5d65e Use latest skylighting-format-context. 2022-12-22 09:49:38 -08:00
John MacFarlane ce3f5a4976 Use latest dev citeproc. 2022-12-21 15:35:09 -08:00
John MacFarlane 031420b2d2 Move aeson constraint from cabal.project to pandoc.cabal. 2022-10-26 08:30:30 -07:00
John MacFarlane 415550a36a Use latest dev citeproc.
This will raise an error if we have multiple layout elements
in a bibliography or citation element.
2022-10-25 10:43:57 -07:00
John MacFarlane 4aeedd4c66 Use latest dev citeproc. 2022-10-25 10:37:21 -07:00
John MacFarlane 119de20e60 Use dev version of citeproc. 2022-10-25 10:08:39 -07:00
Albert Krewinkel 1663dfc850 Use released gridtables 0.1.0.0 2022-09-30 18:31:55 +02:00
Albert Krewinkel 5be9052f5f [API Change] Extract Lua code into new package pandoc-lua-engine
The flag 'lua53` must now be used with that package if pandoc is to be
compiled against Lua 5.3.
2022-09-30 08:33:40 -07:00
John MacFarlane 57fd3c4f81 cabal.project: move back to using flags:.
If we add the flag to constraints, it can't be overridden on
the command line.
2022-09-29 10:19:30 -07:00
John MacFarlane 7aaecc6ae1 cabal.project: set flag on per-package basis 2022-09-29 09:31:29 -07:00
John MacFarlane a3e4ddef1a Require latest released texmath 2022-09-28 22:36:12 -07:00
John MacFarlane a56654a83c Use released commonmark-extensions. 2022-09-28 22:02:54 -07:00
John MacFarlane c40d61ce1b Use released skylighting-format-blaze-html 2022-09-28 21:09:41 -07:00
John MacFarlane bd1d923b86 Split pandoc-server, pandoc-cli into separate packages. (#8309)
This also removes the unnecessary Setup.hs from pandoc.
Cabal does not need this with build-type 'simple'.
2022-09-22 09:47:07 -07:00
John MacFarlane c7915208ab Depend on dev texmath. 2022-09-12 10:20:22 +02:00
Albert Krewinkel 635b6e3953 Use dev version of gridtables
This allows to specify a table foot by enclosing it with part separator
lines, i.e., row separator lines consisting only of `+` and `=`
characters. E.g.:

    +------+-------+
    | Item | Price |
    +======+=======+
    | Eggs | 5£    |
    +------+-------+
    | Spam | 3£    |
    +======+=======+
    | Sum  | 8£    |
    +======+=======+

The last row, containing "Sum" and "8£", is the table foot.

Closes: #8257
2022-09-01 09:06:42 +02:00
John MacFarlane e3978247cc HTML writer: avoid aria-hidden in code blocks for HTML4.
Closes #8241.

This requires depending on a new (still unreleased)
version of skylighting-format-blaze-html.
2022-08-26 20:01:01 -07:00
John MacFarlane ca6cb63357 Use dev version of commonmark-extensions.
This fixes an issue with lists inside definition list definitions.
2022-08-23 09:00:48 -07:00
Albert Krewinkel e6d4501feb Use latest gridtables-0.0.3.0
This restores undocumented behavior which allowed to grid tables to have
separator lines that have fewer characters than the cell they delimit.
2022-08-18 23:30:36 +02:00
John MacFarlane ecdbd18bc1 Remove pandoc-server from cabal.project. 2022-08-18 11:00:25 -07:00
John MacFarlane 5635ef9c57 Replace old trypandoc code with new pandoc-cgi.
This is based on servant. It is less hacky and more extensible.
2022-08-06 14:42:38 -07:00
Albert Krewinkel fc3b9e763f Use dev version of gridtables.
Closes: #8216
2022-08-05 13:48:30 +02:00
John MacFarlane 47796aa89e Use latest released versions of citeproc, texmath. 2022-08-03 10:44:12 -07:00
John MacFarlane e04ea99326 Use dev version of texmath. 2022-07-22 11:23:45 +02:00
John MacFarlane 9d256aa19b Use latest dev citeproc 2022-07-11 23:40:13 +02:00
John MacFarlane 3571352a0a Use citeproc 0.8. 2022-07-01 12:12:58 +02:00
John MacFarlane a6344893b0 Use dev version of citeproc. 2022-06-15 10:52:26 -06:00
John MacFarlane c18bb2ab58 Use latest doclayout (0.4) 2022-04-03 23:13:48 -07:00
John MacFarlane 86e53a5dd7 Use released commonmark 0.2.2, commonmark-extensions 0.2.3.1. 2022-04-02 14:27:17 -07:00
John MacFarlane feb5b03976 Use citeproc 0.7. 2022-04-02 13:33:05 -07:00
John MacFarlane dec0455725 Use released version of texmath. 2022-04-02 11:21:36 -07:00
John MacFarlane 7ac72fd549 Use released pandoc-types 1.22.2. 2022-04-02 10:13:58 -07:00
John MacFarlane ac2bf2f372 Use latest dev doclayout, pandoc-types 2022-03-30 13:19:06 -07:00
John MacFarlane f2eb52ad80 Use current dev versions of citeproc, doclayout. 2022-03-23 13:51:14 -07:00
John MacFarlane 5fdcb36c80 Use latest dev citeproc. 2022-03-23 08:52:47 -07:00
John MacFarlane e2d05626fc Use latest dev texmath. 2022-03-20 11:51:31 -07:00
John MacFarlane d128f5ee15 Depend on latest dev texmath. 2022-03-12 10:23:55 -08:00
John MacFarlane d523eca3d3 Use dev version of pandoc-types.
This allows toJSONFilter to work with Meta and MetaValue.
2022-03-11 10:23:06 -08:00