这就是我要的 :
CONTAINT
CONTAINT .............................................................. i
TABLE ...................................................................... ii
FIGURE .................................................................... iii
APPENDIX ................................................................ iv
CHAPTER I PENDAHULUAN .................................... 1
1.1 Latar Belakang ................. 2
1.2 Kontribusi ..................... 3
CHAPTER II KAJIAN TEORI ...................................... 4
2.1 Landasan Teori ................. 4
2.2 Studi Pendahuluan .............. 5
我使用这个report
课程。有人能帮我吗?我是 LaTeX 的初学者,我必须用 LaTeX 为我的本科毕业论文写一个大文档。
我的代码运行不太好:
\renewcommand{\cftchapfont}{\large\MakeUppercase}
\makeatletter
\renewcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip 1.0em
\@plus\p@
\setlength\@tempdima{4.5em}%
\begingroup
\parindent \z@
\rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode \normalfont % mengganti bfseries menjadi normal font
\advance\leftskip\@tempdima
\hskip -\leftskip
#1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\penalty\@highpenalty
\endgroup
\fi
}
\makeatother
答案1
这个怎么样:
\documentclass{report}
\usepackage{tocloft}
\usepackage{tikz}
\usepackage[left=20mm,right=40mm,top=40mm,bottom=20mm]{geometry}
\renewcommand\contentsname{CONTENTS}
\newcommand{\newchapter}[1]%
{ \renewcommand{\thechapter}{\Roman{chapter}}%
\chapter{#1}%
\renewcommand{\thechapter}{\arabic{chapter}}%
}
\setlength{\cftsecindent}{2.5cm}
\renewcommand{\cftchapdotsep}{4.5} % same spacing as for sections
\renewcommand{\cftchapfont}{\bfseries}
\renewcommand{\cftchapleader}{\bfseries\cftdotfill{\cftchapdotsep}}
\renewcommand{\cftchappagefont}{\bfseries}
\renewcommand{\cftchappresnum}{CHAPTER }
\renewcommand{\cftchapnumwidth}{2.8cm}
\begin{document}
\pagenumbering{Roman}
\addcontentsline{toc}{chapter}{TABLE OF CONTENTS}
\tableofcontents
\newpage
\addcontentsline{toc}{chapter}{LIST OF FIGURES}
\listoffigures
\newpage
\addcontentsline{toc}{chapter}{LIST OF TABLES}
\listoftables
\newpage
\addcontentsline{toc}{chapter}{APPENDIX}
\chapter*{APPENDIX}
\setcounter{chapter}{0}
\newchapter{FIRST CHAPTER}
\setcounter{page}{1}
\pagenumbering{arabic}
\section{first section}
\section{second section}
\newchapter{SECOND CHAPTER}
\section{third section}
\section{fourth section}
\end{document}
看起来你想要更大的右边距\sections{}
,但是tocloft
手动的声明它“应该在任何给定的文档中保持不变”,所以我不确定你是否应该改变它。可能还有其他方法吗?
章节标签本身只是\newchapter{}
从阿拉伯语变成了罗马语,因此部分标签不受影响。