-
Notifications
You must be signed in to change notification settings - Fork 17
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
Finish fsar template #242
Comments
just some running notes as I get back into this, a few packages that were missing for me when rendering a FSAR were moving the figure code out of the .Rmd is a good idea, that way people that only want to see the template for figures can access a script that is not dependent on rendering in csasdown |
Comments from Julie about the 4-panel figure [Yesterday 2:58 PM] Marentette, Julie (she, her / elle, la) (DFO/MPO) [Yesterday 2:58 PM] Marentette, Julie (she, her / elle, la) (DFO/MPO) Figure aesthetics: Figures should have as minimal text as possible and the figure caption can be used for information/descriptions as needed. Text in the figure should be easily legible when view zoom is at 100% (print view) and kept to a minimum given complexity of translating figures. Ideally any necessary text is bilingual. Font on axes should be Arial 10. Confidence intervals should be presented graphically with shading that includes fading edges at more extreme probabilities in order to better characterize improbably but high consequence events). Use standardized graphs templates (CSASdown) if possible. The figure caption should be Arial font, size 10, italics, left-aligned, paragraph spacing 6 pt (0.08 in, 0.21 cm) before and 12 pt (0.17 in, 0.42 cm) after, keep lines together. The figure caption goes below the figure. |
This part
has always seemed harder to interpret to me. I'd favour multiple levels of shaded quantiles if possible. Say, 50% and 95% in darker and lighter grey. |
I got pretty far down the rabbit hole of trying to get list bullet styles to work in the fsar docx. Summary: the default docx file created, e.g. by pandoc, does not have a list style applied to lists. This is a widely known pandoc limitation and there are open pandoc issues about it. A work around:
and then define Alternatively
More elegantly, do that behind the scenes, converting Then I got caught up trying to figure out how to preprocess the .Rmd as a hook in knitr/bookdown to do that... Then I realized https://github.com/davidgohel/officedown/ carries over list styles and does a ton of other stuff that could be useful here and for res docs etc. like figure and table formatting and tables of contents. So, maybe we should look into somehow using that with or instead of bookdown rather than trying to hack this all together ourselves? I'm not sure if they integrate. Maybe @PaulRegular has experience? Just leaving this here so I don't lose my train of thought. |
In the short term, this works: |
If you're still interested in doing it - Take a look at how a made a copy of the XX.rmd files as tmp_XX.rmd files in csasdown and a copy of the _bookdown.yml file and used that as the bookdown yaml file argument to render the document using bookdown. That seems to work fairly well and was the only way I could find to pre-process RMD files. The functions are already written to do most of it. See Line 62 in f3d342d
and csasdown/R/create-tmp-yaml-rmd-files.R Line 45 in f3d342d
|
I've only contemplated making the switch from bookdown to officedown. Experience so far has been to post-process the word files produced by bookdown using officer. Indeed, the fsar branch inspired efforts to use officer to add frontmatter to a resdoc on render (see resdocx branch). e.g.: Lines 43 to 59 in d56a7d1
But this is admittedly clunky and it may be more elegant to utilize officedown to impose specific formatting in the Rmd file. Just need to get around to trying it out to see what the learning curve is like / determine how difficult it might be to make the switch. |
just a few ideas/notes as I am writing the draft FSAR for southern Gulf cod
|
For word documents, I tend to use |
Can you provide screenshots for this? |
@seananderson this is what I mean, the part that mentions that this is a mandatory section, and the part that says to refer to the guidance document: |
after using the four-panel template that was added to csasdown and that plotted simulated timeseries in a format similar to what was used in the RAM Legacy database, I had the following comments:
|
with ggplot, it should likely be
I would think y-axis labels would be most common
yes Also, where is that file currently? I forget. Also see: #248 |
@seananderson the simulated data is in R/fake-data.R and the 4-panel figure is in R/plot-timeseries.R |
I've continued working on experimental modifications to the resdoc_word format (resdocx branch) and I managed to utilize officedown. It's behaviour isn't always consistent with bookdown (e.g., it didn't work well with |
By all means, go for it! |
I've made some progress on tidying up the output, most of it was accomplished by pre-processing a tmp-*.Rmd file (see 74b1ffb). However, I've yet to work out how to force the style of bullets and numbered lists. I have created a function that uses officedown in the background, and that is a hopeful path for setting default list styles. |
I made some more progress (63d8372). The bullets and numbered lists should now follow the FSAR style by default using
Renders to: |
I really appreciate all the work you have done on this new template -- it looks great! I just started setting up a FSAR for our herring stock assessment this year. I'm wondering about making a PDF instead of a Word document.. is that difficult to set up? I can try working on this if you don't mind, but I would appreciate some direction on how to start if you have time. I can start a new issue for this too if you think that's wise -- this issue may have enough in it already! |
By all means give it a shot, but my thinking was we'd try to make it work with Word only output.
officedown looked promising for some of the fancier formatting stuff we might struggle with otherwise. |
Thanks @seananderson, those are all good reasons.. maybe I'll leave it as is for now and tackle a PDF later if it turns out Word is not working for us. |
The "Knit" button in RStudio is running
instead of the usual |
just some running notes as I am working on my Science Response (FSR)
|
FYI:
Agree.
These issues are solved for the fsar template in the resdocx branch via post-processing.
For the Northern cod process, the CSAS office manually added this table.
I think this is done under the resdocx branch.
Here's how I augmented the context section under the 01_fsar.Rmd file, with a reference included, for the Northern cod FSAR:
|
Update this issue as we remember what was left to do...
@ricardd @jdunic @PaulRegular
If some of these require a lot of work, they can be pulled out into their own issue and broken down into steps.
The text was updated successfully, but these errors were encountered: