Where do I put the backslash sequences to create a right margin of 4000 twips?

I seem to have figured this out by a lot of error and trial:

sub format_texts { use strict; use 5.010; use RTF::Writer; my ( $rvars, $reftext1 ) = @_; my %vars = %$rvars; my $text1 = $$reftext1; my $rtf = RTF::Writer->new_to_file( $vars{word} ); $rtf->prolog( 'title' => "List of fears", ); $rtf->number_pages; $rtf->paragraph(\'\qc\f0\fs120\b ', "Fears"); $rtf->paragraph(\'\ri3000\li-500\f0\fs30\b0\ql',$text1); $rtf->close;

This creates a centered, oversized headline and then sets a left indent of negative 500 twips (moving it left a centimeter or so), and a right indent of 3000 twips, which, with the rather large default margins creates the space on the right side of the page that I wanted. Screenshot of output on Tinypic

I was wrong to expect the title to print out: it's not supposed to. I was also wrong that the page number didn't print out. The reference that got me over the hump on rtf syntax was Sean Burke's summary of rtf syntax . Also informative was MS specification of rtf on sourceforge

Still puzzled why "Fear of" doesn't get inserted with this substitution:

for (@fears) { s/\s+$/ /; $_ = lc($_); s/^(\d+\. )(.) /$1 Fear of $2/; }

In reply to Re^3: combining lists, formatting and printing on windows by Aldebaran
in thread combining lists, formatting and printing on windows by Aldebaran

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.