xaringan v0.5
NEW FEATURES
-
The default CSS file was split into two files default.css and default-fonts.css to make it easier to define custom font styles without copying all base CSS definitions. For example, the
css
argument ofxaringan::moon_reader
can take a vector ofdefault
andextra.css
, and you define your custom font styles inextra.css
. -
For the
css
argument, if a value does not end with.css
, it is assumed to be a built-in CSS file in this package. Currently all available CSS files can be found at https://github.com/yihui/xaringan/tree/master/inst/rmarkdown/templates/xaringan/resources. See?xaringan::moon_reader
for more details. This change was to make it easier for users to contribute custom themes (https://yihui.name/en/2017/10/xaringan-themes/). -
Added a new sub-option
beforeInit
under thenature
option, which can be used to specify JavaScript files to be executed before the instantiation of slides (i.e., beforeremark.create()
). One application of this new feature is to define custom remark.js macros; see the slide "Macros" at https://slides.yihui.name/xaringan/ for more info (thanks, @gavinsimpson, #80). -
Line highlighting can also be turned on using a special comment
#<<
at the end of a line of code now (thanks, @gadenbuie, #103).