# How to get “LaTeX” symbol in document

I want to get that fancy LaTeX symbol to put in one of my documents but I cannot find it anywhere. All searching for things like latex symbol have not resulted in the symbol but other symbols.

-
You mean \LaTeX ? –  Yiannis Lazarides Dec 22 '10 at 4:18
@Yiannis, thanks, that is exactly what I was looking for. Add that as an answer and I will accept. I tried that but with the wrong capitalization. –  sixtyfootersdude Dec 22 '10 at 4:34
LyX does this automatically when you type in either LyX or LaTeX. –  Dave Jarvis Dec 22 '10 at 14:12

You simply type \LaTeX. One problem with this is that if you type it a lot of times in your text you will need to type \LaTeX\␣¹ (i.e., followed by \ and an actual space) to force a space after it.

Also personally I find the capitalization of L and T leads to typing errors, so I redefine the command as follows:

\newcommand{\latex}{\LaTeX\xspace}
\newcommand{\tex}{\TeX\xspace}


\xspace is from the xspace package.

¹ ␣ is used here to represent a normal space "", which wouldn’t show up at the end of Markdown code markup.

-
or simply \makeatletter\g@addto@macro{\TeX}{\xspace}\makeatother for both –  Herbert Dec 22 '10 at 6:33
Or \expandafter\def\expandafter\TeX\expandafter{\TeX\xspace} or \edef\TeX{\TeX\noexpand\xspace} or ... –  TH. Dec 22 '10 at 10:29
Why is the extra slash needed to force a space? –  8128 Jan 28 '14 at 22:49
@fluteflute It is the way TeX is designed. Imagine if you needed to type \LaTeX. then the space would be a problem. –  Yiannis Lazarides Jan 29 '14 at 2:36

There is also the hologo package for typesetting TeX-related logos:

\hologo{LaTeX}
\Hologo{LaTeX}  % to be used at the beginning of a sentence (no difference in this case)


While the syntax is a bit more verbose, it has the advantages that you don't have to think about trailing spaces and that it works correctly inside PDF bookmarks.

-