GeneralSquare Bracket in Chapter Name

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
waterboy
Posts: 8
Joined: Fri Jun 17, 2011 9:47 pm

Square Bracket in Chapter Name

Post by waterboy »

Hi! I have the following code for my chapters:

\chapter[shortversion]moretext]{thelooooooooooooongversion}

As you may notice I got a square bracket in the short version. That means that the "moretext" won't be in the TOC. How do fix it so it will be in the TOC?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Square Bracket in Chapter Name

Post by localghost »

In such cases you need additional grouping by curly braces.

Code: Select all

\chapter[{[Short Version] for List Entry}]{Long Version for actual Chapter Title}

Best regards and welcome to the board
Thorsten
waterboy
Posts: 8
Joined: Fri Jun 17, 2011 9:47 pm

Re: Square Bracket in Chapter Name

Post by waterboy »

Thank you so much! So easy - why didn't i think of that? :D
Post Reply