在页面末尾的长表的多行单元格中垂直放置文本

在页面末尾的长表的多行单元格中垂直放置文本

当垂直文本恰好落在页面末尾而必须在下一页继续时,如何解决该multirow单元格中的放置问题?longtable

我已经更新了给出的示例这里来表达我的意思。

\documentclass{article}
\usepackage{longtable}
\usepackage{multirow, graphicx}
\usepackage{lipsum}

\begin{document}


\lipsum[1]\vspace{10cm}

\begin{longtable}{|p{0.5in}|p{1.2in}|p{1.7in}|c|}
    \caption{Data Dictionary}\label{tab:summary}\\ 
    \hline
    \centering \textbf{Tables}&
    \centering \textbf{Columns}&
    \centering \textbf{Designation}&
    \textbf{Type}\\
    \hline
    \endfirsthead
    \multicolumn{4}{c}%
    {\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
    \hline
    \textbf{Tables} &  \textbf{Columns}    &   \textbf{Designation} &   \textbf{Type} \\
    \hline
    \endhead
    \hline \multicolumn{4}{r}{\textit{Continued on next page}} \\
    \endfoot
    \hline
    \endlastfoot

\multirow{7}{*}[-5ex]{\rotatebox[origin=c]{90}{\textbf{Building}}} &
\centering RI Building Ref
(Primary Key)&
\raggedright  The building reference in database&
text\\

\cline{2-4}

&\centering Building Name&
The building name&
text\\

\cline{2-4}

&\centering Development Name&
The development name to which the building belongs, if any.&
text\\

\cline{2-4}

&\centering Address&
The building street address&
text\\

\cline{2-4}

&\centering Submarket&
The submarket the building is located at.&
text\\

\cline{2-4}

& \centering Latitude&
The building latitude&
float\\

\cline{2-4}

&\centering Longitude &
The building longitude& 
float\\

\hline

\end{longtable}
\end{document}

结果是:

在此处输入图片描述

答案1

正如软件包文档中建议的那样multirow:“必须注意,当多行条目位于页面底部附近时,长表不会中断该条目”。如果要防止分页符出现在条目中间,建议使用\\*而不是\\。但是,\\*如果后面跟着 ,则不起作用\cline。必须使用选项“重新定义以便后面跟着 时也能起作用”来加载multirow软件包。longtable\cline\\*\cline

\documentclass{article}
\usepackage{longtable}
\usepackage[longtable]{multirow}
\usepackage{graphicx}
\usepackage{lipsum}

\begin{document}


\lipsum[1]\vspace{10cm}

\begin{longtable}{|p{0.5in}|p{1.2in}|p{1.7in}|c|}
    \caption{Data Dictionary}\label{tab:summary}\\ 
    \hline
    \centering \textbf{Tables}&
    \centering \textbf{Columns}&
    \centering \textbf{Designation}&
    \textbf{Type}\\
    \hline
    \endfirsthead
    \multicolumn{4}{c}%
    {\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
    \hline
    \textbf{Tables} &  \textbf{Columns}    &   \textbf{Designation} &   \textbf{Type} \\
    \hline
    \endhead
    \hline \multicolumn{4}{r}{\textit{Continued on next page}} \\
    \endfoot
    \hline
    \endlastfoot

\multirow{7}{*}[-5ex]{\rotatebox[origin=c]{90}{\textbf{Building}}} &
\centering RI Building Ref
(Primary Key)&
\raggedright  The building reference in database&
text\\*

\cline{2-4}

&\centering Building Name&
The building name&
text\\*

\cline{2-4}

&\centering Development Name&
The development name to which the building belongs, if any.&
text\\*

\cline{2-4}

&\centering Address&
The building street address&
text\\*

\cline{2-4}

&\centering Submarket&
The submarket the building is located at.&
text\\*

\cline{2-4}

& \centering Latitude&
The building latitude&
float\\*

\cline{2-4}

&\centering Longitude &
The building longitude& 
float\\

\hline

\end{longtable}
\end{document}

相关内容