Commands such as \TeX and \LaTeX are not plain text — they set a logo, with letters raised, lowered, and kerned together. Three things are worth fixing in your mind. Standard LaTeX provides only three logos — \TeX, \LaTeX, and \LaTeXe — and engine logos like XeTeX or LuaTeX need a package. When you want many engine logos set consistently, **hologo is the convenient choice. And these are text-mode commands**, not math, with one pitfall: they eat the space that follows.
How the logos are built
The TeX logo is not the same as typing “TeX.” Writing \TeX sets the word with its middle E lowered (dropped below the baseline) and the letters kerned tightly around it, giving the distinctive shape. It is a kind of wordmark that Knuth designed using TeX’s own typesetting machinery, and the convention is to refer to TeX in prose with this command rather than the bare letters “TeX.”
The \LaTeX logo follows the same idea. Before \TeX it places a small raised A (lifted up, superscript-like) to spell “La,” then joins the TeX logo. So a raised small A plus a lowered E define the LaTeX wordmark. \LaTeXe then appends a lowered Greek ε (epsilon) after that LaTeX logo, giving the “LaTeX2ε” mark for the current LaTeX (the 2 and ε standing for “version 2e”).
Mechanically, they are built from \raisebox (which lifts or lowers a box) combined with kerning that pulls the letters together. Because of this, the exact shape depends on the font in use, and switching fonts can throw the letter fit off. The metalogo package, covered below, exists precisely to let you tune that spacing.
Only three come with LaTeX
This is the first gotcha. **Plain LaTeX defines only three logo commands — \TeX, \LaTeX, and \LaTeXe — usable with no package.** Logos for engine and tool names such as \XeTeX, \LuaTeX, \pdfTeX, and \BibTeX are not built in. Writing them as-is gives an “undefined control sequence” error, so you must load one of the packages in the next section.
% 標準 LaTeX だけで使える三つ(プリアンブル不要)
\TeX% TeX ロゴ(E が下がる)
\LaTeX% LaTeX ロゴ(小さい A が上がり E が下がる)
\LaTeXe% LaTeX2e ロゴ(末尾に下がった ε)Loading amsmath/amstex additionally gives you the AMS logo \AmS (the “AMS” wordmark in its special shape); \AmS-\LaTeX produces the “AMS-LaTeX” logo. For the MetaFont and MetaPost logos, \MF and \MP from the mflogo package are the standard choice.
Engine logos — metalogo and hologo
There are two main ways to get logos like XeTeX or LuaTeX. One is the **metalogo** package: \usepackage{metalogo} gives you \XeTeX, \XeLaTeX, \LuaTeX, and \LuaLaTeX. The XeTeX logo’s signature reversed E (a Ǝ-like shape) is set this way. metalogo’s strength is fine spacing control — with commands such as \setlogokern{Te}{...} you can tune per-pair kerning, the height of the raised A in \LaTeX, and more, to fit your font (it is designed for XeLaTeX users juggling many typefaces).
The other is the **hologo** package, which this page recommends. Load \usepackage{hologo} and a single command that takes the logo name as its argument, as in \hologo{XeTeX}, sets a large family of engine and tool logos by one consistent set of rules. To capitalise the first letter (e.g. at the start of a sentence) use \Hologo{...} (which uppercases the initial). The appeal is that you look logos up by name — \hologo{pdfTeX}, \hologo{LuaTeX}, \hologo{BibTeX}, \hologo{ConTeXt}, \hologo{KOMAScript} — without memorising a separate macro for each.
\usepackage{hologo}
% ...
% 名前を渡すだけで多数のロゴが一貫して組める
\hologo{pdfTeX}, \hologo{XeTeX}, \hologo{LuaTeX} は
\hologo{TeX} の後継エンジンです。\hologo{BibTeX} で文献を、
\hologo{ConTeXt} は別系統のフォーマット。
% 文頭などで先頭を大文字に
\Hologo{pdfLaTeX} を使います。hologo covers a very large set, including the Japanese-world favourites \hologo{pLaTeX}, \hologo{upLaTeX}, \hologo{pTeX}, and \hologo{upTeX}. For articles or manuals that mention many engine names in running text, hologo is especially well suited because it keeps the styling uniform. Conversely, if the only logo in your prose is \LaTeX, the built-in commands are enough and you need no package.
Logo command lookup
The main logo commands, with the logo they render and the package required (“Command” is the source you type, “Renders as” is the wordmark, the right column is the package needed). The hologo entries can equally be written by passing the name, as in \hologo{XeTeX}.
| Command | Renders as / package | |
|---|---|---|
\TeX | TeX (lowered E) | base LaTeX (none) |
\LaTeX | LaTeX (raised small A) | base LaTeX (none) |
\LaTeXe | LaTeX2ε (trailing lowered ε) | base LaTeX (none) |
\AmS | AMS (special shape) | amsmath / amstex |
\XeTeX | XeTeX (reversed E) | metalogo |
\XeLaTeX | XeLaTeX | metalogo |
\LuaTeX | LuaTeX | metalogo |
\LuaLaTeX | LuaLaTeX | metalogo |
\hologo{pdfTeX} | pdfTeX | hologo |
\hologo{XeTeX} | XeTeX (reversed E) | hologo |
\hologo{LuaTeX} | LuaTeX | hologo |
\hologo{BibTeX} | BibTeX | hologo |
\hologo{ConTeXt} | ConTeXt | hologo |
\hologo{KOMAScript} | KOMA-Script | hologo |
\hologo{pLaTeX} | pLaTeX | hologo |
\hologo{upLaTeX} | upLaTeX | hologo |
\MF | METAFONT | mflogo |
\MP | METAPOST | mflogo |
Some logos are available from both metalogo and hologo (e.g. \XeTeX versus \hologo{XeTeX}). Loading both at once can clash over definitions like \XeTeX, so it is safest to standardise on one. Rule of thumb: hologo if you use many engine logos; metalogo if you want to fine-tune the fit of \LaTeX and friends to your font.
Practical gotchas — space and mode
The biggest pitfall is that these macros eat the following space. A command spelled with letters, like \TeX or \LaTeX, absorbs the space after it as the end-of-name delimiter. So \LaTeX is great comes out as “LaTeXis great,” with the logo glued to the next word. To prevent this, put **empty braces {} after the command, or insert a backslash-space \ (a control space)**.
% 悪い例:空白が食われて「LaTeXis」になる
\LaTeX is great.
% 良い例:空の波括弧で区切る
\LaTeX{} is great.
% 良い例:バックスラッシュ+空白(制御綴の空白)
\LaTeX\ is great.
% 直後が句読点ならそのままでよい
\LaTeX, \TeX.When a comma, period, or other symbol follows, there is no space to eat, so you can write it plainly. Some people use the xspace package to restore the trailing space automatically, but it can misfire and even its author no longer recommends it — so being explicit with {} or \ is the dependable choice.
A second caution: these are text-mode commands. \TeX and \LaTeX go straight into the body text, not inside math mode ($...$). To place one inside a formula, drop back to text first, as in \text{\LaTeX}. Using a logo command inside a moving argument (a heading, a footnote) could once cause errors, but in modern LaTeX these commands are robust, so you can normally use them without worry.