aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
2017-12-15LaTeX writer: use \renewcommand for \textlatin with babel.John MacFarlane1-4/+7
This avoids a clash with a deprecated \textlatin command defined in Babel. Closes #4161.
2017-12-14Merge pull request #4148 from stencila/jats-figuresJohn MacFarlane1-14/+37
fig, table-wrap & caption Divs for JATS writer
2017-12-14Deduplicate JATS writer image mime type codeHamish Mackenzie1-15/+14
2017-12-13Removed whitespace at ends of line.John MacFarlane2-38/+38
2017-12-13Custom writer: use init file to setup Lua interpreterAlbert Krewinkel1-11/+12
The same init file (`data/init`) that is used to setup the Lua interpreter for Lua filters is also used to setup the interpreter of custom writers.lua.
2017-12-13Custom writer: define instances for newtype wrapperAlbert Krewinkel1-69/+57
The custom writer used its own `ToLuaStack` instance definitions, which made it difficult to share code with Lua filters, as this could result in conflicting instances. A `Stringify` wrapper is introduced to avoid this problem.
2017-12-13fig, table-wrap & caption Divs for JATS writerHamish Mackenzie1-6/+30
Support writing <fig> and <table-wrap> elements with <title> and <caption> inside them by using Divs with class set to on of fig, table-wrap or cation. The title is included as a Heading so the constraint on where Heading can occur is also relaxed. Also leaves out empty alt attributes on links.
2017-12-11Fix comment that confused compiler.Jesse Rosenthal1-2/+0
2017-12-11Remove redundant imports from Docx writer.Jesse Rosenthal1-3/+0
These were a result of moving functions to the OOXML module.
2017-12-11Add Powerpoint writer.Jesse Rosenthal1-0/+1665
This imports the essential Powerpoint writer. It works following the standard Pandoc conventions for making other sorts of slides. At the moment, there are still these TODOs: 1. Syntax highlighting is not yet implemented. (This is difficult because there are no character classes in Powerpoint.) 2. Footnotes and Definition lists are not yet implemented. (Notes will usually take the form of a final slide. 3. Image placement and auto-resizing has a few glitches. 4. Reference powerpoint files don't work dependably from the command line. This will be implemented, but at the moment users are advised to change themes from within Powerpoint.
2017-12-11Create shared OOXML writer file.Jesse Rosenthal2-33/+110
This is for functions used by both Powerpoint and Docx writers.
2017-12-10Changes for skylighting-0.5.John MacFarlane2-5/+5
This fixes a bug in 2.0.4, whereby pandoc could not read the theme files generated with `--print-highlight-style`. It also fixes some CSS issues involving line numbers. Highlighted code blocks are now enclosed in a div with class sourceCode. Highlighting CSS no longer sets a generic color for pre and code; we only set these for class `sourceCode`. This will close #4133 and #4128.
2017-12-09Man writer: omit internal links.John MacFarlane1-0/+2
That is, just print the link text without the url. Closes #4136.
2017-12-04Add `empty_paragraphs` extension.John MacFarlane3-20/+27
* Deprecate `--strip-empty-paragraphs` option. Instead we now use an `empty_paragraphs` extension that can be enabled on the reader or writer. By default, disabled. * Add `Ext_empty_paragraphs` constructor to `Extension`. * Revert "Docx reader: don't strip out empty paragraphs." This reverts commit d6c58eb836f033a48955796de4d9ffb3b30e297b. * Implement `empty_paragraphs` extension in docx reader and writer, opendocument writer, html reader and writer. * Add tests for `empty_paragraphs` extension.
2017-12-03Removed unnecessary import.John MacFarlane1-1/+1
2017-12-03commonmark/gfm writer: use raw html for native divs/spans.John MacFarlane1-4/+14
This allows a pandoc markdown native div or span to be rendered in gfm using raw html tags.
2017-12-03HTML writer: export tagWithAttributes.John MacFarlane1-2/+19
This is a helper allowing other writers to create single HTML tags.
2017-12-03commonmark/gfm writer: implement `raw_html` and `raw_tex` extensions.John MacFarlane1-6/+12
Note that `raw_html` is enabled by default for `gfm`, while `raw_tex` is disabled by default.
2017-12-02Docx writer: allow empty paragraphs.John MacFarlane2-4/+8
See #2252. This also changes fixDisplayMath from Text.Pandoc.Writers.Shared so that it no longer produces empty Para as an artifact. (That was the original reason the writer omitted them.)
2017-12-02LaTeX writer: escape `_` in code with --listings.John MacFarlane1-1/+1
2017-12-01LaTeX writer: allow specifying just width or height for image size.John MacFarlane1-1/+6
Previously both needed to be specified (unless the image was being resized to be smaller than its original size). If height but not width is specified, we now set width to textwidth (and similarly if width but not height is specified). Since we have keepaspectratio, this yields the desired result.
2017-12-01LaTeX writer: escape ~ in code with --listings.John MacFarlane1-1/+1
Closes #4111.
2017-12-01Revert "LaTeX writer: Add keepaspectratio to includegraphics..."John MacFarlane1-6/+1
This reverts commit 171187a4527497701b3c77bd56cea2d770d4e3b0.
2017-11-30LaTeX writer: Add keepaspectratio to includegraphics...John MacFarlane1-1/+6
...if only one of height/width is given.
2017-11-29Let papersizes a0, a1, a2, ... be case-insensitive in LaTeX and ConTeXt.John MacFarlane2-5/+8
2017-11-28Support `--webtex` for `gfm` output.John MacFarlane2-9/+18
2017-11-24Muse writer: improve inline normalizationAlexander Krotov1-0/+14
2017-11-24Muse: move inline list normalization to writerAlexander Krotov1-1/+9
2017-11-22Muse writer: escape hash symbolAlexander Krotov1-1/+1
2017-11-22Muse writer: escape "----" to avoid accidental horizontal rulesAlexander Krotov1-4/+6
2017-11-22Muse writer: escape only </code> inside code tagAlexander Krotov1-1/+1
Additional <verbatim> is not needed as <code> is verbatim already.
2017-11-14EPUB writer: Fixed path for cover image.John MacFarlane1-1/+1
It was previously `media/media/imagename`, and should have been `media/imagename`.
2017-11-14EPUB writer: fix paths for cover image.John MacFarlane1-2/+2
Closes #4069.
2017-11-13Markdown writer: fix bug with doubled footnotes in grid tables.John MacFarlane1-12/+22
Closes #4061.
2017-11-08EPUB writer: fixed modified paths for raw HTML tagsJohn MacFarlane1-2/+2
(src, poster, etc.) This had not been updated for the new EPUB container layout, with a separate text/ subdirectory. Closes #4050. Closes #4055.
2017-11-07EPUB writer: fixed EPUB OCF structure.John MacFarlane1-65/+82
The structure of the EPUBs was messed up, and #3720 was improperly implemented. This commit fixes things.
2017-11-07EPUB writer: fix image paths with empty `--epub-subdirectory`.John MacFarlane1-3/+9
2017-11-04Revert "Better indentation under headers in org mode output."John MacFarlane1-26/+14
This reverts commit 1a81751cef330d875cc34f11cde4a0d478969db7.
2017-11-04Better indentation under headers in org mode output.John MacFarlane1-14/+26
See #4036. Close examination by org experts needed, to ensure that nothing breaks.
2017-11-04Fix strikethrough in gfm writer.John MacFarlane1-1/+1
Previously we got a crash, because we were trying to print a native cmark STRIKETHROUGH node, and the commonmark writer in cmark-github doesn't support this. Work around this by using a raw node to add the strikethrough delimiters. Closes #4038.
2017-11-02Improved support for columns in HTML.John MacFarlane1-5/+2
* Move as much as possible to the CSS in the template. * Ensure that all the HTML-based templates (including epub) contain the CSS for columns. * Columns default to 50% width unless they are given a width attribute. Closes #4028.
2017-11-02Use latest skylighting; ensure no duplicate ids on code lines.John MacFarlane1-3/+11
The line identifiers are built using the code block's identifier as a prefix. If the code block has null identifier, we use "cb1", "cb2", etc. Closes #4031.
2017-11-02Fixed revealjs slide column width issues.John MacFarlane1-2/+7
* Remove "width" attribute which is not allowed on div. * Remove space between `<div class="column">` elements, since this prevents columns whose widths sum to 100% (the space takes up space). Closes #4028.
2017-11-02hlintAlexander Krotov1-1/+1
2017-11-01hlintAlexander Krotov9-14/+14
2017-11-01FB2 writer: Add "unrecognised" genre to <title-info>Alexander Krotov1-1/+2
XML schema requires at least one genre.
2017-11-01FB2 writer: remove <annotation> from <body>Alexander Krotov1-11/+2
<annotation> is not allowed inside <body> according to FictionBook2 XML schema. Besides that, the same information is already placed inside <description>. Related bug: #2424
2017-11-01Merge pull request #4009 from mb21/html-class-namesJohn MacFarlane1-3/+3
HTML Writer: consistently use dashed class-names
2017-11-01Merge pull request #4008 from labdsf/fb2-bulletsJohn MacFarlane1-8/+4
FB2 writer: make bullet lists consistent with ordered lists
2017-10-31Properly pass through author metadata in JATS writer.John MacFarlane1-41/+14
Closes #4020.