17754 Commits
Author SHA1 Message Date
John MacFarlane 31e4fabbb2 Changelog - fix typos. pandoc-cli-3.5 3.5 pandoc-server-0.1.0.9 pandoc-lua-engine-0.3.3 2024-10-05 13:36:12 -07:00
John MacFarlane 9f78ad0679 Update AUTHORS. 2024-10-05 12:55:53 -07:00
John MacFarlane abe86835e1 Depend on latest pandoc-lua-marshall. 2024-10-05 12:45:40 -07:00
John MacFarlane a0b4c319ae Rebuild man pages. 2024-10-05 12:42:53 -07:00
John MacFarlane c7ef045c31 Update changelog. 2024-10-05 12:42:28 -07:00
John MacFarlane 0345e140bc Bump version of pandoc-server to 0.1.0.9. 2024-10-05 12:42:20 -07:00
John MacFarlane 8ff24ec4e4 Bump pandoc-lua-engine to 0.3.3. 2024-10-05 12:42:08 -07:00
John MacFarlane 39b2845c7f Bump version of pandoc and pandoc-cli to 3.5. 2024-10-05 12:41:54 -07:00
John MacFarlane cf9dd9c539 Change date on manual. 2024-10-05 12:41:31 -07:00
John MacFarlane 70b2c5f3a9 T.P.SelfContained: improve handling of links to remote CSS.
Previously these were only converted to a `<style>` element
if the link was being served with a text/css mime type (not
e.g. text/plain).  We now add a secondary check for `rel="stylesheet"`
to better handle such cases.

Closes #10261.
2024-10-05 09:31:41 -07:00
John MacFarlane 50007f0273 Use latest releases of commonmark, commonmark-pandoc. 2024-10-05 09:31:29 -07:00
John MacFarlane a913bf662f Use latest releases of texmath, djot. 2024-10-04 19:16:20 -07:00
John MacFarlane 93d745742d Docx reader: reset lists after headers in same list numId.
Headings in docx, even ones that do not have a visible number,
can have a numId, and in odd cases can even share a numId with
a list that continues after the header. In this case the list
numbering should be reset by the header.

To accomplish this, we add a Heading constructor to BodyPart and
include on it all the information list items have.

