Previously we always generated an id for headers (since they wouldn't
bring one from Docx). Now we let it use an existing one if
possible. This should allow us to recurs through anchor spans.
Previously, we would only be able to figure out internal links to a
header in a docx if the anchor span was empty. We change that to read
the inlines out of the first anchor span in a header.
This still leaves another problem: what to do if there are multiple
anchor spans in a header. That will be addressed in a future commit.
Pandoc and Org-mode use different programming language identifiers. An
additional translation between those identifiers is added to avoid
unexpected behavior. This fixes a problem where language specific
source code would sometimes be output as example code.
* Remove nitty-gritty details about custom-style filters (it won't make
sense to readers unfamiliar with filters, and would be obvious to
users already familiar with them).
* Fix a capitalization.
Org-mode treats links as document internal searches unless the link
target looks like a URL or file path, either relative or absolute. This
change ensures that this is always the case.
An Org-mode figure should be surrounded by blank lines. The figure
would be recognized regardless, but images in the following line would
unintentionally be treated as figures as well.
- remove a space between `[` and `*` in the list of input formats, to match the list of output formats
- add space after the `*`s, for improved readability
This just tests whether a custom style with a recognizable
style (italic etc, defined in a reference.docx) will roundtrip back to
that format (i.e., whether `<span custom-style="Emphasized">` will
roundtrip to `Emph`). The custom styles are defined in the
`custom-style-reference.docx` included in the docx dir.
Sometimes we will want to get back something different than we started
with in a round-trip test. This allows for that, and makes the perfect
roundtrip a special case.
This enables dynamic styling on spans. It uses the same prefix as we
used on divs ("docx-style" for the moment). It does not yet inject the
style into styles.xml.
Make it clearer that structured author variables require a custom
template.
Many thanks to John Muccigrosso (@Jmuccigr) for his help in addressing
this issue.
This supersedes and closes#2148.
The functions `isElem` and `elemName` (defined in Docx/Util.hs) make the
code a lot cleaner than the original XML.Light functions, but they had
been used inconsistently. This puts them in wherever applicable.
Image sources as those in plain images, image links, or figures, must be
proper URIs or relative file paths to be recognized as images. This
restriction is now enforced for all image sources.
This also fixes the reader's usage of uncleaned image sources, leading
to `file:` prefixes not being deleted from figure
images (e.g. `[[file:image.jpg]]` leading to a broken image `<img
src="file:image.jpg"/>)
Thanks to @bsag for noticing this bug.
Previously these yielded strings of alternating Code and Space
elements; we now incorporate the spaces into the Code. Emphasis
etc. is still possible inside these.
Closes#3055.
Previously an unquoted attribute value in a table row
could cause parsing problems.
Fixes#3053 (well, proper rowspans and colspans aren't
created, but that's a bigger limitation with the current
Pandoc document model for tables).
In the latex parser when includes are processed, the text of the
included file is directly included into the parse stream. This caused
problems when there was an error in the included file (and the included
file was longer than the original file) as the error would be reported
at this position.
The error handling tries to display the line and position where the
error occured. It works by including a copy of the input and finding the
place in the input when given the position of the error. In the
previously described scenario, the input file would be the original
source file but the error position would be the position of the error in
the included file.
The fix is to not try to show the exact line when it would cause an
out-of-bounds error.
The starred variants don't exist.
This helps with part of #3058...it gets rid of the spurious *s.
But we still have numbers on the 4th and 5th level headers.