hadley / ggplot2-book

ggplot2: elegant graphics for data analysis
https://ggplot2-book.org/
1.57k stars 683 forks source link

define caption externally for proper LaTeX escaping of underscores #320

Closed stevelinberg closed 2 years ago

stevelinberg commented 2 years ago

Fixes #319.

Define the figure 17.1 caption outside the rmarkdown block so that the underscores in the function names within the caption are properly escaped for LaTeX when rendering to PDF. Does not affect HTML output.

hadley commented 2 years ago

Thanks for working on this, but I think I’d prefer to leave as is and just fix when we switch to quarto.