diff --git a/R/ebook.R b/R/ebook.R index d51a5bcbe..f4a49695e 100644 --- a/R/ebook.R +++ b/R/ebook.R @@ -126,8 +126,8 @@ resolve_refs_md = function(content, ref_table, to_md = output_md()) { # replace (\#eq:label) with equation numbers content = add_eq_numbers(content, ids, ref_table, to_md) - # look for \@ref(label) and resolve to actual figure/table/section numbers - m = gregexpr('(???' } - # equation references should include paratheses + az <- magyar_article(num[aref]) + # equation references should include parentheses i = grepl('^eq:', ref) num[i] = paste0('(', num[i], ')') res = sprintf('%s', ref, num) + res[aref] <- paste(az, res[aref]) # do not add relative links to equation numbers in ePub/Word (not implemented) ifelse(backslash & i, num, res) } diff --git a/R/latex.R b/R/latex.R index 78e7c39bb..f73dcbe85 100644 --- a/R/latex.R +++ b/R/latex.R @@ -109,12 +109,12 @@ tufte_book2 = function(...) { resolve_refs_latex = function(x) { # equation references \eqref{} x = gsub( - '(?