Skip to content

Commit

Permalink
add new YAML entry for a short FSAR/FSRR title, and appropriate bookm…
Browse files Browse the repository at this point in the history
…arks for replacing in Word files
  • Loading branch information
ricardd committed Dec 16, 2024
1 parent e4c2b09 commit ed44eec
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion R/fsar-word.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ render_sar <- function(...) {

doc <- officer::headers_replace_text_at_bkm(doc, "region_name", x$region)
doc <- officer::headers_replace_text_at_bkm(doc, "region_name_rest", x$region) # non-first page
doc <- officer::headers_replace_text_at_bkm(doc, "report_name_rest", x$report_title) # non-first page
doc <- officer::headers_replace_text_at_bkm(doc, "report_name_rest", x$report_title_short) # non-first page

doc <- officer::headers_replace_text_at_bkm(doc, "report_year", x$report_year)
doc <- officer::headers_replace_text_at_bkm(doc, "report_number", x$report_number)

Expand Down
Binary file modified inst/csas-docx/fsar-first-page.docx
Binary file not shown.
Binary file modified inst/csas-docx/fsar-template.docx
Binary file not shown.
1 change: 1 addition & 0 deletions inst/rmarkdown/templates/fsar/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
report_title: "[Publication Title]"
report_title_short: "[Short Publication Title]"
report_year: "2024"
release_month: "January"
report_number: "XXX"
Expand Down
4 changes: 2 additions & 2 deletions inst/rmarkdown/templates/fsar/template.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: FSAR
description: >
Template for creating a DFO FSAR reports using R Markdown using the R
bookdown package.
Template for creating a DFO FSAR or FSRR reports using R Markdown
using the R bookdown package.

0 comments on commit ed44eec

Please sign in to comment.