[net.micro.apple] How to justify with control chars in AppleWriter

binder@dosadi.DEC (No matter where you go, there you are.) (10/17/85)

> 	dick, i would be interested in knowing how you "creatively" get around
> the problem of control characters (for the printer) being counted during
> line fill-in. 

> many thanks.  anthony.

Anthony,

It's a truly fun and exciting process !  First, you print out the file
normally, with no control characters in place.  Then, on each line where
control characters are to be inserted, you break the text with a <CR> at the
end of the line, in the same place where AppleWriter broke it during printing.
Then you establish the following conditions with embedded commands: 

.pm 0
.lj
.rm +<the number of control characters to be inserted, plus one>
 - or -
.rm <what it is now, plus the control characters, plus one>

The right margin control may require a little explanation.  Assume that you've
got the margin set at 73.  You want to put the printer into italics mode for
one word and then return it to normal mode.  For an Epson printer, this
control requires an <ESC>4 to start italics and an <ESC>5 to turn it off;
that's a total of four characters.  You would need five extra character spaces
on the line, so you set the margin with either of these embedded commands: 

.rm +5
- or -
.rm 78

Basically what you are doing is bypassing all of AppleWriter's justification
code and forcing the creation of a special line.  The extra character space
needed is to get round the <CR> that you've inserted, to prevent it from
causing a line break before the last word that you want on the line. 

Now insert the control characters in the text, and add spaces to justify, in 
the same places where Applewriter put them.  Then, on the very next line, re-
establish your previous paragraphing and margin controls with further embedded
commands. 

When you print this altered text, it should come out all properly justified.
If it still misses, you can play with it a bit; things should be quite easy 
after you've printed it once with the control characters in place.

BTW, for those of you who think the ][+ is obsolete, there are still BUNCHES 
of us out here who haven't got the money (or the justification to spend it) 
for a //e.  I'd like one, is there anyone out there who wants to donate to an 
uncharitable cause ?  :-)

Cheers,
Dick Binder   (The Stainless Steel Rat)

UUCP:  { decvax, allegra, ucbvax... }!decwrl!dec-rhea!dec-dosadi!binder
ARPA:  binder%dosadi.DEC@decwrl.ARPA

Thu 17-Oct-1985 09:08 Eastern Daylight Time

anthony@utcsstat.uucp (Anthony Ayiomamitis) (10/22/85)

	Dick, your trick is quite impressive!!!! Although I had to read your
instructions two or three times, your solution became very clear the last time
around.

Anthony.
-- 

       	{allegra,ihnp4,linus,decvax}!utzoo!utcsstat!anthony
        {ihnp4|decvax|utzoo|utcsrgv}!utcs!utzoo!utcsstat!anthony