![]() In my Rmd file, you will remark that I use styleFmt(“code”, “codecommand”) or, like here in this paragraph, verbatimFmt("code") to highlight the code inline in the text. Here for instance the css file includes: /* Look at the style.css file for the complete css file */įont-family: Courier New, Courier, monospace Similarly, for html rendering, functions should be used in an external css file with option css: style.css in the YAML header of your rmarkdown file. This lateX file should include the definition of all colors and format to be used with the previous functions. The definition of different styles are in external lateX header file for pdf outputs and should be called in the YAML header of your rmarkdown file in_header: header.tex. # to be able to show you the 'asis' chunks with background color. # Style format options for longer text output # Style format function, not specific for textcolor beginVerbatim and endVerbatim are specific to embed verbatim code text with background color, which is not implemented by default in lateX.verbatimFmt is for verbatim code with specific color style, but protected so that pandoc do not try to execute embed code.Similarly for latex, if type = “div” is defined, command will be used with begin and end. Option type can be defined to use div instead of span to allow multiple lines with html output. beginStyleFmt and endStyleFmt are a separated variante of styleFmt to be used if your text contain special characters (like underscore) that may be misinterpretated by lateX. ![]() ![]() styleFmt is used in combination with definition of a style in external files.colFmt is used directly with color names like blue, red, ….1.2 Functions for html or pdf specific renderingīecause some text and background colors are not written in the same way for html and lateX outputs, I need to use functions that will add either html formatting or latex formatting:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |