\begindata{text,538536064}
\textdsversion{12}
\template{help}
\define{global
}
\chapter{Advanced Formatting in EZ \


using\italic{ troff} Commands}


\section{Avoiding troff}


\leftindent{If the styles available on menu cards in EZ do not meet your 
formatting needs, you can probably obtain the effect you want through a 
combination of the \italic{\helptopic{lookz}} style editor, the 
\italic{\helptopic{header} }/ footer object, and 
\italic{\helptopic{compchar}}, a facility for composing international 
characters. See these help documents for more information:


\leftindent{\helptopic{lookz}		(line and paragraph spacing, margins)

\helptopic{header}\italic{	}(headers and footers, page numbering)

\helptopic{compchar}	(international characters)

}}
\section{Using troff}

\leftindent{
If you've read the section on "Avoiding troff" and have determined that 
those capabilities don't meet your needs, then you may want to use commands 
from \helptopic{troff}, the UNIX "typeset runoff" formatting package.  \



\bold{Warning:} \italic{ At some point in the not-too-distant future, the 
printing system used by EZ will be rewritten from the ground up. At that 
time, troff commands will cease to work at all; any documents that use them 
will no longer print correctly. To avoid this problem, you should instead 
use LookZ, the header inset, and compchar, as described above.}


This help document is not intended to explain all of troff, but it does 
introduce you to some of the troff commands that produce frequently 
requested formatting effects.  It includes sections on:


\leftindent{General instructions

Spacing, paging, and margin effects\leftindent{

Double and triple spacing

Margins

Blank space

Line spacing  \


Line numbering

}Page numbering and header/footer effects

\leftindent{Duplex numbering

Suppressing page numbers

Resetting or skipping page numbers

Forcing numbering of the first page

Page number style

}Special character effects

\leftindent{Accents, umlauts and other diacritics}

Miscellaneous commands

Advanced Troff

}
For more information about troff, see the  \helptopic{troff}\italic{ } help 
document, or consult the troff chapter in a hardcopy Unix User's Manual, 
Supplementary Documents. \


}
\section{General instructions}


\leftindent{\bold{To add troff commands to an EZ document:}


\leftindent{1) Type the command(s) at the point where you wish the effect 
to begin.  Put each command on its own line.


2)  Select the command(s) as you would any region, and choose 
\bold{FormatNote} from the \italic{Region} menu card.  This tells EZ to 
"pass through" the commands for interpretation by the part of Ezprint that 
does formatting, rather than printing them out in the document.

}
You may wish to use \italic{ }\helptopic{preview}\italic{  }before printing 
your document, to make sure that you have achieved the formatting effects 
you want.  To print an EZ document, choose \bold{Print} from the 
\italic{File} menu card in EZ or from the front menu card in Preview, or 
use the \typewriter{ezprint} command at the command prompt. \



\bold{Note:} troff macros from the -ms and -me macro packages will not work 
in EZ documents.

}
\section{Spacing, paging and margin effects}


