Albert Krewinkel
04658c491b
Org reader: handle line numbering switch for src blocks
...
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-23 11:54:36 +02:00
John MacFarlane
51a46b7e31
HTML reader: Revise treatment of li with id attribute.
...
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-23 11:03:48 +02:00
schrieveslaach
020dc63e23
Add siunitx Support ( #3588 )
...
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-22 21:57:21 +02:00
Albert Krewinkel
464db59394
Org reader: allow emphasized text to be followed by [
...
Closes : #3577
2017-04-16 21:19:35 +02:00
Albert Krewinkel
56dddcc3f5
Org reader: convert markup at beginning of footnotes
...
Closes : #3576
2017-04-16 17:22:47 +02:00
Albert Krewinkel
e6a536befc
Lua filter: revert to non-destructuring filters
...
We want to provide an interface familiar to users of other filtering
libraries.
2017-04-15 21:40:48 +02:00
John MacFarlane
bcc848d773
Avoid parsing "Notes:**" as a bare URI.
...
This avoids parsing bare URIs that start with a scheme
+ colon + `*`, `_`, or `]`.
Closes #3570 .
2017-04-15 13:32:28 +02:00
Albert Krewinkel
3aeed816e1
Lua filter: allow shorthand functions for math and quoted
...
Allow to use functions named `SingleQuoted`, `DoubleQuoted`,
`DisplayMath`, and `InlineMath` in filters.
2017-04-14 23:43:59 +02:00
Albert Krewinkel
07f41a5515
Lua filter: use destructured functions for block filters
...
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-14 11:34:44 +02:00
Albert Krewinkel
425df8fff4
Use lua constructors to push meta values
2017-04-13 22:57:50 +02:00
Albert Krewinkel
2761a38e53
Lua filter: use destructured functions for inline filters
...
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-12 20:48:44 +02:00
John MacFarlane
31a36cf186
Man writer: Fix handling of nested font commands.
...
Previously pandoc emitted incorrect markup for bold + italic, for example,
or bold + code.
Closes #3568 .
2017-04-12 12:23:29 +02:00
Albert Krewinkel
41ebdee5df
Lua filter: improve doc filter performance
...
Pandoc elements are pushed and pulled from the lua stack via custom
instances.
2017-04-07 21:04:22 +02:00
Albert Krewinkel
d412c38c71
Ensure correctness of StackValue instances
2017-04-06 21:00:38 +02:00
John MacFarlane
6b0d3d1582
Ms writer: wider indents for lists.
...
Previously some indents weren't wide enough, leading
the list item to start on a line after the marker.
2017-04-06 12:45:23 +02:00
John MacFarlane
12ae1df5bf
Allow raw latex commands starting with \start
in Markdown.
...
Previously these weren't allowed because they were interpreted
as starting ConTeXt environments, even without a corresponding
\stop...
Closes #3558 .
2017-04-06 11:30:03 +02:00
John MacFarlane
12a3481632
Ms writer: respect text wrapping options.
2017-04-05 15:17:35 +02:00
John MacFarlane
48729f9715
Ms writer improvements:
...
- added some variables to the default template.
- cleaner output for images (stringify alt text).
2017-04-04 17:21:02 +02:00
John MacFarlane
1ebb766aff
Ms writer: ensure that @ is escaped in URIs.
...
Otherwise we may get unescaped @s that give eqn fits,
with @ as the delimiter character.
2017-04-04 16:13:24 +02:00
Timm Albers
3e817124fe
Add class to footnote back references
...
The HTML writer now also adds the class footnoteBack to back references
of footnotes. This allows for easier CSS styling.
2017-04-03 17:02:16 +02:00
Albert Krewinkel
e7eb21ecca
Lua module: add readers submodule
...
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-02 17:28:07 +02:00
John MacFarlane
1c84a03509
Ms writer: added syntax highlighting.
...
Closes #3547 .
Macro definitions are inserted in the template when there is highlighted
code.
Limitations: background colors and underline currently not
supported.
2017-04-01 22:05:38 +02:00
John MacFarlane
34b9bee5a4
OpenDocument writer: wider labels for lists.
...
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-01 12:27:40 +02:00
John MacFarlane
8a3ef99882
JATS template: always include <back>
element even if empty.
2017-03-31 15:15:34 +02:00
John MacFarlane
3217bc192e
JATS writer: put references in <back>
.
...
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-31 11:07:09 +02:00
John MacFarlane
e5e2a6e0a5
JATS writer: use both tex and mml alternatives for math when possible.
2017-03-30 16:22:54 +02:00
John MacFarlane
0d06c632b1
JATS writer: Fixed bibliography handling.
2017-03-30 15:39:21 +02:00
John MacFarlane
9575dfc970
Merge branch 'jats'
2017-03-30 01:17:36 +02:00
John MacFarlane
831e1c5edd
Added JATS writer.
...
* New module Text.Pandoc.Writer.JATS exporting writeJATS.
* New output format `jats`.
* Added tests.
* Revised manual.
2017-03-30 01:16:34 +02:00
schrieveslaach
5fe734d452
lstinline with braces can be used (verb cannot be used with braces) ( #3535 )
...
* 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-29 14:49:46 +02:00
schrieveslaach
49d72444d7
LaTeX reader: add support for LaTeX subfiles package.
...
Closes #3530 .
2017-03-27 21:20:27 +02:00
John MacFarlane
fddd6ffdd0
Add blank lines to #3531 command test.
2017-03-26 20:48:54 +02:00
John MacFarlane
358dfba8f4
MediaWiki writer: don't softbreak lines inside list items.
...
Closes #3531 .
2017-03-26 20:41:09 +02:00
John MacFarlane
0eb62f03fe
Ms writer: Hyperlink table of contents and other improvements.
2017-03-26 20:03:37 +02:00
John MacFarlane
bd99d9f6af
Ms writer: Add PDF outline bookmarks.
2017-03-26 18:06:15 +02:00
John MacFarlane
0cb0aa7308
Fixed a test not updated on last commit.
2017-03-26 17:15:53 +02:00
John MacFarlane
e30d2c700a
Ms writer: Use @ instead of | for inline math delimiter.
...
The `|` delimiter had a bad interaction with tbl.
See discussion in #1839 .
2017-03-26 16:59:38 +02:00
John MacFarlane
267e1a13ea
Ms writer: Support external links.
...
Also add config options for link color.
2017-03-26 11:05:23 +02:00
John MacFarlane
d9e8e84be0
Ms writer: better placement of header anchors.
2017-03-26 10:44:34 +02:00
John MacFarlane
1d659bec01
Ms writer: Implement header identifiers and internal links.
2017-03-25 22:16:44 +01:00
John MacFarlane
ed6249bd0b
Ms writer: use light gray for strikeout.
...
Pending groff definitions for striking out an arbitrary
section of text (not just a few words).
2017-03-25 20:53:32 +01:00
John MacFarlane
c941a00cac
Ms writer: improved pdf metadata.
2017-03-25 19:30:24 +01:00
John MacFarlane
7d3d5387ac
Updated test suite for ms template change.
2017-03-25 11:45:05 +01:00
John MacFarlane
2e20129903
Ms. writer: links: use footnote only for absolute URIs.
2017-03-25 10:35:05 +01:00
John MacFarlane
14ebd289ea
Updated tests.
2017-03-25 09:27:04 +01:00
John MacFarlane
c13cfe8f5d
Ms writer: Use indented paragraphs after first in section.
...
Note that the current indentation setting is 0; see the
settings in the template.
2017-03-24 23:32:28 +01:00
John MacFarlane
af57de0b27
default.ms: Add settings for document variables like width.
2017-03-24 22:15:46 +01:00
John MacFarlane
a7ae4b1ee2
Ms writer: support --toc, date, abstract.
2017-03-24 17:25:09 +01:00
John MacFarlane
438e8686cf
Markdown writer: don't emit a simple table if simple_tables
disabled.
...
Closes #3529 .
2017-03-24 16:11:56 +01:00
John MacFarlane
2251d9cb73
Ms writer: Use custom .HRULE macro for horizontal rule.
2017-03-24 09:23:19 +01:00