R/srcrefs.R

Defines functions rmSrcrefs

Documented in rmSrcrefs

#' Remove srcrefs
#'
#' @param items A [LaTeX2] object, or any other list of [LaTeX2item]s.
#'
#' @returns The `items` with source references removed.
#' @export
rmSrcrefs <- function(items) {
  attr(items, "srcref") <- NULL
  if (is.list(items)) {
    attrs <- attributes(items)
    items <- lapply(items, rmSrcrefs)
    attributes(items) <- attrs
  }
  items
}

Try the parseLatex package in your browser

Any scripts or data that you put into this service are public.

parseLatex documentation built on June 8, 2025, 10:19 a.m.