I use fancyhdr to display first and last headword from my dictionary in the header section. The problem is that the headwords in the dictionary may contain special symbols (see example picture)
) that I do not want to appear in the header line. How can I display headwords without symbols in the header line?
Here comes the minimum example:
\documentclass[twocolumn]{book}
\usepackage[margin=2cm]{geometry}
\usepackage[icelandic, czech, english]{babel}
\usepackage[utf8x,utf8]{inputenc}
\usepackage[T1]{fontenc}
\newcommand{\entry}[2]{\hangpara{2em}{1}\textsf{\textbf{#1}}\
#2\markboth{#1}{#1}\par}\nopagebreak[4]
\usepackage{fix2col,hanging}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancypagestyle{dictstyle}{%
\fancyhf{}
\fancyhead[LE,RO]{\textsf{\textbf{\rightmark\ -- \leftmark}}}
\fancyhead[LO,RE]{\textsf{\textbf{\thepage}}}
}
\begin{document}
\pagestyle{dictstyle}
\entry{kímni··gáf|a}{meaning}
\end{document}
hangingpackage) and for semantics (e.g., "header section" versus "header line". Unfortunately, your MWE doesn't actually contain any "unusual characters" that might need to be simplified or suppressed for display in the header line. Please consider editing your MWE to introduce some actual "problem words". – Mico Feb 07 '12 at 13:54