9

I wanted to know how is the \LaTeXe symbol (LaTeXe) made, I mean, the command definition of superscripts and subscripts on the "L", "A"... letters.

David Carlisle
  • 757,742
JnxF
  • 886

2 Answers2

15

The definitions from source2e (the listing of the LaTeX kernel):

% the TeX logo
\def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@}

% the LaTeX logo
\DeclareRobustCommand{\LaTeX}{L\kern-.36em%
{\sbox\z@ T%
\vbox to\ht\z@{\hbox{\check@mathfonts
\fontsize\sf@size\z@
\math@fontsfalse\selectfont
A}%
\vss}%
}%
\kern-.15em%
\TeX}

% the LaTeX2e logo
\DeclareRobustCommand{\LaTeXe}{\mbox{\m@th
\if b\expandafter\@car\f@series\@nil\boldmath\fi
\LaTeX\kern.15em2$_{\textstyle\varepsilon}$}}

Another way would be to run the following document:

\documentclass{article}

\begin{document}

\expandafter\show\csname LaTeXe \endcsname

\end{document}

The output console will show you the definition:

> \LaTeXe =\long macro:
->\mbox {\m@th \if b\expandafter \@car \f@series \@nil \boldmath \fi \LaTeX \ke
rn .15em2$_{\textstyle \varepsilon }$}.

Running now this:

\documentclass{article}

\begin{document}

\expandafter\show\csname LaTeX \endcsname

\end{document}

you'll get the definition of \LaTeX:

> \LaTeX =\long macro:
->L\kern -.36em{\sbox \z@ T\vbox to\ht \z@ {\hbox {\check@mathfonts \fontsize \
sf@size \z@ \math@fontsfalse \selectfont A}\vss }}\kern -.15em\TeX .

Finally, running

\documentclass{article}

\begin{document}

\show\TeX

\end{document}

you get the \TeX definition:

> \TeX=macro:
->T\kern -.1667em\lower .5ex\hbox {E}\kern -.125emX\@.
Gonzalo Medina
  • 505,128
5

To find these definitions, you can use the texdef command (\LaTeXe calls \LaTeX and \LaTeX calls \TeX):

texdef -t latex LaTeXe LaTeX TeX

With the following result:

\LaTeXe:
macro:->\protect \LaTeXe  

\LaTeXe :
\long macro:->\mbox {\m@th \if b\expandafter \@car \f@series \@nil \boldmath \fi \LaTeX \kern .15em2$_{\textstyle \varepsilon }$}

\LaTeX:
macro:->\protect \LaTeX  

\LaTeX :
\long macro:->L\kern -.36em{\sbox \z@ T\vbox to\ht \z@ {\hbox {\check@mathfonts \fontsize \sf@size \z@ \math@fontsfalse \selectfont A}\vss }}\kern -.15em\TeX 

\TeX:
macro:->T\kern -.1667em\lower .5ex\hbox {E}\kern -.125emX\@
Paul Gaborit
  • 70,770
  • 10
  • 176
  • 283
  • Cool! I didn't know so much about plain TeX commands and I find it really useful, especially to learn. Thanks. – JnxF Nov 04 '12 at 02:21