diff --git a/R/add-appendix-subsection-refs.R b/R/add-appendix-subsection-refs.R index be94aa1..0868f2b 100644 --- a/R/add-appendix-subsection-refs.R +++ b/R/add-appendix-subsection-refs.R @@ -97,6 +97,13 @@ add_appendix_subsection_refs <- function(x){ sec_inds <- grep(app_section_pat, app) if(!length(sec_inds)){ + # Add referencing so the appendix can be referenced in the document + # with a link + counter_lines <- c(paste0("\\renewcommand{\\thechapter}{", + toupper(LETTERS[app_ind]), + "}"), + "\\refstepcounter{chapter}") + app <- c(counter_lines, app) return(app) }