8

When I tried to type mathematical terminologies, like Hasse-Weil theorem, there is a minor thing which hurts my eyes.

The issue is the spacing between and after the hyphen, which you can see in the following picture. The is almost no spacing before it, and there is a (visually visible) "big" spacing after it.

Theoretically, I understand this is a correct design. However, emotionally, I DON'T LIKE this.

Does this issue ever bother you before? And if yes, how do you deal with it?

enter image description here

\documentclass[10pt, a4paper]{article}


\begin{document}

\noindent
Hasse-Tate\\
Hasse-Vitry\\
Hasse-Weil\\
Hasse-Yvye\\
\ \\
Hasse-Grothendieck

\end{document}
  • 1
    The font doesn't define kerning between the hyphen and uppercase letters. You have to add your own, if you want it. – egreg Feb 6 '16 at 11:34
9

The Computer Modern fonts define no kerning between the hyphen and uppercase letters, so if you want it you have to insert your own:

\documentclass{article}
\newcommand{\?}[1]{\kern-.#1em }

\begin{document}

Hasse-Weil

Hasse-\?{02}Weil

Hasse-\?{04}Weil

Hasse-\?{06}Weil

Hasse-\?{08}Weil

Hasse-\?{10}Weil

Hasse-\?{12}Weil

Hasse-\?{14}Weil

\end{document}

enter image description here

For a semiautomatic version, add the same kern that would be inserted if the hyphen had been an A:

\documentclass{article}

\newcommand{\?}[1]{% kerned hyphen
  \sbox0{A#1}\sbox2{A\kern0pt #1}%
  \kern\dimexpr\wd0-\wd2\relax
  #1%
}

\begin{document}

Hasse-\?Weil

Hasse-\?Tate

Hasse-\?Yvye

Hasse-\?Grothendieck

\end{document}

enter image description here

  • Thank you. I will try it. However, do you think it would be better to adjust both the spacing before and after the hyphen, in order to get a balance adjustment. – user565739 Feb 6 '16 at 12:04
  • 1
    @user565739 Personally, I wouldn't kern before the hyphen. – egreg Feb 6 '16 at 12:14
  • May you explain what "A" means in "the hyphen had been an A"? Also in the semiautomatic code, how the kern is determined? – user565739 Feb 6 '16 at 15:38
  • 2
    @user565739 #1 stands for the next character; then I measure the width of A#1 and of A\kern0pt #1 in order to determine the kerning between the two letters. I changed the previous {} to \kern0pt because the former method doesn't work with LuaTeX. – egreg Feb 6 '16 at 16:16
  • 1
    In the case of Hasse-\?Weil I typeset boxes containing AW and A\kern0ptW; their widths differ by the kerning the font applies between A and W, so I can kern by this difference. – egreg Feb 6 '16 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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