Options for functions in the texPreview package. When running R code, the object tex_opts (default options) is not modified by chunk headers (local chunk options are merged with default options), whereas tex_opts_current (current options) changes with different chunk headers and it always reflects the options for the current chunk.

tex_opts

tex_opts_current

Format

An object of class list of length 5.

An object of class list of length 5.

Details

Normally we set up the global options once in the first code chunk in a document using tex_opts$set(), so that all latter chunks will use these options. Note the global options set in one chunk will not affect the options in this chunk itself, and that is why we often need to set global options in a separate chunk.

Below is a list of default chunk options, retrieved via tex_opts$get():

These options correspond to fields in the direct call to tex_preview, which are listed in explained

in the help manual.

Note

tex_opts_current is read-only in the sense that it does nothing if you call tex_opts_current$set(); you can only query the options via tex_opts_current$get().

Examples

tex_opts$get()
#> $fileDir
#> NULL
#> 
#> $margin
#> $margin$left
#> [1] 10
#> 
#> $margin$top
#> [1] 5
#> 
#> $margin$right
#> [1] 10
#> 
#> $margin$bottom
#> [1] 5
#> 
#> 
#> $imgFormat
#> [1] "png"
#> 
#> $print.xtable.opts
#> list()
#> 
#> $opts.html
#> $opts.html$width
#> [1] "100%"
#> 
#> $opts.html$height
#> [1] "100%"
#> 
#> 
#> $cleanup
#> [1] "aux" "log" "txt" "Doc"
#> 
#> $engine
#> [1] "pdflatex"
#> 
#> $returnType
#> [1] "viewer"
#> 
#> $usrPackages
#> NULL
#> 
#> $density
#> [1] 150
#> 
#> $resizebox
#> [1] TRUE
#> 
#> $svg_max
#> [1] 80000
#>