thaipdf_book: Convert R Markdown to a PDF book with Thai Language...

View source: R/thaipdf.R

thaipdf_bookR Documentation

Convert R Markdown to a PDF book with Thai Language Compatibility

Description

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

## Not run: 
 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")
        ))

## End(Not run)

Lightbridge-KS/thaipdf documentation built on June 18, 2022, 6:58 a.m.