If you are able to do so, I would suggest reverting back to your HTML version of this text and using its clues to help you format the text-only version. Minimally, you would like to have paragraph information, as I expect you are not wishing to lump the entire body of text into a single, unbroken paragraph. If that is not possible, you may wish to insert manually some paragraph markers. Paragraphs could be "created" based on a set number of sentences per paragraph, or a certain number of lines as the maximum per paragraph, but this would mean awkward paragraph breaks, as a computer and a human will not read it the same.

My next suggestion would be to use some LaTeX to format the text. It could be output to PDF. If you start with the HTML version, there may even be a tool (search for "HTML to LaTeX" online) that could do this without needing reinvent wheels in Perl. But even from the text alone, LaTeX could do wonders with formatting, and it can be set for virtually any paper size, with custom margins, font sizes, etc.

Blessings,

~Polyglot~


In reply to Re: Output Format by Polyglot
in thread Output Format by perlmike

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.