aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
2018-09-11Muse writer: escape list markers in the beginning of notesAlexander Krotov1-1/+4
2018-09-11Muse writer: normalize inline list before testing if tags should be usedAlexander Krotov1-19/+18
2018-09-11Muse writer: use tags instead of lightweight markup for empty stringsAlexander Krotov1-4/+9
2018-09-09Org writer: don't escape literal `_`, `^`.John MacFarlane1-1/+1
Org doesn't recognize these escapes. Closes #4882.
2018-09-07Fix percentage image scaling in ODT (#4881)Nils Carlson2-2/+4
Image scaling in ODT was broken when a width was set to a percentage. The width was passed to the svg:width field as a pecentage, which is not correct according to the ODT standard. Instead the real dimensions should be passed as width and height and the style:rel-width attribute should be set to the percentage while style:rel-heigh attribute should be set to "scale". The converse is true if a percentage height is given. This is now fixed and documents produced are now properly scaled.
2018-09-04hlint some writersAlexander Krotov9-25/+21
2018-09-02Muse writer: hlintAlexander Krotov1-4/+4
2018-09-02Muse writer: use lightweight markup when possibleAlexander Krotov1-19/+123
2018-09-02Muse writer: add more commentsAlexander Krotov1-2/+2
2018-09-02Muse writer: escape empty stringsAlexander Krotov1-1/+2
This guarantees that conditionalEscapeString never returns empty string.
2018-09-01Muse writer: wrap conditionalEscapeString result into "Muse" typeAlexander Krotov1-22/+28
This removes the need to pass envInsideLinkDescription to it.
2018-09-01Muse writer: separate "shouldEscapeString" functionAlexander Krotov1-6/+11
2018-08-31Muse writer: simplify inline list renderingAlexander Krotov1-15/+12
2018-08-28EPUB writer: set epub:type on body element intelligently.John MacFarlane1-6/+22
epub:type of first section epub:type of body -------------------------- ------------------ prologue frontmatter abstract frontmatter acknowledgments frontmatter copyright-page frontmatter dedication frontmatter foreword frontmatter halftitle, frontmatter introduction frontmatter preface frontmatter seriespage frontmatter titlepage frontmatter afterword backmatter appendix backmatter colophon backmatter conclusion backmatter epigraph backmatter Otherwise body will have epub:type 'bodymatter'. This only affects epub3. See http://www.idpf.org/epub/profiles/edu/structure/#h.l0bzsloklt10 Closes #4823.
2018-08-24FB2 writer: put coverpage element between title and date...John MacFarlane1-2/+3
...rather than in document-info element. Closes #4854.
2018-08-19Markdown writer: escape `~` if strikeout extension enabled.John MacFarlane1-1/+2
See #4840.
2018-08-17Docx writer: properly handle display math in spans.John MacFarlane2-6/+10
Closes #4826. This isn't a complete solution, since other nestings of display math may still cause problems, but it should work for what is by far the most common case. Note that this also involves an API change: `isDisplayMath` is now exported from Text.Pandoc.Writers.Shared.
2018-08-17Haddock Writer: Use proper format for latex math in haddock (#4571).Joe Hermaszewski1-6/+4
Inline math in `\(..\)`, display math in `\[..\]`, tex is now used. Previously we'd "fake it with unicode" and fall back to tex when that didn't work. But as of https://github.com/haskell/haddock/commit/3f50b955324bd4b42f88a421f0203bc46a3ccf64 haddock supports latex math.
2018-08-16TEI improvements.John MacFarlane1-14/+1
- Ensure that title element is always present, even if empty. - Put author tags in the template, rather than adding them in the writer. Closes #4839.
2018-08-16LaTeX writer/template: be sensitive to `filecolor` variable.John MacFarlane1-1/+2
`linkcolor` only affects internal links, and `urlcolor` only affects linked URLs. For external links, the option to use is `filecolor`. Closes #4822.
2018-08-15Markdown reader: Use "tex" instead of "latex" for raw tex-ish content.John MacFarlane2-9/+7
We can't always tell if it's LaTeX, ConTeXt, or plain TeX. Better just to use "tex" always. Also changed: ConTeXt writer: now outputs raw "tex" blocks as well as "context". (Closes #969). RST writer: uses ".. raw:: latex" for "tex" content. (RST doesn't support raw context anyway.) Note that if "context" or "latex" specifically is desired, you can still force that in a markdown document by using the raw attribute (see MANUAL.txt): ```{=latex} \foo ``` Note that this change may affect some filters, if they assume that raw tex parsed by the Markdown reader will be RawBlock (Format "latex"). In most cases it should be trivial to modify the filters to accept "tex" as well.
2018-08-13RST writer: render Divs with admonition classes as admonitions.John MacFarlane1-3/+12
Also omit Div with class "admonition-title". These are generated by the RST reader and should be omitted on round-trip. Closes #4833.
2018-08-13RST writer: use `.. container` for generic Divs, instead of raw HTML.John MacFarlane1-4/+10
2018-08-12Lua: cleanup Lua utils, remove unused functions.Albert Krewinkel1-7/+7
2018-08-08HTML writer: Don't prefix epub: attributes with data-.John MacFarlane1-0/+1
2018-08-05RST reader: improve parsing of inline interpreted text roles.John MacFarlane1-3/+6
* Use a Span with class "title-reference" for the default title-reference role. * Use B.text to split up contents into Spaces, SoftBreaks, and Strs for title-reference. * Use Code with class "interpreted-text" instead of Span and Str for unknown roles. (The RST writer has also been modified to round-trip this properly.) * Disallow blank lines in interpreted text. * Backslash-escape now works in interpreted text. * Backticks followed by alphanumerics no longer end interpreted text. Closes #4811.
2018-08-03RST writer: allow images to be directly nested within links, closes #4810 ↵Francesco Occhipinti1-0/+2
(#4814)
2018-08-01RST writer: use `titleblock` instead of `title` variable for title blockFrancesco Occhipinti1-4/+5
Closes #4803 After this commit use `$titleblock$` in order to get what was contained in `$title$` before, that is a title and subtitle rendered according to the official rST method: http://docutils.sourceforge.net/docs/user/rst/quickstart.html#document-title-subtitle. from With this commit, the `$title$` and `$subtitle$` metadata are available and they simply carry the metadata values. This opens up more possibilities in templates.
2018-07-24MediaWiki writer: Avoid extra blank line in tables with empty cells.John MacFarlane1-0/+1
Note that the old output is semantically identical, but the new output looks better. Closes #4794.
2018-07-15Make markdown and github writers respect the `emoji` extension.John MacFarlane2-0/+10
2018-07-12AsciiDoc Writer: escape square brackets at start of line (#4708)Mauro Bieg1-8/+13
closes #4545
2018-07-02Spellcheck commentsAlexander Krotov4-4/+4
2018-06-30RST writer: don't treat 'example' as a syntax name.John MacFarlane1-1/+2
This fixes conversions from org with example blocks. Closes #4748.
2018-06-29Use HsYAML instead of yaml for translations, YAML metadata.John MacFarlane1-1/+1
yaml wraps a C library; HsYAML is pure Haskell. Closes #4747. Advances #4535.
2018-06-25Texinfo writer: use @sup and @sub instead of custom macrosAlexander Krotov1-10/+3
Fixes #4728
2018-06-12Beamer: Allow "noframenumbering" option (#4696)Raymond Ehlers1-1/+2
As noted [here](https://tex.stackexchange.com/a/49805) ([beamer commit here](https://github.com/josephwright/beamer/commit/ff70090f36b631667b472cfe675fc3514fe46f7e)), `noframenumbering` is an undocumented, but long existing option to disable frame numbering for a particular slide. This is useful to avoid numbering backup slides.
2018-06-12reveal.js writer and template: reuse mathjax URL...John MacFarlane1-5/+6
...provided by the argument to `--mathjax` or the normal pandoc default, rather than a hard-coded one in the template. Closes #4701.
2018-06-12FB2 writer: convert Plain to Para in annotationAlexander Krotov1-1/+6
Address #2424
2018-06-12FB2 writer: fix order of items in title-infoAlexander Krotov1-1/+1
Address issue #2424
2018-06-07LaTeX writer: properly handle footnotes in table captions.John MacFarlane1-17/+22
Refactored code from figure captions to use in both places. Closes #4683.
2018-06-07beamer output: fix single digit column percentage (#4691)Mauro Bieg1-1/+1
fixes #4690
2018-06-02Support --number-sections in RST output...John MacFarlane1-0/+1
via the "section-numbering" directive in standalone output.
2018-05-30Markdown writer: preserve `implicit_figures` with attributes...John MacFarlane1-5/+11
...even if `implicit_attributes` is not set, by rendering in raw HTML. Fixes #4677.
2018-05-16Custom writer: fix error message on script failureAlbert Krewinkel1-1/+1
Error messages produced by Lua were not displayed by Pandoc. The writer was using the bottom-most stack element, while the error message is the top-most element. This lead to the writer to always show "Lua 5.3" as error message, disregarding the actual message.
2018-05-14Docx writer: be sensitive to `toc` in YAML metadata.John MacFarlane1-4/+11
Closes #4645.
2018-05-14Make internal links work in ODT/OpenDocument.John MacFarlane1-5/+11
This adds proper bookmarks to the headers with non-null IDs. Closes #4358.
2018-05-12EPUB writer: properly escape pagetitle.John MacFarlane1-3/+6
Previously we weren't escaping `&` and other XML characters in the pagetitle, so a title containing a `&` would be invalid.
2018-05-09Restored and undeprecated gladtex for HTML math.John MacFarlane1-1/+8
- Added `GladTeX` constructor to `Text.Pandoc.Options.HTMLMathMethod` [API change, reverts removal in v2.2] - Restored and undeprecated `--gladtex` option, removed in v2.2. Closes #4607.
2018-05-09Fix regression with tex math environments in HTML + MathJax.John MacFarlane1-11/+5
Closes #4639.
2018-05-08Support underline in docx writer.John MacFarlane1-0/+3
Updated golden test and confirmed validity of file. Closes #4633.