perm filename PUBMAC[10X,AIL] blob
sn#429842 filedate 1979-04-07 generic text, type T, neo UTF8
.IF FALSE THEN START "remarks"
Welcome to the magic manual producing (header) file. You have
a choice of two kinds of manuals - ONECOL and LESCOL:
ONECOL:Does a 69x52 page, which is the standard size
for pub documements run on the line printer.
the resultant doc file is an incredible 260 pages
long. One still must run off a title page and
a preface. Right now, TITLE.PUB and PREF.PUB
are set up for the XGP, but conversion to
the LPT ought to be relatively easy.
LESCOL:Creates long skinny pages, which when printed
via OMAN.XS on the XGP give 232 pages that must
then be trimed along either the left or right edge,
then taped along the back to give the "Guttenberg
Bible" galleys. These are sent to the printers
for 60% reduction. Preface must also be reduced,
but title page is not reduced.
Warning: PUB is very slow. It takes at least an hour of CPU time to
do a complete run.
.end "remarks";
.LESTER←NULL; COMMENT assumes no contents and standard one col;
.CONTS←NULL;
.TITLEPG←NULL;
.
.AT "⊗≡⊗" ⊂ '42 ⊃;
.
.MACRO ONECOL ⊂ COMMENT for standard one column;
.PAGETOP ← DOCNAME ← NULL;
.EVERY HEADING ({DOCNAME⎇,,{PAGETOP⎇)
.EVERY FOOTING (,{PAGE!⎇,)
.⊃;
.
.MACRO XGPCOL ⊂ COMMENT FOR STANDARD XGP;
.DEVICE XGP
.FONT 1 "BDR30" COMMENT USED TO BE NGR30 -- RHT;
.FONT 2 "BDR40" COMMENT USED TO BE SOMETHING CALLED CLAR;
.FONT 3 "BDR30" COMMENT USED NOT TO HAVE FONT 3;
.FONT 4 "LPT"
.LESTER←"X"
.TURN ON "π" FOR "%"
.<<FOLLOWING 2/28/74 BY BH&RHT>>
.LPP←49;
.<<JFR 2-8-77>>
.LPP←53;
.PAGE FRAME LPP HIGH 81 WIDE
.AREA TEXT LINES 4 TO LPP-2
.TITLE AREA FOOTING LINE LPP
.TITLE AREA HEADING LINES 1 TO 3
.PLACE TEXT
.<<END OF ADDITION>>
.PAGETOP ← DOCNAME ←NULL;
.EVERY HEADING ({DOCNAME⎇,,{PAGETOP⎇)
.EVERY FOOTING(,{PAGE!⎇,)
.⊃;
.
.MACRO LESCOL ⊂ COMMENT for pasted 2 columns- looks like ACM
. after photo reduction @ 60%;
.LESTER←"T";
.PAGE FRAME 66 HIGH 60 WIDE;
.TITLE AREA HEADING LINES 1 TO 3;
.TITLE AREA FOOTING LINE 66;
.TEXT AREA TEXT LINES 4 TO 64;
.PAGETOP ← DOCNAME ← NULL;
.BEFORE PAGE ⊂NOFILL; INDENT 0; PREFACE 0; TURN ON "{←→"
.IF 1=(PAGE MOD 4) THEN START "INONE"
.PLACE HEADING
π2{DOCNAME⎇π*
.END "INONE" ELSE IF 2=(PAGE MOD 4) THEN START "INTWO"
.PLACE HEADING
→π2{PAGETOP⎇π*
.PLACE FOOTING
→π2{PAGE!⎇π*
.END "INTWO" ELSE IF 3 = (PAGE MOD 4) THEN START "INTHREE"
.PLACE HEADING
π2{PAGETOP⎇π*
.PLACE FOOTING
π2{PAGE!⎇π*
.END "INTHREE" ELSE START "INFOUR"
.PLACE HEADING
→π2{DOCNAME⎇π*
.END "INFOUR"
.⊃;
.PLACE TEXT;
.DEVICE LPT
.FONT 1 "NGR40L"
.FONT 2 "NGR40.FNT[1,KVL]"
.FONT 3 "NGR30.FNT[1,KVL]"
.FONT 4 "FIX25"
.TURN ON "π" FOR "%"
.!XGPLFTMAR←265;
.!XGPCOMMANDS←"/PMAR=3050/TMAR=75/BMAR=45"
π1
.COUNT PAGE FROM 1 TO 100 PRINTING ⊂ ⊃;
.⊃;
.
.MACRO UPITY ⊂
.IF (LESTER="T")∨(LESTER="X") THEN START "UP"
.MACRO UP0(TIT) ⊂
π2TITπ1
.⊃;
.
.MACRO UP (TIT) ⊂
.if lines<4 then skip to line 1;
π2TITπ1
.CONTINUE
.⊃;
.MACRO EXA ⊂NOFILL;SELECT 3;GROUP;⊃;
.MACRO ENDEXA ⊂FILL;SELECT 1;APART;⊃;
.END"UP" ELSE START "UPUP"
.MACRO UP0(TIT) ⊂
↓_TIT_↓
.⊃;
.
.MACRO UP (TIT) ⊂
.IF LINES<4 THEN SKIP TO LINE 1;
↓_TIT_↓
.CONTINUE
.⊃;
.MACRO EXA ⊂NOFILL;GROUP;⊃;
.MACRO ENDEXA ⊂FILL;APART;⊃;
.END "UPUP";
.⊃;
.
.
.MACRO CONTENTSING ⊂
.INSERT CONTENTS
.CONTS←"TRUE";
.
.MACRO BACKCONTENTS ⊂
. PORTION CONTENTS
. PAGETOP ← "TABLE OF CONTENTS"
. TURN ON "{∂∞\→←#↓_"
. NEXT PAGE
##
. COUNT PAGE FROM 1 TO 10 PRINTING ⊂ ⊃;
. IF LESTER= "T" ∧ PAGE MOD 2 = 0 THEN NEXT PAGE;
. CENTER
. TABS 21,24,27,30,33,36,39,42,45,48,51,54,57,60,63
{UP0(T A B L E O F C O N T E N T S)⎇
. FILL INDENT 0,16 PREFACE 0; NOJUST; CRBREAK; SKIP 2
. IF LESTER="X" THEN NARROW 15,15;
SECTION→PAGE
. SKIP 1
. RECEIVE
. WIDEN
. ⊃
.⊃;
.
.MACRO TITLEING ⊂
.INSERT TITLEPAGE
.⊃
.MACRO FRONT⊂
.COUNT SECTION PRINTING 1
.MACRO SEC(NAME) ⊂
. BEGIN "SECTION MACRO"
. NEXT PAGE
. TURN ON "#"
. IF LESTER="T" ∧ PAGE MOD 2 = 0 THEN start
##
. NEXT PAGE; end ;
. PAGETOP← SCNAME ← "NAME";
. SSNAME ← NULL ;
. NEXT SECTION;
. TURN ON "↓_{⎇←→∂" CENTER
.UP0(SECTION {!⎇)
. SKIP
{UP0(NAME)⎇
. SKIP 3
. IF CONTS="TRUE" THEN SEND CONTENTS ⊂
. APART;
. SKIP 2;
. GROUP;
{SECTION!⎇∂6NAME→{PAGE!⎇{BREAK
. SKIP 1;
. ⊃;
. END "SECTION MACRO"
.⊃;
.COUNT SUBSECTION IN SECTION PRINTING 1
.MACRO SS(NAME) ⊂
. BEGIN "SUBSECTION MACRO"
. SSNAME←"NAME";
. IF LINES<12 THEN NEXT PAGE; NEXT SUBSECTION;
. FILL SKIP 2 TURN ON "{∂∞→#↓_"
. IF CONTS="TRUE" THEN SEND CONTENTS ⊂
∂(6){SUBSECTION!⎇∂(11)NAME→{PAGE!⎇
. ⊃;
{SECTION!⎇.{!⎇ - {UP0(NAME)⎇
. SKIP 1
. END "SUBSECTION MACRO"
.⊃;
.
.⊃;
.
.MACRO INDEXING ⊂
. AT "%%" PHRASE "%" ⊂
. "PHRASE" ;
. TURN ON "{"
. SEND INDEX ⊂⎇<<{PAGE!⎇#PHRASE#{ ⊃
. TURN OFF ⊃;
.
. AT "β" PHRASE "β" ⊂
. TURN ON "{"
. SEND INDEX ⊂⎇<<{PAGE!⎇#PHRASE#{⊃
. TURN OFF ⊃;
. MACRO BACKINDEX ⊂
. SCNAME ← SSNAME ← NULL
. PAGETOP ← "INDEX"
. IF CONTS="TRUE" THEN SEND CONTENTS ⊂
. SKIP 2
. APART
I∂6INDEX→{PAGE!⎇
. ⊃
. PORTION INDEX
.
. WASWORD ← WASLETT ← WASPG ← NULL ;
. AT "<<" PGNO "#" PHRASE "#" ⊂ LETT ← "PHRASE"[1] ;
. IF LINES<9 THEN NEXT PAGE ;
. IF "PHRASE" ≠ WASWORD THEN START BREAK ⎇PHRASE##PGNO{ END
. ELSE IF "PGNO" ≠ WASPG THEN ⎇,#PGNO{ ;
. WASPG ← "PGNO" ; WASLETT ← LETT ; WASWORD ← "PHRASE" ; ⊃
.
. FILL INDENT 0,3 PREFACE 0; NOJUST; CRBREAK; TURN ON "←⎇{#"
←INDEX
. SKIP 4
. RECEIVE "##"
. ⊃;
.⊃;
.MACRO APE ⊂
.PAGETOP←"APPENDICES";
.IF CONTS="TRUE" THEN SEND CONTENTS ⊂
. APART;
. SKIP 2;
. GROUP;
A∂6APPENDICES{BREAK
. SKIP 1;
. ⊃;
.COUNT AP PRINTING 1;
.
.MACRO APPEND (NAME) ⊂
.BEGIN
.NEXT AP
.turn on "↓_"
.SKIP 2
.CENTER
.up0(APPENDIX {AP!⎇)
.SKIP
.up0(NAME)
.SKIP
.SKIP
.END
.
.IF CONTS="TRUE" THEN SEND CONTENTS ⊂
∂(8){AP!⎇∂(14)NAME→{PAGE!⎇
. ⊃;
.⊃
.⊃
.MACRO LIST(N,M) ⊂ COMMENT to make indented list;
.BEGIN FILL INDENT N,M,N
.IF LINES<11 THEN NEXT PAGE;
.TURN ON "\"
.TABS M
.⊃; COMMENT be sure to end the list with END;
.
.MACRO FUNK(N) ⊂ COMMENT to make runtimes stand out - start descr with FILL;
.IF LINES<8 THEN
.START NEXT PAGE ;
.END ELSE SKIP 3;
.BEGIN ;
.TURN ON "∞∂#"
.IF LESTER="T" THEN START "FU"
. center; COMMENT: you have to draw the centered lines by hand;
N
.END "FU" ELSE START "NK"
∞*∂(((RMARG - 2 - LMARG - LENGTH("N"))DIV 2))##N##∞*∂((RMARG-1))
.;
.END "NK";
.SKIP
.END
.⊃
.
.MACRO REFER ⊂
.IF CONTS="TRUE" THEN SEND CONTENTS ⊂
.APART
.SKIP
R∂6REFERENCES→{PAGE!⎇
.⊃
.BEGIN
.TURN OFF "."
.CENTER
.PAGETOP←"REFERENCES"
.NEXT PAGE
.UP0(REFERENCES)
.SKIP 2
.END
.⊃;
.
.MACRO PREF ⊂
.BEGIN
.PAGETOP←"PREFACE"
.next page;
.page←1;
.CENTER
.UP0(PREFACE)
.SKIP 2
.END
.⊃;
.
.MACRO BNF ⊂
.BEGIN "BNF"
.TURN ON "{⎇"
.FILL
.NOJUST
.INDENT 0,8,0;
.PREFACE 0;
.AT "::=" ⊂ BREAK;TURN ON "α∂"⎇∂5α:α:α={TURN OFF⊃;
.AT NULL ⊂BREAK;SKIP 1⊃;
.AT 0 ⊂BREAK;SKIP 1⊃;
.⊃;
.MACRO LPTFONT ⊂
.IF LESTER="X" THEN SELECT 4; ⊃
.MACRO GOGOGO ⊂
.PORTION MAINPORTION
.TURN ON "{\α#↓_";
.TABS 8,16,RMARG;
.IF LESTER = "T" THEN COUNT PAGE FROM 1 TO 900 PRINTING ⊂(PAGE +1)/2⊃ ELSE
.COUNT PAGE FROM 1 TO 900 PRINTING 1;
.⊃;
.
.MACRO MAN_FRONT ⊂
.DOCNAME←"SAIL USER MANUAL"
.UPITY;
.CONTENTSING;
.INDEXING;
.FRONT;
.GOGOGO;
.MACRO MAN_BACK ⊂
.BACKINDEX;
.BACKCONTENTS;
.⊃;
.⊃;
.
.MACRO TST_FRONT ⊂
.DOCNAME←"TEST RUN"
.UPITY;
.INDEXING;
.FRONT;
.GOGOGO;
.MACRO MAN_BACK ⊂ ⊃;
.⊃;
.
.MACRO STAND_FRONT ⊂
.UPITY;
.IF TITLEPG THEN TITLEING;
.CONTENTSING;
.FRONT;
.GOGOGO;
.MACRO MAN_BACK ⊂ BACKCONTENTS ⊃;
.⊃;