2

I have a file with a lot of subscripts everywhere and I would like to make them more compact.

I can define \ms with \newcommand{\ms}{\scriptscriptstyle}

How can I redefine

_{}

so that it it applies a \ms (without having to type it every time, i.e., so that

_{} := _{\ms }

EDIT with usecase:

The reason I am looking for this is that what I am writing contains a lot of subscripting of the form

x_{i+k,t}

it has to be reported, but I feel most times to be cumbersome and unappealing to the eyes. A lot of the times it can be skipped while reading, so I just wanted to make it standout less.

  • See the answer by David Carlisle on how to change the font-size (which is what you want to do), in case you really want to redefine the meaning of the subscript, see answers e.g. here http://tex.stackexchange.com/questions/9333/redefine-underscore-to-produce-roman-subscript – Bort Aug 20 '15 at 10:24
  • Welcome to TeX.SX! It's not clear why you would want it. Can you be more precise? – egreg Aug 20 '15 at 10:34
  • Edited to explain usecase – Three Diag Aug 20 '15 at 10:54

3 Answers3

8
\RequirePackage{fix-cm}
\documentclass{article}

\DeclareMathSizes{10}{10}{3}{3}

\begin{document}

aa $V_1 V_2 $

\end{document}

3pt is rather small, just used to exaggerate the effect, the standard sizes are 7 and 5 so you could use {10}{10}{5}{5} (in which case you would not need the fix-cm package which is just used to allow the font to be scaled to arbitrary sizes)

The standard sizes (display, text, script and scriptscript) set by latex are:

 \DeclareMathSizes{5}{5}{5}{5}
 \DeclareMathSizes{6}{6}{5}{5}
 \DeclareMathSizes{7}{7}{5}{5}
 \DeclareMathSizes{8}{8}{6}{5}
 \DeclareMathSizes{9}{9}{6}{5}
 \DeclareMathSizes{\@xpt}{\@xpt}{7}{5}
 \DeclareMathSizes{\@xipt}{\@xipt}{8}{6}
 \DeclareMathSizes{\@xiipt}{\@xiipt}{8}{6}
 \DeclareMathSizes{\@xivpt}{\@xivpt}{\@xpt}{7}
 \DeclareMathSizes{\@xviipt}{\@xviipt}{\@xiipt}{\@xpt}
 \DeclareMathSizes{\@xxpt}{\@xxpt}{\@xivpt}{\@xiipt}
 \DeclareMathSizes{\@xxvpt}{\@xxvpt}{\@xxpt}{\@xviipt}
David Carlisle
  • 757,742
  • This is nice, but it alters my superscript as well. I am in fact using yours and @LaRiFaRi answer to achieve the desired result(I make subscripting smaller by default, and tune how small I want it by tweaking the /scriptscriptstyle size). This is probably not best in general, but suits the notation required by my current work. Thanks ! – Three Diag Aug 20 '15 at 10:32
  • 1
    What do the {@xpt} do? – Three Diag Aug 20 '15 at 10:46
  • 1
    @ThreeDiag \@xpt is 10pt, such abbreviations are used all over the latex sources (and save a few bytes that needed saving back then) – David Carlisle Aug 20 '15 at 11:19
5
% arara: pdflatex

\documentclass{article}
\catcode`_=\active
\newcommand_[1]{\ensuremath{\sb{\scriptscriptstyle #1}}}

\begin{document}
$A_x$
\end{document}
LaRiFaRi
  • 43,807
3

I think it's a very bad idea. This said, here's how:

\documentclass{article}

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

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

\begin{document}

New: $A_1^2$

Original: $A_{\scriptstyle1}^2$

\end{document}

enter image description here

egreg
  • 1,121,712
  • Yeah, you are right that this is a bad idea in general. For the small report I need to write (where I don't expect to have other math environment requiring a different treatment) it should be alright. – Three Diag Aug 20 '15 at 11:15