Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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...

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

migrated from stackoverflow.com Oct 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.

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}

TeX-LaTeX-LyX

share|improve this answer
add comment

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