TransWikia.com

Automatically adding chapter title in section but not in toc

TeX - LaTeX Asked on February 4, 2021

Using KOMA’s scrreprt, I am typing solutions to exercises in a book.

I have

addchap{Page 42}
addsec{Exercise 7}
addsec{Exercise 8}
addchap{Page 43}
addsec{Exercise 9}

so that Page 42 and Exercise 7 appear without any numbers in the table of contents, which is what I want. (Note that these page numbers are not the page numbers of my LaTeX document but are page numbers of the book.)

However, since I often hand out solutions of individual exercises to students, I would like to have the page number mentioned together with the Exercise number on the same page.

Is there a way to have LaTeX automatically add the respective chapter name in front of the section name in the body of the document (but not in the TOC)? So that it looks like "Page 42 – Exercise 7" instead of just "Exercise 7".

If it is not possible directly inside the section name, perhaps there is a way to have the chapter (i.e. book page number) in the header.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP