Starting with 's helpful answer, I was able to include a custom font within a single Rmarkdown file with no other files. We can indeed add HTML tags into the RMarkdown header, but this reads in an external file, which is precisely what I'm trying to avoid, so am back to square 1. I have learned you cannot declare in the HTML body, but must do so in the header. Src: url(`r css_url`) format("truetype") I've been trying both with little success.Ī third option could be to provide a url (to a style sheet) to a yaml value, although I am not sure if that's possible html_document: , or base64 encoding the font info within the tags of the Rmd itself. I believe the only two options are either reading a font file in from the web within. ![]() no local external style sheets, although reading files from the web is fine). In case this is an A/B problem, my simple goal is to apply a custom font while avoiding using any local files beyond the Rmd file itself (i.e. ![]() css file locally and referenced in the Rmd's yaml with. Note that the exact same css code above (less the style tags) does work when it's stored in an external. ![]() Is it possible to use the CSS to provide font files to an RMarkdown?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |