Skip to content

Commit 2624501

Browse files
committed
correct habitatauteur from docx script
Make one small correction to the habitat chapter template
1 parent c3aac5e commit 2624501

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

source/R/habitatauteurs_from_docx.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ for (hoofdstuk in c("zilt", "kustduin", "water", "heide", "gras", "veen",
6262
rmd_select(rmd, by_section(x)) %>%
6363
rmd_select(has_type("rmd_markdown")) %>% # do not print the headers, only the text
6464
as_document() %>%
65-
str_replace_all("\\\\", "\\") %>% #otherwise, double backslash is printed in the md file
66-
str_replace_all("\\[", "[") %>%
67-
str_replace_all("\\]", "]") %>%
65+
str_replace_all(fixed("\\@"), "@") %>%
66+
str_replace_all(fixed("\\[@"), regex("[@")) %>%
67+
str_replace_all("\\\\]", "]") %>%
6868
str_replace_all("\\{.mark\\}", "") %>%#this text appears when the text background is not white in the docx
6969
writeLines(useBytes = TRUE,
7070
con = find_root_file("source/bookdown/habitatauteurs_paragrafen",

source/bookdown/_template_habitats.Rmd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,13 @@ data_areaal %>%
7272
arrange(code) %>%
7373
kable(booktabs = TRUE,
7474
format = "latex",
75-
exape = FALSE,
75+
escape = FALSE,
7676
col.names = c("", "Areaal (km²)", "Trendrichting",
7777
"FRR",
7878
"Eindconclusie"),
7979
caption = paste0("Areaalgrootte, trendrichting, relatie tot het referentieareaal voor regionaal gunstige toestand (FRR) en eindconclusie voor het areaal (", legende_caption(trend = b$trend, FRR_areaal = b$frr),").")) %>%
8080
kable_styling() %>%
8181
column_spec(2, width = "3cm")
82-
83-
8482
```
8583

8684
```{r, child = find_root_file("habitatauteurs_paragrafen", sprintf("%s_areaal.md", this_hab), criterion = has_file("bookdown.Rproj"))}

0 commit comments

Comments
 (0)