Convert R Markdown to a PDF book with Thai Language Compatibility
Source:R/thaipdf.R
thaipdf_book.Rd
Thai language supported conversion of R Markdown to a PDF after resolving the special tokens of bookdown (e.g., the tokens for references and labels) to native LaTeX commands.
It is a wrapper around bookdown::pdf_book()
with argument base_format
set to thaipdf_document()
.
Arguments
- ...
Arguments to pass to
bookdown::pdf_book()
, and then tothaipdf_document()
. You may supply argumentthai_font
andline_spacing
in here.
Value
An S3 object of class "rmarkdown_output_format" to pass to rmarkdown::render()
See also
How to use
bookdown::pdf_book()
, please see official documentationHow to use
thaipdf_document()
.
Examples
if (FALSE) {
library(rmarkdown)
# Simple Conversion
render("input.Rmd", output_format = thaipdf::thaipdf_book())
# Render with Thai font "Laksaman" and font size 10pt
render("input.Rmd",
output_format = thaipdf::thaipdf_book(
thai_font = "Laksaman", # you must have this font in your system
pandoc_args = pandoc_metadata_arg("fontsize", "10pt")
))
}