File: fence_theorems.Rd

package info (click to toggle)
r-cran-bookdown 0.32%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,664 kB
  • sloc: javascript: 11,322; makefile: 21; sh: 20
file content (38 lines) | stat: -rw-r--r-- 1,427 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{fence_theorems}
\alias{fence_theorems}
\title{Convert the syntax of theorem and proof environments from code blocks to
fenced Divs}
\usage{
fence_theorems(input, text = xfun::read_utf8(input), output = NULL)
}
\arguments{
\item{input}{Path to an Rmd file that contains theorem environments written
in the syntax of code blocks.}

\item{text}{A character vector of the Rmd source. When \code{text} is
provided, the \code{input} argument will be ignored.}

\item{output}{The output file to write the converted input content. You can
specify \code{output} to be identical to \code{input}, which means the
input file will be overwritten. If you want to overwrite the input file,
you are strongly recommended to put the file under version control or make
a backup copy in advance.}
}
\value{
If \code{output = NULL}, the converted text is returned, otherwise
  the text is written to the output file.
}
\description{
This function converts the syntax \samp{```{theorem, label, ...}} to
\samp{::: {.theorem #label ...}} (Pandoc's fenced Div) for theorem
environments.
}
\references{
Learn more about
  \href{https://bookdown.org/yihui/bookdown/markdown-extensions-by-bookdown.html#theorems}{theorems
   and proofs} and
  \href{https://bookdown.org/yihui/rmarkdown-cookbook/custom-blocks.html}{custom
   blocks} in the \pkg{bookdown} book.
}