Discussion:
[tw5] Template for set field?
(too old to reply)
Ste Wilson
2018-07-29 13:16:21 UTC
Permalink
I'm trying to set some user input between latex markers so the user doesn't have to put in the $$.

So far I have:
--
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/5a1b5b5a-cb81-44c9-bf89-94ac3c05bee0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ste Wilson
2018-07-29 13:21:56 UTC
Permalink
Post by Ste Wilson
I'm trying to set some user input between latex markers so the user doesn't have to put in the $$.
\define mylatex(a)
<$latex text="{$a$}" displayMode="true"></$latex>
\end
<$button>
Work...Please work
<$action-setfield $tiddler="Newtid" $field="test"
$value=''<$macrocall $name="mylatex" a={{lddata}}> /''
</$button>
So what I'd want in field test is for example <latex>3+5</latex> or $$3+4$$
The macro will render a latex string in the text field without having to add anything.
I just don't know how to get that Wiki text into a different field.
Any help as always appreciated.
For those of you on e-mail...Original post updated as I pressed the wrong button while typing it.
--
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/139befaf-1123-4cdb-a49a-c7716aabf559%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-07-30 00:34:34 UTC
Permalink
Note 1: The button label lmst proceed the </$button>

<$button>
<$action-setfield $tiddler="Newtid" $field="test"
$value=''<$macrocall $name="mylatex" a={{lddata}}> /''
Work...Please work
</$button>
Post by Ste Wilson
I'm trying to set some user input between latex markers so the user
doesn't have to put in the $$.
\define mylatex(a)
<$latex text="{$a$}" displayMode="true"></$latex>
\end
<$button>
Work...Please work
<$action-setfield $tiddler="Newtid" $field="test"
$value=''<$macrocall $name="mylatex" a={{lddata}}> /''
</$button>
So what I'd want in field test is for example <latex>3+5</latex> or $$3+4$$
The macro will render a latex string in the text field without having to
add anything.
I just don't know how to get that Wiki text into a different field.
Any help as always appreciated.
--
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/93b12433-e729-4e84-b725-3c761753897d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ste Wilson
2018-07-30 10:11:32 UTC
Permalink
Hi Tony
Is that just convention? Didn't seem to make any difference as long as its outside the action widgets.
--
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/5bf45a51-82b3-46c1-863f-f2b4d01511e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-07-30 14:17:11 UTC
Permalink
I would need to check, I thought it was more than convention and had a problem when not doing so, but I stand to be corrected.

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/d0a80921-83f6-4b46-9099-66b234a17861%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ste Wilson
2018-08-01 08:09:49 UTC
Permalink
Bump...
How can I use the set field widget to put user entered text into $$text here$$ without the user having to do it manualy?
--
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/4f558d8f-0b5a-4195-85fe-6b159af810e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
FrD
2018-08-01 08:30:12 UTC
Permalink
Hi,

I made a test.
I create a tiddler named "test a" containing :

enter text : <$edit-text tiddler="test b" field="input"/>

In a tiddler called "test b" I put the following code :

\define concatlatexfield() $${{!!input}}$$

\define actions()
<$wikify name="latextext" text=<<concatlatexfield>>>
<$action-setfield inputlatex=<<latextext>>/>
</$wikify>
\end

<$button actions=<<actions>>>to latex</$button>

input : <$view field="input"/>

inputlatex : <$view field="inputlatex"/>

The content of the field "inputlatex" seems OK. Is that what you want ?

Regards

FrD
Post by Ste Wilson
Bump...
How can I use the set field widget to put user entered text into $$text
here$$ without the user having to do it manualy?
--
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/af80fa20-2c21-488b-be44-04c5b5f42cd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ste Wilson
2018-08-01 11:49:16 UTC
Permalink
Thanks for the response.
It looks spot on!
Thank you!
--
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/3d1c95b6-08b6-4a3a-b8d7-afc70fb09f8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ste Wilson
2018-08-09 11:11:32 UTC
Permalink
Hmm, possible bug!

The above code from FrD works fine in new tiddliwiki and indeed works on
tiddlywiki.com however id doesn't work in my other wikis.
It must be a plugin thought I.
Starting with a blank wiki i tested then installed the katex plugin, at
which point it fails to send anything to the output field!

Any thoughts?

Stephen
Post by Ste Wilson
Thanks for the response.
It looks spot on!
Thank you!
--
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/f9e90d1d-3538-4947-b176-49015cecd31c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ste Wilson
2018-08-09 16:21:57 UTC
Permalink
Update,
it seems to be the katex plugin causing the problem as, instead of the
variable being placed in the field between double brackets so it can be
displayed by the katex plugin the field contains *ParseError: KaTeX parse
error: $ within math mode*.
even thought the data going into the field is valid for Katex.

Get the same error with \define convalue() $${{$:/state/NewTiddlerForm!!value}}$$
as \define convalue() <$latex
text="{{$:/state/NewTiddlerForm!!value}}"></$latex>

My code here:
\define convalue() <$latex
text="{{$:/state/NewTiddlerForm!!value}}"></$latex>

\define actions()
<$wikify name="valuetext" text=<<convalue>>>
<$action-setfield $tiddler="$:/state/NewTiddlerForm" $field="valuetext"
$value=<<valuetext>> />
</$wikify>
\end


!Title
<$edit-text class='tc-edit-texteditor' tiddler='$:/state/NewTiddlerForm'
field='name_temp' placeholder='Life the Universe and Everything' /><br>

!!Value of Constant

<$edit-text class='tc-edit-texteditor' tiddler='$:/state/NewTiddlerForm'
field='value'/><br>

<$button>Create Tiddler
<<actions>>
<$action-setfield $tiddler={{$:/state/NewTiddlerForm!!name_temp}}
text={{$:/state/NewTiddlerForm!!text}}
value={{$:/state/NewTiddlerForm!!valuetext}}/>
<$action-navigate $to={{$:/state/NewTiddlerForm!!name_temp}}/>
<$action-setfield $tiddler='$:/state/NewTiddlerForm' name_temp='' text=''
description='' tags=''/>
</$button>
Post by Ste Wilson
Hmm, possible bug!
The above code from FrD works fine in new tiddliwiki and indeed works on
tiddlywiki.com however id doesn't work in my other wikis.
It must be a plugin thought I.
Starting with a blank wiki i tested then installed the katex plugin, at
which point it fails to send anything to the output field!
Any thoughts?
Stephen
Post by Ste Wilson
Thanks for the response.
It looks spot on!
Thank you!
--
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/fae270d4-c9b7-4e4a-92f4-5ea09f750e17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jeremy Ruston
2018-08-09 17:27:32 UTC
Permalink
Hi Stephen

The confusing thing here is that we are manipulating wikitext that will be stored in a tiddler and rendered later. Here’s one version that works, but I’m not sure it’s exactly what you want:

<$tiddler tiddler="$:/state/NewTiddlerForm">

!Title

<$edit-text class='tc-edit-texteditor' field='name_temp' placeholder='Life the Universe and Everything' /><br>

!!Value of Constant

<$edit-text class='tc-edit-texteditor' field='value'/>

<$button>
Create Tiddler
<$set name="valuetext" value={{{ [{!!value}addprefix[<$latex text="""]addsuffix["""></$latex>]] }}}>
<$action-setfield $tiddler={{!!name_temp}} text=<<valuetext>> value={{!!value}}/>
</$set>
<$action-navigate $to={{!!name_temp}}/>
</$button>

</$tiddler>

Notes:

* If you’re referring to the same tiddler many times, it’s often helpful to use the <$tiddler> widget to set the currentTiddler, and then be able to take advantage of defaults and omit the tiddler title from widgets like the edit widget
* We use a filtered transclusion with the set widget to create the text value for the new tiddler by taking the value entered by the user and adding a prefix and suffix

Best wishes

