Access Keys:
Skip to content (Access Key - 0)

How can I use other fonts in LaTeX?

There are quite a few different fonts availble for LaTeX/Tex. If you're interested, look files ending in ".tfm" in the directory:

    /usr/athena/share/texmf/fonts/tfm

Those are the font metric files that latex uses; if there's a font-metric file for it, latex can typeset in it (although it may not be able to print it in all sizes). Currently, there are 315 different font-metric files.

For example, if you wanted to use the "tengwar" font specified by the file "tengwar.tfm", you'd have a document like:

        \documentclass{article}
        \begin{document}
        \newfont{\elvish}{tengwar}

        The One Ring:

        {\elvish
        Three rings for the elven kings under the sky
        Nine for mortal men doomed to die
        Seven for the dwarf lords in their halls of stone
        One for the dark lord on his dark throne
        In the land of Mordor where the shadows lie
        One ring to rule them all, one ring to find them
        One ring to bring them all and in the darkness bind them
        In the land of Mordor where the shadows lie.}
        \end{document}

The phrase "The One Ring:" would be typeset in normal text, but the other text would be typeset in the tengwar font, which is for elvish languages.

There are samples of all the fonts in the directory:

    /mit/consult/lib/tex/misc/fonts

The files new1.dvi, new2.dvi, new3.dvi, new4.dvi, new5.dvi, and new6.dvi are the ones you want to preview; they contain samples of the fonts. The .tex files that were used to create these are also in the same directory.

You can view .dvi files in that directory and see what the fonts will look like when you print them by typing

    attach consult
    xdvi /mit/consult/lib/tex/misc/fonts/new1.dvi &

and so on for the other files.

If you want to change all the fonts in a document to some postscript font, you need to add the appropriate documentstyle option, as listed below.

Font Desired Documentstyle needed Locker
Times Roman times sipb
New Century Schlbk ncs sipb
Avant Garde avantgarde sipb
Helvetica helvetica sipb
Palatino new-pal consult

To use fonts in the sipb locker, you need to run the following commands (or add them to your .environment file)

    attach sipb
    attach texfonts
    setenv TEXINPUTS .:/mit/sipb/share/tex/macros:
    setenv TEXFONTS .:/usr/athena/share/texmf/fonts:/mit/sipb/share/tex/fonts/tfm:/mit/sipb/share/tex/fonts/vf:/mit/texfonts:/mit/texfonts/ipa:
    setenv TEXPKS $TEXFONTS
    extend TEXPKS /mit/sipb/share/tex/fonts/pk:
    setenv PKFONTS $TEXPKS

For fonts in the consult locker, follow the same directions as above substituting "sipb" for "consult", i.e.:

    attach consult
    attach texfonts
    setenv TEXINPUTS .:/usr/athena/lib/tex/macros:/mit/consult/lib/tex/macros:
    setenv TEXFONTS .:/usr/athena/lib/tex/fonts:/mit/sipb/share/tex/fonts/tfm:/mit/sipb/share/tex/fonts/vf:/mit/texfonts:/mit/texfonts/ipa:
    setenv TEXPKS $TEXFONTS
    extend TEXPKS /mit/sipb/share/tex/fonts/pk:
    setenv PKFONTS $TEXPKS

Of course, you can extend your TEXINPUTS even more to include all three directories if you wish.

Some characters may be missing from New Century Schoolbook and Palatino.

IS&T Contributions

Documentation and information provided by IS&T staff members


Last Modified:

February 25, 2009

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
Labels:
olc-latex-fonts olc-latex-fonts Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Feedback
This product/service is:
Easy to use
Average
Difficult to use

This article is:
Helpful
Inaccurate
Obsolete
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki