我在 align* 环境中的列表中有很多项目,我尝试使用 multicol 包将列表编译为 align* 内的三列列表,但 align* 列表一直超出文档的边缘,所以问题是:我该如何实现这一点?
\documentclass{article}
\usepackage{multicol}
\usepackage{amsmath}
\begin{document}
\begin{multicols}{3}
\begin{align*}
one & \;1 \\
two & \;2 \\
three & \;3 \\
four & \;4 \\
five & \;5 \\
six & \;6 \\
seven & \;7 \\
eight & \;8 \\
nine & \;9 \\
zero & \;0 \\
one & \;1 \\
two & \;2 \\
three & \;3 \\
four & \;4 \\
five & \;5 \\
six & \;6 \\
seven & \;7 \\
eight & \;8 \\
nine & \;9 \\
zero & \;0 \\
one & \;1 \\
two & \;2 \\
three & \;3 \\
four & \;4 \\
five & \;5 \\
six & \;6 \\
seven & \;7 \\
eight & \;8 \\
nine & \;9 \\
zero & \;0 \\
one & \;1 \\
two & \;2 \\
three & \;3 \\
four & \;4 \\
five & \;5 \\
six & \;6 \\
seven & \;7 \\
eight & \;8 \\
nine & \;9 \\
zero & \;0 \\
one & \;1 \\
two & \;2 \\
three & \;3 \\
four & \;4 \\
five & \;5 \\
six & \;6 \\
seven & \;7 \\
eight & \;8 \\
nine & \;9 \\
zero & \;0 \\
\end{align*}
\end{multicols}
\end{document}
答案1
您可以使用tabbing
:
\documentclass{article}
\usepackage{multicol}
\usepackage{amsmath}
\begin{document}
\begin{multicols}{3}
\begin{tabbing}
\hspace*{5em}\=\kill
das Buch \> die Büche \\
one \> 1 \\
two \> 2 \\
three \> 3 \\
four \> 4 \\
five \> 5 \\
six \> 6 \\
seven \> 7 \\
eight \> 8 \\
nine \> 9 \\
zero \> 0 \\
one \> 1 \\
two \> 2 \\
three \> 3 \\
four \> 4 \\
five \> 5 \\
six \> 6 \\
seven \> 7 \\
eight \> 8 \\
nine \> 9 \\
zero \> 0 \\
one \> 1 \\
two \> 2 \\
three \> 3 \\
four \> 4 \\
five \> 5 \\
six \> 6 \\
seven \> 7 \\
eight \> 8 \\
nine \> 9 \\
zero \> 0 \\
one \> 1 \\
two \> 2 \\
three \> 3 \\
four \> 4 \\
five \> 5 \\
six \> 6 \\
seven \> 7 \\
eight \> 8 \\
nine \> 9 \\
zero \> 0 \\
one \> 1 \\
two \> 2 \\
three \> 3 \\
four \> 4 \\
five \> 5 \\
six \> 6 \\
seven \> 7 \\
eight \> 8 \\
nine \> 9 \\
zero \> 0
\end{tabbing}
\end{multicols}
\end{document}
这为左列保留了 5em。请根据需要进行调整。
答案2
您可能需要手动决定要中断的每一列的结尾,然后结束align
并使用\columnbreak
然后开始align
第二列的新行,依此类推。为了更好地对齐列内容并始终保持在顶部,使用\vfill\null
after\columnbreak
可能会有所帮助。
(我不认为这\'
对你的情况有用)
然后你会得到类似这样的结果
完整代码
\documentclass{article}
\usepackage{multicol}
\usepackage{amsmath}
%
\begin{document}
\begin{multicols}{3}
\begin{align*}
& \text{First column} & 0 \\
& one & 1 \\
& two & 2 \\
& three & 3 \\
& four & 4 \\
& five & 5 \\
& six & 6 \\
& seven & 7 \\
& eight & 8 \\
& nine & 9 \\
& ten & 10 \\
& one & 1 \\
& two & 2 \\
& three & 3 \\
& four & 4 \\
& five & 5 \\
& six & 6 \\
& seven & 7 \\
& eight & 8 \\
& nine & 9 \\
& ten & 10 \\
& one & 1 \\
& two & 2 \\
& three & 3 \\
& four & 4 \\
& five & 5 \\
& six & 6 \\
& seven & 7 \\
& eight & 8 \\
& nine & 9 \\
& ten & 10
\end{align*}
\vfill\null
\columnbreak
\begin{align*}
& \text{Second column} & 0 \\
& one & 1 \\
& two & 2 \\
& three & 3 \\
& four & 4 \\
& five & 5 \\
& six & 6 \\
& seven & 7 \\
& eight & 8 \\
& nine & 9 \\
& ten & 10 \\
& one & 1 \\
& two & 2 \\
& three & 3 \\
& four & 4 \\
& five & 5 \\
& six & 6 \\
& seven & 7 \\
& eight & 8 \\
& nine & 9 \\
& ten & 10 \\
& one & 1 \\
& two & 2 \\
& three & 3 \\
& four & 4 \\
& five & 5 \\
& six & 6 \\
& seven & 7 \\
& eight & 8 \\
& nine & 9 \\
& ten & 10
\end{align*}
\vfill\null
\columnbreak
\begin{align*}
& \text{Third column} & 0 \\
& one & 1 \\
& two & 2 \\
& three & 3 \\
& four & 4 \\
& five & 5 \\
& six & 6 \\
& seven & 7 \\
& eight & 8 \\
& nine & 9 \\
& ten & 10 \\
& one & 1 \\
& two & 2 \\
& three & 3 \\
& four & 4 \\
& five & 5 \\
& six & 6 \\
& seven & 7 \\
& eight & 8 \\
& nine & 9 \\
& ten & 10 \\
& one & 1 \\
& two & 2 \\
& three & 3 \\
& four & 4 \\
& five & 5 \\
& six & 6 \\
& seven & 7 \\
& eight & 8 \\
& nine & 9 \\
& ten & 10
\end{align*}
\vfill\null
\end{multicols}
%
\end{document}
答案3
这是一张桌子,不是吗?
在三列表中,您可以按如下方式书写:
\documentclass{article}
\begin{document}
\begin{table}[ht]
\centering
\begin{tabular}{ll}
\multicolumn{2}{c}{\textbf{First column}}\\
one & 1 \\
two & 2 \\
three & 3 \\
four & 4 \\
five & 5 \\
six & 6 \\
seven & 7 \\
eight & 8 \\
nine & 9 \\
ten & 10 \\
one & 1 \\
two & 2 \\
three & 3 \\
four & 4 \\
five & 5 \\
six & 6 \\
seven & 7 \\
eight & 8 \\
nine & 9 \\
ten & 10 \\
\end{tabular}
\quad
\begin{tabular}{ll}
\multicolumn{2}{c}{\textbf{Second column}}\\
one & 1 \\
two & 2 \\
three & 3 \\
four & 4 \\
five & 5 \\
six & 6 \\
seven & 7 \\
eight & 8 \\
nine & 9 \\
ten & 10 \\
one & 1 \\
two & 2 \\
three & 3 \\
four & 4 \\
five & 5 \\
six & 6 \\
seven & 7 \\
eight & 8 \\
nine & 9 \\
ten & 10 \\
\end{tabular}
\quad
\begin{tabular}{ll}
\multicolumn{2}{c}{\textbf{Third column}} \\
one & 1 \\
two & 2 \\
three & 3 \\
four & 4 \\
five & 5 \\
six & 6 \\
seven & 7 \\
eight & 8 \\
nine & 9 \\
ten & 10 \\
one & 1 \\
two & 2 \\
three & 3 \\
four & 4 \\
five & 5 \\
six & 6 \\
seven & 7 \\
eight & 8 \\
nine & 9 \\
ten & 10 \\
\end{tabular}
\end{table}
\end{document}