如何正確使用 Latex 編輯器(如“Tex studio”)中的索引?

如何正確使用 Latex 編輯器(如“Tex studio”)中的索引?

如何正確使用 Latex 編輯器中的索引Tex studio

例如,當我輸入 $x^{p_{q_r}}$ 時,看起來 $p$ 和 $q$ 並排放置,而 $r$ 位於下方。但這些都是真下標。我應該使用什麼來獲得更清晰的位置?

如果有兩個索引(一個是另一個索引的下標),一切看起來都很好,但如果有三個索引,則看起來不太好。什麼是救贖?

例如,參見

在此輸入影像描述

答案1

在此輸入影像描述

我建議定義一個巨集來節省一些打字並避免佈局不一致。修改長度-0.2ex以移動索引q

\documentclass{article}
\newcommand\xq[2]{x_{#2}^{q\raisebox{-0.2ex}{$_{{}_{{#1}_{#2}}}$}}}
\begin{document}
$\xq11 \xq12 \cdots \xq1d$
\end{document}

答案2

好的,所以問題主要是小寫 q 的形狀,帶有下降部分,使它看起來幾乎與二級下標 1 齊平。循環”的底部。

所以你需要做的就是修改下標降低的程度。您可以透過設定\fontdim適當的長度來控制它。可以找到有關其工作原理的討論在這篇文章中

為了說明該方法,請參閱以下程式碼:

\documentclass{article}

\makeatletter    %%% These three lines are to ensure the math fonts 
\check@mathfonts %%% are configured prior the call of \fontdim. Include
\makeatother     %%% if you run into an error about \nullfont.

\begin{document}
\[ x^{q_{1_1}} \]   %% Standard format. For reference.

\fontdimen16\scriptfont2=3pt  % <--- This is the line that sets the height.

\[ x^{q_{1_1}} \]  %% Same expression, for comparison. 
\end{document}

輸出(頂行是原始的,底行是增加的下標高度):

在此輸入影像描述

您必須嘗試使用這些參數才能找到讓您美學滿意的參數。

相關內容