aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-05-03LaTeX reader: Add support for tabularx environment (#3632)schrieveslaach2-1/+116
2017-05-03Markdown Writer: put space before reference link definitionsMauro Bieg2-1/+9
Fixes #3630 (#3631). Previously the attributes in link reference definitions did not have a space preceding.
2017-05-02Added PandocResourceNotFound error.John MacFarlane6-29/+14
Use this instead of PandocIOError when a resource is not found in path. This improves the error message in this case, see #3629.
2017-05-02stack.yaml: use lts-8.12.John MacFarlane3-7/+4
This should fix the build failure on travis.
2017-05-02Markdown writer: Case-insensitive reference links. (#3616)David A Roberts2-14/+34
Ensure that we do not generate reference links whose labels differ only by case. Also allow implicit reference links when the link text and label are identical up to case. Closes #3615.
2017-05-02FB2 writer: Add support for "lang" metadata (#3625)Alexander Krotov1-2/+7
2017-04-30Lua filter: fall-back to global filters when none is returnedAlbert Krewinkel4-2/+25
The implicitly defined global filter (i.e. all element filtering functions defined in the global lua environment) is used if no filter is returned from a lua script. This allows to just write top-level functions in order to define a lua filter. E.g function Emph(elem) return pandoc.Strong(elem.content) end
2017-04-30Document lua filtersAlbert Krewinkel1-0/+109
2017-04-30Lua module: simplify Attributes, rename to AttrAlbert Krewinkel2-60/+27
Attributes was written to behave much like a normal table, in order to simplify working with it. However, all Attr containing elements were changed to provide panflute-like accessors to Attr components, rendering the previous approach unnecessary.
2017-04-30Lua module: make Header argument order consistentAlbert Krewinkel2-3/+3
Attributes are always passed as the last element, making it possible to omit this argument. Argument order for `Header` was wrong and is fixed.
2017-04-30Lua module: add example for usage of `read`Albert Krewinkel1-1/+11
2017-04-30Provide shared F monad functions for Markdown and Org readersAlbert Krewinkel4-52/+36
The `F` monads used for delayed evaluation of certain values in the Markdown and Org readers are based on a shared data type capturing the common pattern of both `F` types.
2017-04-30Add returnF to Text.Pandoc.ParsingAlexander Krotov2-3/+3
2017-04-30Org reader: Avoid creating nullMeta by applying setMeta directlyAlexander Krotov1-4/+1
2017-04-29LaTeX writer: Fix problem with escaping in lstinline.John MacFarlane6-2/+20
Previously the LaTeX writer created invalid LaTeX when `--listings` was specified and a code span occured inside emphasis or another construction. This is because the characters `%{}\` must be escaped in lstinline when the listinline occurs in another command, otherwise they must not be escaped. To deal with this, adoping Michael Kofler's suggestion, we always wrap lstinline in a dummy command `\passthrough`, now defined in the default template if `--listings` is specified. This way we can consistently escape the special characters. Closes #1629.
2017-04-28LaTeX writer: don't use lstinline it \item[..].John MacFarlane2-1/+19
If you do, the contents of item disappear or are misplaced. Use `\texttt` instead. Closes #645.
2017-04-28Ms writer: make use of already defined render' (#3613)Alexander Krotov1-2/+2
2017-04-28Muse writer: Do not reflow directives (#3614)Alexander Krotov1-2/+2
Directives at the beginning of documents cannot span multiple lines so they must not be reflown.
2017-04-26Lua module: provide simple `read` format parserAlbert Krewinkel4-68/+44
A single `read` function parsing pandoc-supported formats is added to the module. This is simpler and more convenient than the previous method of exposing all reader functions individually.
2017-04-26API change: move writer functions to Text.Pandoc.WritersAlbert Krewinkel3-154/+196
Writer helper functions were defined in the top-level Text.Pandoc module. These functions are moved to the Writer submodule as to enable reuse in other submodules.
2017-04-26API change: move reader functions to Text.Pandoc.ReadersAlbert Krewinkel3-92/+151
Reader helper functions were defined in the top-level Text.Pandoc module. These functions are moved to the Readers submodule as to enable reuse in other submodules.
2017-04-26API change: move extension handling to Text.Pandoc.ExtensionsAlbert Krewinkel2-64/+75
Extension parsing and processing functions were defined in the top-level Text.Pandoc module. These functions are moved to the Extensions submodule as to enable reuse in other submodules.
2017-04-26Lua filter: allow filtering of meta data onlyAlbert Krewinkel2-1/+25
2017-04-26Lua filter: allow natural access to meta elementsAlbert Krewinkel2-14/+19
Meta elements that are treated as lua tables (i.e. MetaList, MetaInlines, MetaBlocks, and MetaMap), are no longer wrapped in an additional table but simply marked via a metatable. This allows treating those meta values just like normal tables, while still making empty elements of those values distinguishable.
2017-04-26LaTeX reader: Add basic support for hyphenat package (#3603)schrieveslaach2-1/+62
2017-04-26Simplify linkText in Text.Pandoc.Readers.TWiki (#3605)Alexander Krotov1-2/+2
Avoid constructing list of one element ([B.str url]) just to flatten it back with mconcat.
2017-04-26LaTeX reader: Add support for \vdots (#3607)schrieveslaach2-0/+13
2017-04-25HTML line block: Use class instead of style attribute.John MacFarlane16-1/+16
We now issue `<div class="line-block">` and include a default definition for `line-block` in the default templates, instead of hard-coding a `style` on the div. Closes #1623.
2017-04-25LaTeX writer: fix error with line breaks after empty content.John MacFarlane2-19/+42
LaTeX requires something before a line break, so we insert a `~` if no printable content has yet been emitted. Closes #2874.
2017-04-24LaTeX reader: better support for subfigure package.John MacFarlane2-5/+46
A figure with two subfigures turns into two pandoc figures; the subcaptions are used and the main caption ignored, unless there are no subcaptions. Closes #3577.
2017-04-24TWiki reader: remove unnecessary $ (#3597)Alexander Krotov1-1/+1
2017-04-23Org reader: allow multi-word arguments to src block paramsAlbert Krewinkel2-2/+14
The reader now correctly parses src block parameter list even if parameter arguments contain multiple words. Closes: #3477
2017-04-23Org reader: stop adding rundoc prefix to src paramsAlbert Krewinkel4-72/+50
Source block parameter names are no longer prefixed with *rundoc*. This was intended to simplify working with the rundoc project, a babel runner. However, the rundoc project is unmaintained, and adding those markers is not the reader's job anyway. The original language that is specified for a source element is now retained as the `data-org-language` attribute and only added if it differs from the translated language.
2017-04-23Org reader: handle line numbering switch for src blocksAlbert Krewinkel2-13/+66
The line-numbering switch that can be given to source blocks (`-n` with an start number as an optional parameter) is parsed and translated to a class/key-value combination used by highlighting and other readers and writers.
2017-04-23HTML reader: Revise treatment of li with id attribute.John MacFarlane2-2/+67
Previously we always added an empty div before the list item, but this created problems with spacing in tight lists. Now we do this: If the list item contents begin with a Plain block, we modify the Plain block by adding a Span around its contents. Otherwise, we add a Div around the contents of the list item (instead of adding an empty Div to the beginning, as before). Closes #3596.
2017-04-22Use foundation-0.0.7.John MacFarlane2-0/+2
See https://github.com/haskell-foundation/foundation/issues/238 for the bug on Windows with 0.0.6.
2017-04-22Add siunitx Support (#3588)schrieveslaach2-0/+38
For example: ```latex \SI[round-precision=2]{1}{m} is equal to \SI{1000}{mm}. \SI[round-precision=2]{1}[\$]{} is equal to \SI{0.938094}{\euro} ```
2017-04-22Allow aeson 1.2.0.0.John MacFarlane1-1/+1
2017-04-22Use skylighitng >= 0.3.3.John MacFarlane1-2/+2
2017-04-22Use latest skylighting, lts.John MacFarlane2-5/+4
2017-04-18Lua: drop useless filter function type parameterAlbert Krewinkel1-28/+20
The return-type parameter for lua filter functions is removed. It only complicated the code without introducing any additional type safety.
2017-04-16Org reader: allow emphasized text to be followed by `[`Albert Krewinkel2-1/+11
Closes: #3577
2017-04-16Read image size of Inkscape SVGs (#3580)schrieveslaach1-4/+4
2017-04-16Org reader: convert markup at beginning of footnotesAlbert Krewinkel2-1/+11
Closes: #3576
2017-04-15Lua filter: revert to non-destructuring filtersAlbert Krewinkel5-77/+58
We want to provide an interface familiar to users of other filtering libraries.
2017-04-15Lua module: provide accessors to element propertiesAlbert Krewinkel1-39/+109
2017-04-15Small fix to error reporting in App.John MacFarlane1-4/+2
Closes #3548.
2017-04-15Avoid parsing "Notes:**" as a bare URI.John MacFarlane2-0/+8
This avoids parsing bare URIs that start with a scheme + colon + `*`, `_`, or `]`. Closes #3570.
2017-04-15Error: Added PandocCouldNotFindDataFileError.John MacFarlane3-7/+9
Use this instead of PandocAppError when appropriate. Removed exit code from PandocAppError, use 1 for all.
2017-04-15Fixed shadowing warningsJohn MacFarlane1-5/+5