When referring to programming packages/libraries (such as matplotlib for example) within a LaTeX document should one typeset it to denote it as a package/library name? Such as using \texttt{}?

  • 2
    What kind of document are you writing? In package documentation, package names are sometimes set in a fancy way, sometimes not (and what is even more important that the visual appearance in such a case is a reference/link to where one might find the package). In other documents, I suspect it is even less common to use odd colours and/or fonts, let alone even a need to mention it; and, again, if the package simply must be mentioned, wouldn't the most important bit be the reference/link? (Exceptions abound, of course.)
    – jon
    Commented Jan 28, 2014 at 18:38
  • 9
    In every case you should not use \texttt directly but better define a command like \newcommand{\pkg}[1]{\texttt{#1}} or \newcommand{\lib}[1]{\texttt{#1}} in the preamble of your document. Then you only need to modify one line to affect the formatting for the whole document. Commented Jan 28, 2014 at 18:55
  • 2
    in tugboat, the names of packages are sometimes set in \textsf to distinguish them from actual code, which is generally \texttt or verbatim. (and do define an appropriate command as suggested by thorsten, so they will be treated the same, and if you change your mind, it will be easy to change the style.) Commented Jan 28, 2014 at 19:47
  • 2
    For some reason that I don't know, naming software packages and codes with \textsc{...} (small capitals) seems to be very elegant. I guess it is because it is like all caps (as many packages where traditionally named) and the same time it is not very disruptive of the text; yet is flexible enough to follow special small and capital conventions.
    – alfC
    Commented Jan 29, 2014 at 10:14
  • 2
    If you look at the books on computer stuff by O'Reilly, they all start with a short statement of the typographical conventions they use (for files, stuff that goes verbatim, values the user has to supply, ...). You could adapt their conventions, or filch one somewhere else...
    – vonbrand
    Commented Feb 1, 2014 at 0:34

1 Answer 1


The most common way to quote software packages names is with small capitals, \textsc{}:

These amplitudes were obtained by using the open-source packages \textsc{FeynArts} and \textsc{FeynCalc}. enter image description here

At least in my field (particle physics).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .