7

I'm writing 'cause I would like to know if there's an automatic way (like something to put in the preamble) to make the subscript behave as double subscript: for example if I write

something_a 

it should behave as

something_{_a}
  • 3
    Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. – Herr K. Oct 20 '13 at 18:27
  • 4
    I'm quite confident that you do not want that behaviour throughout your document... Are you really looking for a way to reduce the size of the subscript? – jub0bs Oct 20 '13 at 18:34
  • 3
    Is it because you want it lower, or smaller, or both? – Steven B. Segletes Oct 21 '13 at 0:08
  • Actually I've asked for a way to automate the double subscript 'cause I prefer, as Steven B. asked, both of the characteristic of it: lower and smaller characters. I've said double subscript 'cause this was the way I managed to resolve "my font's problem" but if there's a way to do that faster I'm all ears. – Lorenzo Oct 21 '13 at 8:52
  • Kevin, sorry to bother yout but actually I didn't understand if should I thank or not for your answers... anyway thanks – Lorenzo Oct 21 '13 at 8:57
9

You probably don't want to lose one-step subscripts, but to change their behaviour. If you want lower them, you can change TeX parameters as in the following example (the exact values are to be chosen):

\documentclass{article}
\begin{document}

\[
a_b
\]

\fontdimen16\textfont2=3pt
\fontdimen17\textfont2=3pt

\[
a_b \mbox{ 3pt}
\]

\fontdimen16\textfont2=5pt
\fontdimen17\textfont2=5pt

\[
a_b \mbox{ 5pt}
\]

\end{document}

enter image description here

If you also want to change the size of subscripts, you should be more precise: which TeX dialect (e.g., plain or LaTeX) are you interested in?

  • Thank you but I was looking for a way to automate the double subscript 'cause I prefer, as Steven B. asked, both of the characteristic of it: lower and smaller characters. I've said double subscript 'cause this was the way I managed to resolve "my font's problem" but if there's a way to do that faster like a definition to put in the preamble I'm all ears – Lorenzo Oct 21 '13 at 9:00
  • 1
    This gives an error if the font dimensions are changed before the first mathematical content is typeset. Delete the first control condition demonstrating the default spacing and it will not compile. – cfr Jul 10 '15 at 20:42
5

Actually your initial question is very interesting, but not solvable straight forward. This breaks down to how TeX processes subscripts. The instruction _ (e.g. a_b) is neither a control sequence nor a control symbol, which are described in the TeX Book. But, it is a special character, whose function is declared through its category code. Due to this, not only "redefinitions" like '\def_#1{_{_#1}}' will fail, but anything will fail as well.

What you need, can be solved otherwise: By customizing \fontdimens (see the above answer) and controlling the size of subscripts, for which I would suggest this post.

Or (but this is a dirty hack): You can change the catcode of _ to active and redefine as follows:

\documentclass{article}
\catcode`\_=13
\def_#1{\sb{\sb{#1}}}
\begin{document}
$a_b,a_{bc}$
\end{document}

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.