
\hline
아래 빨간색 선과 같이 테이블 헤드가 표시되지 않으며 첫 번째 페이지에 표시되지 않습니다.
소스 코드는 다음과 같습니다.
\documentclass[twoside,12pt]{article}
\usepackage{longtable}
\begin{document}
\begin{longtable}{|c|c|r|r|r|r|r|r|r|l|}
\caption{The throughput improvements achieved by network coding in Toulouse}
\label{table:throughput improvement 2}
\endfirsthead
\hline
line1 & line2 & $t_1$ & $t_{12}$ & $t_2$ & $r$(\%)& $D$(GB)& $D_{nc}(GB)$&$G_t$(\%)&Station\\ % table head
\hline
\endhead % all the lines above this will be repeated on every page
\hline
\endfoot % to appear at the bottom of each page
10 & 2 & 0:22:00 & 9:46:00 & 2:00:00 & 80.49 & 159.18 & 302.25 & 89.88 & Cours Dillon \\
10 & 109 & 1:19:00 & 8:55:00 & 1:40:00 & 74.93 & 188.48 & 319.09 & 69.3 & Malepère \\
% more data is here
\end{longtable}
\end{document}
을 제거하면 \endfirsthead
다음 오류가 발생했습니다.
답변1
head
다음 항목에도 의 내용을 추가해야 합니다 firsthead
.
\documentclass[twoside,12pt]{article}
\usepackage{longtable}
\begin{document}
\begin{longtable}{|c|c|r|r|r|r|r|r|r|l|}
\caption{The throughput improvements achieved by network coding in Toulouse}
\label{table:throughput improvement 2}\\ %<-- added
\hline%<-- added
line1 & line2 & $t_1$ & $t_{12}$ & $t_2$ & $r$(\%) & $D$(GB) & $D_{nc}(GB)$ & $G_t$(\%) & Station\\ %<-- added
\hline%<-- added
\endfirsthead
\hline
line1 & line2 & $t_1$ & $t_{12}$ & $t_2$ & $r$(\%)& $D$(GB)& $D_{nc}(GB)$&$G_t$(\%)&Station\\ % table head
\hline
\endhead % all the lines above this will be repeated on every page
\hline
\endfoot % to appear at the bottom of each page
10 & 2 & 0:22:00 & 9:46:00 & 2:00:00 & 80.49 & 159.18 & 302.25 & 89.88 & Cours Dillon \\
10 & 109 & 1:19:00 & 8:55:00 & 1:40:00 & 74.93 & 188.48 & 319.09 & 69.3 & Malepère \\
% more data is here
\end{longtable}
\end{document}
메모:코드는 그대로 새 페이지에서 캡션을 반복하지 않습니다.
답변2
\\\hline
전에 넣어 \endfirsthead
:
\documentclass[twoside,12pt]{article}
\usepackage{longtable}
\begin{document}
\begin{longtable}{|c|c|r|r|r|r|r|r|r|l|}
\caption{The throughput improvements achieved by network coding in Toulouse}
\label{table:throughput improvement 2}
\\\hline
\endfirsthead
\hline
line1 & line2 & $t_1$ & $t_{12}$ & $t_2$ & $r$(\%)& $D$(GB)& $D_{nc}(GB)$&$G_t$(\%)&Station\\ % table head
\hline
\endhead % all the lines above this will be repeated on every page
\hline
\endfoot % to appear at the bottom of each page
10 & 2 & 0:22:00 & 9:46:00 & 2:00:00 & 80.49 & 159.18 & 302.25 & 89.88 & Cours Dillon \\
10 & 109 & 1:19:00 & 8:55:00 & 1:40:00 & 74.93 & 188.48 & 319.09 & 69.3 & Malepère \\
% more data is here
\end{longtable}
\end{document}