home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / remin310.zip / rem2ps.man < prev    next >
Text File  |  1993-11-05  |  14KB  |  397 lines

  1.  
  2.  
  3.  
  4. REM2PS(1)                                               REM2PS(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        rem2ps - draw a PostScript calendar from Remind output
  9.  
  10. SSYYNNOOPPSSIISS
  11.        rreemm22ppss [[_o_p_t_i_o_n_s]
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.        RReemm22ppss  reads  the  standard  input,  which  should be the
  15.        results of running RReemmiinndd with the --pp  option.   It  emits
  16.        PostScript  code  (which draws a calendar) to the standard
  17.        output.
  18.  
  19. OOPPTTIIOONNSS
  20.        --nn     Produce a calendar whose  first  column  is  Monday
  21.               (rather than Sunday.)
  22.  
  23.        --pp ffiillee
  24.               Include the contents of _f_i_l_e in the PostScript pro-
  25.               logue.  This allows you to define procedures, vari-
  26.               ables  etc.  which can be used by the PPSS and PPSSFFIILLEE
  27.               reminders.  You should  not  include  any  document
  28.               structuring comments in your prologue.
  29.  
  30.        --ll     Produce  the calendar in landscape mode rather than
  31.               the default portrait mode.
  32.  
  33.        --cc[_n]  If _n is omitted, disables the small  calendars  for
  34.               next  and previous months which are normally gener-
  35.               ated.  If _n is supplied, it can range from 0 to  3,
  36.               with the following meanings:
  37.  
  38.               00      Disable small calendars
  39.  
  40.               11      Place  the  small  calendars  at the bottom-
  41.                      right if there  is  room;  otherwise,  place
  42.                      them at the top-left.
  43.  
  44.               22      Place the small calendars at the top-left if
  45.                      there is room; otherwise, place them at  the
  46.                      bottom-right.
  47.  
  48.               33      Place the previous month's small calendar at
  49.                      the top-left and the  next  month's  at  the
  50.                      bottom-right  if  there  is room; otherwise,
  51.                      follow _n=1.  A moment's thought reveals that
  52.                      an  option  which  splits  the  calendars if
  53.                      there is  room  and  otherwise  follows  _n=2
  54.                      yields the same results as _n=3.
  55.  
  56.        --ii     Use ISO 8859-1 standard encoding for the PostScript
  57.               fonts.  If you do not use this option, the  default
  58.               encoding is used.
  59.  
  60.        --ee     Make   the  calendar  fill  the  entire  page.   By
  61.  
  62.  
  63.  
  64.                         30 September 1993                       1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. REM2PS(1)                                               REM2PS(1)
  71.  
  72.  
  73.               default, the calendar is slightly smaller than  the
  74.               page.   This  allows  days  with  many reminders to
  75.               "expand" as needed.  However,  if  you  don't  have
  76.               days  which expand, you can use this option to make
  77.               all of the boxes slightly bigger.  One  caveat:  If
  78.               you  do  use  the  --ee  option  and one day has many
  79.               reminders, the calendar may expand  off  the  page,
  80.               losing some information.  Experiment!
  81.  
  82.        --mm mmeeddiiaa
  83.               Set  the  page size.  If you use the -m option, you
  84.               must specify the media type, which can  be  one  of
  85.               the following.  (Sizes are approximate.)
  86.  
  87.               Letter 8.5 x 11 in.
  88.  
  89.               Legal  11 x 17 in.
  90.  
  91.               Ledger 8.5 x 14 in.
  92.  
  93.               Statement
  94.                      5.5 x 8.5 in.
  95.  
  96.               Executive
  97.                      7.5 x 10 in.
  98.  
  99.               A3     29.7 x 42 cm.
  100.  
  101.               A4     21 x 29.7 cm.
  102.  
  103.               A5     14.8 x 21 cm.
  104.  
  105.               B4     25.7 x 36.4 cm.
  106.  
  107.               B5     18.3 x 25.7 cm.
  108.  
  109.               Folio  8.5 x 13 in.
  110.  
  111.               Quarto 8.5 x 10.8 in.
  112.  
  113.               10x14  10 x 14 in.
  114.  
  115.               Type  "rem2ps  -m  help"  for  a  list of available
  116.               media.  Note that the media type  (and  all  RReemm22ppss
  117.               options)  are case-sensitive.  If you don't use the
  118.               --mm option, the  media  defaults  to  a  compiled-in
  119.               default  - this is usually Letter for North America
  120.               and A4 for Europe.  The "-m help" option will  dis-
  121.               play the compiled-in default.
  122.  
  123.        --ff[ttsshheedd] _f_o_n_t
  124.               Set the font for the calendar title, the small cal-
  125.               endars,  the  day-of-week  headings,  the  calendar
  126.               entries,  and  the day numbers, respectively.  _F_o_n_t
  127.  
  128.  
  129.  
  130.                         30 September 1993                       2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. REM2PS(1)                                               REM2PS(1)
  137.  
  138.  
  139.               must be the name of a valid PostScript  font.   The
  140.               default fonts are equivalent to specifying:
  141.  
  142.                    -ftshe Helvetica -fd Helvetica-BoldOblique
  143.  
  144.               In  other  words,  the  heading,  entry  and small-
  145.               calendar fonts are set to Helvetica, and  the  font
  146.               for   the   day   numbers   is  set  to  Helvetica-
  147.               BoldOblique.
  148.  
  149.        --ss[tthheedd] _s_i_z_e
  150.               Set the size (in points) of the text  for  the  the
  151.               calendar  title, day-of-week headings, the calendar
  152.               entries, and the day numbers,  respectively.   _S_i_z_e
  153.               must  be  a  decimal number.  The default sizes are
  154.               equivalent to specifying:
  155.  
  156.                    -sthd 14 -se 8
  157.  
  158.               In other words, the heading  and  day  numbers  are
  159.               14-point   fonts,  and  the  calendar  entries  are
  160.               printed in 8-point text.
  161.  
  162.        --bb _s_i_z_e
  163.               Set the size of the blank white border in each cal-
  164.               endar  box to _s_i_z_e points.  The default border size
  165.               is 6 points, or 1/12 in.
  166.  
  167.        --tt _s_i_z_e
  168.               Set the thickness of the black calendar grid lines.
  169.               The default is 1, for a line thickness of one point
  170.               (1/72 in.)
  171.  
  172.        --oo[llrrttbb] _s_i_z_e
  173.               Set the left, right, top, and/or bottom margins  to
  174.               _s_i_z_e points.  For this option only, _s_i_z_e must be an
  175.               integer.  It represents the margin size in units of
  176.               1/72  in.   The  default  margin  sizes are 36, for
  177.               half-inch margins.  If you wish to punch  holes  in
  178.               the  calendar  page to insert it into a binder, you
  179.               may wish to increase the left margin to  one  inch.
  180.               In  that case, you should also decrease the heading
  181.               font size to 12 points for good output:
  182.  
  183.             # This gives good results for putting into a binder
  184.             rem2ps -ol 72 -sh 12
  185.  
  186. UUSSAAGGEE
  187.        To use RReemm22ppss, you should pipe the output of  RReemmiinndd  with
  188.        the  --pp  option  to  RReemm22ppss, and then send the result to a
  189.        printer.  This is most easily illustrated with examples:
  190.  
  191.             remind -p12 /dev/null 1 jan 1994 | rem2ps | lpr -Plaser
  192.  
  193.  
  194.  
  195.  
  196.                         30 September 1993                       3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. REM2PS(1)                                               REM2PS(1)
  203.  
  204.  
  205.        That example creates a blank calendar for the entire  year
  206.        of 1994, and sends it the the printer named "laser."
  207.  
  208.             remind -p ~/.reminders | rem2ps -l -sd 18 > cal.ps
  209.  
  210.        This  reminder  creates  a calendar for the current month,
  211.        filling in entries from the reminder file  "~/.reminders."
  212.        The  calendar  is  produced in landscape mode, with a font
  213.        size of 18 for the day numbers.  The result is put in  the
  214.        PostScript file "cal.ps."
  215.  
  216.  
  217. VVAARRIIAABBLLEESS AAVVAAIILLAABBLLEE TTOO UUSSEERR--SSUUPPPPLLIIEEDD PPOOSSTTSSCCRRIIPPTT CCOODDEE
  218.        The  following  variables  are available to PPSS and PPSSFFIILLEE-
  219.        type reminders.   (This  material  is  duplicated  in  the
  220.        RReemmiinndd manual page.)
  221.  
  222.        LineWidth
  223.               The  width  of  the  black grid lines making up the
  224.               calendar.
  225.  
  226.        Border The border between the center of the grid lines and
  227.               the  space  used  to  print calendar entries.  This
  228.               border is normally blank space.
  229.  
  230.        BoxWidth and BoxHeight
  231.               The width and height of the calendar box, from cen-
  232.               ter-to-center of the black gridlines.
  233.  
  234.        InBoxHeight
  235.               The  height  from  the  center  of the bottom black
  236.               gridline to the top of the regular  calendar  entry
  237.               area.  The space from here to the top of the box is
  238.               used only to draw the day number.
  239.  
  240.        /DayFont, /TitleFont, /EntryFont, /SmallFont and /HeadFont
  241.               The  fonts  used to draw the day numbers, the month
  242.               and year title, the  calendar  entries,  the  small
  243.               calendars,  and  the  day-of-week headings, respec-
  244.               tively.
  245.  
  246.        DaySize, TitleSize, EntrySize and HeadSize
  247.               The sizes of the above fonts.   (The  size  of  the
  248.               small  calendar  font  is  _n_o_t  defined here.)  For
  249.               example, if you wanted to  print  the  Hebrew  date
  250.               next  to  the  regular  day number in the calendar,
  251.               use:
  252.  
  253.             REM PS Border BoxHeight Border sub DaySize sub moveto \
  254.                /DayFont findfont DaySize scalefont setfont \
  255.                ([hebday(today())] [hebmon(today())]) show
  256.  
  257.               Note how /DayFont and DaySize are used.
  258.  
  259.  
  260.  
  261.  
  262.                         30 September 1993                       4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. REM2PS(1)                                               REM2PS(1)
  269.  
  270.  
  271.        Note that if you supply PostScript code, it is possible to
  272.        produce   invalid  PostScript  files.   Always  test  your
  273.        PostScript thoroughly  with  a  PostScript  viewer  before
  274.        sending  it  to the printer.  You should not use any docu-
  275.        ment structuring comments in your PostScript code.
  276.  
  277.        In addition, prior to  drawing  a  calendar  page,  RReemm22ppss
  278.        emits the following PostScript code:
  279.  
  280.             save (mon) (yr) PreCal restore
  281.  
  282.        where  _m_o_n  and  _y_r are the month and year of the calendar
  283.        page.  The default PPrreeCCaall procedure simply pops the  argu-
  284.        ments  and does nothing.  However, you can define a PPrreeCCaall
  285.        function in your prologue file to do whatever you  want  -
  286.        it  can  draw  a  background  for the entire calendar, for
  287.        instance.
  288.  
  289.        In the context of the PPrreeCCaall procedure, the following con-
  290.        ditions hold:
  291.  
  292.        o      The  PostScript  origin  is at the bottom left-hand
  293.               corner of the page, and PostScript units  of  1/72"
  294.               are in effect.
  295.  
  296.        o      The  variables MinX, MinY, MaxX and MaxY define the
  297.               bounding box within  which  the  calendar  will  be
  298.               drawn.
  299.  
  300.        o      The font and font-size variables, as well as Border
  301.               and LineWidth described previously, are valid.
  302.  
  303.        For an example, create a file called "myprolog" whose con-
  304.        tents are:
  305.  
  306.                  /PreCal {
  307.                   /yr exch def
  308.                   /mon exch def
  309.                   /xsiz1 MaxX MinX sub def
  310.                   /ysiz1 MaxY MinY sub def
  311.                   /xsiz xsiz1 MinX sub MinX sub def
  312.                   /ysiz ysiz1 MinY sub MinY sub def
  313.                   xsiz
  314.                   ysiz
  315.                   lt
  316.                   {/len xsiz 1.41 mul def
  317.                    MinX MinX add ysiz1 xsiz1 sub 2 div MinY add MinY add moveto}
  318.                   {/len ysiz 1.41 mul def
  319.                    xsiz1 ysiz1 sub 2 div MinX add MinX add MinY MinY add moveto}
  320.                   ifelse
  321.                   /Helvetica-Bold findfont 1 scalefont setfont
  322.                   mon stringwidth pop
  323.                   ( ) stringwidth pop add
  324.                   yr stringwidth pop add
  325.  
  326.  
  327.  
  328.                         30 September 1993                       5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. REM2PS(1)                                               REM2PS(1)
  335.  
  336.  
  337.                   len exch div /len exch def
  338.                   /Helvetica-Bold findfont len scalefont setfont
  339.                   0.95 setgray
  340.                   45 rotate
  341.                   mon show
  342.                   ( ) show
  343.                   yr show
  344.                  } bind def
  345.  
  346.        Use  that  file with the RReemm22ppss --pp option to create calen-
  347.        dars with the year and month in large grey letters in  the
  348.        background of the calendar.
  349.  
  350.  
  351. AAUUTTHHOORR
  352.        David F. Skoll
  353.  
  354. BBUUGGSS
  355.        All RReemm22ppss options are case-sensitive, unlike RReemmiinndd.  Any
  356.        time you supply a font name or size,  line  thickness,  or
  357.        border  width, it is treated as a string and sent straight
  358.        to  the  PostScript  interpreter.   Thus,  if  you  supply
  359.        invalid  fonts or sizes, RReemm22ppss will not complain, but the
  360.        resulting PostScript output will probably not work.
  361.  
  362.        You should ensure that the values you  supply  for  margin
  363.        widths  are  sensible.   If they are too big for the media
  364.        size, RReemm22ppss will not complain, but again, the  PostScript
  365.        output will probably not work.
  366.  
  367. SSEEEE AALLSSOO
  368.        RReemmiinndd
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.                         30 September 1993                       6
  395.  
  396.  
  397.