3

in an earlier question I asked to format the Glossary headings to match the chapter heading which was solved by Nicola Talbot thru Formatting of heading 'Glossary" to match chapter and index heading link for which I am really thankful. However, another small problem cropped up that when it was done, now the running header shows 'Glossary' on first page as well which should not show anything (just like chapter first page). I have posted the MWE for this code. I need to submit my thesis asap and this is the last glitch I am working on for which I would appreciate your help.

\documentclass[12pt]{report}
%%%%%%%%%%%%%% For page header/footer  
\usepackage{fancyhdr}
\pagestyle{fancyplain} 
\fancyhf{}
\setlength{\headheight}{15pt}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\lhead{\bfseries{\rightmark}}
\rhead{\bfseries{\thepage}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{makeidx}
\usepackage{sectsty}
\allsectionsfont{\bfseries}
\chapterfont{\centering\Large} 
\sectionfont{\normalsize}
\subsectionfont{\normalsize}
\usepackage[subfigure]{tocloft}
\usepackage{tocloft}
\renewcommand{\cftchappresnum}{Chapter }
\renewcommand{\cftchapaftersnum}{:}
\renewcommand{\cftchapnumwidth}{7em}
\newcommand*\updatechaptername{%
\addtocontents{toc}{\protect\renewcommand*\protect\cftchappresnum{Appendix }}
}
\makeindex
\usepackage[nogroupskip,nonumberlist,acronym]{glossaries} 
\newglossary[slg]{symbolslist}{syi}{syg}{List of Symbols}
\makeglossaries  
% Code provided by Nicola Talbot to make heading of  List of Acronyms and
% List of Symbols same as heading of List of Tables. 
\renewcommand{\glossarysection}[2][\theglstoctitle]{%
  \def\theglstoctitle{#2}%
  \vspace{\cftbeforelottitleskip}%
  \par\noindent
  {\cftlottitlefont #2}{\cftafterlottitle}%
  \vskip\cftafterlottitleskip
}
% % % % % % % % % % % % Glossary Entries  % % % % % % % % % % % % 
\newacronym{sa}{SA}{sample acronym}
\newglossaryentry{Pi}{
name=$\pi$,
description={A mathematical constant whose value is the ratio of any circle's circumference to its diameter.},
sort=symbpi, type=symbolslist
}
\newglossaryentry{glos:ia}{
name=Integer Ambiguity,
description={The unknown number of whole carrier phase cycles between the user and the satellite at the start of tracking (Sometimes ambiguity for short).} 
}
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
\usepackage{subfigure}
\begin{document}
\tableofcontents
\clearpage
\listoftables
\clearpage
\printglossary[type=\acronymtype,style=long,title=List of Acronyms \& Initialisms]
\clearpage
\printglossary[type=symbolslist,style=long] %Print list of symbols
\include{Sample}
\chapter{Sample}
This is my \gls{sa} and I can use it again. This is a symbol \gls{Pi}. This document\index{document} also has an index\index{index}.
\begin{table}
 \caption{Sample Table}
\end{table}
\updatechaptername
\clearpage
\glsaddall
\printglossary[] % Print list of symbols
\clearpage
\printindex
\end{document}
5
  • Have you tried \thispagestyle{plain} immediately after \printglossary[...] (assuming you still want a page number displayed)? Mar 11, 2014 at 19:44
  • @Paul Gessler Yes, i did but no luck.
    – Tash
    Mar 11, 2014 at 19:55
  • The line causing this is: \renewcommand{\glossarysection}[2][\theglstoctitle]{% \def\theglstoctitle{#2}% \vspace{\cftbeforelottitleskip}% \par\noindent {\cftlottitlefont #2}{\cftafterlottitle}% \vskip\cftafterlottitleskip } If you remove it, the headings are just fine, but of course don't match your style. I guess you're making the redefinitions incorrectly here.
    – Vlad030691
    Mar 19, 2014 at 20:39
  • compiling your code gives different bahaviour to what you described. So, it is a bit unclear to me. Is there still interest or can we close this?
    – Johannes_B
    Nov 26, 2014 at 15:27
  • I could not solve this but I submitted my thesis as is. So its OK now. Thanks
    – Tash
    Nov 26, 2014 at 19:59

1 Answer 1

1

Comments in the code

\documentclass[12pt]{report}
\usepackage{fancyhdr}
%\pagestyle{fancyplain} %Removed
\pagestyle{fancy} %Added
\fancyhf{}
\setlength{\headheight}{15pt}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\lhead{\bfseries{\rightmark}}
\rhead{\bfseries{\thepage}}
\usepackage{makeidx}
\usepackage{sectsty}
\allsectionsfont{\bfseries}
\chapterfont{\centering\Large} 
\sectionfont{\normalsize}
\subsectionfont{\normalsize}
\usepackage[subfigure]{tocloft}
\usepackage{tocloft}
\renewcommand{\cftchappresnum}{Chapter }
\renewcommand{\cftchapaftersnum}{:}
\renewcommand{\cftchapnumwidth}{7em}
\newcommand*\updatechaptername{%
\addtocontents{toc}{\protect\renewcommand*\protect\cftchappresnum{Appendix }}
}
\makeindex
\usepackage[nogroupskip,nonumberlist,acronym]{glossaries} 
\newglossary[slg]{symbolslist}{syi}{syg}{List of Symbols}
\makeglossaries  
% Code provided by Nicola Talbot to make heading of  List of Acronyms and
% List of Symbols same as heading of List of Tables. 
\renewcommand{\glossarysection}[2][\theglstoctitle]{%
  \def\theglstoctitle{#2}%
  \vspace*{\cftbeforelottitleskip}% JB Added an asterisk
  \thispagestyle{plain}% Added
  \markboth{\MakeUppercase{#2}}{\MakeUppercase{#2}}% Added
  \par\noindent%
  {\cftlottitlefont #2}{\cftafterlottitle}%
  \vskip\cftafterlottitleskip
}
% % % % % % % % % % % % Glossary Entries  % % % % % % % % % % % % 
\newacronym{sa}{SA}{sample acronym}
\newglossaryentry{Pi}{
name=$\pi$,
description={A mathematical constant whose value is the ratio of any circle's circumference to its diameter.},
sort=symbpi, type=symbolslist
}
\newglossaryentry{glos:ia}{
name=Integer Ambiguity,
description={The unknown number of whole carrier phase cycles between the user and the satellite at the start of tracking (Sometimes ambiguity for short).} 
}
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
\usepackage{subfigure}
\begin{document}
\tableofcontents
\clearpage
\listoftables
\clearpage
\printglossary[type=\acronymtype,style=long,title=List of Acronyms \& Initialisms]
\clearpage
\printglossary[type=symbolslist,style=long] %Print list of symbols
\include{Sample}
\chapter{Sample}
This is my \gls{sa} and I can use it again. This is a symbol \gls{Pi}. This document\index{document} also has an index\index{index}.
\begin{table}
 \caption{Sample Table}
\end{table}
\updatechaptername
\clearpage
\glsaddall
\printglossary[] % Print list of symbols
\clearpage
\printindex
\end{document}

You must log in to answer this question.

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