가로 모드가 아닌 테이블 페이지에서 번호 매기기 제거

가로 모드가 아닌 테이블 페이지에서 번호 매기기 제거

나는 세로로 유지되어야 하는 매우 긴 테이블을 가지고 있습니다. 표가 표시되는 페이지에서 번호 매기기를 제거하는 데 문제가 있습니다. 나는 \thispagestyle{empty}테이블 전체를 \begin{center}환경, \thispagestyle{empty}테이블 환경 및 \thispagestyle{empty}환경 에 넣어 보았지만 \begin{threeparttable}아무런 효과가 없었습니다. 테이블 형식 안에 배치하면 \thispagestyle{empty}실패합니다.

쉬운 수정 사항이 있나요?

내 코드는 다음과 같습니다.

\documentclass[12pt,letterpaper]{article}
\usepackage[margin=1in ]{geometry}
\usepackage{fancyhdr}
\usepackage[flushleft]{threeparttable}
\setlength{\headheight}{15.2pt}
\pagestyle{fancy}

\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}

\begin{document}

\begin{table}[htbp]
    \begin{threeparttable}
        \caption{ Drinking Water}
        \thispagestyle{empty} %Doesn't clear the page where the table ends up. 
         %Works in this simplified code because there is ONLY one page.
        {
        \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
        \begin{tabular}{l*{3}{c}}
        \hline\hline
                    &\multicolumn{3}{c}{}                       \\
                    & Non-EWB School         &  EWB School & Diff.         \\
        \hline
        Water Src. Dist. (min)$^{\dag}$     &       17.16         &       14.76     &    2.408\sym{*}   \\
                                        &     (14.27)         &     (12.55)     &     (0.966)         \\
        \hline                                                 
        Spring (protected)              &       0.407         &       0.395      &      0.0134         \\
                                        &     (0.492)         &     (0.489)       &    (0.0353)         \\
        [1em]                                                 
        Spring (unprotected)   &      0.0418         &      0.0385      &     0.00341         \\
                    &     (0.200)         &     (0.193)       &    (0.0141)         \\
        [1em]                                                 
        Rain        &       0.227         &       0.221        &     0.00721       \\
                    &     (0.420)         &     (0.415)        &    (0.0300)       \\
        [1em]                                                 
        Public Tap         &      0.0940         &       0.100       &    -0.00575         \\
                    &     (0.292)         &     (0.300)       &    (0.0213)         \\
        [1em]                                                 
        Household Pipe        &      0.0261         &      0.0538       &     -0.0276         \\
                    &     (0.160)         &     (0.226)       &    (0.0141)         \\
        [1em]                                                 
        Rivers/Streams       &       0.112         &      0.0923       &      0.0202         \\
                    &     (0.316)         &     (0.290)       &    (0.0218)         \\
        [1em]                                                 
        Well (protected)    &      0.0627         &      0.0564      &     0.00640         \\
                    &     (0.243)         &     (0.231)       &    (0.0170)         \\
        [1em]                                                 
        Well (unprotected)    &     0.00783         &      0.0154      &    -0.00751         \\
                    &    (0.0883)         &     (0.123)       &   (0.00771)         \\
        [1em]                                                 
        Borehole    &      0.0183         &     0.00769       &      0.0106         \\
                    &     (0.134)         &    (0.0875)       &   (0.00812)         \\
        [1em]                                                 
        EWB Borehole    &           0         &      0.0179      &     -0.0179\sym{**} \\
                    &         (0)         &     (0.133)       &   (0.00678)         \\
        [1em]                                                 
        Lake/Pond        &     0.00261         &     0.00256       &   0.0000534         \\
                    &    (0.0511)         &    (0.0506)       &   (0.00365)         \\
        \hline                                                 
        Treat Water$^{\dag\dag}$       &       0.619         &       0.597       &      0.0229         \\
                    &     (0.486)         &     (0.491)       &    (0.0351)         \\
        [1em]                                                 
        Treat Water in Household$^{\dag\dag\dag}$      &       0.431         &       0.408       &      0.0242         \\
                    &     (0.496)         &     (0.492)       &    (0.0355)         \\
        \hline                                                      
        \(N\)       &                     &                   &         774         \\                  
        \hline\hline   
        \end{tabular}                   
        }   
        \begin{tablenotes}
            \item sd/se in parentheses
            \item \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)
            \item$^{\dag}$Distance to water source for 2014 dry season only.
            \item$^{\dag\dag}$Indicates the household treats water at the source \emph{or} treats water at home. 
            \item$^{\dag\dag\dag}$Indicates the household treats water at home.
            \item Water sources are for the wet season.
        \end{tablenotes}
    \end{threeparttable}
\end{table}

\end{document}

답변1

라텍스는 실제로 이것을 지원하지 않습니다. 이로 인해 플로트 페이지의 발이 비어 있게 되므로 테이블 앞이나 뒤의 페이지가 아닌 테이블이 있는 페이지에만 영향을 미칩니다. 다시 설정하지 않는 한(즉, 표시된 줄 없이 원래 정의를 복원하지 않는 한) 다른 모든 부동 페이지에 영향을 미칩니다.

\documentclass[12pt,letterpaper]{article}
\usepackage[margin=1in ]{geometry}
\usepackage{fancyhdr}
\usepackage[flushleft]{threeparttable}
\setlength{\headheight}{15.2pt}
\pagestyle{fancy}

\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}

\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\makeatletter
\def \@startcolumn {%
  \global \@colroom \@colht
  \@tryfcolumn \@deferlist
  \if@fcolmade
\def\@thefoot{}%<<<<<<<<
  \else
    \begingroup
      \let \reserved@b \@deferlist
      \global \let \@deferlist \@empty
      \let \@elt \@scolelt
      \reserved@b
    \endgroup
  \fi
}




\makeatother
\begin{document}
\setcounter{page}{111111111}

some text some text some text some text some text 
some text some text some text some text some text 
some text some text some text some text some text 

\begin{table}[p]
    \begin{threeparttable}
        \caption{ Drinking Water}
         %Works in this simplified code because there is ONLY one page.
        {
        \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
        \begin{tabular}{l*{3}{c}}
        \hline\hline
                    &\multicolumn{3}{c}{}                       \\
                    & Non-EWB School         &  EWB School & Diff.         \\
        \hline
        Water Src. Dist. (min)$^{\dag}$     &       17.16         &       14.76     &    2.408\sym{*}   \\
                                        &     (14.27)         &     (12.55)     &     (0.966)         \\
        \hline                                                 
        Spring (protected)              &       0.407         &       0.395      &      0.0134         \\
                                        &     (0.492)         &     (0.489)       &    (0.0353)         \\
        [1em]                                                 
        Spring (unprotected)   &      0.0418         &      0.0385      &     0.00341         \\
                    &     (0.200)         &     (0.193)       &    (0.0141)         \\
        [1em]                                                 
        Rain        &       0.227         &       0.221        &     0.00721       \\
                    &     (0.420)         &     (0.415)        &    (0.0300)       \\
        [1em]                                                 
        Public Tap         &      0.0940         &       0.100       &    -0.00575         \\
                    &     (0.292)         &     (0.300)       &    (0.0213)         \\
        [1em]                                                 
        Household Pipe        &      0.0261         &      0.0538       &     -0.0276         \\
                    &     (0.160)         &     (0.226)       &    (0.0141)         \\
        [1em]                                                 
        Rivers/Streams       &       0.112         &      0.0923       &      0.0202         \\
                    &     (0.316)         &     (0.290)       &    (0.0218)         \\
        [1em]                                                 
        Well (protected)    &      0.0627         &      0.0564      &     0.00640         \\
                    &     (0.243)         &     (0.231)       &    (0.0170)         \\
        [1em]                                                 
        Well (unprotected)    &     0.00783         &      0.0154      &    -0.00751         \\
                    &    (0.0883)         &     (0.123)       &   (0.00771)         \\
        [1em]                                                 
        Borehole    &      0.0183         &     0.00769       &      0.0106         \\
                    &     (0.134)         &    (0.0875)       &   (0.00812)         \\
        [1em]                                                 
        EWB Borehole    &           0         &      0.0179      &     -0.0179\sym{**} \\
                    &         (0)         &     (0.133)       &   (0.00678)         \\
        [1em]                                                 
        Lake/Pond        &     0.00261         &     0.00256       &   0.0000534         \\
                    &    (0.0511)         &    (0.0506)       &   (0.00365)         \\
        \hline                                                 
        Treat Water$^{\dag\dag}$       &       0.619         &       0.597       &      0.0229         \\
                    &     (0.486)         &     (0.491)       &    (0.0351)         \\
        [1em]                                                 
        Treat Water in Household$^{\dag\dag\dag}$      &       0.431         &       0.408       &      0.0242         \\
                    &     (0.496)         &     (0.492)       &    (0.0355)         \\
        \hline                                                      
        \(N\)       &                     &                   &         774         \\                  
        \hline\hline   
        \end{tabular}                   
        }   
        \begin{tablenotes}
            \item sd/se in parentheses
            \item \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)
            \item$^{\dag}$Distance to water source for 2014 dry season only.
            \item$^{\dag\dag}$Indicates the household treats water at the source \emph{or} treats water at home. 
            \item$^{\dag\dag\dag}$Indicates the household treats water at home.
            \item Water sources are for the wet season.
        \end{tablenotes}
    \end{threeparttable}
