Comments (6)
I have been lazy with just reverting to html for lots of stuff because that's the route I came from. That being said, it's formulaic enough that I really should package it. I will look into this shortly. Thanks for bringing it up!
from tuftesque.
If it helps any, you can include in your tuftesque-themed blog posts a lot of the tufte elements, even marginfigure{}
, from the tufte package. You just need to first create your post in an R Markdown document and knit it outside of blogdown and tuftesque. That is, don't use blogdown::build_site()
just yet. Then after knitr produces your html document, copy the html code from that document and paste it into a brand new post created using blogdown and tuftesque, i.e., use new_post()
. Now you can use build_site()
on the new post and your margin figures, plots, or whatever else you created from the tufte package will magically appear. A lot of other Hugo themes won't respect this simple copy-paste method and won't render the html reflecting margin figures and code chunks as nicely as tuftesque.
...But the problem I'm now having with the above method is that tuftesque doesn't like the smart quotes inside the pasted html (or is it vice versa?). When tuftesque renders a document containing html code that was knit using the tufte package, phrases like "predictive models" (with quotes) appear as “predictive modelsâ€� (quotes replaced by weird symbols). Or the simple phrase "It's" (with a smart apostrophe) winds up appearing as Itâ€TMs.
Any suggestions?
from tuftesque.
The margin_note
function only works when done on an inline R snippet. Aka
# title
this is some text `r tufte::margin_note("this is my note")`
continuing my normal text
You could also specify the output of the larger chunk to asis. Aka {r, results = "asis"}
and it should work too. Basically, since it outputs raw html a normal R chunk wont work because it wraps the output in a <code>
html block to make it clear its coming from R code.
from tuftesque.
Great, should have read your blog post twice...
No luck with the suggestion {r, results = "asis"}
...
```{r, results='asis'}
tufte::margin_note("this is my note")
```
from tuftesque.
I'm interested in a tool though...
Would really love to be able to adapt @yihui Tufte handout tools that allow chuck options that format chuck output in the awesome Tufte margin style.
I see that on on the LFOD blog you guys just use inline html to add video/image content in the margin... so might try a work around
from tuftesque.
Hi, I was having similar issues trying to use tufte::margin_note
and just wanted to suggest that it's more clearly documented. I thought we could use {marginfigure}
from the tufte package, but that doesn't work, which was quite confusing.
And I just wanted to say thanks a million, I really love this theme!
from tuftesque.
Related Issues (16)
- googleAnalytics.html partial layout is missing HOT 6
- Doesn't work with the blogdown rstudio widget HOT 2
- Creating a Menu Banner HOT 2
- Possibility for numbered sidenotes? HOT 2
- Add tint css option
- Margin Figures HOT 2
- Add ability to hide meta info from posts
- Failure to insert a margin note with an image HOT 1
- Incorporating lightbox feature including within a margin note HOT 21
- Syntax highlighting does now work out of the box HOT 1
- footer fix from mmrath/hugo-bootstrap@33dba4c HOT 2
- Add ability to customize background color HOT 1
- ERROR and WARNING with Hugo v0.26 HOT 3
- Properly implement relative urls. HOT 1
- sometimes the bullets are only half width HOT 1
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 tuftesque.