Discussion:
[tw5] Autonumbering
Mohammad
2018-12-06 17:09:54 UTC
Permalink
Is there any reference or experience using auto-numbering for captions in
TW?

I mean when you insert images with captions in a tiddler, TW number them?


--Mohammad
--
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 ***@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/5a6ec929-f5f7-4d14-99da-e3127a7995f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-12-07 05:58:54 UTC
Permalink
More info please Mohammad,

It seems you are not talking about the caption field but a "Caption" inside
the image? What does this have to do with Numbering?

Of course tiddlers them selves have a creation date, which allows you to
list tiddlers in the order they were created. If you wanted to this could
be considered a form of numbering.

Regards
Tony
Post by Mohammad
Is there any reference or experience using auto-numbering for captions in
TW?
I mean when you insert images with captions in a tiddler, TW number them?
--Mohammad
--
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 ***@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/664c63fa-6f61-4a67-ab48-bb0d6de375a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-12-07 06:11:59 UTC
Permalink
Hi Tony!
I am preparing some notes include many figures and equations. Each figure
and equation has a number to be referenced inside text. I am looking for a
simple method
TW number these equations, figure automatically the same way Latex or Ms
word do this.

--Mohammad
--
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 ***@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/80af2a49-c3c6-48f1-ad6d-a3b25cae3c85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-12-07 10:59:38 UTC
Permalink
Mohammad,

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
--
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 ***@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/5c1196cd-b06f-40e3-83e6-1710c50a4384%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-12-07 12:31:50 UTC
Permalink
Hi Tony!
That's true!

-Mohammad
--
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 ***@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/cd8e2a30-0ccd-4aac-b932-da1de584f461%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-12-07 12:36:21 UTC
Permalink
Tony!
Olegh explained the case in his post with details.
See above!

Mohammad
Post by TonyM
Mohammad,
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
--
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 ***@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/ebc24b19-d17c-47ee-b5f9-515dc8afa9a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-12-07 20:34:58 UTC
Permalink
Mohammad,

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
--
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 ***@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/41ffa1db-f1bc-4e04-9b6b-55c532d0dc64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-12-08 03:40:37 UTC
Permalink
Tony,
See this:
https://support.office.com/en-us/article/add-format-or-delete-captions-in-word-82fa82a4-f0f3-438f-a422-34bb5cef9c81

/Mohammad
--
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 ***@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/309c2519-0d78-4490-989b-1445003e49ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
oleghbond
2018-12-07 12:48:16 UTC
Permalink
Tony,

to make the tool much more valuable one has to include several function
such as:

1. repeated reference to the primary reference (anchor)
2. collecting all the links descriptors into a numbered list separately
for each type of objects (artifacts)
3. a popup window containing reference descriptor while the mouse hovers
the reference
4. etc.

As an example one can see https://protw.github.io/rdpdet/. The only
limitation of the example drawn - its work limited within a single tiddler
since TW version 5.1.17. For version 5.1.14 it worked properly for the
whole toddlywiki.

Olegh
Post by TonyM
Mohammad,
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
--
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 ***@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/5f9c382f-aa68-476c-a7b6-3d7bf680e424%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
oleghbond
2018-12-07 08:38:19 UTC
Permalink
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.
Post by Mohammad
Is there any reference or experience using auto-numbering for captions in
TW?
I mean when you insert images with captions in a tiddler, TW number them?
--Mohammad
--
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 ***@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.
Jeremy Ruston
2018-12-07 08:47:38 UTC
Permalink
That’s a very reasonable request, unfortunately, it’s not possible with TW5’s current design. It’s to do with the way that wikitext variables work. Widgets can define/modify variables and the values of those variables are then available within that widget. However, there’s no way to have a variable whose value changes between siblings; it isn’t possible to make a macro or widget affect the value of a variable in the immediately following text.

(This is actually one of the issues I want to tackle in TWX; it’s a classic case of something that is too late to change for TW5 because it would basically be a redesign of how widgets and variables work).

Best wishes

