summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Use latest texmath.John MacFarlane2017-06-30
|
* Markdown writer: Ensure that `+` and `-` are escaped properly...John MacFarlane2017-06-30
| | | | | | | so they don't cause spurious lists. Previously they were only if succeeded by a space, not if they were at end of line. Closes #3773.
* Added parameter for user data directory to runLuaFilter.John MacFarlane2017-06-29
| | | | | | | | | | in Text.Pandoc.Lua. Also to pushPandocModule. This change allows users to override pandoc.lua with a file in their local data directory, adding custom functions, etc. @tarleb, if you think this is a bad idea, you can revert this. But in general our data files are all overridable.
* data/pandoc.lua: regularize constructors.John MacFarlane2017-06-29
| | | | | | We now use Pandoc instead of Doc (though Doc remains a deprecated Synonym), and we deprecate DoubleQuoted, SingleQuoted, InlineMath, and DisplayMath.
* Text.Pandoc.Lua: more code simplification.John MacFarlane2017-06-29
| | | | | | | | Also, now we check before running walkM that the function table actually does contain something relevant. E.g. if your filter just defines Str, there's no need to run walkM for blocks, meta, or the whole document. This should help performance a bit (and it does, in my tests).
* Lua filters: Remove special treatment of Quoted, Math.John MacFarlane2017-06-29
| | | | | | No more SingleQuoted, DoubleQuoted, InlineMath, DisplayMath. This makes everything uniform and predictable, though it does open up a difference btw lua filters and custom writers.
* Text.Pandoc.Lua: refactored to remove duplicated code.John MacFarlane2017-06-29
|
* Text.Pandoc.Lua: use generics to reduce boilerplate.John MacFarlane2017-06-29
| | | | | | | | | | | I tested this with the str.lua filter on MANUAL.txt, and I could see no significant performance degradation. Doing things this way will ease maintenance, as we won't have to manually modify this module when types change. @tarleb, do we really need special cases for things like DoubleQuoted and InlineMath?
* Added link-table example to doc/lua-filters.md.John MacFarlane2017-06-28
|
* Make `papersize: a4` work regardless of the case of `a4`.John MacFarlane2017-06-28
| | | | It is converted to `a4` in LaTeX and `A4` in ConTeXt.
* LaTeX template: added `natbiboptions` variable.John MacFarlane2017-06-28
| | | | Closes #3768.
* Muse reader: parse indented blockquotes (#3769)Alexander Krotov2017-06-28
|
* LaTeX writer: fixed detection of otherlangs.John MacFarlane2017-06-28
| | | | | | We weren't recursing into inline contexts. Closes #3770.
* Text.Pandoc.Lua: catch lua errors in filter functionsAlbert Krewinkel2017-06-27
| | | | Replace lua errors with `LuaException`s.
* Text.Pandoc.Lua: keep element unchanged if filter returns nilAlbert Krewinkel2017-06-27
| | | | | This was suggested by jgm and is consistent with the behavior of other filtering libraries.
* Text.Pandoc.Lua: simplify filter function runnerAlbert Krewinkel2017-06-27
| | | | | | | The code still allowed to pass an arbitrary number of arguments to the filter function, as element properties were passed as function arguments at some point. Now we only pass the element as the single arg, so the code to handle multiple arguments is no longer necessary.
* data/pandoc.lua: add accessors to Table elementsAlbert Krewinkel2017-06-27
|
* Require nonempty alt text for `implicit_figures`.John MacFarlane2017-06-27
| | | | | | A figure with an empty caption doesn't make sense. Closes #2844.
* RST reader: support anchors.John MacFarlane2017-06-27
| | | | | | | | | | | | | | | E.g. `hello` .. _hello: paragraph This is supported by putting "paragraph" in a Div with id `hello`. Closes #262.
* RST reader: Handle chained link definitions.John MacFarlane2017-06-27
| | | | | | | | | | | For example, .. _hello: .. _goodbye: example.com Here both `hello` and `goodbye` should link to `example.com`. Fixes the first part of #262.
* Docx writer: Allow 9 list levels.John MacFarlane2017-06-27
| | | | Closes #3519.
* Removed redundant element from data/docx/word/numbering.xml.John MacFarlane2017-06-27
| | | | | The elements we need are generated when the document is compiled; this didn't do anything.
* HTML reader: Use the lang value of <html> to set the lang meta value. (#3765)bucklereed2017-06-27
| | | | | | * HTML reader: Use the lang value of <html> to set the lang meta value. * Fix for pre-AMP environments.
* OpenDocument/ODT writer: Added support for table of contents.John MacFarlane2017-06-26
| | | | | | Closes #2836. Thanks to @anayrat.
* Support `--toc` in `opendocument`/`odt`.John MacFarlane2017-06-26
|
* Use `table-of-contents` for contents of toc, make `toc` a boolean.John MacFarlane2017-06-26
| | | | | | | | | | | | | | Changed markdown, rtf, and HTML-based templates accordingly. This allows you to set `toc: true` in the metadata; this previously produced strange results in some output formats. Closes #2872. For backwards compatibility, `toc` is still set to the toc contents. But it is recommended that you update templates to use `table-of-contents` for the toc contents and `toc` for a boolean flag.
* Muse writer: fix hlint errors (#3764)Alexander Krotov2017-06-26
|
* LaTeX writer: use BCP47 parser.John MacFarlane2017-06-26
|
* parseBCP47: Parse extensions and private-use as variants.John MacFarlane2017-06-26
| | | | | Even though officially they aren't. This suffices for our purposes.
* minor updates to vimwiki reader. (#3759)Yuchen Pei2017-06-26
| | | | | - updated comments in Vimwiki.hs to reflect current status of implementation - added vimwiki to trypandoc
* Muse reader: fix horizontal rule parsing (#3762)Alexander Krotov2017-06-26
| | | Do not parse 3 dashes as horizontal rule and allow whitespace after rule
* Muse reader: simplify para implementation (#3761)Alexander Krotov2017-06-26
|
* BCP47: split toLang from getLang, rearranged types.John MacFarlane2017-06-25
|
* Refactored ConTeXt writer to use BCP47.John MacFarlane2017-06-25
| | | | | BCP47 - consistent case for BCP47 fields (e.g. uppercase for region).
* Moved BCP47 specific functions from Writers.Shared to new module.John MacFarlane2017-06-25
| | | | | Text.Pandoc.BCP47 (unexported, internal module). `getLang`, `Lang(..)`, `parseBCP47`.
* Writers.Shared: improve type of Lang and bcp47 parser.John MacFarlane2017-06-25
| | | | Use a real parsec parser for BCP47, include variants.
* Fixed log message for InvalidLang.John MacFarlane2017-06-25
|
* Writers.Shared: refactored getLang, splitLang...John MacFarlane2017-06-25
| | | | into `Lang(..)`, `getLang`, `parceBCP47`.
* Fixed support for `lang` attribute in OpenDocument and ODT writers.John MacFarlane2017-06-25
| | | | | | | This improves on the last commit, which didn't work in some important ways. See #1667.
* Support `lang` attribute in OpenDocument and ODT writers.John MacFarlane2017-06-25
| | | | | | | | | | This adds the required attributes to the temporary styles, and also replaces existing language attributes in styles.xml. Support for lang attributes on Div and Span has also been added. Closes #1667.
* Added InvalidLang to LogMessage.John MacFarlane2017-06-25
|
* Text.Pandoc.Writers.Shared: export splitLang.John MacFarlane2017-06-25
|
* Text.Pandoc.Writers.Shared: added getLang.John MacFarlane2017-06-25
|
* Makefile: split 'make haddock' from 'make full'.John MacFarlane2017-06-25
|
* Muse reader: Require space before and after '=' for code (#3758)Alexander Krotov2017-06-25
|
* Readers.getReader, Writers.getWriter API change.John MacFarlane2017-06-24
| | | | | | | | | | | | | Now these functions return a pair of a reader/writer and an Extensions, instead of building the extensions into the reader/writer. The calling code must explicitly set readerExtensions or writerExtensions using the Extensions returned. The point of the change is to make it possible for the calling code to determine what extensions are being used. See #3659.
* Makefile: improved 'make full'.John MacFarlane2017-06-24
| | | | | | - Disable optimizations. - Build everything, inc. trypandoc and benchmarks. - Use parallel build.
* Extensions: Monoid instance for Extensions.John MacFarlane2017-06-24
| | | | [API change]
* Added comment in source.John MacFarlane2017-06-23
|
* Markdown reader: interpret YAML metadata as Inlines when possible.John MacFarlane2017-06-23
| | | | | | | | | | | | | | | | | If the metadata field is all on one line, we try to interpret it as Inlines, and only try parsing as Blocks if that fails. If it extends over one line (including possibly the `|` or `>` character signaling an indented block), then we parse as Blocks. This was motivated by some German users finding that date: '22. Juin 2017' got parsed as an ordered list. Closes #3755.