Jeremy.
Post by Ste Wilson
Update,
it seems to be the katex plugin causing the problem as, instead of the variable being placed in the field between double brackets so it can be displayed by the katex plugin the field contains ParseError: KaTeX parse error: $ within math mode.
even thought the data going into the field is valid for Katex.
Get the same error with \define convalue() $${{$:/state/NewTiddlerForm!!value}}$$ as \define convalue() <$latex text="{{$:/state/NewTiddlerForm!!value}}"></$latex>
\define convalue() <$latex text="{{$:/state/NewTiddlerForm!!value}}"></$latex>
\define actions()
<$wikify name="valuetext" text=<<convalue>>>
<$action-setfield $tiddler="$:/state/NewTiddlerForm" $field="valuetext" $value=<<valuetext>> />
</$wikify>
\end
!Title
<$edit-text class='tc-edit-texteditor' tiddler='$:/state/NewTiddlerForm' field='name_temp' placeholder='Life the Universe and Everything' /><br>
!!Value of Constant
<$edit-text class='tc-edit-texteditor' tiddler='$:/state/NewTiddlerForm' field='value'/><br>
<$button>Create Tiddler
<<actions>>
<$action-setfield $tiddler={{$:/state/NewTiddlerForm!!name_temp}}
text={{$:/state/NewTiddlerForm!!text}}
value={{$:/state/NewTiddlerForm!!valuetext}}/>
<$action-navigate $to={{$:/state/NewTiddlerForm!!name_temp}}/>
<$action-setfield $tiddler='$:/state/NewTiddlerForm' name_temp='' text='' description='' tags=''/>
</$button>
Hmm, possible bug!
The above code from FrD works fine in new tiddliwiki and indeed works on tiddlywiki.com <http://tiddlywiki.com/> however id doesn't work in my other wikis.
It must be a plugin thought I.
Starting with a blank wiki i tested then installed the katex plugin, at which point it fails to send anything to the output field!
Any thoughts?
Stephen
Thanks for the response.
It looks spot on!
Thank you!
--
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/fae270d4-c9b7-4e4a-92f4-5ea09f750e17%40googlegroups.com <https://groups.google.com/d/msgid/tiddlywiki/fae270d4-c9b7-4e4a-92f4-5ea09f750e17%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/3A634C41-0284-4969-AD38-62A5ED3A2749%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Ste Wilson
2018-08-10 18:27:49 UTC
Permalink
Wow, that makes things more simple!
I can definetlty use that.
Thank you.
--
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/e2b5d690-cc14-4130-8522-473918559865%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-08-12 03:37:20 UTC
Permalink
Jeremy