Closes #10258.
2024-10-03 22:21:59 -07:00
John MacFarlane a2dfda0dd0 Clarifying text about use of beamerarticle variable.
Closes #10250.
2024-10-01 12:38:49 -07:00
Thomas Hodgson dbc80f9745 Support short title, author, etc. in Beamer (#10244)
+ Add `shorttitle`, `shortsubtitle`, `shortauthor`, `shortinstitute`, `shortdate`
   to default.beamer.
+ Note that the brackets are inside conditionals, because some older beamer
    versions don't allow the empty optional argument.

Closes #10248.
2024-10-01 12:29:44 -07:00
Thomas Hodgson f2b1de5397 Make --number-sections work with beamer (#10245)
+ Remove section numbering code from common.latex
+ Add section numbering to default.latex
+ Add logic for numbering sections in default.beamer. I moved the template setting
   code to where other beamer templates are set. This makes the section-titles and
   numbersections variables independent.

This should make --number-sections work with beamer.
2024-10-01 12:26:28 -07:00
Thomas Hodgson e583ab7970 Support a list of images for titlegraphic (#10246)
Allow a list of title graphics in default.beamer
Title graphic options will be applied to each title graphic.
Images will be separated by `\enspace`.
2024-10-01 11:07:13 -07:00
John MacFarlane 4211efaad1 Remove unnecessary import. 2024-10-01 11:04:31 -07:00
Thomas Hodgson 3ba968292b Beamer theme options (#10243)
Add theme options to default.beamer: `colorthemeoptions`, `fontthemeoptions`,
`innerthemeoptions`, `outerthemeoptions`.
2024-10-01 11:02:43 -07:00
John MacFarlane 7048254397 Allow extracting data: URIs even in PandocPure (--sandbox).
These don't require IO, so we should allow it in sandboxed
mode.  Closes #10249.
2024-10-01 10:16:23 -07:00
John MacFarlane c3eec896ab Text.Pandoc.Class: export extractURIData.
[API change]
2024-10-01 10:15:50 -07:00
John MacFarlane 4f15b03ad2 RST writer: change bullet list hang from 3 to 2.
This accords with the style in the reference docs.
2024-10-01 09:19:53 -07:00
John MacFarlane 0dc660550d Move beamerarticle code from beamer -> latex template. 2024-10-01 09:06:43 -07:00
John MacFarlane 0d9cfc8ec0 Amend the fix to #10236 to handle list tables.
With this patch, we also reuse bullet list code for list tables,
which simplifies the code.
2024-10-01 08:47:29 -07:00
John MacFarlane f202ae1595 Remove refs to pandoc-discuss from issue templates.
See #10247.
2024-10-01 08:40:54 -07:00
Albert Krewinkel a37035caa1 doc/lua-filters.md: list functions in pandoc.utils alphabetically 2024-10-01 12:24:13 +02:00
Albert Krewinkel 4cf6ddb027 Lua: allow returning a single filter from filter files
It is now possible to return a single filter from a filter file, e.g.

``` lua
-- Switch single- and double quotes
return {
  Quoted = function (q)
    elem.quotetype = elem.quotetype == 'SingleQuote'
      and 'DoubleQuote' or 'SingleQuote'
    return elem
  end
}

The filter must not contain numerical indexes, or it might be treated as
a list of filters.
2024-10-01 12:23:36 +02:00
John MacFarlane 752d57dac1 RST writer: handle cases where indented context starts with block quote.
In these cases we emit an empty comment to fix the point from
which indentation is measured; otherwise the block quote is not
parsed as a block quote.

This affects list items and admonitions.

Cloess #10236.
2024-09-30 16:05:57 -07:00
John MacFarlane b4df43b01f LaTeX writer: better fix for lists in definition lists.
In commit a26ec96d89 we added an
empty `\item[]` to the beginning of a list that occurs first
in a definition list, to avoid having one item on the line with
the label.

This gave bad results in some cases (#10241) and there is a more
idiomatic solution anyway: using `\hfill`.

Closes #10241.
2024-09-30 14:38:36 -07:00
John MacFarlane 4b38cbbf54 Fix invalid XML in test/docx/normalize.docx.
Closes #10242.
2024-09-30 14:32:19 -07:00
John MacFarlane c9c40eee8f Beamer template doesn't need amsmath,amssym.
These are loaded by beamer automatically.
2024-09-29 21:27:01 -07:00
John MacFarlane 2406ec1cdb Remove font-settings.tex partial.
We incorporate this into fonts.tex, and move the beamer theme-setting
commands before both of them.
2024-09-29 21:26:56 -07:00
dependabot[bot] e58f5ab701 Bump cachix/install-nix-action from V28 to 29
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from V28 to 29. This release includes the previously tagged commit.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/V28...v29)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-29 20:02:35 -07:00
John MacFarlane 2a6268de67 Refactor latex template using partials.
+ Split out common parts of latex template into partials: common.latex,
  fonts.latex, font-settings.latex, passoptions.latex, hypersetup.latex,
  after-header-includes.latex.
+ Split out old latex template into default.latex and default.beamer.
+ Make default.beamer the default template for beamer.
2024-09-29 14:18:31 -07:00
Albert Krewinkel 7565a90cec Stop depending on package SHA
Pandoc already depends on `crypton-conntection`, and thus transitively
on `crypton`. The latter provides a vast variety of hashing algorithms
and makes the dependency on SHA unnecessary.
2024-09-29 18:36:56 +02:00
John MacFarlane 7a96b253c2 Use dev version of texmath. 2024-09-28 12:16:48 -07:00
John MacFarlane 9a3aed9cee RST writer: fix two issues with list tables.
- Fix alignment of list items corresponding to cells.
- Don't enclose the list table in a `.. table::`; this leads to
  doubled captions.

Closes #10226.
Closes #10227.
Modified test output for #4564.
2024-09-27 09:15:23 -07:00
John MacFarlane f672706c6c MANUAL.txt: fix typo introduced by...
...commit bac631fda8.
2024-09-25 21:54:44 -07:00
John MacFarlane 56fc7d5cfc LaTeX reader: add em, ex, px, mu to list of units for dimension args.
Closes #10212.
2024-09-24 08:53:32 -07:00
John MacFarlane f3fff87b2c EPUB reader: fix links to other files in the epub...
making them internal links to a fragment derived from the
filename.  There was already code to handle links like
`#foo`, but not to handle links like `ch0001.html#foo`.

Closes #10207.
2024-09-22 22:49:02 -07:00
John MacFarlane f4fe61a1af Nix CI: re-add nix_path but with proper name of stable channel. 2024-09-22 12:31:10 -07:00
John MacFarlane 82b186bb58 CI: remove channel from nix build. 2024-09-22 12:26:00 -07:00
John MacFarlane 57d97b4293 CI: try changing Nix build to use nix-stable. 2024-09-22 12:23:54 -07:00
Akash PatelandJohn MacFarlane ca348940e3 Add support for list of figures (lof) and list of tables (lot) (#10029)
Two new command-line options are added:

`--lof[=true|false]`, `--list-of-figures[=true|false]`
`--lot[=true|false]`, `--list-of-tables[=true|false]`

Only docx, latex, and context are supported at this point.

Setting the `lof` and `lot` variables will also work for the formats that are
currently supported.

[API changes]

+ Lua: `list_of_figures` and `list_of_tables` can now be used in writer options.
+ Text.Pandoc.Options:  add `writerListOfFigures` and `writerListOfTables` fields
  to `WriterOptions`.
+ Text.Pandoc.App.Opt: add `optListOfFigures` and `optListOfTables` to `Opt`.

Closes #8245.

Co-authored-by: John MacFarlane <jgm@berkeley.edu>
2024-09-22 11:49:52 -07:00
John MacFarlane 46ebe25b69 Dokuwiki reader: be more forgiving about misaligned lists...
like dokuwiki itself. Closes #8863.
2024-09-21 19:35:12 -07:00
John MacFarlane 98e77e02f6 Improve blockquote parsing in dokuwiki.
Allow for quoted code blocks.
2024-09-21 19:26:32 -07:00
John MacFarlane e452f0ca3f DokuWiki reader: enable smart extension. 2024-09-21 19:26:09 -07:00
John MacFarlane 8d35b794e3 DokuWiki reader: properly parse -- and --- as dashes. 2024-09-21 18:33:34 -07:00
John MacFarlane 7e6a3b063e DokuWiki reader: fix block quote behavior.
Closes #6461.

Blockquotes are not really block containers in DokuWiki;
the lines are interpreted literally (so, e.g., you can't
start a list), and line breaks are added at the ends.
2024-09-21 18:33:28 -07:00
John MacFarlane 16a9df8c6b DokuWiki writer: don't emit <HTML> tags.
The use of these tags is now strongly discouraged for security
reasons, and will be removed.

We previously used them as a fallback for lists that could not
be represented using DokuWiki syntax, e.g. ordered lists with
fancy numbers or lists with multiple blocks in their items.

We also used them for block quotes with multiple blocks as
their contents.

We now use the `<WRAP>` syntax (from the optional WRAP plugin)
to handle lists with multiple blocks as their contents.

A new method of handling block quotes with complex contents
has the side benefit of also handling nested block quotes,
which weren't supported before.

`<HTML>` and `<html>` tags are only for raw HTML blocks and
inlines, and only if the `raw_html` extension is enabled. (It is
now a valid extension for `dokuwiki`, though off by default.)

Closes #7413.
2024-09-21 16:58:01 -07:00