8

I recently discovered that the \LaTeX command does not have proper kerning between the first ‘L’ and the ‘A’, the ‘A’ looks too thin (like fake smallcaps, simple downscaling). Also the logo doesn't scale properly when choosing the \tiny font size (the A gets out of proportion). I use the libertine package, so Linux Libertine. How to fix this?

\documentclass{article}
\usepackage{libertine}

\begin{document}
\centering
{\tiny\LaTeX}

\LaTeX

{\Huge\LaTeX}
\end{document}

bad LaTeX logo

4
  • 2
    Just to be clear, \TeX and \LaTeX are commands designed with respect to the Computer Modern font. Some ad hoc tweaking is needed to make the logos look equally good with other fonts.
    – Sverre
    Commented Apr 4, 2017 at 18:15
  • @Sverre: Sure, but IMO it's bad design that the ‘A’ is chosen as a one step smaller font (my theory) is showing through when selecting the \tiny size, as then no smaller step is available for the A to have. I consider this as a kind of bug that I found here. Small caps is just the better choice for that A and the metalogo developer agrees.
    – lblb
    Commented Apr 4, 2017 at 18:23
  • I'm not sure what your actual use case is. You may want to consider loading the graphicx package and typing \scalebox{0.5}{\LaTeX} to get a logo that's scaled 50% linearly from the original.
    – Mico
    Commented Apr 4, 2017 at 19:52
  • @Mico: The \tiny is just to show the deficiency and is not an actual use case for me, but normal size is and I find my solution to look better.
    – lblb
    Commented Apr 4, 2017 at 20:00

3 Answers 3

5

With metalogo:

\documentclass{article}
\usepackage{libertine}

% keep the original for reference
\usepackage{letltxmacro,xpatch}
\LetLtxMacro\oldLaTeX\LaTeX
\LetLtxMacro\oldTeX\TeX
\xpatchcmd{\oldLaTeX}{\TeX}{\oldTeX}{}{\ddt}

\usepackage{metalogo}

\setLaTeXa{\scshape a}
\setlogokern{La}{-.3em}
\setlogokern{aT}{-.1em}
\setlogokern{Te}{-.08em}
\setlogokern{eX}{-.1em}
\setlogodrop{0.33ex}

\begin{document}

{\fontfamily{cmr}\selectfont\oldLaTeX}

\LaTeX

{\tiny\LaTeX}

\end{document}

enter image description here

0
4

Without digging into the code, it seems that the \LaTeX logo chooses a one step smaller font size for the ‘A’, and thus when encountering \tiny there is no smaller step available, destroying the proportions. I think this is as close to finding a bug in the (La)TeX system as I will ever get ;). Small caps is just the logical choice for that A, it fits in beautifully, but they might not be available for a different typeface.

I defined a new command \myLaTeX which uses the small caps provided by Linux Libertine for the ‘A’ and has the proper kerning between the letters. The spacing is font size dependent using em for horizontal and ex for vertical spacing. As the screenshot shows, it behaves nicely with different font sizes:

\documentclass{article}
\usepackage{libertine}
\DeclareRobustCommand\myLaTeX{%
    L\kern-.3em%
    \raisebox{.4ex}{\scshape a}\kern-.13em%
    T\kern-.2em%
    \raisebox{-.5ex}{E}\kern-.13em%
    X%
}

\begin{document}
\centering
{\tiny\LaTeX\ \myLaTeX}

\LaTeX\ \myLaTeX

{\Huge\LaTeX\ \myLaTeX}
\end{document}

nice LaTeX logo

Alternatively, the package metalogo can adjust the TeX logos, which is often needed, for many fonts. It would be possible to fix the kerning and the weight of the ‘A’, but I'm not sure about the scaling behavior.

0
1

I am currently writing a new package flexlogo which addresses this for different fonts. It's not on CTAN yet but anyone wishing to test it and let me know of bugs is welcome to contact me at [email protected]

2
  • How does the package go? Is it ready yet?
    – TeXnician
    Commented Jul 13, 2017 at 8:06
  • No, I abandoned it in favour of the metalogo package mentioned above. I must apologise for not having mentioned this here earlier. Commented Jul 15, 2017 at 21:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .