Hi all!
Some of you may be familiar with Edward Tufte
(https://edwardtufte.github.io/tufte-css/), and I think his sidenote
approach can be useful in TiddlyWiki as well if one wants to add comments
to the contents of a tiddler. I tried to make a simple macro which work
fairly well, but to make a new number for each comment, I need to generate
a unique ID for it. Is this possible or do I need another approach? For
example, I added highlighting on hover which may reduce the need for unique
identifiers., but it would still be nice for say printing.
\define comment(txt)
<span class="comment"><label for="sn-demo"
class="margin-toggle sidenote-number">
</label>
<input type="checkbox"
id="sn-demo"
class="margin-toggle"/><span class ="sidenote">$txt$</span></span>
\end
<style>
.comment:hover .sidenote {
background-color: yellow;
}
input.margin-toggle {
display: none;
}
label.sidenote-number {
display: inline;
}
label.margin-toggle:not(.sidenote-number) {
display: none;
}
.sidenote,
.marginnote {
float: right;
clear: right;
margin-right: -60%;
width: 50%;
margin-top: 0.3rem;
margin-bottom: 0;
font-size: 1.1rem;
line-height: 1.3;
vertical-align: baseline;
position: relative;
}
.sidenote-number {
counter-increment: sidenote-counter;
}
.sidenote-number:after,
.sidenote:before {
font-family: et-book-roman-old-style;
position: relative;
vertical-align: baseline;
}
.sidenote-number:after {
content: counter(sidenote-counter);
font-size: 1rem;
top: -0.5rem;
left: 0.1rem;
}
.sidenote:before {
content: counter(sidenote-counter) " ";
font-size: 1rem;
top: -0.5rem;
}
</style>
This<<comment "or that">> is an<<comment "an before e-">> example<<comment
"right?">>
Best,
Anders
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/fa230aa6-304a-4ad5-816a-8aa7c443eab4n%40googlegroups.com.