How do I write "LaTeX" in LaTeX with the first letter bolded?
Note: There's a similar question and answer here: Color up each letter of \LaTeX word
You can find the definitions of \TeX
, \LaTeX
and \LaTeXe
in latex.ltx
(which is really, really surprising ;-) )
Easiest way is to use the definitions and save them as new commands, say \BLaTeX
for Bold \LaTeX
;-)
However, the kerning is wrong initially, so I changed it slightly -- please provide own values for the kerning if the given example does not really fit yet regarding personal taste.
\documentclass{article}
\usepackage{xcolor}
\makeatletter
\newcommand{\Lletterstyle}[1]{%
\textcolor{red}{\textbf{#1}}%
}
\DeclareRobustCommand{\BLaTeX}{\Lletterstyle{L}\kern-.35em%
{\sbox\z@ T%
\vbox to\ht\z@{\hbox{\check@mathfonts
\fontsize\sf@size\z@
\math@fontsfalse\selectfont
A}%
\vss}%
}%
\kern-.15em%
\TeX%
}
\DeclareRobustCommand{\BLaTeXe}{\mbox{\m@th
\if b\expandafter\@car\f@series\@nil\boldmath\fi
\BLaTeX\kern.15em2$_{\textstyle\varepsilon}$}}
\makeatother
\begin{document}
\BLaTeX\ or \LaTeX
\BLaTeXe\ or \LaTeXe
Huge:\huge
\BLaTeX\ or \LaTeX
\BLaTeXe\ or \LaTeXe
\end{document}
You can make a small extension to the metalogo
package, which enables you to choose a different initial “L”.
\documentclass{article}
\usepackage{metalogo}
\usepackage{xpatch}
\makeatletter
\newcommand{\setLaTeXL}[1]{\def\xl@LaTeXL{#1}}
\xpatchcmd{\LaTeX}{L}{\xl@LaTeXL}{}{}
\makeatother
% initialize
\setLaTeXL{L}
\newcommand{\BLaTeX}{{\setLaTeXL{\textbf{L}}\LaTeX}}
\begin{document}
\LaTeX \BLaTeX \LaTeX
\setLaTeXL{\textbf{L}}
\LaTeX
\setLaTeXL{{\usefont{U}{rsfso}{m}{n}L}}
\setlogokern{La}{-.2em}
\LaTeX
\end{document}
As you see, the commands obey the usual scoping rules. If you want a global redefinition, issue \setLaTeXL{\textbf{L}}
in the preamble. Otherwise define \BLaTeX
as shown and you'll have available both versions.