Hi,

Thanks for showing interest! In the demo, sidenotes are separate tiddlers, 
and to add them just use the macro <<comment 
"title_of_tiddler_to_show_on_the_side">>

Best,
Anders

fredag 29. januar 2021 kl. 02:09:20 UTC+1 skrev [email protected]:

> Anders,
>
> Thanks for the demo. From the demo I cannot see how to add a sidenote to 
> the tiddler.
> How would that be done?
>
> Thx
>
> On Tuesday, November 3, 2020 at 6:28:16 PM UTC-5 Anjar wrote:
>
>> 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/2e741e95-2c12-416b-922e-f65494a6dc8dn%40googlegroups.com.

Reply via email to