aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2017-05-03Org reader: support table.el tablesAlbert Krewinkel1-0/+34
Closes #3314
2017-05-03Markdown writer: better escaping for links (#3628)David A Roberts1-0/+28
Previously the Markdown writer would sometimes create links where there were none in the source. This is now avoided by selectively escaping bracket characters when they occur in a place where a link might be created. Closes #3619.
2017-05-03LaTeX reader: Add support for tabularx environment (#3632)schrieveslaach1-0/+110
2017-05-03Markdown Writer: put space before reference link definitionsMauro Bieg1-0/+8
Fixes #3630 (#3631). Previously the attributes in link reference definitions did not have a space preceding.
2017-05-02Markdown writer: Case-insensitive reference links. (#3616)David A Roberts1-0/+18
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-04-30Lua filter: fall-back to global filters when none is returnedAlbert Krewinkel2-0/+12
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-29LaTeX writer: Fix problem with escaping in lstinline.John MacFarlane3-1/+12
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 MacFarlane1-0/+12
If you do, the contents of item disappear or are misplaced. Use `\texttt` instead. Closes #645.
2017-04-26Lua module: provide simple `read` format parserAlbert Krewinkel1-1/+2
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-26Lua filter: allow filtering of meta data onlyAlbert Krewinkel1-0/+12
2017-04-26LaTeX reader: Add basic support for hyphenat package (#3603)schrieveslaach1-0/+49
2017-04-26LaTeX reader: Add support for \vdots (#3607)schrieveslaach1-0/+12
2017-04-25HTML line block: Use class instead of style attribute.John MacFarlane7-0/+7
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 MacFarlane1-0/+14
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 MacFarlane1-0/+35
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-23Org reader: allow multi-word arguments to src block paramsAlbert Krewinkel1-0/+9
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 Krewinkel1-33/+26
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 Krewinkel1-0/+9
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 MacFarlane1-0/+61
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-22Add siunitx Support (#3588)schrieveslaach1-0/+21
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-16Org reader: allow emphasized text to be followed by `[`Albert Krewinkel1-0/+10
Closes: #3577
2017-04-16Org reader: convert markup at beginning of footnotesAlbert Krewinkel1-0/+10
Closes: #3576
2017-04-15Lua filter: revert to non-destructuring filtersAlbert Krewinkel4-11/+12
We want to provide an interface familiar to users of other filtering libraries.
2017-04-15Avoid parsing "Notes:**" as a bare URI.John MacFarlane1-0/+6
This avoids parsing bare URIs that start with a scheme + colon + `*`, `_`, or `]`. Closes #3570.
2017-04-14Lua filter: allow shorthand functions for math and quotedAlbert Krewinkel2-14/+28
Allow to use functions named `SingleQuoted`, `DoubleQuoted`, `DisplayMath`, and `InlineMath` in filters.
2017-04-14Lua filter: use destructured functions for block filtersAlbert Krewinkel2-4/+3
Filtering functions take element components as arguments instead of the whole block elements. This resembles the way elements are handled in custom writers.
2017-04-13Use lua constructors to push meta valuesAlbert Krewinkel1-2/+6
2017-04-12Lua filter: use destructured functions for inline filtersAlbert Krewinkel1-4/+5
Instead of taking the whole inline element, forcing users to destructure it themselves, the components of the elements are passed to the filtering functions.
2017-04-12Man writer: Fix handling of nested font commands.John MacFarlane2-4/+19
Previously pandoc emitted incorrect markup for bold + italic, for example, or bold + code. Closes #3568.
2017-04-07Lua filter: improve doc filter performanceAlbert Krewinkel1-1/+9
Pandoc elements are pushed and pulled from the lua stack via custom instances.
2017-04-06Ensure correctness of StackValue instancesAlbert Krewinkel1-0/+28
2017-04-06Ms writer: wider indents for lists.John MacFarlane1-96/+96
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 MacFarlane1-0/+8
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 MacFarlane2-69/+39
2017-04-04Ms writer improvements:John MacFarlane1-14/+8
- added some variables to the default template. - cleaner output for images (stringify alt text).
2017-04-04Ms writer: ensure that @ is escaped in URIs.John MacFarlane1-2/+2
Otherwise we may get unescaped @s that give eqn fits, with @ as the delimiter character.
2017-04-03Add class to footnote back referencesTimm Albers2-10/+10
The HTML writer now also adds the class footnoteBack to back references of footnotes. This allows for easier CSS styling.
2017-04-02Lua module: add readers submoduleAlbert Krewinkel2-0/+18
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-01Ms writer: added syntax highlighting.John MacFarlane1-2/+2
Closes #3547. Macro definitions are inserted in the template when there is highlighted code. Limitations: background colors and underline currently not supported.
2017-04-01OpenDocument writer: wider labels for lists.John MacFarlane1-189/+189
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-03-31JATS template: always include `<back>` element even if empty.John MacFarlane1-0/+2
2017-03-31JATS writer: put references in `<back>`.John MacFarlane2-1593/+1589
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-30JATS writer: use both tex and mml alternatives for math when possible.John MacFarlane1-8/+21
2017-03-30JATS writer: Fixed bibliography handling.John MacFarlane1-6/+10
2017-03-30Merge branch 'jats'John MacFarlane3-0/+2044
2017-03-30Added JATS writer.John MacFarlane3-0/+2044
* New module Text.Pandoc.Writer.JATS exporting writeJATS. * New output format `jats`. * Added tests. * Revised manual.
2017-03-29lstinline with braces can be used (verb cannot be used with braces) (#3535)schrieveslaach1-0/+23
* Fix lstinline handling: lstinline with braces can be used (verb cannot be used with braces) * Use codeWith and determine the language from lstinline * Improve code * Add another test: convert lstinline without language option
2017-03-27LaTeX reader: add support for LaTeX subfiles package.schrieveslaach3-0/+38
Closes #3530.
2017-03-26Add blank lines to #3531 command test.John MacFarlane1-0/+2
2017-03-26MediaWiki writer: don't softbreak lines inside list items.John MacFarlane1-0/+19
Closes #3531.