Search code examples
latexr-markdownvisualization

Improve visual clarity of super/subscripts in LaTeX


I was wondering how to get my superscript/subscript variables to look more clean, as I have seen in publications. For example, I would like letters within a superscript closer together, to limit visual clutter on certain variables. A visual example of this is below:

Here is what my variables look like: enter image description here

Versus what I have seen in a publication: enter image description here

In the publication, the PH in the superscript is closer together. Any idea how to clean up these kind of variables that have a superscript and subscript index?

Here is my code (I use R Markdown to create my pdfs):

\frac{\rho{_N^{CN}}}{n{_N^{CN}}}

Solution

  • In math mode, LaTeX uses a larger spacing to separate variables, since it assumes that CN should be understood not as "CN" but as "C by N". Sometimes this can be undesired either because you want to use an actual word or, as in your case, you may feel it doesn't look so good.

    A couple of solutions could be, either to use negative spaces \!:

    \frac{\rho{_N^{C\!N}}}{n{_N^{C\!N}}} : enter image description here

    or to use \mathit{}, wich for capital letters is quite similar to normal math mode, but with shorter spacing:

    \frac{\rho{_N^{\mathit{CN}}}}{n{_N^{\mathit{CN}}}} : enter image description here