TeX Live FAQ

From ArchWiki
Revision as of 17:59, 17 April 2008 by Bender02 (Talk | contribs) (More info on editors; link for tikz)

Jump to: navigation, search

TeX directory structure and important files

Q: I just installed some .sty files, but tex doesn't seem to see them.

A: TeXlive (and tetex) uses its own directory indexes (files named ls-R), and you need to refresh them after you copy something into one of the TeX trees. Magic command:




A command line program to search through these indexes is


Hence you can check that TeX can find a particular file by running

kpsewhich <filename>

The output should be full path to that file.

Q: What's up with all these dirs in /opt/texlive/*

A: TeX uses several "source trees"; they have the same internal structure, and can "overlap". This is to allow users to modify files provided system-wide without having to access files they're not supposed to access. Here's the portion of the main config file which lists all these dirs with some explanations ($SELFAUTODIR=/opt/texlive):

% The tree containing the runtime files closely related to the specific
% program version used:
% The main distribution tree:
% A place for local additions to a "standard" texmf tree.
% This tree is not used for local configuration maintained by
% texconfig, it uses TEXMFCONFIG below.
% TEXMFSYSVAR, where texconfig-sys stores variable runtime data.
% TEXMFSYSCONFIG, where texconfig-sys stores configuration data.
% User texmf trees are allowed as follows.
% TEXMFVAR, where texconfig stores variable runtime data.
TEXMFVAR = $HOME/.texmf-var
% TEXMFCONFIG, where texconfig stores configuration data.
TEXMFCONFIG = $HOME/.texmf-config

Note that they are searched in the reverse order that they are listed above (I think). So when some problems pops up, search the trees in the proper order ;)

One more remark: if you install something just for you, it should go to your home texmf tree. However, on desktops, you might not want to clutter your home dir; then it should go to texmf-local tree (which should be writable by the "tex" group).

Q: I want to have some configuration app!

A: Run


Careful! When you run this as a user, you modify settings for that user. If you want to modify system-wide settings, run


as root instead.

Q: I want to edit textfiles! Where are some configuration files?

A: Keeping in mind the above directory structure (<texmfroot> refers to one of the dirs above), here you go: The main config file:


List of formats generated:


Settings with which are e.g. bitmap fonts generated


Which and how type1 fonts are used instead of metafont generated bitmap ones?


Common problems

Q: Pdftex and/or dvips uses bitmap fonts instead of type1 postscript fonts (aka "when I zoom my pdf/ps file, fonts are really pixelated" aka "everytime I run tex, it takes a long time because it generates fonts with metafont" aka "at the end of my logfile generated by pdftex I see that it includes *.pk fonts instead of *.pfb)

A: This takes a bit of time to explain. Now it's important that you understand how does the system work, so that you know what you're doing.

  • Files which tell pdftex/dvips which fonts are to be included as type1 fonts (instead of traditional bitmap fonts) have suffix .map and reside somewhere in <texmfroot>/fonts/map/{pdftex,dvips}/updmap/{pdftex.map,psfonts.map}.
  • You don't want to edit these files manually; they're good for checking if your favorite type1 font which causes troubles is sitting there properly.
  • These files are automatically generated, when you run

as user (or


as root for system-wide changes)

  • What you need to do to have your favorite fonts (for instance kpfonts) properly used as type1 fonts in pdf and ps files is to locate the .map file that goes with the package (e.g. kpfonts.map; you don't need to actually *do* anything with the file, just know that it's there somewhere), edit updmap.cfg by running
updmap --edit

as user (or "updmap-sys --edit" as root) and add the line

Map kpfonts.map

or the line

MixedMap kpfonts.map

(MixedMap indicates that fonts are also available as bitmap fonts.), and exit the editor. At this point, you should see the messages which indicate that updmap is regenerating {pdftex,psfonts}.map files.

  • This should be sufficient, and your next run of pdftex/dvips should be already including the type1 versions of fonts.

Useful apps to use with (any tex installation)

Q: Editors?

A: A great one for beginners (errr...) is kile (depends on kde though). Then of course emacs with auctex and (g)vim with vim-latex (although I had some problems with it with vim-7.* versions). If you are more WYSIWIG oriented, then perhaps lyx (just be aware that transitions "lyx <-> manual source editing" is not always seamless, and using your own macros is a bit awkward of course); or texmacs (with which I have no experience, and it seems a bit outdated).

Q: Pictures with latex labels?

A: Apart from some latex in-source macros (which are a bit of a PITA to write), there are excellent "picture programming languages" metapost and its (more-less) successor asymptote. They are pretty powerful, but have similar approach as tex itself - you write down what you want to have and how are the things related, and compiler then produces the picture. The target format is postscript for metapost; and eps/pdf/png for asymptote.

Even closer incorporated to TeX itself - i.e. to Plain TeX, LaTex or Context, ther are layers for each of this formats - is the relatively new PGF package with its language named TIKZ.

Q: Pictures with latex labels - I want GUI! - I want pictures fast!

A: The "grandfather" of vector editors - xfig is able to produce some output relevant to tex. I had relatively good experience with ipe recently (saves eps/pdf).