I would like to know how can I write a text in the same way that \LaTeX is written, I mean the even characters must be a little below the rest or the opposite with the odd characters.
Asked
Active
Viewed 1.9k times
14
2 Answers
16
This document from TUGboat discusses some modifications to the LaTeX logo that adapts to various font changes. It includes both the original definition of \LaTeX as a well as a modified version:
Original \LaTeX:
\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}
Modified \LaTeX:
\DeclareRobustCommand{\LaTeX}{%
{%
L%
\setbox\z@\hbox{\check@mathfonts
\fontsize\sf@size\z@
\math@fontsfalse\selectfont
A}%
\kern-.57\wd\z@
\sbox\tw@ T%
\vbox to\ht\tw@{\copy\z@ \vss}%
\kern-.2\wd\z@}%
{%
\ifdim\fontdimen1\font=\z@
\else
\count\z@=\fontdimen5\font
\multiply\count\z@ by 64\relax
\divide\count\z@ by\p@
\count\tw@=\fontdimen1\font
\multiply\count\tw@ by\count\z@
\divide\count\tw@ by 64\relax
\divide\count\tw@ by\tw@
\kern-\the\count\tw@ sp\relax
\fi}%
\TeX}
that, when compared, looks like this across some different fonts:

Suggested in Knuth's TeXbook, the original definition of \TeX:
\def\TeX{{\rm T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX}}
From this you'll probably be able to modify your own text.
Werner
- 603,163
12
You can define macros for that. Here are the definitions of \LaTeX and \LaTeXe, from ltlogos.dtx, also to be found in latex.ltx:
\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}
\DeclareRobustCommand{\LaTeXe}{\mbox{\m@th
\if b\expandafter\@car\f@series\@nil\boldmath\fi
\LaTeX\kern.15em2$_{\textstyle\varepsilon}$}}
You could do it similar.
Perhaps also have a look at the list of logos posted by Herbert.
If this looks too complicated: you could build LaTeX macros also using LaTeX commands, such as \raisebox.
Stefan Kottwitz
- 231,401
dtklogospackage source code might be of interest. – Caramdir Jul 27 '11 at 16:47