EVOLUTION-MANAGER
Edit File: stri_stats_latex.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Statistics for a Character Vector Containing LaTeX Commands</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for stri_stats_latex {stringi}"><tr><td>stri_stats_latex {stringi}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Statistics for a Character Vector Containing LaTeX Commands</h2> <h3>Description</h3> <p>This function gives LaTeX-oriented statistics for a character vector, e.g., obtained by loading a text file with the <code><a href="../../base/html/readLines.html">readLines</a></code> function, where each text line is represented by a separate string. </p> <h3>Usage</h3> <pre> stri_stats_latex(str) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>str</code></td> <td> <p>character vector to be aggregated</p> </td></tr> </table> <h3>Details</h3> <p>We use a slightly modified LaTeX Word Count algorithm taken from Kile 2.1.3, see <a href="http://kile.sourceforge.net/team.php">http://kile.sourceforge.net/team.php</a> for original contributors. </p> <h3>Value</h3> <p>Returns an integer vector with the following named elements: </p> <ol> <li> <p><code>CharsWord</code> - number of word characters; </p> </li> <li> <p><code>CharsCmdEnvir</code> - command and words characters; </p> </li> <li> <p><code>CharsWhite</code> - LaTeX white spaces, including { and } in some contexts; </p> </li> <li> <p><code>Words</code> - number of words; </p> </li> <li> <p><code>Cmds</code> - number of commands; </p> </li> <li> <p><code>Envirs</code> - number of environments; </p> </li> <li><p> ... (Other stuff that may appear in future releases of <span class="pkg">stringi</span>). </p> </li></ol> <h3>See Also</h3> <p>Other stats: <code><a href="stri_stats_general.html">stri_stats_general</a>()</code> </p> <h3>Examples</h3> <pre> 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) </pre> <hr /><div style="text-align: center;">[Package <em>stringi</em> version 1.4.6 <a href="00Index.html">Index</a>]</div> </body></html>