Age | Commit message (Collapse) | Author | Files | Lines |
|
Traditionally pandoc operates on multiple files by first concetenating
them (around extra line breaks) and then processing the joined file. So
it only parses a multi-file document at the document scope. This has the
benefit that footnotes and links can be in different files, but it also
introduces a couple of difficulties:
- it is difficult to join files with footnotes without some sort of
preprocessing, which makes it difficult to write academic documents
in small pieces.
- it makes it impossible to process multiple binary input files, which
can't be catted.
- it makes it impossible to process files from different input
formats.
This commit introduces alternative method. Instead of catting the files
first, it parses the files first, and then combines the parsed
output. This makes it impossible to have links across multiple files,
and auto-identified headers won't work correctly if headers in multiple
files have the same name. On the other hand, footnotes across multiple
files will work correctly and will allow more freedom for input formats.
Since ByteStringReaders can currently only read one binary file, and
will ignore subsequent files, we also changes the behavior to
automatically parse before combining if using the ByteStringReader. If
we use one file, it will work as normal. If there is more than one file
it will combine them after parsing (assuming that the format is the
same).
Note that this is intended to be an optional method, defaulting to
off. Turn it on with `--file-scope`.
|
|
Have docx reader use it.
|
|
The regular readDocx just becomes a special case.
|
|
In order to be able to collect warnings during parsing, we add a state
monad transformer to the D monad. At the moment, this only includes a
list of warning strings (nothing currently triggers them, however). We
use StateT instead of WriterT to correspond more closely with the
warnings behavior in T.P.Parsing.
|
|
+ If the base path does not end with slash, the last component
will be replaced. E.g. base = `http://example.com/foo`
combines with `bar.html` to give `http://example.com/bar.html`.
+ If the href begins with a slash, the whole path of the base
is replaced. E.g. base = `http://example.com/foo/` combines
with `/bar.html` to give `http://example.com/bar.html`.
Closes #2777.
|
|
closes #2754
|
|
Fixes #2765.
Added test case.
|
|
|
|
We already allowed them in the header, but not in the body
rows, for some reason. This gives compatibility with org-mode
tables.
|
|
Previously an emph element could be parsed across the newline
at the end of the pipe table row.
I thought this would help with #2765, but it doesn't.
|
|
|
|
The feature checklist in the source code was out of date. Update.
|
|
e.g. `$$\hbox{$i$}$$`.
Partially addresses #2743.
|
|
The docx reader used to use a Modifiable typeclass to combine both
Blocks and Inlines. But all the work was in the inlines. So most of the
generality was wasted, at the expense of making the code harder to
understand. This gets rid of the generality, and adds functions for
Blocks and Inlines. It should be a bit easier to work with going forward.
|
|
Closes #2737.
|
|
This should give better performance.
See #2730.
|
|
|
|
Prefix even empty figure names with "fig:"
|
|
Markdown writer: Use hyphens for yaml metadata block bottom line
|
|
Org reader: Refactor link-target processing
|
|
This version avoids an exponential performance problem with `<script>` tags,
and it should be faster in general.
Closes #2730.
|
|
Make sure that we require the closing bracket.
|
|
We currently treat all memoir templates as books. This means that pandoc
will infer the `--chapters` argument, even if the `article` iption is
set for memoir.
This commit makes pandoc treats the document as an article if there is
an article option (i.e., `\documentclass[12pt,article]{memoir}`).
Note that this refactors out the parsec parsers for document class and
options, to make it a little clearer what's going on.
|
|
Closes #2718.
|
|
Closes #2707.
|
|
Closes #2697.
|
|
Previously smart quotes were incorrect in the following:
'$\neg(x \in x)$'.
(because of the following period). This commit fixes the problem,
which was introduced by commit 4229cf2d92faf5774fe1a3a9c89a5de885cf75cd.
|
|
Previously these were given "left" alignment. Better to leave off
alignment attributes altogether.
Closes #2694.
|
|
We want to make sure that links have their spaces removed, and are
appropriately smushed together.
This closes #2689
|
|
Cleanup of the code for link target handling. Most notably, the
canonicalization of a link is handled by a separate function.
This fixes #2684.
|
|
This gives better results when people write e.g. `\TeX{}` in Markdown.
\TeX{} and \LaTeX{}
now works as expected with `pandoc -f markdown -t latex`.
Closes #2687.
|
|
Put them in a list in the metadata so they are all
preserved, rather than (as before) throwing out all
but one..
|
|
See #2171.
|
|
Closes #2674.
|
|
For example, `py` will now work as well as `python`.
Closes jgm/highlighting-kate#83.
|
|
This avoids performance problems in documents with many identically
named headers.
Closes #2671.
|
|
Add TEI Writer.
|
|
|
|
|
|
Change types of divs.
From Docbook "sect#" and "simplesect" to "level#" and
"section."
Add tests.
Add mention of TEI to README.
Small changes to TEI writer.
|
|
|
|
Since the 'math' is only put into the template if stMath is
set anyway, there's no need for this conditional.
|
|
|
|
The convention used by pandoc for figures is to mark them by prefixing
the name with "fig:". The org reader failed to do this if a figure had
no name. The test for this was broken as well.
This fixes #2643.
|
|
See fpco/stackage#1096.
|
|
Closes #2645.
In cases where a match was not found for a quote, everything
from the open quote to the end of the paragraph was being dropped.
|
|
|
|
A Span is rendered with surrounding {braces}.
This was a regression in 1.16. Closes #2624.
|
|
|
|
Issue submitted at tagsoup.
|