这是我的 LaTeX 代码:
\documentclass{amsart}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\bigwedge_{i=1}^{2} &\bigwedge_{n=1}^{2} \bigvee_{j=1}^{2}~p(i,j,n)=\\
=\left(\bigwedge_{n=1}^{2} \bigvee_{j=1}^{2}\ p(1,j,n)\right) &\wedge \left(\bigwedge_{n=1}^{2} \bigvee_{j=1}^{2}\ p(2,j,n)\right)=\\
=\left(\bigvee_{j=1}^{2}\ p(1,j,1)\wedge \bigvee_{j=1}^{2}\ p(1,j,2)\right) &\wedge \left( \bigvee_{j=1}^{2}\ p(2,j,1)\wedge \bigvee_{j=1}^{2}\ p(2,j,2)\right)=\\
=(p(1,1,1)\vee p(1,2,1))\wedge (p(1,1,2)\vee p(1,2,2)) &\wedge (p(2,1,1)\vee p(2,2,1))\wedge (p(2,1,2)\vee p(2,2,2))
\end{align*}
\end{document}
现在看起来像:
为了准确说明我的意思,我在下面画了一条红线来表示所需的精确对齐:
怎么做?
答案1
这测量一次大楔子并\mathmakebox
随后使用。
\documentclass{amsart}
\usepackage{mathtools}
\usepackage{showframe}% debugging tool
\newsavebox{\tempbox}% can probably use box 0-9
\begin{document}
\scriptsize
\savebox{\tempbox}{$\displaystyle \bigwedge_{n=1}^{2}$}% must be outside environment
\begin{align*}
\bigwedge_{i=1}^{2} &\usebox{\tempbox} \bigvee_{j=1}^{2}~p(i,j,n)\\
=\left(\bigwedge_{n=1}^{2} \bigvee_{j=1}^{2}\ p(1,j,n)\right) &\mathmakebox[\wd\tempbox]{\wedge} \left(\bigwedge_{n=1}^{2} \bigvee_{j=1}^{2}\ p(2,j,n)\right)\\
=\left(\bigvee_{j=1}^{2}\ p(1,j,1)\wedge \bigvee_{j=1}^{2}\ p(1,j,2)\right) &\mathmakebox[\wd\tempbox]{\wedge} \left( \bigvee_{j=1}^{2}\ p(2,j,1)\wedge \bigvee_{j=1}^{2}\ p(2,j,2)\right)\\
=(p(1,1,1)\vee p(1,2,1))\wedge (p(1,1,2)\vee p(1,2,2)) &\mathmakebox[\wd\tempbox]{\wedge} (p(2,1,1)\vee p(2,2,1))\wedge (p(2,1,2)\vee p(2,2,2))
\end{align*}
\end{document}
答案2
或许用array
?(无论如何,我自己也不确定。)
% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly
% declare the paper format.
\usepackage[T1]{fontenc} % Not always necessary, but recommended.
% End of standard header. What follows pertains to the problem at hand.
\usepackage{amsmath}
\usepackage{array}
\begin{document}
Text before the equations.
\[
\renewcommand*{\arraystretch}{2}
\setlength{\arraycolsep}{0pt}
\begin{array}{>{\displaystyle}r>{\displaystyle}c>{\displaystyle}l}
\bigwedge_{i=1}^{2}\,\null &
\bigwedge_{n=1}^{2} &
\null\,\bigvee_{j=1}^{2}~p(i,j,n) = \\
= \biggl(\bigwedge_{n=1}^{2} \bigvee_{j=1}^{2}\ p(1,j,n)\biggr) &
\wedge &
\biggl(\bigwedge_{n=1}^{2} \bigvee_{j=1}^{2}\ p(2,j,n)\biggr) = \\
= \biggl(\bigvee_{j=1}^{2}\ p(1,j,1)\wedge \bigvee_{j=1}^{2}\ p(1,j,2)\biggr) &
\wedge &
\biggl( \bigvee_{j=1}^{2}\ p(2,j,1)\wedge \bigvee_{j=1}^{2}p(2,j,2)\biggr) = \\
= \bigl(p(1,1,1)\vee p(1,2,1)\bigr)\wedge\bigl(p(1,1,2)\vee p(1,2,2)\bigr) &
\wedge &
\bigl(p(2,1,1)\vee p(2,2,1)\bigr)\wedge\bigl(p(2,1,2)\vee p(2,2,2)\bigr)
\end{array}
\]
Text after the equations.
\end{document}
请注意,我更改了许多括号的大小,并且我不建议在行首重复“=”符号。此外,生成的等式不适合允许的文本宽度。
输出如下:
答案3
最后一行太长,无法放入amsart
文档类定义的文本块中;您必须将该表达式拆分成多行。一旦确定需要拆分行,按照查询中布局的方式对齐其他行就没有什么吸引力了。结果:只需使用简单的align*
环境即可完成。
\left
还请注意,从印刷上来说,和产生的括号\right
太大。请\bigg
改用 -sized 括号。
\documentclass{amsart} % automatically loads 'amsmath' package
\begin{document}
\begin{align*}
&\bigwedge_{i=1}^{2} \bigwedge_{n=1}^{2} \bigvee_{j=1}^{2} p(i,j,n) \\
&\quad= \biggl(\,\bigwedge_{n=1}^{2} \bigvee_{j=1}^{2} p(1,j,n)\biggr)
\wedge\biggl(\,\bigwedge_{n=1}^{2} \bigvee_{j=1}^{2} p(2,j,n)\biggr) \\
&\quad= \biggl(\,\bigvee_{j=1}^{2} p(1,j,1)\wedge \bigvee_{j=1}^{2} p(1,j,2)\biggr)
\wedge\biggl(\,\bigvee_{j=1}^{2} p(2,j,1)\wedge \bigvee_{j=1}^{2} p(2,j,2)\biggr)\\
&\quad= (p(1,1,1)\vee p(1,2,1))\wedge (p(1,1,2)\vee p(1,2,2)) \\
&\qquad\qquad \wedge (p(2,1,1)\vee p(2,2,1))\wedge (p(2,1,2)\vee p(2,2,2))
\end{align*}
\end{document}