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
the linebreak does not appear in the chapter name in the TOC
the label to reference the chapter works throughout the document i.e. is maintained despite the linebreak.
sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6
According to uwthesis.cls, linebreaks can be added simply via
\\
: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 withbookdown
/huskydown
.The ultimate goal is to add linebreak to a long chapter title in the main document, whereby
the label to reference the chapter works throughout the document i.e. is maintained despite the linebreak.
sessionInfo() R version 3.6.3 (2020-02-29) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.6
Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] grid stats graphics grDevices utils datasets methods
[8] base
other attached packages: [1] showtext_0.8-1 showtextdb_3.0 sysfonts_0.8.1
[4] latex2exp_0.4.0 ggpubr_0.3.0 GGally_1.5.0
[7] huxtable_4.7.1 vcd_1.4-7 tinytex_0.24
[10] forcats_0.5.0 stringr_1.4.0 dplyr_1.0.0
[13] readr_1.3.1 tidyr_1.1.0 tibble_3.0.1
[16] tidyverse_1.3.0 rmarkdown_2.3 rJava_0.9-12
[19] reshape2_1.4.4 qdap_2.4.1 RColorBrewer_1.1-2
[22] qdapTools_1.3.5 qdapRegex_0.7.2 qdapDictionaries_1.0.7 [25] psych_1.9.12.31 purrr_0.3.4 plyr_1.8.6
[28] packrat_0.5.0 markdown_1.1 magrittr_1.5
[31] lubridate_1.7.8 knitr_1.29 jtools_2.0.5
[34] Hmisc_4.4-0 Formula_1.2-3 survival_3.1-12
[37] lattice_0.20-41 ggthemes_4.2.0 DiagrammeR_1.0.6.1
[40] data.table_1.12.8 cowplot_1.0.0 broom_0.5.6
[43] bookdown_0.19 ProjectTemplate_0.9.2 ggplot2_3.3.2
[46] kableExtra_1.1.0 modelsummary_0.4.1.9000 tables_0.9.3
[49] remotes_2.1.1