aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
2019-12-21HTML writer: more tweaks to avoid round-trip failures...John MacFarlane1-2/+5
having to do with makeSections.
2019-12-21Fix regression with --number-sections.John MacFarlane1-2/+1
Starting with 2.8, `--number-sections` also had the effect of `--section-divs`, even if `--section-divs` was not specified.
2019-12-20Jira writer: use jira-wiki-markup rendererAlbert Krewinkel1-266/+222
Pandoc's AST is translated into the Jira AST, which is then rendered by the dedicated Jira printer. The following improvements are included in this change: - non-jira raw blocks are fully discarded instead of showing as blank lines; - table cells can contain multiple blocks; - unnecessary blank lines are removed from the output; - markup chars within words are properly surrounded by braces; - preserving soft linebreaks via `--wrap=preserve` is supported. Note that backslashes are rendered as HTML entities, as there appears no alternative to produce a plain backslash if it is followed by markup. This may cause problems when used with confluence, where rendering seems to fail in this case. Closes: #5926
2019-12-17Improved --toc generation.John MacFarlane3-9/+5
2019-12-17Improved makeSections so we don't get doubled attributes.John MacFarlane1-1/+2
Closes #5986.
2019-12-07Fix --toc-depth regression in 2.8.John MacFarlane1-3/+3
Closes #5967.
2019-12-05HTML writer: add task-list class to ul if all elements are task list items.John MacFarlane1-1/+10
This will allow styling unordered task lists in a way that omits the bullet.
2019-11-27Remove redundant import.John MacFarlane1-1/+0
2019-11-27LaTeX writer - hlint.John MacFarlane1-29/+24
2019-11-27HTML writer: hlint improvements.John MacFarlane1-25/+22
2019-11-27Removed useless cpp for old versions of blaze.John MacFarlane1-14/+0
2019-11-27Removed unneeded pragma.John MacFarlane1-1/+0
2019-11-25EPUB writer: Fix regression with `--css option.John MacFarlane1-9/+13
Closes #5937.
2019-11-25RST writers: Use grid tables for 1-column tables.John MacFarlane1-1/+1
With simple tables, we have a clash with heading syntax. Closes #5936.
2019-11-22Jira writer: improve escaping of special chars (#5925)Albert Krewinkel1-18/+9
Backslash-escaping is used instead of HTML entities, as escaped characters are easier to read this way. Furthermore, Confluence, which seems to use a subset of Jira markup, seems to get confused by HTML entities.
2019-11-21TEI writer: don't strip hash from internal links.John MacFarlane1-6/+2
Closes #5922.
2019-11-19Improve markdown escaping in list items.John MacFarlane1-27/+25
Closes #5918.
2019-11-16Ms writer: boldface definition terms in DefinitionLists.John MacFarlane1-1/+2
Like LaTeX, ConTeXt.
2019-11-16ConTeXt writer: set csl-hanging-ident variable if needed.John MacFarlane1-2/+6
2019-11-16ConTeXt writer: Use special environment for CSL references.John MacFarlane1-0/+8
2019-11-16ConTeXt writer: use braces, not start/stop, for inline language tags.John MacFarlane1-2/+2
This prevents unwanted gobbling of spaces.
2019-11-15RST writer: Improve spacing for tables with no width information.John MacFarlane2-6/+26
If a simple table would be too wide, we use a grid table. The code for generating grid tables has been adjusted to give more intelligent column widths when widths aren't given. (This also affects the markdown writer.) Closes #5899.
2019-11-14Writers.Shared: Clean up code for adding metadata to variables.John MacFarlane1-10/+9
2019-11-14RST writer: fix backslash escaping after stringsAlbert Krewinkel1-2/+2
The check whether a complex inline element following a string must be escaped, now depends on the last character of the string instead of the first. Fixes: #5906
2019-11-13Ensure there's a blank line before RST tables.John MacFarlane1-4/+5
Closes #5898.
2019-11-12Switch to new pandoc-types and use Text instead of String [API change].despresc39-2601/+2687
PR #5884. + Use pandoc-types 1.20 and texmath 0.12. + Text is now used instead of String, with a few exceptions. + In the MediaBag module, some of the types using Strings were switched to use FilePath instead (not Text). + In the Parsing module, new parsers `manyChar`, `many1Char`, `manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`, `mantyUntilChar` have been added: these are like their unsuffixed counterparts but pack some or all of their output. + `glob` in Text.Pandoc.Class still takes String since it seems to be intended as an interface to Glob, which uses strings. It seems to be used only once in the package, in the EPUB writer, so that is not hard to change.
2019-11-11Fix typos (#5896)Brian Wignall1-1/+1
2019-11-11Change the implementation of `htmlSpanLikeElements` and implement `<dfn>` ↵Florian Beeres1-2/+4
(#5882) * Add HTML Reader support for `<dfn>`, parsing this as a Span with class `dfn`. * Change `htmlSpanLikeElements` implementation to retain classes, attributes and inline content.
2019-11-07Fix list fields in Opt so they aren't reversed.John MacFarlane1-2/+6
Previously optIncludeInHeader, etc. were in reverse order. This has been changed to promote #5881. Note also that the `sourcefile` variable used to be sometimes a string, sometimes a list (when there was more than one). Now it is always a list.
2019-11-04HTML Reader/Writer - Add support for <var> and <samp> (#5861)Amogh Rathore1-6/+15
Closes #5799
2019-11-03EPUB writer: ensure that `lang` variable is set on all chapters.John MacFarlane1-3/+5
2019-11-03Place caption before table in OpenDocument format. (#5869)Dmitry Pogodin1-3/+5
Closes #5681.
2019-10-31Jira writer: remove extraneous newline after single-line block quotesAlbert Krewinkel1-1/+1
See #5858
2019-10-29T.P.W.Shared: Changed gridTables so it does better at...John MacFarlane1-16/+20
...keeping the widths of columns. See #4320. Adjust test case for #4320.
2019-10-29Changes to build with new doctemplates/doclayout.John MacFarlane16-72/+92
The new version of doctemplates adds many features to pandoc's templating system, while remaining backwards-compatible. New features include partials and filters. Using template filters, one can lay out data in enumerated lists and tables. Templates are now layout-sensitive: so, for example, if a text with soft line breaks is interpolated near the end of a line, the text will break and wrap naturally. This makes the templating system much more suitable for programatically generating markdown or other plain-text files from metadata.
2019-10-25Beamer writer: fix regression with hrules separating slides.John MacFarlane1-3/+3
2019-10-24HTML reader/writer: Better handling of <q> with cite attribute (#5837)Ole Martin Ruud1-2/+10
* HTML reader: Handle cite attribute for quotes. If a `<q>` tag has a `cite` attribute, we interpret it as a Quoted element with an inner Span. Closes #5798 * Refactor url canonicalization into a helper function * Modify HTML writer to handle quote with cite. [0]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q
2019-10-15Add support for reading and writing <kbd> elementsDaniele D'Orazio1-25/+39
* Text.Pandoc.Shared: export `htmlSpanLikeElements` [API change] This commit also introduces a mapping of HTML span like elements that are internally represented as a Span with a single class, but that are converted back to the original element by the html writer. As of now, only the kbd element is handled this way. Ideally these elements should be handled as plain AST values, but since that would be a breaking change with a large impact, we revert to this stop-gap solution. Fixes https://github.com/jgm/pandoc/issues/5796.
2019-10-14change indentation of math part in Writers/HTML.hsmb211-33/+44
2019-10-14KaTeX math: respect classoption=fleqn variablemb211-2/+6
closes #5815
2019-10-12LaTeX writer: fix horizontal rule.John MacFarlane1-1/+1
We change to use 0.5pt rather than `\linethickness`, which apparently only ever worked "by accident" and no longer works with recent updates to texlive. Closes #5801.
2019-10-11Markdown writer: prefer pipe_tables to raw html...John MacFarlane1-3/+3
...even when we must lose width information. All in all this seems to be people's preferred behavior, even though it is slightly lossier. Closes #2608. Closes #4497.
2019-10-10Improve parsing of --defaults.John MacFarlane1-5/+1
- Add FromYAML instances to Opt and to all subsidiary types. - Remove the use of HsYAML-aeson, which doesn't give good position information on errors. - Rename some fields in Opt to better match cli options or reflect what the ycontain [API change]: + optMetadataFile -> optMetadataFiles + optPDFEngineArgs -> optPDFEngineOpts + optWrapText -> optWrap - Add IpynbOutput enumerated type to Text.Pandoc.App.Opts. Use this instead fo a string for optIpynbOutput. - Add FromYAML instance for Filter in Text.Pandoc.Filters. With these changes parsing of defaults files should be complete and should give decent error messages. Now (unlike before) we get an error if an unknown field is used.
2019-10-10Make some writers sensitive to 'unlisted' class on headings.John MacFarlane2-7/+10
If this is present on a heading with the 'unnumbered' class, the heading won't appear in the TOC. This class has no effect if 'unnumbered' is not also specified. This affects HTML-based writers (including slide shows and epub), LateX (including beamer), RTF, and PowerPoint. Other writers do not yet support `unlisted`. Closes #1762.
2019-10-09RST writer: proper handling of :align: on figures, images.John MacFarlane1-6/+12
When the image has the `align-right` (etc.) class, we now use an `:align:` attribute. Closes #4420.
2019-10-09Basic changes for MathJax 3.zorkow1-1/+1
2019-10-09Options.WriterOptions: Change type of writerVariables to Context Text.John MacFarlane5-45/+80
This will allow structured values. [API change]
2019-10-04hlint Muse writerAlexander Krotov1-1/+1
2019-09-28More throwError in place of fail.John MacFarlane2-1/+3
2019-09-28Replace some more fails with throwErrors.John MacFarlane3-4/+9