11

I'm beautifying some HW solutions for the upcoming semester, and came across a kerning issue

\documentclass[]{article}
\usepackage{amsmath}
\begin{document}
\[C_{in} \ \ C_{out} \ \ C_{eff}\]

\end{document}

The output:

enter image description here

The "in" and "out" subscripts look fine, but "eff" seems very spread out. Is there a quick fix?

  • 10
    That’s because the eff is interpreted as e times f times f, and the same goes for in and out. So you should either use the \mathit by @Sebastiano in the answer, or \mathrm, or \text, etc. – Ruixi Zhang Aug 27 '18 at 20:44
  • 2
    @RuixiZhang My thoughts exactly. – Dr. Manuel Kuehner Aug 27 '18 at 20:45
33

In math-mode you should to use \mathit{...} (slanted} or \mathbf{...} (bold) or normal \mathrm{...} for any type of the text into math formula.

enter image description here

\documentclass{article}
\begin{document}
\[C_{\mathit{in}} \ \ C_{\mathit{out}} \ \ C_{\mathit{eff}}\]
\[C_{\mathrm{in}} \ \ C_{\mathrm{out}} \ \ C_{\mathrm{eff}}\]
\[C_{\mathbf{in}} \ \ C_{\mathbf{out}} \ \ C_{\mathbf{eff}}\]
\end{document}
  • 5
    +1 I would recommend \mathrm since eff is rather a label (short for effective) and not a variable (e times f times f). At least this is the convention that I am aware of. – Dr. Manuel Kuehner Aug 27 '18 at 20:43
  • 2
    @Dr.ManuelKuehner I have forgotten \mathrm :-(. Now edit my answer. +1 – Sebastiano Aug 27 '18 at 20:44
  • 4
    Alternatively, you can use \text from the amsmath package. But there are different opinions about this: tex.stackexchange.com/questions/70632 – Dr. Manuel Kuehner Aug 27 '18 at 20:51
  • 1
    Another alternative, \operatorname, is good if you ever need to set in, out or eff next to some other identifier. That formats and spaces it like the word log or sin. – Davislor Aug 28 '18 at 5:02

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.