Jeremy.
Post by oleghbond
My exploration of this issue shows absence of decent plugin or macros.
<<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
qwerty <<xref anchor ref "[n]" "SJ-2015" "S.Johnson. Paper title. Publ. 2015">> mnbv
qwerty [1] mnbv
<<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">>
1. S.Johnson. Paper title. Publ. 2015
2. W.Simpson. Another paper title. Publ. 2016
asdf [<<xref ref "[n]" ref "SJ-2015" >>] kjhg
asdf [1] kjhg
<<xref list "n. t" ref>>
1. S.Johnson. Paper title. Publ. 2015
2. W.Simpson. Another paper title. Publ. 2016
It would be great to realize this instrument.
Is there any reference or experience using auto-numbering for captions in TW?
I mean when you insert images with captions in a tiddler, TW number them?
--Mohammad
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
Visit this group at https://groups.google.com/group/tiddlywiki <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 <https://groups.google.com/d/msgid/tiddlywiki/f3e3c3ce-55f2-42db-8a4f-d59e8cdf809d%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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 ***@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/F66CCC88-833B-4FB7-81A5-CE67689E921E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
@TiddlyTweeter
2018-12-07 12:09:19 UTC
Permalink
IF what you need is purely dynamic for what is in a story river (I.e.
opened Tiddlers) then CSS counters might do it. The downside is they are
not in the DOM. They are ephemeral. it depends on the intent whether the
(quite easy) CSS route is relevant.
Post by Mohammad
Is there any reference or experience using auto-numbering for captions in
TW?
I mean when you insert images with captions in a tiddler, TW number them?
--Mohammad
--
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 ***@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/2b56c300-ac4c-4cb6-8102-80d92587d721%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-12-07 12:32:41 UTC
Permalink
Josiah,
Could you give an example?

--Mohammad
--
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 ***@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/a42eb607-9625-45df-915b-26f910522b9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@TiddlyTweeter
2018-12-07 12:46:22 UTC
Permalink
M,

Probably easiest is simply to see this:

https://www.w3schools.com/css/css_counters.asp

or this ...

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Lists_and_Counters/Using_CSS_counters

J.
Post by Mohammad
Josiah,
Could you give an example?
--Mohammad
--
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 ***@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/1f6e80ef-b5ca-4d97-8d1f-aa8ed507e2ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-12-07 16:07:01 UTC
Permalink
Thanks Josiah,

I think I may be able to adopt the css-count for captions in a single
tiddler.

--Mohammad
--
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 ***@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/571a69f2-0505-41ef-93b1-547074d6c241%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-12-07 16:54:56 UTC
Permalink
Hello again Josiah,

I see Thomas Elmiger has adopted CSS-counter in TW for heading.

https://tid.li/tw5/numbers.html

He has a defined a class .nr which can be used to autonumber headings.

I think I can use his idea for captions! This can only be used in a single
tiddler and cannot be used for repeated items like references.

--Mohammad
--
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 ***@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/7a0088e7-5e5e-402f-9d7e-3d5e72428255%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thomas Elmiger
2018-12-07 17:31:39 UTC
Permalink
Hi Mohammad,

My CSS numbering experiments were never really satisfying...

Today I would suggest to split your formulas up into separate tiddlers. Most important reason: you can link to tiddlers. (And I think it should be possible to number them in the story. )

Jan built a solution to create temporary tiddlers for presentations (and to destroy them again after presenting, I think).

But my new approach would be to stay true to TW philosophy and build smallest meaningful parts as tiddlers, arrange them in a story – and possibly redesign the story river to give the impression of a single document.

Jan also built mechanisms to save and load stories, so you could build chapters this way.

I hope you get the idea.

All the best,
Thomas
--
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 ***@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/94c2da69-4fcf-4929-b21f-8e222920984d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-12-07 17:45:12 UTC
Permalink
Hello Thomas,

Many thanks for your comments. That's true, if I divide my work into
tiddlers, then TW has enough tools to let me number items and then refer to
them.
In the above post Jeremy also pointed out the current mechanism does not
allow such auto numbering.

