기사를 제출하고 싶은 문제가 있지만 저널에서 제공하는 여러 제한 사항(예: 왼쪽에 큰 오프셋)이 있는 템플릿을 사용해야 합니다. 이제 여러 페이지에 걸쳐 있는 테이블을 갖고 싶지만(그래서 테이블 환경을 사용할 수 없음) 올바른 방식으로 조정할 수 없습니다. 캡션과 표 메모는 오프셋 없이 왼쪽에서 시작해야 합니다. 테이블 자체는 중앙에 위치해야 합니다. 현재 테이블 메모도 테이블과 공통 환경 내에 있지 않습니다. 누군가 해결책이 있기를 바랍니다!
표 1은 어떻게 생겼는지 보여줍니다. 표 2는 현재의 모습을 보여줍니다.
내 예제 코드는 다음과 같습니다.
\documentclass[10pt,letterpaper]{article}
\usepackage[top=0.85in,left=2.75in,footskip=0.75in]{geometry}
\usepackage{changepage}
% Text layout
\raggedright
\setlength{\parindent}{0.5cm}
\textwidth 5.25in
\textheight 8.75in
% Captions will be left justified
\usepackage[aboveskip=1pt,labelfont=bf,labelsep=period,justification=raggedright,singlelinecheck=off]{caption}
% Header and Footer
\usepackage{fancyhdr}
\pagestyle{myheadings}
\pagestyle{fancy}
\fancyhf{}
\setlength{\headheight}{27.023pt}
\rfoot{\thepage/\pageref{LastPage}}
\renewcommand{\footrule}{\hrule height 2pt \vspace{2mm}}
\fancyheadoffset[L]{2.25in}
\fancyfootoffset[L]{2.25in}
% ltablex package
\usepackage{ltablex}
\begin{document}
This is just a dummy text to show the general text layout.
This is just a dummy text to show the general text layout.
This is just a dummy text to show the general text layout.
This is just a dummy text to show the general text layout. \\
\begin{table}[!ht]
\begin{adjustwidth}{-2.25in}{0in}
\centering
\caption{
{\bf Table caption... This is how it should look like.}}
\begin{tabular}{|l|l|l|l|l|l|l|l|}
\hline
\multicolumn{4}{|l|}{\bf Heading 1} & \multicolumn{4}{|l|}{\bf Heading 2}\\
\hline
$cell1 row1$ & cell2 row 1 & cell3 row 1 & cell4 row 1 & cell5 row 1 & cell6 row 1 & cell7 row 1 & cell8 row 1\\ \hline
$cell1 row2$ & cell2 row 2 & cell3 row 2 & cell4 row 2 & cell5 row 2 & cell6 row 2 & cell7 row 2 & cell8 row 2\\ \hline
$cell1 row3$ & cell2 row 3 & cell3 row 3 & cell4 row 3 & cell5 row 3 & cell6 row 3 & cell7 row 3 & cell8 row 3\\ \hline
\end{tabular}
\begin{flushleft} Table notes...
\end{flushleft}
\label{table1}
\end{adjustwidth}
\end{table}
\begin{longtable}{|l|l|l|l|l|l|l|}%{@{\extracolsep{\fill}}|l+l|l|l|l|l|l|@{}}
\caption{
\bf{Table caption... This is how it looks like.}} \\
\hline
& \multicolumn{3}{l}{Top Heading 1} \vline & \multicolumn{3}{l}{Top Heading 2} \vline \\
Heading 1 & Heading 2 & Heading 3 & Heading 4 & Heading 5 & Heading 6 & Heading 7 \\
\hline
\endfirsthead
\multicolumn{7}{l}
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
\hline
& \multicolumn{3}{l}{Top Heading 1} \vline & \multicolumn{3}{l}{Top Heading 2} \vline \\
Heading 1 & Heading 2 & Heading 3 & Heading 4 & Heading 5 & Heading 6 & Heading 7 \\
\hline
\endhead
\hline \multicolumn{7}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \\
Text & 1 & 2 & 3 & 4 & 5 & 6 \label{table2}
\end{longtable}
Table notes...
\end{document}
미리 감사드립니다!
답변1
답변2
편집하다:longtable
아래 의견에서 질문을 명확히 한 후에는 오른쪽 여백으로 튀어나오지 않는 넓은 부분을 원한다는 것이 이제 분명해졌습니다 . 이에 대한 한 가지 솔루션이 제공됩니다.울리케아래 답변을 참조하여 여기에 다음과 같은 몇 가지 변경 사항을 추가합니다(긴 테이블은 환경의 테이블과 너비가 동일합니다 adjustwidth
).
mwe의 다음 변경 사항이 허용되는지 확인하십시오.
\documentclass{article}
\usepackage[letterpaper,
top=0.85in,left=2.75in,footskip=0.75in]{geometry}
\usepackage{changepage}
% Text layout
\raggedright
\setlength{\parindent}{0.5cm}
%\textwidth 5.25in
%\textheight 8.75in
% Captions will be left justified
\usepackage[aboveskip=1pt,labelfont=bf,labelsep=period,
justification=raggedright,singlelinecheck=off]{caption}
% Header and Footer
\usepackage{fancyhdr}
\pagestyle{myheadings}
\pagestyle{fancy}
\fancyhf{}
\setlength{\headheight}{27.023pt}
\rfoot{\thepage/\pageref{LastPage}}
\renewcommand{\footrule}{\hrule height 2pt \vspace{2mm}}
\fancyheadoffset[L]{2.25in}
\fancyfootoffset[L]{2.25in}
% ltablex package
\usepackage{makecell, % for two line column headers, macro \thead{...\\...}
ltablex}
\renewcommand\theadfont{\normalsize}
\renewcommand\theadgape{}
\begin{document}
This is just a dummy text to show the general text layout.
This is just a dummy text to show the general text layout.
This is just a dummy text to show the general text layout.
This is just a dummy text to show the general text layout. \\
\begin{table}[!ht]
\begin{adjustwidth}{-2.25in}{0in}
\centering
\caption{Table caption... This is how it should look like.}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
|l|l|l|l|l|l|l|l|}
\hline
\multicolumn{4}{|l|}{\textbf{Heading 1}} & \multicolumn{4}{l|}{\textbf{Heading 2}}\\
\hline
$cell1 row1$ & cell2 row 1 & cell3 row 1 & cell4 row 1 & cell5 row 1 & cell6 row 1 & cell7 row 1 & cell8 row 1\\ \hline
$cell1 row2$ & cell2 row 2 & cell3 row 2 & cell4 row 2 & cell5 row 2 & cell6 row 2 & cell7 row 2 & cell8 row 2\\ \hline
$cell1 row3$ & cell2 row 3 & cell3 row 3 & cell4 row 3 & cell5 row 3 & cell6 row 3 & cell7 row 3 & cell8 row 3\\ \hline
\end{tabular*}
\raggedright
Table notes...
\label{table1}
\end{adjustwidth}
\end{table}
{\setlength{\LTleft}{-2.25in}
\setlength{\LTright}{0in}
\setlength{\LTcapwidth}{\dimexpr\linewidth+4.5in\relax}
\begin{longtable}{@{\extracolsep{\fill}}
|l|l|l|l|l|l|l|}
\caption{Table caption... This is how it looks like.}
\label{tab:my long table}\\
\hline
& \multicolumn{3}{l|}{Top Heading 1}
& \multicolumn{3}{l|}{Top Heading 2} \\
Heading 1 & Heading 2 & Heading 3 & Heading 4 & Heading 5 & Heading 6 & Heading 7 \\
\hline
\endfirsthead
\caption{ -- \textit{Continued from previous page}} \\
\hline
& \multicolumn{3}{l|}{Top Heading 1} & \multicolumn{3}{l|}{Top Heading 2} \\
Heading 1 & Heading 2 & Heading 3 & Heading 4 & Heading 5 & Heading 6 & Heading 7 \\
\hline
\endhead
\hline \multicolumn{7}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6
\end{longtable}
}
Table notes...
\end{document}
이는 다음을 제공합니다(첫 번째 페이지의 상단 부분):
(두 번째 페이지의 상단 부분):
- 표 메모와 관련하여
threparttable
(또는threparttablex
)이 표 메모 작성을 향상시킬 수 있는지 확인하세요. - 패키지의 사용 규칙을 사용하면 보다 전문적인 테이블 모양을 얻을 수
booktabs
있으며 수직 규칙은 생략할 수 있습니다.
위 mwe의 변경 사항은 다음과 같습니다.
...
\usepackage{booktabs,
ltablex}
\begin{document}
This is just a dummy text to show the general text layout.
This is just a dummy text to show the general text layout.
This is just a dummy text to show the general text layout.
This is just a dummy text to show the general text layout. \\
\begin{table}[!ht]
\begin{adjustwidth}{-2.25in}{0in}
\centering
\caption{Table caption... This is how it should look like.}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
lll lll ll}
\toprule
\multicolumn{4}{l}{\textbf{Heading 1}} & \multicolumn{4}{l}{\textbf{Heading 2}}\\
\midrule
$cell1 row1$ & cell2 row 1 & cell3 row 1 & cell4 row 1 & cell5 row 1 & cell6 row 1 & cell7 row 1 & cell8 row 1\\
$cell1 row2$ & cell2 row 2 & cell3 row 2 & cell4 row 2 & cell5 row 2 & cell6 row 2 & cell7 row 2 & cell8 row 2\\
$cell1 row3$ & cell2 row 3 & cell3 row 3 & cell4 row 3 & cell5 row 3 & cell6 row 3 & cell7 row 3 & cell8 row 3\\
\bottomrule
\end{tabular*}
\raggedright
Table notes...
\label{table1}
\end{adjustwidth}
\end{table}
{\setlength{\LTleft}{-2.25in}
\setlength{\LTright}{0in}
\setlength{\LTcapwidth}{\dimexpr\linewidth+4.5in\relax}
\begin{longtable}{@{\extracolsep{\fill}}
lll lll l
}
\caption{Table caption... This is how it looks like.}
\label{tab:my long table}\\
\hline
& \multicolumn{3}{l}{Top Heading 1}
& \multicolumn{3}{l}{Top Heading 2} \\
\cmidrule(lr){2-4}\cmidrule(lr){5-7}
Heading 1 & Heading 2 & Heading 3 & Heading 4 & Heading 5 & Heading 6 & Heading 7 \\
\toprule
\endfirsthead
\caption{ -- \textit{Continued from previous page}} \\
\midrule
& \multicolumn{3}{l}{Top Heading 1} & \multicolumn{3}{l|}{Top Heading 2} \\
\cmidrule(lr){1-4}\cmidrule(lr){5-7}
Heading 1 & Heading 2 & Heading 3 & Heading 4 & Heading 5 & Heading 6 & Heading 7 \\
\midrule
\endhead
\midrule[\heavyrulewidth]
\multicolumn{7}{r}{\textit{Continued on next page}} \\
\endfoot
\bottomrule
\endlastfoot
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
\addlinespace
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
Text & 1 & 2 & 3 & 4 & 5 & 6\\
\addlinespace
Text & 1 & 2 & 3 & 4 & 5 & 6\\
...