I want to mention the name of an specific function (or method) that I used in a experiment in a normal paragraph in my dissertation. What is the best way to do it? Considering that the official dissertation format that my teachers gave me doesn't mention how to do it.
For example:
"... with the Java programming language we can use System.nanoTime ..."
\lstinline
, if you're using listings and have specific formatting set up for your functions. – JAB Feb 12 '18 at 20:28\texttt
rather than\verb
(if not having thelistings
package included)? – leftaroundabout Feb 13 '18 at 00:15\verb
is more reliable, in particular for anything source code related, since it never misinterprets symbols as LaTeX syntax. Particularly relevant to function/method names: it has no problem with underscores. Of course, the option to include LaTeX commands is why\texttt
is more versatile indeed, but for source snippets that versatility is mostly a burden. – leftaroundabout Feb 13 '18 at 00:38