Skip to contents

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().

Usage

thaipdf_book(...)

Arguments

...

Arguments to pass to bookdown::pdf_book(), and then to thaipdf_document(). You may supply argument thai_font and line_spacing in here.

Value

An S3 object of class "rmarkdown_output_format" to pass to rmarkdown::render()

See also

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")
        ))
}