Re: Special formatting in pod
by merlyn (Sage) on Mar 25, 2007 at 20:19 UTC
|
At one point, I wanted to put a line break between two lines in a pod.
The reason there's no easy way to do that is because you have to provide the answer to the meaning of such a visual break. Paragraph breaks are provided, and they have a meaning (change of topic). What does a "line break" mean, as an abstraction, in your mind? When would it come up that I (or other pod authors) would want that meaning?
| [reply] |
|
The meaning is obvious, as layout goes: more space than a period, less than a paragraph break.
Not a topic change, but a severe pause, e.g to put things the other way round, or to say "stop
here and think about that". Make long paragraphs more readable, provide a hook for the eye to go
back - increase redability, the like a blank line inside a block of code provides.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
| [reply] |
|
The reason why I last wanted to do that, is to make a nicely formatted block of contact info.
The only way you can do it appears to be to either put every line in a separate paragraph, or make a preformatted code block ("verbatim paragraph") out of it. Sucks.
Ideally the text should formatted as normal text, but respecting my line breaks.
Or maybe I should be making a bulletless list? Is that possible?
| [reply] |
|
=head1 SYNOPSYS
B<heapusg> [B<-n> I<interval>] I<your_program> I<args>
B<drawheapg>
The next sections would then explain that the first command generates a data file (with a default name you can override) and the second command draws a graph of it.
Anyway, you have a point with this. The same method I show, however, can be used for other special formatting too (like nice links in html), not only line breaks.
| [reply] [d/l] |
|
| [reply] |
|
|
Another problem with a single line break is that its visibility depends on the last line not being nearly full. A forced line break near the right margin doesn't stand out visually. The markup may disappear, depending on formatting you don't control.
Anno
| [reply] |
|
The reason there's no easy way to do that is because you have to provide the answer to the meaning of such a visual break. Paragraph breaks are provided, and they have a meaning (change of topic). What does a "line break" mean, as an abstraction, in your mind? When would it come up that I (or other pod authors) would want that meaning?
Well, even TeX provides \\ for simple line breaks: it's a feature one should use parsimoniously (I mean in simple text, special uses are a whole another matter,) but occasionally it can be useful to stress a period ending that must be stronger than a "regular" one and not just as strong as a paragraph break.
| [reply] [d/l] |
Re: Special formatting in pod
by Anonymous Monk on Oct 18, 2020 at 07:31 UTC
|
You can use =item for that:
=over
=item My first piece of text is neither indented nor surrounded
with newlines.
It is rewrapped to fit the output page.
and
lines
are merged.
=item And here is another piece of text.
It will appear
right after the previous item
with no extra line break between them.
=back
| [reply] [d/l] |
|
Nice trick. It does the job in pod2text and pod2man. But pod2html renders each line as separate paragraph and makes each line bold.
| [reply] |