knitr::opts_chunk$set( echo = TRUE, fig.path = "README-", message = FALSE, warning = FALSE, collapse = TRUE, comment = "#>" ) library(knitr)
The goal of linguisticsdown is to support Linguistics-related doucument writing in R Markdown, such as providing a Shiny Gadget to write and insert IPA symbols easily and functions to draw syntax tree (not implemented yet).
# CRAN install.packages("linguisticsdown") # Latest #install.packages("remotes") remotes::install_github("liao961120/linguisticsdown")
{.big}
{.big}
For users that don't use RStudio, run:
linguisticsdown::writeIPA()
to lunch the Shiny gadget.
Visit this site to use the Shiny Gadget interactively.
IPA symbols may not be properly rendered when output to PDF, depending on the font chosen to compile LaTeX to PDF. See wikipedia for a list of fonts supporting IPA symbols.
To overcome this problem, you can use a document template provided by linguisticsdown by calling:
rmarkdown::draft("name_your_file.Rmd", template = "support_ipa", package = "linguisticsdown")
, or if you use RStudio:
{.big}
Then, make sure "LaTeX" in "Insert Format" is selected when inserting IPA symbols:
{.big}
This option wraps the IPA symbols with the function
cond_cmpl()
, which wraps latex code around IPA symbols when
compiled to LaTeX but leaves the symbols untouched
when compiled to HTML formats.
Hence, you can compiled to any format with properly rendered
IPA symbols without changing the source file.
Note: make sure you have the font, Doulos SIL, installed on your computer to make conditional compilation work.
If you would like to use other fonts, read the document
template support_ipa
for more details.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.