aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
2020-12-20LaTeX writer: support colspans and rowspans in tables. (#6950)Albert Krewinkel4-96/+236
Note that the multirow package is needed for rowspans. It is included in the latex template under a variable, so that it won't be used unless needed for a table.
2020-12-15Properly handle boolean values in writing YAML metadata.John MacFarlane2-2/+3
(Markdown writer.) This requires doctemplates >= 0.9. Closes #6388.
2020-12-13RST writer: better image handling.John MacFarlane1-9/+21
- An image alone in its paragraph (but not a figure) is now rendered as an independent image, with an `alt` attribute if a description is supplied. - An inline image that is not alone in its paragraph will be rendered, as before, using a substitution. Such an image cannot have a "center", "left", or "right" alignment, so the classes `align-center`, `align-left`, or `align-right` are ignored. However, `align-top`, `align-middle`, `align-bottom` will generate a corresponding `align` attribute. Closes #6948.
2020-12-13Docx writer: keep raw openxml strings verbatim.Albert Krewinkel1-2/+5
Closes: #6933
2020-12-13Docx writer: use Content instead of Element.Albert Krewinkel1-59/+75
2020-12-12Merge pull request #6946 from mb21/icml-image-fitJohn MacFarlane1-1/+6
ICML writer: fix image bounding box for custom widths/heights
2020-12-12LaTeX writer: extract table handling into separate module.Albert Krewinkel5-237/+355
2020-12-12ICML writer: fix image bounding box for custom widths/heightsmb211-1/+6
fixes #6936
2020-12-07Merge pull request #6922 from jtojnar/db-writer-admonitionsJohn MacFarlane1-19/+45
Docbook writer: handle admonitions
2020-12-07Docbook writer: Handle admonition titles from Markdown readerJan Tojnar1-0/+2
Docbook reader produces a `Div` with `title` class for `<title>` element within an “admonition” element. Markdown writer then turns this into a fenced div with `title` class attribute. Since fenced divs are block elements, their content is recognized as a paragraph by the Markdown reader. This is an issue for Docbook writer because it would produce an invalid DocBook document from such AST – the `<title>` element can only contain “inline” elements. Let’s handle this invalid special case separately by unwrapping the paragraph before creating the `<title>` element.
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-05OpenDocument writer: Allow references for internal links (#6774)Nils Carlson1-18/+73
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-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-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-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-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-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-19JATS writer: support advanced table featuresAlbert Krewinkel2-50/+217
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 #+keywordsTEC1-16/+16
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-17JATS writer: move Table handling to separate moduleAlbert Krewinkel3-68/+144
This makes it easier to split the module into smaller parts.
2020-11-14Markdown writer: default to using ATX headings.Aner Lucero1-1/+6
Previously we used Setext (underlined) headings by default. The default is now ATX (`##` style). * Add the `--markdown-headings=atx|setext` option. * Deprecate `--atx-headers`. * Add constructor 'ATXHeadingInLHS` constructor to `LogMessage` [API change]. * Support `markdown-headings` in defaults files. * Document new options in MANUAL. Closes #6662.
2020-11-07Hlint suggestions.John MacFarlane1-2/+3
2020-11-07Lint code in PRs and when committing to master (#6790)Albert Krewinkel8-15/+16
* Remove unused LANGUAGE pragmata * Apply HLint suggestions * Configure HLint to ignore some warnings * Lint code when committing to master
2020-11-06Support nocase spansn for csljson outputJohn MacFarlane1-0/+1
2020-11-04DokuWiki writer: translate language names for code elements...John MacFarlane1-14/+24
...and improve whitespace. Closes #6807.
2020-11-04MediaWiki writer: use syntaxhighlight tag...John MacFarlane1-2/+9
instead of deprecated source, for highlighted code. Also support `startFrom` attribute and `numberLines`. Closes #6810.
2020-10-30Fix duplicate "class" attribute in HTML writerAndy Morris1-2/+4
2020-10-29LaTeX writer: Improved calculation of table column widths.John MacFarlane1-10/+12
We now have LaTeX do the calculation, using `\tabcolsep`. So we should now have accurate relative column widths no matter what the text width. The default template has been modified to load the calc package if tables are used.
2020-10-23Commonmark writer: fix regression with fenced divs.John MacFarlane1-1/+3
Starting with 2.10.1, fenced divs no longer render with HTML div tags in commonmark output. This is a regression due to our transition from cmark-gfm. This commit fixes it. Closes #6768.
2020-10-14Modify fix to #6742 to use stringToLaTeX.John MacFarlane1-3/+5
2020-10-13LaTeX writer: escape option values in lstlistings environment.John MacFarlane1-1/+2
Closes #6742.
2020-10-12LaTeX writer: fix handling of pt-BR.John MacFarlane1-3/+2
For polyglossia we now use `\setmainlanguage[variant=brazilian]{portuguese}` and for babel `\usepackage[shorthands=off,main=brazilian]{babel}`. Closes #2953.
2020-10-12Markdown writer: Fix autolinks rendering for gfm.John MacFarlane1-24/+23
Previously, autolinks rendered as raw HTML, due to the `class="uri"` added by pandoc's markdown reader. Closes #6740.
2020-10-08Be less aggressive about using quotes for YAML values.John MacFarlane1-4/+11
We need quotes if `[` or `{` or `'` is at the beginning of the line, but not otherwise.
2020-10-07Use double quotes for YAML metadata.John MacFarlane1-2/+2
Closes #6727.
2020-10-07Use latest citeproc.John MacFarlane1-3/+1
Better solution to the problem of entities in CSL JSON output.
2020-10-06Unescape entities in writing CSL JSON.John MacFarlane1-2/+5
The renderCslJson function escapes `<`, `>`, and `&` as entities. This is appropriate when generating HTML, but in CSL JSON these are supposed to appear unescaped. Closes jgm/citeproc#17.
2020-10-06DOCX reader: Allow empty dates in comments and tracked changes (#6726)Diego Balseiro1-11/+7
For security reasons, some legal firms delete the date from comments and tracked changes. * Make date optional (Maybe) in tracked changes and comments datatypes * Add tests
2020-10-05Removed the idpred from metaValueToReference.John MacFarlane1-1/+1
This isn't really necessary; we do filtering at other points now.