# How to render \Lyx like \LaTeX [duplicate]

Possible Duplicate:
How to write (La)TeX (with braces) [or any other TeX-related logo]

Is there a macro defined somewhere that I can use so that \LyX{} renders like \LaTeX in pure LaTeX? This is really hard to google and grep for...

-

## migrated from stackoverflow.comOct 7 '11 at 2:56

This question came from our site for professional and enthusiast programmers.

## marked as duplicate by Peter Grill, Werner, Caramdir, Joseph Wright♦Oct 7 '11 at 5:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Sorry, don't understand exactly what you are looking for? Please add some details. – Peter Grill Oct 6 '11 at 23:39

## 1 Answer

The logo \TeX is defined as follows in ltlogo.dtx:

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


Subsequently, \LaTeX prepends the two characters La in a special way:

\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}


Other TeX-related logos are also defined in this canonical way. As such, using similar techniques to manipulate the characters, you could do the following:

\def\LyX{L\kern-.2em% Define \LyX
{\sbox\z@ X%
\vbox to .9\ht\z@{\hbox{\check@mathfonts
\fontsize\sf@size\z@
\math@fontsfalse\selectfont
Y}%
\vss}%
}%
\kern-.125emX\@}


Here is a minimal working example that showcases the three logos \TeX, \LaTeX and \LyX:

\documentclass{article}
\makeatletter
\def\LyX{L\kern-.2em% Define \LyX
{\sbox\z@ X%
\vbox to .9\ht\z@{\hbox{\check@mathfonts
\fontsize\sf@size\z@
\math@fontsfalse\selectfont
Y}%
\vss}%
}%
\kern-.125emX\@}
\makeatother

\begin{document}
\noindent \verb!\TeX!: \TeX \\
\noindent \verb!\LaTeX!: \LaTeX \\
\noindent \verb!\LyX!: \LyX
\end{document}


-