home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: InfoMgt
/
InfoMgt.zip
/
remin310.zip
/
rem2ps.man
< prev
next >
Wrap
Text File
|
1993-11-05
|
14KB
|
397 lines
REM2PS(1) REM2PS(1)
NNAAMMEE
rem2ps - draw a PostScript calendar from Remind output
SSYYNNOOPPSSIISS
rreemm22ppss [[_o_p_t_i_o_n_s]
DDEESSCCRRIIPPTTIIOONN
RReemm22ppss reads the standard input, which should be the
results of running RReemmiinndd with the --pp option. It emits
PostScript code (which draws a calendar) to the standard
output.
OOPPTTIIOONNSS
--nn Produce a calendar whose first column is Monday
(rather than Sunday.)
--pp ffiillee
Include the contents of _f_i_l_e in the PostScript pro-
logue. This allows you to define procedures, vari-
ables etc. which can be used by the PPSS and PPSSFFIILLEE
reminders. You should not include any document
structuring comments in your prologue.
--ll Produce the calendar in landscape mode rather than
the default portrait mode.
--cc[_n] If _n is omitted, disables the small calendars for
next and previous months which are normally gener-
ated. If _n is supplied, it can range from 0 to 3,
with the following meanings:
00 Disable small calendars
11 Place the small calendars at the bottom-
right if there is room; otherwise, place
them at the top-left.
22 Place the small calendars at the top-left if
there is room; otherwise, place them at the
bottom-right.
33 Place the previous month's small calendar at
the top-left and the next month's at the
bottom-right if there is room; otherwise,
follow _n=1. A moment's thought reveals that
an option which splits the calendars if
there is room and otherwise follows _n=2
yields the same results as _n=3.
--ii Use ISO 8859-1 standard encoding for the PostScript
fonts. If you do not use this option, the default
encoding is used.
--ee Make the calendar fill the entire page. By
30 September 1993 1
REM2PS(1) REM2PS(1)
default, the calendar is slightly smaller than the
page. This allows days with many reminders to
"expand" as needed. However, if you don't have
days which expand, you can use this option to make
all of the boxes slightly bigger. One caveat: If
you do use the --ee option and one day has many
reminders, the calendar may expand off the page,
losing some information. Experiment!
--mm mmeeddiiaa
Set the page size. If you use the -m option, you
must specify the media type, which can be one of
the following. (Sizes are approximate.)
Letter 8.5 x 11 in.
Legal 11 x 17 in.
Ledger 8.5 x 14 in.
Statement
5.5 x 8.5 in.
Executive
7.5 x 10 in.
A3 29.7 x 42 cm.
A4 21 x 29.7 cm.
A5 14.8 x 21 cm.
B4 25.7 x 36.4 cm.
B5 18.3 x 25.7 cm.
Folio 8.5 x 13 in.
Quarto 8.5 x 10.8 in.
10x14 10 x 14 in.
Type "rem2ps -m help" for a list of available
media. Note that the media type (and all RReemm22ppss
options) are case-sensitive. If you don't use the
--mm option, the media defaults to a compiled-in
default - this is usually Letter for North America
and A4 for Europe. The "-m help" option will dis-
play the compiled-in default.
--ff[ttsshheedd] _f_o_n_t
Set the font for the calendar title, the small cal-
endars, the day-of-week headings, the calendar
entries, and the day numbers, respectively. _F_o_n_t
30 September 1993 2
REM2PS(1) REM2PS(1)
must be the name of a valid PostScript font. The
default fonts are equivalent to specifying:
-ftshe Helvetica -fd Helvetica-BoldOblique
In other words, the heading, entry and small-
calendar fonts are set to Helvetica, and the font
for the day numbers is set to Helvetica-
BoldOblique.
--ss[tthheedd] _s_i_z_e
Set the size (in points) of the text for the the
calendar title, day-of-week headings, the calendar
entries, and the day numbers, respectively. _S_i_z_e
must be a decimal number. The default sizes are
equivalent to specifying:
-sthd 14 -se 8
In other words, the heading and day numbers are
14-point fonts, and the calendar entries are
printed in 8-point text.
--bb _s_i_z_e
Set the size of the blank white border in each cal-
endar box to _s_i_z_e points. The default border size
is 6 points, or 1/12 in.
--tt _s_i_z_e
Set the thickness of the black calendar grid lines.
The default is 1, for a line thickness of one point
(1/72 in.)
--oo[llrrttbb] _s_i_z_e
Set the left, right, top, and/or bottom margins to
_s_i_z_e points. For this option only, _s_i_z_e must be an
integer. It represents the margin size in units of
1/72 in. The default margin sizes are 36, for
half-inch margins. If you wish to punch holes in
the calendar page to insert it into a binder, you
may wish to increase the left margin to one inch.
In that case, you should also decrease the heading
font size to 12 points for good output:
# This gives good results for putting into a binder
rem2ps -ol 72 -sh 12
UUSSAAGGEE
To use RReemm22ppss, you should pipe the output of RReemmiinndd with
the --pp option to RReemm22ppss, and then send the result to a
printer. This is most easily illustrated with examples:
remind -p12 /dev/null 1 jan 1994 | rem2ps | lpr -Plaser
30 September 1993 3
REM2PS(1) REM2PS(1)
That example creates a blank calendar for the entire year
of 1994, and sends it the the printer named "laser."
remind -p ~/.reminders | rem2ps -l -sd 18 > cal.ps
This reminder creates a calendar for the current month,
filling in entries from the reminder file "~/.reminders."
The calendar is produced in landscape mode, with a font
size of 18 for the day numbers. The result is put in the
PostScript file "cal.ps."
VVAARRIIAABBLLEESS AAVVAAIILLAABBLLEE TTOO UUSSEERR--SSUUPPPPLLIIEEDD PPOOSSTTSSCCRRIIPPTT CCOODDEE
The following variables are available to PPSS and PPSSFFIILLEE-
type reminders. (This material is duplicated in the
RReemmiinndd manual page.)
LineWidth
The width of the black grid lines making up the
calendar.
Border The border between the center of the grid lines and
the space used to print calendar entries. This
border is normally blank space.
BoxWidth and BoxHeight
The width and height of the calendar box, from cen-
ter-to-center of the black gridlines.
InBoxHeight
The height from the center of the bottom black
gridline to the top of the regular calendar entry
area. The space from here to the top of the box is
used only to draw the day number.
/DayFont, /TitleFont, /EntryFont, /SmallFont and /HeadFont
The fonts used to draw the day numbers, the month
and year title, the calendar entries, the small
calendars, and the day-of-week headings, respec-
tively.
DaySize, TitleSize, EntrySize and HeadSize
The sizes of the above fonts. (The size of the
small calendar font is _n_o_t defined here.) For
example, if you wanted to print the Hebrew date
next to the regular day number in the calendar,
use:
REM PS Border BoxHeight Border sub DaySize sub moveto \
/DayFont findfont DaySize scalefont setfont \
([hebday(today())] [hebmon(today())]) show
Note how /DayFont and DaySize are used.
30 September 1993 4
REM2PS(1) REM2PS(1)
Note that if you supply PostScript code, it is possible to
produce invalid PostScript files. Always test your
PostScript thoroughly with a PostScript viewer before
sending it to the printer. You should not use any docu-
ment structuring comments in your PostScript code.
In addition, prior to drawing a calendar page, RReemm22ppss
emits the following PostScript code:
save (mon) (yr) PreCal restore
where _m_o_n and _y_r are the month and year of the calendar
page. The default PPrreeCCaall procedure simply pops the argu-
ments and does nothing. However, you can define a PPrreeCCaall
function in your prologue file to do whatever you want -
it can draw a background for the entire calendar, for
instance.
In the context of the PPrreeCCaall procedure, the following con-
ditions hold:
o The PostScript origin is at the bottom left-hand
corner of the page, and PostScript units of 1/72"
are in effect.
o The variables MinX, MinY, MaxX and MaxY define the
bounding box within which the calendar will be
drawn.
o The font and font-size variables, as well as Border
and LineWidth described previously, are valid.
For an example, create a file called "myprolog" whose con-
tents are:
/PreCal {
/yr exch def
/mon exch def
/xsiz1 MaxX MinX sub def
/ysiz1 MaxY MinY sub def
/xsiz xsiz1 MinX sub MinX sub def
/ysiz ysiz1 MinY sub MinY sub def
xsiz
ysiz
lt
{/len xsiz 1.41 mul def
MinX MinX add ysiz1 xsiz1 sub 2 div MinY add MinY add moveto}
{/len ysiz 1.41 mul def
xsiz1 ysiz1 sub 2 div MinX add MinX add MinY MinY add moveto}
ifelse
/Helvetica-Bold findfont 1 scalefont setfont
mon stringwidth pop
( ) stringwidth pop add
yr stringwidth pop add
30 September 1993 5
REM2PS(1) REM2PS(1)
len exch div /len exch def
/Helvetica-Bold findfont len scalefont setfont
0.95 setgray
45 rotate
mon show
( ) show
yr show
} bind def
Use that file with the RReemm22ppss --pp option to create calen-
dars with the year and month in large grey letters in the
background of the calendar.
AAUUTTHHOORR
David F. Skoll
BBUUGGSS
All RReemm22ppss options are case-sensitive, unlike RReemmiinndd. Any
time you supply a font name or size, line thickness, or
border width, it is treated as a string and sent straight
to the PostScript interpreter. Thus, if you supply
invalid fonts or sizes, RReemm22ppss will not complain, but the
resulting PostScript output will probably not work.
You should ensure that the values you supply for margin
widths are sensible. If they are too big for the media
size, RReemm22ppss will not complain, but again, the PostScript
output will probably not work.
SSEEEE AALLSSOO
RReemmiinndd
30 September 1993 6