On Sunday, June 6, 2021 at 9:16:05 AM UTC-7 Eric Shulman wrote: > On Sunday, June 6, 2021 at 5:56:54 AM UTC-7 Pak wrote: > >> Suppose I have 3 tiddlers: tid-thm-a, tid-thm-b, tid-thm-c I would like >> to transclude them in a tiddler so that it displays the following: >> Theorem 1. (optional caption) (...contents in tid-thm-a... displayed in >> block mode, but the first line should be on the same line as Theorem 1} >> Theorem 2. (optional caption) (...contents in tid-thm-b... displayed in >> block mode, but the first line should be on the same line as Theorem 2} >> Theorem 3. (optional caption) (...contents in tid-thm-c... displayed in >> block mode, but the first line should be on the same line as Theorem 3} >> > Addendum: I re-read the description of your desired layout. My previous solution didn't put the tiddler contents on the same line as the "Theorem X." heading.
Here's an updated solution that achieves the layout you described: <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 -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/07ba90d9-ced2-4a97-a050-88dc49c8d9e1n%40googlegroups.com.