# What formats do the file extensions in the TeX Live source tree denote

The TeX Live source tree is really huge. Is there an overview somehow somewhere of the meaning of all those file extensions? I mean e.g. in texlive/Master/texmf, there are 10 .sty, 18 .enc, 21 .tcx, 22 .map, 23 .tlu, 35 .cfg, 366 .asy and 425 .xdy files. I have no clue what kind of files these are.

All in all there are almost 1000 (!) different file extensions :-O http://sprunge.us/KDJh 1)

What do they all mean?

Clarification:

What list is 1) ?

texlive/Master\$  # a command is run in the TeX Live tree's root directory
find ...         # finds all files in this directory, omits the bin directory...
| sed .         # filters out everything except the filenames extensions
| sort          # sorts the list lexically
| uniq -c       # counts the number of duplicates of each line
| sort -nr      # sorts the resulting "list of counts" numerically reverse

-> The result is a list of file extensions ordered by their frequencies

-
 Do you really mean the LaTeX source code? It seems like you're more interested in the whole TeX Live source tree, which is considerably larger and deals with much more things than LaTeX (whose source code is only 10 thousands lines of code, by the way). About the file extensions, over half of them are attached to only 1 or 2 files and clearly have very specific uses (like the ones for the Venturis fonts); that's not really meaningful. – Arthur Reutenauer Jan 27 '11 at 11:47 Well, I mean TeX Live in that case. In addition it would be nice if somebody could explain where in the TeX Live source tree the LaTeX parts exactly are (directory?) and what parts of the TeX Live system the other directories hold and what those other parts are used for. :-) – Patrick2000 Jan 27 '11 at 12:52 Is this a question? As it is worded now, it is not clear what are you expecting as an answer. – Juan A. Navarro Jan 27 '11 at 13:34 @Patrick: LaTeX 2e is in the directory tex/latex/base. The other subdirectories of tex/latex contain third-party packages. – Philipp Jan 27 '11 at 14:17 @Philip: Thanks, got it – Patrick2000 Jan 27 '11 at 17:07

• .tfm: TeX Font Metrics, contains things like glyph widths or ligature information for many of the "older" fonts. "Newer" (OpenType etc.) fonts encode such information directly in the font files.
• .tex: Any TeX, LaTeX or ConTeXt source code, no inherent meaning. Often used for engine-independent modules.
• .vf: Virtual Fonts, re-mappings of existing "real" fonts that are presented to TeX as a distinct font. For example, you can use a virtual font that maps text figure glyphs to the digit characters. Again, that is unnecessary for OpenType fonts.
• .mf: Source files for Metafont
• .pfb: Type-1 fonts in binary format. These contain the glyph data for older fonts. Largely obsoleted by TrueType/OpenType/CFF/AAT, but still common in the TeX world.
• .pdf: Portable Document Format, usually manual files.
• .sty: LaTeX packages ("style files"). \usepackage{X} loads the file X.sty.
• .fd: Font Description files which map LaTeX font identification to TFM file names.
• .ltx: LaTeX documents and source files
• .pm: Perl Modules, used by tlmgr
• .dtx: Docstrip source files, contain documentation and source code of LaTeX packages
• .html: Hypertext Markup Language, mostly documentation
• .ins: Docstrip installer scripts, extract code files from .dtx files
• .txt: Text files, can be anything
• .pl: Perl scripts
• .def: Definition files, often used for implementing package options or default settings. In the LaTeX kernel they are used for defining font encodings in the NFSS. They would all look like t1enc.def, eu1enc.def, and so on.
• .map: Map files, contain information where font data can be found
• .enc: Font encoding files, map standard character names to glyph positions
• .png: Portable Network Graphics, for pictures
• .mp: MetaPost source files
• .asy: Asymptote modules and source files
• .xdy: Xindy (index processor) modules
• .otf: OpenType fonts, the standard font format
• .lua: Lua scripts and modules, used for LuaLaTeX and ConTeXt Mk IV
• .mkii: ConTeXt Mk II source files
• .cfg: Configuration files
• .bst: BibTeX style files
• .cls: LaTeX classes. \documentclass{X} loads file X.cls.
• .mkiv: ConTeXt Mk IV source files
• .bib: BiBTeX bibliographies
• .1: Man pages for section 1
• .fea: LuaTeX OpenType feature files
• .fdd: DocStrip source files for font description files
• .tlu is used for TeXLua scripts. There is no strict separation between .lua and .tlu, but the later is probably meant to emphasize the fact the the script is for TeXLua and not generic Lua (for example, it makes use of kpse or other specific libraries).
• .tcx files are translation files that can be used by most TeX engines based on the web2c (read: probably specific to TeX Live, ie. probably not in MikTeX). They allow TeX to transcode input and ouput (to terminal/log) on the fly. The default one, cp227.tcx doesn't translate anything but merely allows non-ascii characters to be printed on the terminal. See the web2c manual, section 4.4.2 for details.

Most files are in fact support files for legacy (non-OpenType/AAT) fonts. For one such font, you usually need several .tfm, .pfb, .vf, .fd, .enc and .map files, whereas for OpenType fonts one .otf file suffices. Another huge chunk is documentation.

-