aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
2013-06-02LaTeX writer: Always create labels for sections.John MacFarlane1-7/+9
Previously the labels were only created when there were links to the section in the document. Closes #871.
2013-05-31Add --atx-headers support to asciidoc and dont print empty identifier blocks ↵Max Rydahl Andersen1-2/+11
([[]]) on headers
2013-05-29Added CPP directives to avoid warnings.John MacFarlane1-0/+3
For 'import Prelude hiding (catch)'. catch is no longer in Prelude starting with base 4.6.
2013-05-22EPUB writer: math with `--webtex` is automatically made self-contained.John MacFarlane1-17/+16
And some code cleanup.
2013-05-22EPUB writer: Download webtex images and include as data URLs.John MacFarlane1-25/+32
This allows you to use `--webtex` in creating EPUBs.
2013-05-02RTF writer: Properly handle characters above the 0000-FFFF range.John MacFarlane1-2/+12
Uses surrogate pairs. Thanks to Hiromi Ishii for the patch.
2013-04-25Don't convert to lowercase in email obfuscation.John MacFarlane1-6/+8
Closes #839.
2013-04-20Add slash in internal links in reveal.js.John MacFarlane1-3/+16
Closes #835.
2013-04-15Fixed footnote numbers in LaTeX/PDF tables.John MacFarlane1-17/+4
This fixes a bug wherein notes were numbered incorrectly in tables. Closes #827. Now that we are using longtable, we can just use regular `\footnote` commands for notes, which simplifies the code considerably.
2013-04-14Markdown/RST writers: Only autolink absolute URIs.John MacFarlane2-4/+8
This fixes a regression and closes #830. $ echo '<a href="x">x</a>' | pandoc -f html -t markdown <x>
2013-04-14Added `Text.Pandoc.Writers.Custom`, `--print-custom-lua-writer`.John MacFarlane1-0/+230
pandoc -t data/sample.lua will load the script sample.lua and use it as a custom writer. data/sample.lua is provided as an example. Added `--print-custom-lua-writer` option to print the sample script.
2013-04-09Man writer: use one decimal place for column widths.John MacFarlane1-1/+1
This, I hope, will fix test failures on GHC 7.6 due to (presumably) different rounding or floating point multiplication.
2013-04-08Markdown writer: Put multiple authors on separate lines in titleblock.John MacFarlane1-1/+1
Also, don't wrap long author entries, as new lines get treated as new authors.
2013-03-30Docx writer: Use Compact style for Plain block elements.John MacFarlane1-2/+8
This differentiates between tight and loose lists. Closes #775.
2013-03-28Allow simple tables to be printed as grid tables.John MacFarlane1-11/+14
if other table options are disabled. This means you can do pandoc -t markdown-pipe_tables-simple_tables-multiline_tables and all tables will render as grid tables.
2013-03-26Removed blaze_html_0_5 flag, require blaze-html >= 0.5.John MacFarlane1-4/+0
Reason: < 0.5 does not provide a monoid instance for Attribute, which is now needed by the HTML writer. Closes #803.
2013-03-24EPUB writer: Don't put blank title page in reading sequence.John MacFarlane1-1/+4
Set linear="no" if no title block. Addresses #797.
2013-03-24EPUB writer: Add `id="toc-title"` to h1 in nav.xhtml.John MacFarlane1-1/+1
Closes #799.
2013-03-24Added syntax for "pauses" in beamer or reaveljs slide shows.John MacFarlane2-0/+10
This gives . . . a pause.
2013-03-23Reveal.js improvements.John MacFarlane1-0/+1
Changed name to revealjs (from reveal_js). Set revealjs-url template variable to 'reveal.js' by default.
2013-03-21reveal_js: nested vertical stacks used for hierarchical structure.John MacFarlane1-2/+4
Variant of a patch from jamiefolson. Results for more than one level of nesting may be odd. Perhaps this needs revising.
2013-03-21Support incremental slide view for definition lists.John MacFarlane1-11/+12
All slide formats supported. Simplified some list code.
2013-03-21Added basic support for reveal.js.Jamie F. Olson1-15/+15
Support unordered and ordered lists with "fragment" elements. Modified by JGM to remove the --reveal_js-url command-line option. Instead use -V reveal_js-url=... as with slidy and the other slide formats. Also cleaned up the list code in the HTML writer.
2013-03-20EPUB writer: Don't add dc:creator tags if present in epub metadata.John MacFarlane1-1/+1
2013-03-20Added OPML template, tests.John MacFarlane1-4/+13
Minor fixes to OPML writer. Improved OPML reader tests.
2013-03-19Added Text.Pandoc.Writers.OPML.John MacFarlane1-0/+81
TODO: * Document in README * Add tests * Add template (and add template to cabal file)
2013-03-18Docx writer: Fixed rendering of display math in lists.John MacFarlane1-13/+27
In 1.11 and 1.11.1, display math in lists rendered as a new list item. Now it always appears centered, just as outside of lists, and in proper display math style, no matter how far indented the containing list item is. Closes #784.
2013-03-17Markdown writer: New approach for citations.John MacFarlane1-14/+4
* Reverts 1.11 change that caused citations to be rendered as markdown citations, even if `--biblio` was specified, unless `citation` extension is disabled. Now, formatted citations are always printed if `--biblio` was specified. If you want to reformat markdown keeping pandoc markdown citations intact, just don't specify `--biblio`. * Reverted now unnecessary changes to Text.Pandoc.Biblio adding the raw block to mark the bibliography, and to Text.Pandoc.Writers.Markdown to remove the bibliography if `citations` not specified. * If the content of a `Cite` inline is a `RawInline "latex"`, which means that a LaTeX citation command was parsed and `--biblio` wasn't specified, then render it as a pandoc markdown citation. This means that `pandoc -f latex -t markdown`, without `--biblio`, will convert LaTeX citation commands to pandoc markdown citations.
2013-03-17Markdown writer: Omit bibliography when `citations` enabled.John MacFarlane1-2/+12
In 1.11, citations would be rendered as pandoc markdown citations, but the bibliography would still be printed. We avoid that by adding a `RawBlock "pandoc" "references"` before the references. This allows the markdown writer to find the references and strip them off when `citations` is enabled.
2013-03-17Revert "LaTeX reader: citation handling changes."John MacFarlane1-2/+1
This reverts commit f7229b147314042f946dfded3b441ab0fae260a0.
2013-03-16Fixed numbering mismatch between TOC and sections in HTML.John MacFarlane1-1/+2
Also made `--number-offset` affect TOC numbering as well as section numbering, as it should have all along. Closes #789.
2013-03-15Fixed regression in ODT writer.John MacFarlane1-2/+2
This was due to a change in the Show instance for Text.Pandoc.Pretty.Doc, which led 1.11 to produce corrupt ODTs. Closes #780.
2013-03-11Fixed spacing bugs involving code block attributes.John MacFarlane1-1/+1
Closes #763.
2013-03-09LaTeX reader: citation handling changes.John MacFarlane1-1/+2
Previously, a LaTeX citation would always be parsed as a Citation element, with the raw LaTeX in the [Inline] part. Now, the LaTeX citation is parsed as a Citation element only if `--biblio` was specified (i.e. only if there is a nonempty set of references in readerReferences). Otherwise it is parsed as raw LaTeX. This will make it possible to simplify some things in the markdown writer. It also makes the LaTeX reader behave more like the Markdown reader.
2013-03-07Markdown writer: Render citations as pandoc-markdown citations.John MacFarlane1-1/+1
Previously citations were rendered as citeproc-formatted citations by default. Now we render them as pandoc citations, e.g. `[@item1]`, unless the `citations` extension is disabled. If you still want formatted citations in your markdown output, use `pandoc -t markdown-citations`.
2013-03-06Support :number-lines: in RST code output.John MacFarlane1-2/+6
2013-03-05Hide Text.Pandoc.Highlighting.John MacFarlane1-57/+4
* Moved code for translating listings language names to highlighting-kate names and back from LaTeX reader to Highlighting. * Text.Pandoc.Highlighting no longer exposed (API change) * Text.Pandoc.Highlighting exports toListingsLang, fromListingsLang
2013-03-04LaTeX writer: Support line numbering with `--listings`.John MacFarlane1-2/+8
If "numberLines" class is present, we add "numbers=left"; if "startFrom" is present, we add "firstnumber=". Partially addresses #763.
2013-03-03EPUB writer: Include html TOC even in epub2.John MacFarlane1-15/+23
* The TOC is included in `<spine>`, but `linear` is set to `no` unless the `--toc` option is specified. * Include `<guide>` element in OPF. * This should allow the TOC to be useable in Kindles when converted with kindlegen. * Results validate with epubcheck 3.0 for both epub and epub3 output. * Closes #773.
2013-03-01Textile writer: Removed an unused assignment.John MacFarlane1-1/+0
2013-02-28Markdown writer: Use grid tables when needed, and if enabled.John MacFarlane1-1/+31
Closes #740.
2013-02-28Textile writer: Support header attributes.John MacFarlane1-3/+9
2013-02-26Docx writer: Better treatment of display math.John MacFarlane1-13/+19
Display math inside a paragraph is now put in a separate paragraph, so it will render properly (centered and without extra blank lines around it). Partially addresses #742.
2013-02-26Changed style names in reference docx.John MacFarlane1-4/+4
FootnoteReference -> FootnoteRef. Hyperlink -> Link. Why? Because the old names got changed by Word when the reference.docx was edited. I don't understand why, but this fixes things. Closes #414.
2013-02-26Docx writer: Create content types and document rels from scratch.John MacFarlane1-15/+79
This fixes problems that arise when you edit the reference.docx with Word. Word tends to remove things from the `[Content_Types].xml` and `word/_rels/document.xml.rels` files that are needed (e.g. references to the `footnotes.xml` file and image default mime types). So we regenerate these completely rather than taking them from the `reference.docx`. We also now encode mime types for each individual image rather than using defaults. This should allow us to handle a wider range of image types. This mostly addresses #414. The only remaining issue I can see is the issue of style IDs, which Word inexplicably changes in some cases when the reference.docx is saved. E.g. `FootnoteReference` becomes `FootnoteReference1`.
2013-02-25Refactoring in Docx writer.John MacFarlane1-24/+44
2013-02-23Docx writer: Handle PDF images.John MacFarlane1-0/+1
2013-02-23EPUB writer: Improved behavior with `--number-sections`.John MacFarlane1-7/+24
* Headers with "unnumbered" attribute are not numbered. (Nor do they cause an increment in running numbering.) * Section numbers now work properly, even when there is material before the first numbered section.
2013-02-23EPUB writer: more transition.John MacFarlane1-6/+10
Changed toChunks to toChapters.
2013-02-23EPUB writer: Temporary step towards a better system for numbering.John MacFarlane1-5/+8
With this change, `--number-sections` won't work. This will be fixed later.