`\phantomsection` is used for anchors. When these occur inside a caption,
a LaTeX error is raised unless the `\phantomsection` is protected using `\protect`.
So we now `\protect` every `\phantomsection` (even outside of captions -- this
seems to be harmless).
This allows one, for example, to set a custom \date in the
header-includes of the rmarkdown yaml frontmatter. Without this
conditional, the custom \date in the frontmatter would be overridden by
a (potentially empty) date from this template later.
Previously we tried to handle things like commented out list
items:
- one
<!--
- two
-->
- three
and also things like:
- one `and
- two` and
But the code we added to handle these cases caused problems with
other, more straightforward things, like:
- one
- ```
code
```
- three
So we are rolling back all the fanciness, so that the markdown
parser now behaves more like the commonmark parser, in which
indicators of block-level structure always take priority over
indicators of inline structure.
Closes#9865. Closes#7778. See also #5628.
Otherwise we get `**content**` which means strong emphasis.
This is a more robust solution than using `_`, which won't work
for intraword emphasis.
Closes#10642.
Users commonly complain about the warning when producing HTML
documents without an explicit title. It seems that an info message
is more appropriate, since pandoc's default here (using the input's
base name) ensures compliance with the standard and many users
are happy with that default. Those who want to make sure the
message is seen can use `--verbose`.
Closes#10671.
Otherwise we get undesirable results, as the format's native
citation mechanism is used instead of (or in addition to) the
citeproc-generated citations. Closes#10662.
This reverts commit cbe67b9602.
Word sets `w:firstColumn="1"` by default for tables. You have to find
the Table Design tab and explicitly uncheck "First Column" to make this
go away. In most cases, I don't think writers intend to designate
the first column as a row head, so this commit is going to produce
unexpected results. In addition, because of the table normalization
done by pandoc-type's `tableWith`, any table containing a colspanned
cell in the left-hand column will get broken if the first column is
designated a row head. For these reasons it seems best to revert this
change, which was made in response to #9495.
Closes#10627.
Certain `role` and `epub:type` attributes should only be on the section
(and indeed, many `role`s give a validation error if left on the heading
element).