我认为,默认情况下,LaTeX 的索引位置太高了。我在法国网站上找到了如何将它们定位到较低的位置,但书写起来仍然很费劲。
\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}
产生的结果:
是否存在一个包或宏,可以通过将索引放置在较低的位置来替换索引的原始位置(并且这不会改变索引的语法)?
答案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}