text,
style = classic_style(),
ignore_html = TRUE,
+ force_body_margin = FALSE,
x = 0,
y = 1,
width = NULL,
@@ -111,6 +112,11 @@ ArgumentsRendering style
Margin collapsing
Margin calculations follows the margin collapsing rules of HTML. Read more
-about these at mdn
+about these at mdn.
+Margin collapsing means that elements with margin set to 0 might end up with
+a margin. Specifically for the body element this can be a problem if you want
+to enforce a tight box around your text. Because of this the
+force_body_margin
argument allows you to overwrite the margins
+for the body element with the original values after collapsing has been
+performed.
Underline and strikethrough
Underlines are placed 0.1em below the baseline of the text. Strikethrough are
placed 0.3em above the baseline. The width of the line is set to 0.075em. It
diff --git a/dev/search.json b/dev/search.json
index b4acd80..2b10a35 100644
--- a/dev/search.json
+++ b/dev/search.json
@@ -1 +1 @@
-[{"path":[]},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement codeofconduct@posit.co. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://marquee.r-lib.org/dev/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 marquee authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"requirements","dir":"Articles","previous_headings":"","what":"Requirements","title":"marquee","text":"start note marquee build future. mean based slew new features R graphics engine putting hard requirements R version can used graphics devices works . , reason, setup accommodate needs can perhaps get way using gridtext/ggtext. nuisance likely diminish completely disappear time.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"an-example","dir":"Articles","previous_headings":"","what":"An example","title":"marquee","text":"small example can see markdown behaves ’d expect. emphasis, strong, underline, strikethrough, stuff like headings etc. fact, full markdown (CommonMark) spec supported behave ’d expect. Besides standard grob arguments ’d expect, marquee_grob() takes two main arguments can see . text, can character vector multiple separate markdown strings, style specification, can vector styles single style format everything alike. Marquee ships classic_style() designed mimic look standard HTML rendered markdown. function allows modify final style, also modify construction create completely new style: Besides standard markdown, marquee also allows create custom span classes. span classes can styled anything, marquee contains nifty feature , class matches recognized color name hex-code, automatically coloured. provide styling custom class takes precedence matching color name","code":"md_text <- \"# Lorem Ipsum Lorem ipsum dolor sit amet, *consectetur* adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna **aliqua**. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo _consequat_. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla ~pariatur~. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\" grob <- marquee_grob(md_text, classic_style()) grid.draw(grob) new_style <- classic_style(body_font = \"serif\", header_font = \"mono\", hanging = em(1)) new_style <- modify_style( new_style, \"str\", background = \"lightgrey\", border_radius = 3, padding = trbl(em(0.2)) ) grid.draw( marquee_grob(md_text, new_style) ) md_text_custom <- \"# Lorem Ipsum Lorem ipsum dolor {.red sit amet, *consectetur* adipiscing elit, sed do} eiusmod tempor incididunt ut labore et dolore magna **aliqua**. Ut enim ad minim {#2af veniam}, quis nostrud exercitation ul lamcolaboris nisi ut aliquip ex ea commodo _consequat_. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla ~pariatur~. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\" grid.draw( marquee_grob(md_text_custom, classic_style()) ) grid.draw( marquee_grob(md_text_custom, modify_style(classic_style(), \"red\", tracking = 400)) )"},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"use-in-ggplot2","dir":"Articles","previous_headings":"","what":"Use in ggplot2","title":"marquee","text":"Recognizing people doesn’t make visualizations directly grid, marquee also contains infrastructure use markdown inside ggplot2 plots. expected functions eventually move ggplot2 proper, package stress tested stay .","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"the-marquee-geom","dir":"Articles","previous_headings":"Use in ggplot2","what":"The marquee geom","title":"marquee","text":"One way use marquee ggplot2 geom_marquee(). supersedes geom_text() geom_label() capabilities, even don’t need plot rich text, styling geom_marquee() much capable: However, main use probably mix italicized, bold, colored fonts labels, marquee makes easy Another use geom, rich text may come play, annotations. Let’s make textbox style add lorem ipsum plot","code":"fancy_font <- classic_style( weight = \"semibold\", features = systemfonts::font_feature( ligatures = c(\"standard\", \"discretionary\"), letters = c(\"stylistic\", \"swash\", \"historical\") ) ) ggplot(mtcars, aes(disp, mpg, label = rownames(mtcars))) + geom_marquee(style = fancy_font, size = 2.5, family = \"spectral\") # You may not have this font cars <- sub(\"(\\\\w+)\", \"{.red ***\\\\1***}\", rownames(mtcars)) cars #> [1] \"{.red ***Mazda***} RX4\" \"{.red ***Mazda***} RX4 Wag\" #> [3] \"{.red ***Datsun***} 710\" \"{.red ***Hornet***} 4 Drive\" #> [5] \"{.red ***Hornet***} Sportabout\" \"{.red ***Valiant***}\" #> [7] \"{.red ***Duster***} 360\" \"{.red ***Merc***} 240D\" #> [9] \"{.red ***Merc***} 230\" \"{.red ***Merc***} 280\" #> [11] \"{.red ***Merc***} 280C\" \"{.red ***Merc***} 450SE\" #> [13] \"{.red ***Merc***} 450SL\" \"{.red ***Merc***} 450SLC\" #> [15] \"{.red ***Cadillac***} Fleetwood\" \"{.red ***Lincoln***} Continental\" #> [17] \"{.red ***Chrysler***} Imperial\" \"{.red ***Fiat***} 128\" #> [19] \"{.red ***Honda***} Civic\" \"{.red ***Toyota***} Corolla\" #> [21] \"{.red ***Toyota***} Corona\" \"{.red ***Dodge***} Challenger\" #> [23] \"{.red ***AMC***} Javelin\" \"{.red ***Camaro***} Z28\" #> [25] \"{.red ***Pontiac***} Firebird\" \"{.red ***Fiat***} X1-9\" #> [27] \"{.red ***Porsche***} 914-2\" \"{.red ***Lotus***} Europa\" #> [29] \"{.red ***Ford***} Pantera L\" \"{.red ***Ferrari***} Dino\" #> [31] \"{.red ***Maserati***} Bora\" \"{.red ***Volvo***} 142E\" ggplot(mtcars) + aes(disp, mpg, label = cars) + geom_marquee() text_box_style <- modify_style( classic_style(base_size = 2), \"body\", padding = skip_inherit(trbl(10)), border_radius = 3 ) ggplot(mtcars) + aes(disp, mpg, label = cars) + geom_marquee(size = 2) + annotate(GeomMarquee, label = md_text, x = 450, y = 35, style = text_box_style, size = 2, fill = \"lightgrey\", width = 0.3, hjust = \"right\", vjust = \"top\" )"},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"the-marquee-element","dir":"Articles","previous_headings":"Use in ggplot2","what":"The marquee element","title":"marquee","text":"Rich text plotted text probably limited use, need really need . Different formatting text surrounds plot. tend treat text rich text want full control styling. Enter element_marquee(), drop-substitute element_text() format style non-plotting text. can seen, defaults let text run long needs without text wrapping. makes alignment behave way element_text(). However, lot text like , certainly want turn feature. setting width. 1 equivalent width area element occupies natural value , can set grid::unit() value wish.","code":"ggplot(mtcars) + aes(disp, mpg, label = cars) + geom_marquee(size = 2) + ggtitle(md_text) + theme(plot.title = element_marquee(size = 9)) ggplot(mtcars) + aes(disp, mpg, label = cars) + geom_marquee(size = 2) + ggtitle(md_text) + theme(plot.title = element_marquee(size = 9, width = 1))"},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"a-bit-about-images","dir":"Articles","previous_headings":"","what":"A bit about images","title":"marquee","text":"Markdown famously supports images ![]() syntax. marquee course (means can put images everywhere ggplot2 wish). Currently, support PNG, JPEG, SVG, latter responsive resizing etc. images can reside online computer — “just work”. image placed inline sized fit height line adjusting width keep correct aspect ratio. image placed , expands fill provided width, width height calculated match aspect ratio image. Compare However, marquee pretty unique trick ’s sleeve compared markdown formats. doesn’t just accept paths images — also accepts R graphic objects (currently grid grobs, ggplot2 plots patchwork plots). works ’d expect:","code":"md_text_fig <- \"# Lorem Ipsum ![](https://cran.r-project.org/Rlogo.svg) Lorem ipsum dolor {.red sit amet, *consectetur* adipiscing elit, sed do} eiusmod tempor incididunt ut labore et dolore magna **aliqua**. Ut enim ad minim {#2af veniam}, quis nostrud exercitation ul lamcolaboris nisi ut aliquip ex ea commodo _consequat_. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla ~pariatur~. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\" grid.draw(marquee_grob(md_text_fig, classic_style())) md_text_fig2 <- \"# Lorem Ipsum ![](https://cran.r-project.org/Rlogo.svg) Lorem ipsum dolor {.red sit amet, *consectetur* adipiscing elit, sed do} eiusmod tempor incididunt ut labore et dolore magna **aliqua**. Ut enim ad minim {#2af veniam}, quis nostrud exercitation ul lamcolaboris nisi ut aliquip ex ea commodo _consequat_. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla ~pariatur~. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\" grid.draw(marquee_grob(md_text_fig2, classic_style())) p <- ggplot(mtcars) + geom_histogram(aes(x = gear)) md_text_plot <- \"# Lorem Ipsum ![](p) Lorem ipsum dolor {.red sit amet, *consectetur* adipiscing elit, sed do} eiusmod tempor incididunt ut labore et dolore magna **aliqua**. Ut enim ad minim {#2af veniam}, quis nostrud exercitation ul lamcolaboris nisi ut aliquip ex ea commodo _consequat_. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla ~pariatur~. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\" grid.draw(marquee_grob(md_text_plot, classic_style())) #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`."},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"a-bit-about-tables","dir":"Articles","previous_headings":"","what":"A bit about tables","title":"marquee","text":"table markdown syntax supported marquee. However, can still include tables marquee, much styling support standard markdown table syntax provide. magic extension talked . point, gt table objects recognized valid objects image tag path can thus included directly output. show power table specification taken gt introduction: vignette rendered older version gt support converting gt objects gtables. see “missing grob” example support still somewhat experimental gt--grob conversion getting build . gt features rely HTML formatting still end looking weird, standard table inclusion works expected.","code":"library(gt) airquality_m <- airquality[1:10, ] airquality_m$Year <- 1973L table <- gt(airquality_m) table <- tab_header(table, title = \"New York Air Quality Measurements\", subtitle = \"Daily measurements in New York City (May 1-10, 1973)\" ) table <- tab_spanner(table, label = \"Time\", columns = c(Year, Month, Day) ) table <- tab_spanner(table, label = \"Measurement\", columns = c(Ozone, Solar.R, Wind, Temp) ) md_text_table <- \"# Lorem Ipsum Below we have a table created with gt ![](table) *Such tables, much cells*\" grid.draw(marquee_grob(md_text_table, classic_style()))"},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"wrapping-up","dir":"Articles","previous_headings":"","what":"Wrapping up","title":"marquee","text":"give enough overview get started. Marquee Style Marquee Syntax vignettes provides bit detail respective areas need dive deeper.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_style.html","id":"a-slightly-less-cascading-style-specification","dir":"Articles","previous_headings":"","what":"A slightly less cascading style specification","title":"Marquee Styling","text":"HTML CSS take care styling , years morphed sprawling powerful language ’s . complicated support something like marquee, complicated needed styling markdown (’s main goal style full webpages, documents). Marquee instead defines ’s limited styling system simple enough reason , powerful enough support needed markdown text. Many concepts borrowed CSS used feel pretty much home.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_style.html","id":"styles","dir":"Articles","previous_headings":"A slightly less cascading style specification","what":"Styles","title":"Marquee Styling","text":"marquee, style defines full specification element (block span) visually appear. holds 23 different settings concerning everything font rendering, spacing, coloring, alignment. Rather going , ’ll point towards documentation style() function. span block elements takes style specifications, settings apply block elements ignored spans. lineheight, align, indent, hanging, margin, bullets, img_asp.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_style.html","id":"style-sets","dir":"Articles","previous_headings":"A slightly less cascading style specification","what":"Style sets","title":"Marquee Styling","text":"style set collection styles, style related specific type element. need provide style elements text, elements doesn’t need complete. hard requirement contains complete style named base, everything else can derived. marquee ships style set called classic_style() aims mimic standard look rendered markdown. New style sets can either build ground based classic_style().","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_style.html","id":"inheritance","dir":"Articles","previous_headings":"A slightly less cascading style specification","what":"Inheritance","title":"Marquee Styling","text":"Marquee uses simple inheritance model ’s styling, can boiled single short sentance: element inherits unspecified ’s parent element. setting style object set NULL inherited parent way base style (reason style must complete). example, let’s look style em element classic_style(): thing touches italic setting, everything else borrowed whatever element placed . two ways influence style inheritance. first one wrapping value skip_inherit(). instruct marquee inherit value one level hierarchy rather direct parent (parent parent also set skip_inherit() moves yet another level, ). second one wrapping numeric value relative() instruct marquee use relative value multiplier applied parent.","code":"classic_style()[[1]]$em #> #> italic: TRUE"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_style.html","id":"sizing","dir":"Articles","previous_headings":"A slightly less cascading style specification","what":"Sizing","title":"Marquee Styling","text":"sizes style (big)points (distinction bigpoints points rather small boring. Bigpoints 1/72 inches, use). Instead setting style setting directly numeric value, can make relative font size style using em(). beneficial e.g. padding, margin, indent, etc. often want scale font size. case set size em value, relative ’s parent effectively equivalent using relative(). variant em values called rem() (root em). Instead making setting relative size current element makes relative size base element document.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_style.html","id":"side-values","dir":"Articles","previous_headings":"A slightly less cascading style specification","what":"Side values","title":"Marquee Styling","text":"style three settings relates four sides box. margin, padding, border_size. set values constructed trbl(), works like margin settings CSS. provide 1 value set sides value. provide two values set top bottom first left right second. provide three values set top first, left right second, bottom third. provide four values set top first, right second, bottom third, left fourth (bold first letters gives clue constructor named ).","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"markdown-vs-commonmark","dir":"Articles","previous_headings":"","what":"Markdown vs CommonMark","title":"Marquee Syntax","text":"used two different names discuss syntax marquee adheres . Markdown original specification developed John Gruber Aaron Swartz 2004. spec intentionally vague ambiguous led divergence different parsers handled edge cases. CommonMark developed tackle bringing forth stringent internally consistent syntax parsers develop . top CommonMark, various entities build flavour extended syntax, well-known perhaps GitHub flavoured markdown (GFM). Marquee CommonMark compliant, meaning adheres specific syntax interpretation CommonMark defined. , like GFM, marquee provides ’s additions syntax, overlapping flavours, uniquely ’s . following use name “Markdown” refer CommonMark syntax.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"standard-markdown-syntax","dir":"Articles","previous_headings":"","what":"Standard Markdown syntax","title":"Marquee Syntax","text":"Markdown can thought way naturally mark text belonging various stylistic contextual elements. favors ease reading writing ’s raw representation flexibility, cover almost standard needs text formatting (document written markdown). elements can marked broadly falls two buckets: Block elements span elements.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"block-elements","dir":"Articles","previous_headings":"Standard Markdown syntax","what":"Block elements","title":"Marquee Syntax","text":"block element element contains completed content, sense two following blocks contextually separated. block can contain blocks inside , raw text.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"paragraphs-p","dir":"Articles","previous_headings":"Standard Markdown syntax > Block elements","what":"Paragraphs (p)","title":"Marquee Syntax","text":"basic block element paragraph. paragraph run text another block element. Paragraphs separated two consecutive line breaks. can use single line breaks paragraph wrap text raw format. linebreaks ignored parsing. means text: semantically similar want force linebreak inside paragraph, end line two spaces linebreak. aware code editors strips trailing spaces saving document.","code":"this is the first paragraph this is a second one here we add linebreaks because we want the raw text to have a certain width here we add linebreaks because we want the raw text to have a certain width"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"headers-h1-h6","dir":"Articles","previous_headings":"Standard Markdown syntax > Block elements","what":"Headers (h1-h6)","title":"Marquee Syntax","text":"Markdown supports six levels headers. can defined one two ways: last style supports level 1 2, visually pronounced raw encoding.","code":"# Header 1 ## Header 2 ### Header 3 #### Header 4 ##### Header 5 ###### Header 6 Header 1 ======== Header 2 --------"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"block-quotes-bq","dir":"Articles","previous_headings":"Standard Markdown syntax > Block elements","what":"Block quotes (bq)","title":"Marquee Syntax","text":"block quote semantically paragraph wish highlight way. can contain blocks inside part block. created using email-style quoting","code":"> This is a block quote > > It contains two paragraphs"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"code-blocks-cb","dir":"Articles","previous_headings":"Standard Markdown syntax > Block elements","what":"Code blocks (cb)","title":"Marquee Syntax","text":"code block intended hold unparsed text (often code). markdown inside codeblock ignored shown -. means code block contain child blocks way specify . Code blocks created either indenting everything 4 spaces, enclosing text ```, e.g. ","code":"This is a paragraph This is a code block # This will not be converted to a header new paragraph This is a paragraph ``` This is a code block # This will not be converted to a header ``` new paragraph"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"lists-ul-ol-and-li","dir":"Articles","previous_headings":"Standard Markdown syntax > Block elements","what":"Lists (ul, ol, and li)","title":"Marquee Syntax","text":"Lists markdown comes two flavors: Unordered ordered. Ordered lists can created using either *, -, + bullet, ordered using number followed either . ). styles semantically equivalent taste choose. Depending whether empty line consecutive elements list might considered tight defines styled parser List items can child blocks, either multiple paragraph block elements Ordered lists care number first item. remaining item numbers inspected. means list semantically equivalent first number, however instructs renderer start numbering ","code":"* This is an unordered list * It has a second bullet point 1. This is an ordered list 2. next item # Tight - This is - a tight - list # Untight - This is - so untight - I can't even * First list item * Second one This contains a second paragraph. It must be indented > We could even add a block quote * Third item contains a sub list 1. let's make it ordered 2. and tight 1. item one 2. item two 3. item three 1. item one 9. item two 4. item three 5. This list starts counting from 5 6. and so on 1. This will be item 7 despite what we wrote"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"horizontal-rulers-hr","dir":"Articles","previous_headings":"Standard Markdown syntax > Block elements","what":"Horizontal rulers (hr)","title":"Marquee Syntax","text":"Last block items horizontal rulers. demarcate break two blocks can created using three asterisks (*) hyphens (-), optionally spacing , line, e.g. ","code":"* * * -------------------------"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"span-elements","dir":"Articles","previous_headings":"Standard Markdown syntax","what":"Span elements","title":"Marquee Syntax","text":"Span elements elements break flow text considered “inline”. classic example marking text emphasized (often rendered italicized). wouldn’t expect element break new line, rather keep flow.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"emphasize-em","dir":"Articles","previous_headings":"Standard Markdown syntax > Span elements","what":"Emphasize (em)","title":"Marquee Syntax","text":"add emphasis text, wrap single asterisk (*) either side. Classic markdown also allows use underscore (_), many flavors (marquee included), repurposed thus doesn’t work. emphasis often styled italic, given emphasis considered semantic rather stylistic.","code":"Within this line of text we add *emphasis* on one word"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"strong-str","dir":"Articles","previous_headings":"Standard Markdown syntax > Span elements","what":"Strong (str)","title":"Marquee Syntax","text":"give part text weight can wrap two asterisks either side. Like emphasis , semantic, often equates rendering text bold","code":"I'm making a **strong** point here"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"link-a","dir":"Articles","previous_headings":"Standard Markdown syntax > Span elements","what":"Link (a)","title":"Marquee Syntax","text":"links rather useless marquee intended raster rendering, syntax supported often result slightly different (though unclickable) rendering style. Links created using following syntax Links can also created enclosing URL <>, e.g. case url used text well","code":"[link text](link-url) "},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"code-code","dir":"Articles","previous_headings":"Standard Markdown syntax > Span elements","what":"Code (code)","title":"Marquee Syntax","text":"Inline code, like code blocks render content -. code span created enclosing text single back-tick (`)","code":"This text has some fancy code in it `six <- 1 + 5`, right?"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"images-img","dir":"Articles","previous_headings":"Standard Markdown syntax > Span elements","what":"Images (img)","title":"Marquee Syntax","text":"Images included text using link-like syntax, prepended exclamation mark: title/alt-text ignored marquee reasons links useless, can used make raw text easy understand. standard markdown expect image path point file system, marquee can also name graphic object environment. example, created plot ggplot2 saved p variable, can insert markdown document simply adding images semantically span elements, marquee treat images resides line (surrounded empty lines) block element.","code":"![Image title](image-path) ![](p)"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"markdown-extensions","dir":"Articles","previous_headings":"","what":"Markdown extensions","title":"Marquee Syntax","text":"Apart base syntax described , marquee allows additional features:","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"underline-u","dir":"Articles","previous_headings":"Markdown extensions","what":"Underline (u)","title":"Marquee Syntax","text":"can underline run text enclosing underscore. Note feature means classic use underscore alias asterisk emphasizing text longer works. Note emphasis semantic, underline much stylistic mark","code":"We will _underline_ a word"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"strikethrough-del","dir":"Articles","previous_headings":"Markdown extensions","what":"Strikethrough (del)","title":"Marquee Syntax","text":"want give appearance something deleted, can enclose tilde (~)","code":"I'm sure this is ~good~ better"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"custom-spans","dir":"Articles","previous_headings":"Markdown extensions","what":"Custom spans","title":"Marquee Syntax","text":"Marquee ’s style custom span elements, need style text run special way. created enclosing text {.name }, give enclosed text name style (render). aware preceding dot removed span element name. Alternatively can use {#name }, give enclosed text #name style (note hash stripped span element name).","code":"Sometimes my text is so {.stylish eloquent} that the basic markdown elements are not enough"},{"path":[]},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"escaping-syntax","dir":"Articles","previous_headings":"Miscellaneous","what":"Escaping syntax","title":"Marquee Syntax","text":"can see , small set characters holds special meaning markdown (even holds multiple meanings). : \\, `, *, _, ~, {, }, [, ], (, ), #, +, -, ., !. Using run risk text interpreted ways intent. wish include one characters -, can escape using \\, instruct parser ignore formatting may deduced character.","code":"I just like \\*asterisks\\* around words"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"where-is-my-html-support","dir":"Articles","previous_headings":"Miscellaneous","what":"Where is my HTML-support?","title":"Marquee Syntax","text":"seassoned markdown user may accustomed mixing HTML code markdown text need technical formatting. works markdown passes code unaltered end result HTML, included HTML part final HTML document. However, HTML part markdown, marquee simply pass . Since parsed text rendered HTML means HTML code include visible ’s raw format.","code":""},{"path":"https://marquee.r-lib.org/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Thomas Lin Pedersen. Author, maintainer. Martin Mitáš. Author. Author MD4C . Copyright holder, funder.","code":""},{"path":"https://marquee.r-lib.org/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Pedersen T, Mitáš M (2024). marquee: Markdown Parser Renderer R Graphics. R package version 0.1.0.9000, https://github.com/r-lib/marquee, https://marquee.r-lib.org.","code":"@Manual{, title = {marquee: Markdown Parser and Renderer for R Graphics}, author = {Thomas Lin Pedersen and Martin Mitáš}, year = {2024}, note = {R package version 0.1.0.9000, https://github.com/r-lib/marquee}, url = {https://marquee.r-lib.org}, }"},{"path":"https://marquee.r-lib.org/dev/index.html","id":"marquee-","dir":"","previous_headings":"","what":"Markdown Parser and Renderer for R Graphics","title":"Markdown Parser and Renderer for R Graphics","text":"marquee markdown parser renderer R graphics engine. can used render rich text formatted markdown (CommonMark) inside R graphics ggplot2 graphics built grid.","code":""},{"path":"https://marquee.r-lib.org/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Markdown Parser and Renderer for R Graphics","text":"","code":"# You can install marquee from CRAN install.packages(\"marquee\") # Or get the development version from Github using pak pak::pak(\"r-lib/marquee\")"},{"path":"https://marquee.r-lib.org/dev/index.html","id":"examples","dir":"","previous_headings":"","what":"Examples","title":"Markdown Parser and Renderer for R Graphics","text":"main function package marquee_grob() creates grob based markdown text style can rendered grid: (image – go ahead check)","code":"# 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)"},{"path":"https://marquee.r-lib.org/dev/index.html","id":"prior-art","dir":"","previous_headings":"","what":"Prior art","title":"Markdown Parser and Renderer for R Graphics","text":"remiss mention gridtext ggtext, Claus Wilke. packages aim solve much problem marquee, work different way don’t powerful textshaping backend marquee. notably user perspective perhaps gridtext understands HTML degree, whereas marquee oblivious HTML CSS. Instead, supports full CommonMark spec plan add support custom span elements well.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/GeomMarquee.html","id":null,"dir":"Reference","previous_headings":"","what":"Geom class for geom_marquee — GeomMarquee","title":"Geom class for geom_marquee — GeomMarquee","text":"underlying Geom class powers geom_marquee() layers.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/GeomMarquee.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Geom class for geom_marquee — GeomMarquee","text":"","code":"GeomMarquee"},{"path":"https://marquee.r-lib.org/dev/reference/classic_style.html","id":null,"dir":"Reference","previous_headings":"","what":"Classic styling for markdown — classic_style","title":"Classic styling for markdown — classic_style","text":"function facilitates construction complete style set based classic look HTML rendered markdown document. contains style specifications supported markdown elements well sub sup style can used subscripts superscript respectively. accessible custom spans (e.g. H{.sub 2}O) markdown provide syntax formats.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/classic_style.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classic styling for markdown — classic_style","text":"","code":"classic_style( base_size = 12, body_font = \"\", header_font = \"\", code_font = \"mono\", ... )"},{"path":"https://marquee.r-lib.org/dev/reference/classic_style.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classic styling for markdown — classic_style","text":"base_size base font size text. sizing based body_font font family use body text header_font font family use headers code_font font family use code code block text ... Arguments passed base_style weight font weight use. Can either number (0, 100, 200, 300, 400, 500, 600, 700, 800, 900) strings (\"undefined\", \"thin\", \"ultralight\", \"light\", \"normal\", \"medium\", \"semibold\", \"bold\", \"ultrabold\", \"heavy\") italic font slanted width font width use. Can either number (``0, 1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`) strings (`\"undefined\"`, `\"ultracondensed\"`, `\"extracondensed\"`, `\"condensed\"`, `\"semicondensed\"`, `\"normal\"`, `\"semiexpanded\"`, `\"expanded\"`, `\"extraexpanded\"`, `\"ultraexpanded\"`) features font_feature object specifying OpenType font features apply font color color font lineheight spacing subsequent lines relative font size. Can relative() case based parent lineheight. align alignment within text. One \"left\", \"center\", \"right\", \"justified-left\", \"justified-center\", \"justified-right\", \"distributed\" tracking Additional character spacing measured 1/1000em. Can relative() case based parent tracking. indent indentation first line paragraph measured points. Can relative() case based parent indent, em() case based font size style, rem() case based font size body element. hanging indentation first line paragraph measured points. Can relative() case based parent hanging, em() case based font size style, rem() case based font size body element. margin margin around element, given call trbl() padding padding around element, given call trbl() background color background fill. background includes padding margin. Can solid color gradient pattern made grid::linearGradient()/grid::radialGradient()/grid::pattern() border color background stroke. background includes padding margin border_size line width background stroke, given call trbl() border_radius corner radius background, given points bullets vector strings use bullets unordered lists. marquee_bullets provides selection underline text underlined strikethrough text strikethrough baseline baseline shift apply text img_asp default aspect ratio block level images provided image ","code":""},{"path":"https://marquee.r-lib.org/dev/reference/classic_style.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Classic styling for markdown — classic_style","text":"style set object","code":""},{"path":"https://marquee.r-lib.org/dev/reference/classic_style.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classic styling for markdown — classic_style","text":"","code":"classic_style(16, \"serif\", \"sans\") #> #> [1] "},{"path":"https://marquee.r-lib.org/dev/reference/element_marquee.html","id":null,"dir":"Reference","previous_headings":"","what":"ggplot2 theme element supporting marquee syntax — element_marquee","title":"ggplot2 theme element supporting marquee syntax — element_marquee","text":"theme element drop-replacement ggplot2::element_text(). works integrating various style settings element base style provided style set. margin given, set body tag skip_inherit(). default width NA meaning span long given text , line wrapping. can set unit make fit within specific width. However, may work expected rotated text (may get lucky). Note may see small shifts visuals going element_text() element_marquee() size reporting may differ two elements.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/element_marquee.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ggplot2 theme element supporting marquee syntax — element_marquee","text":"","code":"element_marquee( family = NULL, colour = NULL, size = NULL, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, color = NULL, margin = NULL, style = NULL, width = NULL, inherit.blank = FALSE )"},{"path":"https://marquee.r-lib.org/dev/reference/element_marquee.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ggplot2 theme element supporting marquee syntax — element_marquee","text":"family font family base style colour, color font colour base style size font size base style hjust Horizontal justification (\\([0, 1]\\)) vjust Vertical justification (\\([0, 1]\\)) angle Angle (\\([0, 360]\\)) lineheight lineheight base style margin margin body tag style style set base rendering width maximum width text. See description caveats inherit.blank element inherit existence element_blank among parents? TRUE existence blank element among parents cause element blank well. FALSE blank parent element ignored calculating final element state.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/element_marquee.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ggplot2 theme element supporting marquee syntax — element_marquee","text":"element_marquee object can used place element_text ggplot2 theme specifications","code":""},{"path":"https://marquee.r-lib.org/dev/reference/element_marquee.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ggplot2 theme element supporting marquee syntax — element_marquee","text":"","code":"library(ggplot2) p <- ggplot(mtcars) + geom_point(aes(mpg, disp)) + labs(title = \"A {.red *marquee*} title\\n* Look at this bullet list\\n\\n* great, huh?\") + theme_gray(base_size = 6) + theme(title = element_marquee()) plot(p) ggplot(mtcars) + geom_histogram(aes(x = mpg)) + labs(title = \"I put a plot in your title so you can plot while you title ![](p) What more could you _possibly_ want?\") + theme(title = element_marquee()) #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`."},{"path":"https://marquee.r-lib.org/dev/reference/geom_marquee.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw text formatted with marquee — geom_marquee","title":"Draw text formatted with marquee — geom_marquee","text":"geom extension geom_text() geom_label() allows draw richly formatted text marquee-markdown format plot. plain text near-drop-replacement geoms except sizing might slightly different. However, using geom able access much powerful font settings available marquee, even might make sense opt geom.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/geom_marquee.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw text formatted with marquee — geom_marquee","text":"","code":"geom_marquee( mapping = NULL, data = NULL, stat = \"identity\", position = \"identity\", ..., size.unit = \"mm\", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE )"},{"path":"https://marquee.r-lib.org/dev/reference/geom_marquee.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw text formatted with marquee — geom_marquee","text":"mapping Set aesthetic mappings created aes(). specified inherit.aes = TRUE (default), combined default mapping top level plot. must supply mapping plot mapping. data data displayed layer. three options: NULL, default, data inherited plot data specified call ggplot(). data.frame, object, override plot data. objects fortified produce data frame. See fortify() variables created. function called single argument, plot data. return value must data.frame, used layer data. function can created formula (e.g. ~ head(.x, 10)). stat statistical transformation use data layer. using geom_*() function construct layer, stat argument can used override default coupling geoms stats. stat argument accepts following: Stat ggproto subclass, example StatCount. string naming stat. give stat string, strip function name stat_ prefix. example, use stat_count(), give stat \"count\". information ways specify stat, see layer stat documentation. position position adjustment use data layer. jointy specified nudge_x nudge_y. can used various ways, including prevent overplotting improving display. position argument accepts following: result calling position function, position_jitter(). string nameing position adjustment. give position string, strip function name position_ prefix. example, use position_jitter(), give position \"jitter\". information ways specify position, see layer position documentation. ... arguments passed layer()'s params argument. arguments broadly fall one 4 categories . Notably, arguments position argument, aesthetics required can passed .... Unknown arguments part 4 categories ignored. Static aesthetics mapped scale, fixed value apply layer whole. example, colour = \"red\" linewidth = 3. geom's documentation Aesthetics section lists available options. 'required' aesthetics passed params. Please note passing unmapped aesthetics vectors technically possible, order required length guaranteed parallel input data. constructing layer using stat_*() function, ... argument can used pass parameters geom part layer. example stat_density(geom = \"area\", outline.type = \"\"). geom's documentation lists parameters can accept. Inversely, constructing layer using geom_*() function, ... argument can used pass parameters stat part layer. example geom_area(stat = \"density\", adjust = 0.5). stat's documentation lists parameters can accept. key_glyph argument layer() may also passed .... can one functions described key glyphs, change display layer legend. size.unit size aesthetic interpreted: millimetres (\"mm\", default), points (\"pt\"), centimetres (\"cm\"), inches (\"\"), picas (\"pc\"). na.rm FALSE, default, missing values removed warning. TRUE, missing values silently removed. show.legend logical. layer included legends? NA, default, includes aesthetics mapped. FALSE never includes, TRUE always includes. can also named logical vector finely select aesthetics display. inherit.aes FALSE, overrides default aesthetics, rather combining . useful helper functions define data aesthetics inherit behaviour default plot specification, e.g. borders().","code":""},{"path":"https://marquee.r-lib.org/dev/reference/geom_marquee.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw text formatted with marquee — geom_marquee","text":"ggplot2 layer can added plot","code":""},{"path":"https://marquee.r-lib.org/dev/reference/geom_marquee.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Draw text formatted with marquee — geom_marquee","text":"Styling text based style set exception standard aesthetics family, size, colour, fill, etc. recognized applied base tag style. default style set (classic_style) can changed using style aesthetic can take vector style sets text can rely style needed. element_marquee(), fill aesthetic treated differently applied base tag, body tag skip_inherit() style propagate fill. Contrary standard text label geoms, geom_marquee() takes width aesthetic can used turn soft wrapping text. default value (NA) lets text run long want's (honoring hard breaks), setting something else instruct marquee use amount space. can use grid units set absolute amount.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/geom_marquee.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Draw text formatted with marquee — geom_marquee","text":"","code":"library(ggplot2) # Standard use p <- ggplot(mtcars, aes(wt, mpg)) p + geom_marquee(aes(label = rownames(mtcars))) # Make use of more powerful font features (note, result may depend on fonts # installed on the system) p + geom_marquee( aes(label = rownames(mtcars)), style = classic_style(weight = \"thin\", width = \"condensed\") ) # Turn on line wrapping p + geom_marquee(aes(label = rownames(mtcars)), width = unit(2, \"cm\")) # Style like label label_style <- modify_style( classic_style(), \"body\", padding = skip_inherit(trbl(4)), border = \"black\", border_size = skip_inherit(trbl(1)), border_radius = 3 ) p + geom_marquee(aes(label = rownames(mtcars), fill = gear), style = label_style) # Use markdown to style the text red_bold_names <- sub(\"(\\\\w+)\", \"{.red **\\\\1**}\", rownames(mtcars)) p + geom_marquee(aes(label = red_bold_names))"},{"path":"https://marquee.r-lib.org/dev/reference/marquee-package.html","id":null,"dir":"Reference","previous_headings":"","what":"marquee: Markdown Parser and Renderer for R Graphics — marquee-package","title":"marquee: Markdown Parser and Renderer for R Graphics — marquee-package","text":"Provides mean parse render markdown text grid along facilities define styling text.","code":""},{"path":[]},{"path":"https://marquee.r-lib.org/dev/reference/marquee-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"marquee: Markdown Parser and Renderer for R Graphics — marquee-package","text":"Maintainer: Thomas Lin Pedersen thomas.pedersen@posit.co (ORCID) Authors: Martin Mitáš (Author MD4C) contributors: Posit Software, PBC [copyright holder, funder]","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_glue.html","id":null,"dir":"Reference","previous_headings":"","what":"Marquee-aware string interpolation — marquee_glue","title":"Marquee-aware string interpolation — marquee_glue","text":"want create markdown programmatically probably want use sort string interpolation glue(). However, custom span syntax marquee interferes standard interpolation syntax glue. function use together.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_glue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Marquee-aware string interpolation — marquee_glue","text":"","code":"marquee_glue( ..., .sep = \"\", .envir = parent.frame(), .open = \"{\", .close = \"}\", .na = \"NA\", .null = character(), .comment = character(), .literal = FALSE, .transformer = NULL, .trim = TRUE ) marquee_glue_data( .x, ..., .sep = \"\", .envir = parent.frame(), .open = \"{\", .close = \"}\", .na = \"NA\", .null = character(), .comment = character(), .literal = FALSE, .transformer = NULL, .trim = TRUE )"},{"path":"https://marquee.r-lib.org/dev/reference/marquee_glue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Marquee-aware string interpolation — marquee_glue","text":"... [expressions] Unnamed arguments taken expression string(s) format. Multiple inputs concatenated together formatting. Named arguments taken temporary variables available substitution. .sep [character(1): ‘\"\"’] Separator used separate elements. .envir [environment: parent.frame()] Environment evaluate expression . Expressions evaluated left right. .x environment, expressions evaluated environment .envir ignored. NULL passed, equivalent emptyenv(). .open [character(1): ‘\\{’] opening delimiter. Doubling full delimiter escapes . .close [character(1): ‘\\}’] closing delimiter. Doubling full delimiter escapes . .na [character(1): ‘NA’] Value replace NA values . NULL missing values propagated, NA result cause NA output. Otherwise value replaced value .na. .null [character(1): ‘character()’] Value replace NULL values . character() whole output character(). NULL NULL values dropped (paste0()). Otherwise value replaced value .null. .comment [character(1): ‘#’] Value use comment character. .literal [boolean(1): ‘FALSE’] Whether treat single double quotes, backticks, comments regular characters (vs. syntactic elements), parsing expression string. Setting .literal = TRUE probably makes sense combination custom .transformer, case glue_col(). Regard argument (especially, name) experimental. .transformer [function] function taking two arguments, text envir, text unparsed string inside glue block envir execution environment. .transformer lets modify glue block , , evaluation, allowing create custom glue()-like functions. See vignette(\"transformers\") examples. .trim [logical(1): ‘TRUE’] Whether trim input template trim() . .x [listish] environment, list, data frame used lookup values.","code":"For `glue_data()`, elements in `...` override the values in `.x`."},{"path":"https://marquee.r-lib.org/dev/reference/marquee_glue.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Marquee-aware string interpolation — marquee_glue","text":"character vector","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_glue.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Marquee-aware string interpolation — marquee_glue","text":"choose different set delimiters \"{\" \"}\" interpolation functions call equivalent glue functions directly. However, keep defaults, functions use custom transformer make sure keep marquee custom span notation. can interpolate content span, well span class (see examples)","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_glue.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Marquee-aware string interpolation — marquee_glue","text":"","code":"# standard use red_text <- \"this text will be red\" marquee_glue(\"This will be black and {.red {red_text}}!\") #> This will be black and {.red this text will be red}! # if the span is not valid it will be treated as standard glue interpolation try( marquee_glue(\"This will be black and {.red}!\") ) #> Error : Failed to evaluate glue component {.red} #> Caused by error: #> ! object '.red' not found # You can interpolate the tag name as well col <- \"green\" marquee_glue(\"This will be black and {.{col} this text will be {col}}!\") #> This will be black and {.green this text will be green}! # Tag name interpolation must follow a `.` or a `#` as these identify the # bracket pair as a custom span class col <- \".yellow\" # This is not what you want probably marquee_glue(\"This will be black and {{col} this text will be {col}}!\") #> This will be black and {col} this text will be .yellow}! # Tag interpolation should also interpolate the full tag and be followed by # a space in order to be valid part <- \"l\" marquee_glue(\"This will be black and {.ye{part}low this text will be {col}}!\") #> This will be black and {.ye{part}low this text will be .yellow}! try( marquee_glue(\"This will be black and {.{part}avender this text will be {col}}!\") ) #> Error in .transformer(expr, env) : #> Malformed marquee interpolation block. When interpolating a tag #> name it must be followed by a space"},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a grob rendering one or more markdown texts — marquee_grob","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"main function marquee. takes vector markdown strings, parses provided style, returns grob capable rendering parsed text rich text (possibly) images. See marquee_parse() information markdown parsed see details information rendering proceeds.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"","code":"marquee_grob( text, style = classic_style(), ignore_html = TRUE, x = 0, y = 1, width = NULL, default.units = \"npc\", hjust = \"left\", vjust = \"top\", angle = 0, vp = NULL, name = NULL )"},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"text Either character vector marquee_parsed object created marquee_parse() style style set classic_style() defines text rendered ignore_html HTML code removed output x, y location markdown text graphics. numeric converted units using default.units width width markdown text. numeric converted units using default.units. NULL equivalent width parent container default.units string giving default units apply x, y, width hjust horizontal justification markdown respect x. Can either numeric one \"left\", \"left-ink\", \"center\", \"center-ink\", \"right-ink\", \"right\" vjust vertical justification markdown respect y. Can either numeric one \"bottom\", \"bottom-ink\", \"last-line\", \"center\", \"center-ink\", \"first-line\", \"top-ink\", \"top\" angle angle rotation (degrees) around x y vp optional viewport assign grob name name grob. NULL unique name generated","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"grob class marquee","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"rendering-style","dir":"Reference","previous_headings":"","what":"Rendering style","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"rendering less adheres styling provided marquee_parse(), intricacies detailed : Tight lists list tight, bottom margin li tag set spacing matches lineheight. , top margin set 0. Block images markdown, image tags span elements can placed inline. However, image tag thing contained inside p tag marquee determines considered block element. case, parent p element inherits styling image element image can e.g. adhere align properties, provide padding. Horizontal rulers elements rendered empty block. standard style sets bottom border size size sides. Margin collapsing Margin calculations follows margin collapsing rules HTML. Read mdn Underline strikethrough Underlines placed 0.1em baseline text. Strikethrough placed 0.3em baseline. width line set 0.075em. inherits color text. styling possible. Spans background Consecutive spans background border settings merged single rectangle. padding span defines size background modify placement glyph (.e. left padding move first glyph away left neighbor). Bullet position Bullets placed, right-aligned, 0.25em left first line li element. Border border radius borders sides drawn one one. case border radius ignored.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"image-rendering","dir":"Reference","previous_headings":"","what":"Image rendering","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"image tag can used place images. support png jpeg images. path instead names grob, ggplot, patchwork object rendered instead. file read, exist, path names object grob, ggplot patchwork, placeholder rendered place (black square red cross). Image sizing standard markdown specifying size images. default, block-level images fill width container maintain aspect ratio. Inline images default width 0.65em height matching aspect ration. However, wish control sizing, can instead provide image grob viewport fixed dimensions, case used long width exceed width container (case get downsized). rastergrob provided without absolute sizing, aspect ratio match raster, otherwise aspect ratio taken styling element (defaults 1.65)","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"table-rendering","dir":"Reference","previous_headings":"","what":"Table rendering","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"marquee support extended table syntax markdown allow include tables output. supporting gt objects valid paths image tags way ggplots etc. meeans can style tables way wish full power gt, much flexible markdown table syntax.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"textbox-justification","dir":"Reference","previous_headings":"","what":"Textbox justification","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"justification options exceeds classic ones provided grid. numeric values available always, number possible text values larger. Horizontal justification add \"left-ink\", \"center-ink\", \"right-ink\" uses left-right-positioned glyph (halfway ) anchors. Vertical justification equivalent \"bottom-ink\", \"center-ink\", \"top-ink\" anchors, also \"first-line\" \"last-line\" sets anchor baseline first last line respectively.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse a text as marquee — marquee_parse","title":"Parse a text as marquee — marquee_parse","text":"marquee uses extension CommonMark support HTML code (rendered verbatim). focus allow easy formatting text graphics, rather fully fledged typesetting. See marquee syntax format.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse a text as marquee — marquee_parse","text":"","code":"marquee_parse(text, style = classic_style(), ignore_html = TRUE)"},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse a text as marquee — marquee_parse","text":"text character string. core quality markdown text valid markdown restrictions content style style set classic_style() defines text rendered ignore_html HTML code removed output","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse a text as marquee — marquee_parse","text":"data frame describing various tokens text style apply . output mainly meant programmatic consumption marquee_grob()","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"marquee-tags","dir":"Reference","previous_headings":"","what":"marquee tags","title":"Parse a text as marquee — marquee_parse","text":"marquee tokenizes input text blocks spans. recognises following tags: Block tags body parent tag markdown document. never contains text , blocks. ul unordered list. contains number li children ol ordered list. contains number li children li list element. list tight contains text directly inside . , text placed inside child p blocks hr horizontal line, spanning width parent block. styling, bottom border size used rendering h1-h6 headings different levels cb code block. Text inside code blocks rendered verbatim, .e. contain children p standard paragraph block. Text separated two line-ends separated separate paragraphs qb quote block. may contain children Span tags em emphasized text span. Often means italicizing text, ultimately renderer str strong text, often rendered bold text link text. marquee rendering allow links, can still rendered particular way code text rendered code. Often uses monospaced font. Text inside span rendered verbatim u text underlined del text strikethrough custom spans marquee specific extension syntax allows make tags fly. See section marquee syntax .","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"marquee-syntax","dir":"Reference","previous_headings":"","what":"marquee syntax","title":"Parse a text as marquee — marquee_parse","text":"marquee uses md4c fully CommonMark compliant markdown parser. CommonMark effort create internally coherent markdown specification, something missing original markdown description. used writing markdown, used CommonMark. list notable additions details specific way marquee handles CommonMark Underlines strikethrough part basic CommonMark spec, underline strikethrough supported marquee using _ ~ (e.g. _underline this_ ~error~). Images Image tags (![image title](path//image)) supported, title ignored. path returned token text. HTML HTML tags ignored, .e. rendered verbatim. different classic markdown rendering except people often convert markdown HTML tags suddenly meaning. carry special significance rendered marquee Custom tags markdown provides necessary standard text markup, situations, especially visualisation, need something . Often users reach inline HTML spans , since HTML fully ignored marquee option. , adding HTML decreases readability unformatted text lot. marquee can create custom span using {.tag } syntax, e.g. {.sm small text} wrap \"small text\" sm tag. can alternatively use {#tag } effect. difference former syntax . stripped tag name, whereas latter # remains part name. See Styling section primal use latter syntax.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"styling","dir":"Reference","previous_headings":"","what":"Styling","title":"Parse a text as marquee — marquee_parse","text":"parsing, token assigned style based provided style set. styling cascading, without intricacies CSS. child element inherits styling parent options set NULL style matching child tag. style element relative() computed based value parent style element. em() elements resolved based size element child style, rem() elements resolved using size element body style. style provided tag, fully inherits style parent. Automatic coloring Recognizing primary use custom tags may change color text, marquee provides shortcut . style found tag provided style set, marquee check tag matches valid color (.e. string grDevices::colors(), valid hex string, e.g. #53f2a9). valid color set font color style. means parsing \"Color {.red } red\" automatically sets color \"\" red, even style provided red tag. Likewise, parsing \"Color {#00FF00 } green\" automatically set color \"\" #00FF00 (fully saturated green).","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"additional-parsing-information","dir":"Reference","previous_headings":"","what":"Additional parsing information","title":"Parse a text as marquee — marquee_parse","text":"Apart splitting text tokens, marquee_parse() also provides additional information useful rendering output expected way. id column refers tokens back original input text, block relates tokens together blocks. Block elements increment block count entered, decrement excited. type column provides type block. indentation column provides node level tree. child block increase indentation long active. ol_index provides number associated ordered list element. tight indicates whether list tight (.e. provided empty lines list elements). ends column indicate row output tag active (.e. tag closed row indicated value column).","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Parse a text as marquee — marquee_parse","text":"","code":"marquee_parse(\"# Header of the example\\nSome body text\", classic_style()) #> # A tibble: 3 × 40 #> text id block type indentation ol_index tight ends size #> #> 1 \"\" 1 1 body 1 0 FALSE 3 12 #> 2 \"Header of the… 1 2 h1 2 0 FALSE 2 27 #> 3 \"Some body tex… 1 3 p 2 0 FALSE 3 12 #> # ℹ 31 more variables: background , color , family , #> # weight , italic , width , features , #> # lineheight , align , tracking , indent , #> # hanging , margin_top , margin_right , #> # margin_bottom , margin_left , padding_top , #> # padding_right , padding_bottom , padding_left , #> # border , border_size_top , border_size_right , …"},{"path":"https://marquee.r-lib.org/dev/reference/style.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a style specification for a single tag — style","title":"Create a style specification for a single tag — style","text":"style() constructs marquee_style object specifying styling single tag. meaning NULL inherit value parent element. follows top parent (body element), must values options. base_style() constructor convenient constructor style sensible defaults options.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a style specification for a single tag — style","text":"","code":"style( family = NULL, weight = NULL, italic = NULL, width = NULL, features = NULL, size = NULL, color = NULL, lineheight = NULL, align = NULL, tracking = NULL, indent = NULL, hanging = NULL, margin = NULL, padding = NULL, background = NULL, border = NULL, border_size = NULL, border_radius = NULL, bullets = NULL, underline = NULL, strikethrough = NULL, baseline = NULL, img_asp = NULL ) base_style( family = \"\", weight = \"normal\", italic = FALSE, width = \"normal\", features = systemfonts::font_feature(), size = 12, color = \"black\", lineheight = 1.6, align = \"left\", tracking = 0, indent = 0, hanging = 0, margin = trbl(0, 0, rem(1)), padding = trbl(0), background = NA, border = NA, border_size = trbl(0), border_radius = 0, bullets = marquee_bullets, underline = FALSE, strikethrough = FALSE, baseline = 0, img_asp = 1.65 )"},{"path":"https://marquee.r-lib.org/dev/reference/style.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a style specification for a single tag — style","text":"family name font family use weight font weight use. Can either number (0, 100, 200, 300, 400, 500, 600, 700, 800, 900) strings (\"undefined\", \"thin\", \"ultralight\", \"light\", \"normal\", \"medium\", \"semibold\", \"bold\", \"ultrabold\", \"heavy\") italic font slanted width font width use. Can either number (``0, 1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`) strings (`\"undefined\"`, `\"ultracondensed\"`, `\"extracondensed\"`, `\"condensed\"`, `\"semicondensed\"`, `\"normal\"`, `\"semiexpanded\"`, `\"expanded\"`, `\"extraexpanded\"`, `\"ultraexpanded\"`) features font_feature object specifying OpenType font features apply font size size font points. Can relative() em() case based parent font size (size equivalent) rem() case based font size body element. color color font lineheight spacing subsequent lines relative font size. Can relative() case based parent lineheight. align alignment within text. One \"left\", \"center\", \"right\", \"justified-left\", \"justified-center\", \"justified-right\", \"distributed\" tracking Additional character spacing measured 1/1000em. Can relative() case based parent tracking. indent indentation first line paragraph measured points. Can relative() case based parent indent, em() case based font size style, rem() case based font size body element. hanging indentation first line paragraph measured points. Can relative() case based parent hanging, em() case based font size style, rem() case based font size body element. margin margin around element, given call trbl() padding padding around element, given call trbl() background color background fill. background includes padding margin. Can solid color gradient pattern made grid::linearGradient()/grid::radialGradient()/grid::pattern() border color background stroke. background includes padding margin border_size line width background stroke, given call trbl() border_radius corner radius background, given points bullets vector strings use bullets unordered lists. marquee_bullets provides selection underline text underlined strikethrough text strikethrough baseline baseline shift apply text img_asp default aspect ratio block level images provided image ","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a style specification for a single tag — style","text":"marquee_style object","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a style specification for a single tag — style","text":"","code":"# A partial style style(color = \"red\", underline = TRUE) #> #> color: red #> underline: TRUE # Full style base_style() #> #> size: 12 #> background: NA #> color: black #> family: #> weight: 400 #> italic: FALSE #> width: 5 #> features: #> lineheight: 1.6 #> align: left #> tracking: 0 #> indent: 0 #> hanging: 0 #> margin_top: 0 #> margin_right: 0 #> margin_bottom: rem(1) #> margin_left: 0 #> padding_top: 0 #> padding_right: 0 #> padding_bottom: 0 #> padding_left: 0 #> border: NA #> border_size_top: 0 #> border_size_right: 0 #> border_size_bottom: 0 #> border_size_left: 0 #> border_radius: 0 #> bullets: •, ◦, ▪, ▫, ‣, ⁃ #> underline: FALSE #> strikethrough: FALSE #> baseline: 0 #> img_asp: 1.65"},{"path":"https://marquee.r-lib.org/dev/reference/style_helpers.html","id":null,"dir":"Reference","previous_headings":"","what":"Helpers for defining styles — style-helpers","title":"Helpers for defining styles — style-helpers","text":"marquee provides small set helpers constructing needed styles. relative() specifies numeric value relative value parent style certain factor, e.g. font size relative(0.5) give style font size half parent. em() specify numeric value relative font size current style. font size 12, indent set em(2), indent equivalent 24. rem() works like em() rather using font size current style uses font size root style (body element). trbl() helps construct styles refers sides rectangle (margin, padding, border size). function names refers order arguments (top, right, bottom, left). skip_inherit() tells style inheritance ignore value look value one stack. marquee_bullets just character vector 6 sensible bullet glyphs unordered lists.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_helpers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helpers for defining styles — style-helpers","text":"","code":"relative(x) em(x) rem(x) trbl(top = NULL, right = top, bottom = top, left = right) skip_inherit(x) marquee_bullets"},{"path":"https://marquee.r-lib.org/dev/reference/style_helpers.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Helpers for defining styles — style-helpers","text":"object class character length 6.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_helpers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helpers for defining styles — style-helpers","text":"x decimal number. vector provided first element used top, right, bottom, left Values sides rectangles. Either numbers modifiers (relative, em, rem)","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_helpers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helpers for defining styles — style-helpers","text":"Objects relevant class","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_helpers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helpers for defining styles — style-helpers","text":"","code":"relative(0.35) #> relative(0.35) em(2) #> em(2) rem(1.2) #> rem(1.2) # Argument default means it recycles like CSS if fewer values are specified trbl(6, em(1.5)) #> A marquee trbl #> top: 6 #> right: em(1.5) #> bottom: 6 #> left: em(1.5) skip_inherit(\"sans\") #> sans (no inheritance) marquee_bullets #> [1] \"•\" \"◦\" \"▪\" \"▫\" \"‣\" \"⁃\""},{"path":"https://marquee.r-lib.org/dev/reference/style_set.html","id":null,"dir":"Reference","previous_headings":"","what":"Create or modify a style set that describes a full markdown text — style_set","title":"Create or modify a style set that describes a full markdown text — style_set","text":"style set contains information style various tags markdown text. necessary provide style tags (just inherit parent missing), required provide complete style body tag option avialable inheritance tags style options. can often easier derive new style set existing one rather building one scratch.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create or modify a style set that describes a full markdown text — style_set","text":"","code":"style_set(...) modify_style(style_set, tag, ...) remove_style(style_set, tag)"},{"path":"https://marquee.r-lib.org/dev/reference/style_set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create or modify a style set that describes a full markdown text — style_set","text":"... Named arguments providing style specific tags. modify_style() number style options change. first argument marquee style overwrite tag subsequent arguments ignored style_set style set modify tag name tag modify remove. Tags internally lowercase tag converted lowercase matching","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create or modify a style set that describes a full markdown text — style_set","text":"marquee_style_set object","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create or modify a style set that describes a full markdown text — style_set","text":"","code":"# Create a style s_set <- style_set(base = base_style(), p = style(indent = em(2))) # Modify an existing tag modify_style(s_set, \"p\", size = 16) #> #> [1] # Add a new tag, supplying a full style object modify_style(s_set, \"str\", style(weight = \"bold\")) #> #> [1] # Same as above, but style object created implicitly modify_style(s_set, \"str\", weight = \"bold\") #> #> [1] # Remove a tag style remove_style(s_set, \"p\") #> #> [1] "},{"path":"https://marquee.r-lib.org/dev/news/index.html","id":"marquee-development-version","dir":"Changelog","previous_headings":"","what":"marquee (development version)","title":"marquee (development version)","text":"Fixed bug bullet placement affected tight lists multiple spans (#18) code spans gains slight horizontal padding let background breathe bit. Currently padding around spans doesn’t affect shaping (.e. doesn’t move text ’s neighbors). Better adherence margin collapsing rules CSS. background border now prevent collapsing Add force_body_margin argument enforce body margin influenced collapsing (allowing turn completely). setting turned geom_marquee() element_marquee() (#23)","code":""},{"path":"https://marquee.r-lib.org/dev/news/index.html","id":"marquee-010","dir":"Changelog","previous_headings":"","what":"marquee 0.1.0","title":"marquee 0.1.0","text":"CRAN release: 2024-05-28 Initial CRAN submission.","code":""}]
+[{"path":[]},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement codeofconduct@posit.co. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://marquee.r-lib.org/dev/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://marquee.r-lib.org/dev/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 marquee authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"requirements","dir":"Articles","previous_headings":"","what":"Requirements","title":"marquee","text":"start note marquee build future. mean based slew new features R graphics engine putting hard requirements R version can used graphics devices works . , reason, setup accommodate needs can perhaps get way using gridtext/ggtext. nuisance likely diminish completely disappear time.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"an-example","dir":"Articles","previous_headings":"","what":"An example","title":"marquee","text":"small example can see markdown behaves ’d expect. emphasis, strong, underline, strikethrough, stuff like headings etc. fact, full markdown (CommonMark) spec supported behave ’d expect. Besides standard grob arguments ’d expect, marquee_grob() takes two main arguments can see . text, can character vector multiple separate markdown strings, style specification, can vector styles single style format everything alike. Marquee ships classic_style() designed mimic look standard HTML rendered markdown. function allows modify final style, also modify construction create completely new style: Besides standard markdown, marquee also allows create custom span classes. span classes can styled anything, marquee contains nifty feature , class matches recognized color name hex-code, automatically coloured. provide styling custom class takes precedence matching color name","code":"md_text <- \"# Lorem Ipsum Lorem ipsum dolor sit amet, *consectetur* adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna **aliqua**. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo _consequat_. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla ~pariatur~. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\" grob <- marquee_grob(md_text, classic_style()) grid.draw(grob) new_style <- classic_style(body_font = \"serif\", header_font = \"mono\", hanging = em(1)) new_style <- modify_style( new_style, \"str\", background = \"lightgrey\", border_radius = 3, padding = trbl(em(0.2)) ) grid.draw( marquee_grob(md_text, new_style) ) md_text_custom <- \"# Lorem Ipsum Lorem ipsum dolor {.red sit amet, *consectetur* adipiscing elit, sed do} eiusmod tempor incididunt ut labore et dolore magna **aliqua**. Ut enim ad minim {#2af veniam}, quis nostrud exercitation ul lamcolaboris nisi ut aliquip ex ea commodo _consequat_. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla ~pariatur~. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\" grid.draw( marquee_grob(md_text_custom, classic_style()) ) grid.draw( marquee_grob(md_text_custom, modify_style(classic_style(), \"red\", tracking = 400)) )"},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"use-in-ggplot2","dir":"Articles","previous_headings":"","what":"Use in ggplot2","title":"marquee","text":"Recognizing people doesn’t make visualizations directly grid, marquee also contains infrastructure use markdown inside ggplot2 plots. expected functions eventually move ggplot2 proper, package stress tested stay .","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"the-marquee-geom","dir":"Articles","previous_headings":"Use in ggplot2","what":"The marquee geom","title":"marquee","text":"One way use marquee ggplot2 geom_marquee(). supersedes geom_text() geom_label() capabilities, even don’t need plot rich text, styling geom_marquee() much capable: However, main use probably mix italicized, bold, colored fonts labels, marquee makes easy Another use geom, rich text may come play, annotations. Let’s make textbox style add lorem ipsum plot","code":"fancy_font <- classic_style( weight = \"semibold\", features = systemfonts::font_feature( ligatures = c(\"standard\", \"discretionary\"), letters = c(\"stylistic\", \"swash\", \"historical\") ) ) ggplot(mtcars, aes(disp, mpg, label = rownames(mtcars))) + geom_marquee(style = fancy_font, size = 2.5, family = \"spectral\") # You may not have this font cars <- sub(\"(\\\\w+)\", \"{.red ***\\\\1***}\", rownames(mtcars)) cars #> [1] \"{.red ***Mazda***} RX4\" \"{.red ***Mazda***} RX4 Wag\" #> [3] \"{.red ***Datsun***} 710\" \"{.red ***Hornet***} 4 Drive\" #> [5] \"{.red ***Hornet***} Sportabout\" \"{.red ***Valiant***}\" #> [7] \"{.red ***Duster***} 360\" \"{.red ***Merc***} 240D\" #> [9] \"{.red ***Merc***} 230\" \"{.red ***Merc***} 280\" #> [11] \"{.red ***Merc***} 280C\" \"{.red ***Merc***} 450SE\" #> [13] \"{.red ***Merc***} 450SL\" \"{.red ***Merc***} 450SLC\" #> [15] \"{.red ***Cadillac***} Fleetwood\" \"{.red ***Lincoln***} Continental\" #> [17] \"{.red ***Chrysler***} Imperial\" \"{.red ***Fiat***} 128\" #> [19] \"{.red ***Honda***} Civic\" \"{.red ***Toyota***} Corolla\" #> [21] \"{.red ***Toyota***} Corona\" \"{.red ***Dodge***} Challenger\" #> [23] \"{.red ***AMC***} Javelin\" \"{.red ***Camaro***} Z28\" #> [25] \"{.red ***Pontiac***} Firebird\" \"{.red ***Fiat***} X1-9\" #> [27] \"{.red ***Porsche***} 914-2\" \"{.red ***Lotus***} Europa\" #> [29] \"{.red ***Ford***} Pantera L\" \"{.red ***Ferrari***} Dino\" #> [31] \"{.red ***Maserati***} Bora\" \"{.red ***Volvo***} 142E\" ggplot(mtcars) + aes(disp, mpg, label = cars) + geom_marquee() text_box_style <- modify_style( classic_style(base_size = 2), \"body\", padding = skip_inherit(trbl(10)), border_radius = 3 ) ggplot(mtcars) + aes(disp, mpg, label = cars) + geom_marquee(size = 2) + annotate(GeomMarquee, label = md_text, x = 450, y = 35, style = text_box_style, size = 2, fill = \"lightgrey\", width = 0.3, hjust = \"right\", vjust = \"top\" )"},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"the-marquee-element","dir":"Articles","previous_headings":"Use in ggplot2","what":"The marquee element","title":"marquee","text":"Rich text plotted text probably limited use, need really need . Different formatting text surrounds plot. tend treat text rich text want full control styling. Enter element_marquee(), drop-substitute element_text() format style non-plotting text. can seen, defaults let text run long needs without text wrapping. makes alignment behave way element_text(). However, lot text like , certainly want turn feature. setting width. 1 equivalent width area element occupies natural value , can set grid::unit() value wish.","code":"ggplot(mtcars) + aes(disp, mpg, label = cars) + geom_marquee(size = 2) + ggtitle(md_text) + theme(plot.title = element_marquee(size = 9)) ggplot(mtcars) + aes(disp, mpg, label = cars) + geom_marquee(size = 2) + ggtitle(md_text) + theme(plot.title = element_marquee(size = 9, width = 1))"},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"a-bit-about-images","dir":"Articles","previous_headings":"","what":"A bit about images","title":"marquee","text":"Markdown famously supports images ![]() syntax. marquee course (means can put images everywhere ggplot2 wish). Currently, support PNG, JPEG, SVG, latter responsive resizing etc. images can reside online computer — “just work”. image placed inline sized fit height line adjusting width keep correct aspect ratio. image placed , expands fill provided width, width height calculated match aspect ratio image. Compare However, marquee pretty unique trick ’s sleeve compared markdown formats. doesn’t just accept paths images — also accepts R graphic objects (currently grid grobs, ggplot2 plots patchwork plots). works ’d expect:","code":"md_text_fig <- \"# Lorem Ipsum ![](https://cran.r-project.org/Rlogo.svg) Lorem ipsum dolor {.red sit amet, *consectetur* adipiscing elit, sed do} eiusmod tempor incididunt ut labore et dolore magna **aliqua**. Ut enim ad minim {#2af veniam}, quis nostrud exercitation ul lamcolaboris nisi ut aliquip ex ea commodo _consequat_. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla ~pariatur~. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\" grid.draw(marquee_grob(md_text_fig, classic_style())) md_text_fig2 <- \"# Lorem Ipsum ![](https://cran.r-project.org/Rlogo.svg) Lorem ipsum dolor {.red sit amet, *consectetur* adipiscing elit, sed do} eiusmod tempor incididunt ut labore et dolore magna **aliqua**. Ut enim ad minim {#2af veniam}, quis nostrud exercitation ul lamcolaboris nisi ut aliquip ex ea commodo _consequat_. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla ~pariatur~. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\" grid.draw(marquee_grob(md_text_fig2, classic_style())) p <- ggplot(mtcars) + geom_histogram(aes(x = gear)) md_text_plot <- \"# Lorem Ipsum ![](p) Lorem ipsum dolor {.red sit amet, *consectetur* adipiscing elit, sed do} eiusmod tempor incididunt ut labore et dolore magna **aliqua**. Ut enim ad minim {#2af veniam}, quis nostrud exercitation ul lamcolaboris nisi ut aliquip ex ea commodo _consequat_. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla ~pariatur~. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\" grid.draw(marquee_grob(md_text_plot, classic_style())) #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`."},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"a-bit-about-tables","dir":"Articles","previous_headings":"","what":"A bit about tables","title":"marquee","text":"table markdown syntax supported marquee. However, can still include tables marquee, much styling support standard markdown table syntax provide. magic extension talked . point, gt table objects recognized valid objects image tag path can thus included directly output. show power table specification taken gt introduction: vignette rendered older version gt support converting gt objects gtables. see “missing grob” example support still somewhat experimental gt--grob conversion getting build . gt features rely HTML formatting still end looking weird, standard table inclusion works expected.","code":"library(gt) airquality_m <- airquality[1:10, ] airquality_m$Year <- 1973L table <- gt(airquality_m) table <- tab_header(table, title = \"New York Air Quality Measurements\", subtitle = \"Daily measurements in New York City (May 1-10, 1973)\" ) table <- tab_spanner(table, label = \"Time\", columns = c(Year, Month, Day) ) table <- tab_spanner(table, label = \"Measurement\", columns = c(Ozone, Solar.R, Wind, Temp) ) md_text_table <- \"# Lorem Ipsum Below we have a table created with gt ![](table) *Such tables, much cells*\" grid.draw(marquee_grob(md_text_table, classic_style()))"},{"path":"https://marquee.r-lib.org/dev/articles/marquee.html","id":"wrapping-up","dir":"Articles","previous_headings":"","what":"Wrapping up","title":"marquee","text":"give enough overview get started. Marquee Style Marquee Syntax vignettes provides bit detail respective areas need dive deeper.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_style.html","id":"a-slightly-less-cascading-style-specification","dir":"Articles","previous_headings":"","what":"A slightly less cascading style specification","title":"Marquee Styling","text":"HTML CSS take care styling , years morphed sprawling powerful language ’s . complicated support something like marquee, complicated needed styling markdown (’s main goal style full webpages, documents). Marquee instead defines ’s limited styling system simple enough reason , powerful enough support needed markdown text. Many concepts borrowed CSS used feel pretty much home.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_style.html","id":"styles","dir":"Articles","previous_headings":"A slightly less cascading style specification","what":"Styles","title":"Marquee Styling","text":"marquee, style defines full specification element (block span) visually appear. holds 23 different settings concerning everything font rendering, spacing, coloring, alignment. Rather going , ’ll point towards documentation style() function. span block elements takes style specifications, settings apply block elements ignored spans. lineheight, align, indent, hanging, margin, bullets, img_asp.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_style.html","id":"style-sets","dir":"Articles","previous_headings":"A slightly less cascading style specification","what":"Style sets","title":"Marquee Styling","text":"style set collection styles, style related specific type element. need provide style elements text, elements doesn’t need complete. hard requirement contains complete style named base, everything else can derived. marquee ships style set called classic_style() aims mimic standard look rendered markdown. New style sets can either build ground based classic_style().","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_style.html","id":"inheritance","dir":"Articles","previous_headings":"A slightly less cascading style specification","what":"Inheritance","title":"Marquee Styling","text":"Marquee uses simple inheritance model ’s styling, can boiled single short sentance: element inherits unspecified ’s parent element. setting style object set NULL inherited parent way base style (reason style must complete). example, let’s look style em element classic_style(): thing touches italic setting, everything else borrowed whatever element placed . two ways influence style inheritance. first one wrapping value skip_inherit(). instruct marquee inherit value one level hierarchy rather direct parent (parent parent also set skip_inherit() moves yet another level, ). second one wrapping numeric value relative() instruct marquee use relative value multiplier applied parent.","code":"classic_style()[[1]]$em #> #> italic: TRUE"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_style.html","id":"sizing","dir":"Articles","previous_headings":"A slightly less cascading style specification","what":"Sizing","title":"Marquee Styling","text":"sizes style (big)points (distinction bigpoints points rather small boring. Bigpoints 1/72 inches, use). Instead setting style setting directly numeric value, can make relative font size style using em(). beneficial e.g. padding, margin, indent, etc. often want scale font size. case set size em value, relative ’s parent effectively equivalent using relative(). variant em values called rem() (root em). Instead making setting relative size current element makes relative size base element document.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_style.html","id":"side-values","dir":"Articles","previous_headings":"A slightly less cascading style specification","what":"Side values","title":"Marquee Styling","text":"style three settings relates four sides box. margin, padding, border_size. set values constructed trbl(), works like margin settings CSS. provide 1 value set sides value. provide two values set top bottom first left right second. provide three values set top first, left right second, bottom third. provide four values set top first, right second, bottom third, left fourth (bold first letters gives clue constructor named ).","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"markdown-vs-commonmark","dir":"Articles","previous_headings":"","what":"Markdown vs CommonMark","title":"Marquee Syntax","text":"used two different names discuss syntax marquee adheres . Markdown original specification developed John Gruber Aaron Swartz 2004. spec intentionally vague ambiguous led divergence different parsers handled edge cases. CommonMark developed tackle bringing forth stringent internally consistent syntax parsers develop . top CommonMark, various entities build flavour extended syntax, well-known perhaps GitHub flavoured markdown (GFM). Marquee CommonMark compliant, meaning adheres specific syntax interpretation CommonMark defined. , like GFM, marquee provides ’s additions syntax, overlapping flavours, uniquely ’s . following use name “Markdown” refer CommonMark syntax.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"standard-markdown-syntax","dir":"Articles","previous_headings":"","what":"Standard Markdown syntax","title":"Marquee Syntax","text":"Markdown can thought way naturally mark text belonging various stylistic contextual elements. favors ease reading writing ’s raw representation flexibility, cover almost standard needs text formatting (document written markdown). elements can marked broadly falls two buckets: Block elements span elements.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"block-elements","dir":"Articles","previous_headings":"Standard Markdown syntax","what":"Block elements","title":"Marquee Syntax","text":"block element element contains completed content, sense two following blocks contextually separated. block can contain blocks inside , raw text.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"paragraphs-p","dir":"Articles","previous_headings":"Standard Markdown syntax > Block elements","what":"Paragraphs (p)","title":"Marquee Syntax","text":"basic block element paragraph. paragraph run text another block element. Paragraphs separated two consecutive line breaks. can use single line breaks paragraph wrap text raw format. linebreaks ignored parsing. means text: semantically similar want force linebreak inside paragraph, end line two spaces linebreak. aware code editors strips trailing spaces saving document.","code":"this is the first paragraph this is a second one here we add linebreaks because we want the raw text to have a certain width here we add linebreaks because we want the raw text to have a certain width"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"headers-h1-h6","dir":"Articles","previous_headings":"Standard Markdown syntax > Block elements","what":"Headers (h1-h6)","title":"Marquee Syntax","text":"Markdown supports six levels headers. can defined one two ways: last style supports level 1 2, visually pronounced raw encoding.","code":"# Header 1 ## Header 2 ### Header 3 #### Header 4 ##### Header 5 ###### Header 6 Header 1 ======== Header 2 --------"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"block-quotes-bq","dir":"Articles","previous_headings":"Standard Markdown syntax > Block elements","what":"Block quotes (bq)","title":"Marquee Syntax","text":"block quote semantically paragraph wish highlight way. can contain blocks inside part block. created using email-style quoting","code":"> This is a block quote > > It contains two paragraphs"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"code-blocks-cb","dir":"Articles","previous_headings":"Standard Markdown syntax > Block elements","what":"Code blocks (cb)","title":"Marquee Syntax","text":"code block intended hold unparsed text (often code). markdown inside codeblock ignored shown -. means code block contain child blocks way specify . Code blocks created either indenting everything 4 spaces, enclosing text ```, e.g. ","code":"This is a paragraph This is a code block # This will not be converted to a header new paragraph This is a paragraph ``` This is a code block # This will not be converted to a header ``` new paragraph"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"lists-ul-ol-and-li","dir":"Articles","previous_headings":"Standard Markdown syntax > Block elements","what":"Lists (ul, ol, and li)","title":"Marquee Syntax","text":"Lists markdown comes two flavors: Unordered ordered. Ordered lists can created using either *, -, + bullet, ordered using number followed either . ). styles semantically equivalent taste choose. Depending whether empty line consecutive elements list might considered tight defines styled parser List items can child blocks, either multiple paragraph block elements Ordered lists care number first item. remaining item numbers inspected. means list semantically equivalent first number, however instructs renderer start numbering ","code":"* This is an unordered list * It has a second bullet point 1. This is an ordered list 2. next item # Tight - This is - a tight - list # Untight - This is - so untight - I can't even * First list item * Second one This contains a second paragraph. It must be indented > We could even add a block quote * Third item contains a sub list 1. let's make it ordered 2. and tight 1. item one 2. item two 3. item three 1. item one 9. item two 4. item three 5. This list starts counting from 5 6. and so on 1. This will be item 7 despite what we wrote"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"horizontal-rulers-hr","dir":"Articles","previous_headings":"Standard Markdown syntax > Block elements","what":"Horizontal rulers (hr)","title":"Marquee Syntax","text":"Last block items horizontal rulers. demarcate break two blocks can created using three asterisks (*) hyphens (-), optionally spacing , line, e.g. ","code":"* * * -------------------------"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"span-elements","dir":"Articles","previous_headings":"Standard Markdown syntax","what":"Span elements","title":"Marquee Syntax","text":"Span elements elements break flow text considered “inline”. classic example marking text emphasized (often rendered italicized). wouldn’t expect element break new line, rather keep flow.","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"emphasize-em","dir":"Articles","previous_headings":"Standard Markdown syntax > Span elements","what":"Emphasize (em)","title":"Marquee Syntax","text":"add emphasis text, wrap single asterisk (*) either side. Classic markdown also allows use underscore (_), many flavors (marquee included), repurposed thus doesn’t work. emphasis often styled italic, given emphasis considered semantic rather stylistic.","code":"Within this line of text we add *emphasis* on one word"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"strong-str","dir":"Articles","previous_headings":"Standard Markdown syntax > Span elements","what":"Strong (str)","title":"Marquee Syntax","text":"give part text weight can wrap two asterisks either side. Like emphasis , semantic, often equates rendering text bold","code":"I'm making a **strong** point here"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"link-a","dir":"Articles","previous_headings":"Standard Markdown syntax > Span elements","what":"Link (a)","title":"Marquee Syntax","text":"links rather useless marquee intended raster rendering, syntax supported often result slightly different (though unclickable) rendering style. Links created using following syntax Links can also created enclosing URL <>, e.g. case url used text well","code":"[link text](link-url) "},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"code-code","dir":"Articles","previous_headings":"Standard Markdown syntax > Span elements","what":"Code (code)","title":"Marquee Syntax","text":"Inline code, like code blocks render content -. code span created enclosing text single back-tick (`)","code":"This text has some fancy code in it `six <- 1 + 5`, right?"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"images-img","dir":"Articles","previous_headings":"Standard Markdown syntax > Span elements","what":"Images (img)","title":"Marquee Syntax","text":"Images included text using link-like syntax, prepended exclamation mark: title/alt-text ignored marquee reasons links useless, can used make raw text easy understand. standard markdown expect image path point file system, marquee can also name graphic object environment. example, created plot ggplot2 saved p variable, can insert markdown document simply adding images semantically span elements, marquee treat images resides line (surrounded empty lines) block element.","code":"![Image title](image-path) ![](p)"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"markdown-extensions","dir":"Articles","previous_headings":"","what":"Markdown extensions","title":"Marquee Syntax","text":"Apart base syntax described , marquee allows additional features:","code":""},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"underline-u","dir":"Articles","previous_headings":"Markdown extensions","what":"Underline (u)","title":"Marquee Syntax","text":"can underline run text enclosing underscore. Note feature means classic use underscore alias asterisk emphasizing text longer works. Note emphasis semantic, underline much stylistic mark","code":"We will _underline_ a word"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"strikethrough-del","dir":"Articles","previous_headings":"Markdown extensions","what":"Strikethrough (del)","title":"Marquee Syntax","text":"want give appearance something deleted, can enclose tilde (~)","code":"I'm sure this is ~good~ better"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"custom-spans","dir":"Articles","previous_headings":"Markdown extensions","what":"Custom spans","title":"Marquee Syntax","text":"Marquee ’s style custom span elements, need style text run special way. created enclosing text {.name }, give enclosed text name style (render). aware preceding dot removed span element name. Alternatively can use {#name }, give enclosed text #name style (note hash stripped span element name).","code":"Sometimes my text is so {.stylish eloquent} that the basic markdown elements are not enough"},{"path":[]},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"escaping-syntax","dir":"Articles","previous_headings":"Miscellaneous","what":"Escaping syntax","title":"Marquee Syntax","text":"can see , small set characters holds special meaning markdown (even holds multiple meanings). : \\, `, *, _, ~, {, }, [, ], (, ), #, +, -, ., !. Using run risk text interpreted ways intent. wish include one characters -, can escape using \\, instruct parser ignore formatting may deduced character.","code":"I just like \\*asterisks\\* around words"},{"path":"https://marquee.r-lib.org/dev/articles/marquee_syntax.html","id":"where-is-my-html-support","dir":"Articles","previous_headings":"Miscellaneous","what":"Where is my HTML-support?","title":"Marquee Syntax","text":"seassoned markdown user may accustomed mixing HTML code markdown text need technical formatting. works markdown passes code unaltered end result HTML, included HTML part final HTML document. However, HTML part markdown, marquee simply pass . Since parsed text rendered HTML means HTML code include visible ’s raw format.","code":""},{"path":"https://marquee.r-lib.org/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Thomas Lin Pedersen. Author, maintainer. Martin Mitáš. Author. Author MD4C . Copyright holder, funder.","code":""},{"path":"https://marquee.r-lib.org/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Pedersen T, Mitáš M (2024). marquee: Markdown Parser Renderer R Graphics. R package version 0.1.0.9000, https://github.com/r-lib/marquee, https://marquee.r-lib.org.","code":"@Manual{, title = {marquee: Markdown Parser and Renderer for R Graphics}, author = {Thomas Lin Pedersen and Martin Mitáš}, year = {2024}, note = {R package version 0.1.0.9000, https://github.com/r-lib/marquee}, url = {https://marquee.r-lib.org}, }"},{"path":"https://marquee.r-lib.org/dev/index.html","id":"marquee-","dir":"","previous_headings":"","what":"Markdown Parser and Renderer for R Graphics","title":"Markdown Parser and Renderer for R Graphics","text":"marquee markdown parser renderer R graphics engine. can used render rich text formatted markdown (CommonMark) inside R graphics ggplot2 graphics built grid.","code":""},{"path":"https://marquee.r-lib.org/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Markdown Parser and Renderer for R Graphics","text":"","code":"# You can install marquee from CRAN install.packages(\"marquee\") # Or get the development version from Github using pak pak::pak(\"r-lib/marquee\")"},{"path":"https://marquee.r-lib.org/dev/index.html","id":"examples","dir":"","previous_headings":"","what":"Examples","title":"Markdown Parser and Renderer for R Graphics","text":"main function package marquee_grob() creates grob based markdown text style can rendered grid: (image – go ahead check)","code":"# 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)"},{"path":"https://marquee.r-lib.org/dev/index.html","id":"prior-art","dir":"","previous_headings":"","what":"Prior art","title":"Markdown Parser and Renderer for R Graphics","text":"remiss mention gridtext ggtext, Claus Wilke. packages aim solve much problem marquee, work different way don’t powerful textshaping backend marquee. notably user perspective perhaps gridtext understands HTML degree, whereas marquee oblivious HTML CSS. Instead, supports full CommonMark spec plan add support custom span elements well.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/GeomMarquee.html","id":null,"dir":"Reference","previous_headings":"","what":"Geom class for geom_marquee — GeomMarquee","title":"Geom class for geom_marquee — GeomMarquee","text":"underlying Geom class powers geom_marquee() layers.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/GeomMarquee.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Geom class for geom_marquee — GeomMarquee","text":"","code":"GeomMarquee"},{"path":"https://marquee.r-lib.org/dev/reference/classic_style.html","id":null,"dir":"Reference","previous_headings":"","what":"Classic styling for markdown — classic_style","title":"Classic styling for markdown — classic_style","text":"function facilitates construction complete style set based classic look HTML rendered markdown document. contains style specifications supported markdown elements well sub sup style can used subscripts superscript respectively. accessible custom spans (e.g. H{.sub 2}O) markdown provide syntax formats.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/classic_style.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classic styling for markdown — classic_style","text":"","code":"classic_style( base_size = 12, body_font = \"\", header_font = \"\", code_font = \"mono\", ... )"},{"path":"https://marquee.r-lib.org/dev/reference/classic_style.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classic styling for markdown — classic_style","text":"base_size base font size text. sizing based body_font font family use body text header_font font family use headers code_font font family use code code block text ... Arguments passed base_style weight font weight use. Can either number (0, 100, 200, 300, 400, 500, 600, 700, 800, 900) strings (\"undefined\", \"thin\", \"ultralight\", \"light\", \"normal\", \"medium\", \"semibold\", \"bold\", \"ultrabold\", \"heavy\") italic font slanted width font width use. Can either number (``0, 1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`) strings (`\"undefined\"`, `\"ultracondensed\"`, `\"extracondensed\"`, `\"condensed\"`, `\"semicondensed\"`, `\"normal\"`, `\"semiexpanded\"`, `\"expanded\"`, `\"extraexpanded\"`, `\"ultraexpanded\"`) features font_feature object specifying OpenType font features apply font color color font lineheight spacing subsequent lines relative font size. Can relative() case based parent lineheight. align alignment within text. One \"left\", \"center\", \"right\", \"justified-left\", \"justified-center\", \"justified-right\", \"distributed\" tracking Additional character spacing measured 1/1000em. Can relative() case based parent tracking. indent indentation first line paragraph measured points. Can relative() case based parent indent, em() case based font size style, rem() case based font size body element. hanging indentation first line paragraph measured points. Can relative() case based parent hanging, em() case based font size style, rem() case based font size body element. margin margin around element, given call trbl() padding padding around element, given call trbl() background color background fill. background includes padding margin. Can solid color gradient pattern made grid::linearGradient()/grid::radialGradient()/grid::pattern() border color background stroke. background includes padding margin border_size line width background stroke, given call trbl() border_radius corner radius background, given points bullets vector strings use bullets unordered lists. marquee_bullets provides selection underline text underlined strikethrough text strikethrough baseline baseline shift apply text img_asp default aspect ratio block level images provided image ","code":""},{"path":"https://marquee.r-lib.org/dev/reference/classic_style.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Classic styling for markdown — classic_style","text":"style set object","code":""},{"path":"https://marquee.r-lib.org/dev/reference/classic_style.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classic styling for markdown — classic_style","text":"","code":"classic_style(16, \"serif\", \"sans\") #> #> [1] "},{"path":"https://marquee.r-lib.org/dev/reference/element_marquee.html","id":null,"dir":"Reference","previous_headings":"","what":"ggplot2 theme element supporting marquee syntax — element_marquee","title":"ggplot2 theme element supporting marquee syntax — element_marquee","text":"theme element drop-replacement ggplot2::element_text(). works integrating various style settings element base style provided style set. margin given, set body tag skip_inherit(). default width NA meaning span long given text , line wrapping. can set unit make fit within specific width. However, may work expected rotated text (may get lucky). Note may see small shifts visuals going element_text() element_marquee() size reporting may differ two elements.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/element_marquee.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ggplot2 theme element supporting marquee syntax — element_marquee","text":"","code":"element_marquee( family = NULL, colour = NULL, size = NULL, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, color = NULL, margin = NULL, style = NULL, width = NULL, inherit.blank = FALSE )"},{"path":"https://marquee.r-lib.org/dev/reference/element_marquee.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ggplot2 theme element supporting marquee syntax — element_marquee","text":"family font family base style colour, color font colour base style size font size base style hjust Horizontal justification (\\([0, 1]\\)) vjust Vertical justification (\\([0, 1]\\)) angle Angle (\\([0, 360]\\)) lineheight lineheight base style margin margin body tag style style set base rendering width maximum width text. See description caveats inherit.blank element inherit existence element_blank among parents? TRUE existence blank element among parents cause element blank well. FALSE blank parent element ignored calculating final element state.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/element_marquee.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ggplot2 theme element supporting marquee syntax — element_marquee","text":"element_marquee object can used place element_text ggplot2 theme specifications","code":""},{"path":"https://marquee.r-lib.org/dev/reference/element_marquee.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ggplot2 theme element supporting marquee syntax — element_marquee","text":"","code":"library(ggplot2) p <- ggplot(mtcars) + geom_point(aes(mpg, disp)) + labs(title = \"A {.red *marquee*} title\\n* Look at this bullet list\\n\\n* great, huh?\") + theme_gray(base_size = 6) + theme(title = element_marquee()) plot(p) ggplot(mtcars) + geom_histogram(aes(x = mpg)) + labs(title = \"I put a plot in your title so you can plot while you title ![](p) What more could you _possibly_ want?\") + theme(title = element_marquee()) #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`."},{"path":"https://marquee.r-lib.org/dev/reference/geom_marquee.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw text formatted with marquee — geom_marquee","title":"Draw text formatted with marquee — geom_marquee","text":"geom extension geom_text() geom_label() allows draw richly formatted text marquee-markdown format plot. plain text near-drop-replacement geoms except sizing might slightly different. However, using geom able access much powerful font settings available marquee, even might make sense opt geom.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/geom_marquee.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw text formatted with marquee — geom_marquee","text":"","code":"geom_marquee( mapping = NULL, data = NULL, stat = \"identity\", position = \"identity\", ..., size.unit = \"mm\", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE )"},{"path":"https://marquee.r-lib.org/dev/reference/geom_marquee.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw text formatted with marquee — geom_marquee","text":"mapping Set aesthetic mappings created aes(). specified inherit.aes = TRUE (default), combined default mapping top level plot. must supply mapping plot mapping. data data displayed layer. three options: NULL, default, data inherited plot data specified call ggplot(). data.frame, object, override plot data. objects fortified produce data frame. See fortify() variables created. function called single argument, plot data. return value must data.frame, used layer data. function can created formula (e.g. ~ head(.x, 10)). stat statistical transformation use data layer. using geom_*() function construct layer, stat argument can used override default coupling geoms stats. stat argument accepts following: Stat ggproto subclass, example StatCount. string naming stat. give stat string, strip function name stat_ prefix. example, use stat_count(), give stat \"count\". information ways specify stat, see layer stat documentation. position position adjustment use data layer. jointy specified nudge_x nudge_y. can used various ways, including prevent overplotting improving display. position argument accepts following: result calling position function, position_jitter(). string nameing position adjustment. give position string, strip function name position_ prefix. example, use position_jitter(), give position \"jitter\". information ways specify position, see layer position documentation. ... arguments passed layer()'s params argument. arguments broadly fall one 4 categories . Notably, arguments position argument, aesthetics required can passed .... Unknown arguments part 4 categories ignored. Static aesthetics mapped scale, fixed value apply layer whole. example, colour = \"red\" linewidth = 3. geom's documentation Aesthetics section lists available options. 'required' aesthetics passed params. Please note passing unmapped aesthetics vectors technically possible, order required length guaranteed parallel input data. constructing layer using stat_*() function, ... argument can used pass parameters geom part layer. example stat_density(geom = \"area\", outline.type = \"\"). geom's documentation lists parameters can accept. Inversely, constructing layer using geom_*() function, ... argument can used pass parameters stat part layer. example geom_area(stat = \"density\", adjust = 0.5). stat's documentation lists parameters can accept. key_glyph argument layer() may also passed .... can one functions described key glyphs, change display layer legend. size.unit size aesthetic interpreted: millimetres (\"mm\", default), points (\"pt\"), centimetres (\"cm\"), inches (\"\"), picas (\"pc\"). na.rm FALSE, default, missing values removed warning. TRUE, missing values silently removed. show.legend logical. layer included legends? NA, default, includes aesthetics mapped. FALSE never includes, TRUE always includes. can also named logical vector finely select aesthetics display. inherit.aes FALSE, overrides default aesthetics, rather combining . useful helper functions define data aesthetics inherit behaviour default plot specification, e.g. borders().","code":""},{"path":"https://marquee.r-lib.org/dev/reference/geom_marquee.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw text formatted with marquee — geom_marquee","text":"ggplot2 layer can added plot","code":""},{"path":"https://marquee.r-lib.org/dev/reference/geom_marquee.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Draw text formatted with marquee — geom_marquee","text":"Styling text based style set exception standard aesthetics family, size, colour, fill, etc. recognized applied base tag style. default style set (classic_style) can changed using style aesthetic can take vector style sets text can rely style needed. element_marquee(), fill aesthetic treated differently applied base tag, body tag skip_inherit() style propagate fill. Contrary standard text label geoms, geom_marquee() takes width aesthetic can used turn soft wrapping text. default value (NA) lets text run long want's (honoring hard breaks), setting something else instruct marquee use amount space. can use grid units set absolute amount.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/geom_marquee.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Draw text formatted with marquee — geom_marquee","text":"","code":"library(ggplot2) # Standard use p <- ggplot(mtcars, aes(wt, mpg)) p + geom_marquee(aes(label = rownames(mtcars))) # Make use of more powerful font features (note, result may depend on fonts # installed on the system) p + geom_marquee( aes(label = rownames(mtcars)), style = classic_style(weight = \"thin\", width = \"condensed\") ) # Turn on line wrapping p + geom_marquee(aes(label = rownames(mtcars)), width = unit(2, \"cm\")) # Style like label label_style <- modify_style( classic_style(), \"body\", padding = skip_inherit(trbl(4)), border = \"black\", border_size = skip_inherit(trbl(1)), border_radius = 3 ) p + geom_marquee(aes(label = rownames(mtcars), fill = gear), style = label_style) # Use markdown to style the text red_bold_names <- sub(\"(\\\\w+)\", \"{.red **\\\\1**}\", rownames(mtcars)) p + geom_marquee(aes(label = red_bold_names))"},{"path":"https://marquee.r-lib.org/dev/reference/marquee-package.html","id":null,"dir":"Reference","previous_headings":"","what":"marquee: Markdown Parser and Renderer for R Graphics — marquee-package","title":"marquee: Markdown Parser and Renderer for R Graphics — marquee-package","text":"Provides mean parse render markdown text grid along facilities define styling text.","code":""},{"path":[]},{"path":"https://marquee.r-lib.org/dev/reference/marquee-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"marquee: Markdown Parser and Renderer for R Graphics — marquee-package","text":"Maintainer: Thomas Lin Pedersen thomas.pedersen@posit.co (ORCID) Authors: Martin Mitáš (Author MD4C) contributors: Posit Software, PBC [copyright holder, funder]","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_glue.html","id":null,"dir":"Reference","previous_headings":"","what":"Marquee-aware string interpolation — marquee_glue","title":"Marquee-aware string interpolation — marquee_glue","text":"want create markdown programmatically probably want use sort string interpolation glue(). However, custom span syntax marquee interferes standard interpolation syntax glue. function use together.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_glue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Marquee-aware string interpolation — marquee_glue","text":"","code":"marquee_glue( ..., .sep = \"\", .envir = parent.frame(), .open = \"{\", .close = \"}\", .na = \"NA\", .null = character(), .comment = character(), .literal = FALSE, .transformer = NULL, .trim = TRUE ) marquee_glue_data( .x, ..., .sep = \"\", .envir = parent.frame(), .open = \"{\", .close = \"}\", .na = \"NA\", .null = character(), .comment = character(), .literal = FALSE, .transformer = NULL, .trim = TRUE )"},{"path":"https://marquee.r-lib.org/dev/reference/marquee_glue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Marquee-aware string interpolation — marquee_glue","text":"... [expressions] Unnamed arguments taken expression string(s) format. Multiple inputs concatenated together formatting. Named arguments taken temporary variables available substitution. .sep [character(1): ‘\"\"’] Separator used separate elements. .envir [environment: parent.frame()] Environment evaluate expression . Expressions evaluated left right. .x environment, expressions evaluated environment .envir ignored. NULL passed, equivalent emptyenv(). .open [character(1): ‘\\{’] opening delimiter. Doubling full delimiter escapes . .close [character(1): ‘\\}’] closing delimiter. Doubling full delimiter escapes . .na [character(1): ‘NA’] Value replace NA values . NULL missing values propagated, NA result cause NA output. Otherwise value replaced value .na. .null [character(1): ‘character()’] Value replace NULL values . character() whole output character(). NULL NULL values dropped (paste0()). Otherwise value replaced value .null. .comment [character(1): ‘#’] Value use comment character. .literal [boolean(1): ‘FALSE’] Whether treat single double quotes, backticks, comments regular characters (vs. syntactic elements), parsing expression string. Setting .literal = TRUE probably makes sense combination custom .transformer, case glue_col(). Regard argument (especially, name) experimental. .transformer [function] function taking two arguments, text envir, text unparsed string inside glue block envir execution environment. .transformer lets modify glue block , , evaluation, allowing create custom glue()-like functions. See vignette(\"transformers\") examples. .trim [logical(1): ‘TRUE’] Whether trim input template trim() . .x [listish] environment, list, data frame used lookup values.","code":"For `glue_data()`, elements in `...` override the values in `.x`."},{"path":"https://marquee.r-lib.org/dev/reference/marquee_glue.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Marquee-aware string interpolation — marquee_glue","text":"character vector","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_glue.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Marquee-aware string interpolation — marquee_glue","text":"choose different set delimiters \"{\" \"}\" interpolation functions call equivalent glue functions directly. However, keep defaults, functions use custom transformer make sure keep marquee custom span notation. can interpolate content span, well span class (see examples)","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_glue.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Marquee-aware string interpolation — marquee_glue","text":"","code":"# standard use red_text <- \"this text will be red\" marquee_glue(\"This will be black and {.red {red_text}}!\") #> This will be black and {.red this text will be red}! # if the span is not valid it will be treated as standard glue interpolation try( marquee_glue(\"This will be black and {.red}!\") ) #> Error : Failed to evaluate glue component {.red} #> Caused by error: #> ! object '.red' not found # You can interpolate the tag name as well col <- \"green\" marquee_glue(\"This will be black and {.{col} this text will be {col}}!\") #> This will be black and {.green this text will be green}! # Tag name interpolation must follow a `.` or a `#` as these identify the # bracket pair as a custom span class col <- \".yellow\" # This is not what you want probably marquee_glue(\"This will be black and {{col} this text will be {col}}!\") #> This will be black and {col} this text will be .yellow}! # Tag interpolation should also interpolate the full tag and be followed by # a space in order to be valid part <- \"l\" marquee_glue(\"This will be black and {.ye{part}low this text will be {col}}!\") #> This will be black and {.ye{part}low this text will be .yellow}! try( marquee_glue(\"This will be black and {.{part}avender this text will be {col}}!\") ) #> Error in .transformer(expr, env) : #> Malformed marquee interpolation block. When interpolating a tag #> name it must be followed by a space"},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a grob rendering one or more markdown texts — marquee_grob","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"main function marquee. takes vector markdown strings, parses provided style, returns grob capable rendering parsed text rich text (possibly) images. See marquee_parse() information markdown parsed see details information rendering proceeds.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"","code":"marquee_grob( text, style = classic_style(), ignore_html = TRUE, force_body_margin = FALSE, x = 0, y = 1, width = NULL, default.units = \"npc\", hjust = \"left\", vjust = \"top\", angle = 0, vp = NULL, name = NULL )"},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"text Either character vector marquee_parsed object created marquee_parse() style style set classic_style() defines text rendered ignore_html HTML code removed output force_body_margin body margin override margin collapsing calculations. See Details. x, y location markdown text graphics. numeric converted units using default.units width width markdown text. numeric converted units using default.units. NULL equivalent width parent container default.units string giving default units apply x, y, width hjust horizontal justification markdown respect x. Can either numeric one \"left\", \"left-ink\", \"center\", \"center-ink\", \"right-ink\", \"right\" vjust vertical justification markdown respect y. Can either numeric one \"bottom\", \"bottom-ink\", \"last-line\", \"center\", \"center-ink\", \"first-line\", \"top-ink\", \"top\" angle angle rotation (degrees) around x y vp optional viewport assign grob name name grob. NULL unique name generated","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"grob class marquee","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"rendering-style","dir":"Reference","previous_headings":"","what":"Rendering style","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"rendering less adheres styling provided marquee_parse(), intricacies detailed : Tight lists list tight, bottom margin li tag set spacing matches lineheight. , top margin set 0. Block images markdown, image tags span elements can placed inline. However, image tag thing contained inside p tag marquee determines considered block element. case, parent p element inherits styling image element image can e.g. adhere align properties, provide padding. Horizontal rulers elements rendered empty block. standard style sets bottom border size size sides. Margin collapsing Margin calculations follows margin collapsing rules HTML. Read mdn. Margin collapsing means elements margin set 0 might end margin. Specifically body element can problem want enforce tight box around text. force_body_margin argument allows overwrite margins body element original values collapsing performed. Underline strikethrough Underlines placed 0.1em baseline text. Strikethrough placed 0.3em baseline. width line set 0.075em. inherits color text. styling possible. Spans background Consecutive spans background border settings merged single rectangle. padding span defines size background modify placement glyph (.e. left padding move first glyph away left neighbor). Bullet position Bullets placed, right-aligned, 0.25em left first line li element. Border border radius borders sides drawn one one. case border radius ignored.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"image-rendering","dir":"Reference","previous_headings":"","what":"Image rendering","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"image tag can used place images. support png jpeg images. path instead names grob, ggplot, patchwork object rendered instead. file read, exist, path names object grob, ggplot patchwork, placeholder rendered place (black square red cross). Image sizing standard markdown specifying size images. default, block-level images fill width container maintain aspect ratio. Inline images default width 0.65em height matching aspect ration. However, wish control sizing, can instead provide image grob viewport fixed dimensions, case used long width exceed width container (case get downsized). rastergrob provided without absolute sizing, aspect ratio match raster, otherwise aspect ratio taken styling element (defaults 1.65)","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"table-rendering","dir":"Reference","previous_headings":"","what":"Table rendering","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"marquee support extended table syntax markdown allow include tables output. supporting gt objects valid paths image tags way ggplots etc. meeans can style tables way wish full power gt, much flexible markdown table syntax.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_grob.html","id":"textbox-justification","dir":"Reference","previous_headings":"","what":"Textbox justification","title":"Construct a grob rendering one or more markdown texts — marquee_grob","text":"justification options exceeds classic ones provided grid. numeric values available always, number possible text values larger. Horizontal justification add \"left-ink\", \"center-ink\", \"right-ink\" uses left-right-positioned glyph (halfway ) anchors. Vertical justification equivalent \"bottom-ink\", \"center-ink\", \"top-ink\" anchors, also \"first-line\" \"last-line\" sets anchor baseline first last line respectively.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse a text as marquee — marquee_parse","title":"Parse a text as marquee — marquee_parse","text":"marquee uses extension CommonMark support HTML code (rendered verbatim). focus allow easy formatting text graphics, rather fully fledged typesetting. See marquee syntax format.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse a text as marquee — marquee_parse","text":"","code":"marquee_parse(text, style = classic_style(), ignore_html = TRUE)"},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse a text as marquee — marquee_parse","text":"text character string. core quality markdown text valid markdown restrictions content style style set classic_style() defines text rendered ignore_html HTML code removed output","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse a text as marquee — marquee_parse","text":"data frame describing various tokens text style apply . output mainly meant programmatic consumption marquee_grob()","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"marquee-tags","dir":"Reference","previous_headings":"","what":"marquee tags","title":"Parse a text as marquee — marquee_parse","text":"marquee tokenizes input text blocks spans. recognises following tags: Block tags body parent tag markdown document. never contains text , blocks. ul unordered list. contains number li children ol ordered list. contains number li children li list element. list tight contains text directly inside . , text placed inside child p blocks hr horizontal line, spanning width parent block. styling, bottom border size used rendering h1-h6 headings different levels cb code block. Text inside code blocks rendered verbatim, .e. contain children p standard paragraph block. Text separated two line-ends separated separate paragraphs qb quote block. may contain children Span tags em emphasized text span. Often means italicizing text, ultimately renderer str strong text, often rendered bold text link text. marquee rendering allow links, can still rendered particular way code text rendered code. Often uses monospaced font. Text inside span rendered verbatim u text underlined del text strikethrough custom spans marquee specific extension syntax allows make tags fly. See section marquee syntax .","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"marquee-syntax","dir":"Reference","previous_headings":"","what":"marquee syntax","title":"Parse a text as marquee — marquee_parse","text":"marquee uses md4c fully CommonMark compliant markdown parser. CommonMark effort create internally coherent markdown specification, something missing original markdown description. used writing markdown, used CommonMark. list notable additions details specific way marquee handles CommonMark Underlines strikethrough part basic CommonMark spec, underline strikethrough supported marquee using _ ~ (e.g. _underline this_ ~error~). Images Image tags (![image title](path//image)) supported, title ignored. path returned token text. HTML HTML tags ignored, .e. rendered verbatim. different classic markdown rendering except people often convert markdown HTML tags suddenly meaning. carry special significance rendered marquee Custom tags markdown provides necessary standard text markup, situations, especially visualisation, need something . Often users reach inline HTML spans , since HTML fully ignored marquee option. , adding HTML decreases readability unformatted text lot. marquee can create custom span using {.tag } syntax, e.g. {.sm small text} wrap \"small text\" sm tag. can alternatively use {#tag } effect. difference former syntax . stripped tag name, whereas latter # remains part name. See Styling section primal use latter syntax.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"styling","dir":"Reference","previous_headings":"","what":"Styling","title":"Parse a text as marquee — marquee_parse","text":"parsing, token assigned style based provided style set. styling cascading, without intricacies CSS. child element inherits styling parent options set NULL style matching child tag. style element relative() computed based value parent style element. em() elements resolved based size element child style, rem() elements resolved using size element body style. style provided tag, fully inherits style parent. Automatic coloring Recognizing primary use custom tags may change color text, marquee provides shortcut . style found tag provided style set, marquee check tag matches valid color (.e. string grDevices::colors(), valid hex string, e.g. #53f2a9). valid color set font color style. means parsing \"Color {.red } red\" automatically sets color \"\" red, even style provided red tag. Likewise, parsing \"Color {#00FF00 } green\" automatically set color \"\" #00FF00 (fully saturated green).","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"additional-parsing-information","dir":"Reference","previous_headings":"","what":"Additional parsing information","title":"Parse a text as marquee — marquee_parse","text":"Apart splitting text tokens, marquee_parse() also provides additional information useful rendering output expected way. id column refers tokens back original input text, block relates tokens together blocks. Block elements increment block count entered, decrement excited. type column provides type block. indentation column provides node level tree. child block increase indentation long active. ol_index provides number associated ordered list element. tight indicates whether list tight (.e. provided empty lines list elements). ends column indicate row output tag active (.e. tag closed row indicated value column).","code":""},{"path":"https://marquee.r-lib.org/dev/reference/marquee_parse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Parse a text as marquee — marquee_parse","text":"","code":"marquee_parse(\"# Header of the example\\nSome body text\", classic_style()) #> # A tibble: 3 × 40 #> text id block type indentation ol_index tight ends size #> #> 1 \"\" 1 1 body 1 0 FALSE 3 12 #> 2 \"Header of the… 1 2 h1 2 0 FALSE 2 27 #> 3 \"Some body tex… 1 3 p 2 0 FALSE 3 12 #> # ℹ 31 more variables: background , color , family , #> # weight , italic , width , features , #> # lineheight , align , tracking , indent , #> # hanging , margin_top , margin_right , #> # margin_bottom , margin_left , padding_top , #> # padding_right , padding_bottom , padding_left , #> # border , border_size_top , border_size_right , …"},{"path":"https://marquee.r-lib.org/dev/reference/style.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a style specification for a single tag — style","title":"Create a style specification for a single tag — style","text":"style() constructs marquee_style object specifying styling single tag. meaning NULL inherit value parent element. follows top parent (body element), must values options. base_style() constructor convenient constructor style sensible defaults options.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a style specification for a single tag — style","text":"","code":"style( family = NULL, weight = NULL, italic = NULL, width = NULL, features = NULL, size = NULL, color = NULL, lineheight = NULL, align = NULL, tracking = NULL, indent = NULL, hanging = NULL, margin = NULL, padding = NULL, background = NULL, border = NULL, border_size = NULL, border_radius = NULL, bullets = NULL, underline = NULL, strikethrough = NULL, baseline = NULL, img_asp = NULL ) base_style( family = \"\", weight = \"normal\", italic = FALSE, width = \"normal\", features = systemfonts::font_feature(), size = 12, color = \"black\", lineheight = 1.6, align = \"left\", tracking = 0, indent = 0, hanging = 0, margin = trbl(0, 0, rem(1)), padding = trbl(0), background = NA, border = NA, border_size = trbl(0), border_radius = 0, bullets = marquee_bullets, underline = FALSE, strikethrough = FALSE, baseline = 0, img_asp = 1.65 )"},{"path":"https://marquee.r-lib.org/dev/reference/style.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a style specification for a single tag — style","text":"family name font family use weight font weight use. Can either number (0, 100, 200, 300, 400, 500, 600, 700, 800, 900) strings (\"undefined\", \"thin\", \"ultralight\", \"light\", \"normal\", \"medium\", \"semibold\", \"bold\", \"ultrabold\", \"heavy\") italic font slanted width font width use. Can either number (``0, 1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`) strings (`\"undefined\"`, `\"ultracondensed\"`, `\"extracondensed\"`, `\"condensed\"`, `\"semicondensed\"`, `\"normal\"`, `\"semiexpanded\"`, `\"expanded\"`, `\"extraexpanded\"`, `\"ultraexpanded\"`) features font_feature object specifying OpenType font features apply font size size font points. Can relative() em() case based parent font size (size equivalent) rem() case based font size body element. color color font lineheight spacing subsequent lines relative font size. Can relative() case based parent lineheight. align alignment within text. One \"left\", \"center\", \"right\", \"justified-left\", \"justified-center\", \"justified-right\", \"distributed\" tracking Additional character spacing measured 1/1000em. Can relative() case based parent tracking. indent indentation first line paragraph measured points. Can relative() case based parent indent, em() case based font size style, rem() case based font size body element. hanging indentation first line paragraph measured points. Can relative() case based parent hanging, em() case based font size style, rem() case based font size body element. margin margin around element, given call trbl() padding padding around element, given call trbl() background color background fill. background includes padding margin. Can solid color gradient pattern made grid::linearGradient()/grid::radialGradient()/grid::pattern() border color background stroke. background includes padding margin border_size line width background stroke, given call trbl() border_radius corner radius background, given points bullets vector strings use bullets unordered lists. marquee_bullets provides selection underline text underlined strikethrough text strikethrough baseline baseline shift apply text img_asp default aspect ratio block level images provided image ","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a style specification for a single tag — style","text":"marquee_style object","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a style specification for a single tag — style","text":"","code":"# A partial style style(color = \"red\", underline = TRUE) #> #> color: red #> underline: TRUE # Full style base_style() #> #> size: 12 #> background: NA #> color: black #> family: #> weight: 400 #> italic: FALSE #> width: 5 #> features: #> lineheight: 1.6 #> align: left #> tracking: 0 #> indent: 0 #> hanging: 0 #> margin_top: 0 #> margin_right: 0 #> margin_bottom: rem(1) #> margin_left: 0 #> padding_top: 0 #> padding_right: 0 #> padding_bottom: 0 #> padding_left: 0 #> border: NA #> border_size_top: 0 #> border_size_right: 0 #> border_size_bottom: 0 #> border_size_left: 0 #> border_radius: 0 #> bullets: •, ◦, ▪, ▫, ‣, ⁃ #> underline: FALSE #> strikethrough: FALSE #> baseline: 0 #> img_asp: 1.65"},{"path":"https://marquee.r-lib.org/dev/reference/style_helpers.html","id":null,"dir":"Reference","previous_headings":"","what":"Helpers for defining styles — style-helpers","title":"Helpers for defining styles — style-helpers","text":"marquee provides small set helpers constructing needed styles. relative() specifies numeric value relative value parent style certain factor, e.g. font size relative(0.5) give style font size half parent. em() specify numeric value relative font size current style. font size 12, indent set em(2), indent equivalent 24. rem() works like em() rather using font size current style uses font size root style (body element). trbl() helps construct styles refers sides rectangle (margin, padding, border size). function names refers order arguments (top, right, bottom, left). skip_inherit() tells style inheritance ignore value look value one stack. marquee_bullets just character vector 6 sensible bullet glyphs unordered lists.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_helpers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helpers for defining styles — style-helpers","text":"","code":"relative(x) em(x) rem(x) trbl(top = NULL, right = top, bottom = top, left = right) skip_inherit(x) marquee_bullets"},{"path":"https://marquee.r-lib.org/dev/reference/style_helpers.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Helpers for defining styles — style-helpers","text":"object class character length 6.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_helpers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helpers for defining styles — style-helpers","text":"x decimal number. vector provided first element used top, right, bottom, left Values sides rectangles. Either numbers modifiers (relative, em, rem)","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_helpers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helpers for defining styles — style-helpers","text":"Objects relevant class","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_helpers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helpers for defining styles — style-helpers","text":"","code":"relative(0.35) #> relative(0.35) em(2) #> em(2) rem(1.2) #> rem(1.2) # Argument default means it recycles like CSS if fewer values are specified trbl(6, em(1.5)) #> A marquee trbl #> top: 6 #> right: em(1.5) #> bottom: 6 #> left: em(1.5) skip_inherit(\"sans\") #> sans (no inheritance) marquee_bullets #> [1] \"•\" \"◦\" \"▪\" \"▫\" \"‣\" \"⁃\""},{"path":"https://marquee.r-lib.org/dev/reference/style_set.html","id":null,"dir":"Reference","previous_headings":"","what":"Create or modify a style set that describes a full markdown text — style_set","title":"Create or modify a style set that describes a full markdown text — style_set","text":"style set contains information style various tags markdown text. necessary provide style tags (just inherit parent missing), required provide complete style body tag option avialable inheritance tags style options. can often easier derive new style set existing one rather building one scratch.","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create or modify a style set that describes a full markdown text — style_set","text":"","code":"style_set(...) modify_style(style_set, tag, ...) remove_style(style_set, tag)"},{"path":"https://marquee.r-lib.org/dev/reference/style_set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create or modify a style set that describes a full markdown text — style_set","text":"... Named arguments providing style specific tags. modify_style() number style options change. first argument marquee style overwrite tag subsequent arguments ignored style_set style set modify tag name tag modify remove. Tags internally lowercase tag converted lowercase matching","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create or modify a style set that describes a full markdown text — style_set","text":"marquee_style_set object","code":""},{"path":"https://marquee.r-lib.org/dev/reference/style_set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create or modify a style set that describes a full markdown text — style_set","text":"","code":"# Create a style s_set <- style_set(base = base_style(), p = style(indent = em(2))) # Modify an existing tag modify_style(s_set, \"p\", size = 16) #> #> [1] # Add a new tag, supplying a full style object modify_style(s_set, \"str\", style(weight = \"bold\")) #> #> [1] # Same as above, but style object created implicitly modify_style(s_set, \"str\", weight = \"bold\") #> #> [1] # Remove a tag style remove_style(s_set, \"p\") #> #> [1] "},{"path":"https://marquee.r-lib.org/dev/news/index.html","id":"marquee-development-version","dir":"Changelog","previous_headings":"","what":"marquee (development version)","title":"marquee (development version)","text":"Fixed bug bullet placement affected tight lists multiple spans (#18) code spans gains slight horizontal padding let background breathe bit. Currently padding around spans doesn’t affect shaping (.e. doesn’t move text ’s neighbors). Better adherence margin collapsing rules CSS. background border now prevent collapsing Add force_body_margin argument enforce body margin influenced collapsing (allowing turn completely). setting turned geom_marquee() element_marquee() (#23)","code":""},{"path":"https://marquee.r-lib.org/dev/news/index.html","id":"marquee-010","dir":"Changelog","previous_headings":"","what":"marquee 0.1.0","title":"marquee 0.1.0","text":"CRAN release: 2024-05-28 Initial CRAN submission.","code":""}]