Custom LaTeX logo
Here is an attempt at creating something that stretches with the font size:
\documentclass[10pt]{article}
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\makeatletter
\DeclareRobustCommand{\aMaTeX}{%
M\kern-.09em {\setbox0\hbox{T}%
\vbox to\ht0{\hbox{%
\csname S@\f@size\endcsname\fontsize\sf@size\z@ \math@fontsfalse\selectfont A}%
\vss}%
}\kern-.40em \hbox{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125ex X}}
\newcommand{\bMaTeX}{\mbox{%
M\hspace{-0.25ex}%
\raisebox{0.18ex}{\tiny A}\hspace{-0.65ex}%
T\hspace{-0.65ex}%
\raisebox{0.18ex}{\tiny E}\hspace{-0.4ex}%
X%
}}
\newsavebox{\MaTeXbox}
\savebox{\MaTeXbox}{\normalsize%
M\hspace{-0.25ex}%
\raisebox{0.18ex}{\tiny A}\hspace{-0.65ex}%
T\hspace{-0.65ex}%
\raisebox{0.18ex}{\tiny E}\hspace{-0.4ex}%
X%
}%
\newcommand{\cMaTeX}{%
\settoheight{\@tempdima}{M}%
\resizebox{!}{\@tempdima}{\usebox{\MaTeXbox}}%
}
\makeatother
\begin{document}
\begin{tabular}{lllll}
Original 1 & Original 2 & New & \verb|\TeX| & \verb|\LaTeX| \\
\hline
\footnotesize\aMaTeX & \footnotesize\bMaTeX & \footnotesize\cMaTeX & \footnotesize\TeX & \footnotesize\LaTeX \\
\small\aMaTeX & \small\bMaTeX & \small\cMaTeX & \small\TeX & \small\LaTeX \\
\aMaTeX & \bMaTeX & \cMaTeX & \TeX & \LaTeX \\
\large\aMaTeX & \large\bMaTeX & \large\cMaTeX & \large\TeX & \large\LaTeX \\
\Large\aMaTeX & \Large\bMaTeX & \Large\cMaTeX & \Large\TeX & \Large\LaTeX \\
\LARGE\aMaTeX & \LARGE\bMaTeX & \LARGE\cMaTeX & \LARGE\TeX & \LARGE\LaTeX \\
\Huge\aMaTeX & \Huge\bMaTeX & \Huge\cMaTeX & \Huge\TeX & \Huge\LaTeX
\end{tabular}
\end{document}
In the above MWE, \cMaTeX
stores a \normalsize
version of MaTeX in a box, and resizes the box based on the height of M
in the prevailing font. Resizing (while maintaining aspect ratio) is done using \resizebox{!}{<height>}{<stuff>}
from the graphicx
package.
This seems to work reasonably well in all sizes
\documentclass{article}
\usepackage{relsize}
\makeatletter
\def\matex@ssize{\larger[-2]\scshape}
\DeclareRobustCommand{\MaTeX}{%
\mbox{%
M\kern-0.1em
\raisebox{0.18ex}{\matex@ssize a}\kern-0.27em
T\kern-0.27em
\raisebox{0.18ex}{\matex@ssize e}\kern-0.1em
X%
}%
}
\makeatother
\begin{document}
\MaTeX
\large\MaTeX
\Large\MaTeX
\LARGE\MaTeX
\huge\MaTeX
\Huge\MaTeX
\end{document}
Don't use ex
for horizontal measurements, but rather em
. I've used \kern
instead of \hspace
, just for personal preference.
\documentclass{article}
\usepackage{graphicx}
\DeclareRobustCommand\MaTeX{%
M\kern-.09em%
\makebox[0pt][l]{\raisebox{0.075em}{\scalebox{0.5}{A}}\kern-.25em T%
\kern-.25em%
\makebox[0pt][l]{\raisebox{0.075em}{\scalebox{0.5}{E}}\kern-.08em X}}}
\begin{document}
\MaTeX
\huge\MaTeX
\tiny\MaTeX
\end{document}