\leftindent{\bold{Double or triple spacing.} The default printed spacing 
for documents prepared with EZ is single-spacing.  To change it, use the 
\italic{\bold{.}ls} (line spacing) command followed by the appropriate 
number; that is, use

\leftindent{
.ls 2      to get double-spacing \


.ls 3      to get triple-spacing \


}
Place the command at the beginning of the section where you wish spacing to 
change.  You can change again at any point.  To return to single-spacing, 
use .ls 1.

}
\leftindent{\bold{Customizing margins globally.  }Using the standard 8 1/2 
x 11 paper, EZ prints documents with default margins of 1 1/4 inches on 
both left and right. If you want to change the margen in globally in the 
document you can use PO and LL.


\leftindent{\bold{Example}. To get 1" margins on both sides, place the 
following command at the beginning of your document. (The "i" following the 
numbers stands for "inches.")


\leftindent{.nr PO .5i   \


.nr LL 7i  \


 } \


\bold{Example.} To get a 1.5" left margin, but only a 1" right margin, use 
the following commands:


\leftindent{.nr PO 1i

.nr LL 6.5i}

}
\bold{Customized margins locally. }Margins can also be set using two 
commands: the \italic{\bold{.}po} (page offset) command, which sets the 
left margin, and the \bold{.}\italic{ll} (line length) command, which 
determines how long the line of text will be.  The right margin is not 
controlled directly, but is calculated to fill the remaining page width, 
using the formula 8.5 - ( \italic{\bold{.}po}  +  \bold{.}\italic{ll }).  \



The smallest possible printed left margin is 1/2", which you get when you 
set \bold{.}po to 0.  In general, 1/2" is \italic{added} to any \bold{.}po 
that you specify. The same 1/2" is \italic{subtracted} from whatever 
\bold{.}ll you specify.


Place the .po and .ll commands at the beginning of the section where you 
wish the margins to change.  The change stays in effect up to the point 
where you place different .po and/or .ll commands.


\leftindent{\bold{Example}. To get 1" margins on both sides, place the 
following command at the beginning of your document. (The "i" following the 
numbers stands for "inches.")


\leftindent{.po .5i   \


.ll 7i  \


 } \


\bold{Example.} To get a 1.5" left margin, but only a 1" right margin, use 
the following commands:


\leftindent{.po 1i

.ll 6.5i}}}\leftindent{

}
\leftindent{\bold{Blank space.}  There are two commands that can insert 
blank space: \italic{\bold{.}sp} and \italic{\bold{.}ne }.  It is important 
to use Preview to make sure you are getting the amount of blank space you 
request, because the results of these commands are not always exactly as 
requested, for the reasons explained below.


The \italic{.sp} command is the more basic: it gives you the requested 
amount of blank space, unless it is not possible to fit that amount before 
the bottom of the page.  In that case, \italic{.sp} gives you as much blank 
space as it can (and it does \italic{not} put the remaining blank space at 
the top of the next page).  Thus, if you ask for a 4" blank space with the 
command


\leftindent{.sp 4i}


and there is only 2" between the command and the bottom of the page, you 
get 2" of blank space. (Note that here "bottom of the page" refers to the 
bottom of the printed part of the page, which is about 1" above the 
physical bottom of the page.) \



Using \italic{.ne} is a bit trickier, and is never guaranteed actually to 
give you a certain amount of blank space.   What you are in fact doing with 
\italic{.ne} is telling the formatter that you ".need" a certain amount of 
space for something (like a section of text that you want to keep 
together).  It does \bold{\italic{not} }indicate to troff that you need 
that amount of \italic{blank} space. \



If the amount of space you indicate exists between the command and the 
bottom of the page, you will get no blank space--the needed amount of space 
is available on that page.  If that amount of space is not available 
between the command and the bottom of the page, \italic{.ne} forces a page 
break, and you get the amount of blank space that exists between the 
command and the bottom of the page.  Thus, if you say you need 5" (say, for 
a section of text that should be all together) with the command


