606 Commits
Author SHA1 Message Date
John MacFarlane 3975064e12 Use released typst 0.1.0.0 2023-06-06 17:24:06 -07:00
John MacFarlane 46a4e24d6b Add typst reader.
New module Text.Pandoc.Readers.Typst [API change].
2023-06-06 16:08:14 -07: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 65346fa6b1 Use latest texmath 2023-05-06 11:03:51 -07:00
John MacFarlane 52196617c8 Use dev version of texmath. 2023-05-01 21:19:02 -07:00
John MacFarlane 3f7c17ce16 stack.yaml - adjust texmath version. 2023-03-30 14:40:19 -07:00
Albert Krewinkel 2821ca72ff Use released version of hslua-module-{system,text} 2023-03-26 18:28:46 +02:00
John MacFarlane fcea9480b9 Update stack.yaml 2023-03-25 22:12:43 -07:00
Albert Krewinkel f9b6777a92 pandoc-cli: require hslua-cli-1.4.1
This fixes a bug where the program would not enter interactive mode if
`-v`, `-e`, or `-l` was used together with the `-i` command line flag.
2023-03-18 18:26:12 +01:00
Albert Krewinkel e110da44ef stack.yaml: more version updates 2023-03-18 09:20:56 +01:00
Albert Krewinkel 4b80cc6eef stack.yaml: Use newest hslua-* versions 2023-03-18 09:18:24 +01:00
Albert Krewinkel a23d14079c pandoc-cli: add a Lua REPL 2023-03-17 09:18:41 -07:00
Albert Krewinkel 421884717d Fix stack.yaml once more 2023-03-13 22:26:21 +01:00
Albert Krewinkel 39eb4145ba Fix testing with stack 2023-03-13 13:46:15 +01:00
Albert Krewinkel 8a89a7f31c Fix stack build after updating to new hslua version 2023-03-13 13:34:27 +01:00
John MacFarlane d973804123 Use commonmark-extensions-0.2.3.4 2023-03-04 10:23:21 -08:00
John MacFarlane 6feeb0fe37 stack.yaml - add zip-archive dependency. 2023-03-04 10:05:29 -08:00
John MacFarlane 944055fdc1 Use latest skylighting-format-context 2023-02-14 09:56:37 -08:00
Albert Krewinkel 45367cdd37 Lua: add new function pandoc.system.cputime.
The function returns the CPU time consumed by pandoc and can be used to
benchmark Lua computations.
2023-02-14 09:44:20 -08:00
Albert Krewinkel c2827e7765 Use latest pandoc-lua-marshal release, version 0.2.1.
All major AST elements now have `__tojson` metamethods that return the
JSON representation of an element. This allows to JSON-encode these
elements with libraries that respect the `__tojson` metamethod,
including dkjson.
2023-02-11 14:53:53 -08:00
John MacFarlane 2a9cd05023 stack.yaml: update skylighting deps. 2023-02-08 16:31:56 -08:00
John MacFarlane a2d8a8757f Use released skylighting 0.13.2.1 2023-02-08 15:27:10 -08:00
John MacFarlane 5d3b61a048 Fix skylighting clause for skylighting-core. 2023-01-29 15:22:42 -08:00
John MacFarlane 1caa50a428 Use dev skylighting-core 2023-01-29 14:51:59 -08:00
John MacFarlane 2e0a3d448f stack.yaml - use latest hslua-list 2023-01-25 08:30:43 -08:00
John MacFarlane 8cb98f841e stack.yaml - bump texmath version. 2023-01-25 08:10:02 -08:00
John MacFarlane f66d5f4215 Fix version for pandoc-lua-marshall in stack.yaml. 2023-01-18 11:26:35 -08:00
John MacFarlane 2c299d7991 Use released versions of packages. 2023-01-18 11:05:09 -08:00
John MacFarlane 8a9116e159 Remove superfluous extra-packages in stack.yaml. 2023-01-17 21:35:44 -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
Albert KrewinkelandJohn MacFarlane 87c47434cc Bump stackage resolver to lts-20.6 (#8545)
Co-authored-by: John MacFarlane <jgm@berkeley.edu>
2023-01-12 17:06:37 -08:00
John MacFarlane cfe001e4d2 Use dev version of texmath 2023-01-12 12:07:17 -08:00
Albert Krewinkel 7f5bd4031b Use jira-wiki-markup 1.5.0
Fixed issues with icon-like sequences at the beginning of words.

Fixes: #8511
2023-01-11 14:55:01 +01:00
Albert Krewinkel 8862d5e0dd Lua: add functions pandoc.text.toencoding, pandoc.text.fromencoding.
Closes: #8512
2023-01-03 10:35:22 +01: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
Albert Krewinkel e83120fd2d ConTeXt writer: support syntax highlighting for code. 2022-12-18 15:47:48 +01:00
John MacFarlane 5819e36dfa Use skylighting 0.13.1.2 2022-12-08 12:20:18 -08:00
John MacFarlane 7347f3f3f8 stack.yaml: update doctemplates version. 2022-11-21 16:03:43 -08:00