Movatterモバイル変換


[0]ホーム

URL:


Dirk Eddelbuettel

tint: Tint is not Tufte

Build StatusPackage-LicenseCRANDependenciesDownloadsLast Commit

Motivation

The (html and pdf) styles provided by thetufte package makeit very easy and convenient to create documents in the celebrated styleofEdward Tufte.

The clear layout, focused use of white space and unparalleled use ofthe margin for complementary information, including graphs, offer anovel and very valuable resource for typesetting.

Yet at the same time, not everybody is a fan of the yellow tint, andthe fonts. I had been looking for a while for an alternative, andsomewhat recently came acrossenvisioned cssby Jef Lippiat. It gets a few things very right: use of the beautifulRoboto font alongwith a closer-to-white background. So I ‘mixed this’ with the codeframework provided by JJ and Yihui to make it anRMarkdown template you can usejust by installing this package. Among the small changes I made were theremoval ofitalics in subheaders and the title.

Similarly, LaTeX styles exists and thetufte supports bothpdf handouts and a book format. We first supported the pdf handoutoutput only, and added support for a pdf book format in release0.1.0.

Example

HTML

A quick screenshot of the html variant is below:

and the full underlying document isavailable too. Itssources are included in the packages ashtml/skeleton.Rmd.

PDF

Another screenshot shows the pdf variant:

and its underlying sources are included aspdf/skeleton.Rmd.

Here is a screenshot of the book format (which was added with release0.1.0), showing a chapter-opening page on the left:

PDF Font Variants

Since release 0.1.1 additional fonts can be specified in the YAMLheader. Using the following lines in the YAML header

latexfonts:-package: newtxmathoptions:- cmintegrals- cmbraces-package: ebgaramond-maths-package: nimbusmononarrow

yields output as in the following screenshot of the first twovignette pages:

A second example is using

latexfonts:-package: latooptions: default-package: FiraMonolinkcolor:"0.3,0.3,0.6"

which also show thelinkcolor option resulting in

Status

The package is now onCRAN and supportsboth pdf and html output for handouts, as well as pdf format forbook-length documents. This latter style can be used withrmarkdown orbookdown.

Usage

Install fromCRAN as anyother package via

R>install.packages("tint")

and then use as a Markdown template via RStudio, or callrmarkdown::render() directly. We have also used thebook-length format viabookdown::render_book().

Requirements

Beyond the R package dependencies a workingpandocbinary is needed. RStudio installs its own copy, otherwise do what isneeded on your OS (i.e. something likesudo apt-get install pandoc pandoc-citeproc).

The pdf mode requires a fairly complete LaTeX installation. OnDebian/Ubuntu, the following packages should provide working set:

texlive-basetexlive-binariestexlive-fonts-extratexlive-fonts-recommendedtexlive-generic-recommendedtexlive-humanitiestexlive-latex-basetexlive-latex-extratexlive-latex-recommendedtexlive-pictures

See Also

  • binb: Binb is notBeamer: Stylish pdf Presentations from RMarkdown
  • linl: Linl is notLetter: LaTeX letters from RMarkdown
  • pinp: Pinp is notPNAS: Snazzy one-or two column short papers or vignettes

and theminmpackage installing all of them.

Authors

Dirk Eddelbuettel and Jonathan Gilligan, borrowing heavily from JJand Yihui intufte, Dave Liepmanin the underlyingtufte-css, JefLippiat inenvisioned cssand also relying on the work of theTufte-LaTeXauthors.

License

GPL-3 for my parts and the code fromtufte, mostly MITfor what comes from Dave Liepman and Jef Lippiat.

Initially created: Sat Sep 24 17:54:31 CDT 2016
Last modified: Thu Sep 25 19:51:00 CDT 2025


[8]
ページ先頭

©2009-2025 Movatter.jp