\leftindent{.ne 5i

}
and there is only 2.5" between the command and the bottom of the page, 
\italic{.ne} will force a page break, leaving blank the 2.5" of space on 
the page where the command appears.  (This makes sense to troff because the 
5" that you need are available all together on the next page.)

}
\leftindent{\bold{Customized spacing.}  Use the \italic{\bold{.}vs 
}(vertical spacing) command to customize the spacing in your documents. 
  Vertical spacing refers to the amount of room between the invisible 
"baselines" on which lines of text rest--in EZ the default is 14 points 
(there are 72 points in an inch).  With the default font size of 12 points 
(the default font is the serif font called Andy12), that means you get 
single-spacing with a 2 point gap (called "leading") between a baseline and 
the tops of the tallest letters in the next line.   Here are some other 
variations for use with a 12-point font:


\leftindent{\description{.vs 16p       produces single-spaced, 12-point 
text with four point leading

.vs 28p    produces double-spaced, 12-point text, but \italic{.ls 2} is 
easier and more reliable

}}
If you wish, you can use the \italic{.vs} command to print other line 
spacings as well, but be forewarned that \italic{.vs} sometimes misbehaves 
when sections of text containing the same style (for example, Indent) are 
broken over different pages by the formatter.  Apart from that ceaveat, 
various headers play with the vertical space as well, so you might have to 
issue this command after each header.

}
\leftindent{\bold{Line numbering.}  To print out line numbering at the left 
margin, use the \italic{\bold{.}nm} (number margin) command with two number 
arguments.  The first argument sets the line number of the line that 
directly follows the command--this will almost always be 1.  The second 
number specifies a) the first line where a number will appear and b) how 
often to number the lines.  \



