如何使用上一节的页眉停止 nomencl

如何使用上一节的页眉停止 nomencl

在此示例中,术语表的第二页标题为表格列表,继承了上一节的标题。如何将第二页的标题更改为术语表?

\documentclass[oneside,12pt]{book}
\usepackage{makeidx}        
\usepackage{nomencl}
\makenomenclature

\begin{document}
\frontmatter
\listoftables
\printnomenclature  

\mainmatter % book mode only

\chapter{Introduction}
Introduction

\nomenclature[]{FOO1}{bar1}
\nomenclature[]{FOO2}{bar2}
\nomenclature[]{FOO3}{bar3}
\nomenclature[]{FOO4}{bar4}
\nomenclature[]{FOO5}{bar5}
\nomenclature[]{FOO6}{bar6}
\nomenclature[]{FOO7}{bar7}
\nomenclature[]{FOO8}{bar8}
\nomenclature[]{FOO9}{bar9}
\nomenclature[]{FOO10}{bar10}
\nomenclature[]{FOO11}{bar11}
\nomenclature[]{FOO12}{bar12}
\nomenclature[]{FOO13}{bar13}
\nomenclature[]{FOO14}{bar14}
\nomenclature[]{FOO15}{bar15}
\nomenclature[]{FOO16}{bar16}
\nomenclature[]{FOO17}{bar17}
\nomenclature[]{FOO18}{bar18}
\nomenclature[]{FOO19}{bar19}
\nomenclature[]{FOO20}{bar20}
\nomenclature[]{FOO21}{bar21}
\nomenclature[]{FOO22}{bar22}
\nomenclature[]{FOO23}{bar23}
\nomenclature[]{FOO24}{bar24}
\nomenclature[]{FOO25}{bar25}
\nomenclature[]{FOO26}{bar26}
\nomenclature[]{FOO27}{bar27}
\nomenclature[]{FOO28}{bar28}
\nomenclature[]{FOO29}{bar29}
\nomenclature[]{FOO30}{bar30}

\end{document}

我使用 make 编译我的论文,但使用这个 oneliner 编译它会编译示例并复制问题

pdflatex ProblemNomenclature.tex && makeindex ProblemNomenclature.nlo -s nomencl.ist -o ProblemNomenclature.nls && pdflatex ProblemNomenclature.tex

答案1

您必须将这些内容添加到您的文档中:

\cleardoublepage           
\renewcommand{\nomname}{List of Symbols} %% may be this is good.
\markboth{\MakeUppercase\nomname}{\MakeUppercase\nomname} 

完整代码:

\documentclass[oneside,12pt]{book}
\usepackage{makeidx}
\usepackage{nomencl}
\makenomenclature

\begin{document}
\frontmatter
\listoftables
\cleardoublepage  
\renewcommand{\nomname}{List of Symbols} %% may be this is good.
\markboth{\MakeUppercase\nomname}{\MakeUppercase\nomname}  
\printnomenclature

\mainmatter % book mode only

\chapter{Introduction}
Introduction

\nomenclature[]{FOO1}{bar1}
\nomenclature[]{FOO2}{bar2}
\nomenclature[]{FOO3}{bar3}
\nomenclature[]{FOO4}{bar4}
\nomenclature[]{FOO5}{bar5}
\nomenclature[]{FOO6}{bar6}
\nomenclature[]{FOO7}{bar7}
\nomenclature[]{FOO8}{bar8}
\nomenclature[]{FOO9}{bar9}
\nomenclature[]{FOO10}{bar10}
\nomenclature[]{FOO11}{bar11}
\nomenclature[]{FOO12}{bar12}
\nomenclature[]{FOO13}{bar13}
\nomenclature[]{FOO14}{bar14}
\nomenclature[]{FOO15}{bar15}
\nomenclature[]{FOO16}{bar16}
\nomenclature[]{FOO17}{bar17}
\nomenclature[]{FOO18}{bar18}
\nomenclature[]{FOO19}{bar19}
\nomenclature[]{FOO20}{bar20}
\nomenclature[]{FOO21}{bar21}
\nomenclature[]{FOO22}{bar22}
\nomenclature[]{FOO23}{bar23}
\nomenclature[]{FOO24}{bar24}
\nomenclature[]{FOO25}{bar25}
\nomenclature[]{FOO26}{bar26}
\nomenclature[]{FOO27}{bar27}
\nomenclature[]{FOO28}{bar28}
\nomenclature[]{FOO29}{bar29}
\nomenclature[]{FOO30}{bar30}

\end{document}

在此处输入图片描述

笔记:

  • 如果要保留标题Nomenclature,请注释掉该行\renewcommand{\nomname}{List of Symbols}

答案2

最好的办法是修改如何nomencl定义章节标题。我还调用了arara避免复杂命令行的语句,以便您可以简单地发出

arara ProblemNomenclature.tex

代码如下:

% arara: pdflatex
% arara: nomencl
% arara: pdflatex

\documentclass[oneside,12pt]{book}

\usepackage{nomencl}
\renewcommand{\nomname}{List of Symbols}
\makenomenclature

\usepackage{etoolbox}
\patchcmd{\thenomenclature}
  {\chapter*{\nomname}}% usually only \chapter*{\nomname} is issued
  {\chapter*{\nomname}\markboth{\MakeUppercase\nomname}{\MakeUppercase\nomname}}
  {}{}

\begin{document}

\frontmatter
\listoftables

\printnomenclature

\mainmatter % book mode only

\chapter{Introduction}
Introduction

...

在此处输入图片描述

相关内容