1

From How can I see the "implementation" of the \LaTeX command? and How to write (La)TeX (with parentheses) [or any other TeX-related logo], I learn that \LaTeX is implemented as

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 \kern parameter needs to be tweaked according to the font used, as pointed out by Knuth in a TUGboat article. When trying to change that parameter in the code above, however, I get the error ! Undefined control sequence. <argument> \z.

How can I tweak the \kern value of the \LaTeX command (and of the \TeX command)?

\documentclass{article}
\renewcommand{\LaTeX}{L\kern -.20em{\sbox \z@ T\vbox to\ht \z@ {\hbox {\check@mathfonts \fontsize \sf@size \z@ \math@fontsfalse \selectfont A}\vss }}\kern -.10em\TeX}

\begin{document}
\LaTeX
\end{document}
  • 3
    Note that \LaTeX is a protected definition – Sean Allred Jun 9 '15 at 17:22
  • @SeanAllred True, but I think that's independent of the problem I raise above (I get the same error if I use \newcommand{\mylatex}{...}). – Sverre Jun 9 '15 at 17:25
  • 2
    Look at the hologo and metalogo packages. – egreg Jun 9 '15 at 17:26
6

The command being used is \z@, not \z. Wrap the redefinition in \makeatletter/\makeatother.

\documentclass{article}
\makeatletter
\renewcommand{\LaTeX}{L\kern -.20em{\sbox \z@ T\vbox to\ht \z@ {\hbox {\check@mathfonts \fontsize \sf@size \z@ \math@fontsfalse \selectfont A}\vss }}\kern -.10em\TeX}
\makeatother

\begin{document}
\LaTeX
\end{document}
  • These values work pretty well for sourcesanspro font from Adobe. – Stephen Eglen Sep 27 '16 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.