\leftindent{\bold{Example.}  To get line numbering every five lines (on 
lines 5, 10, 15, etc.) use the command


\leftindent{.nm  1  5 } \


}
Note that using this command causes the text to be indented from the 
prevailing left margin, so it in fact slightly changes the number of lines 
in the document, compared to the un-numbered state.

}
\section{Page numbering and header/footer effects

}
\leftindent{\bold{Simplex versus duplex numbering.}  By default, EZ 
documents print out with "duplex" page numbering, but with the page number 
in the center of the page.  To place even numbers at the upper left corner 
of left-hand pages, and odd numbers at upper right corner of right-hand 
pages (duplex), add the following to the top of the document:


\leftindent{.rm CT      (remove the center string)}

\leftindent{.ds LT \\\\n(PN      (redefine the left string on odd, and 
right on even pages.)}

}
\leftindent{\bold{Suppressing page numbering.}  You can suppress the 
default page numbering with the\italic{ \bold{.}rm} (remove) command.  \



\leftindent{.rm CT}

}
\leftindent{\bold{Resetting or skipping page numbers.}   You can set page 
numbers to any value, which allows you to make them non-consecutive if you 
wish.  For example, you may have three pages of non-text inserts, so you 
want the page numbering to skip by three.

  \


The least complicated way to reset or skip numbers is to give a number 
argument to the \italic{\bold{.}bp} (break page) command, which forces a 
page break and numbers the new page as you specify (you can use Preview to 
see where the pages break naturally, and put the command there).  For 
example, to skip from page 2 to page 6, put the following command where 
page 2 ends:


\leftindent{.bp 6      (forces a page break and numbers the new page "6")}

\bold{Forcing numbering of the first page.}  You can force a page number to 
appear in the default position on the first page, which normally does not 
happen.  Simply put the command


\leftindent{.bp1 }\



at the top of the document, before any text.  You will get a blank page, 
un-numbered (which you have fooled troff into believing is the first page 
of the document), and the first page of text will be numbered 1.


}\leftindent{\bold{Changing page number style.}  You can change the style 
of page numbering you use by putting the \italic{\bold{.}af} command at the 
beginning of your document.  Examples:


\leftindent{.af  %  i          (Gives lowercase Roman numerals: i, ii. . . 
iv. . . x)

.af  %  I          (Gives uppercase Roman numerals: I, II. . .IV. . .X)

.af  %  A        (Gives uppercase letters: A, B. . .D. . .J)

.af  %  a         (Gives lowercase letters: a, b. . .d. . .j)

.af  %  0001   (Gives numbering like: 0001, 0002. . .0004. . 
.0010)}}\leftindent{\leftindent{

}}\leftindent{
}\section{Special character effects}


\leftindent{\bold{Getting accents, umlauts and other diacritics.}   It is 
possible to get printed accents, umlauts and other special characters by 
using troff's "overstriking" capability, whereby two characters are printed 
in the same location, without the formatter moving forward to the next 
location.  The general format of the command for overstriking is


\leftindent{\\o'\italic{char1}\italic{char2}'}


where \italic{char1} and \italic{char2} are the two characters you want to 
overlap.  Surround this entire sequence in a FormatNote style.


Use \bold{\\(aa} to get an acute accent (like the single quote, but a 
straight line) \


        \bold{\\(ga} to get a grave accent (like the back quote, but a 
straight line)


Other special characters, including Greek letters, are available with 
the\bold{\bold{ }\\(} sequence.  See the section on troff in a hardcopy 
version of the \italic{Unix User's Guide, Supplementary Documents}.


Some examples:   \



\leftindent{\bold{\\o'a^'    } gives a with a "hat"


\bold{\\o'e\\(aa'} gives e with acute accent


\bold{\\o'a\\(ga'} gives a with grave accent


\bold{\\o'c,'}      gives the cedilla (French c with a tail)


\bold{\\o'u"'}     gives u with umlaut \


}}\leftindent{
}\section{Miscellaneous commands}


\leftindent{You may wish to experiment with the following commands.  They 
have not all been thoroughly tested by the authors of this document, so no 
guarantee is made about how well they work.

\leftindent{
.nh    Turn off hyphenation.

.hy    Turn on hyphenation.


.pl 13i    Set page length to 13 inches.


}\description{\leftindent{.mc |   Start printing of vertical bar character 
(|) in the right margin. (Can be used to mark changed sections of a 
document. Other characters can be used too.})}\leftindent{

.mc    Stop printing the character in the right margin.


.ta 1i +.25iR    Tab stops at 1 inch and 1.25 inches, right justified. 
 Note that the numbers between the tab intervals have spaces between them, 
not commas.

.ta    End tab stops. This turns off tab stops.

Note: in general, it is difficult to predict tab placement in EZ.


.tl   '\italic{left string}'\italic{center string}'\italic{right string}' 
 Makes a three part title.


\\(em   Sets an em-dash


}}\section{Advanced Troff}\leftindent{\leftindent{


}Since troff is a very powerful program, there are various things you might 
want to do with it.  If you want to do complicated things, you probably 
want to have a troff manual handy.  \



\bold{What can you do to\italic{ really} use troff?  }If you do an ezprint 
-t you will see that the first line is:


.so /usr/andrew/lib/tmac/tmac.atk


This sucks in the macros definitions for troff.  If you really want to do 
fancy things, the obvious thing to do is to copy this file and change the 
definitions of macros in there. You can easily automatically inserted your 
own version of this file by having in the preferences the line


*.tmacfile: <path to your macros file>


where <your macros file> contains a modified copy of the standard macros. 
 Of course, if you follow this route you might consider using troff with a 
standard macro package, TeX or Scribe directly.\leftindent{

}}
\section{Related Tools}


Select (highlight) one of the italicized names and choose \bold{Show Help 
on Selected Word }from the pop-up menu to see the help file for:

\leftindent{\italic{
}\helptopic{ez}\italic{

}\helptopic{preview}\italic{    } (on-screen document viewer)

\helptopic{lookz

header

compchar}

}\italic{
}\
\begindata{bp,538505984}
\enddata{bp,538505984}
\view{bpv,538505984,1,0,0}
Copyright 1992 Carnegie Mellon University and IBM.  All rights reserved.

\smaller{\smaller{$Disclaimer: 

Permission to use, copy, modify, and distribute this software and its 

documentation for any purpose is hereby granted without fee, 

provided that the above copyright notice appear in all copies and that 

both that copyright notice, this permission notice, and the following 

disclaimer appear in supporting documentation, and that the names of 

IBM, Carnegie Mellon University, and other copyright holders, not be 

used in advertising or publicity pertaining to distribution of the software 

without specific, written prior permission.



IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 

DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 

ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 

SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 

BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 

DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 

WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 

ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 

OF THIS SOFTWARE.

 $

}}\enddata{text,538536064}
