从附录开始

从附录开始

我正在尝试使用appendix包,但它很乱……我遇到了太多问题,而且我没有找到任何现成的样式。有人能告诉我从哪里开始解决这些问题吗:首先:页码必须像这样:

appendix I
appendix II
appendix III,1
appendix III,2
appendix III,3
appendix IV

也许如果所有附录都是不同的文件,则可以从那里进行页码编号。
第二:在目录中,附录应该如下所示:

2 Section..........................3
3 Section text.....................6
References.........................7
Appendices
          Appendix I: Appendix test
          Appendix II: Appendix two
          Appendix III: Test
          Appendix IV: Hello world

并且每个图形和表格的编号都必须重新设置。

就像图片中一样,首先你可以看到目录,附录在最后。之后是附录页面和页码的示例。页码应该在右上角。我用这个几乎做对了:

\fancyhead[R]{Appendix \thesection \ifnum\value{page}>0\relax, \thepage\else\fi}

唯一的问题是,当有多个页面时,它将不会打印第一个数字。 在此处输入图片描述 这可能吗?

答案1

这是一个“模板”,它试图设置(有点)不清楚的规范。hyperref但是,可能会出现问题。

\documentclass{article}

\usepackage{chngcntr}
\usepackage{tocloft}
\usepackage[titletoc,toc]{appendix}  % Adding the name `Appendix` before each toc entry with titletoc and adding a separate line for Appendices with `toc` 

\usepackage{blindtext}

\begin{document}
\tableofcontents
\section{First}
\section{Second}

\begin{figure}
  \caption{My dummy figure in the regular section}
\end{figure}

\section{Third}

\begin{appendices}
\renewcommand{\thesection}{\Roman{section}}
\counterwithin{figure}{section}% Reset the figure counter
\counterwithin{table}{section} % Reset the table counter
%\counterwithin*{page}{section} % Reset the page counter with each appendix section 

\addtocontents{toc}{\protect\renewcommand{\protect\cftsecindent}{10pt}}
\section{First Appendix}
\begin{figure}
  \caption{My dummy figure in the appendix}
\end{figure}
\blindtext
\section{Second Appendix}
\blindtext[5]
\section{Third Appendix}
\blindtext[15]
\section{Fourth Appendix}
\blindtext[5]
\end{appendices}
\end{document}

在此处输入图片描述

相关内容