我使用 scrpage2 和 automark,这样章节和部分就打印到标题上。
我现在有一个特殊的情况,我配置词汇表以将其标题打印到标题,但在一个示例中,我明确希望在词汇表列表之后将标题恢复到其前一节。
在下面的代码中,页面标题显示“首字母缩略词列表”,而我希望它显示“部分”。词汇表加载定义不能被修改。
\documentclass{scrbook}
\usepackage[automark]{scrpage2}
\automark[section]{chapter}
\pagestyle{scrheadings}
\ohead{\pagemark} % header outside: page number
\ihead{\headmark} % header inside: chapter and section titles
\usepackage[
section, % add to toc on section level
]{glossaries}
\makeglossaries
\begin{document}
\newacronym{NA}{NA}{numerical Apertur}
\newacronym{DOF}{DOF}{depth of field}
\newacronym{PSF}{PSF}{point spread function}
\chapter{chapter}
Some text
\newpage
\section{section}
% use the acronyms in a document.
The \gls{NA} of an microscope objective is defined by
$\mathrm{NA} = n \sin(\alpha)$, where and $\alpha$ is the
half-angle of the maximum cone of light that can exit the lens
The $z$-length under which the objective displays the probe with a sharp
picture is named \gls{DOF} and the distribution of a single light point in the
focal area through the whole imaging system is termed \gls{PSF}. Both, the
\gls{DOF} and the \gls{PSF} are dependent on the \gls{NA}.
\section{subsection}
\newpage
\printglossary[type=\acronymtype,style=list,title=List of acronyms]
\newpage
\section{another section}
Hello World
\end{document}
编辑:
我尝试过
% save marks
\let\currentrightmark\rightmark
\let\currentleftmark\leftmark
% marks are overwritten
\printglossary[type=\acronymtype,style=list,title=List of acronmys]
% restore
\markboth{\currentleftmark}{\currentrightmark}
但这并没有改变什么?!
答案1
可以通过修改词汇表来解决。
% disables overwriting of marks
\renewcommand{\glossarymark}[1]{}
\printglossary[type=\acronymtype,style=list,title=List of acronmys]
尽管如此,我很感兴趣为什么\markboth
没有效果。