我有以下代码来对齐某些方程:
\begingroup\makeatletter\def\f@size{8}\check@mathfonts
\def\maketag@@@#1{\hbox{\m@th\large\normalfont#1}}%
\begin{empheq}[box=\widefbox]{align} \nonumber
&a_{M}^{c} = N'(t_{go},b,c) \frac{Z(y,\dot{y},t_{go},b,c)}{t^2_{go}}
\\ \nonumber
&N'(t_{go},b,c) = \frac{t_{go} \cdot \tau \cdot b}{A}
\\ \nonumber
&Z(y,\dot{y},t_{go},b,c) = \tau \cdot b \cdot ZEM_{OGL} \left [ (1+c \cdot W_{4}) \cdot \psi(\zeta) + (W_{3}-W_{4})\cdot \zeta \right ] -c \cdot ZEM_{OGL2} \left [ (1+\tau^2 \cdot b \cdot W_{2}) \cdot \psi(\zeta)-(1+\tau^2 \cdot b \cdot W) \cdot \zeta \right ]
\\ \nonumber
&ZEM_{OGL} = x_{1}(t)+(t_{f}-t)x_{2}(t)+\frac{(t_{f}-t)^2}{2}x_{3}(t)-\tau^2 \psi(\zeta)x_{4}(t)
\\ \nonumber
&ZEM_{OGL2} = x_{2}(t) + (t-t_{f})\cdot x_{3}(t) + \tau \cdot \left [e^{-\zeta} -1 \right ]\cdot x_{4}(t)
\\ \nonumber
&W = \int_{t}^{t_{f}} \psi^2 \left (\frac{t_{f}-\zeta}{\tau} \right ) d\zeta
\\ \nonumber
&W_{2} = \int_{t}^{t_{f}} \psi \left (\frac{t_{f}-\zeta}{\tau} \right ) \cdot \frac{t-\zeta}{\tau} d\zeta
\\ \nonumber
&W_{3} = \int_{t}^{t_{f}} \left(e^{-\frac{t-\zeta}{\tau}} -1 \right )^2 d\zeta
\\ \nonumber
&W_{4} = \int_{t}^{t_{f}} \left(e^{-\frac{t-\zeta}{\tau}} -1 \right )\cdot \frac{t-\zeta}{\tau} d\zeta
\\ \nonumber
&A = (1+c \cdot w_{3})(1+\tau^2 \cdot b \cdot W) - \tau^2 \cdot b \cdot c \cdot (W-W_{2})(W_{3}-W_{4}) \nonumber
\end{empheq}\endgroup
结果如下:
我怎样才能使框比通常的边距更宽,以便能够包含长方程式?
谢谢。
答案1
你的方程几乎很\pagewidth
宽...为了把你的方程放在框架中,你需要首先在局部增加 \textwidth
,例如借助changepage
包:
\documentclass{article}
\usepackage[strict]{changepage}
\usepackage{empheq}
%-------------------------------- show page layout, only for test
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\begin{document}
\begin{adjustwidth}{-2in}{-2in}
\begin{empheq}[box=\fbox]{align*}
&a_{M}^{c} = N'(t_{go},b,c) \frac{Z(y,\dot{y},t_{go},b,c)}{t^2_{go}} \\
&N'(t_{go},b,c) = \frac{t_{go} \cdot \tau \cdot b}{A} \\
&Z(y,\dot{y},t_{go},b,c) = \tau \cdot b \cdot ZEM_{OGL} \left [ (1+c \cdot W_{4}) \cdot \psi(\zeta) + (W_{3}-W_{4})\cdot \zeta \right ] -c \cdot ZEM_{OGL2} \left [ (1+\tau^2 \cdot b \cdot W_{2}) \cdot \psi(\zeta)-(1+\tau^2 \cdot b \cdot W) \cdot \zeta \right ] \\
&ZEM_{OGL} = x_{1}(t)+(t_{f}-t)x_{2}(t)+\frac{(t_{f}-t)^2}{2}x_{3}(t)-\tau^2 \psi(\zeta)x_{4}(t) \\
&ZEM_{OGL2} = x_{2}(t) + (t-t_{f})\cdot x_{3}(t) + \tau \cdot \left [e^{-\zeta} -1 \right ]\cdot x_{4}(t) \\
&W = \int_{t}^{t_{f}} \psi^2 \left (\frac{t_{f}-\zeta}{\tau} \right ) d\zeta \\
&W_{2} = \int_{t}^{t_{f}} \psi \left (\frac{t_{f}-\zeta}{\tau} \right ) \cdot \frac{t-\zeta}{\tau} d\zeta \\
&W_{3} = \int_{t}^{t_{f}} \left(e^{-\frac{t-\zeta}{\tau}} -1 \right )^2 d\zeta \\
&W_{4} = \int_{t}^{t_{f}} \left(e^{-\frac{t-\zeta}{\tau}} -1 \right )\cdot \frac{t-\zeta}{\tau} d\zeta \\
&A = (1+c \cdot w_{3})(1+\tau^2 \cdot b \cdot W) - \tau^2 \cdot b \cdot c \cdot (W-W_{2})(W_{3}-W_{4})
\end{empheq}
\end{adjustwidth}
\end{document}
我认为最好将最长的等式分成两行:
\documentclass{article}
\usepackage{empheq}
\newcommand*\widefbox[1]{\fbox{\hspace{1em}#1\hspace{1em}}}
%-------------------------------- show page layout, only for test
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\begin{document}
\begin{empheq}[box=\widefbox]{align*}
&a_{M}^{c} = N'(t_{go},b,c) \frac{Z(y,\dot{y},t_{go},b,c)}{t^2_{go}} \\
&N'(t_{go},b,c) = \frac{t_{go} \cdot \tau \cdot b}{A} \\
& \begin{multlined}[t]
Z(y,\dot{y},t_{go},b,c) = \tau \cdot b \cdot
ZEM_{OGL} \left[(1+c \cdot W_{4}) \cdot \psi(\zeta) + (W_{3}-W_{4})\cdot \zeta \right] \\
-c \cdot ZEM_{OGL2} \left[ (1+\tau^2 \cdot b \cdot W_{2}) \cdot \psi(\zeta)-(1+\tau^2 \cdot b \cdot W) \cdot \zeta \right]
\end{multlined} \\
&ZEM_{OGL} = x_{1}(t)+(t_{f}-t)x_{2}(t)+\frac{(t_{f}-t)^2}{2}x_{3}(t)-\tau^2 \psi(\zeta)x_{4}(t)
\\
&ZEM_{OGL2} = x_{2}(t) + (t-t_{f})\cdot x_{3}(t) + \tau \cdot \left [e^{-\zeta} -1 \right ]\cdot x_{4}(t)
\\
&W = \int_{t}^{t_{f}} \psi^2 \left (\frac{t_{f}-\zeta}{\tau} \right ) d\zeta
\\
&W_{2} = \int_{t}^{t_{f}} \psi \left (\frac{t_{f}-\zeta}{\tau} \right ) \cdot \frac{t-\zeta}{\tau} d\zeta
\\
&W_{3} = \int_{t}^{t_{f}} \left(e^{-\frac{t-\zeta}{\tau}} -1 \right )^2 d\zeta
\\
&W_{4} = \int_{t}^{t_{f}} \left(e^{-\frac{t-\zeta}{\tau}} -1 \right )\cdot \frac{t-\zeta}{\tau} d\zeta
\\
&A = (1+c \cdot w_{3})(1+\tau^2 \cdot b \cdot W) - \tau^2 \cdot b \cdot c \cdot (W-W_{2})(W_{3}-W_{4})
\end{empheq}
\end{document}