在表格的每一页上获取相同的脚注

在表格的每一页上获取相同的脚注

想要在多页表的每一页上放置相同的脚注。下面是一些提供示例的代码。如何让出现在第 2 页底部的脚注也出现在第 1 页的底部?这样做的目的是避免让读者在阅读第 1 页时转到表格底部来获取此信息。

\documentclass[11pt]{article}

%%%% Margins %%%%

\setlength{\textwidth}{6.25in}
\setlength{\oddsidemargin}{0in}

%%%% Packages %%%%

\usepackage[font={bf}, justification=centerfirst]{caption}
\usepackage{longtable}
\usepackage{array}
\usepackage{lscape}
\usepackage{threeparttablex}
\usepackage{booktabs}
\usepackage[english]{babel}
\usepackage[pdfview=Fit]{hyperref}

%%%% Table Captions %%%%

\DeclareCaptionLabelSeparator{period-newline}{. }
\captionsetup{singlelinecheck=false,labelsep=period-newline,aboveskip=3pt}

\begin{document}

%%%% Demographic Characteristics Table %%%%

\scriptsize
\begin{landscape}

\begin{longtable}{l  *{5}{>{\centering}m{0.7in}} m{2in}}
 \caption{Demographic Characteristics by Treatment Arm}  \\ \hline \addlinespace[3pt]
 \multicolumn{1}{l}{} &  \multicolumn{4}{c}{Treatment Arm} &  &  \\ \cmidrule(lr){2-5}
  Variable/Statistic & Arm A & Arm B & Arm C & Arm D & Total & Test \\
   & (n = xx) & (n = xx) & (n = xx) & (n = xx) & (n = xx) &  \\
  \hline \addlinespace[12pt]
\endfirsthead
  \caption{Demographic Characteristics by Treatment Arm (Continued)}  \\ \hline\addlinespace[3pt]
  \multicolumn{1}{l}{} &  \multicolumn{4}{c}{Treatment Arm} &  &  \\ \cmidrule(lr){2-5}
  Variable/Statistic & Arm A & Arm B & Arm C & Arm D & Total & Test \\
   & (n = xx) & (n = xx) & (n = xx) & (n = xx) & (n = xx) &  \\
  \hline \addlinespace[12pt]
\endhead
  \addlinespace[3pt] \hline \multicolumn{7}{r}{\emph{Continued on next page}} \\ \hline
\endfoot
  \hline
\endlastfoot

