Ah hah. Got it
Use Case:
1. I want to create footnotes in my document in the form of <<footnote
"This is some footnote text">>
e.g.: This is some text <<ref "Text is a collection of letters, spaces
and numbers">> And this is a formula: 2+3=5 <<ref "A formula is numbers
plus operators">>
should display as: This is some text *1* And this is a formula: 2+3=5
*2* with the footnote numbers popping up the text when clicked
2. I want the footnotes to be numbered sequentially when displayed without
me having to manually enter the footnote number
3. I want the footnote text to display in a popup when the number is clicked
The problem is with #2, auto-generation of numbers within the text on a
page. I don't know of any facility in TiddlyWiki that can do that without
some trickiness.
Trickiness options
1. Store the footnote text as entries in a list with the list sorted in the
order of their presentation on the page
2. Just manually enter the footnote number as a macro parameter and forget
the "automatically" part of request #2
\define footnote(tiddler, text, number)
<$set name="state" value="$:/state/$tiddler$/$number$">
<$button popup=<<state>> class="btn-invisible"
style="border-width:0px">
<$reveal type="match" text="" default="" state=<<state>> >
$number$
</$reveal>
<$reveal type="nomatch" text="" default="" state=<<state>> >
<span class="footnote">
$text$
</span>
</$reveal>
</$button>
</$set>
\end
\define ref(text, number)
<$macrocall $name="footnote" tiddler=<<currentTiddler>> text="$text$"
number="$number$" />
\end
This is some text <<ref "Text is a collection of letters, spaces and
numbers" "1">> And this is a formula: 2+3=5 <<ref "A formula is numbers
plus operators" "2">>
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/994040fc-459f-42ee-bbef-ecfee682d164%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.