\vspace{-50pt}
\end{table}

some text some text some text some text some text 
some text some text some text some text some text 

\clearpage

some text some text some text some text some text 

\end{document}

답변2

사용처 :\iffloatpagefancyhdr

\documentclass[12pt,letterpaper]{article}
\usepackage[margin=1in,headheight=15.2pt]{geometry}
\usepackage{fancyhdr}
\usepackage[flushleft]{threeparttable}
\pagestyle{fancy}
\fancyfoot[C]{\iffloatpage{}{\thepage}}

\usepackage{lipsum}

\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}

\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}

\begin{document}
\title{Title}
\author{Author}
\date{}
\maketitle

\lipsum[1-20]

\begin{table}[p]
\small
    \begin{threeparttable}
        \caption{ Drinking Water}
         %Works in this simplified code because there is ONLY one page.
        {
        \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
        \begin{tabular}{l*{3}{c}}
        \hline\hline
                    &\multicolumn{3}{c}{}                       \\
                    & Non-EWB School         &  EWB School & Diff.         \\
        \hline
        Water Src. Dist. (min)$^{\dag}$     &       17.16         &       14.76     &    2.408\sym{*}   \\
                                        &     (14.27)         &     (12.55)     &     (0.966)         \\
        \hline                                                 
        Spring (protected)              &       0.407         &       0.395      &      0.0134         \\
                                        &     (0.492)         &     (0.489)       &    (0.0353)         \\
        [1em]                                                 
        Spring (unprotected)   &      0.0418         &      0.0385      &     0.00341         \\
                    &     (0.200)         &     (0.193)       &    (0.0141)         \\
        [1em]                                                 
        Rain        &       0.227         &       0.221        &     0.00721       \\
                    &     (0.420)         &     (0.415)        &    (0.0300)       \\
        [1em]                                                 
        Public Tap         &      0.0940         &       0.100       &    -0.00575         \\
                    &     (0.292)         &     (0.300)       &    (0.0213)         \\
        [1em]                                                 
        Household Pipe        &      0.0261         &      0.0538       &     -0.0276         \\
                    &     (0.160)         &     (0.226)       &    (0.0141)         \\
        [1em]                                                 
        Rivers/Streams       &       0.112         &      0.0923       &      0.0202         \\
                    &     (0.316)         &     (0.290)       &    (0.0218)         \\
        [1em]                                                 
        Well (protected)    &      0.0627         &      0.0564      &     0.00640         \\
                    &     (0.243)         &     (0.231)       &    (0.0170)         \\
        [1em]                                                 
        Well (unprotected)    &     0.00783         &      0.0154      &    -0.00751         \\
                    &    (0.0883)         &     (0.123)       &   (0.00771)         \\
        [1em]                                                 
        Borehole    &      0.0183         &     0.00769       &      0.0106         \\
                    &     (0.134)         &    (0.0875)       &   (0.00812)         \\
        [1em]                                                 
        EWB Borehole    &           0         &      0.0179      &     -0.0179\sym{**} \\
                    &         (0)         &     (0.133)       &   (0.00678)         \\
        [1em]                                                 
        Lake/Pond        &     0.00261         &     0.00256       &   0.0000534         \\
                    &    (0.0511)         &    (0.0506)       &   (0.00365)         \\
        \hline                                                 
        Treat Water$^{\dag\dag}$       &       0.619         &       0.597       &      0.0229         \\
                    &     (0.486)         &     (0.491)       &    (0.0351)         \\
        [1em]                                                 
        Treat Water in Household$^{\dag\dag\dag}$      &       0.431         &       0.408       &      0.0242         \\
                    &     (0.496)         &     (0.492)       &    (0.0355)         \\
        \hline                                                      
        \(N\)       &                     &                   &         774         \\                  
        \hline\hline   
        \end{tabular}                   
        }   
        \begin{tablenotes}
            \item sd/se in parentheses
            \item \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)
            \item$^{\dag}$Distance to water source for 2014 dry season only.
            \item$^{\dag\dag}$Indicates the household treats water at the source \emph{or} treats water at home. 
            \item$^{\dag\dag\dag}$Indicates the household treats water at home.
            \item Water sources are for the wet season.
        \end{tablenotes}
    \end{threeparttable}
