Change the font color (and any other styling you need) and save the reference.docx file. If you only want to emphasize some words in a paragraph with color, you need to select the “Character” style type. If you want your font color to apply to a full paragraph, you can use the default, “Linked Paragraph and Character” style type. First, inside your reference.docx template, create a new Word style with a short, distinct name. For Word, you can use the Pandoc custom-style syntax to accomplish this with the aid of a reference word document. Others have provided answers for output other than Word. Violets are `r kableExtra::text_spec("blue", color = "blue")` If you want to create a pdf, use LaTeX syntax: Roses are \textcolor$.Īn output-format agnostic solution would be to use the dedicated text_spec() function in the kableExtra package: Roses are `r kableExtra::text_spec("red", color = "red")`, However, it does not work if you select pdf (beamer) as output format. The answer given at the link provided by Bolker: Roses are red,ĭoes work if you select HTML (ioslides) as the output format.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |