Here's a pill for your latex
-ache. Allows to build reports with consistent style, with appropriate branding, typography and bibliography. Integrates with RStudio. Just what the doktor
prescribed.
- You obviously need R. RStudio is optional, but recommended.
- You also need a
latex
installation, like TeX Live or MiKTeX, - as well as
rmarkdown
package. - Make sure SciPy is installed (
python3-scipy
in dpkg-based distros). - The example report uses Merriweather and Ubuntu fonts; see below for installation instructions.
Merriweather and Merriweather
Sans can be either
downloaded directly from Google, or installed as a part of the
texlive-fonts-extra
package. Note that the fonts included in the package may
be outdated compared with their upstream versions. If downloading from Google:
-
Unzip the archives somewhere (say, into
/usr/local/share/fonts
); make sure the directory is accessible to fontconfig, if not create a corresponding config file, like/etc/fonts/conf.d/08-local-share.conf
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <dir>/usr/local/share/fonts</dir> </fontconfig>
-
Rebuild the font cache with
fc-cache -fsv
.
The Ubuntu fonts are bundled with the
fonts-ubuntu
package.
If package devtools
is installed:
devtools::install_github("tonytonov/doktor")
Alternatively, check out the repository and install manually.
Create new document from RStudio via "File" -- "New File" -- "R Markdown..." -- "From Template". Knit the default document to see if everything works fine.
Examples are in inst/
:
There are two additional LyX templates in inst/lyx/templates/
:
dxfeed-doktor.lyx
which mimics the look ofdoktor
-generated documents --- handy if you need to typeset complicated mathematics. You won't be able to run R code chunks and get the output right in the document, though.dxfeed-slides.lyx
for producing dxFeed-branded beamer presentation slides.
Feel free to open issues and suggest new templates or tweak existing.