Skip to content

Commit

Permalink
make note about quarto inline referencing
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Sep 4, 2024
1 parent be8432a commit 70ae5a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
10 changes: 6 additions & 4 deletions R/Eqn.R
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,10 @@ Eqn_size <- function(string, size = 0){
#' \code{ref{}} provides for inline references to equations in a document.
#' Depending on the output type this function will provide the correct
#' inline wrapper for MathJax or LaTeX equations. This provides more
#' consistent referencing when switching between HTML and PDF outputs.
#' consistent referencing when switching between HTML and PDF outputs. Note
#' that for documents build with Quarto this approach is not supported; hence,
#' referencing of equations must be done with the "@eq-name" approach in-text.
#'
#'
#' @param label the equation label used within \code{\link{Eqn}} or
#' defined explicitly in the document
Expand All @@ -340,10 +343,9 @@ Eqn_size <- function(string, size = 0){
#' ref('eq:einstein', parentheses=FALSE)
#' ref('eq:einstein', html_output=TRUE)
#'
#' # with Quarto
#' # With Quarto, however, the "@" syntax must be used
#' Eqn('e = mc^2', label='eq-einstein', quarto=TRUE)
#' ref('eq-einstein', quarto=TRUE)
#' ref('eq-einstein', quarto=TRUE, parentheses=FALSE)
#' # In text: "As seen in @eq-einstein ..."
#'
ref <- function(label,
html_output = knitr::is_html_output(),
Expand Down
9 changes: 5 additions & 4 deletions man/Eqn.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 70ae5a7

Please sign in to comment.