By the way I think for preparing long scientific text this may be not easy!

Best
Mohammad
--
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 ***@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/013a2a0a-4fc3-4e18-b6e0-1ce9f2a6c705%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Mark S.' via TiddlyWiki
2018-12-07 15:19:26 UTC
Permalink
Based on experiments that I've done in the past, when I needed to
accumulate or remember values, something like this might be possible with a
set of javascript macros that surreptitiously change the value of variables
or keep their own name-space stash of variables.

Such an approach would be non-standard and might not be future-proof.

-- Mark
--
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 ***@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/368d7a0c-b81c-4479-94e4-4612bab4f114%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-12-07 16:05:43 UTC
Permalink
Thank you Jeremy, Mark,

I understood with the current situation of TW, what Olegh explained and
what I was looked for is not easy to attain with simple scripts in TW.
The CSS-counter may help but it cannot distinguish repeated items like
references.

I will look in the web to see what other wikis like Mediawiki do and is it
possible to solve this case at least partially.


--Mohammad
--
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 ***@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/f9f88b66-8615-44b0-9ad4-c12d32e3cb7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-12-08 05:14:15 UTC
Permalink
Mohammad,

It would take me too much time at present but its a worthy idea. If your
artefacts use html tables, or images etc... you could use the
https://www.w3schools.com/css/css_counters.asp css counters to increment a
reference number using css, However since these may change I would be
inclined to hard code the reference number in a field in the artefact
tiddler, then use a version of the following untested macros;

\define artifact(tiddlername)
<$tiddler tiddler=$tiddlername$>
{{!!caption}}
<$transclude tiddlername=$tiddlername$/>
{{!!reference}}
</$tiddler>
\end
\define artifact-reference(tiddlername)
<$tiddler tiddler=$tiddlername$>
{{!!reference}} {{!!caption}}
</$tiddler>
\end

Thus you would always reference an artifact by Tiddler name,

<<artifact-reference "tiddlername">> and it will return the reference and
caption only of that artifact tiddler, use this in the body of your text.

<<artifact "tiddlername">> and it will show the actual artefact where you
need it.

Other tricks could take this further like setting a standard to number
artefacts by chapter and section rather than generate them on the fly. You
could then use this in the index to say an artefact appears in Chapter N
section N.

Regards
Tony
Post by Mohammad
Thank you Jeremy, Mark,
I understood with the current situation of TW, what Olegh explained and
what I was looked for is not easy to attain with simple scripts in TW.
The CSS-counter may help but it cannot distinguish repeated items like
references.
I will look in the web to see what other wikis like Mediawiki do and is it
possible to solve this case at least partially.
--Mohammad
--
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 ***@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/8dad3fbb-9bdd-4b36-a6b3-93326eb04cee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-12-08 06:57:02 UTC
Permalink
Hello Tony!

Thank you very much! Yes this is a good idea!

I will try to adopt my solution around this.

My conclusion based on Jeremy, Thomas, and your comment is to go through
tiddlers for numbering and cross-referencing.


Thank you again
Mohammad
--
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 ***@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/58ae067d-5a90-4c6f-888a-7eaf19b5a59b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thomas Elmiger
2018-12-08 09:03:59 UTC
Permalink
Hi Mohammad,

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
--
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 ***@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/eff7456c-74c6-420c-8341-3e9703de666e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-12-08 10:16:07 UTC
Permalink
tHomas,

Yes the element flowchart helps define when to use figure and it sounds
right for "artifacts".

Loading Image...

Regards
Tony
Post by Thomas Elmiger
Hi Mohammad,
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
--
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 ***@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/c08a7d09-50ac-48af-bbf6-a0e1817fdb1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-12-08 13:08:10 UTC
Permalink
Thank you Thomas!
Thank you Tony!

I am reading it to see what html5 tells about it.

