3

I would like redefine _ like _{\!_{ }} to do subscripts smaller.

I've tried with:

\renewcommand{\_}[1] {_{\!_{#1}}}

But it doesn't work, apparently, maybe I'm wrong. Take this equation, for instance:

\begin{equation*}
    \dd F_i = \vv{\Pi}_{\!_{i}}\cdot\vdiff{s} = \sum\limits_k\Pi_{ik}n_{k}\dd s
\end{equation*}

enter image description here

I like the size of the subscript of \vv{\Pi} much better than that of the other subscripts.

  • 8
    No, you don't want to do this. – Henri Menke Jul 11 '16 at 22:22
  • 1
    Why in the world would you want the subscripts to be smaller?! Also, your definition can't work for 3 reasons: (1) it's a recursive definition, which can't work in this form. (2) You can't use \_ to redefine _. (3) You can't redefine _ so easily since _ is not a macro (control sequence/control character/active character), it's treated in a special way by TeX and its redefinition is a bit tricky. – yo' Jul 11 '16 at 22:23
  • Then, how could I do smaller all my subscripts? – JFernan Jul 11 '16 at 22:25
  • 1
    @JFernan Sorry for sounding harsh, but even if I knew the answer (I'm not sure it's all that easy), I would be reluctant to provide it since it's plain wrong. The size of the subscripts is pretty fine in a vast majority of cases. Do you have an example where you feel the subscript is too large, please (best as a minimal working example)? – yo' Jul 11 '16 at 22:26
  • 3
    »I like much more the subscript of Pi than others in this case.« … wat? – Henri Menke Jul 11 '16 at 22:32
13

Use \DeclareMathSizes. An extensive description of the command is given in [Yiannis Lazarides (2011)].

\documentclass[10pt]{article}
\usepackage{lmodern} % scalable font
%\DeclareMathSizes{10}{10}{7}{5} % default
\DeclareMathSizes{10}{10}{5}{3}
\begin{document}
$a_{b_c}^{b^c}$
\end{document}

Left is adjusted, right is default.

enter image description here enter image description here

  • 3
    It is perhaps the case to remark that a similar declaration should be issued for each font size you use in the text; for example, if you use \small text, or footnotes (which are typeset in \footnotesize), you need to say, for example, \DeclareMathSizes{9}{9}{5}{3} or \DeclareMathSizes{8}{8}{5}{3}, respectively. – GuM Jul 11 '16 at 22:49
  • I forgot to add that the values I’ve given are only suitable if \normalsize corresponds to 10pt. One can clearly see that this kind of changes aren’t trivial, and that it is best to stick to the standard sizes. \DeclareMathSizes is primilarily designed to be used by the authors of packages that provide new math fonts. – GuM Jul 11 '16 at 23:08
7

The underscore _ doesn't have a definition and defining \_ doesn't help.

You can do what you seem to want, but let me fiercely state that it's wrong.

\documentclass{article}

\begingroup
\lccode`~=`_ \lowercase{\endgroup
  \def~#1{\sb{\!\sb{#1}}}%
}

\AtBeginDocument{\mathcode`_=\string"8000 \catcode`_=12 }

\begin{document}

$A_b^b$

\end{document}

enter image description here

Now you can see what I mean.

A possibly less ugly version, but wrong as well, as it can be clearly seen:

\documentclass{article}

\begingroup
\lccode`~=`_ \lowercase{\endgroup
  \def~#1{\sb{\scriptscriptstyle#1}}%
}

\AtBeginDocument{\mathcode`_=\string"8000 \catcode`_=12 }

\begin{document}

$A_b^b$

\end{document}

enter image description here

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.