Commit graph

9218 commits

Author SHA1 Message Date
John MacFarlane
c806ef1b15 LaTeX reader: Support simple \def macros.
Note that we still don't support macros with fancy parameter
delimiters, like

    \def\foo#1..#2{...}
2017-08-07 16:06:19 -07:00
John MacFarlane
9e6b9cdc5f LaTeX reader: Support \let.
Also, fix regular macros so they're expanded at the
point of use, and NOT also the point of definition.
`\let` macros, by contrast, are expanded at the
point of definition.  Added an `ExpansionPoint`
field to `Macro` to track this difference.
2017-08-07 13:38:15 -07:00
John MacFarlane
3504915e63 LaTeX writer: Don't use figure inside table cell.
Closes #3836.
2017-08-06 22:31:15 -07:00
Alexander
1b5bfced55 Muse reader: debug indented paragraph support (#3839)
Take only first line indentation into account
and do not start new paragraph on indentation change.
2017-08-06 21:43:59 -07:00
Jesse Rosenthal
a67a96b932 Docx reader: Add tests for avoiding zero-level header. 2017-08-06 19:36:25 -07:00
Jesse Rosenthal
a36a56b8ac Docx reader: Avoid 0-level headers.
We used to parse paragraphs styled with "HeadingN" as "nth-level
header." But if a document has a custom style named "Heading0", this
will produce a 0-level header, which shouldn't exist. We only parse
this style if N>0. Otherwise we treat it as a normal style name, and
follow its dependencies, if any.

Closes #3830.
2017-08-06 19:35:03 -07:00
Alexander
8164a005c0 Muse reader: debug list and list item separation rules (#3837) 2017-08-06 13:19:59 -07:00
bucklereed
685788cd4b LaTeX reader: plainbreak, fancybreak et al from the memoir class (#3833) 2017-08-05 10:03:31 -07:00
Alexander Krotov
7a3a8790de Muse reader: do not allow headers in blockquotes (#3831) 2017-08-03 15:41:45 -07:00
Alexander Krotov
38b6adaac0 Muse reader: do not parse blocks inside comments (#3828) 2017-08-03 09:11:00 -07:00
John MacFarlane
ced834076d DokuWiki reader: better handling for code block in list item.
Closes #3824.
2017-08-02 10:33:08 -07:00
John MacFarlane
9932d52b53 Use latest cmark. 2017-08-02 09:20:06 -07:00
John MacFarlane
48bb7abb2a linux/control.in: add Replaces:...
so existing pandoc-citeproc and pandoc-data packages will be
uninstalled; this package provides both.

Closes #3822.
2017-08-02 07:12:14 -07:00
John MacFarlane
b8afec05e0 Markdown writer: better escaping of < and >.
If `all_symbols_escapable` is set, we backslash escape these.
Otherwise we use entities as before.
2017-07-30 13:45:22 -07:00
John MacFarlane
8cbc28415e Class: more haddocks. 2017-07-30 07:43:55 -07:00
John MacFarlane
7f9e950d8d Class: Removed unnecessary withMedia, improved haddocks. 2017-07-30 07:43:55 -07:00
Wandmalfarbe
200b5fb60c Sorted the list of supported HTML5 attributes and removed duplicates. (#3817) 2017-07-26 18:50:10 +02:00
John MacFarlane
303d10d07b Small tweak in test (add --wrap=preserve). 2017-07-26 12:55:15 +02:00
John MacFarlane
e0ab09611a HTML writer: render raw inline environments when --mathjax used.
We previously did this only with raw blocks, on the assumption
that math environments would always be raw blocks. This has changed
since we now parse them as inline environments.

Closes #3816.
2017-07-26 12:50:36 +02:00
John MacFarlane
2daab579f4 MANUAL: clarify that mathml is used for ODT math. 2017-07-26 00:00:54 +02:00
John MacFarlane
d441e656db HTML writer: insert data- in front of unsupported attributes.
Thus, a span with attribute 'foo' gets written to HTML5
with 'data-foo', so it is valid HTML5.

HTML4 is not affected.

This will allow us to use custom attributes in pandoc without
producing invalid HTML.
2017-07-25 13:13:24 +02:00
John MacFarlane
fe0ffd272e Merge branch 'schrieveslaach-textcolor-support' 2017-07-25 11:42:45 +02:00
John MacFarlane
2b039acb4e Merge branch 'textcolor-support' of https://github.com/schrieveslaach/pandoc into schrieveslaach-textcolor-support 2017-07-25 11:42:10 +02:00
John MacFarlane
862d92f09a Revert "Travis: Try not caching .cabal."
This reverts commit 5370c38203.
2017-07-24 18:45:49 +02:00
John MacFarlane
54777dfbd1 Revert "Travis: try not caching .ghc."
This reverts commit 434309802c.
2017-07-24 18:45:42 +02:00
John MacFarlane
434309802c Travis: try not caching .ghc. 2017-07-24 17:32:17 +02:00
John MacFarlane
5370c38203 Travis: Try not caching .cabal.
Hoping this solves the problems with recent builds.
2017-07-24 16:30:56 +02:00
John MacFarlane
214e7919b7 Revert "Use cabal-2.0 for 8.2.1 (#3814)"
This reverts commit d8f07fad09.
2017-07-24 11:45:54 +02:00
John MacFarlane
329b61ff5c LaTeX reader: support etoolbox's ifstrequal. 2017-07-24 11:20:59 +02:00
John MacFarlane
e7876d4320 LaTeX reader: removed code for non-exported 'macro'. 2017-07-24 00:25:35 +02:00
Matthew Pickering
d8f07fad09 Use cabal-2.0 for 8.2.1 (#3814) 2017-07-24 00:11:30 +02:00
John MacFarlane
439ffc2e7f Added a test case with markdown-latex_macros. 2017-07-24 00:02:55 +02:00
John MacFarlane
159d31e80f LaTeX reader: Removed 'macro'.
It is no longer necessary, since the rawLaTeXBlock parser
will parse macro definitions.

This also avoids the need for a separate latexMacro parser
in the Markdown reader.
2017-07-24 00:02:55 +02:00
John MacFarlane
be14e2b501 LaTeX reader: some improvements in macro parsing.
Fixed applyMacros so that it operates on the whole
string, not just the first token!

Don't remove macro definitions from the output,
even if Ext_latex_macros is set, so that macros will
be applied.  Since they're only applied to math in
Markdown, removing the macros can have bad effects.
Even for math macros, keeping them should be harmless.
2017-07-24 00:02:55 +02:00
John MacFarlane
d453b3319a Refactored some common code in LaTeX reader. 2017-07-24 00:02:54 +02:00
Mauro Bieg
7d9b782f73 HTML Reader: parse figure and figcaption (#3813) 2017-07-22 19:22:56 +02:00
John MacFarlane
f9309bc46e LaTeX reader: improved heuristic for raw block/inline.
An unknown command at the beginning of the line that could
be either block or inline is treated as block if we have
a sequence of block commands followed by a newline or a
`\startXXX` command (which might start a raw ConTeXt environment).
2017-07-21 23:27:54 +02:00
rlpowell
2ae75e23dd Added TikiWiki reader (#3800)
Added TikiWiki reader, including tests and documentation.

It's probably not *complete*, but it works pretty well, handles all
the basics (and some not-so-basics).
2017-07-21 10:09:54 +02:00
Alexander Krotov
335a1c7f48 Muse reader: fix reading of lists inside tags (#3802) 2017-07-21 10:04:13 +02:00
John MacFarlane
7191fe1f29 LaTeX reader: handle optional args in raw \titleformat.
Closes #3804.
2017-07-21 09:28:36 +02:00
John MacFarlane
992943d98e Templates: change signature of getDefaultTemplate.
Now it runs in any instance of PandocMonad, and returns
a String rather than an Either value.
2017-07-19 21:46:28 +02:00
John MacFarlane
2ce6b492e1 Class: started adding haddocks. 2017-07-19 21:31:46 +02:00
John MacFarlane
56f63af3f6 LaTeX reader: fixed regression with starred environment names.
Closes #3803.
2017-07-19 17:30:22 +02:00
John MacFarlane
3267af23f0 Travis: Removed ghc 8.2.1 build from allowed failures. 2017-07-15 19:39:58 +02:00
John MacFarlane
4e8f7a1796 Fix docx writer test for ghc 8.2.1.
Workaround for different behavior of Data.Unique in different ghc
versions.
2017-07-15 11:39:01 +02:00
John MacFarlane
dcf79c4188 Don't rely on listDirectory, which is only in newer versions...
of directory.
2017-07-15 11:38:43 +02:00
John MacFarlane
3871a73e0f Rearrange docx writer roundtrip test.
I'm hoping this gives reproducible results on ghc 8.2.1.
2017-07-15 09:14:17 +02:00
John MacFarlane
4e9e1bae7c Refactored compareOutput in docx writer test 2017-07-14 23:39:33 +02:00
John MacFarlane
df5a00990e Class: make addToFileTree handle directories recursively. 2017-07-14 17:28:13 +02:00
John MacFarlane
f8fef1ebb0 Class: remove stFontFiles in PureState, 'glob' searches stFiles. 2017-07-14 16:35:29 +02:00