stri_stats_latex | R Documentation |
This function gives LaTeX-oriented statistics for a character vector,
e.g., obtained by loading a text file with the
readLines
function, where each text line
is represented by a separate string.
stri_stats_latex(str)
str |
character vector to be aggregated |
We use a slightly modified LaTeX Word Count algorithm implemented in Kile 2.1.3, see https://kile.sourceforge.io/team.php for the original contributors.
Returns an integer vector with the following named elements:
CharsWord
- number of word characters;
CharsCmdEnvir
- command and words characters;
CharsWhite
- LaTeX white spaces, including { and } in some contexts;
Words
- number of words;
Cmds
- number of commands;
Envirs
- number of environments;
... (Other stuff that may appear in future releases of stringi).
Marek Gagolewski and other contributors
The official online manual of stringi at https://stringi.gagolewski.com/
Gagolewski M., stringi: Fast and portable character string processing in R, Journal of Statistical Software 103(2), 2022, 1-59, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v103.i02")}
Other stats:
stri_stats_general()
s <- c('Lorem \\textbf{ipsum} dolor sit \\textit{amet}, consectetur adipisicing elit.',
'\\begin{small}Proin nibh augue,\\end{small} suscipit a, scelerisque sed, lacinia in, mi.',
'')
stri_stats_latex(s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.