我想在aligned
环境之间和环境中的文本下方留出一些空间,以便获得更好的输出。我该怎么做?
\documentclass[12pt]{article}
\usepackage[top=0.3in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}
\setlength{\parindent}{0cm}
\usepackage{xltxtra}
\usepackage{xgreek}
\setmainfont[Mapping=tex-text]{GFSDidot.otf}
\setsansfont[Mapping=tex-text]{GFSDidot.otf}
\usepackage[fleqn]{amsmath}
\usepackage{unicode-math}
\everymath{\displaystyle}
\setlength{\mathindent}{0cm}
\allowdisplaybreaks
\newcommand{\CustomGather}[1]
{\begin{gather*}#1\end{gather*}}
\newcommand{\CustomAligned}[1]
{\begin{aligned}#1\end{aligned}}
\newcommand{\CustomAlign}[1]
{\begin{align*}#1\end{align*}}
\newcommand{\3}{\vspace{0.3cm}}
\begin{document}
Άσκηση 4
\3
\CustomGather
{
\CustomAlign
{
&\text{Ερώτημα α.}\\
&\mathcal{E}=-\frac{d}{dt}\int\limits_{S}\vec{B}\cdot \vec{dS}=-\frac{d}{dt}\int\limits_{x-b/2}^{x+b/2}\int\limits_{-b/2}^{b/2}B_{0}(x/a)^{2}\hat{y}\cdot dxdz\hat{y}=-\frac{d}{dt}\left( \frac{B_{0}}{a^{2}}\int\limits_{-b/2}^{b/2}dz\int\limits_{x-b/2}^{x+b/2}x^{2}dx\right)=\\
&=-\frac{d}{dt}\left(\frac{B_{0}b}{a^{2}}\left[\frac{x^{3}}{3}\right]_{x-b/2}^{x+b/2}\right)=\frac{B_{0}b}{a^{2}}\frac{d}{dt}\left[\frac{(x+b/2)^{3}}{3}-\frac{(x-b/2)^{3}}{3}\right]=-\frac{B_{0}b}{a^{2}}\frac{d}{dt}\left[x^{2}b+\frac{b^{3}}{12}\right]=\\
&=-\frac{B_{0}b^{2}2x}{a^{2}}\frac{dx}{dt}=-\frac{2B_{0}b^{2}xu_{0}}{a^{2}}
}\\
\CustomAlign
{
&\text{Ερώτημα β.}\\
&I=\frac{dq}{dt}\Rightarrow dq=Idt\Rightarrow Q=\int\limits_{0}^{t}Idt\\
&dx=u_{0}dt\Rightarrow dt=\frac{dx}{u_{0}}\\
&Q=\int\limits_{0}^{x}\frac{Idx}{u_{0}}=\int\limits_{0}^{x}\frac{\mathcal{E}dx}{Ru_{0}}\Rightarrow Q=\frac{2B_{0}b^{2}x^{2}}{a^{2}R2}=\frac{B_{0}b^{2}x^{2}}{a^{2}R}
}\\
\CustomAlign
{
&\text{Ερώτημα γ.}\\
&dW=\mathcal{E}Idt\Rightarrow W=\int\limits_{0}^{t}\mathcal{E}Idt=\frac{4u_{0}B^{2}_{0}b^{4}x^{3}}{3Ra^{4}}
}
}
\end{document}
另外,为什么在gather/align
中间有文本的环境中,文本中间的间距不是相等,但其上方有更多空间?
\CustomAlign
{&\text{Ερώτημα α.}\\
&\oint\vec{H}\cdot\vec{dl}=NI\Rightarrow H_{z}\cdot\hat{z}\cdot l \hat{z}=nlI \Rightarrow \vec{H}=nI\hat{z}\\
&\vec{B}=\mu_{0}nI\hat{z}=\mu_{0}nI_{0}\sin (\omega t) \hat{z}\\
&\oint\vec{E}\cdot\vec{dl}=-\frac{d}{dt}\int\limits_{S}\vec{B}\cdot \vec{dS}
}
Text
\CustomAlign
{&\text{Ερώτημα α.}\\
&\oint\vec{H}\cdot\vec{dl}=NI\Rightarrow H_{z}\cdot\hat{z}\cdot l \hat{z}=nlI \Rightarrow \vec{H}=nI\hat{z}\\
&\vec{B}=\mu_{0}nI\hat{z}=\mu_{0}nI_{0}\sin (\omega t) \hat{z}\\
&\oint\vec{E}\cdot\vec{dl}=-\frac{d}{dt}\int\limits_{S}\vec{B}\cdot \vec{dS}
}
\CustomGather
{
\CustomAligned
{
&E=\vec{u}\times \vec{B}\\
&\vec{u}=\omega \rho \hat{\phi}\\
&\vec{B}=B_{0}\hat{z}\\
&\Rightarrow \vec{E}=B_{0}\omega\rho\hat{\rho} \Rightarrow \vec{J}=\sigma B_{0}\omega\rho\hat{\rho}\\
&d^{3}\vec{F}=\vec{J}\times\vec{B}dV=\vec{J}\times\vec{B}\rho d\rho d\phi dz\\
&d^{3}\vec{T}=\vec{R} \times d^{3}vec{F}= \rho \hat{\rho} \times (\vec{J}\times\vec{B})\rho d\rho d\phi dz\\
&d^{3}\vec{T}=(-\hat{z})B^{2}_{0} \sigma \omega \rho^{3}d\rho d\phi dz\\
}
}
Άσκηση 7
\CustomGather
{
\CustomAligned
{
&\text{Ερώτημα α.}\\
&\oint\vec{H}\cdot\vec{dl}=NI\Rightarrow H_{z}\cdot\hat{z}\cdot l \hat{z}=nlI \Rightarrow \vec{H}=nI\hat{z}\\
&\vec{B}=\mu_{0}nI\hat{z}=\mu_{0}nI_{0}\sin (\omega t) \hat{z}\\
&\oint\vec{E}\cdot\vec{dl}=-\frac{d}{dt}\int\limits_{S}\vec{B}\cdot \vec{dS}
}
}
答案1
这样好些了吗?我amsmath
用替换了mathtools
,并用 命令制作了标题(Ερώτημα α 等)\shortintertext
。还用 替换了 ,\CustomAlign
因为\CustomAligned
它嵌套在 gather* 环境中。顺便说一句,据我所知, xltxtra
现在加载已经没用了。
\documentclass[12pt]{article}
\usepackage[top=0.3in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}
\setlength{\parindent}{0cm}
\usepackage{xltxtra}
\usepackage{xgreek}
\setmainfont[Mapping=tex-text]{GFSDidot.otf}
\setsansfont[Mapping=tex-text]{GFSDidot.otf}
\usepackage[fleqn]{mathtools}
\usepackage{unicode-math}
\everymath{\displaystyle}
\setlength{\mathindent}{0cm}
\allowdisplaybreaks
\newcommand{\CustomGather}[1]
{\begin{gather*}#1\end{gather*}}
\newcommand{\CustomAligned}[1]
{\begin{aligned}#1\end{aligned}}
\newcommand{\CustomAlign}[1]
{\begin{align*}#1\end{align*}}
\newcommand{\3}{\vspace{0.3cm}}
\begin{document}
Άσκηση 4
\3
\CustomGather
{
\CustomAligned
{
\shortintertext{Ερώτημα α.}
\mathcal{E}&=-\frac{d}{dt}\int\limits_{S}\vec{B} · \vec{dS}=-\frac{d}{dt}\int\limits_{x-b/2}^{x+b/2}\int\limits_{-b/2}^{b/2}B_{0}(x/a)^{2}\hat{y} · dxdz\hat{y}=-\frac{d}{dt}\left( \frac{B_{0}}{a^{2}}\int\limits_{-b/2}^{b/2}dz\int\limits_{x-b/2}^{x+b/2}x^{2}dx\right)=\\
&=-\frac{d}{dt}\left(\frac{B_{0}b}{a^{2}}\left[\frac{x^{3}}{3}\right]_{x-b/2}^{x+b/2}\right)=\frac{B_{0}b}{a^{2}}\frac{d}{dt}\left[\frac{(x+b/2)^{3}}{3}-\frac{(x-b/2)^{3}}{3}\right]=-\frac{B_{0}b}{a^{2}}\frac{d}{dt}\left[x^{2}b+\frac{b^{3}}{12}\right]=\\
&=-\frac{B_{0}b^{2}2x}{a^{2}}\frac{dx}{dt}=-\frac{2B_{0}b^{2}xu_{0}}{a^{2}}
}\\[\baselineskip]
\CustomAligned
{
\shortintertext{Ερώτημα β.}
I&=\frac{dq}{dt} ⇒ dq=Idt ⇒ Q=\int\limits_{0}^{t}Idt\\
dx&=u_{0}dt ⇒ dt=\frac{dx}{u_{0}}\\
Q&=\int\limits_{0}^{x}\frac{Idx}{u_{0}}=\int\limits_{0}^{x}\frac{\mathcal{E}dx}{Ru_{0}} ⇒ Q=\frac{2B_{0}b^{2}x^{2}}{a^{2}R2}=\frac{B_{0}b^{2}x^{2}}{a^{2}R}
}\\[\baselineskip]
\CustomAligned
{
\shortintertext{Ερώτημα γ.}
dW&=\mathcal{E}Idt ⇒ W=\int\limits_{0}^{t}\mathcal{E}Idt=\frac{4u_{0}B^{2}_{0}b^{4}x^{3}}{3Ra^{4}}
}
}
\end{document}