thaipdf_document | R Documentation |
Thai language supported conversion of R Markdown to a PDF or LaTeX document.
It is a wrapper around rmarkdown::pdf_document()
.
thaipdf_document(thai_font = "TH Sarabun New", line_spacing = 1.5, ...)
thai_font |
(Character) Name of the Thai font to use. Default font is "TH Sarabun New". It can be any Thai font that installed in your system. |
line_spacing |
(Numeric) Spacing between each line. Line spacing 1.5 is recommended for Thai language (default). |
... |
Arguments to pass to |
To achieve Thai language compatibility for LaTeX,
This function injects preamble fragment of Thai LaTeX typesetting into the preamble of output LaTeX via includes
argument,
and set latex_engine
to "xelatex".
An S3 object of class "rmarkdown_output_format" to pass to rmarkdown::render()
How to use rmarkdown::pdf_document
, please see official documentation.
How to use thaipdf_book()
.
## Not run: library(rmarkdown) # Simple Conversion render("input.Rmd", output_format = thaipdf::thaipdf_document()) # Render with Thai font "Laksaman", font size 10pt, enable table of contents render("input.Rmd", output_format = thaipdf::thaipdf_document( thai_font = "Laksaman", # you must have this font in your system toc = TRUE, pandoc_args = pandoc_metadata_arg("fontsize", "10pt") )) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.