Skip to content

Instantly share code, notes, and snippets.

@pydanny
Created April 23, 2015 06:39
Show Gist options
  • Save pydanny/7440c244e56f2538e4cf to your computer and use it in GitHub Desktop.
Save pydanny/7440c244e56f2538e4cf to your computer and use it in GitHub Desktop.
LaTeX fix for chapter bork in TOC

Had a problem with one of our chapter titles having a carriage return in the TOC. Just fixed it! How? Changed the chapter header from

\chapter{Fundamentals of Django App \\ Design}

to

\chapter*{Fundamentals of Django App \\ Design}
\addcontentsline{toc}{chapter}{Fundamentals of Django App Design}

Hooray LaTeX!

@michal-h21
Copy link

This will create unnumbered chapter, alternative is to use

  \chapter[Fundamentals of Django App Design]{Fundamentals of Django App\\ Design}

@pydanny
Copy link
Author

pydanny commented Apr 25, 2015

@michal-h21, we ended going with your method. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment