aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
2017-12-23Plain writer: don't linkify table of contents.John MacFarlane1-10/+12
2017-12-22RST writer: fix anchors for headers.John MacFarlane1-1/+1
We were missing an `_`. See #4188.
2017-12-22PowerPoint writer: Treat lists inside BlockQuotes as listsJesse Rosenthal1-1/+13
We don't yet produce incremental lists in PowerPoint, but we should at least treat lists inside BlockQuotes as lists, for compatibility with other slide formats.
2017-12-21Merge pull request #4177 from stencila/jats-xml-readerJohn MacFarlane1-18/+29
Add Basic JATS reader based on DocBook reader
2017-12-21Merge branch 'master' of github.com:jgm/pandocJohn MacFarlane1-2/+8
2017-12-21Docx writer: ensure that `distArchive` is the one that comes with pandoc.John MacFarlane1-2/+6
Previously a `reference.docx` in `~/.pandoc` (or the user data dir) would be used instead, and this could cause problems because a user-modified docx sometimes lacks vital sections that we count on the `distArchive` to supply. Closes #4182.
2017-12-21JATS writer: Make <p> optional in <td> and <th> (#4178)Hamish Mackenzie1-0/+3
If the contents are single `Plain` block then do not wrap them with a <p> element.
2017-12-21jats writer: Self closing tags for empty xref (#4187)Hamish Mackenzie1-2/+5
2017-12-22Improve support for code language in JATSHamish Mackenzie1-18/+29
2017-12-21Change notes to a smaller size.Jesse Rosenthal1-5/+22
This will allow more to fit on a single slide, and will probably look better.
2017-12-21PowerPoint writer: Add ability to force size.Jesse Rosenthal1-2/+6
This replaces the more specific blockQuote runProp, which only affected the size of blockquotes. We can use this for notes, etc.
2017-12-21PowerPoint writer: Implement notesJesse Rosenthal1-2/+30
This currently prints all notes on a final slide. Note that at the moment, there is a danger of text overflowing the note slide, since there is no logic for adding further slides. A future commit will shrink the font size on these notes, but that won't take care of the problem altogether. (We might have to implement some sort of clumsy page-breaking logic here based on font size and text-box dimensions, though that seems like a can of worms.)
2017-12-21PowerPoint writer: Register notes to state.Jesse Rosenthal1-0/+8
When we encounter a note, we write it to the state directory of notes, and input a superscript.
2017-12-21Add Note state to PowerPoint writer.Jesse Rosenthal1-0/+2
First step toward implementing notes in pptx writer.
2017-12-21Implement basic definition list functionality to PowerPoint writer.Jesse Rosenthal1-0/+9
These are currently implemented in terms of a Bold para for the terms, and then blockquotes for the definitions. THis can be refined a bit in the future.
2017-12-21Org writer: do not wrap "-" to avoid accidental bullet listsAlexander Krotov1-7/+12
Also add TODO for ordered lists.
2017-12-21Muse reader: parse anchors immediately after headings as IDsAlexander Krotov1-1/+1
2017-12-19Muse writer: don't wrap note references to the next lineAlexander Krotov1-1/+7
Closes #4172.
2017-12-19Fix for #4171 fix: don't wrap note references after SoftBreakAlexander Krotov1-0/+2
2017-12-18Org writer: don't allow fn refs to wrap to beginning of line.John MacFarlane1-1/+5
Otherwise they can be interpreted as footnote definitions. Closes #4171.
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