The goal of wimpress is to provide a shiny application to help customisation of
This shiny app strongly relies on the very nice package from Romain Lesur, weasydoc, whose goal is to convert
R Markdown to
CSS for Paged Media [...] allows conversion from HTML to PDF using CSS rules.. If you want to learn more about it, Romain gives some usefull references so I strongly recommand to take a look a his package.
Inputs of this shiny app are CSS properties names and values that can be added and changed by users. These inputs became variables for several
sass language files. Sass language is a CSS preprocessor language that allows utilisation of variables, loop, conditional statements... with CSS. These files are converted into one CSS file with the help of the sass RStudio package and used in weasydoc to render the result in a example
You can install the development version of wimpress with:
Please, be aware that both weasydoc and sass are in development and you have to install them to use wimpress. Note that weasydoc needs extra steps as you need to install WeasyPrint, a CSS for Pages Media converter. Please, refer to the repository of weasydoc for more information.
You can run the shiny app with :
CSS for Paged Media allows to change properties for all PDF pages or only the first, last, left or right pages. Besides, you can change only margin properties of these pages. The margins are split into 16 boxes that can independently received CSS rules : the four corners and a subdivision in three boxes of the top, left, bottom and right margins. This allows for example the definition of header and footer. The example document used to see the results of CSS rules is an explanation of how CSS for Paged Media works and how to use it in this app.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.