How to format the name of an R package in thesis?
2,987
You can do this by adding the following to your preamble. Something like this:
\newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}} \let\proglang=\textsf \let\code=\texttt
\begin{document}
Then you can refer to R as \proglang{R}, to a package \pkg{packagename}, and to a function as \code{functionname}.
\end{document}
Related videos on Youtube
Author by
Patty
Updated on August 01, 2022Comments
-
Patty over 1 year
In a thesis, when referring to an R package (a statistical software), how should I write it?
Should it be italicized/treated like a title?
Or just like any other word. The package name is not a "normal word" so it seems out of place to just write it like
"...using the R package XYZ."
-
Massimo Ortolano almost 6 yearsWhy not using the convention employed in the R documentation (package names are typeset with a bold font)?
-
Bluebird almost 6 yearsAlso remember to include what version of R and package you used.
-
allo almost 6 yearsYou may be overthinking this. I think the text version is okay. You may or may not emphasise the package name but the reader will get that it is a R package from the sentence, so the rest is a question how you like it better yourself.
-
-
ff524 almost 6 yearsThe question isn't about how to cite the package, it's about how to format the name of the package when referring to it in text. e.g.: "We use the foo package to parse the data and..."
-
Azor Ahai -him- almost 3 yearsThe OP didn't mention they were working in LATEX.
-
Smith Pay almost 3 years@AzorAhai-him- That is correct! I just assumed OP is writing a thesis and using R; therefore, in the science field, where most of the thesis is written in Latex!
-
Admin almost 3 yearsBiologists still write papers by emailing each other word documents. The really clever ones might be on Google docs now.
-
Azor Ahai -him- almost 3 years@AhmadTalafha I don't think you can say most of the sciences use LaTeX - most of math, maybe.
-
Smith Pay almost 3 years@AzorAhai-him- While it is true, check out this post tex.stackexchange.com/questions/940/…
-
Smith Pay almost 3 years@Libor Google Docs is great! For Latex, check out Overleaf, it is a collaborative cloud-based LaTeX editor used for writing, editing and publishing scientific documents.
-
Azor Ahai -him- almost 3 years@AhmadTalafha Sure, but there's a lot more to science than math, physics, and linguistics ;)