summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-03-07Remove `raw_tex` extension from list of commonmark...John MacFarlane
extensions, and from the `commonmark_x` defaults. commonmark doesn't parse raw TeX, and it doesn't make sense to write it if we don't parse it.
2022-03-04Org reader: handle `#+bibliography:` as metadata...John MacFarlane
so that it can work with citeproc.
2022-02-28DocBook reader: handle address and coyright in metadata.John MacFarlane
See #7747.
2022-02-28DocBook reader: improve info parsing.John MacFarlane
Simplify metadata parsing code. Handle abstract as block-level content. Report skipped info elements with `--verbose`. See #7747.
2022-02-28DocBook reader: handle abstract in info section.John MacFarlane
See #7747.
2022-02-27LaTeX reader: rudimentary support for vbox.John MacFarlane
Closes #7939.
2022-02-26Markdown writer: don't produce redundant header identifier...John MacFarlane
when the `gfm_auto_identifiers` extension is set. Closes #7941.
2022-02-24DocBook reader: handle complete set of entities...John MacFarlane
as specified at <https://www.w3.org/2003/entities/2007doc/byalpha.html>. Closes #7938.
2022-02-24Text.Pandoc.XML.Light: add versions of the parsers...John MacFarlane
that allow specifying a custom entity map. Exports new functions `parseXMLElementWithEntities`, `parseXMLContentsWithEntities` [API change].
2022-02-23Ensure that valid XML identifiers are used in...John MacFarlane
Docbook, EPUB, FB2, HTML4, S5, Slidy, Slideous, ICML, ODT, TEI writers. Thus, if you convert `[anchor]{#1} and [link to](#1)`, `id_1` will be used instead of `1` for the identifier.
2022-02-23T.P.Writers.Shared: export ensureValidXmlIdentifiers.John MacFarlane
This function changes identifiers that don't start with letters, and internal links to these identifiers, making them compatible with XML standards. The change is simple: we add `id_` to the front. There is potential for duplication if there are already `id_...` identifiers defined, but this seems rare enough not to worry too much about.
2022-02-23Markdown reader: remove restriction on identifiers...John MacFarlane
so they no longer need to begin with a letter. Closes #7920.
2022-02-23Remove trailing whitespace in Writers.Markdown.Albert Krewinkel
2022-02-22`--version`: print hslua version.John MacFarlane
This will help us determine which version of Lua pandoc is compiled against. See #7929.
2022-02-22Add scrreport to the latex writer chaptersClasses. Fixed #6168 (#7935)ivardb
If scrreport is now chosen as the latex documentclass chapters will be used instead of sections. This behaviour is intended as scrreport is an alias for scrreprt which already created chapters
2022-02-22LaTeX writer: avoid extra space before `\CSLRightInline`.John MacFarlane
Closes #7932.
2022-02-22Fix typos (#7934)Dimitris Apostolou
2022-02-21Org reader: More flexible LaTeX environmentsLucas V. R
Looking at the definition of `org-element-latex-environment-parser`, one sees that Org allows arbitrary arguments to LaTeX environments. In fact, it parses every char just after `\begin{xxx}` until `\end{xxx}` as content for the environment, so all the following examples are valid environments: ```org \begin{equation} e = mc^2 \end{equations} ``` ```org \begin{tikzcd}[ampersand replacement=\&] A \& B \\ C \& D \arrow[from=1-1, to=1-2] \arrow["f", from=2-1, to=2-2] \end{tikzcd} ```
2022-02-19LaTeX reader: Handle `\label` and `\ref` for footnotes.John MacFarlane
Closes #7930.
2022-02-19Relax upper bound for hslua, allow hslua-2.2. (#7929)Albert Krewinkel
Lua 5.4 is used by default after this is merged. Packagers may still include Lua 5.3 instead by building pandoc with `--constraint='hslua <2.2'`. Differences between 5.3 and 5.4 should not generally affect pandoc Lua filters. See list of incompatible changes here <https://www.lua.org/manual/5.4/manual.html#8.1>
2022-02-18Ipynb writer: handle metadata better.John MacFarlane
Previously we used the markdown writer to render metadata. This had some undesirable consequences (e.g. en dash expanded to `--` when `smart` enabled), so now we use the plain writer. This addresses #7928, but I think a more elegant fix is possible.
2022-02-18Change `--metadata-file` parsing...John MacFarlane
...so that, when the input format is not markdown or a markdown variant, pandoc's markdown is used. When the input format is a markdown variant, the same format is used. Reason for the change: it doesn't make sense to run the markdown parser with a set of extensions designed for a non-markdown format, and this dramatically limits what people can do in metadata files. Refines #6832. Closes #7926. Perhaps this can be reconsidered if we come up with a way of specifying an arbitrary format for the metadata file (#5914).
2022-02-13Markdown reader: allow one-column pipe tables with pipe on right.John MacFarlane
See #7919. We still need to implement this for gfm (commonmark). This must be done via changes in commonmark-hs.
2022-02-13Ensure that you don't get PDF output to terminal.John MacFarlane
`-t pdf` should behave like `-t docx` and give an error unless the output is redirected.
2022-02-12JATS reader: improve handling of fn-group elements (#7914)Albert Krewinkel
Footnotes in `<fn-group>` elements are collected and re-inserted into the document as proper footnotes in the place where they are referenced. Fixes: #6348
2022-02-11Put id attributes on TOC entries #7907 (#7913)damon-sava-stanley
Naming scheme of id is "toc-" + id of linked to header/section. In Shared, will effect HTML, Markdown, Powerpoint, and RTF.
2022-02-11RST reader: fix treatment of headerless simple tables.John MacFarlane
We were producing a header with blank cells rather than no header. Closes #7902.
2022-02-11Clean up import list.John MacFarlane
2022-02-11Add DokuWiki table alignment for #5202 (#7908)damon-sava-stanley
Closes #5202. Within each cell, determine the cell alignment as per https://www.dokuwiki.org/wiki:syntax#tables. The current approach, as per the issue treats the first row's alignment as determining that of the entire column. Given this, it wastes some work in determining an alignment for every cell.
2022-02-10--self-contained: issue warning rather than failing...John MacFarlane
with an error, if a resource can't be found. Closes #7904.
2022-02-10LaTeX reader: support `\today`.John MacFarlane
Closes #7905.
2022-02-09Fix parsing of epub footnotes.John MacFarlane
Closes #7884.
2022-02-09PDF: allow custom writer as format if engine is explicitly specified (#7901)Albert Krewinkel
Closes #7898. Note that it may be necessary to explicitly specify a template on the command line.
2022-02-09Docx: single numbering ID for examples - fixes #7895 (#7900)mjfs
This change ensures that example list items all belong to a single number sequence, so that if items are added or deleted in a word processor, the other items will renumber automatically.
2022-02-07HTML reader: give warnings and emit empty note...John MacFarlane
when parsing `<a epub:type="noteref">` and the identifier doesn't correspond to anything in the note table. Previously we just silently skipped these cases. See #7884.
2022-02-07Custom writer: produce stacktrace if Writer function failsAlbert Krewinkel
2022-02-06Custom writer: support new-style Writer function.Albert Krewinkel
2022-02-06Lua: move custom writer code into Lua hierarchy.Albert Krewinkel
2022-02-06Lua: add module `pandoc.layout` to format and layout textAlbert Krewinkel
2022-02-06Org reader: allow comments above property drawerLucas V. R
The Org Manual page at https://orgmode.org/manual/Property-Syntax.html says (as of 2022-02-03): "Property blocks defined before first headline needs to be located at the top of the buffer, allowing only comments above." This commit allows comments above.
2022-02-06Org reader: allow ":" in property drawer keysLucas V. R
Any non-space character is allowed as property drawer key, including ":" itself (so it is not really a delimiter). The real delimiter is a space character, so in a drawer like :PROPERTIES: ::k:ey:: value :END: ":k:ey:" is a key with value "value". This usage can be seen in the Org Manual at https://orgmode.org/manual/Using-Header-Arguments.html, where the Org snippet * Heading :PROPERTIES: :header-args:clojure: :session *clojure-1* :header-args:R: :session *R* :END: is listed as an example.
2022-02-06Docbook writer: Interpret links without contents as cross-references (#7360)Jan Tojnar
Links without text contents are converted to `<xref>` elements. DocBook processors will generate appropriate cross-reference text when presented with an xref element.
2022-02-05Allow use of a RIS bibliography with citeproc.John MacFarlane
2022-02-05RIS reader: support ID and DO fields.John MacFarlane
2022-02-05Add RIS bibliography format reader.John MacFarlane
New module, Text.Pandoc.Readers.RIS, exporting readRIS. New input format `ris`. Closes #7894.
2022-02-05Lua: set module name before pushingAlbert Krewinkel
Using the correct module name is relevant when auto-generating documentation.
2022-02-04EndNote reader: add nocite as the other bib format readers do.John MacFarlane
2022-02-04Docx zotero/mendeley/endnote: add comma before locator in suffix.John MacFarlane
2022-02-04Support Prefix, Suffix, Pages in endnote ADDINs.John MacFarlane
2022-02-04Got endnote citations working in docx...John MacFarlane
Still to do: prefix, suffix, locator.