SPECIFICATION:
<<xref
fun: {anchor|ref|list}
type: {ref|graph|formula|note|table} // a set of types is defined by user dynamically
view: format_string // examples: "n. t.", "t (a)", "[a]", "(n)"
// where 'a' - autonumber, 'n' - 'text of 'obj_name', 't' - text of 'desc'
// inserted text is wikifiable (for KaTeX, macros, etc.)
name: obj_name // used for 'fun:anchor' and 'fun:ref'
desc: obj_text_descriptor // used for 'fun:anchor' only
>>
USE:
Anchor:
wiki code:
qwerty <<xref anchor ref "[n]" "SJ-2015" "S.Johnson. Paper title. Publ. 2015">> mnbv
wiki view:
qwerty [1] mnbv
wiki code:
<<xref anchor ref "n. t" "SJ-2015" "S.Johnson. Paper title. Publ. 2015">>
<<xref anchor ref "n. t" "WS-2016" "W.Simpson. Another paper title. Publ. 2016">>
wiki view:
1. S.Johnson. Paper title. Publ. 2015
2. W.Simpson. Another paper title. Publ. 2016
Reference:
wiki code:
asdf [<<xref ref "[n]" ref "SJ-2015" >>] kjhg
wiki view:
asdf [1] kjhg
List:
wiki code:
<<xref list "n. t" ref>>
wiki view:
1. S.Johnson. Paper title. Publ. 2015
2. W.Simpson. Another paper title. Publ. 2016
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/f3e3c3ce-55f2-42db-8a4f-d59e8cdf809d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Do I understand, the key reason is to reference artifacts in the text, tables, figures etc, using a number that has being assigned to each artifact?
I imagine you also want these numbers ordered according to there placement in a monolythic document?
If so I may have an idea.
Tony
Olegs post is not an explanation to me, its code I would have to study.
If my guess at what you are after is correct there is an approach I am thinking of testing.
First I would have independant tiddlers for the artifacts, and a macro to reference them by tiddler name yet display the reference number which could be found in a field of the artifacts tiddler or using a css count as suggested.
I am not sure a simple increment is enought, when artifacts could be numbered first by chapter/ section. Eg figure 2.5
Regards
Tony
\define artifact(tiddlername)
<$tiddler tiddler=$tiddlername$>
{{!!caption}}
<$transclude tiddlername=$tiddlername$/>
{{!!reference}}
</$tiddler>
\end
\define artifact-reference(tiddlername)
<$tiddler tiddler=$tiddlername$>
{{!!reference}} {{!!caption}}
</$tiddler>
\end
The most semantic HTML elements to use in your macro would be <figure> and <figcaption>, see http://html5doctor.com/the-figure-figcaption-elements/
All the best,
Thomas
Is there any reference or experience using auto-numbering for captions in TW?
The reality is the established rules of formal documents took place on static printed documents and the hypertext nature of tiddlywiki is a contextual shift.
We need to map interactive to static solutions for printing (even just to pdf) however we need to accept that a loss of capability occurs. Perhaps it is time to improve the rules.
Tony
Hi Mohammad,The issue is that the internal counter doesn't reset until reload. It would be possible to add a reset feature to the JS macro, so that it starts over on rendering.
But this might not even be the direction you were thinking of going? Outside of the inevitable anomalies, is this what you were thinking of?
Your sample page looks sooo much better than my examples ;-)
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/a596b726-321a-42fc-b9cb-73f975241dd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ciao Mohammad & Mark
I note Test Bibtex stops showing references when you open the Autoref Test? Is that just 'cause its a test suite?
A case, for instance, "publish" via TW a single paper (Tiddler with transclusions) but still need the enumeration to match a list that is for several such papers you are working on that have a shared bibliography--but is not finished yet. That's an example where maybe your approach could more easily solve it? Hope this is clear!
@TiddlyTweeter wrote:A case, for instance, "publish" via TW a single paper (Tiddler with transclusions) but still need the enumeration to match a list that is for several such papers you are working on that have a shared bibliography--but is not finished yet. That's an example where maybe your approach could more easily solve it? Hope this is clear!
I don't know how you would match numbers in papers made in other software unless both followed the same, strict, rules on enumeration. Otherwise the only hope would be to have the numbers hard-coded in the tiddlers. In which case TW would be just a different format for the existing article, begging he question: "Why TW?"
Maybe I will get round to an overview sometime of what I know of them. At the moment I think we slightly conflating needs on-line with needs in serial printed text and oddly I do think it might be easier to clearly separate them.
<<autoref action:{link|ref|reset|"max"} tiddler:"" ns:"REF">>
<<autorefset tid ns_val:"REF">>
<<autorefshow tid ns_val:"REF">>
<<autoreflist ns_val:"REF">>
The approach used here will work under certain conditions - in particular, it will break in the face of partial refreshes of the page. With care, you will be able to avoid the breaking conditions through hacks such as forcing a refresh with every change to the store. The challenge is that unless you intimately understand the refresh mechanism then it's pretty much going to feel like witchcraft, with no obvious rhyme or reason.
By the way I think for preparing long scientific text this may be not easy!
I have already done something like this based on "outlier" and or the toc internal navigation by providing an alternate viewtemplate to display tiddlers.
Regards
Tony
My exploration of this issue shows absence of decent plugin or macros.So let me suggest for consideration of TW community the following specification (in meta language) of such an instrument:
SPECIFICATION:
<<xref
fun: {anchor|ref|list}
type: {ref|graph|formula|note|table} // a set of types is defined by user dynamically
view: format_string // examples: "n. t.", "t (a)", "[a]", "(n)"
// where 'a' - autonumber, 'n' - 'text of 'obj_name', 't' - text of 'desc'
// inserted text is wikifiable (for KaTeX, macros, etc.)
name: obj_name // used for 'fun:anchor' and 'fun:ref'
desc: obj_text_descriptor // used for 'fun:anchor' only
>>
USE:
Anchor:
wiki code:
qwerty <<xref anchor ref "[n]" "SJ-2015" "S.Johnson. Paper title. Publ. 2015">> mnbv
wiki view:
qwerty [1] mnbv
wiki code:
<<xref anchor ref "n. t" "SJ-2015" "S.Johnson. Paper title. Publ. 2015">>
<<xref anchor ref "n. t" "WS-2016" "W.Simpson. Another paper title. Publ. 2016">>
wiki view:
1. S.Johnson. Paper title. Publ. 2015
2. W.Simpson. Another paper title. Publ. 2016
Reference:
wiki code:
asdf [<<xref ref "[n]" ref "SJ-2015" >>] kjhg
wiki view:
asdf [1] kjhg
List:
wiki code:
<<xref list "n. t" ref>>
wiki view:
1. S.Johnson. Paper title. Publ. 2015
2. W.Simpson. Another paper title. Publ. 2016
It would be great to realize this instrument.
caption
."?Furuyama Moromasa. Portrait of Ichikawa Danjuro II as Kamakura no Gongorô, 1736. The Art Institute of Chicago.