GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - r-lib/marquee: Markdown Parser and Renderer for R Graphics

BranchesTags
Open more actions menu

Latest commit

 

History

210 Commits
210 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
R
R
 
 
man
man
 
 
revdep
revdep
 
 
src
src
 
 
tests
tests
 
 
vignettes
vignettes
 
 
.Rbuildignore
.Rbuildignore
 
 
.gitignore
.gitignore
 
 
DESCRIPTION
DESCRIPTION
 
 
LICENSE
LICENSE
 
 
LICENSE.md
LICENSE.md
 
 
LICENSE.note
LICENSE.note
 
 
NAMESPACE
NAMESPACE
 
 
NEWS.md
NEWS.md
 
 
README.Rmd
README.Rmd
 
 
README.md
README.md
 
 
_pkgdown.yml
_pkgdown.yml
 
 
air.toml
air.toml
 
 
codecov.yml
codecov.yml
 
 
cran-comments.md
cran-comments.md
 
 

Repository files navigation

marquee

R-CMD-check CRAN status Codecov test coverage

marquee is a markdown parser and renderer for the R graphics engine. It can be used to render rich text formatted as markdown (CommonMark) inside R graphics such as ggplot2 or other graphics built on grid.

Installation

# You can install marquee from CRAN
install.packages("marquee")

# Or get the development version from Github using pak
pak::pak("r-lib/marquee")

Examples

The main function of the package is marquee_grob() which creates a grob based on markdown text and a style that can be rendered with grid:

# Let's render this readme
readme <- paste(readLines("README.Rmd")[-seq_len(17)], collapse = "\n")

library(marquee)
library(grid)

fancy_style <- classic_style(
  body_font = "baskerville",
  header_font = "marker felt",
  code_font = "fira code"
) |>
  modify_style("cb", background = linearGradient(
    colours = c("lightblue", "white"),
    x1 = 0, y1 = 1, x2 = 0, y2 = 0
  ))
grob <- marquee_grob(readme, style = fancy_style)
grid.draw(grob)

(The above is an image – go ahead and check)

Prior art

I would be remiss to not mention gridtext and ggtext, both by Claus Wilke. These packages aim to solve much the same problem as marquee, but work in a different way and don’t have the same powerful textshaping backend as marquee. Most notably from a user perspective is perhaps that gridtext understands HTML to some degree, whereas marquee is oblivious to both HTML and CSS. Instead, it supports the full CommonMark spec with the plan to add support for custom span elements as well.

About

Markdown Parser and Renderer for R Graphics

marquee.r-lib.org

Resources

Readme

Code of conduct

Code of conduct
Activity
Custom properties

Stars

98 stars

Watchers

5 watching

Forks

11 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.