paragraph spacing

92 views
Skip to first unread message

Donald Lund

unread,
Oct 21, 2020, 10:39:14 AM10/21/20
to TiddlyWiki
How can I define a class that would use half-line paragraph spacing? I would only want to use it in special cases, not everywhere. Example use case, between footnotes, where I'd like a more compact look. 

Thanks

Eric Shulman

unread,
Oct 21, 2020, 11:03:01 AM10/21/20
to TiddlyWiki
On Wednesday, October 21, 2020 at 7:39:14 AM UTC-7, Donald Lund wrote:
How can I define a class that would use half-line paragraph spacing? I would only want to use it in special cases, not everywhere. Example use case, between footnotes, where I'd like a more compact look. 

Try this:
First, create a tiddler, e.g., "SpacerMacro", tagged with $:/tags/Macro, containing
\define spacer() <div style="height:0.5em;"></div>

Then, in any tiddler content, use it like this:
content1 goes here
<<spacer>>
content2 goes here
<<spacer>>
content3 goes here

enjoy,
-e



Thanks

Brian Radspinner

unread,
Oct 21, 2020, 8:35:20 PM10/21/20
to TiddlyWiki
If you want consistent spacing between each line, then in a tiddler tagged with $:/tags/Stylesheet, add the following CSS:

.halfLine {
   line-height: 1.5em;
}

Where ever you want this spacing, add a paragraph with the "halfLine" class...

<p class="halfLine">some text...</p>
or
@@.halfLine
some text...
@@

If you want spacing between each paragraph instead of each line, then change the CSS to:

.halfLine {
   margin-bottom: 0.5em;
}

Captain Packers

unread,
Oct 22, 2020, 9:32:22 AM10/22/20
to TiddlyWiki
More options. Thanks Brian

Captain Packers

unread,
Oct 22, 2020, 9:33:18 AM10/22/20
to TiddlyWiki
Thanks Eric. I've been struggling to find an easy way to do this for a long time.
Reply all
Reply to author
Forward
0 new messages