\end{table}

\lipsum[3-20]

\end{document}

이렇게 하면 부동 페이지의 페이지 번호가 표시되지 않습니다. 페이지 위의 규칙도 억제하려면 다음도 추가하세요.

\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}

를 선택한 후 \pagestyle{fancy}.

여기에 이미지 설명을 입력하세요

이렇게 하면 플로트의 모든 페이지에서 페이지 번호가 지워집니다. 연속된 플로트 페이지가 없기를 바라면서 플로트 페이지 다음 페이지에서 \fancyfoot[C]{\iffloatpage{}{\thepage}어디든 설정하고 되돌릴 수 있습니다 .\fancyfoot[C]{\thepage}

그러나 최선의 조치는 거대한 수레를 피하는 것입니다. 보시다시피, \small해당 플로트를 페이지 경계에 유지하는 데 충분합니다.

답변3

이것은 가장 우아한 솔루션은 아니지만 \pagenumbering{gobble}페이지 번호를 제거한 다음 \pagenumbering{arabic}(선호하는 스타일에 따라) 및 \setcounter{page}{2}. 특정 페이지를 참조하지 않고 카운터를 재설정하는 자동 방법이 있을 수 있습니다.

편집: 따라서 해당 테이블의 페이지 사이에서 수행한 페이지 지우기/끊기 작업도 중요합니다.

    \documentclass[12pt,letterpaper]{article}
\usepackage[margin=1in ]{geometry}
\usepackage{fancyhdr,lipsum}
\usepackage[flushleft]{threeparttable}
\setlength{\headheight}{15.2pt}
\pagestyle{fancy}

\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}

\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}

\begin{document}

\section*{First random title} \lipsum[1]
\pagebreak

