aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
2017-05-23Fixed handling of soft hyphen (0173) in docx writer.John MacFarlane1-7/+19
Closes #3691.
2017-05-23Shared: Provide custom isURI that rejects unknown schemes [isURI]Albert Krewinkel11-16/+8
We also export the set of known `schemes`. The new function replaces the function of the same name from `Network.URI`, as the latter did not check whether a scheme is well-known. E.g. MediaWiki wikis frequently feature pages with names like `User:John`. These links were interpreted as URIs, thus turning internal links into global links. This is prevented by also checking whether the scheme of a URI is frequently used (i.e. is IANA registered or an otherwise well-known scheme). Fixes: #2713 Update set of well-known URIs from IANA list All official IANA schemes (as of 2017-05-22) are included in the set of known schemes. The four non-official schemes doi, isbn, javascript, and pmid are kept.
2017-05-19RST writer: add empty comments when needed...John MacFarlane1-3/+25
to avoid including a blocquote in the indented content of a preceding block. Closes #3675.
2017-05-18Don't render LaTeX images with data: URIs.John MacFarlane1-0/+3
LaTeX can't handle these. Note that --extract-media can be used when the input contains data: URIs. Closes #3636.
2017-05-18Docx writer: Change FigureWithCaption to CaptionedFigure (#3658)Ian1-1/+1
Edit styles.xml as part of the fix for #3656
2017-05-17Markdown writer: Fixed duplicated reference linksJohn MacFarlane1-11/+15
with `--reference-links` and `--reference-location=section`. Also ensure that there are no empty link references `[]`. Closes #3674.
2017-05-13Update dates in copyright noticesAlbert Krewinkel29-57/+62
This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
2017-05-13Add haddock module description to FB2 writerAlbert Krewinkel1-1/+11
Copyright, maintainer etc. were missing in haddock docs for this module.
2017-05-13Change maintainer line in Org writer moduleAlbert Krewinkel1-1/+1
2017-05-07Markdown writer: missing \n (#3647)David A Roberts1-1/+1
2017-05-07Muse writer: Indent tables with one space (#3649)Alexander Krotov1-2/+2
It is required to trigger Muse table rendering.
2017-05-04Muse writer: omit automatic header identifiers (#3633)Alexander Krotov1-1/+10
2017-05-03Markdown writer: better escaping for links (#3628)David A Roberts1-1/+10
Previously the Markdown writer would sometimes create links where there were none in the source. This is now avoided by selectively escaping bracket characters when they occur in a place where a link might be created. Closes #3619.
2017-05-03Markdown Writer: put space before reference link definitionsMauro Bieg1-1/+1
Fixes #3630 (#3631). Previously the attributes in link reference definitions did not have a space preceding.
2017-05-02Added PandocResourceNotFound error.John MacFarlane4-21/+7
Use this instead of PandocIOError when a resource is not found in path. This improves the error message in this case, see #3629.
2017-05-02Markdown writer: Case-insensitive reference links. (#3616)David A Roberts1-14/+16
Ensure that we do not generate reference links whose labels differ only by case. Also allow implicit reference links when the link text and label are identical up to case. Closes #3615.
2017-05-02FB2 writer: Add support for "lang" metadata (#3625)Alexander Krotov1-2/+7
2017-04-29LaTeX writer: Fix problem with escaping in lstinline.John MacFarlane1-1/+6
Previously the LaTeX writer created invalid LaTeX when `--listings` was specified and a code span occured inside emphasis or another construction. This is because the characters `%{}\` must be escaped in lstinline when the listinline occurs in another command, otherwise they must not be escaped. To deal with this, adoping Michael Kofler's suggestion, we always wrap lstinline in a dummy command `\passthrough`, now defined in the default template if `--listings` is specified. This way we can consistently escape the special characters. Closes #1629.
2017-04-28LaTeX writer: don't use lstinline it \item[..].John MacFarlane1-1/+7
If you do, the contents of item disappear or are misplaced. Use `\texttt` instead. Closes #645.
2017-04-28Ms writer: make use of already defined render' (#3613)Alexander Krotov1-2/+2
2017-04-28Muse writer: Do not reflow directives (#3614)Alexander Krotov1-2/+2
Directives at the beginning of documents cannot span multiple lines so they must not be reflown.
2017-04-25HTML line block: Use class instead of style attribute.John MacFarlane1-1/+1
We now issue `<div class="line-block">` and include a default definition for `line-block` in the default templates, instead of hard-coding a `style` on the div. Closes #1623.
2017-04-25LaTeX writer: fix error with line breaks after empty content.John MacFarlane1-19/+28
LaTeX requires something before a line break, so we insert a `~` if no printable content has yet been emitted. Closes #2874.
2017-04-14Avoid repeating StackValue instances definitionsAlbert Krewinkel1-30/+1
The lua filters and custom lua writer system defined very similar StackValue instances for strings and tuples. These instance definitions are extracted to a separate module to enable sharing.
2017-04-14Extract lua helper functions into Lua.Util moduleAlbert Krewinkel1-10/+7
2017-04-12Man writer: Fix handling of nested font commands.John MacFarlane1-9/+37
Previously pandoc emitted incorrect markup for bold + italic, for example, or bold + code. Closes #3568.
2017-04-10Docx writer: don't take "distArchive" from datadir.John MacFarlane1-2/+3
The docx writer takes components from the distribution's version of reference.docx when it can't find them in a user's custom reference.docx. (This sometimes happens because Word will sometimes omit components needed for larger documents when saving a simple one.) Previously, we allowed a reference.docx in the data directory (e.g. `~/.pandoc`) to be used as the distribution's reference.docx. This led to a bizarre situation where pandoc would produce a good docx using `--template ~/.pandoc/ref.docx`, but if `ref.docx` were moved to `~/.pandoc/reference.docx`, it would then produce a corrupted docx. Closes #3322 (I think).
2017-04-06Ms writer: wider indents for lists.John MacFarlane1-5/+6
Previously some indents weren't wide enough, leading the list item to start on a line after the marker.
2017-04-05Ms writer: respect text wrapping options.John MacFarlane1-1/+6
2017-04-04Ms writer improvements:John MacFarlane1-4/+3
- added some variables to the default template. - cleaner output for images (stringify alt text).
2017-04-04Ms writer: ensure that @ is escaped in URIs.John MacFarlane1-1/+5
Otherwise we may get unescaped @s that give eqn fits, with @ as the delimiter character.
2017-04-04Add original classes to JS obfuscated links (#3554)Timm Albers1-1/+4
HTML links containing classes originally now preserve them when using javascript email obfuscation. Fixes #2989
2017-04-03Add class to footnote back referencesTimm Albers1-1/+1
The HTML writer now also adds the class footnoteBack to back references of footnotes. This allows for easier CSS styling.
2017-04-03Include \VerbatimFootnotes for highlighted code blocksTimm Albers1-2/+5
Updated the LaTeX writer to also include \VerbatimFootnotes in the preamble for highlighted code blocks. Previously this was only done for raw code blocks.
2017-04-01Ms writer: added syntax highlighting.John MacFarlane1-5/+84
Closes #3547. Macro definitions are inserted in the template when there is highlighted code. Limitations: background colors and underline currently not supported.
2017-04-01OpenDocument writer: wider labels for lists.John MacFarlane1-2/+2
This avoids overly narrow labels for ordered lists with () delimiters. However, arguably it creates overly wide labels for bullets. Also, lists now start flush with the margin, rather than indented. Fixes #2421.
2017-03-31JATS writer: put references in `<back>`.John MacFarlane1-3/+10
Modified template to include a `<back>` and `<body>` section. This should give authors more flexibility, e.g. to put acknowledgements metadata in `<back>`. References are automatically extracted and put into `<back>`.
2017-03-30Fix compiler warning.John MacFarlane1-1/+1
2017-03-30Allow dynamic loading of syntax definitions.John MacFarlane3-26/+30
See #3334. * Add writerSyntaxMap to WriterOptions. * Highlighting: added parameter for SyntaxMap to highlight. * Implemented --syntax-definition option. TODO: [ ] Figure out whether we want to have the xml parsing depend on the dtd (it currently does, and fails unless the language.dtd is found in the same directory). [ ] Add an option to read a KDE syntax highlighting theme as a custom style. [ ] Add tests.
2017-03-30ZimWiki writer: put in PandocMonad, added warnings for raw.John MacFarlane1-17/+32
2017-03-30Textile writer: moved into PandocMonad.John MacFarlane1-31/+48
Warnings for omitted raw content.
2017-03-30Org writer: move everything into PandocMonad.John MacFarlane1-23/+35
2017-03-30JATS writer: use both tex and mml alternatives for math when possible.John MacFarlane1-5/+7
2017-03-30JATS writer: Fixed bibliography handling.John MacFarlane1-5/+6
2017-03-30Merge branch 'jats'John MacFarlane1-0/+429
2017-03-30Added JATS writer.John MacFarlane1-0/+429
* New module Text.Pandoc.Writer.JATS exporting writeJATS. * New output format `jats`. * Added tests. * Revised manual.
2017-03-28Custom writer: remove old preprocesesor conditionalsAlbert Krewinkel1-36/+0
The minimum required hslua version is 0.4.0, the conditionals inserted to support hslua-0.3.* can hence be removed.
2017-03-26MediaWiki writer: don't softbreak lines inside list items.John MacFarlane1-1/+4
Closes #3531.
2017-03-26Ms writer: update TODO comments.John MacFarlane1-3/+0
2017-03-26Ms writer: Hyperlink table of contents and other improvements.John MacFarlane1-9/+21