/Mohammad
--
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 ***@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/d7dcc746-d997-4b5b-b584-0e4d0a4a19c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
oleghbond
2018-12-08 14:46:23 UTC
Permalink
Not to forget I noted specifications
<https://protw.github.io/tw5/#%D0%9F%D1%80%D0%BE%D0%BF%D0%BE%D0%B7%D0%B8%D1%86%D1%96%D1%97%20%D1%89%D0%BE%D0%B4%D0%BE%20%D0%B0%D0%B2%D1%82%D0%BE%D0%BD%D1%83%D0%BC%D0%B5%D1%80%D0%B0%D1%86%D1%96%D1%97>
(from user's point of view) for autonumbering-referencing tool for those
who would challange the development an appropriate tool. The specifications
are written in Ukrainian (since the site is monolingual), although they can
be easily understood using Google translator or my translation just below:

The basic requirements can be summarized as follows:

1. *anchor:* ability of setting in the text the place the original
reference, as well as its label and description;
2. *reference:* ability of repeatative referencing of the original
reference from other places to the tiddler and from other tiddlers;
3. *list:* ability to create a list of all primary references;
4. *formatting:* ability to display whether the label or the automatic
number with a variety of representations (e.g., in round or square
brackets, with or without description, etc.), in addition to the
description inserted in the text should be wikified, that is, processed by
the wiki parser, to be able displaying, in particular, math formulas, other
macros, etc.;
5. *popup window:* mouse clicking a primary or a repeatative reference
launches a popup window containing wikified reference descriptor;
6. *toolbar button:* a button in the toolbar of the editor (as well as a
shortcut key) to insert a primary and a repeatative reference, selecting
the type of object from the list, and for repeatative reference
selecting the primary reference via label and description listing.
Post by Mohammad
Is there any reference or experience using auto-numbering for captions in
TW?
I mean when you insert images with captions in a tiddler, TW number them?
--Mohammad
--
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 ***@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/09d13fce-9773-49dc-960e-a1d65cf53393%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-12-08 18:19:26 UTC
Permalink
Hello Olegh,

You described the requirements very well.
I hope some interested people propose solution considering the current
state of TW.

I am trying to implement part of them. I think images and tables tiddlers
may be inserted and referenced but it seems we need to select a style other
than numbered style.


Best Mohammad
--
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 ***@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/f8b831ef-45f3-42fa-b7e6-6485a77a3045%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-12-08 20:41:09 UTC
Permalink
Mohammad,

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
--
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 ***@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/098d5383-122b-4e7b-aed6-827a2d8d1bf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Mark S.' via TiddlyWiki
2018-12-08 22:57:52 UTC
Permalink
Ideally, the way to do this would be to put the references in their own
tiddlers. The problem is the auto-numbering ... since you can't know the
numbering in advance. The workaround is to use a javascript macro, that can
keep track of references internally.

This is a proof of concept. It adds a JS macro, autoref.

Parameter: tiddler

Tiddler to be accessed. Or, can also contain number of tiddler

Parameter: action

"link" (to link a tiddler to a number)
"ref" (to access the tiddler assigned to the number,
or number assigned to the tiddler)
"max" (to access the current max reference number)
Default is "max".


Be sure to backup your TW before trying (or better yet, use in an empty TW
file).

This shows how the concept can work with numbered references. The idea is
that the javascript tracks the auto-numbers, but everything else would be
left up to your own, task-appropriate macros. The next stage would be to
add code to allow multiple kinds of references (e.g. captions, figures).
The sample macros here let you insert references that show as numbers
(think anchors), show a tiddler description by tiddler (with number), show
a tiddler description by number. The list routine uses the range operator
to list all references.

Drag and drop into your TW file, and then reload (the JS does not take
effect until you reload).

Various caveats: Please don't give your reference tiddlers names that are
numbers! Resist the urge to give any of your tiddlers the name
"MAS-REF-COUNTER". Note that presently the macro doesn't check if your
referenced tiddlers actually exist. Not sure if this is a bug or feature.

Have fun,
Mark
--
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 ***@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/0eb3ea74-9eac-42fa-b2fa-b7177de9a738%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-12-08 23:44:25 UTC
Permalink
Mark,

This is looking good as far as reference counts are concerned. However I
believe Mohammad wanted to show figures (Tables/Images) presumably the text
of the "reference tiddler". So perhaps showref should be extended to show
the reference and the details (render the text field)

<<showref "WS-2016" details>>

This will make a nice little solution, good work.

Regards
Tony
Post by 'Mark S.' via TiddlyWiki
Ideally, the way to do this would be to put the references in their own
tiddlers. The problem is the auto-numbering ... since you can't know the
numbering in advance. The workaround is to use a javascript macro, that can
keep track of references internally.
This is a proof of concept. It adds a JS macro, autoref.
Parameter: tiddler
Tiddler to be accessed. Or, can also contain number of tiddler
Parameter: action
"link" (to link a tiddler to a number)
"ref" (to access the tiddler assigned to the number,
or number assigned to the tiddler)
"max" (to access the current max reference number)
Default is "max".
Be sure to backup your TW before trying (or better yet, use in an empty TW
file).
This shows how the concept can work with numbered references. The idea is
that the javascript tracks the auto-numbers, but everything else would be
left up to your own, task-appropriate macros. The next stage would be to
add code to allow multiple kinds of references (e.g. captions, figures).
The sample macros here let you insert references that show as numbers
(think anchors), show a tiddler description by tiddler (with number), show
a tiddler description by number. The list routine uses the range operator
to list all references.
Drag and drop into your TW file, and then reload (the JS does not take
effect until you reload).
Various caveats: Please don't give your reference tiddlers names that are
numbers! Resist the urge to give any of your tiddlers the name
"MAS-REF-COUNTER". Note that presently the macro doesn't check if your
referenced tiddlers actually exist. Not sure if this is a bug or feature.
Have fun,
Mark
--
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 ***@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/6876773b-3310-4dd6-aaca-4e0c23a74918%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@TiddlyTweeter
2018-12-10 19:57:42 UTC
Permalink
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!
Mark S. replied
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?"
Right. In terms of actually used systems for citation and wotnot there is
quite a divergence of systems ("style manuals"). Some I think would fit
more easily with TW than others. A major difference is between the
"enumeration" systems (1 ... 10 etc) and the "identifier" methods
("Reginald 1989a" pg4; "Bambi et al 1976" passim).

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.

Just thoughts.

Thanks to you & M. Its all useful!
Josiah
--
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 ***@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/e3526829-ce57-458a-a299-ab94230e8e21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Mark S.' via TiddlyWiki
2018-12-10 20:47:18 UTC
Permalink
Post by @TiddlyTweeter
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.
Yes, I think the goals need to be clarified a bit.

I doubt that TW could go head to head with any of the existing software
technologies for printed output, other than putting together bits of Latex
to be used in a final render.

-- Mark
--
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 ***@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/838ef6e6-8d12-4820-b1d4-19d2656933f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jeremy Ruston
2018-12-10 09:42:11 UTC
Permalink
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.

This approach breaks a fundamental assumption governing the behaviour macros: what they be idempotent and have no side effects. The text they return is supposed to depend only on the arguments, with no dependency on values in the tiddler store. It would be expensive (and pointless) to try to prevent developers from breaking that assumption. (In fact, the core abuses macros by breaking this assumption in a few situations; it's largely leftover from when TW5 was very young, and now I would be able to implement those features differently).

Best wishes

Jeremy

--
Jeremy Ruston
***@jermolene.com
https://jermolene.com
Hello Mark,
It works now! Thank you. Please let me to make more tests and I will return to you.
I may also make more macros like the one to show bibliography at the bottom of tiddlers.
Also to see the effect when I make a big tiddler by transcluding the smallet one.
I hope Olegh see the post and give a try with his comments.
Other interested people are kindly asked to give their comments
Best
Mohammad
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
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.
--
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 ***@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/F4E7FC53-2191-45E2-8E19-B422C5679AF2%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...