一种方法是,写一个「空的下标」,不输出内容、仅使用它纵向的尺寸(高度和深度)。
```tex
\[
t_i^j = t_{\vphantom{i}}^j
\]
```
如果下标内容变得更高(例如 `k`,例如 `i^i`),`\vphantom` 的参数也要随之变化。
个人建议,尽一切可能避免使用具体数字,它们或者依赖具体输入内容(的字符尺寸),或者依赖字体字号。
------
更多信息
公式中,
\# 上标偏移高度(上标文字基线相对于正常文字基线上移的高度)有个默认值,这就是 `t^j`的效果。
\# 如果下标太高了,为了避免重叠,上标会随之上移,这就是 `t_i^j` 的效果。
上述提到的「上标偏移高度的默认值」,是由字体定义的(传统是通过 tfm 文件)。在 tex 文档里,我们也可以修改它
```tex
\documentclass{article}
\makeatletter
\newcommand{\showFontdimen}{
\check@mathfonts
\noindent minimum shift up, from the main baseline, of the baseline of a
superscript, \par
- for display style: \the\fontdimen13\textfont2 \par
- other style and non-cramped: \the\fontdimen14\textfont2 \par
- other style and cramped: \the\fontdimen15\textfont2
\setbox0=\hbox{$\scriptstyle j$}
\textbf{inline} $t_i^j = t^j$ text $t_i\raise\the\fontdimen14\textfont2\copy0$
\begin{equation}
\mbox{\bfseries display } t_i^j = t^j \quad t_i\raise\the\fontdimen13\textfont2\copy0
\end{equation}
}
\makeatother
\begin{document}
\showFontdimen
\fontdimen13\textfont2=1.5em
\fontdimen14\textfont2=1em
\showFontdimen
\end{document}
```
![](https://pics.latexstudio.net/data/images/202002/3a053887a612258.png)
例子里为了突出效果,分别修改为了 1.5em 和 1em。可以根据实际需要进行修改。
\# 参考 `texdoc texbytopic`, `\fontdimen` 相关内容
\# 对 `\fontdimen` 第一个参数的解释 https://tex.stackexchange.com/a/88993
\# 如果要在导言区全局修改,参考 https://tex.stackexchange.com/a/96063
回答于 2020-02-17 20:34
论坛 github.com/C论坛 github.com/C