Closed iantaylor-NOAA closed 1 year ago
I don't recommend doing this but you could edit sa4ss.sty to include a margin call
\geometry{letterpaper,
textwidth=14cm,
margin=1.0in,
top=2.54cm, bottom=2.54cm,
includehead, includefoot,
centering,
footskip=1.5cm}
I don't encourage users editing this file. I would rather change it in the package and have everyone replace this file with the newest version.
That short-term worked for me (seems like I had to render it twice for it to stick), but I will happily switch to a package-focused solution.
I edited sa4ss.sty
to add
\usepackage{xcolor}
\usepackage{colortbl}
which were needed (maybe just the second one) to allow striping and bold rows in tables. If there's a better place to add those lines, or if these should be added to the package, let me know.
kableExtra::kable_styling(latex_options = c("striped")) %>%
kableExtra::row_spec(1, bold = TRUE)
@kellijohnson-NOAA When implementing the page margin solution within our sa4ss.sty file we get the following warning
"Package geometry warning: Over specification in h-direction...."
When I remove the margin = 1.0in line this warning goes away
The document still compiles, and does not appear to have issues, however it makes me a little worried something is cut off somewhere. Do you know how we can resolve while still keeping the 1in margin so as to be similar to other documents? If that solution is ignore it, because it doesn't affect anything, Im ok with that.
Repeating a portion of the commit message here
Warning: Package geometry Warning: Over-specification in `h'-direction.
Warning: `width' (398.33858pt) is ignored.
because the geometry package is hierarchical where the new input of margin conflicted with the old input of overall textwidth so it was ignoring textwidth.
Just remove the textwidth argument in favor of margin.
Problem
Jim Hastie made this reasonable suggestion:
Proposal
The 00a.Rmd created by
sa4ss::draft()
includesgeometry: margin=1in
but that appears to be ignored or overridden by some other LaTeX package. Changing the margin settings on that line didn't make a difference. If anyone knows how to get margin settings working, adding that to the package and/or existing documents could be helpful for fitting some of our larger tables, making our figures slightly bigger and reducing the overall length of the reports.