3

Given the MWE below, one can see that the spacing around the parentheses is rather awkward. The opening parenthesis is too close to \cos and \sin, and too far away from the \omega. The closing parenthesis is too far away from \varphi. Is there a way to reduce/add some kerning?

\documentclass{standalone}

\usepackage[charter]{mathdesign}

\begin{document}
$ \mathrm{e}^{\,\mathrm{j}(\omega t + \varphi)} =\cos (\omega t + \varphi) + \mathrm{j}\sin (\omega t + \varphi) $
\end{document}

enter image description here

Update: of cource one can use \kern to add kerning, but I'm looking for a more general way.

4
  • Of course there are many ways to do so. But I think the spacing is by design.
    – user156344
    Commented Feb 18, 2019 at 8:22
  • @JouleV Correct, but I don't like it. Commented Feb 18, 2019 at 8:26
  • Are you looking for an automatic solution? The fact that you already used \, in the exponent makes me think that you know about the manual solution \sin (\!\omega t + \varphi\!) already. (You can pick different kerns than \! with \mkern -2mu, see for example tex.stackexchange.com/q/374021/35864)
    – moewe
    Commented Feb 18, 2019 at 15:46
  • @moewe: Yes I was looking for an automatic solution. I used the thin space because the superscript j was too close to e. If one uses i as the imaginary unit, then no thin space is needed. Commented Feb 18, 2019 at 16:43

1 Answer 1

1

If you wanted to automatically add some extra kerning to a glyph in text mode, then I'd tell you to look into microtype's \SetExtraKerning command. Unfortunately, that doesn't work in math mode. I think your best option is using the \mkern command made specifically to be used in math mode. Here's how it looks

\documentclass{standalone}
\usepackage[charter]{mathdesign}
\newcommand{\leftpar}{\mkern3mu(\mkern-3mu}
\newcommand{\rightpar}{\mkern-3mu)\mkern3mu}
\begin{document}
$ \mathrm{e}^{\,\mathrm{j} \leftpar \omega t + \varphi \rightpar} =\cos \leftpar\omega t + \varphi\rightpar + \mathrm{j}\sin \leftpar\omega t + \varphi\rightpar $
\end{document}

Where mu stands for math units and it's defined as 1/18 of em.

enter image description here

1
  • I came to that same conclusion. It's definitily this font, no problems in lmodern. Commented Feb 18, 2019 at 16:45

You must log in to answer this question.

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