A collection of code/fixes for Tufte style documents. #15240
sasja-san
started this conversation in
Show and Tell
Replies: 2 comments 7 replies
|
@sasja-san Thanks for sharing. May I suggest to share a GitHub repository instead of a Zip archive with unknown content? Important Accessibility: To improve accessibility, please add alternative text to your screenshots. This helps all users, including those using screen readers, to understand the context of the images. A brief description can make a big difference! See Good Alt Text, Bad Alt Text — Making Your Content Perceivable. |
1 reply
This comment was marked as off-topic.
This comment was marked as off-topic.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
I've asked my clanker (Claude) to help me fix a bunch of issues I've had with PDF generation from Quarto and it figured many of the things out.
I've used Quarto for academic writing and for writing lab assignments for at intro to electronics course (among others). Some of the problems I've had was getting a table in the margin be indexable by
@tbl-X, which I spent an hour or three on way back, but now Claude figured it out in a few minutes. Here are some pictures of what this allows you to do:Example Images
Pages making use of callout boxis, as well as custom callout boxes (a filter in the lua/ dir) as well special way to make these boxes so that they don't adhere to the smallening of font sizes when placed in the margin.

A rotated full-page table. Also uses a gray bar on every other line of the table, makes tracking which line you're reading from a lot easier. I have yet to try out if I can create a tag which references it from the text, but I hope that part works (it's in another example, see pdf file). Also some Mermaid examples and code boxes (style declared in

_quarto.yml).I have since fixed the gray backgrounds. See bottom of this post.
This last image shows off what I used a lot of for lab exercises. When doing lab work (electrics lab) one desire you have with the document is that you want an easy check of correct answers. Meaning: You want the students to always write the answers for question nr. N on the same page on page P, so I needed an easy way to create lines which have correct spacing for hand writing.

Another thing happening here is that the lines at the bottom are adjusted to the bottom of the main column on the page. Because normally with the KOMA thing Quarto does there's no bottom of the bottom column. But this contains a fix for it.
The actual code:
quarto-tufte-template.zip
The generated PDF.
graphical_objects.pdf
Because I wanted to have better control over the page layout, the
\geometrystuff had to move to theinclude-in-headersection of the YML file. I hope you find it structured enough to extract what you need from it.table-guides.lua update
As mentioned above, since writing this post my clanker figured out how to make the gray background not stick out on the sides in the tables. Here's the diff:
All reactions