Hi R Gurus: I'm putting together an article about some R stuff in Latex. I refer to packages and functions. I think that I use {\em} for packages and {\tt} for functions. Is that correct, please? Thank you in advance! Sincerely, Edna Bell
Duncan Murdoch
2007-Nov-02 10:51 UTC
[R] correct wording and notation for R stuff in LaTex
Edna Bell wrote:> Hi R Gurus: > > I'm putting together an article about some R stuff in Latex. > > I refer to packages and functions. > > I think that I use {\em} for packages and {\tt} for functions. > > Is that correct, please? >I think that decision depends on the editorial policies of whoever publishes the article. That's not the style used in the R man pages, though: they use the "Rd.sty" style which displays \pkg{foo} in bold. Functions are entered as \code{function} which displays using \texttt (which is the same as \tt). Duncan Murdoch
Katharine Mullen
2007-Nov-02 12:18 UTC
[R] correct wording and notation for R stuff in LaTex
If you are free to format your references to packages and functions as you please, you might follow the convention used by the Journal of Statistical Software. you can do this by adding the following to your latex file: \newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}} \let\proglang=\textsf \let\code=\texttt then you can refer to R as \proglang{R}, to packages with e.g., \pkg{packagename} and to functions/other code as \code{functionname}. On Thu, 1 Nov 2007, Edna Bell wrote:> Hi R Gurus: > > I'm putting together an article about some R stuff in Latex. > > I refer to packages and functions. > > I think that I use {\em} for packages and {\tt} for functions. > > Is that correct, please? > > Thank you in advance! > Sincerely, > Edna Bell > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >