Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

ugly lines in pod

by WoodyWeaver (Monk)
on Oct 17, 2014 at 19:06 UTC ( [id://1104202]=perlquestion: print w/replies, xml ) Need Help??

WoodyWeaver has asked for the wisdom of the Perl Monks concerning the following question:

perlpodspec notes "Authors of Pod formatters should note that this construct:
=item Neque =item Porro =item Quisquam Est Qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. =item Ut Enim
is semantically ambiguous" and goes on to note that formatters should render this as
    Neque

    Porro

    Quisquam Est
    Qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
    velit, sed quia non numquam eius modi tempora incidunt ut
    labore et dolore magnam aliquam quaerat voluptatem.

    Ut Enim
But I want the case where these are three equivalent items, and the blank line is not present. Is this possible?

Replies are listed 'Best First'.
Re: ugly lines in pod
by wrog (Friar) on Oct 17, 2014 at 19:34 UTC

    I believe that in most cases that matter, it'll be displayed the way you want. For example, on search.cpan.org, in the format used there you essentially see

    Freep Qui dolorem ipsum quia dolor sit amet, consectetur, dipisci velit, sed quia non numquam qui dolorem ipsum quia dolor sit amet, consecte +tur, dipisci velit, sed quia non numquam qui dolorem ipsum quia dolor sit + amet, consectetur, dipisci velit, sed quia non numquam Neque Porro Quisquam Est Qui dolorem ipsum quia dolor sit amet, consectetur, dipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Blurg Qui dolorem ipsum quia dolor sit amet, consectetur, dipisci velit, s +ed quia non numquam qui dolorem ipsum quia dolor sit amet, consectetur, dipisci velit, sed quia non numquam qui dolorem ipsum quia dolor sit amet, consectetur, dipisci velit, sed quia non numquam

    which in context is then (mostly) easily read as three equivalent items. Since pod doesn't give you a way to specify, it's really the best you can do (and I believe this is what's done most of the time).

Re: ugly lines in pod
by Loops (Curate) on Oct 17, 2014 at 19:21 UTC

    It's not clear to me what you're asking. There are four items in your example, yet you say you want three equivalent items?

    For what it's worth the three items below will all be put in a list:

    =head2 Methods =over 12 =item C<new> =item C<as_string> =item C<as_integer> =back
Re: ugly lines in pod
by tobyink (Canon) on Oct 18, 2014 at 14:11 UTC

    I tend to use something like:

    =item B<< Neque >>, B<< Porro >>, B<< Quisquam Est >> Qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. =item B<< Ut Enim >>

      Sorry if the question wasn't clear. Unfortunately, it is more of a "make it pretty" problem rather than a functional problem, and I'm not expressing it well.

      I wanted to document the web page the way I wanted it, rather than what was natural to pod, I suppose. I wanted a bulleted list. Starting with
      =over =item Neque =item Porro =item Quisquam Est Qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. =item Ut Enim =back
      renders as
      <dl><dt><strong><a name="neque" class="item">Neque</a></strong></dt> <dt><strong><a name="porro" class="item">Porro</a></strong></dt> <dt><strong><a name="quisquam_est" class="item">Quisquam Est</a></stro +ng></dt> <dd> <p>Qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p> </dd> <dt><strong><a name="ut_enim" class="item">Ut Enim</a></strong></dt> </dl>

      That is fine (although perhaps it would be nice without the bolding) but I really don't like the blank line between Quisquam Est and Qui dolorem. I really don't want a paragraph marker in the dd container.

      But really, this is unimportant. I'll just rewrite it another way.

        It isn't a blank line, it's a margin, and can be controlled via CSS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1104202]
Approved by Perlbotics
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-03-29 01:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found