I am having an issue with quotation marks inside captions using bookdown
. The following rmarkdown
doc illustrates the issue.
---
title: "testdoc"
author: "Dayne Filer"
date: "10/21/2020"
output:
pdf_document: default
html_document: default
---
In the main document, "quotation marks" are appropriately typeset.
```{r}
knitr::kable(matrix(1:2), caption = "In a caption, \"they are not\".")
```
```{r}
knitr::kable(matrix(1:2), caption = '"I did try some alternatives...".')
```
```{r}
knitr::kable(matrix(1:2), caption = '\`\`this works for latex, but not html.\'\'')
```
The above compiles correctly for both html and latex (except the last table, which compiles correctly for latex, but NOT html). However, copying the body of the document into "A Minimal Book Example" provided with bookdown
does not typeset the correct quotation marks. I have tried using both xelatex and pdflatex to compile the documents. For xelatex, it gives the following:
pdflatex gives: