aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
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.
2020-10-05Add filtering to metaValueToReference, and check other-ids field too.John MacFarlane1-1/+2
2020-10-02Docx writer: better handle list items whose contents are lists (#6522)Michael Hoffmann1-3/+13
If the first element of a bulleted or ordered list is another list, then that first item will disappear if the target format is docx. This changes the docx writer so that it prepends an empty string for those cases. With this, no items will disappear. Closes #5948.
2020-10-01Syntax highlight for inline code of OpenDocument (#6711)niszet1-3/+18
To implement Syntax highlighting for OpenDocument, inlineToOpenDocument in OpenDocument Writer is updated based on Docx Writer. This commit is only for inline Code because update of CodeBlock needs structual change of output document. Currently, styles are not generated automatically in styles.xml. To implement it, additional commit for ODT Writer is needed. Although styles are not included in styles.xml, output file can be shown in LibreOffice(7.0.0.3) like normal characters.
2020-09-27OpenDocument Writer: Implement table cell alignment (#6700)Nils Carlson1-5/+33
Co-authored-by: Mauro Bieg <mb21@users.noreply.github.com>
2020-09-24OpenDocument writer: New table cell support with row and column spans (#6682)Nils Carlson1-26/+56
Unit tests only verify column spans at this point. Co-authored-by: Nils Carlson <nils.carlson@ludd.ltu.se>
2020-09-24Support toc-depth option for ODT writer (#6697)niszet1-0/+1
To support `--toc-depth` option for ODT, writer and template are updated. Closes #6696.
2020-09-21Add built-in citation support using new citeproc library.John MacFarlane5-37/+248
This deprecates the use of the external pandoc-citeproc filter; citation processing is now built in to pandoc. * Add dependency on citeproc library. * Add Text.Pandoc.Citeproc module (and some associated unexported modules under Text.Pandoc.Citeproc). Exports `processCitations`. [API change] * Add data files needed for Text.Pandoc.Citeproc: default.csl in the data directory, and a citeproc directory that is just used at compile-time. Note that we've added file-embed as a mandatory rather than a conditional depedency, because of the biblatex localization files. We might eventually want to use readDataFile for this, but it would take some code reorganization. * Text.Pandoc.Loging: Add `CiteprocWarning` to `LogMessage` and use it in `processCitations`. [API change] * Add tests from the pandoc-citeproc package as command tests (including some tests pandoc-citeproc did not pass). * Remove instructions for building pandoc-citeproc from CI and release binary build instructions. We will no longer distribute pandoc-citeproc. * Markdown reader: tweak abbreviation support. Don't insert a nonbreaking space after a potential abbreviation if it comes right before a note or citation. This messes up several things, including citeproc's moving of note citations. * Add `csljson` as and input and output format. This allows pandoc to convert between `csljson` and other bibliography formats, and to generate formatted versions of CSL JSON bibliographies. * Add module Text.Pandoc.Writers.CslJson, exporting `writeCslJson`. [API change] * Add module Text.Pandoc.Readers.CslJson, exporting `readCslJson`. [API change] * Added `bibtex`, `biblatex` as input formats. This allows pandoc to convert between BibLaTeX and BibTeX and other bibliography formats, and to generated formatted versions of BibTeX/BibLaTeX bibliographies. * Add module Text.Pandoc.Readers.BibTeX, exporting `readBibTeX` and `readBibLaTeX`. [API change] * Make "standalone" implicit if output format is a bibliography format. This is needed because pandoc readers for bibliography formats put the bibliographic information in the `references` field of metadata; and unless standalone is specified, metadata gets ignored. (TODO: This needs improvement. We should trigger standalone for the reader when the input format is bibliographic, and for the writer when the output format is markdown.) * Carry over `citationNoteNum` to `citationNoteNumber`. This was just ignored in pandoc-citeproc. * Text.Pandoc.Filter: Add `CiteprocFilter` constructor to Filter. [API change] This runs the processCitations transformation. We need to treat it like a filter so it can be placed in the sequence of filter runs (after some, before others). In FromYAML, this is parsed from `citeproc` or `{type: citeproc}`, so this special filter may be specified either way in a defaults file (or by `citeproc: true`, though this gives no control of positioning relative to other filters). TODO: we need to add something to the manual section on defaults files for this. * Add deprecation warning if `upandoc-citeproc` filter is used. * Add `--citeproc/-C` option to trigger citation processing. This behaves like a filter and will be positioned relative to filters as they appear on the command line. * Rewrote the manual on citatations, adding a dedicated Citations section which also includes some information formerly found in the pandoc-citeproc man page. * Look for CSL styles in the `csl` subdirectory of the pandoc user data directory. This changes the old pandoc-citeproc behavior, which looked in `~/.csl`. Users can simply symlink `~/.csl` to the `csl` subdirectory of their pandoc user data directory if they want the old behavior. * Add support for CSL bibliography entry formatting to LaTeX, HTML, Ms writers. Added CSL-related CSS to styles.html.
2020-09-21Sort YAML metadata keys in Markdown output case-insensitive.John MacFarlane1-2/+2
Use caseFold.
2020-09-19Asciidoctor images (#6671)argent01-26/+41
Support `Asciidoctor`'s block figures. Closes #6538.
2020-09-19Add CSS to default HTML template (#6601)Mauro Bieg1-0/+2
2020-09-15LaTeX writer: fix spacing issue with list in definition list.John MacFarlane1-3/+20
When a list occurs at the beginning of a definition list definition, it can start on the same line as the label, which looks bad. Fix that by starting such lists with an `\item[]`.
2020-09-13HTML writer: support intermediate table headersAlbert Krewinkel1-4/+10
Closes: #6314
2020-09-13HTML writer: support attributes on all table elementsAlbert Krewinkel1-6/+10
Add attributes to tbody and tr elements.
2020-09-13Fix hlint suggestions, update hlint.yaml (#6680)Christian Despres20-126/+115
* Fix hlint suggestions, update hlint.yaml Most suggestions were redundant brackets. Some required LambdaCase. The .hlint.yaml file had a small typo, and didn't ignore camelCase suggestions in certain modules.
2020-09-12HTML writer: render table footers if presentAlbert Krewinkel1-23/+50
Part of: #6314
2020-09-12[API change] Rename Writers.Tables and its contents (#6679)Christian Despres3-311/+320
Writers.Tables is now Writers.AnnotatedTable. All of the types and functions in it have had the "Ann" removed from them. Now it is expected that the module be imported qualified.
2020-09-11Use the original tail instead of deconstructing and reconstructing it (#6678)Joseph C. Sible1-2/+2
2020-09-10Changed default link state to invisible (#6676)Leonard Rosenthol1-1/+1
2020-09-10Support colspans and rowspans in HTML tables (#6644)Albert Krewinkel1-65/+187
* HTML writer: add support for row headers, colspans, rowspans * Add planet table tests See #6312
2020-09-10Implement support for internal document links in ICML (#6606)Leonard Rosenthol1-59/+95
Closes #5541.