* Increment version number to 0.4.3 * chore: add cran comments * Fix indents and invisible characters (GitHub Actions) * Re-build README.Rmd (GitHub Actions) * Re-build index.Rmd (GitHub Actions) * chore: urlchecker::url_update() * chore: align and register s3 print methods * tests: Update and fix tests * docs: update link in thanks --------- Co-authored-by: gadenbuie <gadenbuie@users.noreply.github.com>tags/v0.4.3
| @@ -13,7 +13,7 @@ README.html | |||
| .history/ | |||
| # Directories that start with _ | |||
| _*/ | |||
| /_*/ | |||
| ## https://github.com/github/gitignore/blob/master/R.gitignore | |||
| # History files | |||
| @@ -1,7 +1,7 @@ | |||
| Type: Package | |||
| Package: xaringanthemer | |||
| Title: Custom 'xaringan' CSS Themes | |||
| Version: 0.4.2.9000 | |||
| Version: 0.4.3 | |||
| Authors@R: | |||
| person("Garrick", "Aden-Buie", , "garrick@adenbuie.com", role = c("aut", "cre"), | |||
| comment = c(ORCID = "0000-0002-7111-0077")) | |||
| @@ -1,5 +1,7 @@ | |||
| # Generated by roxygen2: do not edit by hand | |||
| S3method(print,google_font) | |||
| S3method(print,xaringanthemer_default) | |||
| export(apply_alpha) | |||
| export(choose_dark_or_light) | |||
| export(darken_color) | |||
| @@ -1,4 +1,4 @@ | |||
| # xaringanthemer (development version) | |||
| # xaringanthemer 0.4.3 | |||
| - Update the spelling of `colour` for compatibility with ggplot2 >= 3.5.1 (@teunbrand #79). | |||
| @@ -1,4 +1,3 @@ | |||
| #' A Plot Theme for ggplot2 by xaringanthemer | |||
| #' | |||
| #' @description | |||
| @@ -61,7 +61,7 @@ list2css <- function(css) { | |||
| if (is.null(names(css))) { | |||
| stop("All elements in `css` list must be named", call. = FALSE) | |||
| } | |||
| if (purrr::vec_depth(css) != 3) { | |||
| if (purrr::pluck_depth(css) != 3) { | |||
| stop(str_wrap( | |||
| "`css` list must be a named list within a named list, e.g.:\n", | |||
| ' list(".class-id" = list("css-property" = "value"))' | |||
| @@ -22,6 +22,7 @@ xaringanthemer_font_default <- function(font_arg) { | |||
| x | |||
| } | |||
| print.xaringanthemer_default <- function(x) { | |||
| #' @export | |||
| print.xaringanthemer_default <- function(x, ...) { | |||
| print(unclass(x)) | |||
| } | |||
| @@ -101,7 +101,8 @@ google_language_codes <- function( | |||
| unique(match.arg(language_codes, several.ok = TRUE)) | |||
| } | |||
| print.google_font <- function(x) { | |||
| #' @export | |||
| print.google_font <- function(x, ...) { | |||
| cat( | |||
| "Family: ", | |||
| x$family, | |||
| @@ -24,7 +24,7 @@ library(xaringanthemer) | |||
| [](https://gadenbuie.r-universe.dev) | |||
| [](https://lifecycle.r-lib.org/articles/stages.html) | |||
| [](https://github.com/gadenbuie/xaringanthemer/actions) | |||
| [](https://codecov.io/github/gadenbuie/xaringanthemer) | |||
| [](https://app.codecov.io/github/gadenbuie/xaringanthemer) | |||
| <!-- badges: end --> | |||
| ```{r child="man/fragments/_tagline-gif.Rmd"} | |||
| @@ -13,7 +13,7 @@ badge](https://gadenbuie.r-universe.dev/badges/xaringanthemer)](https://gadenbui | |||
| stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) | |||
| [](https://github.com/gadenbuie/xaringanthemer/actions) | |||
| [](https://codecov.io/github/gadenbuie/xaringanthemer) | |||
| [](https://app.codecov.io/github/gadenbuie/xaringanthemer) | |||
| <!-- badges: end --> | |||
| Give your [xaringan](https://github.com/yihui/xaringan) slides some | |||
| @@ -40,6 +40,6 @@ remotes::install_github("gadenbuie/xaringanthemer") | |||
| ## Features | |||
| There’s a lot more that **xaringanthemer** can do\! [Discover | |||
| There’s a lot more that **xaringanthemer** can do! [Discover | |||
| xaringanthemer’s | |||
| features.](https://pkg.garrickadenbuie.com/xaringanthemer/articles/xaringanthemer.html) | |||
| @@ -0,0 +1,5 @@ | |||
| ## R CMD check results | |||
| 0 errors | 0 warnings | 0 note | |||
| This is a minor maintenance release to address changes in ggplot2. | |||
| @@ -103,7 +103,7 @@ ggplot(diamonds) + | |||
| **xaringanthemer** is <kbd>Tab</kbd> friendly – [use autocomplete to | |||
| explore](#theme-settings) the [template | |||
| variables](vignettes/template-variables.md) that you can adjust in each | |||
| of the themes\! | |||
| of the themes! | |||
| <img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example-rstudio-completion.gif" alt="Demonstration of argument auto-completion with RStudio" data-external="1" /> | |||
| @@ -113,13 +113,11 @@ You can also skip the above and just create a *Ninja Themed | |||
| Presentation* from the New R Markdown Document menu in RStudio. | |||
| <center> | |||
| <img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/rmarkdown-template-screenshot.png" alt="The 'New R Markdown Document' menu in RStudio" data-external="1" /> | |||
| </center> | |||
| ## Features | |||
| There’s a lot more that **xaringanthemer** can do\! [Discover | |||
| There’s a lot more that **xaringanthemer** can do! [Discover | |||
| xaringanthemer’s | |||
| features.](https://pkg.garrickadenbuie.com/xaringanthemer/articles/xaringanthemer.html) | |||
| @@ -5,8 +5,8 @@ | |||
| **xaringanthemer** was built by [Garrick Aden-Buie](https://www.garrickadenbuie.com) ([@grrrck](https://twitter.com/grrrck)). | |||
| Big thank you to [Yihui Xie](https://yihui.org), especially for [xaringan]. | |||
| Also thanks to [Ole Petter Bang](http://www.gnab.org/) for [remark.js][remarkjs]. | |||
| Big thank you to [Yihui Xie](https://yihui.org/), especially for [xaringan]. | |||
| Also thanks to [Ole Petter Bang](https://gnab.org/) for [remark.js][remarkjs]. | |||
| Feel free to [file an issue](https://github.com/gadenbuie/xaringanthemer/issues) | |||
| Feel free to [file an issue](https://github.com/gadenbuie/xaringanthemer/issues) | |||
| if you find a bug or have a theme suggestion -- or better yet, submit a pull request! | |||
| @@ -0,0 +1,9 @@ | |||
| # printing google_font works | |||
| Code | |||
| google_font("Josefin Sans", "400", "400i", "600i", "700") | |||
| Output | |||
| Family: Josefin Sans | |||
| Weights: 400,400i,600i,700 | |||
| URL: https://fonts.googleapis.com/css?family=Josefin+Sans:400,400i,600i,700&display=swap | |||
| @@ -265,7 +265,7 @@ test_that("theme_xaringan_restore_defaults() restores defaults", { | |||
| expect_equal(res$after_set$line_colour, "#0088ff") | |||
| expect_equal(res$after_set$bar_fill, "#FF8800") | |||
| expect_equal(res$after_restore$line_colour, res$original$colour) | |||
| expect_equal(res$after_restore$bar_fill, res$original$fil) | |||
| expect_equal(res$after_restore$bar_fill, res$original$fill) | |||
| }) | |||
| describe("theme_xaringan_get_value()", { | |||
| @@ -1,4 +1,3 @@ | |||
| test_that("element_description", { | |||
| text_in <- c("multiple", NA, "", ".remark-slide-content", "h1", "pre, code") | |||
| text_out <- c( | |||
| @@ -1,4 +1,3 @@ | |||
| test_that("style_xaringan() writes to specified outfile", { | |||
| tmpfile <- tempfile(fileext = ".css") | |||
| expect_equal(style_xaringan(outfile = tmpfile), tmpfile) | |||
| @@ -1,4 +1,3 @@ | |||
| test_theme_file <- function(theme = "duo", theme_file = paste0(theme, ".css"), ...) { | |||
| local_edition(2) | |||
| on.exit(local_edition(3)) | |||
| @@ -12,7 +12,7 @@ knitr::opts_chunk$set( | |||
| collapse = TRUE, | |||
| warning = FALSE, | |||
| comment = "#>", | |||
| fig.width = 6, | |||
| fig.width = 6, | |||
| fig.height = 4 | |||
| ) | |||
| ``` | |||
| @@ -100,8 +100,8 @@ changes the colors and fonts of your plot theme. | |||
| ```{r ggplot2-demo-1, out.width = "48%", fig.show="hide"} | |||
| library(ggplot2) | |||
| g_base <- ggplot(mpg) + | |||
| aes(hwy, cty) + | |||
| g_base <- ggplot(mpg) + | |||
| aes(hwy, cty) + | |||
| geom_point() + | |||
| labs(x = "Highway MPG", y = "City MPG", title = "Fuel Efficiency") | |||
| @@ -285,10 +285,10 @@ In our demo theme, we used `style_mono_accent()` with | |||
| - `header_font_google = google_font("Oleo Script")`. | |||
| ```{r text demo, fig.width = 10} | |||
| g_diamonds_with_text <- | |||
| g_diamonds + | |||
| g_diamonds_with_text <- | |||
| g_diamonds + | |||
| geom_text(aes(y = ..count.., label = format(..count.., big.mark = ",")), | |||
| vjust = -0.30, size = 8, stat = "count") + | |||
| vjust = -0.30, size = 8, stat = "count") + | |||
| labs(x = "Cut", y = "Count") | |||
| g_diamonds_with_text + theme_xaringan() | |||
| @@ -346,7 +346,7 @@ in the xaringanthemer package. | |||
| ```{r eval=FALSE} | |||
| font_url <- file.path( | |||
| "https://fontlibrary.org/assets/fonts/glacial-indifference/", | |||
| "5f2cf277506e19ec77729122f27b1faf/0820b3c58fed35de298219f314635982", | |||
| "5f2cf277506e19ec77729122f27b1faf/0820b3c58fed35de298219f314635982", | |||
| "GlacialIndifferenceRegular.ttf" | |||
| ) | |||