tint
tint copied to clipboard
Side note with blockquote or table has different alignment
I would like the ability to add side notes from within tables and blockquotes. If I figure out a method that works for either of these options, I'll add it to this request.
I did ask the question, regarding the table and side note on Stack Overflow, but didn't get any answers from the community. I ended up taking the footer out of the table and used inline styling to adjust the margin and line height, so it would look as if it were a part of the table. You can read the question I posed with images of the issue here: https://stackoverflow.com/questions/67310557/table-footer-with-linked-margin-note-creating-large-break-in-text/67317471#67317471
Using blockquotes with a side note created a side note shifted to the left, no longer in line with the other side notes. I tried both the pdf and HTML templates and a lot of different styling methods to make these elements work without success. I ended up using an independent margin note, instead of linking the text to the side note.
The syntax for either of these issues was almost as 'vanilla' as you can get. The SO question depicts coding an image, as it occurs with the table. Below I've provided coding to demonstrate what happens when you use a side note with a block quote.
---
title: "Tint Is Not Tufte"
subtitle: "An example of a blockquote with and without a side note"
date: "`r Sys.Date()`"
output: tint::tintHtml
bibliography: skeleton.bib
link-citations: yes
---
library(tint)
# invalidate cache when the package version changes
knitr::opts_chunk$set(tidy = FALSE, cache.extra = packageVersion('tint'))
options(htmltools.dir.version = FALSE)
This is traditional text.
>"Now I really want to blockquote myself to demonstrate what happens with a side note.[^1]
[^1]: Check out this awesome side note.
Now I really want to demonstrate the difference with a p tagged text element with a side note.[^2]
[^2]: The side notes don't align.
Thanks!
Noted. Not sure I can do much for you here as the actual formatting code is finicky.
One thing you could try is to see how the related tufte
package deals with that. If it ends up with better formatting then maybe a volunteer can align the two code bases.
Closing as stale.