\begin{table}[htbp]
    \begin{threeparttable}
        \caption{ Drinking Water}
        %\thispagestyle{empty} %Doesn't clear the page where the table ends up. 
         %Works in this simplified code because there is ONLY one page.
      \pagenumbering{gobble}  
        \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
        \begin{tabular}{l*{3}{c}}
        \hline\hline
                    &\multicolumn{3}{c}{}                       \\
                    & Non-EWB School         &  EWB School & Diff.         \\
        \hline
        Water Src. Dist. (min)$^{\dag}$     &       17.16         &       14.76     &    2.408\sym{*}   \\
                                        &     (14.27)         &     (12.55)     &     (0.966)         \\
        \hline                                                 
        Spring (protected)              &       0.407         &       0.395      &      0.0134         \\
                                        &     (0.492)         &     (0.489)       &    (0.0353)         \\
        [1em]                                                 
        Spring (unprotected)   &      0.0418         &      0.0385      &     0.00341         \\
                    &     (0.200)         &     (0.193)       &    (0.0141)         \\
        [1em]                                                 
        Rain        &       0.227         &       0.221        &     0.00721       \\
                    &     (0.420)         &     (0.415)        &    (0.0300)       \\
        [1em]                                                 
        Public Tap         &      0.0940         &       0.100       &    -0.00575         \\
                    &     (0.292)         &     (0.300)       &    (0.0213)         \\
        [1em]                                                 
        Household Pipe        &      0.0261         &      0.0538       &     -0.0276         \\
                    &     (0.160)         &     (0.226)       &    (0.0141)         \\
        [1em]                                                 
        Rivers/Streams       &       0.112         &      0.0923       &      0.0202         \\
                    &     (0.316)         &     (0.290)       &    (0.0218)         \\
        [1em]                                                 
        Well (protected)    &      0.0627         &      0.0564      &     0.00640         \\
                    &     (0.243)         &     (0.231)       &    (0.0170)         \\
        [1em]                                                 
        Well (unprotected)    &     0.00783         &      0.0154      &    -0.00751         \\
                    &    (0.0883)         &     (0.123)       &   (0.00771)         \\
        [1em]                                                 
        Borehole    &      0.0183         &     0.00769       &      0.0106         \\
                    &     (0.134)         &    (0.0875)       &   (0.00812)         \\
        [1em]                                                 
        EWB Borehole    &           0         &      0.0179      &     -0.0179\sym{**} \\
                    &         (0)         &     (0.133)       &   (0.00678)         \\
        [1em]                                                 
        Lake/Pond        &     0.00261         &     0.00256       &   0.0000534         \\
                    &    (0.0511)         &    (0.0506)       &   (0.00365)         \\
        \hline                                                 
        Treat Water$^{\dag\dag}$       &       0.619         &       0.597       &      0.0229         \\
                    &     (0.486)         &     (0.491)       &    (0.0351)         \\
        [1em]                                                 
        Treat Water in Household$^{\dag\dag\dag}$      &       0.431         &       0.408       &      0.0242         \\
                    &     (0.496)         &     (0.492)       &    (0.0355)         \\
        \hline                                                      
        \(N\)       &                     &                   &         774         \\                  
        \hline\hline   
        \end{tabular}                   
        \begin{tablenotes}
            \item sd/se in parentheses
            \item \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)
            \item$^{\dag}$Distance to water source for 2014 dry season only.
            \item$^{\dag\dag}$Indicates the household treats water at the source \emph{or} treats water at home. 
            \item$^{\dag\dag\dag}$Indicates the household treats water at home.
            \item Water sources are for the wet season.
        \end{tablenotes}
    \end{threeparttable}
\end{table}
\clearpage

\pagebreak
\pagenumbering{arabic}%
\setcounter{page}{2}
\section*{Second random title} \lipsum[2]


\end{document}

여기에 이미지 설명을 입력하세요

여기에 이미지 설명을 입력하세요

여기에 이미지 설명을 입력하세요

답변4

이것은 작동합니다:

    \documentclass[12pt,letterpaper]{article}
    \usepackage[margin=1in ]{geometry}
    \usepackage{fancyhdr}
    \usepackage[flushleft]{threeparttable}
    \setlength{\headheight}{15.2pt}
    \pagestyle{fancy}
    \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
    \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
    \begin{document}
  Text
\clearpage 
  \begingroup
     \thispagestyle{empty} 

Your table

   \endgroup
 \clearpage
Text
 \end{document}

관련 정보