From c81043bd6d342adbf056162834758b7f941d312a Mon Sep 17 00:00:00 2001 From: Abhraneel Sarma Date: Fri, 1 Nov 2024 17:00:16 -0500 Subject: [PATCH] make it possible to customize the knitting environment via knit_global(envir) (#2358) Co-authored-by: Yihui Xie --- DESCRIPTION | 2 +- NEWS.md | 2 ++ R/utils.R | 19 ++++++++++--------- man/knit_global.Rd | 19 +++++++++---------- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 70699d0e0f..3dbfa3d5f5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: knitr Type: Package Title: A General-Purpose Package for Dynamic Report Generation in R -Version: 1.48.7 +Version: 1.48.8 Authors@R: c( person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), person("Abhraneel", "Sarma", role = "ctb"), diff --git a/NEWS.md b/NEWS.md index 9430600b6a..6857d0ed1d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,8 @@ - Added support for `fig.alt` for LaTeX output, i.e., using `\includegraphics[alt={alt text}]` (thanks, @capnrefsmmat, #2378). +- The environment in which code chunks are evaluated can be changed by passing a custom environment to `knit_glbal()` now (thanks, @abhsarma, #2358). + ## BUG FIXES - In-chunk references of the form `<