2

I use scrpage2 and automark such that chapter and section are printed to the heading.

I now have a special case, where I configure glossaries to print its title to the heading, but In an example I excplicitly want to restore the heading to its previous section after the glossaries list.

In the following code the page headings displays 'List of acronyms', where I instead want it to display 'section'. The glossary loading definition must not be modified.

\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}

EDIT:

I tried it with

% save marks
\let\currentrightmark\rightmark
\let\currentleftmark\leftmark   
% marks are overwritten
\printglossary[type=\acronymtype,style=list,title=List of acronmys]
% restore
\markboth{\currentleftmark}{\currentrightmark}

But that changes nothing ?!

1 Answer 1

1

It can be solved by modifying glossaries.

% disables overwriting of marks
\renewcommand{\glossarymark}[1]{}
\printglossary[type=\acronymtype,style=list,title=List of acronmys]

Nevertheless I would be interested why \markboth has no effect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .