aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2020-12-07Docbook writer: Use correct id attribute consistentlyJan Tojnar1-10/+16
DocBook5 should always use xml:id instead of id so let’s use it everywhere.
2020-12-07Docbook writer: handle admonitionsJan Tojnar1-12/+30
Similarly to https://github.com/jgm/pandoc/commit/d6fdfe6f2bba2a8ed25d6c9f11861774001f7a91, we should handle admonitions.
2020-12-05Org reader: preserve targets of spurious linksAlbert Krewinkel1-5/+4
Links with (internal) targets that the reader doesn't know about are converted into emphasized text. Information on the link target is now preserved by wrapping the text in a Span of class `spurious-link`, with an attribute `target` set to the link's original target. This allows to recover and fix broken or unknown links with filters. See: #6916
2020-12-05OpenDocument writer: Allow references for internal links (#6774)Nils Carlson2-18/+77
This commit adds two extensions to the OpenDocument writer, `xrefs_name` and `xrefs_number`. Links to headings, figures and tables inside the document are substituted with cross-references that will use the name or caption of the referenced item for `xrefs_name` or the number for `xrefs_number`. For the `xrefs_number` to be useful heading numbers must be enabled in the generated document and table and figure captions must be enabled using for example the `native_numbering` extension. In order for numbers and reference text to be updated the generated document must be refreshed. Co-authored-by: Nils Carlson <nils.carlson@ludd.ltu.se>
2020-12-05LaTeX reader: don't apply theorem default styling to a figure inside.John MacFarlane1-0/+1
If we put an image in italics, then when rendering to Markdown we no longer get an implicit figure. Closes #6925.
2020-12-04Docbook writer: add XML namespaces to top-level elements (#6923)Jan Tojnar1-8/+20
Previously, we only added xmlns attributes to chapter elements, even when running with --top-level-division=section. Let’s add the namespaces to part and section elements too, when they are the selected top-level divisions. We do not need to add namespaces to documents produced with --standalone flag, since those will already have xmlns attribute on the root element in the template.
2020-12-04Markdown writer: ensure that a new csl-block begins on a new line.John MacFarlane1-1/+6
This just looks better and doesn't affect the semantics. See #6921.
2020-12-04LaTeX writer: Fix bug with nested csl- display Spans.John MacFarlane1-36/+32
See #6921.
2020-12-04HTML writer: Fix handling of nested csl- display spans.John MacFarlane1-20/+12
Previously inner Spans used to represent CSL display attributes were not rendered as div tags. See #6921.
2020-12-03EPUB writer: include title page in landmarks.John MacFarlane1-2/+7
Closes #6919. Note that the toc is also included if `--toc` is specified.
2020-12-03EPUB writer: add frontmatter type on body element for nav.xhtml.John MacFarlane1-1/+3
Closes #6918.
2020-12-03Docx writer: Support bold and italic in "complex script."John MacFarlane1-2/+6
Previously bold and italics didn't work properly in LTR text. This commit causes the w:bCs and w:iCs attributes to be used, in addition to w:b and w:i, for bold and italics respectively. Closes #6911.
2020-12-02Citeproc: ensure that BCP47 lang codes can be used.John MacFarlane1-2/+17
We ignore the variants and just use the base lang code and country code when passing off to citeproc.
2020-11-29LaTeX reader: don't parse `\rule` with width 0 as horizontal rule.John MacFarlane1-1/+11
2020-11-28Fix a tiny Typo in the CSV reader moduleTassos Manganaris1-1/+1
Header comment in the CSV reader module says "RST" instead of "CSV".
2020-11-27HTML reader tests: improve test coverage of new featuresAlbert Krewinkel1-1/+2
2020-11-27HTML reader: support body headers, row head columnsAlbert Krewinkel1-41/+61
Closes: #6312
2020-11-26Added some explicit imports.John MacFarlane1-3/+3
2020-11-26Docx writer: Fix bullets/lists indentationcholonam1-3/+3
Fix appearance of bullets/numbered lists (the first level is slightly indented to the right instead of right on the margin). New golden files have been tested using Word 2010 on Windows 10.
2020-11-26LaTeX reader: preserve center environment (#6852)Igor Pashev1-1/+1
The contents of the `center` environment are put in a `Div` with class `center`.
2020-11-26HTML reader: improve support for table headers, footer, attributesAlbert Krewinkel4-118/+244
- `<tfoot>` elements are no longer added to the table body but used as table footer. - Separate `<tbody>` elements are no longer combined into one. - Attributes on `<thead>`, `<tbody>`, `<th>`/`<td>`, and `<tfoot>` elements are preserved.
2020-11-26HTML reader: allow finer grained options for tag omissionAlbert Krewinkel3-13/+26
2020-11-25LaTeX writer: improve longtable output.John MacFarlane1-40/+60
- Don't create minipages for regular paragraphs. - Put width and alignment information in the longtable column descriptors. - Closes #6883.
2020-11-25LaTeX tables: Fix calculation of column spacing.John MacFarlane1-1/+1
See #6883.
2020-11-25Fix truncation of `[Citation]` list in `Cite` inside footnotes...John MacFarlane1-2/+2
This affected author-in-text citations in footnotes. It didn't cause problems for the printed output, but for filters that expected the citation id and other information. Closes #6890.
2020-11-25HTML reader: simplify list attribute handlingAlbert Krewinkel2-27/+12
This removes the `foldOrElse` function from the internal Text.Pandoc.CSS module.
2020-11-24HTML reader: support row or column-spanning table cellsAlbert Krewinkel2-28/+26
2020-11-24HTML reader: support blocks in captionAlbert Krewinkel2-6/+6
2020-11-24HTML reader: extract table parsing into separate moduleAlbert Krewinkel3-95/+140
2020-11-23ImageSize: default to DPI 72 if the format specifies DPI of 0.John MacFarlane1-1/+7
This shouldn't happen, in general, but it can happen with JPEGs that don't conform to the spec. Having a DPI of 0 will blow up size calculations (division by 0). Closes #6880.
2020-11-23HTML reader: extract submodulesAlbert Krewinkel4-239/+342
Reducing module size should reduce memory use during compilation. This is preparatory work to tackle support for more table features.
2020-11-22OpenDocument Writer: Implement Div and Span ident support (#6755)Nils Carlson1-10/+33
Spans and Divs containing an ident in the Attr will become bookmarks or sections with idents in OpenDocument format.
2020-11-22LaTeX writer: Improve table spacing.John MacFarlane1-2/+2
+ Remove the `\strut` that was added at the end of minipage environments in cells. + Replace `\tabularnewline` with `\\ \addlinespace`. Closes #6842, closes #6860.
2020-11-22Org reader: parse `#+LANGUAGE` into `lang` metadata fieldAlbert Krewinkel1-0/+2
Fixes: #6845
2020-11-21OpenDocument writer: Table text width support (#6792)Nils Carlson1-4/+10
Support for table width as a percentage of text width by summing width of columns and verifying that the sum is > 0 and <= 1.
2020-11-21LaTeX reader: more robust parsing of bracketed options.John MacFarlane1-3/+8
Improves on 9a40976. Closes #6873.
2020-11-21Citeproc BibTeX parser: revert change in getRawField...John MacFarlane1-6/+5
which was made (for reasons forgotten) when transferring this code from pandoc-citeproc. The change led to `--` in URLs being interpreted as en-dashes, which is unwanted. Closes #6874.
2020-11-20DocBook reader: Table text width support (#6791)Nils Carlson1-2/+12
Table width in relation to text width is not natively supported by docbook but is by the docbook fo stylesheets through an XML processing instruction, <?dbfo table-width="50%"?> . Implement support for this instruction in the DocBook reader.
2020-11-20Improve LaTeX option parsing...John MacFarlane1-1/+3
in cases where we run into trouble parsing inlines til the closing `]`, e.g. quotes, we return a plain string with the option contents. Previously we mistakenly included the brackets in this string. Closes #6869.
2020-11-20`commonmark_x`: replace `auto_identifiers` with `gfm_auto_identifiers`.John MacFarlane1-3/+4
`commonmark_x` never actually supported `auto_identifiers` (it didn't do anything), because the underlying library implements gfm-style identifiers only. Attempts to add the `autolink_identifiers` extension to `commonmark` will now fail with an error. Closes #6863.
2020-11-19JATS writer: support advanced table featuresAlbert Krewinkel2-50/+217
2020-11-19--self-contained: increase coverage.John MacFarlane1-4/+11
Previously we only self-contained attributes for certain tag names (`img`, `embed`, `video`, `input`, `audio`, `source`, `track`, `section`). Now we self-contain any occurrence of `src`, `data-src`, `poster`, or `data-background-image`, on any tag; and also `href` on `link` tags. Closes #6854 (which specifically asked about `asciinema-player` tags).
2020-11-19DocBook reader: drop period in formalpara title...John MacFarlane1-2/+2
...and put it in a div with class `formalpara-title`, so that people can reformat with filters. Closes #6562. Thanks to rdmuller.
2020-11-18Man reader: improve handling of .IP.John MacFarlane1-5/+19
We now better handle `.IP` when it is used with non-bullet, non-numbered lists, creating a definition list. We also skip blank lines like groff itself. Closes #6858.
2020-11-18JATS writer: wrap all tablesAlbert Krewinkel1-6/+7
All `<table>` elements are put inside `<table-wrap>` elements, as the former are not valid as immediate child elements of `<body>`.
2020-11-18Replace org #+KEYWORDS with #+keywordsTEC2-27/+27
As of ~2 years ago, lower case keywords became the standard (though they are handled case insensitive, as always): https://code.orgmode.org/bzg/org-mode/commit/13424336a6f30c50952d291e7a82906c1210daf0 Upper case keywords are exclusive to the manual: - https://orgmode.org/list/871s50zn6p.fsf@nicolasgoaziou.fr/ - https://orgmode.org/list/87tuuw3n15.fsf@nicolasgoaziou.fr/
2020-11-18Update org supported languages and identifiersTEC1-7/+11
according to the current list contained in https://orgmode.org/worg/org-contrib/babel/languages/index.html
2020-11-17Bibtex reader: fall back on en-US if locale for LANG not found.John MacFarlane1-1/+4
This reproduces earlier pandoc-citeproc behavior. Closes jgm/citeproc#26.
2020-11-17Markdown reader: fix regression with example list references.John MacFarlane2-2/+10
This affects example list references followed by dashes. Introduced by commit b8d17f7. Closes #6855.
2020-11-17JATS writer: move Table handling to separate moduleAlbert Krewinkel3-68/+144
This makes it easier to split the module into smaller parts.