09 March 2021

670. Issues with the RSC latex template -- text shifted on debian buster

Using the RSC latex template -- last updated 2016 -- works fine on debian stretch. However, on debian buster the text is screwed up on all pages except for the first one: the header is way too big, and the text runs off the page at the bottom.

After having spent a lot of time looking at log files, comparing installed packages on different machines, and generally not making any progress, I finally found this:

https://tex.stackexchange.com/questions/495662/rsc-template-fancyhdr-doesnt-respond-well

which links to 

https://tex.stackexchange.com/questions/491859/what-has-changed-in-latex-that-means-the-rsc-template-no-longer-works#comment1242180_491859

Since links die occasionally I'll summarize it here (I DID NOT COME UP WITH THIS SOLUTION):

Fancyhdr has been updated between stretch and buster, and while the maintainers at Overleaf have fixed the RSC template and notified RSC of the changes necessary, the current (8/3/2021) version of the template is still faulty.

To fix you can either 

1) edit the .tex file template itself

a) Comment out 

\fancyhead[C]{\includegraphics[width=18.5cm]{head_foot/header_bar}}
\fancyhead[L]{\hspace{0cm}\vspace{1.5cm}\includegraphics[height=30pt]{head_foot/PCCP}}
\fancyhead[R]{\hspace{0cm}\vspace{1.7cm}\includegraphics[height=55pt]{head_foot/RSC_LOGO_CMYK}}

b) find vspace{3cm} after \twocolumn[..] and add

{\includegraphics[height=30pt]{head_foot/journal_name}\hfill%
 \raisebox{0pt}[0pt][0pt]{\includegraphics[height=55pt]{head_foot/RSC_LOGO_CMYK}}%
 \\[1ex]%
 \includegraphics[width=18.5cm]{head_foot/header_bar}}\par

right before it.

Then change \vspace{3cm} to \vspace{1em}

or 

2) add some extra .sty files to the folder with your .tex file. Those files are:
balancy.sty, caption.sty, caption3.sty, fancyhdr.sty, mchem.sty and secsty.sty

They can be had from https://github.com/bardsoftware/template-RSC/tree/master/Paper

No comments:

Post a Comment