Gender &  &  &  &  &  & $\chi^2$(x, xx) = x.xxxx, p = x.xxxx \\
  ~~~Male &  xx ( xx.xx\%) &  xx ( xx.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\
  ~~~Female &  xx ( xx.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\
  ~~~Total &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  \\
\addlinespace[12pt]
Race &  &  &  &  &  & Fisher's Exact, p = x.xxxx \\
  ~~~White &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\
  ~~~Black or African American &   x (  x.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &  \\
  ~~~Hispanic or Latino &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &  \\
  ~~~Other &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &  \\
  ~~~Total &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  \\
    \addlinespace[12pt]
Caucasian &  &  &  &  &  & Fisher's Exact, p = x.xxx \\
  ~~~Yes &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\
  ~~~No &   x (  x.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  \\
  ~~~Total &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  \\
    \addlinespace[12pt]
Age &  &  &  &  &  & F (x, xx) = x.xxxx, p = x.xxxx \\
  ~~~N & xx & xx & xx & xx & xx &  \\
  ~~~Mean & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
  ~~~Median & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
  ~~~Standard Deviation & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
  ~~~Minimum & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
  ~~~Maximum & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
    \addlinespace[12pt]
BMI &  &  &  &  &  & Kruskal-Wallis = x.xxxx, p = x.xxxx \\
  ~~~N & xx & xx & xx & xx & xx &  \\
  ~~~Mean & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
  ~~~Median & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
  ~~~Standard Deviation & x.xx & x.xx & x.xx & x.xx & x.xx &  \\
  ~~~Minimum & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
  ~~~Maximum & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
    \pagebreak
Region &  &  &  &  &  & Fisher's Exact, p = x.xxxx \\
  ~~~Northeast &   x ( xx.xx\%) &   x ( xx.xx\%) &   x (  x.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  \\
  ~~~Midwest &  xx ( xx.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &   x (  x.xx\%) &  xx ( xx.xx\%) &  \\
  ~~~South &  xx ( xx.xx\%) &  xx ( xx.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\
  ~~~West &   x ( xx.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x ( xx.xx\%) &   x (  x.xx\%) &  \\
  ~~~Total &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  \\

\end{longtable}

\begin{tablenotes}
\raggedright
\begin{hyphenrules}{nohyphenation}
\vspace{-6pt}
\item[]
Arm A: Miracle drug \\
Arm B: Wonder drug  \\
Arm C: Eye of newt  \\
Arm D: Standard of care
\end{hyphenrules}
\end{tablenotes}

\end{landscape}
\normalsize

\end{document}

答案1

您是指使用threepartablex您已经加载的包之类的东西吗?

在长表中重复脚注

\documentclass[11pt]{article}

%%%% Margins %%%%

\setlength{\textwidth}{6.25in}
\setlength{\oddsidemargin}{0in}

%%%% Packages %%%%

\usepackage[font={bf}, justification=centerfirst]{caption}
\usepackage{longtable}
\usepackage{array}
\usepackage{lscape}
\usepackage{threeparttablex}
\usepackage{booktabs}
\usepackage[english]{babel}
\usepackage[pdfview=Fit]{hyperref}

%%%% Table Captions %%%%

\DeclareCaptionLabelSeparator{period-newline}{. }
\captionsetup{singlelinecheck=false,labelsep=period-newline,aboveskip=3pt}

\begin{document}

%%%% Demographic Characteristics Table %%%%

\scriptsize
\begin{landscape}

\begin{ThreePartTable}
  \begin{TableNotes}
    \raggedright
    \begin{hyphenrules}{nohyphenation}
    \item[]
    Arm A: Miracle drug \\
    Arm B: Wonder drug  \\
    Arm C: Eye of newt  \\
    Arm D: Standard of care
    \end{hyphenrules}
  \end{TableNotes}
  \begin{longtable}{l  *{5}{>{\centering}m{0.7in}} m{2in}}
   \caption{Demographic Characteristics by Treatment Arm}  \\\midrule\addlinespace[3pt]
   \multicolumn{1}{l}{} &  \multicolumn{4}{c}{Treatment Arm} &  &  \\\cmidrule(lr){2-5}
    Variable/Statistic & Arm A & Arm B & Arm C & Arm D & Total & Test \\
     & (n = xx) & (n = xx) & (n = xx) & (n = xx) & (n = xx) &  \\
    \hline \addlinespace[12pt]
  \endfirsthead
    \caption{Demographic Characteristics by Treatment Arm (Continued)}  \\\midrule\addlinespace[3pt]
    \multicolumn{1}{l}{} &  \multicolumn{4}{c}{Treatment Arm} &  &  \\\cmidrule(lr){2-5}
    Variable/Statistic & Arm A & Arm B & Arm C & Arm D & Total & Test \\
     & (n = xx) & (n = xx) & (n = xx) & (n = xx) & (n = xx) &  \\
    \hline \addlinespace[12pt]
  \endhead
    \addlinespace[3pt]\midrule
    \multicolumn{7}{r}{\emph{Continued on next page}}\\
    \midrule
    \insertTableNotes
  \endfoot
    \bottomrule\insertTableNotes
  \endlastfoot

  Gender &  &  &  &  &  & $\chi^2$(x, xx) = x.xxxx, p = x.xxxx \\
    ~~~Male &  xx ( xx.xx\%) &  xx ( xx.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\
    ~~~Female &  xx ( xx.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\
    ~~~Total &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  \\
  \addlinespace[12pt]
  Race &  &  &  &  &  & Fisher's Exact, p = x.xxxx \\
    ~~~White &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\
    ~~~Black or African American &   x (  x.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &  \\
    ~~~Hispanic or Latino &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &  \\
    ~~~Other &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &  \\
    ~~~Total &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  \\
      \addlinespace[12pt]
  Caucasian &  &  &  &  &  & Fisher's Exact, p = x.xxx \\
    ~~~Yes &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\
    ~~~No &   x (  x.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  \\
    ~~~Total &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  \\
      \addlinespace[12pt]
  Age &  &  &  &  &  & F (x, xx) = x.xxxx, p = x.xxxx \\
    ~~~N & xx & xx & xx & xx & xx &  \\
    ~~~Mean & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
    ~~~Median & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
    ~~~Standard Deviation & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
    ~~~Minimum & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
    ~~~Maximum & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
      \addlinespace[12pt]
  BMI &  &  &  &  &  & Kruskal-Wallis = x.xxxx, p = x.xxxx \\
    ~~~N & xx & xx & xx & xx & xx &  \\
    ~~~Mean & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
    ~~~Median & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
    ~~~Standard Deviation & x.xx & x.xx & x.xx & x.xx & x.xx &  \\
    ~~~Minimum & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
    ~~~Maximum & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\
      \pagebreak
  Region &  &  &  &  &  & Fisher's Exact, p = x.xxxx \\
    ~~~Northeast &   x ( xx.xx\%) &   x ( xx.xx\%) &   x (  x.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  \\
    ~~~Midwest &  xx ( xx.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &   x (  x.xx\%) &  xx ( xx.xx\%) &  \\
    ~~~South &  xx ( xx.xx\%) &  xx ( xx.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\
    ~~~West &   x ( xx.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x ( xx.xx\%) &   x (  x.xx\%) &  \\
    ~~~Total &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  \\

  \end{longtable}
\end{ThreePartTable}


\end{landscape}
\normalsize

\end{document}

相关内容