Comments (3)
@neuwirthe I use the css page model combined with weasyprint on the html version. Here's some example css, that you would include in your yaml header:
output:
tufte::tufte_html:
css: your_file.css
It does the following:
- prints in landscape
- forced page break on h1, h2 (in markdown that's headings at
#
and##
levels) - forces figures to stay entirely on one page
- adjusts the page sideways a little so that margin figures are displayed
- adds a copyright notice and page numbering to every page, other than the first.
@media print {
body {
background-image: none;
padding-left:0.75cm;
width: 100%;
}
/* table {
margin-top: 15px;
width: auto;
max-width: 100%;
} */
/* td {
padding:0 3px;
} */
h1, h2 {
margin:0 0 0.25cm 0;
page-break-before: always;
}
.figure {
page-break-inside: avoid;
}
@page {
margin: 1cm 0.75cm 1cm 0.75cm;
}
@page :first{
margin:0;
@bottom-left {content: "";}
@bottom-right {content: "";}
}
@page {
size: landscape;
@bottom-left {
content: "© My Special Company";
}
@bottom-right {
content: counter(page);
}
}
}
Step 1. Knit
Step 2. Review html
Step 3. python -m weasyprint your_file.html ~/path/to/pdf.pdf
from tufte.
I'd just use tufte::tufte_handout
instead.
from tufte.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
from tufte.
Related Issues (20)
- Fix issue with recent Pandoc HOT 3
- pass an offset value to \marginnote{} with tufte::margin_note()
- Undefined control sequence when using pandoc grid tables in pdf output HOT 5
- Tufte pdf documents fail to compile with `vadjust` error HOT 2
- nul file HOT 7
- Sidenotes show up as footnotes HOT 6
- Release tufte 0.12.0 HOT 1
- Upkeep for tufte HOT 1
- Broken citation formats in html HOT 4
- Register tufte engines in .onLoad()? HOT 4
- Upkeep for tufte HOT 1
- References not formatted properly (and text in italics) on the Tufte Rmd template out-of-the-box HOT 2
- words pasted together in longish html table captions HOT 4
- Release tufte 0.13 HOT 1
- Issue with reference parsing with Pandoc 2.11+ when multiple reference in same line HOT 7
- Strange rendering of Rmarkdown to HTML for tufte_html when using knitr/RStudio HOT 2
- Fullscreen-width figure HOT 2
- Side notes from tables and block quotes HOT 1
- Suggested feature: code folding
- Move `master` branch to `main` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tufte.