Unable to break title where I want
saraccogiorgio opened this issue · 8 comments
The title is long and automatically breaks. Unfortunately the breaking it chooses produces a bad graphic output and I would like to tell LaTeX where to do the breaking by inserting //, but this produces an error.
Even protecting the line break (\protect //) does not solve the issue and an error occurs.
If I ignore the error and force the compilation, I get a sound pdf where the title is indeed broken over multiple lines with the breaking occurring where I want.. But this is on page 2, and on page 1 I get the part of title after the first break line symbol //.
By the way, apparently the cleardoublepage option is not working.
@saraccogiorgio Thank you, I'll take a look at that as well.
About your initial issue: I trust you tried \\
and not //
for line breaking?
Edit: Also, have you tried \newline
?
@vhbelvadi thanks for the effort you put in the class, I appreciate it.
I tried \\
and not //
(definitely my bad on the original post, that was a typo). The command \newline
does not produce an error, but messes up with the centering of the title.
If needed, I can produce a MWE.
Thanks so much for the kind words.
An MWE would be great if you can attach the tex file—just so there's no confusion in understanding the issue. Thanks for that as well.
Attached you can find 2 MWE, one displaying the issue with \newline
the other with \\
.
So, I tweaked a bit with the .cls class. I can now use \\
without errors and producing the desired output. The culprit was
\renewcommand{\\}{\par\vskip1.5ex\noindent}%
After commenting it, it works.
Regarding the cleardoublepage, for now I have a workaround that is not elegant at all, but at least works. I defined a
\newcommand{\newsection}[1] {\cleardoublepage \section{#1} } \newcommand{\newsectionnonumber}[1] {\cleardoublepage \section*{#1} }
and using these to start new sections. Maybe in the next days I will try to figure out the right way to do it.
Best,
Thanks for the MWE and for the update.
That renewcommand
line for \\
was pretty much where I headed straight away to fix the bug but I've been trying to sort it out without having to get rid of it entirely.
As a result I haven't gotten to the cleardoublepage
command yet but your progress will no doubt help us get there quickly. Thanks again.
@saraccogiorgio Pinging to let you know that I've pushed a fix for the newline error that doesn't need the .cls line commented out. Please let me know if the problem persists. I'll close this issue and open a new one for cleardoublepage
.