aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
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
2019-09-28Use throwError instead of fail when appropriate.John MacFarlane2-4/+11
2019-09-28Use Prelude.fail to avoid ambiguity with fail from GHC.Base.John MacFarlane5-8/+8
2019-09-24odt: Add external option for native numberingNils Carlson1-7/+7
This adds an external options +native_numbering to the ODT writer enabling enumeration of figures and tables in ODT output.
2019-09-23Man writer: suppress non-absolute link URLs.John MacFarlane1-3/+3
Motivation: in a man page there's not much use for relative URLs, which you can't follow. Absolute URLs are still useful. We previously suppressed relative URLs starting with '#' (purely internal links), but it makes sense to go a bit farther. Closes #5770.
2019-09-22[Docx Writer] Re-use Readers.Docx.Parse for StyleMap (#5766)Nikolay Yakimov2-31/+78
* [Docx Parser] Move style-parsing-specific code to a new module * [Docx Writer] Re-use Readers.Docx.Parse.Styles for StyleMap * [Docx Writer] Move Readers.Docx.StyleMap to Writers.Docx.StyleMap It's never used outside of writer code, so it makes more sense to scope it under writers really.
2019-09-22Make `plain` output plainer.John MacFarlane1-5/+16
Previously we used the following Project Gutenberg conventions for plain output: - extra space before and after level 1 and 2 headings - all-caps for strong emphasis `LIKE THIS` - underscores surrounding regular emphasis `_like this_` This commit makes `plain` output plainer. Strong and Emph inlines are rendered without special formatting. Headings are also rendered without special formatting, and with only one blank line following. To restore the former behavior, use `-t plain+gutenberg`. API change: Add `Ext_gutenberg` constructor to `Extension`. See #5741.
2019-09-21[Docx Writer] Consistently use style names, not style idsNikolay Yakimov1-27/+25
Styles that this change affects: paragraph styles: Author, Abstract, Compact, Figure, Captioned Figure, Image Caption, First Paragraph, Source Code, Table Caption, Definition, Definition Term; character styles: Verbatim Char, token styles (those with names ending in Tok)