aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
2017-10-30EPUB writer: fixed filepaths for nonstandard epub-subdirectory values.John MacFarlane1-16/+23
2017-10-30EPUB writer fixes:John MacFarlane1-23/+32
- Ensure that epub2 is recognized as a non-text format, so that a template is used. - Don't include "prefix" attribute for ibooks for epub2. It doesn't validate. - Fix stylesheet paths; previously we had an incorrect stylesheet path for the cover page and nav page.
2017-10-29Removed useless notes state in DokuWiki writer.John MacFarlane1-5/+2
2017-10-29Source code reformatting.John MacFarlane10-20/+20
2017-10-29hlint suggestions.John MacFarlane26-542/+527
2017-10-29More hlint.John MacFarlane3-33/+30
2017-10-29Write FB2 lists without nesting blocks inside <p> (#4004)Alexander1-16/+32
According to FB2 XML schema <empty-line /> cannot be placed inside <p>. Linux FBReader can't display such paragraphs, e.g. any "loose" lists produced by pandoc prior to this commit. Besides that, FB2 writer placed <p> inside <p> when writing nested lists, this commit fixes the bug. Also this commit removes leading non-breaking space from ordered lists for consistency with bullet lists. Definition lists are not affected at all.
2017-10-27Automatic reformating by stylish-haskell.John MacFarlane25-116/+115
2017-10-26update years in copyrightKolen Cheung1-2/+2
2017-10-16HTML writer: don't add data- prefix to unknown attributes beginning with data-.John MacFarlane1-0/+1
Or we'll get data-data-blah.
2017-10-16RST writer: correctly handle inline code containing backticks.John MacFarlane1-2/+7
(Use a :literal: role.) Closes #3974.
2017-10-16RST writer: don't backslash-escape word-internal punctuation.John MacFarlane1-15/+18
Closes #3978.
2017-10-13Merge pull request #3970 from d-dorazio/masterJohn MacFarlane1-2/+4
markdown writer: always write bracketed_spans' attributes
2017-10-13CommonMark writer: omit "fig:" prefix in image titles.John MacFarlane1-0/+3
This is used internally to indicate internal figures. See https://groups.google.com/d/msgid/pandoc-discuss/892c5a25-086a-4e19-b4c1-8 975cea8df0f@googlegroups.com?utm_medium=email&utm_source=footer
2017-10-13markdown writer: always write bracketed_spans' attributesd-dorazio1-2/+4
2017-10-11ConTeXt writer: Use identifiers for chapters.John MacFarlane1-6/+7
Closes #3968.
2017-10-11FB2 Writer: format LineBlock as poemAlexander Krotov1-2/+6
Previously writer produced one paragraph with <empty-line/> elements, which are not allowed inside <p> according to FB2 schema.
2017-10-10docx writer - activate evenAndOddHeaders from reference docAgustín Martín Barbero1-0/+1
Fixes #3901 by checking for the evenAndOddHeaders mark in the reference doc, and copying it to the resulting docx if present.
2017-10-09FB2 writer: replace concatMap with cMapAlexander Krotov1-10/+10
2017-10-09hlint FB2 writerAlexander Krotov1-50/+50
2017-10-06Use mathjax 2.7.2 by default.John MacFarlane1-1/+1
2017-10-05KaTeX fixes:John MacFarlane2-20/+16
* In Options.HTMLMathMethod, the KaTeX contsructor now takes only one string (for the KaTeX base URL), rather than two [API change]. * The default URL has been updated to the latest version. * The autoload script is now loaded by default.
2017-09-30EPUB writer: simplified some functions.John MacFarlane1-24/+18
2017-09-30Removed writerSourceURL, add source URL to common state.John MacFarlane6-6/+6
Removed `writerSourceURL` from `WriterOptions` (API change). Added `stSourceURL` to `CommonState`. It is set automatically by `setInputFiles`. Text.Pandoc.Class now exports `setInputFiles`, `setOutputFile`. The type of `getInputFiles` has changed; it now returns `[FilePath]` instead of `Maybe [FilePath]`. Functions in Class that formerly took the source URL as a parameter now have one fewer parameter (`fetchItem`, `downloadOrRead`, `setMediaResource`, `fillMediaBag`). Removed `WriterOptions` parameter from `makeSelfContained` in `SelfContained`.
2017-09-27RST writer: add header anchors when header has non-standard id.John MacFarlane1-1/+6
Closes #3937.
2017-09-08Write euro symbol directly in LaTeXAndrew Dunning1-6/+0
The textcomp package allows pdfLaTeX to parse `€` directly, making the \euro command unneeded. Closes #3801.
2017-09-07Markdown writer: Escape pipe characters when `pipe_tables` enabled.John MacFarlane1-0/+1
Closes #3887.
2017-09-07LaTeX writer: use proper code for list enumerators.John MacFarlane1-2/+13
This should fix problems with lists that don't use arabic numerals. Closes #3891.
2017-09-05Markdown writer: make Span with null attribute transparent.John MacFarlane1-4/+3
That is, we don't use brackets or `<span>` tags to mark spans when there are no attributes; we simply output the contents.
2017-09-04Plain writer: don't use &nbsp; to separate list and indented code.John MacFarlane1-3/+6
There's no need for it in this context, since this isn't to be interpreted using Markdown rules.
2017-09-01Org writer: stop using raw HTML to wrap divsAlbert Krewinkel1-37/+26
Div's are difficult to translate into org syntax, as there are multiple div-like structures (drawers, special blocks, greater blocks) which all have their advantages and disadvantages. Previously pandoc would use raw HTML to preserve the full div information; this was rarely useful and resulted in visual clutter. Div-rendering was changed to discard the div's classes and key-value pairs if there is no natural way to translate the div into an org structure. Closes: #3771
2017-08-29Add a type sig to satisfy ghc 7.10.3.John MacFarlane1-0/+1
2017-08-28HTML writer: ensure we don't get two style attributes for width & height.John MacFarlane1-2/+8
2017-08-26Markdown writer: don't crash on Str "".John MacFarlane1-1/+1
2017-08-17RST reader/writer: support unknown interpreted text roles...John MacFarlane1-1/+6
...by parsing them as Span with "role" attributes. This way they can be manipulated in the AST. Closes #3407.
2017-08-17slidy uses https instead of http (#3848)ickc1-1/+1
grep -rl 'http://www.w3.org/Talks/Tools/Slidy2' . | xargs sed -i 's/http:\/\/www\.w3\.org\/Talks\/Tools\/Slidy2/https:\/\/www\.w3\.org\/Talks\/Tools\/Slidy2/g'
2017-08-16Update to hslua-0.8.0Albert Krewinkel1-0/+6
hslua no longer provides lua stack instances for Int and Double, the necessary instances are added to the Custom writer and the lua filtering system.
2017-08-15Docx writer: fixed a regression (infinite loop on certain lists).John MacFarlane1-2/+2
Bug was introduced by commit a868b238f253423281b2648896f184e7cdc05014.
2017-08-14Implement multicolumn support for slide formats.John MacFarlane2-3/+28
The structure expected is: <div class="columns"> <div class="column" width="40%"> contents... </div> <div class="column" width="60%"> contents... </div> </div> Support has been added for beamer and all HTML slide formats. Closes #1710. Note: later we could add a more elegant way to create this structure in Markdown than to use raw HTML div elements. This would come for free with a "native div syntax" (#168). Or we could devise something specific to slides
2017-08-13CommonMark writer: prefer pipe tables to HTML tables...John MacFarlane1-3/+2
...even if it means losing relative column width information. See #3734.
2017-08-13Markdown writer: Use pipe tables if `raw_html` disabled...John MacFarlane1-2/+10
and `pipe_tables` enabled, even if the table has relative width information. Closes #3734.
2017-08-13Added some Functor constraints needed for ghc 7.8.John MacFarlane1-2/+2
2017-08-13Delete Text.Pandoc.Lua.SharedInstancesAlbert Krewinkel1-1/+0
Stack instances for common data types are now provides by hslua. The instance for Either was useful only for a very specific case; the function that was using the `ToLuaStack Either` instance was rewritten to work without it. Closes: #3805
2017-08-13Use hslua >= 0.7, update Lua codeAlbert Krewinkel1-128/+109
2017-08-12Docx writer: pass through comments.John MacFarlane1-8/+47
We assume that comments are defined as parsed by the docx reader: I want <span class="comment-start" id="0" author="Jesse Rosenthal" date="2016-05-09T16:13:00Z">I left a comment.</span>some text to have a comment <span class="comment-end" id="0"></span>on it. We assume also that the id attributes are unique and properly matched between comment-start and comment-end. Closes #2994.
2017-08-12Escape MetaString values (as added with --metadata flag).John MacFarlane1-6/+8
Previously they would be transmitted to the template without any escaping. Note that `--M title='*foo*'` yields a different result from --- title: *foo* --- In the latter case, we have emphasis; in the former case, just a string with literal asterisks (which will be escaped in formats, like Markdown, that require it). Closes #3792.
2017-08-11Added support for translations (localization) (see #3559).John MacFarlane4-7/+7
* readDataFile, readDefaultDataFile, getReferenceDocx, getReferenceODT have been removed from Shared and moved into Class. They are now defined in terms of PandocMonad primitives, rather than being primitve methods of the class. * toLang has been moved from BCP47 to Class. * NoTranslation and CouldNotLoudTranslations have been added to LogMessage. * New module, Text.Pandoc.Translations, exporting Term, Translations, readTranslations. * New functions in Class: translateTerm, setTranslations. Note that nothing is loaded from data files until translateTerm is used; setTranslation just sets the language to be used. * Added two translation data files in data/translations. * LaTeX reader: Support `\setmainlanguage` or `\setdefaultlanguage` (polyglossia) and `\figurename`.
2017-08-10Remove writerUserDataDir from WriterOptions.John MacFarlane1-1/+0
It is now carried in CommonState in PandocMonad instances. (And thus it can be used by readers too.)
2017-08-10Removed datadir param from readDataFile and getDefaultTemplate.John MacFarlane3-5/+3
In Text.Pandoc.Class and Text.Pandoc.Template, resp. We now get the datadir from CommonState.
2017-08-10Expose getDefaultDataFile in both Shared and Class.John MacFarlane1-1/+1