Shown in the following pic:

enter image description here

It seems the Roman page number for front-matter look too dark in ToC, so how to make it as normal font but not change the bold Arabic number for chapters?

  • What \documentclass are you using? – Werner Dec 29 '12 at 0:28
  • I am using book class for dissertation writing. And the title of front matter is like: \chapter{Abstract} ... etc. – KOF Dec 29 '12 at 0:34

Your global setting may differ slightly, but the following works:

enter image description here

\def\@pnum@font{\bfseries}% Default is \bfseries
\renewcommand*\l@chapter[2]{% Taken from book.cls
  \ifnum \c@tocdepth >\m@ne
    \vskip 1.0em \@plus\p@
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \bfseries
      \hskip -\leftskip
      #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss\@pnum@font #2}\par
\chapter{List of Figures}
\chapter{List of Tables}
\section{Problem and motivation}
\section{Research and methodology}

The macro responsibly for setting the \chapter titles in the ToC is \l@chapter. I've copied it from book.cls and inserted \@pnum@font where it sets the actual page number. By default, this has been defined to be \bfseries so that it prints in bold. Adding a \normalfont modification to \frontmatter and reversing it at \mainmatter (both using \g@addto@macro) causes a display that you're after.

Since writing to the ToC has to be done with care (to avoid expansion), using \protect is necessary.

  • The following is inspired by your code \let\l@ochapter\l@chapter \def\l@nchapter#1#2{\l@ochapter{#1}{\mdseries #2}} \g@addto@macro{\frontmatter}{\addtocontents{toc} {\string\bgroup\let\string\l@chapter\string\l@nchapter}} \g@addto@macro{\mainmatter}{\addtocontents{toc}{\string\egroup}} – user4686 Dec 29 '12 at 8:29

It nearly works in my case. See. enter image description here

[XeLatex in Texlive 2012 Ubuntu]

The first front page number is bold and the chapter 1 number is normal.

I don't know why this happened, here is the tex code:

 \include{Setting/settings}    % <----- page layout, font, renewcommands etc.

 \include{Cover/cover}     % cover page
 \frontmatter              % book mode only


 \tableofcontents }
 \printnomenclature[1.6 cm]  

 \mainmatter % book mode only


TOC content

\contentsline {chapter}{Acknowledgements}{i}{chapter*.1}
\def \@pnum@font {\normalfont }
\contentsline {chapter}{Abstract}{iii}{chapter*.2}
\contentsline {chapter}{List of Figures}{vii}{chapter*.4}
\contentsline {chapter}{List of Tables}{ix}{chapter*.5}
\contentsline {chapter}{Nomenclature}{xi}{chapter*.6}
\contentsline {chapter}{\numberline {1}Introduction}{1}{chapter.1}
\contentsline {section}{\numberline {1.1}Problem and motivation}{1}{section.1.1}
\contentsline {section}{\numberline {1.2}Objectives}{3}{section.1.2}
\contentsline {section}{\numberline {1.3}Research methodology}{4}{section.1.3}
\contentsline {subsection}{\numberline {1.3.1}Continuum}{4}{subsection.1.3.1}
\contentsline {subsection}{\numberline {1.3.2}Discontinuum}{4}{subsection.1.3.2}
\contentsline {section}{\numberline {1.4}Thesis outline}{6}{section.1.4}
\def \@pnum@font {\bfseries }
\contentsline {chapter}{References}{9}{chapter*.7}
\contentsline {chapter}{Appendix A}{11}{appendix*.8}
\contentsline {chapter}{Appendix B}{13}{appendix*.9}

\usepackage[nottoc]{tocbibind} is used to exclude 'Contents' in the list. Only Chapter 1 is included for test.

If I put \def \@pnum@font {\normalfont } on top and \def \@pnum@font {\bfseries } below Nomenclature in TOC, then recompile it, it works. But if run Bibtex, the orders will be of course disturbed again.

  • It's not likely to deduce what might be going on from just seeing an image of the output. Moreover, this does not constitute and answer to your question; it should rather be included as part of your original post. That's just how things work around here. – Werner Dec 29 '12 at 9:28
  • That's okay. But there is no way to add pic in comment? – KOF Dec 29 '12 at 9:30
  • Upload the image as part of an "answer" in order to get a link, and then post the link in the comment. It won't show, but clicking on it will reveal it. I'll check back tomorrow (off to bed now). – Werner Dec 29 '12 at 9:30
  • I can't see anything wrong with your code. Have you compiled at least twice? – Werner Dec 29 '12 at 15:53
  • Here is the commands: xelatex thesis ----> bibtex thesis ----> xelatex thesis. Problem still persists. – KOF Dec 29 '12 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.