Can I do this with LaTeX?

133 views
Skip to first unread message

Ste Wilson

unread,
May 20, 2017, 12:36:24 PM5/20/17
to TiddlyWiki
If I invoke latex with
<$latex text="..."></$latex>
Is there a way to put a feild variable or tranclusion between the quotes and have it render as Tex?

now I've typed this I'm wondering if I've asked it before... oh well.

Thanks for your help.

Stephen

Stephen Wilson

unread,
May 25, 2017, 4:53:36 AM5/25/17
to TiddlyWiki
I'm guessing that's a 'NO' then...

Ste Wilson

unread,
May 27, 2017, 2:45:31 PM5/27/17
to tiddl...@googlegroups.com
Ok... One last go..

Let's borrow Fred...

Fred is doing so well with his leeks and they have grown so big that, to be honest, they are starting to make Fred a little nervous. He can feel them watching him as he potters around on his allotment. He is sure they are communicating...

In order to ease Freds mounting paranoia about the state of his veg patch Fred proposes a simple maths test for the leeks to take.

He recruited an IT friend who said.. 'what you need Fred is to generate two random numbers, say using the Mathcell plug in and a bit of Java code, in to tiddlers then copy the rendered out put of those where you need them in that there LaTeX equation you have and then those leeks won't be able to tell each other the answer.

'Crickey' thought Fred, 'that was a long and tortured sentence in order to frame a question' as he sipped on his potent nettle wine.

'Can it be done? And then wil I have the proof that they are sentient?' asked Fred. 'yes' replied his friend while thinking that Fred should stop reading John Wyndham and drinking that wine.

Unfortunatley Fred never did get his proof as he mysteriously vanished shortly after. All that was ever found were his boots in the middle of small circle of large, some said suspiciously large, leeks.

Don't let Fred's disappearance be for naught. Don't let the leeks win...

Stephen

RichardWilliamSmith

unread,
May 28, 2017, 6:53:27 PM5/28/17
to TiddlyWiki
Hi Ste,

The farmer needs a macro.

\define mylatex(a,b)
<$latex text="f(x) = \int_{$a$}^$b$\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi" displayMode="true"></$latex>
\end
<<mylatex 5 9>>

From there, it's probably going to get more complicated so Good Luck!

I hope you'll share what you're making because I'd like to help you with it if I can.

Regards,
Richard

RichardWilliamSmith

unread,
May 28, 2017, 6:58:58 PM5/28/17
to TiddlyWiki
PS: If you have a value in a field, for example in "argument1" (argument1: 20), you can use the macrocall widget to pass it in.

\define mylatex(a,b)
<$latex text="f(x) = \int_{$a$}^{$b$}\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi" displayMode="true"></$latex>
\end
<$macrocall $name="mylatex" a="5" b={{!!argument1}}>

Note, I had to change the latex slightly to have the '20' render correctly.

Regards,
Richard
Reply all
Reply to author
Forward
0 new messages