\documentclass[12pt, a4paper]{article}
\usepackage[top=0.8 in,bottom=0.8 in,left=0.5 in,right=0.5 in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{calc,shapes}
\usepackage{parskip}
\begin{document}
\begin{aligned}[t]
(1)~2x-y+z &= 9&\\
3x-y+z&= 6&\\
4x-y+2z&= 7&\\
-x+y-z&= 4&
\end{aligned}
\begin{aligned}[t]
(2)~x+y+z &= 6&\\
x-y+2z&= 5&\\
3x+y+z&= 8&\\
2x-2y+3z&= 7&
\end{aligned}
\begin{aligned}[t]
(3)~3x+3y+2z &= 1&\\
x+2y+0z&= 4&\\
0x+10y+3z&= -2&\\
2x-3y-z&= 5&
\end{aligned}
\end{document}
答案1
另一种可能性是使用包{autoaligne}(http://mirrors.acm.jhu.edu/ctan/macros/generic/autoaligne/autoaligne-fr.pdf 在法语版 doc 中,它可以很好地处理术语的垂直对齐,并且既可以在文本中使用(这里就是这种情况),也可以在数学环境中 \ [] 或 $ $ 或其他中使用。
\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{autoaligne}
\begin{document}
%% Need to insert a math environment here!
\autoaligne{
(1)~ 2x-y+z = 9\\
3x-y+z= 6\\
4x-y+2z= 7\\
\-x+y-z= 4
}
\hfill
\autoaligne{
(2)~x+y+z = 6\\
x-y+2z= 5\\
3x+y+z= 8\\
2x-2y+3z= 7
}
\hfill
\autoaligne{
(3)~3x+3y+2z = 1\\
x+2y+0z= 4\\
0x+10y+3z= \-2\\
2x-3y-z= 5
}
\end{document}
答案2
也许您忘了将其aligned
置于数学模式,比如说\[...\]
?
以下是更正后的 MWE:
\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
%% Need to insert a math environment here!
\[
\begin{aligned}[t]
(1)~2x-y+z &= 9&\\
3x-y+z&= 6&\\
4x-y+2z&= 7&\\
-x+y-z&= 4&
\end{aligned}
\begin{aligned}[t]
(2)~x+y+z &= 6&\\
x-y+2z&= 5&\\
3x+y+z&= 8&\\
2x-2y+3z&= 7&
\end{aligned}
\begin{aligned}[t]
(3)~3x+3y+2z &= 1&\\
x+2y+0z&= 4&\\
0x+10y+3z&= -2&\\
2x-3y-z&= 5&
\end{aligned}
\]
\end{document}
结果