我在乳膠中撰寫我的論文並有一個模板。除了一個以外,它可以很好地工作。章節編號在每章的第一頁上正確增加,但對於每章的連續頁面,標題爲「第x章 - 這是章節標題」的標題總是作爲章節編號。頁面標題上的錯誤章節編號除第一頁外
以下是從CLS文件,我覺得代碼示例相關的標題:
\newcommand\btypeout[1]{\bhrule\typeout{\space #1}\bhrule}
\def\today{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space \number\year}
\usepackage{setspace}
\onehalfspacing
\setlength{\parindent}{0pt}
\setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}
\usepackage{vmargin}
\setmarginsrb { 1.5in} % left margin
{ 0.6in} % top margin
{ 1.0in} % right margin
{ 0.8in} % bottom margin
{ 20pt} % head height
{0.25in} % head sep
{ 9pt} % foot height
{ 0.3in} % foot sep
\raggedbottom
\setlength{\topskip}{1\topskip \@plus 5\[email protected]}
\doublehyphendemerits=10000 % No consecutive line hyphens.
\brokenpenalty=10000 % No broken words across columns/pages.
\widowpenalty=9999 % Almost no widows at bottom of page.
\clubpenalty=9999 % Almost no orphans at top of page.
\interfootnotelinepenalty=9999 % Almost never break footnotes.
\usepackage{fancyhdr}
\lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}
\rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}
\chead{}\lfoot{}\rfoot{}\cfoot{}
\pagestyle{fancy}
%% Chapter Heading ---------------
\renewcommand{\chaptermark}[1]{\btypeout{\thechapter\space #1}\markboth{\@chapapp\ \thechapter\ #1}{\@chapapp\ \thechapter\ #1}}
%%--------------------------------------------------
\renewcommand{\sectionmark}[1]{}
\renewcommand{\subsectionmark}[1]{}
\def\cleardoublepage{\clearpage\[email protected] \ifodd\[email protected]\else
\hbox{}
\thispagestyle{empty}
\newpage
\[email protected]\hbox{}\newpage\fi\fi\fi}
嗨克里斯,感謝你的回覆早些時候我嘗試過,但它沒有奏效我已經粘貼了我的論文文件的完整樣式代碼一個新的問題,我非常感謝,如果你可以看看那裏:http://stackoverflow.com/questions/4571876/chapter-number-on-page-header-is-not-updated-in-latex-document – okm 2010-12-31 19:13:25