1

The position of the indices is in my opinion located by default too high with LaTeX. I found on the French site how to position them lower, but it remains heavy to write.

\documentclass[11pt]{article} 
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage[a4paper,hmargin=15mm,top=18mm,bottom=20mm]{geometry}
\usepackage{amssymb}
\usepackage{amsmath}

\begin{document} % from https://texnique.fr/osqa/questions/8927/maths-descendre-un-indice-encore-plus-bas

[ \text{ \textit{too high index:} } r_1 \qquad \text{\textit{ well placed index:} } r_{{}_{\mkern-2mu\scriptstyle1}} ]

[ r_1 \qquad r_{{}_{\mkern-2mu\scriptstyle1}} ] \end{document}

What produces:

screenshot

Is there a package or a macro that allows to replace the native position of the indices by placing them lower (and this without changing the syntax of the indices)?

AndréC
  • 24,137

1 Answers1

1
\documentclass[11pt]{article} 
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage[a4paper,hmargin=15mm,top=18mm,bottom=20mm]{geometry}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{color, graphicx}

\begin{document}
\setbox0=\hbox{$.$} % init math font
\parindent=0pt

Subscript attributes: minimum shift down, from the main baseline, of the baseline of a subscript,
\begin{enumerate}
  \item sub1: when no superscript is present,
  \item sub2: when a superscript is present.
\end{enumerate}

Default: sub1 = \the\fontdimen16\textfont2, sub2 = \the\fontdimen17\textfont2
\newbox\subNoSup
\newbox\subSup
\setbox\subNoSup=\hbox{$A_{\rlap{\color{red}\rule{6em}{.4pt}}1}r_1$}
\setbox\subSup  =\hbox{$A^n_{\rlap{\color{blue}\rule{6em}{.4pt}}1} r^n_1$}

\[ A_1r_1, A^n_1 r^n_1 \]

Enlarge both by 2mu (1/9em)
\fontdimen16\textfont2=\dimexpr\fontdimen16\textfont2 + 1em/9\relax % 2mu = 1em/9
\fontdimen17\textfont2=\dimexpr\fontdimen17\textfont2 + 1em/9\relax

\[ A_1r_1, A^n_1 r^n_1 \]

Comparison:\par
\centering
\scalebox{3}{\parbox{7em}{
  \leavevmode\copy\subNoSup \qquad $A_1 r_1$ \par
  \leavevmode\copy\subSup   \qquad $A^n_1 r^n_1$
}}
\end{document}

enter image description here

muzimuzhi Z
  • 26,474
  • this is interesting, but will this modify other parameters of LaTeX or only the indexes and therefore have no influence elsewhere on the document? – AndréC Dec 12 '22 at 21:33
  • @AndréC I don't know too much about font dimensions. Lowering subscripts too much will enlarge the resulting baselineskip, as I guess. Also I find font size switches will reset font dimensions, maybe due to optimal sizes. – muzimuzhi Z Dec 13 '22 at 02:02