benmarwick / huskydown

An R Markdown template using the bookdown package for preparing a PhD thesis at the University of Washington
Other
120 stars 29 forks source link

Linebreaks in chapter titles not working with // as specified in uwthesis.cls #14

Closed ChrisWaloszek closed 3 years ago

ChrisWaloszek commented 4 years ago

According to uwthesis.cls, linebreaks can be added simply via \\:

%  Complication is added here to allow line breaks
%  in the chapter titles (via \\).
%
\def\@chapter[#1]#2{
  \ifnum \c@secnumdepth >\m@ne
  \refstepcounter{chapter}
  \typeout{<<\thechapter>>}
  {\def\\{ }  % allow \\ in title
...

However, linebreaks do not appear when knitting to PDF (only a single \appears) for me.

I tried to seek advice at SO, see my post here. However the replies I received either only work with HTML output only, or they only work with simple markdown files and not with bookdown/huskydown.

The ultimate goal is to add linebreak to a long chapter title in the main document, whereby

benmarwick commented 3 years ago

Looks like you got some good options to deal with this on SO, so closing for now.