aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)AuthorFilesLines
2013-08-16LaTeX writer: Avoid problem with footnotes in unnumbered headers.John MacFarlane1-6/+7
Closes #940. Added test case.
2013-08-14Updated for removed unMeta, unFormat in pandoc-types.John MacFarlane1-2/+2
2013-08-11ODT/OpenDocument writer: Minor changes for ODF 1.2 conformance.John MacFarlane2-7/+16
See #939. We leave the nonconforming contextual-spacing attribute, which is provided by LibreOffice itself and seems to be supported.
2013-08-11Options: Changed `writerSourceDir` to `writerSourceURL` (now a Maybe).John MacFarlane3-21/+12
Previously we used to store the directory of the first input file, even if it was local, and used this as a base directory for finding images in ODT, EPUB, Docx, and PDF. This has been confusing to many users. It seems better to look for images relative to the current working directory, even if the first file argument is in another directory. writerSourceURL is set to 'Just url' when the first command-line argument is an absolute URL. (So, relative links will be resolved in relation to the first page.) Otherwise, 'Nothing'. The ODT, EPUB, Docx, and PDF writers have been modified accordingly. Note that this change may break some existing workflows. If you have been assuming that relative links will be interpreted relative to the directory of the first file argument, you'll need to make that the current directory before running pandoc. Closes #942.
2013-08-10Use walk, walkM in place of bottomUp, bottomUpM when possible.John MacFarlane7-20/+24
They are significantly faster.
2013-08-10Use query instead of queryWith.John MacFarlane2-5/+6
2013-08-10Adjustments for new Format newtype.John MacFarlane14-66/+95
2013-08-08Preliminary support for new Div and Span elements in writers.John MacFarlane17-0/+56
Currently these are "transparent" containers, except in HTML, where they produce div and span elements with attributes.
2013-08-08Added Text.Pandoc.Compat.Monoid.John MacFarlane1-1/+1
This allows pandoc to compile with base < 4.5, where Data.Monoid doesn't export `<>`. Thanks to Dirk Ullirch for the patch.
2013-08-06Added support for MetaBool.John MacFarlane2-0/+3
2013-08-04Remove CPP from default-extensions; add pragmas to modules as needed.John MacFarlane1-5/+1
2013-08-03MediaWiki writer: Use native mediawiki tables instead of HTML.John MacFarlane1-44/+39
Closes #720.
2013-07-26Beamer: add allowframebreaks to slide if set in header classes.John MacFarlane1-8/+11
It's recommended that your bibliography slide have this attribute: # References {.allowframebreaks} This causes multiple slides to be created if necessary, depending on the length of the bibliography.
2013-07-25LaTeX writer: Change `\` to `/` in paths.John MacFarlane1-2/+4
`/` works even on Windows in LaTeX. `\` will cause major problems if unescaped.
2013-07-18Fixed warning.John MacFarlane1-1/+1
2013-07-18Improved fetching of external resources.John MacFarlane3-8/+12
* In Shared, openURL and fetchItem now return an Either, for better error handling. (API change.) * Better error message when fetching a URL fails with `--self-contained`. * EPUB writer: If resource not found, skip it, as in Docx writer. * Closes #916.
2013-07-16Text.Pandoc.ImageSize: Handle EPS.John MacFarlane1-0/+1
Closes #903. This change will make EPS images properly sized on conversion to Word.
2013-07-14Fixing wrong numbered-list indentation in open document formatAlexander Kondratskiy1-5/+7
2013-07-13Docx writer: Make `--no-highlight` work properly.John MacFarlane1-7/+11
2013-07-13Checking options before applying syntax highlighting for HTML outputAlexander Kondratskiy1-3/+9
2013-07-12Docx writer: Ignore most components of reference.docx.John MacFarlane1-24/+41
We take the word/styles.xml, docProps/app.xml, word/theme/theme1.xml, and word/fontTable.xml from reference.docx, ignoring everything else. Perhaps this will help with the corruption problems caused when different versions of Word resave the reference.docx and reorganize things.
2013-07-04Docx writer: Use w:br with w:type 'textWrapping' for linebreaks.John MacFarlane1-1/+1
Previously we used w:cr. I don't see a difference between these in my version of Word, but apparently some do. Closes #873.
2013-07-04LaTeX writer: Don't use ligatures in escaping inline code.John MacFarlane1-9/+15
2013-07-02Rename `Ext_yaml_title_block` -> `Ext_yaml_metadata_block`.John MacFarlane1-4/+4
2013-07-02Markdown writer: Changed condition for rendering title block.John MacFarlane1-4/+3
Previously it was only rendered if title, author, or date set. Now any metadata field can be set.
2013-07-02Write full metadata in MMD style title blocks.John MacFarlane1-7/+23
2013-07-01Markdown writer: Commas are okay in plain yaml scalars.John MacFarlane1-1/+1
It's just commas with brackets that can cause problems.
2013-07-01Markdown writer: Render yaml title block fields in alpha order.John MacFarlane1-2/+3
This makes the output predictable; previously it varied across implementations.
2013-07-01Added Text.Pandoc.Writers.Shared to repository.John MacFarlane1-0/+121
This should have been in last commit.
2013-07-01Created Text.Pandoc.Writers.Shared, improved metaToJSON.John MacFarlane15-39/+38
* Text.Pandoc.Writers.Shared contains shared functions used only in writers. * metaToJSON now takes a WriterOptions parameter, and will return an empty object if standalone is not specified.
2013-07-01Improvements to yaml title block writer.John MacFarlane1-24/+37
2013-07-01Revert "Markdown writer: Don't include variables in metadata."John MacFarlane1-41/+35
This reverts commit 0ec8573347d53e0cba70552a50dba697f39216b6.
2013-07-01Markdown writer: Don't include variables in metadata.John MacFarlane1-35/+41
2013-06-30Markdown writer: Support yaml title block.John MacFarlane1-8/+30
2013-06-29Metadata changes: Variables now completely shadow metadata.John MacFarlane15-35/+32
Previously if you set a value both in metadata and with a variable, they'd be combined into a list. Now the variable replaces the value in document metadata. If many variables with the same name are set, a list is created. Shared: metaToJSON now has an argument for a variable list.
2013-06-28ConTeXt writer: Properly handle tables without captions.John MacFarlane1-2/+4
The old output only worked in MkII. This should work in MkIV as well. Closes #837.
2013-06-27Custom writer: Pass full metadata, not just tit/auth/date.John MacFarlane1-5/+15
2013-06-27Writers: Use defField for defaults.John MacFarlane15-83/+83
This way explicitly specified fields not overridden. Fixes a problem e.g. with specifying a documentclass via the command line using -V.
2013-06-27Man writer: give more fine-grained control in template.John MacFarlane1-10/+16
Now the `title`, `section`, `header`, and `footer` can all be set individually in metadata. The `description` variable has been removed. Quotes have been added so that spaces are allowed in the title. If you have a title that begins COMMAND(1) footer here | header here pandoc will parse it as before into a title, section, header, and footer. But you can also specify these elements explicitly. Closes #885.
2013-06-26Stop escaping `|` in LaTeX math.John MacFarlane1-9/+2
This caused problems with array environments. Closes #891.
2013-06-25Fixed regression with RTF table of contents.John MacFarlane1-1/+4
2013-06-25Some test suite fixes for new metadata.John MacFarlane1-1/+1
2013-06-24Use new flexible metadata type.John MacFarlane20-365/+365
* Depend on pandoc 1.12. * Added yaml dependency. * `Text.Pandoc.XML`: Removed `stripTags`. (API change.) * `Text.Pandoc.Shared`: Added `metaToJSON`. This will be used in writers to create a JSON object for use in the templates from the pandoc metadata. * Revised readers and writers to use the new Meta type. * `Text.Pandoc.Options`: Added `Ext_yaml_title_block`. * Markdown reader: Added support for YAML metadata block. Note that it must come at the beginning of the document. * `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`, `stateAuthors`, `stateDate` with `stateMeta`. * RST reader: Improved metadata. Treat initial field list as metadata when standalone specified. Previously ALL fields "title", "author", "date" in field lists were treated as metadata, even if not at the beginning. Use `subtitle` metadata field for subtitle. * `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string instead of a compiled template.. * OPML template: Use 'for' loop for authors. * Org template: '#+TITLE:' is inserted before the title. Previously the writer did this.
2013-06-24Revised Text.Pandoc.Templates to accept JSON contexts.John MacFarlane2-2/+10
Currently the library is set up with a shim for association lists, for compatibility, but this can change when the writers are changed. New export: `varListToJSON`. Removed `Empty`. Simplified template type to a newtype.
2013-06-11Markdown writer: Don't wrap attributes in fenced code blocks.John MacFarlane1-2/+2
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.