tufte | SVG plotting library for Perl | Animation library
kandi X-RAY | tufte Summary
kandi X-RAY | tufte Summary
Tufte is a port of the "scruffy"[1] plotting library for Perl 6. It is a work in progress (ie not yet done much).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of tufte
tufte Key Features
tufte Examples and Code Snippets
Community Discussions
Trending Discussions on tufte
QUESTION
I am working on converting a tufte-LaTeX book to tufte-Bookdown using the tufte and msmbstyle packages. I have a whole bunch of sidenotes and would like the numbering to restart with each chapter so I don't reach like 400 by the end of the book.
I found this CSS code in the Bookdown GitHub for doing this with regular Bookdown, which uses footnotes/endnotes. However, my attempts to modify the code to work with sidenotes have failed. This is my current CSS addition, which just takes that code and drops in sidenote
or sidenote-number
(which Inspect Element suggests are the correct tags) where footnote
originally was:
ANSWER
Answered 2021-May-26 at 05:27I ended up paying someone to solve this. They wrote some JavaScript that will fix it. The following code can be saved as an HTML file, and added to the book with
QUESTION
I would like to make a plot with R that looks like the sample made with Mac's Numbers. I'm struggling with the space between the plot and the legend box. This is a sample of what I would like to achieve:
With the help of some users (see end of post for reference) I got really close already. This is my current function:
...ANSWER
Answered 2021-May-27 at 17:07I think the easiest solution is to simply apply wrapping to the text in your legend. You can do this using stringr::str_wrap()
to give results like the following:
Here is a very minimal edit to your function which allows a user to control the text wrapping:
QUESTION
suppose I have an .R file tmp.R
with markdown tags, e.g.
ANSWER
Answered 2021-May-17 at 14:26You need to write the code in the temp.R
file, in such a way, that it can directly be evaluated in the chunk.
So for tmp.R use:
QUESTION
I am using the tint template in R Markdown for an HTML rendering. I don't think that this issue is specific to R or R Markdown, though. I think the fix can be accomplished with CSS or HTML. Although, I would guess that Dirk, Jon, or JJ, Yihui, or Dave could probably tell me how to fix this properly in R Markdown since they authored or contributed to the development of tint.
How can I modify this to prevent the margin notes from affecting the spacing below the table?
I did try setting the table tag with the styles align: left;
and float: left;
to see if that would work. Neither impacted the spacing at the bottom.
Here is the table footer with the margin note as HTML script:
...ANSWER
Answered 2021-Apr-29 at 12:33It may not be right, but it works. I took the footer off the table and added a
block with the footer content. Issue solved. I don't know why I didn't think of that sooner. (sigh)QUESTION
I use R for most of my data analysis. Until now I used to export the results as a CSV and visualized them using Macs Numbers.
The reason: The Graphs are embeded in documents and there is a rather large border on the right side reserved for annotations (tufte handout style). Between the acutal text and the annotations column there is white space. The plot of the graphs needs to fit the width of text while the legend should be placed in the annotation column.
I would prefer to also create the plots within R for a better workflow and higher efficiency. Is it possible to create such a layout using plotting with R?
Here is an example of what I would like to achieve:
And here is some R Code as a starter:
...ANSWER
Answered 2021-Apr-02 at 14:50Can it be done? Yes. Is it convenient? No.
If you're working in ggplot2 you can translate the plot to a gtable
, a sort of intermediate between the plot specifications and the actual drawing. This gtable, you can then manipulate, but is messy to work with.
First, we need to figure out where the relevant bits of our plot are in the gtable.
QUESTION
I'm building a file that will be compiled to PDF and HTML (gitbook and tufte style), and I'm trying to get my tikzpicture
environments working. I've seen that I can include them as figures by using something like
ANSWER
Answered 2020-Dec-03 at 23:20It turns out that you can simply put the \usetikzlibrary{...}
command directly before the \begin{tikzpicture}
and everything works fine :)
QUESTION
Knitting the following Rmd
file now takes ~2 minutes on a 2020 MacBook Pro:
ANSWER
Answered 2020-Oct-30 at 19:31Try running tinytex::reinstall_tinytex()
and then rerunning your report
QUESTION
I'm using a hugo theme: https://github.com/shawnohare/hugo-tufte which allows for the use of the shortcode {{% marginnote %}}...{{% /marginnote %}}
to create a margin note.
I want to output the actual text {{% marginnote %}}...{{% /marginnote %}}
on my final page, but all my attempts to escape the shortcode have come up short.
Wrapping it with '
s as you would in Hugo is not successful.
Neither is escaping those quotes
Nor wrapping it in a code block.
ANSWER
Answered 2020-Jun-19 at 13:58To escape Hugo shortcode calls, use syntax like this:
QUESTION
When using knitr with Rnw files, color of the font of captions created inside a chunk becames fgcolor.
This problem is similar to knitr kable: Text color in PDF from RNW is grey. This solution is not useful in this case.
Is there any way to solve this problem? Hacking knit_hooks$set(plot = myfunction)? How to? Thank you.
...ANSWER
Answered 2020-May-30 at 10:59This should do what you want, provided that the plots produced by your R code chunks are stored in a figure
folder:
QUESTION
I am trying to include a DT::datatable
in a Tufte html document using Bookdown
and knitr
packages. However, even if I set the width of the columns using culomnDefs
option, or the width of the kintr
output using fig.fullwidth = FALSE
or out.with = '50%'
option, the DT::datatable
is still displayed along the full width of the page, main column and margin column! As you can see in the image below, the DT::datatable
is below the histogram chart, but it should be placed right next to it in the main column only.
My question is simple, do you know how to display a DT::datatable
only in the main column of a Tufte html book? you may see the piece of code that produces the DT::datatable
Thank you so much for your help.
...ANSWER
Answered 2020-Jan-30 at 15:02As answered in https://github.com/rstudio/DT/issues/762, use the width argument in DT::datatable()
will do the trick:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tufte
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page