Discussion:
[Textbook-l] Moving table of contents in print version of books
Lars Noodén
2017-11-20 16:36:02 UTC
Permalink
How do I change the location of the table of contents in the Wikibook I
am maintaining [1]. The body of the print version [2] is just this one
template:

{{printable}}

Strangely it puts the table of contents for the whole book fairly far
into the book. I'd like to move that to the front.

Also, while I'm already asking, how do I add another chapter from the
book to the print version.

/Lars

[1] https://en.wikibooks.org/wiki/OpenSSH
[2] https://en.wikibooks.org/wiki/OpenSSH/Print_version
Lars Noodén
2017-12-02 19:39:58 UTC
Permalink
Post by Lars Noodén
How do I change the location of the table of contents in the Wikibook I
am maintaining [1]. The body of the print version [2] is just this one
{{printable}}
Strangely it puts the table of contents for the whole book fairly far
into the book. I'd like to move that to the front.
It turns out that when the regular chapters force the position of their
own table of contents using __TOC__ they need to be wrapped in
"noinclude" tags. For example,

<noinclude>__TOC__</noinclude>

Otherwise the print book will take the __TOC__ as-is and then interpret
in-place the first one that comes along

Then the print book needs to have __TOC__ or __NOTOC__ explicitly to
control the position.
Post by Lars Noodén
Also, while I'm already asking, how do I add another chapter from the
book to the print version.
It turns out that the method for that suited me was to build the whole
Print Version manually. The official instructions [1] did not help much
by themselves. With the help of some of the other books as examples, I
could figure it out.

/Lars

[1]
https://en.wikibooks.org/wiki/Help:Print_versions#How_to_create_print_version
Loading...