Commit graph

626 commits

Author SHA1 Message Date
John MacFarlane
677f2ca26e Allow use of a RIS bibliography with citeproc. 2022-02-05 23:48:55 -08:00
John MacFarlane
3da5440858 Add RIS bibliography format reader.
New module, Text.Pandoc.Readers.RIS, exporting readRIS.

New input format `ris`.

Closes #7894.
2022-02-05 23:25:03 -08:00
John MacFarlane
2fca57522b MANUAL: document EndNote plugin support in docx+citations. 2022-02-05 08:26:42 -08:00
John MacFarlane
34897031f4 Add endnote XML reader.
New input format: endnotexml

New reader module: Text.Pandoc.Readers.EndNote, exporting
`readEndNoteXML` and `readEndNoteXMLReferences`. [API change]

This reader is still a bit rudimentary, but it should get
be good enough to be helpful.
2022-02-04 10:03:52 -08:00
John MacFarlane
e07c0e74ce Support embedded Mendeley citations in docx.
These are supported in the same way as Zotero citations,
using the same code.  As with Zotero, enable the `citations`
extension on `docx` to parse these as native citations.

Closes #7840.
2022-02-04 10:00:23 -08:00
John MacFarlane
1c2f0fe1d2 Enable citations extension for docx reader.
When enabled, Zotero citations are parsed as native pandoc
citations.  (When disabled, the Zotero-generated citation
text is passed through as regular text.)  In addition, the
Zotero-generated bibliography is suppressed.

Locators still need some work.
2022-02-03 19:34:05 -08:00
John MacFarlane
aa5e10ce6c MANUAL: fix documentation for citations and org mode. 2022-02-03 18:59:28 -08:00
John MacFarlane
0bd62ddeaf Update man page. 2022-01-30 11:17:18 -08:00
John MacFarlane
222fb2a445 Move beamerarticle in MANUAL.
It should be documented under "Variables for LaTeX", not
"for Beamer."  Closes #7874.
2022-01-30 09:43:42 -08:00
John MacFarlane
148cf8a064 Document --trace option.
Closes #7873.
2022-01-29 21:57:46 -08:00
John MacFarlane
5e42189ddb Document no-check-certificate in defaults files.
See #7873.
2022-01-29 21:54:12 -08:00
John MacFarlane
9f4693d003 Document 'sandbox' option for defaults files.
See #7873.
2022-01-29 21:51:30 -08:00
Carsten Allefeld
07e79f68a7 Additional information from comments in example 2022-01-29 14:22:14 -08:00
Carsten Allefeld
a251f3d274 New defaults files documentation 2022-01-29 14:22:14 -08:00
John MacFarlane
7fbce82f2f LaTeX writer: allow arbitrary frameoptions to be passed...
to a beamer frame, using the frameoptions attribute.
Updated manual.

See #7869.
2022-01-27 14:07:51 -08:00
Even Brenden
7df29e495f
Search for metadata files in $DATADIR/metadata (#7851)
If files specified with `--metadata-file` are not found in the working
directory, look in `$DATADIR/metadata`.

Expose new `readMetadataFile` function from Text.Pandoc.Class
[API change].

Expose new `PandocCouldNotFindMetadataFileError` constructor for
`PandocError` from Text.Pandoc.Error [API change].

Closes #5876.
2022-01-21 12:00:45 -08:00
John MacFarlane
6361d43e53 MANUAL: add that speaker notes can be used with beamer.
Closes #7856.
2022-01-20 18:48:14 -08:00
Albert Krewinkel
7f50324ff9
PDF: support pagedjs-cli as pdf engine (#7838)
PagedJS is a polyfill and supports the Paged Media standards by the W3C.
<https://www.pagedjs.org/>
2022-01-17 09:19:03 -08:00
John MacFarlane
a1cfe04a26 MANUAL: fix formatting of some occurrences of 'pandoc'. 2022-01-15 12:09:51 -08:00
John MacFarlane
55cc9040cb Update man page. 2022-01-14 10:36:59 -08:00
John MacFarlane
4fdbb30a97 Citeproc: allow notes-after-punctuation to work...
with numerical styles that use superscripts (e.g.
american-medical-association.csl), as well as with
note styles. The default setting of `notes-after-punctuation`
is true for note styles and false otherwise.

This restores a behavior of pandoc-citeproc that wasn't properly
carried over to Citeproc.

Closes #7826.
See also jgm/pandoc-citeproc#384.
2022-01-12 21:08:28 -08:00
John MacFarlane
1a6fad9fbd Update manual date and man page. 2022-01-12 15:12:53 -08:00
John MacFarlane
beaf09a758 Add manual section on EPUB styling. 2022-01-09 11:41:46 -08:00
John MacFarlane
ceb463e36e EPUB template improvements.
Include abstract in default template.

Also ensure that the essential styles needed by
pandoc (`styles.html` partial) are included in the
templates.  This is important for correct formatting
of CSL bibliographies.

Note that much of the styling in `styles.html` will
be ignored for EPUB, because of the conditional on
`document-css`, but if it is desired, you can set
the `document-css` variable.
2022-01-09 11:33:47 -08:00
Lucas Viana
fb91a91615 Org reader: support alphabetical (fancy) lists
This adds support for alphabetical lists in org by enabling the
extension Ext_fancy_lists, mimicking the behaviour of Org Mode when
org-list-allow-alphabetical is enabled.

Enabling Ext_fancy_lists will also make Pandoc differentiate between the
delimiters of ordered lists (periods or closing parentheses). Org does
this differentiation by default when exporting to some formats (e.g.
plain text) but does not in others (e.g. html and latex), so I decided
to copy Pandoc's markdown reader behaviour.
2022-01-09 09:39:27 -08:00
John MacFarlane
6fffa1ac78 Change stretch to r-stretch in manual for reveal.js. 2022-01-06 11:41:05 -08:00
Martin Fischer
73e429dccb MANUAL.txt: clarify "standard Markdown" as "original Markdown"
"standard Markdown" might be confused with CommonMark.

Closes #7802.
2022-01-05 13:07:54 -08:00
Albert Krewinkel
b7a44f9d19 Copyright notices: update for 2022 2022-01-02 11:59:22 -08:00
John MacFarlane
7a9832166e Add text wrapping to HTML output.
Previously the HTML writer was exceptional in not being
sensitive to the `--wrap` option.  With this change `--wrap`
now works for HTML. The default (as with other formats) is
automatic wrapping to 72 columns.

A new internal module, T.P.Writers.Blaze, exports `layoutMarkup`.
This converts a blaze Html structure into a doclayout Doc Text.

In addition, we now add a line break between an `img` tag
and the associated `figcaption`.

Note: Output is never wrapped in `writeHtmlStringForEPUB`.
This accords with previous behavior since previously the HTML
writer was insensitive to `--wrap` settings.  There's no real
need to wrap HTML inside a zipped container.

Note that the contents of script, textarea, and pre tags are
always laid out with the `flush` combinator, so that unwanted
spaces won't be introduced if these occur in an indented context
in a template.

Closes #7764.
2021-12-22 09:45:02 -08:00
binaarinen
0610f16f7f
Add a writer for Markua 0.10 (#7729)
Markua is a markdown variant used by Leanpub.
More information about Markua can be found at https://leanpub.com/markua/read.

Adds a new exported function `writeMarkua` from T.P.Writers.Markdown.
[API change]

Closes #1871.

Co-authored by Tim Wisotzki and Samuel Lemmenmeier.
2021-12-19 12:10:41 -08:00
John MacFarlane
426342f00d Fix typo. Closes jgm/pandoc-website#54. 2021-11-30 08:25:15 -08:00
John MacFarlane
79e6f8db13 Improve detection of pipe table line widths.
Fixed calculation of maximum column widths in pipe tables.
It is now based on the length of the markdown line, rather
than a "stringified" version of the parsed line.  This should
be more predictable for users. In addition, we take into account
double-wide characters such as emojis.

Closes #7713.
2021-11-23 13:29:25 -08:00
John MacFarlane
4857cd1769 Update man page. 2021-11-20 23:19:22 -08:00
John MacFarlane
946b959751 Fix misspelled extension name in manual.
`short_subsuperscript` -> `short_subsuperscripts`.
Closes #7690.
2021-11-14 20:55:39 -08:00
John MacFarlane
881b45209e Replace old sample custom reader with a full-featured reader for creole.
This is better as an example.  And it is faster than pandoc's
regular creole parser, which shows that high-performance readers
can be developed this way.
2021-11-07 14:34:56 -08:00
John MacFarlane
213913f025 Pass ReaderOptions to custom readers as second parameter. 2021-11-06 16:47:13 -07:00
John MacFarlane
ee2f0021f9
Add interface for custom readers written in Lua. (#7671)
New module Text.Pandoc.Readers.Custom, exporting
readCustom [API change].

Users can now do `-f myreader.lua` and pandoc will treat the
script myreader.lua as a custom reader, which parses an input
string to a pandoc AST, using the pandoc module defined for
Lua filters.

A sample custom reader can be found in data/reader.lua.

Closes #7669.
2021-11-05 22:10:29 -07:00
Albert Krewinkel
5750f60442
MANUAL.txt: update table of exit codes and corresponding errors 2021-11-05 13:21:24 +01:00
John MacFarlane
d1789dda75 Bump to 2.16.1, update changelog. 2021-11-02 16:16:21 -07:00
John MacFarlane
40655b54a2 Bump to 2.16, update changelog. 2021-10-31 00:01:03 -07:00
John MacFarlane
51e1a8601f Bump to 2.15, updaet man page. 2021-10-22 22:15:37 -07:00
nuew
021cdb543b epub: Add EPUB3 subject metadata (authority/term)
This adds the ability to specify EPUB 3 `authority` and `term` specific
refinements to the `subject` tag. Specifying a plain `subject` tag in
metadata will function as before.
2021-09-30 20:53:07 -07:00
John MacFarlane
45db998b39 EPUB writer: treat epub:type "frontispiece" as front matter.
This allows you to include a frontispiece using

```

![](yourimage.jpg)

etc.
```

Closes #7600.
2021-09-29 08:29:14 -07:00
John MacFarlane
9b23b738cb Update documentation for definition_list extension.
In 2015, we relaxed indentation requirements for the first
line of a definition (see commit d3544dc and issue #2087), but
the documnentation wasn't updated to reflect the change.

Closes #7594.
2021-09-26 21:20:27 -07:00
John MacFarlane
dd7b83ac91 Use babel, not polyglossia, with xelatex.
Previously polyglossia worked better with xelatex, but
that is no longer the case, so we simplify the code so that
babel is used with all latex engines.

This involves a change to the default LaTeX template.
2021-09-19 09:40:59 -07:00
Christophe Dervieux
44ec800b07 mention revealjs support of title-toc in MANUAL
Following addition in #7171
2021-09-17 09:21:39 -07:00
Emily Bourke
7c22c0202e pptx: Support specifying slide background images
In the reveal-js output, it’s possible to use reveal’s
`data-background-image` class on a slide’s title to specify a background
image for the slide.

With this commit, it’s possible to use `background-image` in the same
way for pptx output. Only the “stretch” mode is supported, and the
background image is centred around the slide in the image’s larger axis,
matching the observed default behaviour of PowerPoint.

- Support `background-image` per slide.
- Add tests.
- Update manual.
2021-09-16 19:45:53 -07:00
Emily Bourke
0fb6474a55 pptx: Add support for incremental lists
- Support -i option
- Support incremental/noincremental divs
- Support older block quote syntax
- Add tests

One thing not clear from the manual is what should happen when the input
uses a combination of these things. For example, what should the
following produce?

```md
::: {.incremental .nonincremental}
- are
- these
- incremental?
:::

::: incremental
::::: nonincremental
- or
- these?
:::::
:::

::: nonincremental
> - how
> - about
> - these?
:::
```

In this commit I’ve taken the following approach, matching the observed
behaviour for beamer and reveal.js output:

- if a div with both classes, incremental wins
- the innermost incremental/nonincremental div is the one which takes
  effect
- a block quote containing a list as its first element inverts whether
  the list is incremental, whether or not the quote is inside an
  incremental/non-incremental div

I’ve added some tests to verify this behaviour.

This commit closes issue #5689
(https://github.com/jgm/pandoc/issues/5689).
2021-09-15 09:13:05 -07:00
John MacFarlane
d43f9cf414 Add note to Security section that commonmark is better...
than markdown as far as pathological performance goes.
2021-09-12 11:10:05 -07:00
John MacFarlane
12b3ee3787 MANUAL: Document formats affected by --reference-location. 2021-09-10 09:32:51 -07:00