in reply to Re: Special formatting in pod
in thread Special formatting in pod

It came up in the synopsis section when I want to show multiple commands that the user is supposed to run sequentially. The section would look like this:

=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.

Replies are listed 'Best First'.
Re^3: Special formatting in pod
by herveus (Prior) on Mar 26, 2007 at 10:52 UTC
    Howdy!

    Simply indent the lines. That indicates that these are verbatim, thus preserving line breaks. I think that even a single space is sufficient.

    yours,
    Michael
      That doesen't really help if you want those lines to be folded by the formatter as normal lines, while preserving the line break at the line end, without having the remaining line space filled up with the next line.

      Verbatim lines are output as they are irrespective of their length, so it's the pager that folds them (in the case of manual pages) or they don't get folded at all and thus produce a horizontal scrollbar in the browser (in the case of html).

      --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}