내 작업에는 긴 테이블이 많이 있는데 첫 번째 열의 첫 번째 행만 들여쓰기되어 있다는 것을 알았습니다. 나머지 행에서는 발생하지 않습니다. 더 작은 다른 유형의 테이블(예: 테이블 형식)에서는 문제가 발생하지 않는 것을 확인했습니다.
문제를 해결하는 방법을 검색하다가 이 게시물을 찾았지만 솔루션이 작동하지 않았습니다. Longtable의 왼쪽 정렬 - 원치 않는 최소 들여쓰기
오류를 파란색으로 그렸습니다. 나는 첫 번째 행이 두 번째 행과 정확히 동일하길 원합니다.
고치는 방법 아시는 분 계신가요?
미리 감사드립니다.
\documentclass[a4paper]{article}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{lipsum}
\usepackage{booktabs,threeparttablex}
\usepackage{etoolbox}
\appto\TPTnoteSettings{\footnotesize}
\usepackage{caption}
\usepackage[labelfont=bf,labelsep=period]{caption}
\usepackage{array}
\usepackage[lmargin=2.5cm, rmargin=2.5cm, top=2cm, bottom=2cm]{geometry}
\begin{document}
\lipsum[2-6]
\begin{ThreePartTable}
\renewcommand\TPTminimum{\textwidth}
\setlength\LTleft{0pt}
\begin{TableNotes}[flushleft]
\footnotesize
\item[*] Footnote1
\end{TableNotes}
\begin{longtable}{| m{1.7cm} | m{2.1cm}| m{1.4cm}| m{2cm}| m{4.4cm}| m{1.7cm}|}
\caption{\textit{\textbf{It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout}}} \\
\hline
\textbf{Foo} & \textbf{Foo} & \textbf{Foo} & \textbf{Foo} & \textbf{Foo (Foo)} & \textbf{Foo\tnote{*}} \\
\hline
\endfirsthead
\multicolumn{6}{l}{\tablename\ \thetable:
\textit{It is a long established fact that a reader }(Cont\ldots)}\\
\hline
\textbf{Foo} & \textbf{Foo} & \textbf{Foo} & \textbf{Foo} & \textbf{Foo (Foo} & \textbf{Foo} \\
\hline
\endhead
\multicolumn{6}{l}{}\\
\endfoot
\noalign {\rule [-1.4ex]{6.7cm}{0.4pt}}
\insertTableNotes
\endlastfoot
\label{tab:CasosDosVarHom}
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\end{longtable}
\end{ThreePartTable}
\end{document}
답변1
문제는 입니다 \label{tab:CasosDosVarHom}
. (입력 줄 끝) %
의 인수 뒤에 a를 추가해야 합니다 . \label
그렇지 않으면 흩어진 공간이 생성됩니다.
보다줄 끝에 백분율 기호(%)를 사용하는 방법은 무엇입니까? (내 매크로가 추가 공간을 생성하는 이유는 무엇입니까?)
\documentclass[a4paper]{article}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{lipsum}
\usepackage{booktabs,threeparttablex}
\usepackage{etoolbox}
\appto\TPTnoteSettings{\footnotesize}
\usepackage{caption}
\usepackage[labelfont=bf,labelsep=period]{caption}
\usepackage{array}
\usepackage[lmargin=2.5cm, rmargin=2.5cm, top=2cm, bottom=2cm]{geometry}
\begin{document}
\lipsum[2-6]
\begin{ThreePartTable}
\renewcommand\TPTminimum{\textwidth}
\setlength\LTleft{0pt}
\begin{TableNotes}[flushleft]
\footnotesize
\item[*] Footnote1
\end{TableNotes}
\begin{longtable}{| m{1.7cm} | m{2.1cm}| m{1.4cm}| m{2cm}| m{4.4cm}| m{1.7cm}|}
\caption{\textit{\textbf{It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout}}} \\
\hline
\textbf{Foo} & \textbf{Foo} & \textbf{Foo} & \textbf{Foo} & \textbf{Foo (Foo)} & \textbf{Foo\tnote{*}} \\
\hline
\endfirsthead
\multicolumn{6}{l}{\tablename\ \thetable:
\textit{It is a long established fact that a reader }(Cont\ldots)}\\
\hline
\textbf{Foo} & \textbf{Foo} & \textbf{Foo} & \textbf{Foo} & \textbf{Foo (Foo} & \textbf{Foo} \\
\hline
\endhead
\multicolumn{6}{l}{}\\
\endfoot
\noalign {\rule [-1.4ex]{6.7cm}{0.4pt}}
\insertTableNotes
\endlastfoot
\label{tab:CasosDosVarHom}% <--ADD PERCENT HERE!!
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\
& Foo & 1 & Foo & Fooooo (0.001) & F \\
& Foo & 6 & Foo & Foooo (0.001) & F \\
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\end{longtable}
\end{ThreePartTable}
\end{document}
답변2
나는 당신의 테이블 서문을 재구성 할 것입니다. \label
캡션 직후에 잔디를 깎으면 문제가 해결됩니다.
\documentclass[a4paper]{article}
\usepackage[hmargin=2.5cm, vmargin=2cm]{geometry}
\usepackage{array, booktabs,
longtable, multirow,
threeparttablex}
\usepackage{etoolbox}
\appto\TPTnoteSettings{\footnotesize}
\usepackage{caption}
\usepackage[labelfont=bf,labelsep=period,
textfont={it,bf}]{caption}
\usepackage{lipsum}
\begin{document}
\lipsum[2-6]
\begin{ThreePartTable}
\renewcommand\TPTminimum{\textwidth}
\setlength\LTleft{0pt}
\begin{TableNotes}[flushleft]
\footnotesize
\item[*] Footnote1
\end{TableNotes}
\begin{longtable}{| m{1.7cm} | m{2.1cm}| m{1.4cm}| m{2cm}| m{4.4cm}| m{1.7cm}|}
\caption{It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout}
\label{tab:CasosDosVarHom} \\ % <---
\hline
\textbf{Foo} & \textbf{Foo} & \textbf{Foo}
& \textbf{Foo} & \textbf{Foo (Foo)} & \textbf{Foo\tnote{*}} \\
\hline
\endfirsthead
\caption[]{It is a long established fact that a reader \dots (Cont.)} \\
\hline
\textbf{Foo} & \textbf{Foo} & \textbf{Foo}
& \textbf{Foo} & \textbf{Foo (Foo)} & \textbf{Foo} \\
\hline
\endhead
\hline
\multicolumn{6}{r}{\footnotesize\textit{Continue on the next page}} \\
\endfoot
\hline
\insertTableNotes
\endlastfoot
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\*
& Foo & 1 & Foo & Fooooo (0.001) & F \\*
& Foo & 6 & Foo & Foooo (0.001) & F \\*
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\*
& Foo & 1 & Foo & Fooooo (0.001) & F \\*
& Foo & 6 & Foo & Foooo (0.001) & F \\*
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\*
& Foo & 1 & Foo & Fooooo (0.001) & F \\*
& Foo & 6 & Foo & Foooo (0.001) & F \\*
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\*
& Foo & 1 & Foo & Fooooo (0.001) & F \\*
& Foo & 6 & Foo & Foooo (0.001) & F \\*
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\*
& Foo & 1 & Foo & Fooooo (0.001) & F \\*
& Foo & 6 & Foo & Foooo (0.001) & F \\*
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\*
& Foo & 1 & Foo & Fooooo (0.001) & F \\*
& Foo & 6 & Foo & Foooo (0.001) & F \\*
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\multirow{4}{*}{10-343} & Foo & 2 & Foo & Foooo (0.001) & F \\*
& Foo & 1 & Foo & Fooooo (0.001) & F \\*
& Foo & 6 & Foo & Foooo (0.001) & F \\*
& Foo & 4 & Foo & Foooo (0.001) & F \\
\hline
\end{longtable}
\end{ThreePartTable}
\end{document}
코드의 다른 작은 변경 사항으로 인해 테이블의 일관성이 향상됩니다(테이블의 각 부분 끝에 줄 추가, 테이블이 다음 페이지에 계속된다는 정보, multirow
셀 시작에서만 테이블 나누기 활성화).