我正在使用环境编写方程式和描述gather
。但我想将方程式参数描述左对齐,并将方程式和描述放在同一页中(可以是新页面,就像 latex 处理图形一样)
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{blindtext}
\begin{document}
\blindtext\par
\blindtext\par
\blindtext\par
Dummy text Dummy text Dummy text Dummy text Dummy text
Dummy text Dummy text Dummy text Dummy text Dummy text
Dummy text Dummy text Dummy text Dummy text Dummy text
Dummy text Dummy text Dummy text Dummy text Dummy text
Dummy text Dummy text Dummy text Dummy text Dummy text
\begin{gather*}
A_{T}=\pi\left(\dfrac{D}{2}\right)^{2}=\pi\left(\dfrac{0,15~m}{2}\right)^{2}=0,018~m
\intertext{Onde:}
\begin{tabular}{rl}
$A_{T}$: & Área da seção transversal $\mathrm{(m^{2})}$\\
$D$: & Diâmetro (m)
\end{tabular}
\end{gather*}
\end{document}
答案1
我会将这些细节留到文档的最终修订版中。如果您碰巧遇到麻烦\intertext
,请将相关惩罚设置为无穷大。
\shortintertext
在我使用的例子中,mathtools
这里看起来更好。
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,mathtools}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{siunitx}
\usepackage{blindtext}
\sisetup{
output-decimal-marker={,},
}
\begin{document}
\blindtext\par
\blindtext\par
\blindtext\par
Dummy text Dummy text Dummy text Dummy text Dummy text
Dummy text Dummy text Dummy text Dummy text Dummy text
Dummy text Dummy text Dummy text Dummy text Dummy text
Dummy text Dummy text Dummy text Dummy text Dummy text
Dummy text Dummy text Dummy text Dummy text Dummy text
\begingroup
\postdisplaypenalty=10000
\begin{gather*}
A_{T}=\pi\left(\frac{D}{2}\right)^{\!2}=\pi\left(\frac{\SI{0,15}{\meter}}{2}\right)^{\!2}=
\SI{0,018}{\meter}
\shortintertext{Onde:}
\begin{tabular}{rl}
$A_{T}$: & Área da seção transversal (\si{\meter\squared})\\
$D$: & Diâmetro (\si{\meter})
\end{tabular}
\end{gather*}
\endgroup
\end{document}
我还使用了siunitx
单位,并在指数中添加了一个负的细空间,以便将它们推得更靠近括号。
答案2
[...]
Dummy text Dummy text Dummy text Dummy text Dummy text
\noindent
\begin{minipage}{\linewidth}
\begin{gather*}
A_{T}=\pi\left(\dfrac{D}{2}\right)^{2}=\pi\left(\dfrac{0,15~m}{2}\right)^{2}=0,018~m
\intertext{Onde:}
\begin{tabular}{rl}
$A_{T}$: & Área da seção transversal $\mathrm{(m^{2})}$\\
$D$: & Diâmetro (m)
\end{tabular}
\end{gather*}
\end{minipage}