我已经找到了这个答案关于如何在普通表格环境周围添加阴影框。我想在longtable
环境中添加阴影框。这可能吗?
\documentclass{article}
\usepackage{longtable}
\begin{document}
\begin{longtable}{|l|l|}
\hline
\textbf{Ze} & \textbf{Header} \\
\hline
\endhead
\hline
\endfoot
Lorem & ipsum \\
dolor & sit \\
amet & consectetur \\
adipiscing & elit \\
Nunc & nec \\
sem & eu \\
dolor & ultrices \\
suscipit & Donec \\
eleifend & leo \\
a & urna \\
vulputate & suscipit \\
Praesent & in \\
nunc & purus \\
Quisque & ut \\
nulla & varius \\
aliquam & risus \\
consectetur & dictum \\
nulla & Nullam \\
at & aliquet \\
nisi & Suspendisse \\
quis & mattis \\
leo & Curabitur \\
non & neque \\
mollis & porta \\
quam & feugiat \\
molestie & mi \\
Curabitur & ornare \\
nibh & nec \\
orci & euismod \\
auctor & Nulla \\
sagittis & nunc \\
non & euismod \\
porta & Morbi \\
molestie & dictum \\
purus & a \\
pharetra & magna \\
dictum & vitae \\
Aliquam & bibendum \\
dui & quam \\
vitae & euismod \\
lorem & tristique \\
nec & Morbi \\
lacinia & tellus \\
et & hendrerit \\
mollis & Cras \\
et & sem \\
in & sapien \\
mattis & hendrerit \\
ac & vitae \\
velit & Maecenas \\
interdum & gravida \\
dui & fringilla \\
vehicula & mauris \\
adipiscing & ac \\
Ut & dignissim \\
sapien & dignissim \\
semper & fermentum \\
diam & purus \\
mattis & dui \\
ut & consectetur \\
ligula & nibh \\
\end{longtable}
\end{document}
答案1
(信用)
\documentclass{article}
\usepackage{longtable}
\usepackage{color,array}
\def\lsdw{\smash{\lower5pt\rlap{\textcolor[gray]{.9}{\vrule width 5pt height\ht\strutbox depth \dp\strutbox}}}}
\begin{document}
\begin{longtable}{|l|l!{\vline\lsdw}}
\hline
\textbf{Ze} & \textbf{Header} \\
\hline
\endhead
\hline
\multispan{2}%
\kern5pt\textcolor[gray]{.9}{\leaders \vrule height 5pt\hfill}\mbox{}\kern-5pt
\endfoot
Lorem & ipsum \\
dolor & sit \\
amet & consectetur \\
adipiscing & elit \\
Nunc & nec \\
sem & eu \\
dolor & ultrices \\
suscipit & Donec \\
eleifend & leo \\
a & urna \\
vulputate & suscipit \\
Praesent & in \\
nunc & purus \\
Quisque & ut \\
nulla & varius \\
aliquam & risus \\
consectetur & dictum \\
nulla & Nullam \\
at & aliquet \\
nisi & Suspendisse \\
quis & mattis \\
leo & Curabitur \\
non & neque \\
mollis & porta \\
quam & feugiat \\
molestie & mi \\
Curabitur & ornare \\
nibh & nec \\
orci & euismod \\
auctor & Nulla \\
sagittis & nunc \\
non & euismod \\
porta & Morbi \\
molestie & dictum \\
purus & a \\
pharetra & magna \\
dictum & vitae \\
Aliquam & bibendum \\
dui & quam \\
vitae & euismod \\
lorem & tristique \\
nec & Morbi \\
lacinia & tellus \\
et & hendrerit \\
mollis & Cras \\
et & sem \\
in & sapien \\
mattis & hendrerit \\
ac & vitae \\
velit & Maecenas \\
interdum & gravida \\
dui & fringilla \\
vehicula & mauris \\
adipiscing & ac \\
Ut & dignissim \\
sapien & dignissim \\
semper & fermentum \\
diam & purus \\
mattis & dui \\
ut & consectetur \\
ligula & nibh \\
\end{longtable}
\end{document}