Hi Mohammad,
Thanks for the tip on macro+KaTeX, I didn't realize we can do that. This
will be useful!
On Monday, June 7, 2021 at 6:39:11 AM UTC+7 Eric Shulman wrote:
>
> <style>
> .theorems
> { counter-reset: num; }
> .theorem::before
> { counter-increment: num; content: "Theorem " counter(num) ".";
> float:left; }
> </style>
> <div class="theorems">
> <$list filter="tid-thm-a tid-thm-b tid-thm-c">
> <div class="theorem">
> <span style="float:left;padding:0 0.5em;">(<$view
> field=caption/>)</span> <$transclude mode="block"/>
> </div>
> <div style="clear:both;"></div>
> </$list>
> </div>
>
> Notes:
> * Added "float:left;" to the "theorem" class, so that it will appear
> before the caption text
> * Added "float:left;padding:0 0.5em" around the caption text so that it
> will appear before the tiddler content
> * Use of these two floats allows the first line of the tiddler content to
> appear on the same line as the "Theorem X." heading
>
>
Hi Eric. Wow this works like a charm! The float trick and the custom
counter are what I learned today. Also, if I do something like this
.theorem::before
{ counter-increment: num; content: "Theorem 1." counter(num) ".";
float:left; }
Then it will produce Theorem 1.1, Theorem 1.2, Theorem 1.3, ...
This is great! Many thanks :)
Pak
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/4b40ccdd-1504-4569-b6b3-66e35ca7d48bn%40googlegroups.com.