aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-04-07Fixed a typo (#3562)Sam Kim1-1/+1
2017-04-07Lua filter: improve doc filter performanceAlbert Krewinkel2-37/+56
Pandoc elements are pushed and pulled from the lua stack via custom instances.
2017-04-06Ensure correctness of StackValue instancesAlbert Krewinkel2-0/+29
2017-04-06Lua filter: Improve block filter performanceAlbert Krewinkel1-7/+44
Reading of simple block values from the lua stack is handled manually, but most block constructors are still handled via instances of aeson's Value type.
2017-04-06Lua filter: Improve inline filter performanceAlbert Krewinkel1-7/+73
Getting inline instances from the lua stack is handled manually for some simple inline constructors, including the `Str` constructor. This avoids the indirect route through aeson's Value type and improves performance considerably (approx. 30% speedup for some filters).
2017-04-04Use lua registry instead of named globalsAlbert Krewinkel1-5/+11
This is slightly cleaner while keeping performance approximately the same.
2017-04-06Ms writer: wider indents for lists.John MacFarlane2-101/+102
Previously some indents weren't wide enough, leading the list item to start on a line after the marker.
2017-04-06Allow raw latex commands starting with `\start` in Markdown.John MacFarlane2-1/+10
Previously these weren't allowed because they were interpreted as starting ConTeXt environments, even without a corresponding \stop... Closes #3558.
2017-04-05Ms writer: respect text wrapping options.John MacFarlane3-70/+45
2017-04-04Ms writer improvements:John MacFarlane4-22/+30
- added some variables to the default template. - cleaner output for images (stringify alt text).
2017-04-04Small fixes to ms template.John MacFarlane1-6/+6
2017-04-04Ms writer: ensure that @ is escaped in URIs.John MacFarlane2-3/+7
Otherwise we may get unescaped @s that give eqn fits, with @ as the delimiter character.
2017-04-04Error: Added PandocOptionError.John MacFarlane2-1/+3
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-04Merge pull request #3556 from nunull/issue1831_footnoteBackRefsJohn MacFarlane3-11/+11
Add class to footnote back references
2017-04-03Add class to footnote back referencesTimm Albers3-11/+11
The HTML writer now also adds the class footnoteBack to back references of footnotes. This allows for easier CSS styling.
2017-04-03Merge pull request #3553 from nunull/masterJohn MacFarlane1-2/+5
Include \VerbatimFootnotes for highlighted code blocks
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-03Removed unused import.John MacFarlane1-1/+0
2017-04-03Removed unused imports from Setup.hs.John MacFarlane1-6/+2
2017-04-03Merge pull request #3550 from tarleb/lua-readers-submoduleJohn MacFarlane6-32/+172
Lua module: add readers submodule
2017-04-02Make sure docx/_rels/.rels gets into data files.John MacFarlane1-1/+5
embedDir in file-embed excludes hidden files, so we need to add this manually.
2017-04-02MANUAL: document highlighting support in ms.John MacFarlane1-6/+6
2017-04-02Revert "Revert "Use file-embed instead of hsb2hs to embed data files.""John MacFarlane6-38/+8
This reverts commit 1fa15c225b515e1fa1c6566f90f1be363a4d770f.
2017-04-02Text.Pandoc.App: Throw errors rather than exiting.John MacFarlane6-57/+72
These are caught (and lead to exit) in pandoc.hs, but other uses of Text.Pandoc.App may want to recover in another way. Added PandocAppError to PandocError (API change). This is a stopgap: later we should have a separate constructor for each type of error. Also fixed uses of 'exit' in Shared.readDataFile, and removed 'err' from Shared (API change). Finally, removed the dependency on extensible-exceptions. See #3548.
2017-04-02Lua module: add readers submoduleAlbert Krewinkel6-32/+172
Plain text readers are exposed to lua scripts via the `pandoc.reader` submodule, which is further subdivided by format. Converting e.g. a markdown string into a pandoc document is possible from within lua: doc = pandoc.reader.markdown.read_doc("Hello, World!") A `read_block` convenience function is provided for all formats, although it will still parse the whole string but return only the first block as the result. Custom reader options are not supported yet, default options are used for all parsing operations.
2017-04-01Added data/default.theme to repository.John MacFarlane1-0/+177
2017-04-01Allow a theme file as argument to `--highlight-style`.John MacFarlane3-3/+17
Also include a sample, `default.theme`, in `data/`.
2017-04-01Ms writer: added syntax highlighting.John MacFarlane3-7/+90
Closes #3547. Macro definitions are inserted in the template when there is highlighted code. Limitations: background colors and underline currently not supported.
2017-04-01Use latest skylighting.John MacFarlane2-2/+2
This means we no longer need language.dtd when loading custom highlighting definitions. See #3334.
2017-04-01OpenDocument writer: wider labels for lists.John MacFarlane2-191/+191
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-04-01Change MathJax CDN default since old one is shutting down.John MacFarlane1-1/+1
New URL: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js Announcement: https://www.mathjax.org/cdn-shutting-down/ NOTE: The new URL requires a version number, which we'll have to update manually in subsequent pandoc releases in order to take advantage of mathjax improvements. Closes #3544.
2017-03-31JATS writer: don't include jats.csl in metadata if csl already specified.John MacFarlane1-1/+3
2017-03-31JATS template: always include `<back>` element even if empty.John MacFarlane2-2/+4
2017-03-31JATS writer: put references in `<back>`.John MacFarlane4-1596/+1606
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-30Add JATS to description in pandoc.cabal.John MacFarlane1-1/+1
2017-03-30jats template: added xml-stylesheet variable.John MacFarlane1-0/+3
2017-03-30Allow dynamic loading of syntax definitions.John MacFarlane7-31/+74
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-30Don't read jats.csl unless we actually need it.John MacFarlane1-5/+6
2017-03-30Automatically include URI-encoded jats.csl for jats output.John MacFarlane4-2/+223
This way people can do pandoc -s -t jats --filter pandoc-citeproc and it will just work. If they want to specify a stylesheet, they still can.
2017-03-30SelfContained: export makeDataURIJohn MacFarlane1-1/+1
2017-03-30JATS writer: use both tex and mml alternatives for math when possible.John MacFarlane2-13/+28
2017-03-30Compile with latest pandoc-citeproc.John MacFarlane1-1/+1
2017-03-30JATS writer: Fixed bibliography handling.John MacFarlane2-11/+16
2017-03-30Merge branch 'jats'John MacFarlane9-6/+2683
2017-03-30Added JATS writer.John MacFarlane7-6/+2485
* New module Text.Pandoc.Writer.JATS exporting writeJATS. * New output format `jats`. * Added tests. * Revised manual.