4

Again I'm asking for help, for a tricky issue, as for me.

It is demanded from me that in the TOC I must write chapter-level headings without page number and dot filling.

So, I'm using tocloft package to manage my ToC. And I used the following command to fullfill the demands:

\cftpagenumbersoff{chapter}

BUT =) I need my bibliography to be included in ToC as a chapter-level heading, but with the page number. I am using the bibtex to manage my bibliography.

I wrote the following code, that to my opinion should work:

\cftpagenumberson{chapter}
\addcontentsline{toc}{chapter}{Библиографический список}
\bibliographystyle{gost71u2003}
\nocite{*}
\bibliography{GSTBib}

I thought that it would turn the page numbers on for the chapter-level, but it did not. It has no page number aligned to the right.

How can I manage this issue?

6
  • Are youusing KOMA? If so, just add \documentclass[bibliography=totoc]{scrbook} Nov 26, 2013 at 15:38
  • No, I'm not. Is there another way, without KOMA?
    – Immelstrom
    Nov 26, 2013 at 15:41
  • Mario, I've just tried your example. Here is the result: clip2net.com/s/6g3mS5. The trick did not work =(
    – Immelstrom
    Nov 26, 2013 at 15:59
  • I'm sorry, this is beyond me. With KOMA is very easy to just set it so both the bibliography and the chapters have numbers and dots... but since your specs require no numbers for chapters I guess your approach would be the "logical" one. However, I'm not familiar enough with tocloft to play with it and find a solution. Perhaps using a \phantomsection before the \addcontentsline{toc}{chapter}{Библиографический список} ? Nov 26, 2013 at 16:44
  • 1
    Try \addtocontents{toc}{\cftpagenumbersoff{chapter}} first and \addtocontents{toc}{\cftpagenumberson{chapter}} later. Nov 26, 2013 at 16:49

1 Answer 1

6

The right way to do it should be to use

\addtocontents{toc}{\cftpagenumbersoff{chapter}}

instead of

\cftpagenumbersoff{chapter}

and

\addtocontents{toc}{\cftpagenumberson{chapter}}

instead of

\cftpagenumberson{chapter}

In fact, the following MWE

\documentclass[twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}
\usepackage{tocloft}

\begin{document}

\tableofcontents

\addtocontents{toc}{\cftpagenumbersoff{chapter}}

\chapter{Способы описания систем}

\addtocontents{toc}{\cftpagenumberson{chapter}}

\addcontentsline{toc}{chapter}{Библиографический список}
\bibliographystyle{gost71u2003}
\nocite{*}
\bibliography{GSTBib}

\end{document} 

yields

enter image description here

1
  • Uhm, I used \cftpagenumbersoff{chapter} in my package, to make all chapters act the same. Adding \addtocontents{toc}{\cftpagenumberson{chapter}} just before the biblio works too.
    – Immelstrom
    Nov 26, 2013 at 17:07

You must log in to answer this question.

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