
我有一個帶有兩個支持項的小方程式來解釋該方程式。
\begin{equation}
[\mathrm{d}[\mathrm{i}], \mathrm{a}[\mathrm{i}]]=\mathrm{f}_{i}(\mathrm{M}[\mathrm{i}] \cdot \mathrm{f})
\end{equation}
where $\mathrm{d}[\mathrm{i}] \in \mathbb{R}^{B \times n_{d}}$ and $\mathrm{a}[\mathrm{i}] \in \mathbb{R}^{B \times n_{a}}$ \vspace{0.5\baselineskip}
這在紙面上看起來並不整潔和良好。我正在使用 mathptmx 但沒有得到好的結果。我怎麼才能讓它看起來更好。
編輯
\begin{equation}
[d[i], a[i]] = f_{i}(M[i]\cdot f)
\end{equation}
where $d[i] \in \mathbb{R}^{B \times n_{d}}$ and $a[i] \in \mathbb{R}^{B \times n_{a}}$ \vspace{0.5\baselineskip}
答案1
這取決於個人喜好,但這是我的建議。
首先,您可以使用\shortintertext{where}
from mathtools
inside asplit
來引入定義。
其次,我冒昧地將外括號和圓括號設為比內括號大一號。
\documentclass{article}
\usepackage{mathtools} % For \shortintertext
\usepackage{unicode-math} % For \setmathfont
\defaultfontfeatures{Scale = MatchLowercase, Ligatures = TeX }
\setmainfont{TeX Gyre Termes}[Scale=1.0] % Modern version of times or newtxtext
\setmathfont{TeX Gyre Termes Math} % Modern version of mathptmx or newtxmath
%% To format the MWE for TeX.SX:
\usepackage[paperwidth=10cm]{geometry}
\pagestyle{empty}
\begin{document}
\begin{equation}
\begin{split}
\bigl[ d[i], a[i] \bigr] = f_{i}\bigl( M[i]\cdot f \bigr)
\shortintertext{where}
\qquad d[i] \in \mathbb{R}^{B \times n_{d}} \textnormal{ and } a[i] \in \mathbb{R}^{B \times n_{a}}
\end{split}
\end{equation}
\end{document}
該解決方案還保留對齊點,因此您可以對齊定義列表,如下所示:
\documentclass{article}
\usepackage{mathtools} % For \shortintertext
\usepackage{unicode-math} % For \setmathfont
\defaultfontfeatures{Scale = MatchLowercase, Ligatures = TeX }
\setmainfont{TeX Gyre Termes}[Scale=1.0] % Modern version of times or newtxtext
\setmathfont{TeX Gyre Termes Math} % Modern version of mathptmx or newtxmath
%% To format the MWE for TeX.SX:
\usepackage[paperwidth=10cm]{geometry}
\pagestyle{empty}
\begin{document}
\begin{align}
\begin{split}
\qquad \bigl[ d[i], a[i] \bigr] &= f_{i}\bigl( M[i]\cdot f \bigr)
\shortintertext{where}
d[i] &\in \mathbb{R}^{B \times n_{d}} \\
a[i] &\in \mathbb{R}^{B \times n_{a}}
\end{split}
\end{align}
\end{document}
這會在頁面上留下大量空白,如果是印刷教科書,您可能會更關心這一點。從好的方面來說,紙是一種極好的碳匯!
您可以根據自己的喜好進行調整,例如更改行的水平間距或使用\begin{multilined}
,僅將變數定義清單放入巢狀aligned
環境中等。
如果您不喜歡“where”單獨一行,您可以替換\shortintertext{where}
為\textnormal{ where }
。
答案2
這在某種程度上是基於意見的,但無論如何我都會說我會如何對待這項業務,因為涉及印刷和數學特徵。
首先,方程式編號僅與方程式有關,與解釋性條款無關。另外,這似乎是更高層次的數學(可能是一篇研究論文),所以我首先假設我的讀者做知道我在說什麼。例如,此時他們已經知道什麼乙,nd和nA意思是。
您只需要指定有關方程式中的符號的信息,因此只需在方程式後面添加解釋即可。我總是從讀者可以閱讀的原則出發,數學文本,特別是研究論文,應該盡可能簡單。
換句話說,解釋性子句不需要特殊的格式:當讀者看到方程式時,他們會繼續閱讀並找到子句。
\documentclass[twocolumn]{article}
\usepackage{amsmath}
\usepackage{newtxtext,newtxmath}
\usepackage{lipsum} % for mock text
\begin{document}
\lipsum[1][1-3]
We can state our main equation
\begin{equation}
\bigl[d[i], a[i]\bigr] = f_{i}(M[i]\cdot f)
\end{equation}
where $d[i] \in \mathbb{R}^{B \times n_{d}}$ and $a[i] \in \mathbb{R}^{B \times n_{a}}$.
After the $n$th step two outputs are produced.
\lipsum
\end{document}
請不要這樣做$n^{th}$
。這是不對的。如果你真的想要一個上標“th”,請使用$n$\textsuperscript{th}
.但$n$th
或者$n$-th
更好。