Links without text contents are converted to `<xref>` elements. DocBook
processors will generate appropriate cross-reference text when presented
with an xref element.
Makes the code more consistent and makes it easier to use double quotes
in strings, which is the usual quoting style used for HTML attributes.
Closes: #7487
If a file path does not exist relative to the working directory, but
it does exist relative to the user data directory, and it exists outside
of the user data directory, do not read it. This applies to readDataFile
and readMetadataFile in PandocMonad and, by extension, any module that
uses these by passing them relative paths.
If files specified with `--metadata-file` are not found in the working
directory, look in `$DATADIR/metadata`.
Expose new `readMetadataFile` function from Text.Pandoc.Class
[API change].
Expose new `PandocCouldNotFindMetadataFileError` constructor for
`PandocError` from Text.Pandoc.Error [API change].
Closes#5876.
If speaker notes (a Div with class 'notes') occur right
after a section heading, but above slide level, the
resulting `\note{..}` caommand should not be wrapped in
a frame, as that will cause a spurious blank slide.
Closes#7857.
With the new (default) line wrapping of HTML, in
conjunction with the default CSS which includes
`code { whitespace: pre-wrap; }`, spurious line
breaks could be introduced into inline code.
Closes#7858.
If a table has explicit column width information *and* the
content extends beyond the `--columns` width, we need to
adjust the widths of the pipe separators to encode this width
information.
Closes#7847.
Adjacent docx tables need to be separated by an empty paragraph. If
there's a RawBlock between tables which renders to nothing, be sure to
still insert the empty paragraph so that they will not collapse
together.
Fixes#7724
The V font is defined conditionally, so that it renders
like CB in output formats that support that, and like B
in those that don't (e.g. the terminal).
We could just redefine C, but this would affect code
blocks, too, and putting them all in boldface looks ugly,
I think.
Possible drawback: fragments created by pandoc's man
writer will presuppose a nonstandard V font.
Closes#7506.
Supersedes 253467a549.
Closes#7506.
This also allows us to get rid of some special casing
on definition lists that ensured that options in code
spans would be boldface. (If this change is ever reverted,
we'll need that again.)
Make sure that we only create one bullet per list item in docx. In
particular, when a div is a list item, its contained paragraphs will
now no longer wrongly get individual bullets.
This is accomplished by making sure that for each list, we only use
the associated numId once. Any repeated use would add incorrect
bullets to the document.
Closes#7689
The commit 7a9832166e
had the effect that blank lines would be collapsed
in HTML attributes.
We also roll back a change that collapsed multiple
spaces into one.
This adds support for alphabetical lists in org by enabling the
extension Ext_fancy_lists, mimicking the behaviour of Org Mode when
org-list-allow-alphabetical is enabled.
Enabling Ext_fancy_lists will also make Pandoc differentiate between the
delimiters of ordered lists (periods or closing parentheses). Org does
this differentiation by default when exporting to some formats (e.g.
plain text) but does not in others (e.g. html and latex), so I decided
to copy Pandoc's markdown reader behaviour.
Prior to this commit the MediaWiki writer always added the display
text for a wiki link:
* [[Help|Help]]
* [[Bubbles|Everyone loves bubbles]]
However the display text in the first example is redundant since
MediaWiki uses the target as the default display text. The result being:
* [[Help]]
* [[Bubbles|Everyone loves bubbles]]
This adds support for counter cookies in org lists. Such cookies are
used to override the item counter in ordered lists. In org it is
possible to set the counter at any list item, but since Pandoc AST does
not support this, we restrict the usage to setting an offset for the
entire ordered list, by using the cookie in the first list item.
Note that even though unordered lists do not have counters, Org Mode
still parses such cookies in unordered lists and suppresses them in the
output, so we do the same.
Also, even though org-list-allow-alphabetical is disabled in Emacs by
default, for some reason alphabetical cookies are always parsed and used
in Org Mode regardlessly of whether this option is enabled or the list
style is decimal, so we do the same.
E.g.
2. test
3. test
Is parsed as an ordered list starting at 1, as before. This also
conforms to Org Mode behaviour.
1. [@2] test
2. test
Is now parsed as an ordered list starting at 2, so that it conforms to
Org Mode behaviour.
Note that when parsing
1. [@2] test
2. [@9] test
the second cookie is silenced and the entire list starts at 2. This is
because the current Pandoc AST does not support expressing a change in
the counter at a specific item.