The tiddler widget (https://tiddlywiki.com/#TiddlerWidget) has several
other features like tiddlerTagClasses
is it possible to give an example to see how they can be used?

sed been here to facilitate the operation! Could you give some examples to
see how tiddler and its other classes
Post by Jeremy Ruston
Hi Stephen
The confusing thing here is that we are manipulating wikitext that will be
stored in a tiddler and rendered later. Here’s one version that works, but
<$tiddler tiddler="$:/state/NewTiddlerForm">
!Title
<$edit-text class='tc-edit-texteditor' field='name_temp' placeholder='Life
the Universe and Everything' /><br>
!!Value of Constant
<$edit-text class='tc-edit-texteditor' field='value'/>
<$button>
Create Tiddler
<$set name="valuetext" value={{{ [{!!value}addprefix[<$latex
text="""]addsuffix["""></$latex>]] }}}>
<$action-setfield $tiddler={{!!name_temp}} text=<<valuetext>>
value={{!!value}}/>
</$set>
<$action-navigate $to={{!!name_temp}}/>
</$button>
</$tiddler>
* If you’re referring to the same tiddler many times, it’s often helpful
to use the <$tiddler> widget to set the currentTiddler, and then be able to
take advantage of defaults and omit the tiddler title from widgets like the
edit widget
* We use a filtered transclusion with the set widget to create the text
value for the new tiddler by taking the value entered by the user and
adding a prefix and suffix
Best wishes
Jeremy.
Update,
it seems to be the katex plugin causing the problem as, instead of the
variable being placed in the field between double brackets so it can be
displayed by the katex plugin the field contains *ParseError: KaTeX parse
error: $ within math mode*.
even thought the data going into the field is valid for Katex.
Get the same error with \define convalue() $${{$:/state/NewTiddlerForm!!value}}$$
as \define convalue() <$latex
text="{{$:/state/NewTiddlerForm!!value}}"></$latex>
\define convalue() <$latex
text="{{$:/state/NewTiddlerForm!!value}}"></$latex>
\define actions()
<$wikify name="valuetext" text=<<convalue>>>
<$action-setfield $tiddler="$:/state/NewTiddlerForm" $field="valuetext"
$value=<<valuetext>> />
</$wikify>
\end
!Title
<$edit-text class='tc-edit-texteditor' tiddler='$:/state/NewTiddlerForm'
field='name_temp' placeholder='Life the Universe and Everything' /><br>
!!Value of Constant
<$edit-text class='tc-edit-texteditor' tiddler='$:/state/NewTiddlerForm'
field='value'/><br>
<$button>Create Tiddler
<<actions>>
<$action-setfield $tiddler={{$:/state/NewTiddlerForm!!name_temp}}
text={{$:/state/NewTiddlerForm!!text}}
value={{$:/state/NewTiddlerForm!!valuetext}}/>
<$action-navigate $to={{$:/state/NewTiddlerForm!!name_temp}}/>
<$action-setfield $tiddler='$:/state/NewTiddlerForm' name_temp='' text=''
description='' tags=''/>
</$button>
Post by Ste Wilson
Hmm, possible bug!
The above code from FrD works fine in new tiddliwiki and indeed works on
tiddlywiki.com however id doesn't work in my other wikis.
It must be a plugin thought I.
Starting with a blank wiki i tested then installed the katex plugin, at
which point it fails to send anything to the output field!
Any thoughts?
Stephen
Post by Ste Wilson
Thanks for the response.
It looks spot on!
Thank you!
--
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
<javascript:>.
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/fae270d4-c9b7-4e4a-92f4-5ea09f750e17%40googlegroups.com
<https://groups.google.com/d/msgid/tiddlywiki/fae270d4-c9b7-4e4a-92f4-5ea09f750e17%40googlegroups.com?utm_medium=email&utm_source=footer>
.
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/0d0a65b2-157d-4d50-be4d-d1d5deb5bed9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
PMario
2018-08-12 08:32:57 UTC
Permalink
Hi,

see: https://tiddlywiki.com/#How%20to%20apply%20custom%20styles

-m
--
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/6fd3c20b-06d6-4f37-9d48-059145d6e03e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mohammad
2018-08-12 17:29:38 UTC
Permalink
Thanks Mario.
Post by PMario
Hi,
see: https://tiddlywiki.com/#How%20to%20apply%20custom%20styles
-m
--
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/0e04eebd-82c6-43d4-b5c7-8bb59dfa82c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
PMario
2018-08-13 08:37:13 UTC
Permalink
So if I defined some css in another tiddler tagged with $:/tags/Stylesheet
then can I use them with tiddlerTagClasses?
tiddlerTagClasses is an internal variable, that is set by the core. ... You
should __not__ mess with it!!

You can use the mechanisms described in the docs
<https://tiddlywiki.com/#How%20to%20apply%20custom%20styles:%5B%5BHow%20to%20apply%20custom%20styles%5D%5D%20%5B%5BCustom%20styles%20by%20user-class%5D%5D%20%5B%5BCustom%20styles%20by%20data-tiddler-title%5D%5D%20%5B%5BCustom%20data-styles%5D%5D%20%5B%5BCustom%20styles%20by%20data-tags%5D%5D>.
... There are several possibilities. You should use the 1 that meets your
needs best.

-m
--
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/de1f17a3-dc6b-4d42-afc1-d411bd50a063%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ste Wilson
2018-08-15 23:39:09 UTC
Permalink
Hi Jeremy (and other wonderful peeps),

Finally had time to play with your code.
I need to expand it to accept output multiple variables so my button mow
looks like

<$button>
Create Tiddler

<$set
name="valuetext" value={{{ [{!!value_temp}addprefix[<$latex
text="]addsuffix["displayMode="true"></$latex>]] }}} >
<$set
name="constext" value={{{ [{!!const_temp}addprefix[<$latex
text="]addsuffix["displayMode="true"></$latex>]] }}} >
<$set
name="unittext" value={{{ [{!!unit_temp}addprefix[<$latex
text="]addsuffix["displayMode="true"></$latex>]] }}} >
<$action-setfield $tiddler={{!!name_temp}}
text={{!!text_temp}}
value=<<valuetext>>
variablelatex=<<constext>>
unitlatex=<<unittext>>
tags='constant'/>
</$set>
<$action-navigate $to={{!!name_temp}}/>

</$button>

</$tiddler>

All works as expected apart from the button which now reads *Create Tiddler
</$button> **</$tiddler>*

I suspect I've missed a bracket somewhere, but my attempts to resolve the
matter end in only the final field being created.

Stephen
Post by Ste Wilson
I'm trying to set some user input between latex markers so the user
doesn't have to put in the $$.
\define mylatex(a)
<$latex text="{$a$}" displayMode="true"></$latex>
\end
<$button>
Work...Please work
<$action-setfield $tiddler="Newtid" $field="test"
$value=''<$macrocall $name="mylatex" a={{lddata}}> /''
</$button>
So what I'd want in field test is for example <latex>3+5</latex> or $$3+4$$
The macro will render a latex string in the text field without having to
add anything.
I just don't know how to get that Wiki text into a different field.
Any help as always appreciated.
--
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/1f3ea0b6-3b2d-4122-b1e6-b9f0d50ead65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Mark S.' via TiddlyWiki
2018-08-15 23:54:29 UTC
Permalink
I think you forgot to paste a "<$tiddler>" widget at the top?

You have 3 set widget tags, but only one </$set> matching tag -- that will
throw things off.

-- Mark
Post by Ste Wilson
Hi Jeremy (and other wonderful peeps),
Finally had time to play with your code.
I need to expand it to accept output multiple variables so my button mow
looks like
<$button>
Create Tiddler
<$set
name="valuetext" value={{{ [{!!value_temp}addprefix[<$latex
text="]addsuffix["displayMode="true"></$latex>]] }}} >
<$set
name="constext" value={{{ [{!!const_temp}addprefix[<$latex
text="]addsuffix["displayMode="true"></$latex>]] }}} >
<$set
name="unittext" value={{{ [{!!unit_temp}addprefix[<$latex
text="]addsuffix["displayMode="true"></$latex>]] }}} >
<$action-setfield $tiddler={{!!name_temp}}
text={{!!text_temp}}
value=<<valuetext>>
variablelatex=<<constext>>
unitlatex=<<unittext>>
tags='constant'/>
</$set>
<$action-navigate $to={{!!name_temp}}/>
</$button>
</$tiddler>
All works as expected apart from the button which now reads *Create
Tiddler </$button> **</$tiddler>*
I suspect I've missed a bracket somewhere, but my attempts to resolve the
matter end in only the final field being created.
Stephen
Post by Ste Wilson
I'm trying to set some user input between latex markers so the user
doesn't have to put in the $$.
\define mylatex(a)
<$latex text="{$a$}" displayMode="true"></$latex>
\end
<$button>
Work...Please work
<$action-setfield $tiddler="Newtid" $field="test"
$value=''<$macrocall $name="mylatex" a={{lddata}}> /''
</$button>
So what I'd want in field test is for example <latex>3+5</latex> or $$3+4$$
The macro will render a latex string in the text field without having to
add anything.
I just don't know how to get that Wiki text into a different field.
Any help as always appreciated.
--
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/b3e753e0-6423-42e0-8a10-93bb515f1832%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Eric Shulman
2018-08-16 03:17:02 UTC
Permalink
Post by Ste Wilson
All works as expected apart from the button which now reads *Create
Tiddler </$button> **</$tiddler>*
I suspect I've missed a bracket somewhere, but my attempts to resolve the
matter end in only the final field being created.
You have three <$set> widgets, but only ONE matching </$set>... a two more
and it should work.

-e
--
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/38497bec-07e0-42af-8705-174204bbce4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ste Wilson
2018-08-16 06:49:07 UTC
Permalink
Brliant!
</$set></$set></$set> does the job. Thanks!
--
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/f03e275b-5d49-49f3-943b-e0adbb751146%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...