6

While writing a couple of equations, I stumbled upon a problem of poor spacing. Example in question:

\documentclass{amsart}
\usepackage{IEEEtrantools}
\begin{document}

\begin{IEEEeqnarray}{rCl}
\label{eq:48}
\hat{\mathcal{H}}_{rr}=B^{(e)}\hat{J}^{2}
\end{IEEEeqnarray}

\end{document}

enter image description here

As you can see, there isn't much harmony between the hat and the square of J. Same is appliable to the l.h.s..

Any suggestions regarding how to properly formatting such equations is dearly welcome!

Best,

Strelok

2
  • Hi, you can add easily \, into {\,2}.
    – Sebastiano
    Nov 8, 2017 at 18:11
  • 2
    Hi. I am unable to reproduce the screenshot you posted using only the code you posted. It would appear that you're loading one or more font-related packages. Please do reveal which ones they may be.
    – Mico
    Nov 8, 2017 at 19:11

2 Answers 2

9

I can reproduce your picture with

\documentclass{amsart}
\usepackage{mathptmx}

\begin{document}

\begin{equation}
\hat{\mathcal{H}}_{rr}=B^{(e)}\hat{J}^{2}
\end{equation}

\end{document}

The problem is in mathptmx, which is a poor 30 year old hack for getting Times in math papers.

Use a more modern package.

\documentclass{amsart}
\usepackage{newtxtext,newtxmath}
\usepackage{calrsfs}

\begin{document}

\begin{equation}
\hat{\mathcal{H}}_{rr}=B^{(e)}\hat{J}^{2}
\end{equation}

\end{document}

enter image description here

With rsfso instead of calrsfs:

\documentclass{amsart}
\usepackage{newtxtext,newtxmath}
\usepackage{rsfso}

\begin{document}

\begin{equation}
\hat{\mathcal{H}}_{rr}=B^{(e)}\hat{J}^{\,2}
\end{equation}

\end{document}

enter image description here

2
  • 2
    A worthwhile alternative to the calrsfs and mathrsfs.sty packages, which were last updated in 1994 and 1996, respectively, may be the rsfso package, last updated by Michael Sharpe in 2013. The latter uses the rsfso math font and provides an easy scaling option, whereas the former two use the rsfs math font (and don't provide a straightforward way to perform scaling). rsfso is much less heavily sloped (slantend?) than rsfs. In fact, I'd say the slant angle of rsfso is roughly the same as that of newtxmath. IMNSHO, the slant angle of rsfs verges on the bizarre...
    – Mico
    Nov 8, 2017 at 19:25
  • 1
    @Mico Added the example with rsfso
    – egreg
    Nov 8, 2017 at 21:25
5

Add some kerning before the exponent. Also, for capital letters, I would use the \widehat command from mathabx. As it is already defined in amssymb, I defined a \varwidehat accent borrowed from mathabx:

\documentclass{amsart}
\usepackage{ieeetrantools}

\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
      <5> <6> <7> <8> <9> <10>
      <10.95> <12> <14.4> <17.28> <20.74> <24.88>
      mathx10
      }{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}
\DeclareMathAccent{\varwidehat}{0}{mathx}{"70}

\begin{document}

\begin{IEEEeqnarray}{rCl}
  \label{eq:48}
  \varwidehat{\mathcal{H}}_{rr}=B^{(e)}\varwidehat{J}^{\mkern2mu 2}
\end{IEEEeqnarray}

\end{document} 

enter image description here

2
  • Hi, I vote always too your answers. You are excellent user as also a Mathematician. Also I'm a Mathematician.
    – Sebastiano
    Nov 8, 2017 at 18:25
  • @Sebastiano: Thanks for your kind appreciation :o) I've seen you're Italian. May I know from which region?
    – Bernard
    Nov 8, 2017 at 18:34

You must log in to answer this question.

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