目录采用罗马字母和阿拉伯字母,无页码

目录采用罗马字母和阿拉伯字母,无页码

我正在尝试使用以下格式创建自定义目录。我查看了许多来源,但仍然很难让它正常工作。摘要之前有一个标题页,它不应该被考虑在目录中。最后有一个附录,它不应该有页码。

目录看起来应该是这样的:

                                   Table of Contents

            Abstract............................................ ii
            Acknowledgement. ................................... iii
            Table of Contents................................... iv
            Tables.............................................. v
            Figures............................................. vi
            1.0 Introduction ................................... 1
                    1.1 Background.............................. 2
                    1.1 Objectives.............................. 3
            2.0 Review.......................................... 4
                    2.1 xxxxxxxxxx.............................. 5
                    2.2 yyyyyyyyyy.............................. 6
            3.0 Conclusion...................................... 7
            4.0 References...................................... 8
            CODE................................................ 9
            APPENDIX

答案1

tocloft以下是使用包和文档类的可能解决方案book

\documentclass{book}
\usepackage{tocbibind}
\usepackage{tocloft}
\usepackage{lipsum}

\AtBeginDocument{%
  \renewcommand\listtablename{Tables}
  \renewcommand\listfigurename{Figures}
  \renewcommand\contentsname{Table of Contents}
}

% Centered title for ToC, LoF, LoT
\renewcommand{\cfttoctitlefont}{\hfill\Huge\bfseries}
\renewcommand{\cftaftertoctitle}{\hfill}
\renewcommand{\cftloftitlefont}{\hfill\Huge\bfseries}
\renewcommand{\cftafterloftitle}{\hfill}
\renewcommand{\cftlottitlefont}{\hfill\Huge\bfseries}
\renewcommand{\cftafterlottitle}{\hfill}

% Leaders for chapter entries
\renewcommand\cftchapdotsep{\cftdotsep}

% Add space to account for new chapter numbering schema
\renewcommand\cftchapnumwidth{3em}
\renewcommand\cftsecindent{3em}

% Redefine representation for chapter (and section) counters
\renewcommand\thechapter{\arabic{chapter}.0}
\renewcommand\thesection{\arabic{chapter}.\arabic{section}}

\begin{document}

\frontmatter
\chapter{Abstract}
\lipsum[1]
\chapter{Acknowledgements}
\lipsum[1]
\clearpage
\tableofcontents
\clearpage
\listoftables
\clearpage
\listoffigures
\clearpage
\mainmatter
\chapter{Introduction}
\section{Background}
\section{Objectives}
\chapter{Review}
\section{Test Section}
\section{AnotherTest Section}

\backmatter
\chapter{CODE}

\chapter*{APPENDIX}
\addtocontents{toc}{\protect\addvspace{10pt}}
\addtocontents{toc}{\textbf{APPENDIX}}

\end{document}

在此处输入图片描述

答案2

以下是使用该类的示例book\frontmatter导致罗马、\mainmatter阿拉伯页码。对于附录,我使用 手动关闭页码,\pagenumbering{gobble}并添加未编号的\part

编辑:添加改变的编号方案(加上修正目录缩进)。

\documentclass{book}

\renewcommand{\thechapter}{\arabic{chapter}.0}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}

\usepackage{etoolbox}
\makeatletter
\patchcmd{\l@chapter}{1.5em}{2.3em}{}{}
\patchcmd{\l@section}{{1.5em}{2.3em}}{{2.3em}{2.3em}}{}{}
\makeatother

\begin{document}

\frontmatter

\tableofcontents

\chapter{Acknowledgement}

\mainmatter

\chapter{bla}

\section{blubb}

\chapter{foo}

\cleardoublepage
\appendix
\pagenumbering{gobble}

\part*{Appendix}
\addcontentsline{toc}{part}{Appendix}

\chapter{bar}

\end{document}

在此处输入图片描述

相关内容