pfmc-assessments / sa4ss

Generate a stock assessment document from Stock Synthesis output
https://pfmc-assessments.github.io/sa4ss/
Other
12 stars 7 forks source link

paper size not right #41

Closed kellijohnson-NOAA closed 3 years ago

kellijohnson-NOAA commented 3 years ago

From Devo and Kris Kleinschmidt ...

In processing the Groundfish items for eCopy programming I ran into an issue with every single stock assessment file where the page size is just slightly larger than 8.5 x 11 (see screenshot). This requires me to go re-PDF each file individually then program it into the eCopy software otherwise the application will error upon printing. I'm unsure who is creating these documents to begin with or PDF'ing them, but we should look to see if there is a default page size setting issue or something that we can fix for the future as this is a time consuming and annoying process.

image

kellijohnson-NOAA commented 3 years ago

@shcaba please fix your paper size using @melissamonk-NOAA fix of the following in 00a.Rmd pagesize: letter

chantelwetzel-noaa commented 3 years ago

I tried this fix on two different documents but have rendered pdf that have the same size of 8.27 x 11.69. I tried deleting the "_main.pdf" (and some of the other .log, .tex, and .md files) and re-rendering and that did not correct the issue. Is there another step that I am missing?

melissamonk-NOAA commented 3 years ago

@chantelwetzel-noaa, you're right. I rendered with output_format ="bookdown::pdf_document2" and it rendered correctly to 8.5 x 11 in. I just tried rendering the full document and it didn't work...

kellijohnson-NOAA commented 3 years ago

\geometry{letterpaper, textwidth=14cm, top=2.54cm, bottom=2.54cm, includehead, includefoot, centering, footskip=1.5cm} in the sa4ss.sty file does work.

melissamonk-NOAA commented 3 years ago

@kellijohnson-NOAA, I just came to the same conclusion and can also confirm that works.

kellijohnson-NOAA commented 3 years ago

@mkapur you will need to fix this for sablefish as well

mkapur commented 3 years ago

Thank you for the heads up. I was able to render at the correct paper size using the edits to the .sty file (FWIW, the call to pdf_document2() threw Error in if (toc) { : argument is not interpretable as logical for me). To whom should I submit the new version?

chantelwetzel-noaa commented 3 years ago

Thank you @melissamonk-NOAA and @kellijohnson-NOAA for sleuthing out this solution for us. @mkapur I would check with Owen to see if there are additional editorial edits coming from the GFSC and if not then reach out to Devore to see when he would like you to send him the finalized version.

mkapur commented 3 years ago

thanks @chantelwetzel-noaa - I will ping Owen.

kellijohnson-NOAA commented 3 years ago

@mkapur is this a new error? It seems like it pertains to the table of contents.

mkapur commented 3 years ago

@kellijohnson-NOAA I can't say for sure because I never used pdf_document2() prior to working on the paper-size issue, and when I rendered using my original bookdown::render_book() it produced no errors (which was the same as back in June, the last time I edited it).

kellijohnson-NOAA commented 3 years ago

oh okay, so we don't have to worry about it given that we are not using pdf_document2(). @melissamonk-NOAA uses that to produce output quickly, or more quickly than book.