Today I learned that Latex supports many different typefaces: https://www.overleaf.com/learn/latex/font_typefaces and http://www.personal.ceu.hu/tex/typeface.htm
I’ve seen papers like this one (https://arxiv.org/pdf/2006.15704.pdf) uses a different font for subroutines (like function names or APIs). One example is from their reference to the “CrossEntropyLoss” function:
Now, I try by myself different typefaces and see which one it uses:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | {\rm CrossEntropyLoss rm} {\sl CrossEntropyLoss sl} {\sf CrossEntropyLoss sf} {\sf CrossEntropyLoss sf} {\tt CrossEntropyLoss tt} {\sc CrossEntropyLoss sc} {\fontfamily{qcr}\selectfont CrossEntropyLoss qcr } {\fontfamily{bch}\selectfont CrossEntropyLoss bch } {\fontfamily{lmtt}\selectfont CrossEntropyLoss lmtt } |
I think the closest font is lmtt
.