![表格始终放在最后一页](https://linux22.com/image/356164/%E8%A1%A8%E6%A0%BC%E5%A7%8B%E7%BB%88%E6%94%BE%E5%9C%A8%E6%9C%80%E5%90%8E%E4%B8%80%E9%A1%B5.png)
\begin{table}[h!]
\begin{center}
\begin{tabular}{ |c|c|c|c|c|c|c|}
\hline
Class and class & Field & designation & type &size & observation \\
\hline
\multirow{6}{4em}{Member} & m $-$ code & code of member & N & 10 & Auto increment\\
& m$-$name & member name &A &20 &\\
&m$-$fname & member family name &A &20 &\\
& email & email of member &AN &20 &\\
& m$-$type & member type & A &20 &\\
& m$-$grade & member grade & A &20 &\\
\hline
\multirow{6}{4em}{Report } &R$-$code & report code &N & 10 &Auto increment
\\
& R$-$date& misconduct date & D & 8& dd$ \ $ mm$ \ $ yyyy \\ & R$-$hour & misconduct hour &H &6 &\\
&place & misconduct place &A &20 &\\
& cause & cause of report &A &50 &\\
%&st_name and st_fname & student name and fname &20 &A &\\
%& mb_name and mbfname & member name and & 20 &A \\
\hline
\multirow{6}{4em}{Decision } &d$-$code & decision code &N & 10 & \\
&c$-$code & convocation code &N & 10 & Auto increment
\\
& d$-$date& decision date & D & 8& dd$ \ $ mm$ \ $ yyyy \\ & d$-$hour & decision hour &H &6 &\\
&f$-$des & final decision &A &50 &\\
& cause & cause of decision &A &50 &\\
& level & level of infraction & N & 2&\\
& details & details of decision &A &50 &\\
%&st_name and st_fname & student name and fname &20 &A &\\
%& mb_name and mbfname & member name and & 20 &A \\
\hline
\multirow{6}{4em}{Convocation} &c$-$code & convocation code &N & 10 & Auto increment
\\
& m $-$ code & code of member & N & 10 & Auto increment
\\
& c$-$date& convocation date & D & 8& dd$ \ $ mm$ \ $ yyyy \\ & c$-$hour & convocation hour &H &6 &\\
&c$-$reason& convocation reason &A &50 &\\
%& cause & cause of desicion &A &50 &\\
%&st_name and st_fname & student name and fname &20 &A &\\
%& mb_name and mbfname & member name and & 20 &A \\
\hline
\multirow{6}{4em}{ Teacher } & st$-$code &student code &N & 10 & Auto increment
\\
& t $-$name & teacher name &20 &A & \\
& t$-$fname & teacher family name&20& A&\\
& email & email of member &AN &20 &\\
& m$-$type & member type & A &20 &\\
\hline
\multirow{6}{4em}{ Student } & st$-$code &student code &N & 10 & Auto increment
\\
&st$-$name & student name &20 &A & \\
&st$-$fname & student family name&20& A&\\
& email & email of member &AN &20 &\\
& m$-$type & member type & A &20 &\\
\hline
\multirow{6}{4em}{Department chief } & dch$-$code &department chief code &N & 10 & \\
&dch$-$name & department chief name &20 &A & \\
&dch$-$fname & department chief family name&20& A&\\
& email & email of department chief &AN &20 &\\
& m$-$type & member type & A &20 &\\
\hline
\multirow{6}{4em}{Dec$ - $Mem}
&d$-$code & decision code &N & 10 & Auto increment
\\
& & & & &\\
&m$-$code & member code &N & 10 & Auto increment
\\
& & & & &\\
\hline
\multirow{6}{4em}{Rep$ - $Mem}
&r$-$code & report code &N & 10 & Auto increment
\\
& & & & &\\
&m$-$code & member code &N & 10 & Auto increment
\\
& & & & &\\
\hline
\end{tabular}
\caption{Detailed description of fields}
\label{tabclass}
\end{center}
\end{table}
答案1
正如上面的评论中提到的,解决方案之一可以使用longtable
:
根据对所用文档类别、页面布局等的猜测:
\documentclass{article}
\usepackage{geometry}
\usepackage{booktabs, longtable, multirow}
\begin{document}
\begin{longtable}{@{} lll cc l @{}}
\caption{Detailed description of fields}
\label{tabclass} \\
\toprule
Class and class
& Field & designation & type & size & observation \\
\midrule
\endfirsthead
\caption{Detailed description of fields (cont.)} \\
\toprule
Class and class
& Field & designation & type & size & observation \\
\endhead
\midrule
\multicolumn{6}{r}{continue on the next page}
\endfoot
\bottomrule
\endlastfoot
%
Member & m$-$code & code of member & N & 10 & Auto increment \\
& m$-$name & member name & A & 20 & \\
& m$-$fname & member family name & A & 20 & \\
& email & email of member & AN & 20 & \\
& m$-$type & member type & A & 20 & \\
& m$-$grade & member grade & A & 20 & \\
\midrule
Report & R$-$code & report code & N & 10 & Auto increment \\
& R$-$date & misconduct date & D & 8 & dd/mm/yyyy \\
& R$-$hour & misconduct hour & H & 6 & \\
& place & misconduct place & A & 20 & \\
& cause & cause of report & A & 50 & \\
%&st_name and st_fname & student name and fname &20 &A &\\
%& mb_name and mbfname & member name and & 20 &A \\
\midrule
Decision& d$-$code & decision code & N & 10 & \\
& c$-$code & convocation code & N & 10 & Auto increment \\
& d$-$date & decision date & D & 8 & dd/mm/yyyy \\
& d$-$hour & decision hour & H & 6 & \\
& f$-$des & final decision & A & 50 & \\
& cause & cause of decision & A & 50 & \\
& level & level of infraction & N & 2 & \\
& details & details of decision & A & 50 & \\
%&st_name and st_fname & student name and fname &20 &A &\\
%& mb_name and mbfname & member name and & 20 &A \\
\midrule
Convocation
& c$-$code & convocation code & N & 10 & Auto increment \\
& m$-$code & code of member & N & 10 & Auto increment \\
& c$-$date & convocation date & D & 8 & dd/mm/yyyy \\
& c$-$hour & convocation hour & H & 6 & \\
& c$-$reason & convocation reason & A & 50 & \\
% & cause & cause of desicion & A & 50 & \\
% & st_name and st_fname & student name and fname & 20 & A & \\
% & mb_name and mbfname & member name and & 20 & A & \\
\midrule
Teacher & st$-$code & student code & N & 10 & Auto increment \\
& t$-$name & teacher name & 20 & A & \\
& t$-$fname & teacher family name & 20 & A & \\
& email & email of member & AN & 20 & \\
& m$-$type & member type & A & 20 & \\
\midrule
Student & st$-$code & student code & N & 10 & Auto increment \\
&st$-$name & student name & 20 & A & \\
&st$-$fname & student family name & 20 & A & \\
& email & email of member & AN & 20 & \\
& m$-$type & member type & A & 20 & \\
\midrule
Department chief
& dch$-$code & department chief code & N & 10 & \\
& dch$-$name & department chief name & 20 & A & \\
& dch$-$fname& department chief family name & 20 & A & \\
& email & email of department chief & AN & 20 & \\
& m$-$type & member type & A & 20 & \\
\midrule
Dec$ - $Mem
& d$-$code & decision code & N & 10 & Auto increment \\
& & & & &\\
& m$-$code & member code & N & 10 & Auto increment \\
& & & & &\\
\midrule
Rep$-$Mem
&r$-$code & report code & N & 10 & Auto increment \\
& & & & &\\
& m$-$code & member code & N & 10 & Auto increment \\
& & & & &\\
\end{longtable}
\end{document}
如您所见,table 经过重新设计:没有垂直规则,水平使用来自booktabs
包的规则,multirow
第一个表列中没有单元格...