[Tex/LaTex] list available for all TeX fonts

berryfonts

I was reading trough the answer to Using a font for selected text. In the answer, the code makes use of the \fontfamilycommand. This command takes one argument: the shorthand name of a font. E.g. in the question mentioned above the chancery font is called pzc.

It got me wondering if there is a list available that sums up all these shorthands?

I know Tex Font Catalogue sums up the packages that change fonts, but this only document wide and doesn't show the shorthands.

Best Answer

Such shortcuts are mainly useful for you if you have the font installed. Such lists are on your system. If you use pdfTeX, take a look into pdftex.map. You could find it by

kpsewhich pdftex.map

at the command prompt, or use any search feature of your system. It shows the font mappings.

There are ways you could get concrete information you need. I would list all installed fonts by

updmap-sys --listmaps

On my system ist lists nearly 200 lines of font maps, such as

Map fourier.map
Map kpfonts.map
Map libertine.map
Map lm.map
...

so I know which fonts are installed. I posted this earlier here.

To see the respective shortcuts, I would look into those files. Since I can find them using kpsewhich, I type

gedit `kpsewhich kpfonts.map`

using gedit or any other editor. So I find the shortcuts inside: jkpmnc etc.

Often I take the quick way and look into the sty file to hopefully find the correct shortcut. Again, I use kpsewhich like

gedit `kpsewhich aurical.sty`

Remark, for an explanation and an outlook: kpsewhich works also on Windows. gedit is a GNOME editor, mainly used on Linux, such as Debian and Ubuntu. The backticks in the command lines evaluate the command and give the output to gedit. Because of command line features, piping, grepping, replacing with regexp and many more I like to use TeX on Linux. Here, I look for font names on my complete system, filtering for Charter fonts, cutting the output a bit by sed, the stream editor:

updmap-sys --listmaps | sed 's/^.* \(.*\)$/\1/' | xargs kpsewhich |       xargs grep -i charter | sed 's/^.*:\(.*\)<.*$/\1/' | sed 's/<.*$//'

which returns:

bchb8y CharterBT-Bold "TeXnANSIEncoding ReEncodeFont" 
bchbo8y  CharterBT-Bold "0.194 SlantFont TeXnANSIEncoding ReEncodeFont" 
bchbi8y CharterBT-BoldItalic "TeXnANSIEncoding ReEncodeFont" 
bchr8y CharterBT-Roman "TeXnANSIEncoding ReEncodeFont" 
bchro8y  CharterBT-Roman "0.194 SlantFont TeXnANSIEncoding ReEncodeFont" 
bchri8y CharterBT-Italic "TeXnANSIEncoding ReEncodeFont" 
bchrc8a CharterBT-SmallCap 
bchbc8a CharterBT-BoldSmallCap 
bchr8v VnBitstreamCharter " T5Encoding ReEncodeFont " 
bchri8v VnCharterBT-Italic " T5Encoding ReEncodeFont " 
bchro8v VnBitstreamCharter " 0.194 SlantFont T5Encoding ReEncodeFont " 
bchb8v VnCharterBT-Bold " T5Encoding ReEncodeFont " 
bchbi8v VnCharterBT-BoldItalic " T5Encoding ReEncodeFont " 
bchbo8v VnCharterBT-Bold " 0.194 SlantFont T5Encoding ReEncodeFont " 
bchb8r CharterBT-Bold " TeXBase1Encoding ReEncodeFont " 
bchbi8r CharterBT-BoldItalic " TeXBase1Encoding ReEncodeFont " 
bchbo8r CharterBT-Bold " .167 SlantFont TeXBase1Encoding ReEncodeFont " 
bchr8r CharterBT-Roman " TeXBase1Encoding ReEncodeFont " 
bchri8r CharterBT-Italic " TeXBase1Encoding ReEncodeFont " 
bchro8r CharterBT-Roman " .167 SlantFont TeXBase1Encoding ReEncodeFont " 

If there would be a list on the internet, I guess it could be found by using a search engine and typing in 5 or more already known shorthands all together.