我写了下面的代码来生成一个长表。但是结果并不理想
\begin{document}
\lipsum[1]
\lipsum[1]
\lipsum[1]
\newcommand{\Summary}{BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA \\
BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA \\
BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA \\
BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA \\
BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA \\
BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA}
\newcommand{\TabularEnvironment}[1]{\begin{tabular}[c]{@{}p{\linewidth}@{}} #1 \end{tabular}}
\definecolor{lightgray}{HTML}{EFEFEF}
\setlength\arrayrulewidth{.5pt}
\begin{longtable}{|>{\columncolor{lightgray}} p{0.2\linewidth} | p{0.175\linewidth} | p{0.175\linewidth} |}
\noalign{\nobreak\vskip-.5pt} \hline\noalign{\nobreak\vskip.5pt}
Here & Here & Here
\\[.5pt]\noalign{\nobreak\vskip-.5pt} \hline\noalign{\nobreak\vskip.5pt}
\endfirsthead
\noalign{\nobreak\vskip-.5pt} \hline\noalign{\nobreak\vskip.5pt}
Here & Here & Here
\\[.5pt]\noalign{\nobreak\vskip-.5pt} \hline\noalign{\nobreak\vskip.5pt}
\endhead
\noalign{\nobreak\vskip-.5pt} \hline\noalign{\nobreak\vskip.5pt}
\endfoot
foo & bar & dada \\[.5pt]\noalign{\nobreak\vskip-.5pt} \hline\noalign{\nobreak\vskip.5pt}
foo & bar & dada \\ \cline{2-2}
foo & bar & dada \\ \cline{2-2}
foo & bar & dada \\ \cline{2-2}
foo & bar & dada \\ \cline{2-2}
foo & bar & \TabularEnvironment{\Summary} \\ \cline{2-2}
foo & bar & dada \\ \cline{2-2}
foo & bar & dada \\ \cline{2-2}
foo & bar & dada \\ \cline{2-2}
foo & bar & dada \\ \cline{2-2}
foo & bar & dada \\[.5pt]\noalign{\nobreak\vskip-.5pt} \hline\noalign{\nobreak\vskip.5pt}
\caption{Your caption here} % needs to go inside longtable environment
\label{tab:myfirstlongtable}
\end{longtable}
\end{document}
问题如下:
页面被剪切,没有显示所有单词,我知道变量 \tabularenvironment 的问题,但我不知道如何解决。有什么帮助吗?