![每章末尾的表格和图表](https://linux22.com/image/294912/%E6%AF%8F%E7%AB%A0%E6%9C%AB%E5%B0%BE%E7%9A%84%E8%A1%A8%E6%A0%BC%E5%92%8C%E5%9B%BE%E8%A1%A8.png)
目前,我的所有图表都放在了论文的末尾。为此,我使用了以下工具:
\usepackage[nomarkers]{endfloat}
\renewcommand{\efloatseparator}{\mbox{}}
\renewcommand{\efloatseparator}{\vfill}
我需要在每章末尾添加表格,并使用章节号对它们进行编号。即 1.1、2.1 等。
我的文档类别是:
\documentclass[12pt,oneside]{report}
你能告诉我如何做我需要做的事情吗?
梅威瑟:
\documentclass[12pt,oneside]{report}
\usepackage[utf8]{inputenc}
\usepackage[nomarkers]{endfloat}
\renewcommand{\efloatseparator}{\mbox{}}
\renewcommand{\efloatseparator}{\vfill}
\usepackage[]{threeparttable}
\title{Minimal Working Example}
\begin{document}
\maketitle
\chapter[Something 1]{Bla bla bla}
\section{Section 1}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam non turpis nec sapien gravida suscipit. Maecenas eget libero pretium, rhoncus ante id, suscipit eros. Maecenas at turpis condimentum, iaculis justo id, tempor urna. Integer vitae tincidunt magna, non rhoncus justo. Curabitur tincidunt massa in est fermentum, ac varius augue porta. Ut at leo eu dolor elementum scelerisque. Integer eu rhoncus nibh.
\begin{table}[!htbp] \centering
\caption{Treatment effect on Quiz 6 outcomes and choices}
\label{eg1}
\begin{threeparttable}
\begin{tabular}{rllll}
\hline
& Treatment & Control & 90\% Confidence Interval & p-value \\
\hline
maxGrade\tnote{a} & 0.8506 & 0.7809 & (0.0154, 0.124) & 0.0347 \\
firstGrade\tnote{b} & 0.5278 & 0.4966 & (-0.005, 0.0673) & 0.1561 \\
Attempts\tnote{c} & 0.2461 & 0.2241 & (0.0059, 0.0381) & 0.0247 \\
Took Q6\tnote{d} & 0.1002 & 0.093 & (0.001, 0.0135) & 0.058 \\
Procrastination\tnote{e} & 102.9237 & 105.0334 & (-6.8086, 2.5892) & 0.4601 \\
n & 12061 & 12061 & & \\
\hline
\end{tabular}
\begin{tablenotes}[flushleft]
\item \footnotesize{Sample: Students who stated their intention to complete all the work needed to obtain the certificate}
\item [a]\footnotesize{First attempt grade}
\item [b]\footnotesize{Best attempt grade}
\item [c]\footnotesize{Numbers of attempts}
\item [d]\footnotesize{Dummy equal to 1 if the student attempted the Quiz}
\item [e]\footnotesize{Number of hours between the quiz publication and student first attempt}
\end{tablenotes}
\end{threeparttable}
\end{table}
Nullam justo arcu, semper id rutrum sit amet, volutpat ac mauris. Praesent venenatis, nulla a tristique lobortis, erat quam molestie tortor, ac fringilla magna purus ac mi. Nunc ornare felis et enim hendrerit, eget suscipit nisl tempus. Curabitur pharetra nibh nisl, imperdiet convallis lectus rutrum elementum. Maecenas blandit ipsum sit amet nulla posuere aliquet. Sed hendrerit et elit vitae ornare. Praesent malesuada metus ac sem faucibus, sed cursus mi egestas. Sed ut massa nec nisi ullamcorper auctor.
\chapter[Something 2]{Bla bla bla}
\section{Section 1}
Sed adipiscing hendrerit ultricies. Etiam pretium ultrices aliquet. Nullam tortor purus, elementum non dictum non, condimentum ac nibh. Ut porta erat fringilla metus condimentum, in hendrerit sapien molestie. Aenean varius consequat arcu, eget aliquam justo. Morbi aliquam risus quis augue tempor vulputate. Ut ut dui cursus, ultricies est vitae, consequat ipsum. Vivamus rutrum vulputate varius.
\begin{table}[!htbp] \centering
\caption{Treatment effect on Quiz 6 outcomes and choices}
\label{eg2}
\begin{threeparttable}
\begin{tabular}{rllll}
\hline
& Treatment & Control & 90\% Confidence Interval & p-value \\
\hline
maxGrade\tnote{a} & 0.8506 & 0.7809 & (0.0154, 0.124) & 0.0347 \\
firstGrade\tnote{b} & 0.5278 & 0.4966 & (-0.005, 0.0673) & 0.1561 \\
Attempts\tnote{c} & 0.2461 & 0.2241 & (0.0059, 0.0381) & 0.0247 \\
Took Q6\tnote{d} & 0.1002 & 0.093 & (0.001, 0.0135) & 0.058 \\
Procrastination\tnote{e} & 102.9237 & 105.0334 & (-6.8086, 2.5892) & 0.4601 \\
n & 12061 & 12061 & & \\
\hline
\end{tabular}
\begin{tablenotes}[flushleft]
\item \footnotesize{Sample: Students who stated their intention to complete all the work needed to obtain the certificate}
\item [a]\footnotesize{First attempt grade}
\item [b]\footnotesize{Best attempt grade}
\item [c]\footnotesize{Numbers of attempts}
\item [d]\footnotesize{Dummy equal to 1 if the student attempted the Quiz}
\item [e]\footnotesize{Number of hours between the quiz publication and student first attempt}
\end{tablenotes}
\end{threeparttable}
\end{table}
Vivamus cursus tortor ut eros egestas imperdiet. Morbi sed diam ac nisl vestibulum volutpat. Etiam vestibulum neque ac justo suscipit, ac pretium metus eleifend. Duis sed sem lorem. Etiam pellentesque volutpat sapien, non pellentesque urna varius nec.
\end{document}
答案1
\processdelayedfloats
在每章末尾使用:
\documentclass[12pt,oneside]{report}
\usepackage[utf8]{inputenc}
\usepackage[nomarkers,nolists]{endfloat}
\renewcommand{\efloatseparator}{\mbox{}}
\renewcommand{\efloatseparator}{\vfill}
\usepackage[]{threeparttable}
\title{Minimal Working Example}
\begin{document}
\maketitle
\chapter[Something 1]{Bla bla bla}
\section{Section 1}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam non turpis nec sapien gravida suscipit. Maecenas eget libero pretium, rhoncus ante id, suscipit eros. Maecenas at turpis condimentum, iaculis justo id, tempor urna. Integer vitae tincidunt magna, non rhoncus justo. Curabitur tincidunt massa in est fermentum, ac varius augue porta. Ut at leo eu dolor elementum scelerisque. Integer eu rhoncus nibh.
\begin{table}[!htbp] \centering
\caption{Treatment effect on Quiz 6 outcomes and choices}
\label{eg1}
\begin{threeparttable}
\begin{tabular}{rllll}
\hline
& Treatment & Control & 90\% Confidence Interval & p-value \\
\hline
maxGrade\tnote{a} & 0.8506 & 0.7809 & (0.0154, 0.124) & 0.0347 \\
firstGrade\tnote{b} & 0.5278 & 0.4966 & (-0.005, 0.0673) & 0.1561 \\
Attempts\tnote{c} & 0.2461 & 0.2241 & (0.0059, 0.0381) & 0.0247 \\
Took Q6\tnote{d} & 0.1002 & 0.093 & (0.001, 0.0135) & 0.058 \\
Procrastination\tnote{e} & 102.9237 & 105.0334 & (-6.8086, 2.5892) & 0.4601 \\
n & 12061 & 12061 & & \\
\hline
\end{tabular}
\begin{tablenotes}[flushleft]
\item \footnotesize{Sample: Students who stated their intention to complete all the work needed to obtain the certificate}
\item [a]\footnotesize{First attempt grade}
\item [b]\footnotesize{Best attempt grade}
\item [c]\footnotesize{Numbers of attempts}
\item [d]\footnotesize{Dummy equal to 1 if the student attempted the Quiz}
\item [e]\footnotesize{Number of hours between the quiz publication and student first attempt}
\end{tablenotes}
\end{threeparttable}
\end{table}
Nullam justo arcu, semper id rutrum sit amet, volutpat ac mauris. Praesent venenatis, nulla a tristique lobortis, erat quam molestie tortor, ac fringilla magna purus ac mi. Nunc ornare felis et enim hendrerit, eget suscipit nisl tempus. Curabitur pharetra nibh nisl, imperdiet convallis lectus rutrum elementum. Maecenas blandit ipsum sit amet nulla posuere aliquet. Sed hendrerit et elit vitae ornare. Praesent malesuada metus ac sem faucibus, sed cursus mi egestas. Sed ut massa nec nisi ullamcorper auctor.
\processdelayedfloats
\chapter[Something 2]{Bla bla bla}
\section{Section 1}
Sed adipiscing hendrerit ultricies. Etiam pretium ultrices aliquet. Nullam tortor purus, elementum non dictum non, condimentum ac nibh. Ut porta erat fringilla metus condimentum, in hendrerit sapien molestie. Aenean varius consequat arcu, eget aliquam justo. Morbi aliquam risus quis augue tempor vulputate. Ut ut dui cursus, ultricies est vitae, consequat ipsum. Vivamus rutrum vulputate varius.
\begin{table}[!htbp] \centering
\caption{Treatment effect on Quiz 6 outcomes and choices}
\label{eg2}
\begin{threeparttable}
\begin{tabular}{rllll}
\hline
& Treatment & Control & 90\% Confidence Interval & p-value \\
\hline
maxGrade\tnote{a} & 0.8506 & 0.7809 & (0.0154, 0.124) & 0.0347 \\
firstGrade\tnote{b} & 0.5278 & 0.4966 & (-0.005, 0.0673) & 0.1561 \\
Attempts\tnote{c} & 0.2461 & 0.2241 & (0.0059, 0.0381) & 0.0247 \\
Took Q6\tnote{d} & 0.1002 & 0.093 & (0.001, 0.0135) & 0.058 \\
Procrastination\tnote{e} & 102.9237 & 105.0334 & (-6.8086, 2.5892) & 0.4601 \\
n & 12061 & 12061 & & \\
\hline
\end{tabular}
\begin{tablenotes}[flushleft]
\item \footnotesize{Sample: Students who stated their intention to complete all the work needed to obtain the certificate}
\item [a]\footnotesize{First attempt grade}
\item [b]\footnotesize{Best attempt grade}
\item [c]\footnotesize{Numbers of attempts}
\item [d]\footnotesize{Dummy equal to 1 if the student attempted the Quiz}
\item [e]\footnotesize{Number of hours between the quiz publication and student first attempt}
\end{tablenotes}
\end{threeparttable}
\end{table}
Vivamus cursus tortor ut eros egestas imperdiet. Morbi sed diam ac nisl vestibulum volutpat. Etiam vestibulum neque ac justo suscipit, ac pretium metus eleifend. Duis sed sem lorem. Etiam pellentesque volutpat sapien, non pellentesque urna varius nec.
\processdelayedfloats
\end{document}
更新:
但是,该enfloat
包在使用时不提供部分列表,\processdelayedfloats
但可以使用features
提供的titletoc
包。\startlist{lot}
在每个带有延迟表的后面使用\chapter
,然后\MakePartialLoT
在您希望部分 LoT 出现的位置使用(通常在之前\processdelayedfloats
)。我将命令定义为
\newcommand\MakePartialLot{%
\printlist{lot}{}{\chapter*{\listtablename\ for \chaptername~\thechapter}\par}
}
但您可以更改定义以满足您的需要。
完整示例:
\documentclass[12pt,oneside]{report}
\usepackage[utf8]{inputenc}
\usepackage[nomarkers,nolists]{endfloat}
\usepackage[]{threeparttable}
\usepackage{titletoc}
\renewcommand{\efloatseparator}{\mbox{}}
\renewcommand{\efloatseparator}{\vfill}
\newcommand\MakePartialLot{%
\printlist{lot}{}{\chapter*{\listtablename\ for \chaptername~\thechapter}\par}
}
\title{Minimal Working Example}
\begin{document}
\maketitle
\chapter[Something 1]{Bla bla bla}
\startlist{lot}
\section{Section 1}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam non turpis nec sapien gravida suscipit. Maecenas eget libero pretium, rhoncus ante id, suscipit eros. Maecenas at turpis condimentum, iaculis justo id, tempor urna. Integer vitae tincidunt magna, non rhoncus justo. Curabitur tincidunt massa in est fermentum, ac varius augue porta. Ut at leo eu dolor elementum scelerisque. Integer eu rhoncus nibh.
\begin{table}[!htbp] \centering
\caption{Treatment effect on Quiz 6 outcomes and choices}
\label{eg1}
\begin{threeparttable}
\begin{tabular}{rllll}
\hline
& Treatment & Control & 90\% Confidence Interval & p-value \\
\hline
maxGrade\tnote{a} & 0.8506 & 0.7809 & (0.0154, 0.124) & 0.0347 \\
firstGrade\tnote{b} & 0.5278 & 0.4966 & (-0.005, 0.0673) & 0.1561 \\
Attempts\tnote{c} & 0.2461 & 0.2241 & (0.0059, 0.0381) & 0.0247 \\
Took Q6\tnote{d} & 0.1002 & 0.093 & (0.001, 0.0135) & 0.058 \\
Procrastination\tnote{e} & 102.9237 & 105.0334 & (-6.8086, 2.5892) & 0.4601 \\
n & 12061 & 12061 & & \\
\hline
\end{tabular}
\begin{tablenotes}[flushleft]
\item \footnotesize{Sample: Students who stated their intention to complete all the work needed to obtain the certificate}
\item [a]\footnotesize{First attempt grade}
\item [b]\footnotesize{Best attempt grade}
\item [c]\footnotesize{Numbers of attempts}
\item [d]\footnotesize{Dummy equal to 1 if the student attempted the Quiz}
\item [e]\footnotesize{Number of hours between the quiz publication and student first attempt}
\end{tablenotes}
\end{threeparttable}
\end{table}
Nullam justo arcu, semper id rutrum sit amet, volutpat ac mauris. Praesent venenatis, nulla a tristique lobortis, erat quam molestie tortor, ac fringilla magna purus ac mi. Nunc ornare felis et enim hendrerit, eget suscipit nisl tempus. Curabitur pharetra nibh nisl, imperdiet convallis lectus rutrum elementum. Maecenas blandit ipsum sit amet nulla posuere aliquet. Sed hendrerit et elit vitae ornare. Praesent malesuada metus ac sem faucibus, sed cursus mi egestas. Sed ut massa nec nisi ullamcorper auctor.
\MakePartialLot
\processdelayedfloats
\chapter[Something 2]{Bla bla bla}
\startlist{lot}
\section{Section 1}
Sed adipiscing hendrerit ultricies. Etiam pretium ultrices aliquet. Nullam tortor purus, elementum non dictum non, condimentum ac nibh. Ut porta erat fringilla metus condimentum, in hendrerit sapien molestie. Aenean varius consequat arcu, eget aliquam justo. Morbi aliquam risus quis augue tempor vulputate. Ut ut dui cursus, ultricies est vitae, consequat ipsum. Vivamus rutrum vulputate varius.
\begin{table}[!htbp] \centering
\caption{Treatment effect on Quiz 6 outcomes and choices}
\label{eg2}
\begin{threeparttable}
\begin{tabular}{rllll}
\hline
& Treatment & Control & 90\% Confidence Interval & p-value \\
\hline
maxGrade\tnote{a} & 0.8506 & 0.7809 & (0.0154, 0.124) & 0.0347 \\
firstGrade\tnote{b} & 0.5278 & 0.4966 & (-0.005, 0.0673) & 0.1561 \\
Attempts\tnote{c} & 0.2461 & 0.2241 & (0.0059, 0.0381) & 0.0247 \\
Took Q6\tnote{d} & 0.1002 & 0.093 & (0.001, 0.0135) & 0.058 \\
Procrastination\tnote{e} & 102.9237 & 105.0334 & (-6.8086, 2.5892) & 0.4601 \\
n & 12061 & 12061 & & \\
\hline
\end{tabular}
\begin{tablenotes}[flushleft]
\item \footnotesize{Sample: Students who stated their intention to complete all the work needed to obtain the certificate}
\item [a]\footnotesize{First attempt grade}
\item [b]\footnotesize{Best attempt grade}
\item [c]\footnotesize{Numbers of attempts}
\item [d]\footnotesize{Dummy equal to 1 if the student attempted the Quiz}
\item [e]\footnotesize{Number of hours between the quiz publication and student first attempt}
\end{tablenotes}
\end{threeparttable}
\end{table}
Vivamus cursus tortor ut eros egestas imperdiet. Morbi sed diam ac nisl vestibulum volutpat. Etiam vestibulum neque ac justo suscipit, ac pretium metus eleifend. Duis sed sem lorem. Etiam pellentesque volutpat sapien, non pellentesque urna varius nec.
\MakePartialLot
\processdelayedfloats
\end{document}