Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latex header fixes for 2022 report #6

Open
sgaichas opened this issue Aug 19, 2021 · 2 comments
Open

latex header fixes for 2022 report #6

sgaichas opened this issue Aug 19, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@sgaichas
Copy link
Member

In 2021 there were difficulties knitting to pdf with our previous header due to changes in LaTeX in 2020.

A header example that works in R4.0+ with tinytex is posted here. This should work across operating systems (I hope).

This should allow us to get rid of the discontinued everypage LaTeX package that we hacked in with everypage-1x

New code is here to replace the \AddEverypageHook{% block:

\fancyheadinit{%
   \ifthenelse{\value{page}=X}%
      {\fancyhead[R]{\includegraphics[width=40pt]{images/NOAA_logo.png} \\ \textsf{\emph{DATE YEAR}}}
       \fancyhead[L]{\textsf{\LARGE State of the Ecosystem YEAR: REGION}}
      }%
      {\fancyhead[R]{}
       \fancyhead[L]{\textsf{\emph{State of the Ecosystem YEAR: REGION}}}
      }
}

I also had to adjust the header line width by adding \fancyheadoffset[L]{0.5cm} above the code block, because it wasn't full width in my doc. This may not be necessary for the SOEs.

Changes to the .Rmd file include ensuring that "null" didn't get entered for the title--leave blank in yaml--and the line
\thispagestyle{fancy} may need to be added after the \setcounter{page}{X} statement.

@sgaichas
Copy link
Member Author

@slucey for when you start the NEFSC SOE Rmd:
this year I updated a few things in the latex header, including getting rid of older latex packages we aren't really using, and I was able to knit everything using R4+ and tinytex on my newer computer that doesn't have a standalone latex installation (once I got the page numbers right !) see header1.tex

@slucey
Copy link
Member

slucey commented Feb 15, 2022

Thanks! I should be starting on the New England document soon and will let you know if I run into any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants