epoxy 0.0.2.9000
epoxy’s knitr engine is now
epoxy
and notglue
. This avoids a name clash with the glue package, which provides aglue
knitr engine with similar functionality. epoxy also providesepoxy_html
andepoxy_latex
knitr engines, although they can still be used via their aliasesglue_html
andglue_latex
. (#21)ui_epoxy_html()
will now render elements with IDs using the#
syntax, e.g.{{h3#name.author full_name}}
will create an element that is (essentially)<h3 id="name" class="author">{{ full_name }}</h3>
(#22).epoxy requires glue >= 1.5.0.
Added a new internal dataset,
bechdel
, containing details for a random sample of ten movies that received a score of 3 on the Bechdel Test (#24).epoxy’s style transformers can now be chained via
epoxy_style()
. For example to use bothepoxy_style_bold()
andepoxy_style_collapse()
on all replacement strings, you can callepoxy_style("bold", "collapse")
.epoxy_style()
accepts a style function name, e.g."collapse"
, the function object directly, e.g.epoxy_style_collapse
, or a call to a style function, e.g.epoxy_style_collapse()
(#26).Added a new
vignette("inline-reporting")
with thanks to @tjmahr for the inspiration (#25).The epoxy style transformers for bold, italic and code styles now choose the correct syntax for the
epoxy
(markdown),epoxy_html
andepoxy_latex
engines. Alternatively, you can force the desired syntax by setting thesyntax
option (#28).epoxy’s knitr engines can now be set manually via the newly exported (and renamed)
use_epoxy_knitr_engines()
. This function is called when epoxy is loaded, so you most likely do not need to call it directly. In general, you can instead simplylibrary(epoxy)
. epoxy previously provided aglue
chunk rather than anepoxy
chunk and you can restore this behavior by callinguse_epoxy_glue_engine()
(#30).Added a new chunk option,
epoxy_style
, that takes precedence over the.transformer
chunk option. The new chunk option is best paired withepoxy_style()
, and for convenience you can prove a vector of style names or a list of functions, e.g.epoxy_style = c("bold", "collapse")
(#31).A new styler,
epoxy_style_apply()
, can be used to globally apply a function to glue expressions.epoxy_style_apply()
uses the same syntax aspurrr::map()
for defining the function, i.e.tolower
or~ tolower(.x)
(#37).epoxy_style_format()
provides a small inline function,fmt()
that can be used to apply specific formatting to an expression. It wraps all of the label functions from the scales package and provides shortcuts for many labellers. For example,{fmt(x, "%")}
will formatx
as a percentage usingscales::label_percent()
and{fmt(x, "$")}
will formatx
as a dollar figure. You can also provide your own functions (#39).By default,
epoxy_style_format()
(#44) andepoxy_style_collapse()
(#45) are now available in all epoxy chunks. This means you won’t need to specify theepoxy_style
chunk option to use the inlinefmt()
function or the*
,&
, or|
collapse syntax.epoxy_style_collapse()
now uses the and ackage, which provides language-aware conjoining of strings. As a result, thesep_and
andsep_or
arguments ofepoxy_style_collapse()
are deprecated and are silently ignored if provided (#45).epoxy
,epoxy_html()
andepoxy_latex()
are now exported functions that power the knitr engines and use the same defaults (#46).The HTML element syntax used in
ui_epoxy_html()
is now available inepoxy_style_html()
and is used by default inepoxy_html()
(#46).-
New
ui_epoxy_mustache()
provides a dynamically rendered Shiny UI element that uses the mustache templating syntax. The advantage of mustache templating overui_epoxy_html()
is that you have dynamic variables in the template can appear anywhere in the HTML, not just in the text portion (#51).-
ui_epoxy_whisker()
is also provided as an alias for discoverability/user comfort (#60).
-
epoxyHTML()
andrenderEpoxyHTML()
were renamedui_epoxy_html()
andrender_epoxy()
respectively. This better fits newer Shiny naming conventions and reflects thatrender_epoxy()
serves bothui_epoxy_html()
andui_epoxy_mustache()
(#56).
epoxy 0.0.2
Added a
whisker
engine that uses the whisker package instead ofglue
.The chunk option
glue_data
was changed todata
.The
glue_html
engine now uses{{
and}}
for open/close delimiters.glue/whisker chunks now accept
.envir
chunk option for the containing environemnt, otherwise falling back to theknitr::knit_global()
env.