.\" http://berklix.com/~jhs/standards/common.rof .\" installed to /usr/share/tmac/common.rof by berklix2.mk .\" ---------------------------------------------------------------------------- .\" Defines things like address window in envelope placement, common to both: .\" - Company headed paper, .\" - Personal headed paper .\" - Non headed paper such as personal resume/CV. .\" ---------------------------------------------------------------------------- .\" \# Everything up to and including the next newline is .\" ignored. This is interpreted in copy mode. This .\" is like \% except that \% does not ignore the ter- .\" minating newline. .\ .rj n Right justify the next n input lines.A .\" .vpt n Enable vertical position traps if n is non-zero .\" \n[.ev] The name or number of the current environment .\" \n[.fam] The current font family. string-valued register. .\" \n[.in] The indent that applies to the current output line. .\" ---------------------------------------------------------------------------- .\" { Macro - Set defaults such as font size etc to initial values. .de se .\" ---------------------------------------------------------------------------- .\" Auto Hyphenation of longs word wrapping Off, as for: .\" German: I dont know how to get groff to do the repeat 2nd '-' .\" character of German hyphenation rules. .\" English: It looks unpleasant in a letter (might need it in a .\" narrow newspaper column though). .nh .\" ---------------------------------------------------------------------------- .\" Justification: I'd like to suppress white space padding - how ? .\" ---------------------------------------------------------------------------- .\" Page Size .\" A4 paper is 29.7c * 21c (@ 2.54 cm/inch: 11.692913 * 8.2677165) .\" * 72: 841.88976 * 595.27559 .\" width & height in 1/72nd of inch .\" My A4 paper when measured looks more like 29.65 not 29.7 cm. .\" .p of 841890 comes from /usr/share/groff_font/devps/DESC .\" which comes from .\" /usr/src/gnu/usr.bin/groff/devps/../Makefile.cfg PAGE=letter .nr PL 29 .nr LP 65 .if '\*[format]'ps' \{\ .pl 29.65c \} .\" .pl \\n(PL.\\n(LPc .\" ---------------------------------------------------------------------------- .\" .if '\*[format]'ascii' \{\ .\" .pl 200c \} .\" If this number is low, one gets extra footers in middle of output, .\" Probably the least worst option .\" If this number is high, it pads out to a long file with trailing footer. .\" Which isnt too bad on a one page document, but on a multi page .\" output it looks awfull, & leaves a lot of vi searching forward .\" through blank lines & editing to clean up. .\" ---------------------------------------------------------------------------- .if '\*[format]'html' \{\ .pl 400c \} .\" Works nicely, stops extra footers in middle of file. .\" ---------------------------------------------------------------------------- .nr LL 19 \" Line length - excluding .PO and right margin .ll \\n(LLc \" Line length .\" .ll (u;\\n[LL]*5/6) .\" .ll (u;\\n[LL]) .\" .ll \n[@ll]c .\" .ll \\n[.l]u .\" ---------------------------------------------------------------------------- .nr PO 7 \" Page Offset - Horizontal from left paper edge in mm. .\" (Fold marks need to be printed as far to left as possible.) .\" PO 6 still leaves some tiny bit of text amputated .po 0.\\n(POc \" Page Offset .\" ---------------------------------------------------------------------------- .nr TO 5 \" Text Offset - Horizontal between fold marks & text in mm. .in 0.\\n(TOc \" Text Offset .\" ---------------------------------------------------------------------------- .nr HM 3 \" in mm. Header Margin used with .hd .sp 0.\n(HMc .\" I used to use 3, but now use 9 to allow for fax page header .\" Does command .hm really exist ? .\" ---------------------------------------------------------------------------- .\" .nr FM 9 \" Footer Margin used with .wh -0.\n(FMi fo .nr MF 2 \" Footer Margin used with .wh -\n(MF.\n(FMc fo .nr FM 6 \" Footer Margin used with .wh -\n(MF.\n(FMc fo .\" The above I'm not sure I even need in this file, .\" & they now get over ruled in vsl.l_rof .\" ---------------------------------------------------------------------------- .\" Font Sizes .\" With unset initial defaults, this .\" .ps +8 .\" .vs +8 .\" changes register dump from this: .\" < .s 10 .\" < .sr 10 .\" < .ps 10000 .\" < .psr 10000 .\" < .v 12000 .\" to this: .\" > .s 18 .\" > .sr 18 .\" > .ps 18000 .\" > .psr 18000 .\" > .v 20000 .nr PS 10 \" 10 point (10/72") font size .if !'\*[format]'ascii' .ps \\n(PS \" font size in 1/72i points .nr VS 12 \" 12 point line spacing .if !'\*[format]'ascii' .vs \\n(VS \" vertical spacing inter-line in 1/72i points .\" bell troff PS default 10 (as in book) .\" bell troff VS default 12 (as in book) .\" ---------------------------------------------------------------------------- .so inc/font_r.rof .\" contains .ft TR in the directories where groff -Tps is used .\" contains nothing in the directories where groff -Tascii is used .\" JJLATER to consider: make this automatic depending on format .\" .if '\*[format]'ps' .\" ---------------------------------------------------------------------------- .\" Define character missing if not postscript output. .\" .so /usr/share/vsl/umlauts.rof .so /usr/share/tmac/umlauts.rof .\" ---------------------------------------------------------------------------- .\" DEBUG .\" PL=\n(PL, LL=\n(LL, PS=\\n(PS, VS=\n(VS, PO=\n(PO, Y=\nY, HM=\n(HM, FM=\n(FM.\" TO=\n(TO .\" .pnr \" Print the names and contents of all currently defined .\" number registers on stderr. .\" .ptr \" Print the names and positions of all traps (not including .\" input line traps and diversion traps) on stderr. .\" Empty slots in the page trap list are printed as well, because .\" they can affect the priority of subsequently planted traps. .\" ---------------------------------------------------------------------------- .\" The -ms ucb macros need an initial .AM, then u\*:, .\" The -ms bell (-mos @ ucb) umlauts use \*:u (ie before the diacritical). .\" ---------------------------------------------------------------------------- .\" for my vanilla 4.2 + epson, an initial crude viewing is arrangeable with: .\" tbl *.rof | nroff -Tm1509 -h .\" .ps doesnt reduce to pica, but this works: \(rtsmaller\(rb .\" ---------------------------------------------------------------------------- .\" Number registers work in integers only. .\" Number registers are used to reset current values by later macros. .\" ---------------------------------------------------------------------------- .\" LATER embed os us oo macros in here .\" ---------------------------------------------------------------------------- .\" end of se macro .. .\" ---------------------------------------------------------------------------- .de os \" { Macro - overscore a string. .\" Invoke by: .os "words under a line" .\" This uses the high hhorizontal bar of a an extended square root sign, .\" so has no gaps .\" ideally the line should later be raised by a bit above text .\" but that might encroach on next line above. .\" If I overstrike in ascii, it zaps part of text output on long lines. .\" Overstriking in HTML doesnt work. So only overstrike with postscript. .\" hence use of \*(rn to avoid \(rn : .\" troff: warning: can't find special character `rn' .\" The length of rn is zero in html so i got a mess until I added .\" the if below. .\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .if '\*[format]'ps' \\$1\l'|0\\*(rn' .\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .\" This way of drawing a line in ascii is a bit of a cludge, but looks OK. .if '\*[format]'ascii' -------------------------------------------------------------------------- .if '\*[format]'ascii' \\$1 .\" --- .\" .if '\*[format]'ascii' \\$1\l'|0\\*(rn' .\" Puts a line under not over - no good. .\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .if '\*[format]'html' -------------------------------------------------------------------------- .\" Doesnt work: .if '\*[format]'html'
.if '\*[format]'html' \\$1 .\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .\" } .. .\" ---------------------------------------------------------------------------- .de us \" { Macro - under rule a string. \\$1\l'|0\(ul' .\" invoke by: .us "words above a line" .. .\" } .\" ---------------------------------------------------------------------------- .\" { Macro Reassert left margin for period of printing header/footer .de oo .in 0.\n(TOc .. .\" } .\" ---------------------------------------------------------------------------- .de no .\" Dummy macro does nothing, I use this to point expired when-traps at .. .\" ---------------------------------------------------------------------------- .\" Macro - reset all defaults between documents. .\" Where multiple groff sources are concatenated for input .\" to make one big postscript file (such as for fax) .\" We need to suppress settings in previous documents, .\" hence each compound document should end with .rs .\" We must remove the definition of header, because USD24-16 says: .\" in #7.5 Traps: "Reaching the bottom of page springs the top of .\" page trap" In the case where 1st doc is a VSL letter, & 2nd doc .\" is my personal resume, I don't want the resume to have a VSL header. .de rs .\" Terminate no-format-mode, in case it was left in no format mode, .\" such as when previous document ends in a list .fi .\" set environment 0 just in case a different env was left set .ev 0 .\" do I need a .. in next line ? .\" .. .\" ---------------------------------------------------------------------------- .\" Null out header macro. .de hd \\.. .\" ---------------------------------------------------------------------------- .bp \" break to new page, flushing old document .\" ---------------------------------------------------------------------------- .\" Null out footer macro. .de fo \\.. .\" ---------------------------------------------------------------------------- .\" Replace traps with null that will do less harm to next doc. .wh 0 no .\" .wh -0.\n(FMi no .se .. .\" End of Macro definitions. Now initialise .se \" set each document to initial values .\" --------------------------------------------------------------------------- .\" To add a mark to print to catch translator's eye, embed this string: .\" \*[TRANSLATOR] .ds TRANSLATOR \s+4\fB[XXX\h'-\w'XXX'u'\(ul\(ul\(ul\(ul\h'-\w'\(ul\(ul\(ul\(ul'u'\v'-\w'W'u'\(ul\(ul\(ul\(ul\v'\w'W'u'\h'-\w'\(ul\(ul\(ul\(ul'u'XXX]\(rh\fR\s-4 .\" --------------------------------------------------------------------------- .de IN .in +2 \" { .. .de OUT .in -2 \" } .. .de POINT .if '\*[format]'html' .br .\" Without the .br all the point get bundled into 1 big paragraph. .\" With the .br all the points get seperated by a spurious blank line. .ti -\w'\(bu 'u \(bu .. .de LINE .sp 0.15 ----------------------------------------------------------- .sp 0.15 .. .\" --------------------------------------------------------------------------- .\" List of all refs to word envelope, in context of groff sizes. .\" HP PCL5 Printer Language Technical Reference Manual: Page 5-2 .\" Paper Executive 7.25 x 10.5 in .\" Paper Letter 8.5 x 11 .\" Paper Legal 8.5 x 14 .\" Paper a4 210mm x 297mm .\" Envelope Monarch Letter .\" Envelope Com-10 ( Business 4 1/8 x 9 1/2 in ) .\" Envelope International DL ( 110mm x 220mm ) .\" Envelope International C5 ( 162mm x 229mm ) .\" Sam says: .\" DL = 3 fold A4 size envelopes .\" --------------------------------------------------------------------------- .\" The indents are specified in centimetres rather than number of characters .\" so that if the font size changes between Addresss From & Date lines, .\" the 2 sections align vertically. .nr AF 12 \" Indent for Address From (on right) .nr AT 2 \" Indent for Address To (on left in window) .\" --------------------------------------------------------------------------- .de WINDOW_START .\" Address in Envelope Window .sp -50c \" top of page .po 0 \" left of page .in 0 \" left of page .ft H \" To Mark corners of box .ps 6 \" To Mark corners of box .vs 6 \" To Mark corners of box .nf \"{ .\" Physical Sizes of Envelope, Sheet & Window: .\" A4 Sheet measured by jhs@: 29.7c vertical x 21c horizontal: .\" Folded twice becomes 9.9c vertical x 21c horizontal. .\" Envelope type DL measured by jhs@: 11.0c vertical x 21.8c horizontal: .\" Window left edge is 2.0c horiz. from left edge of env. .\" Window right edge is 11.0c horiz from left edge of env. .\" Window top edge is 5.0c vertical from top edge of env. .\" Window base edge is 9.5c vertical from top edge of env. .\" Window Size of plastic: 11.0c - 2.0c x 9.5c - 5.0c = 9.0c x 4.5c H&V .\" Sheet slips about loose inside envelope, slack is: .\" 21.8c - 21.0c x 11.0c - 9.9c = 0.8c x 1.1c Horiz. & Vertical. .\" So printed window must smaller than plastic window: .\" 9.0c x 4.5c - 0.8c x 1.1c = 8.2c x 3.4c .\" Cursor Offsets & Printing Distances: .\" Window top edge can remain unchanged at 5c. .\" Window left edge can remain unchanged at 2c. .\" So Top Left Corner Start point is: \v'5.0c' \h'2.0c' .\" This is given first as some other smaller displacements after .\" are negative, if they came first, they would fail. .\" A '*' marks each corner of box. .\" The '*' will print about half a line above cursor position, .\" so move ink down half a print line. \v'0.5' .\" Middle of '*' will print half a character to right of cursor .\" position, so move ink left half a character. \h'-0.5' .\" After printing the box of 4 x '*' correct with .\" \v'-0.5' \h'-0.5' .\" Base edge reduce to 9.5c - 1.1c = 8.4c, height = 8.4c - 5.0c = 3.4c .\" Right edge reduce to 11.0c - 0.8c = 10.2c, length = 10.2c - 2.0c = 8.2c .\" On Printing with HP LaserJet 4L, Errors Detected, so add fudge factors: .\" Top is at 4.65c should be 5.0c so add 0.35c \v'0.35c' .\" Left is at 1.45c should be 2.0c so add 0.55c \h'0.55c' .\" Warnng these fudge factors may vary between printers, even between .\" blocks of paper inserted at different times, or with .\" individual sheets slipping ? \v'5.0c'\ \h'2.0c'\ \v'0.35c'\ \h'0.55c'\ \v'0.5'\ \h'-0.5'\ *\ \h'-\w'*'u'\ \h'8.2c'\ *\ \h'-\w'*'u'\ \h'-8.2c'\ \v'3.4c'\ *\ \h'-\w'*'u'\ \h'8.2c'\ *\ \h'-\w'*'u'\ \h'-8.2c'\ \v'-0.5'\ \h'0.5'\ \v'-0.35c'\ \h'-0.55c' .\" ------------------------------------- .sp -50c .sp 5.0c .sp 0.35c .in 2c .in +0.55c .\" ------------------------------------- .ft HB \" Make it easy for postal staff to read. .ps 9.3 .vs 9.3 .sp 0.8 \" Step vertically down most of a line as print occurs above cursor. .\" (but there''s always a bit of white space above the font). .sp 0.3 \" Allow a vertical margin of error. .\" (Lasers grab paper slightly more & less paper from stack). .in +1.0 \" It prints to right of cursor so no step in needed, but .\" first characters of address are vital, avoid chopping risk. .\" .in +0.5 \" Allow a further horizontal margin of error. .\" To change default return address for a friend, add eg: .\" .ds RETURN \s-2Prime Minister,\010 Downing Street,\0London,\0England\s+2 .\" If RETURN is not defined, it emits a nearly blank line with a single _. .if '\*[RETURN]'' .ds RETURN XXX \s-3Name failed to come from RETURN variable\s+3 XXXX .\" The "if" above does not work yet, so: .\" inc/jhs.rof & and inc/vsl.l_rof have .\" .ds RETURN Whatever. .\" before .\" .so /usr/share/tmac/common.rof .us "\*[RETURN]" .sp 0.5 \" Seperate return address from main outgoing address. .ps 15 .vs 15 .. .\" ------------------------------------- .de WINDOW_END .ft R .fi \" } .po \\n(OP.\\n(POc .in 0 .sp -50c .sp 5.5c \" Some random distance below header. .. .\" --------------------------------------------------------------------------- .\" end of /usr/share/tmac/common.rof