m****r 发帖数: 141 | 1 I am compiling a LaTeX file with 10 chapters and a table of contents. I have
added the following in the first page.
But why is the table of contents still missing?
thanks !!!
Any help will be appreciated.
This is the main file.
\pdfbookmark[1]{TABLE OF CONTENTS}{table}
\tableofcontents
\addtocontents{toc}{\def\protect\@chapapp{}} \cleardoublepage \
phantomsection
\addcontentsline{toc}{chapter}{LIST OF TABLES}
\listoftables
\cleardoublepage \phantomsection \addcontentsline{toc}{chapter}{LIST OF
F... 阅读全帖 |
|
m****r 发帖数: 141 | 2 I am compiling a LaTeX file with 10 chapters and a table of contents. I have
added the following in the first page.
But why is the table of contents still missing?
thanks !!!
Any help will be appreciated.
This is the main file.
\pdfbookmark[1]{TABLE OF CONTENTS}{table}
\tableofcontents
\addtocontents{toc}{\def\protect\@chapapp{}} \cleardoublepage \
phantomsection
\addcontentsline{toc}{chapter}{LIST OF TABLES}
\listoftables
\cleardoublepage \phantomsection \addcontentsline{toc}{chapter}{LIST OF
F... 阅读全帖 |
|
T*******n 发帖数: 493 | 3 Don't change \@chapter. \@chapter is used to set the chapter opening
for numbered chapters. It shouldn't be used to tweak the TOC.
Change the definition for \l@chapter instead. If you use book.cls,
look for \l@chapter (around line 625). In the definition of \l@chapter,
the first argument #1 is the chapter number. So you need to change the
#1 to something like this:
\@chapapp\ #1
\@chapapp will expand to \chaptername or \appendixname depending on
whether you are in the main text or in the ba |
|
z*****n 发帖数: 7639 | 4 根据要求,我得用book格式写个report。但是章节开始页
要用这个格式:
1. (my chapter title)
1.1 (my section title)
在book.sty里面的default设置是这样的:
Chapter 1
(my chapter title)
在book.cls里面,it is writen so
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
|
|
c*******h 发帖数: 1096 | 5 看了一下book.cls,在定义\chapter的第六行某地方加上chapter字眼
看是不是你要的效果
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect Chapter \numberline{\thechapter}#1}% <----这里
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\addtocontents{lof}{\pr |
|
b*******h 发帖数: 56 | 6 谢谢版主的关心,找到了解决方法
\def\beforesep{-0.5in}
\def\aftersep{0pt}
\makeatletter
\def\@makechapterhead#1{%
\vspace*{\beforesep}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\large\centering\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 0\p@
\fi
\fi
\interlinepenalty\@M
\large \centering\bfseries #1\par\nobreak
\vskip \aftersep
}}
\def\@makeschapterhead#1{%
\vspace*{\beforesep}%
{\parinden |
|
s********r 发帖数: 158 | 7 我是按照一个 模板 做的, 其中有关 Appendix 是
\newcommand\appendices{\par
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\gdef\@chapapp{\appendixname}%
\gdef\thechapter{\@Alph\c@chapter}%
\@inappendixtrue%
\@gotappendicestrue%
\chapterheader{\appendicesname}%
}
还有一个问题
\appendices
\chapter {Appendix A title}
text
\section {Appendix A.1 title}
text
\section {Appendix A.2 title}
text
\chapter {Appendix B title}
text
\section {Appendix B.1 title}
text
如果在 table of content 中只想显示 Chapter title而忽略 sec... 阅读全帖 |
|