Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Could someone please give me a hint on how the virtual chapter is inserted ine the table of contents in the example below? I've tried to use \addcontentsline before this virtual chapter, but this splits sections of chapter 1 in the table of contents. screenshot

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Use \addtocontents instead of \addcontentsline. The former is generic, the latter is used only to add "normal" entries.

share|improve this answer
    
Thank you, @Boris! I've used the line \addtocontents{toc}{\protect \contentsline {chapter}{Randomized algorithms}{\pageref{page:randalgs}}{} } –  Alexander S. Kulikov Feb 14 '13 at 19:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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