aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-12-07Docbook writer: handle admonitionsJan Tojnar2-12/+82
Similarly to https://github.com/jgm/pandoc/commit/d6fdfe6f2bba2a8ed25d6c9f11861774001f7a91, we should handle admonitions.
2020-12-05Org reader: preserve targets of spurious linksAlbert Krewinkel2-7/+8
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 Carlson4-18/+177
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 MacFarlane2-0/+35
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 MacFarlane2-3/+10
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 MacFarlane2-3/+9
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 MacFarlane4-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-02Add translations zh-Hans.yaml and zh-Hant.yaml Kolen Cheung2-0/+44
Closes #6904, closes #6909. Co-authored-by: taotieren <admin@taotieren.com>
2020-12-02filters.md: document a new Pandoc filtering framework (#6908)Randolf J1-6/+9
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-30Use a more recent stack resolver.John MacFarlane1-5/+1
2020-11-30Use doctemplates 0.8.3.John MacFarlane1-1/+1
Fixes issues with nested for loops in templates.
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 Krewinkel3-1/+187
2020-11-27CONTRIBUTING: add section "How can I help?" (#6892)Albert Krewinkel1-5/+68
Also adds a paragraph aimed at highlighting the importance of feature maintenance.
2020-11-27EPUB: use preserveAspectRatio="xMidYMid" for cover image (#6895)Shin Sang-jae2-2/+2
This change affects both the epub2 and the epub3 templates. It avoids distortion of the cover image by requiring that the aspect ratio be preserved.
2020-11-27HTML reader: support body headers, row head columnsAlbert Krewinkel3-65/+84
Closes: #6312
2020-11-26Added some explicit imports.John MacFarlane1-3/+3
2020-11-26Add hie.yaml generated by implicit-cradle.John MacFarlane1-0/+37
2020-11-26Docx writer: Fix bullets/lists indentationcholonam32-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 Pashev3-14/+40
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 Krewinkel5-140/+268
- `<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-25Fix pre-commit hook so it doesn't catch .latex+lhs extensions.John MacFarlane1-1/+1
2020-11-25latex template: put back amssymbJohn MacFarlane5-11/+5
We need it for checkboxes in todo lists, and maybe for other things. In this location it seems compatible with the cases that propmted #6469 and PR #6762.
2020-11-25Update tests for LaTeX table changes.John MacFarlane2-121/+38
2020-11-25LaTeX writer: improve longtable output.John MacFarlane2-41/+61
- 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 MacFarlane2-37/+37
See #6883.
2020-11-25Fix truncation of `[Citation]` list in `Cite` inside footnotes...John MacFarlane2-2/+38
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-25latex template: disable language-specific shorthands in babel.John MacFarlane2-2/+8
Babel defines "shorthands" for some languages, and these can produce unexpected results. For example, in Spanish, `1.22` gets rendered as `122`, and `et~al.` as `etal`. One would think that babel's `shorthands=off` option (which we were using) would disable these, but it doesn't. So we remove `shorthands=off` and add some code that redefines the shorthands macro. Eventually this will be fixed in babel, I hope, and we can revert to something simpler. Closes #6817, closes #6887.
2020-11-24test/tables/*.native: normalized (#6888)Kolen Cheung3-177/+324
The 3 native table test cases are normalized so that it will looks exactly like it is written by some pandoc writers. Note that apart from white space normalization, it includes other normalization such as `[Str "Nordic countries"] to [Str "Nordic",Space,Str "countries"]`.
2020-11-24Use skylighting 0.10.1.John MacFarlane2-4/+4
2020-11-24HTML reader tests: disable round-trip testing for tablesAlbert Krewinkel1-11/+3
Information for cell alignment in a column is not preserved during round-trips.
2020-11-24HTML reader: support row or column-spanning table cellsAlbert Krewinkel3-38/+36
2020-11-24HTML reader: support blocks in captionAlbert Krewinkel2-6/+6
2020-11-24HTML reader: extract table parsing into separate moduleAlbert Krewinkel4-95/+141
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-23JATS template: allow array of persistent institute ids in `pid`Albert Krewinkel2-0/+10
2020-11-23HTML reader: extract submodulesAlbert Krewinkel5-239/+345
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 Carlson2-10/+44
Spans and Divs containing an ident in the Attr will become bookmarks or sections with idents in OpenDocument format.
2020-11-22Use dev version of citeproc.John MacFarlane2-5/+8
2020-11-22LaTeX writer: Improve table spacing.John MacFarlane4-73/+73
+ 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 Krewinkel3-1/+10
Fixes: #6845
2020-11-21OpenDocument writer: Table text width support (#6792)Nils Carlson2-4/+76
Support for table width as a percentage of text width by summing width of columns and verifying that the sum is > 0 and <= 1.