At one point, I wanted to put a line break between two lines in a pod. I couldn't figure it out how to do that at that time.

Now I know it's possible to do such things only by writing out the instructions for the special formatting (line break in this case) for all target formats you want to convert the pod to, and include a generic substitute (a paragraph break in this case) in case someone uses some other format.

In this demonstration, the linebreak will render correctly if you convert the pod to man or html, and the substitute will be used in e.g. text or latex format.

Note how you need to comment out the substitute in each formatting, because there is no way to do that in pod (there is no negated begin).

=pod =head1 ALL =begin man This sentence .br is broken .ig =end man =begin html <p> This sentence <br> is broken </p> <!-- =end html This sentence is broken. =begin html --> =end html =begin man .. =end man =cut

In reply to Special formatting in pod by ambrus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.