有人能告诉我,对于以下代码,如何在第二个表格的左侧和右侧获得垂直线:
\documentclass[12pt]{amsart}
\usepackage[alphabetic]{amsrefs}
\usepackage{amssymb,amsmath,amsthm,mathrsfs,ulem,tikz, caption}
\begin{document}
\def \Alt{\mathrm{Alt}}
\section{Alternating products of Poincar\'{e} series}
\subsection{Tabulation of the main results}
\begin{center}
\begin{tabular}{||c c||}
\hline
Weyl group & $\prod_{I\subseteq S} W_{I}(u)^{(-1)^{|I|+n}}$ \\ [0.5ex]
\hline\hline
$A_{n}$ & $\frac{1-u^{n+1}}{1-u^{n}}$ \\ \hline
$B_{n}$ & $\frac{1-u^{2n}}{1-u^{n}}$ \\ \hline
$D_{n}$ & $\frac{1-u^{2n-2}}{1-u^{n}}$ \\ \hline
$E_{6}$ & $\frac{(1-u^{12})(1-u^{9})}{(1-u^{8})(1-u^{6})}$ \\ \hline
$E_{7}$ & $\frac{(1-u^{18})(1-u^{14})}{(1-u^{9})(1-u^{7})}$ \\ \hline
$E_{8}$ & $\frac{(1-u^{30})(1-u^{24})(1-u^{20})}{(1-u^{12})(1-u^{10})(1-u^{8})}$ \\ \hline
$F_{4}$ & $\frac{(1-u^{12})(1-u^{8})}{(1-u^{6})(1-u^{4})}$ \\ \hline
$G_{2}$ & $\frac{1-u^{5}}{1-u^{2}}$ \\ \hline
\end{tabular}
\end{center}
\bigskip
\begin{center}
\begin{tabular}{llc cll}
\hline
Affine Weyl group & $\prod_{I\subseteq S} W_{I}(u)^{(-1)^{|I|+n}}$ \\ [0.5ex]
\hline \hline
$\tilde{A_{n}}$ & $n+1, n+1, n+1, \ldots n+1$ ($n$ times) \\ \hline
$\tilde{B_{n}}$ & $n+1, n+2, \ldots 2n$ \\ \hline
$\tilde{C_{n}}$ & $n+1, n+2, \ldots 2n$ \\ \hline
$\tilde{D_{n}}$ & $n+1, n+2, \ldots 2n-4, 2n-3, 2n-2, 2n-2, 2n-2$ \\ \hline
$\tilde{E_{6}}$ & $7, 9, 9, 11, 12, 12$ \\ \hline
$\tilde{E_{7}}$ & $8, 10, 11, 13, 14, 17, 18$ \\ \hline
$\tilde{E_{8}}$ & $9, 11, 13, 14, 17, 19, 23, 29$ \\ \hline
$\tilde{F_{4}}$ & $5, 7, 8, 11$ \\ \hline
$\tilde{G_{2}}$ & $3, 5$ \\ \hline
\end{tabular}
\end{center}
\end{document}
答案1
您写错了l
s。是|
字母“l”,而不是竖线。
您希望\begin{tabular}{||c c||}
在第一个表格中实现类似的效果。目前,您已定义 6 列(两列左对齐、两列居中对齐和两列左对齐),但实际使用的只有两列。
但是,您的表格很难阅读。那么多行和冲突的字符。我建议您使用booktabs
% arara: pdflatex
\documentclass[12pt]{amsart}
%\usepackage{caption} % if you want to use floats
\usepackage{booktabs}
\usepackage{array}
\begin{document}
\section{Alternating products of Poincar\'{e} series}
\subsection{Tabulation of the main results}
\begin{center}
\renewcommand{\arraystretch}{1.6}
\begin{tabular}{>{$}l<{$} >{$}c<{$}}
\toprule
\text{Weyl group} & \prod_{I\subseteq S} W_{I}(u)^{(-1)^{|I|+n}} \\
\midrule
A_{n} & \frac{1-u^{n+1}}{1-u^{n}} \\
B_{n} & \frac{1-u^{2n}}{1-u^{n}} \\
D_{n} & \frac{1-u^{2n-2}}{1-u^{n}} \\
E_{6} & \frac{(1-u^{12})(1-u^{9})}{(1-u^{8})(1-u^{6})} \\
E_{7} & \frac{(1-u^{18})(1-u^{14})}{(1-u^{9})(1-u^{7})} \\
E_{8} & \frac{(1-u^{30})(1-u^{24})(1-u^{20})}{(1-u^{12})(1-u^{10})(1-u^{8})} \\
F_{4} & \frac{(1-u^{12})(1-u^{8})}{(1-u^{6})(1-u^{4})} \\
G_{2} & \frac{1-u^{5}}{1-u^{2}} \\ \bottomrule
\end{tabular}
\end{center}
\begin{center}
\begin{tabular}{>{$}l<{$} >{$}l<{$}}
\toprule
\text{Affine Weyl group} & \prod_{I\subseteq S} W_{I}(u)^{(-1)^{|I|+n}} \\
\midrule
\tilde{A_{n}} & n+1, n+1, n+1, \ldots n+1 \quad (n~\text{times}) \\
\tilde{B_{n}} & n+1, n+2, \ldots 2n \\
\tilde{C_{n}} & n+1, n+2, \ldots 2n \\
\tilde{D_{n}} & n+1, n+2, \ldots 2n-4, 2n-3, 2n-2, 2n-2, 2n-2 \\ % this line is too long for your document. You have to split or rephrase.
\tilde{E_{6}} & 7, 9, 9, 11, 12, 12 \\
\tilde{E_{7}} & 8, 10, 11, 13, 14, 17, 18 \\
\tilde{E_{8}} & 9, 11, 13, 14, 17, 19, 23, 29 \\
\tilde{F_{4}} & 5, 7, 8, 11 \\
\tilde{G_{2}} & 3, 5 \\ \bottomrule
\end{tabular}
\end{center}
%\begin{table
% \centering
% \caption{some caption}\label{tab:someLabel}
% \begin{tabular}{>{$}l<{$} >{$}l<{$}}
% \toprule
% \text{Affine Weyl group} & \prod_{I\subseteq S} W_{I}(u)^{(-1)^{|I|+n}} \\
% \midrule
% \tilde{A_{n}} & n+1, n+1, n+1, \ldots n+1 \quad (n~\text{times}) \\
% \tilde{B_{n}} & n+1, n+2, \ldots 2n \\
% \tilde{C_{n}} & n+1, n+2, \ldots 2n \\
% \tilde{D_{n}} & n+1, n+2, \ldots 2n-4, 2n-3, 2n-2, 2n-2, 2n-2 \\
% \tilde{E_{6}} & 7, 9, 9, 11, 12, 12 \\
% \tilde{E_{7}} & 8, 10, 11, 13, 14, 17, 18 \\
% \tilde{E_{8}} & 9, 11, 13, 14, 17, 19, 23, 29 \\
% \tilde{F_{4}} & 5, 7, 8, 11 \\
% \tilde{G_{2}} & 3, 5 \\ \bottomrule
% \end{tabular}
%\end{table}
\end{document}
最后的例子(注释掉)展示了如何在浮动中使用这样的表格。说到排版问题,效果好多了,而且你不必跳过和类似的东西。