When German quotation marks („ and “ or HTML code „
and “
, see https://unicode-table.com/de/201E/ and https://unicode-table.com/de/201C/) are in between bold text markers **...**
, then pandoc does not render the text bold when I knit in RStudio. Even worse, the **
s are printed verbatim in the HTML document.
Example:
---
output: html_document
lang: de
---
This is a **„Test“**.
Another **„Test“**.
This **"just works"**.
Result:
Are there any pandoc options or workarounds for solving this problem?
Note that a similar question was answered for PDF output in r-markdown: German quotation marks. But I need HTML output.
To make the formatted text into bold type, you can simply use a pair of ** around the marked up text with no space. For example **bold** in the . Rmd file generates bold in the output document.
The correct way to write quotes in Markdown is to just write quotes literally, i.e., use " " . They will be converted to the correct LaTeX code (i.e., `` '' ) when Markdown is converted to LaTeX (via Pandoc). The same thing applies to single quotes.
Italic, bold, and headersTo write text in italic font, use a single underscore or asterix before and after the text. To write text in bold font, use a double asterix or underscores before and after the text.
If you really want to underline text you can use <span style="text-decoration:underline">underline this text</span> for HTML output or $\text{\underline{This sentence underlined using \LaTeX}}$ for pdf output.
The issue tracking input of localized quotes is https://github.com/jgm/pandoc/issues/661.
Meanwhile, I recommend using non-typographic quotes ("
) and for HTML-output use the --html-q-tags
option and some CSS, like:
q {
quotes: '„' '“';
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With