\begindata{text,539924760}
\textdsversion{12}
\template{help}
\define{global
}
\chapter{Using Styles in EZ}


\leftindent{EZ lets you change the appearance of text in many different 
ways by adding format commands called "styles."  Many styles are available 
on EZ's "selected region" menu cards.   Some of the options on these cards 
change the typeface of the text (making it bold or italic, for example), 
some change text positioning (providing indenting or centering) and some 
change both at once.  For easy reference, these options are listed in the 
\bold{Pop-up Menu Meanings} section. }\



\leftindent{This document assumes you have read the introductory 
 \italic{\helptopic{ez} } help document, although portions of the section 
on styles are repeated here for your convenience.   It has the following 
sections:}


\leftindent{\flushright{\center{\flushleft{\leftindent{Adding styles

Listing styles

Removing styles

Creating new styles

Working through an example

Menu meanings

Style keybindings

Related tools}}}}}


\leftindent{Advanced users may wish to add new formatting effects, or 
change the particular formatting effects associated with a style menu 
option, which you can do with the LookZ program.  See the 
\italic{ \helptopic{lookz} } help document.


You can also achieve formatting effects not available as menu options by 
including commands from the formatting package called 
 \italic{\helptopic{troff}}. The  \italic{\helptopic{ez-troff}}  help 
document discusses some of the possible effects in detail.  (Note: the use 
of troff commands in EZ documents is not recommended. See the 
\helptopic{ez-troff} help file for more information.)


}
\section{Adding styles}  \



\leftindent{\bold{To add a single style:} Select the region of text to 
which you want to apply the style, and choose the appropriate menu option.}


\leftindent{\bold{To add multiple styles:}  Do not deselect the region 
after applying each style.  Simply choose each additional style while the 
region is still selected.}


\leftindent{\bold{To "nest" or embed styles:} Deselect the region to which 
you have applied a style.  Select a portion of it and choose the menu 
option for the style that you want to apply only to the subregion.  For 
example, \italic{you can nest a\bold{ bold subregion} in a region of italic 
type}.}


\leftindent{In general, you should use multiple styles as sparingly as 
possible, because it can be complicated to change or remove the nested 
styles later without disturbing the styled text surrounding them.  You can 
learn how to remove nested styles in the following sections. }\



\leftindent{As you apply multiple styles, you may notice a difference 
between styles that change typeface and styles that change text position: \



\leftindent{Styles that change typeface (all those on the\italic{ Font} 
menu card, for example) are "additive," meaning that you can see the effect 
on the typeface of adding each style in turn.  }\



\leftindent{In contrast, if you apply multiple positioning styles, you see 
only the effects of the last one you applied.  So, for example, if you 
select some text and apply first \bold{Center} and then \bold{FlushRight} 
from the\italic{ Justify} menu card, you will only see the effect of the 
FlushRight--the text will be flush against the right margin.  This is true 
also for those options that change both typeface and positioning (all the 
options on the \italic{Title} card and several on the \italic{Region} 
card).  The typeface will continue to change as you apply these styles on 
top of one another, but the positioning of the styled text will reflect 
only the last option you chose.  \



For the same reason, if you apply one positioning style (say LeftIndent) to 
a subregion that is nested within a region affected by a different 
positioning style (say Center), you cannot see the effects of the 
LeftIndent positioning style on the subregion.  You have to move the 
subregion to its own line before you can see the effects.}}


\section{Listing styles} \



\leftindent{The best way to avoid complications when removing styles is to 
use EZ's style-listing feature, which tells you exactly what styles apply 
to a region of text.  The style-listing feature is very helpful because it 
also automatically selects the affected region for you (showing it in 
reverse video).  You then know exactly what region will be affected when 
you remove a style.}


\bold{\leftindent{To use style-listing feature:}}


\leftindent{\smaller{\leftindent{1) Position the text caret in the text 
that you want to check.


2) Press Esc-s  (the Esc key followed by s.)}}}


\leftindent{Typing Esc-s does two things:  }\



\leftindent{1)  The message area at the bottom of the screen lists the 
styles that apply to the region where the text caret is placed.  The list 
proceeds from left to right, ranking the styles from "innermost" to 
"outermost."  Two asterisks appear on either side of one of the listed 
styles, starting with the very innermost.  The ranking depends on two 
things:}


\leftindent{\leftindent{a) how restricted the region of application is for 
the style. Styles that apply only to the area where the text caret is 
placed are innermost.  }}\



\leftindent{\leftindent{b) the order in which styles were added. Within a 
single region of application, styles are ranked according to the order in 
which they were added, such that the style added last becomes innermost.}} \



\leftindent{2)  Esc-s selects the text region associated with the listed 
style surrounded by asterisks, making it appear in reverse video.  The 
first time you type Esc-s, this is the innermost style in the list, which 
generally has the smallest area of application.}


\leftindent{Typing Esc-s again (without moving the text caret) will cause 
the asterisks to shift to the right to surround the next innermost style, 
and the region associated with that style to become selected.  The region 
associated with this style can be either the same size or larger than the 
region associated with the innermost style.  You can move across the list 
of styles by repeatedly typing Esc-s.  Typing Esc-s when the last style has 
the asterisks makes the asterisks go away and leaves no text selected. 
 Typing it again at that point will start the cycle over again with the 
innermost style. }\



\section{Removing styles}


\leftindent{\bold{Removing a single style.}  If you have added only a 
single style to a region and you know the exact boundaries of the region, 
it is not really necessary to list styles.  To remove the style, place the 
text caret anywhere within the styled region.  Choose \bold{Plainer} from 
the front menu card.  You can also use \bold{Plainer} after selecting the 
single-styled region, if you want the greater degree of control afforded by 
selecting.\leftindent{

}
\bold{Removing all styles from a region.}  If you have added several styles 
to a region and now wish to remove all of them, select the desired region, 
and then choose \bold{Plainest} from the front menu card.  All of the 
styles that apply \bold{\italic{only}} to the selected region are removed. 
In other words, there are certain styles that EZ cannot remove from the 
region you have selected if those styles actually apply to a larger region 
that includes the selected region.  For example, if you apply a single 
LeftIndent style to three paragraphs, then selecting only one of the 
paragraphs and choosing \bold{Plainest} will not remove the LeftIndent 
style from it.  It will only remove all the styles that apply within the 
bounds of that paragraph.  Listing styles before choosing \bold{Plainest} 
is a good way to see over how large a region a style extends.  \



}\leftindent{\bold{Removing embedded styles from a region.}  Removing only 
some of the multiple styles that you have added to a region can become 
complicated.  It is here that style listing can be most useful.  The 
following example guides you through a style listing and explains what will 
happen if you choose \bold{Plainer} or \bold{Plainest} at each point. \


} \



\section{Creating new styles

}
\leftindent{You can create new styles using the \helptopic{LookZ} style 
editor, which you invoke with the \bold{Edit Styles} menu option. Using 
this facility, you can create styles which cause text to be double-spaced, 
have different margins, or have other attributes. See the \helptopic{LookZ} 
help document for more information.

}

\section{Working through an example}


\leftindent{If you wish to follow along through this example, you can use 
the style-listing feature within the Help window, but you cannot actually 
choose \bold{Plainer} or \bold{Plainest}, because this document is Read 
Only.  If you want to be able to perform the actions yourself, select this 
paragraph, the example line, and the paragraphs in Step 1, then choose 
\bold{Copy} from the front menu card and paste them into your own EZ 
window.  If you actually perform the actions described in each step (by 
choosing \bold{Plainer} or \bold{Plainest}), you will have to re-apply the 
styles you have just removed in order to continue on to the next step.  The 
example line is:


\leftindent{\italic{this indented example shows \bold{bold }in italics}}


\bold{\italic{Step 1.}}  To begin, place the text caret in the word "bold," 
and type Esc-s.  The message line should display the following:


\leftindent{Styles: **bold** <- italic <- leftindent <- leftindent}


This listing indicates that the word surrounding the text caret (the word 
"bold") is in boldface in a line that is in italics and indented from the 
rest of the text.  The "leftindent" at the end of the list appears because 
all of the paragraphs between the "Working through an example" heading and 
Step 2 are indented from the left margin by a LeftIndent style.   There are 
two further things to notice.


First, notice that asterisks appear around the word **bold** in the message 
line to indicate that it is the innermost style for the region surrounding 
the text caret. It is innermost because it applies only to the word 
surrounding the text caret.  (If you put the text caret in the word 
\italic{shows} instead, the innermost style would be italic.)  The other 
three styles apply to the entire line, and are listed in this particular 
order because they were applied in that order (the rightmost style is 
outermost and was applied first).


The second thing to notice is that that typing Esc-s has selected the 
region associated with the style in asterisks--the word \bold{\italic{bold}} 
in the example line.


If you want to delete the bold style so that the example line appeared in 
italics only, bring up the menus and choose \bold{Plainer} from the front 
menu card.}


\leftindent{\bold{\italic{Step 2.}}  Type Esc-s again without moving the 
text caret, which causes the region associated with the next innermost 
style to be selected.  The asterisks shift to **italic** on the message 
line: \



\leftindent{Styles: bold <- **italic**  <- leftindent <- leftindent}


and the region associated with italic (that is, the entire line) is 
selected on the screen.


Choosing \bold{Plainer} at this point removes only the style that appears 
within the asterisks.  The example line would appear in normal typeface 
rather than italics, but the word\bold{ bold} would still be in bold. 
 Choosing \bold{Plainest} from the front menu card removes all the styles 
associated with the selected region.  The example line would be in plain 
typeface without any bold or italics, and would shift to the same margin as 
the surrounding text (because both "italic" and the first "leftindent" 
apply to the whole selected region). }\



\leftindent{\bold{\italic{Step 3.}}  Type Esc-s again.  This causes the 
asterisks to shift to the next innermost style, **leftindent**:


\leftindent{Styles: bold <- italic <- **leftindent** <- leftindent  }\



Note that the same region is selected as before, because this LeftIndent 
style applies only to the single example line.  Choosing \bold{Plainer} at 
this point removes only the style surrounded by asterisks, so the line 
would shift to be lined up with the rest of the text, but would stay in 
italics and bold-italics.  Choosing \bold{Plainest} removes all three 
styles, so the line would appear in plain typeface at the same margin as 
the other text.}


\leftindent{\bold{\italic{Step 4. }} Typing Esc-s yet another time causes 
the asterisks to shift to the last style:


\leftindent{Styles: bold <- italic <- leftindent <- **leftindent**}


The selected area becomes much larger, because the second LeftIndent style 
applies to all of the text from the "Working through an example" heading 
through the directions in Step 1.  Choosing \bold{Plainer} removes this 
left indenting, so that all the text would shift over to the left.  Regular 
text would become flush with the left margin, but the example line would 
still be indented because it is affected by an additional LeftIndent style, 
and all typeface styles would remain in effect.   Choosing \bold{Plainest} 
would remove every style from all text in the selected region.}


\leftindent{\bold{\italic{Step 5.  }}Typing Esc-s one last time leaves none 
of the styles marked with asterisks, and no text selected on the screen. 
 Typing it again will start the cycle described in this example over again. 
}

\section{Menu meanings }  \



Use the menu options on these four menu cards to apply styles to EZ text. 
 These cards are only available when there is a selected region in the 
document.


\italic{Font Menu Card }\


\leftindent{
\bold{Bold:}  Makes the selected text appear in boldface. \



\bold{Italic:}  Makes the selected text appear in italics. \



\bold{Bigger:}  Increases the size of the selected text by 2 points (a 
point equals 1/72 of an inch).  The 2 points are added to the text size 
specified in your ez.bodyfont preference.  The text may not appear to 
change on the screen if there is no screen font that is 2 points larger 
than the current one.  However, when you print the document, the text will 
be printed out with the larger font.


\bold{Smaller:}  Decreases the size of the selected text by 2 points (a 
point equals 1/72 of an inch).  The 2 points are added to the text size 
specified in your ez.bodyfont preference.  The text may not appear to 
change on the screen if there is no screen font that is 2 points smaller 
than the current one.  However, when you print the document, the text will 
be printed out with the smaller font.


\bold{Superscript:}  Decreases the size of the selected text by 2 points (a 
point equals 1/72 of an inch) and prints the text above the default 
baseline.


\bold{Subscript:}  Decreases the size of the selected text by 2 points (a 
point equals 1/72 or an inch), and prints the text below the default 
baseline.


\bold{Ty\leftindent{pewriter:}}  Prints the selected text in a fixed-width 
font.


\bold{Underline:}  Prints the selected text underlined.


\bold{Strike-Through:} Prints a horizontal line through the middle of the 
text.


\bold{Sans Serif:}  Prints the selected text in a sans-serif font.


\bold{Change Bar:} Prints a change bar at the far right hand side of the 
line of text.}


\italic{Justify Menu Card }\



\bold{\leftindent{Center:}}\leftindent{  Centers the selected text. \



\bold{FlushLeft:}  Justifies the selected text to the prevailing left 
margin. \



\bold{FlushRight:}  Justifies the selected text to the right margin.

}
\italic{Title Menu Card }\



\leftindent{\bold{Major Heading:}  Makes a heading that is centered and in 
a bigger size than the surrounding text. \



\bold{Heading:}  Makes a bold heading and moves it to the left of the 
default left margin. \



\bold{Subheading:}  Makes a bold heading that is flush with the default 
left margin. \



\bold{Chapter:}  Makes a bold heading that is flush with the left margin 
and increases its size by 4 points compared to the surrounding text.  \



\bold{Section:}  Makes a bold heading that is flush with the left margin 
and increases its size by 2 points compared to the surrounding text. \



\bold{Subsection:}  Makes a bold heading that is flush with the left 
margin. \



\bold{Paragraph:}  Makes an italic heading that is flush with the left 
margin.

}
\leftindent{\bold{Caption:}  Makes a heading that is centered and bold for 
use as a caption of a figure.

}

\italic{Region Menu Card }\



\leftindent{\bold{Quotation:}  Indents the left and right margins of the 
selected text and makes the text italic. \



\bold{Description:}  Creates a "hanging indent" or "outdented" paragraph by 
indenting the left margin of all but the first line of text. \



\bold{Example:}  Indents the left margin of the selected text and displays 
it in a fixed-width font. \


\bold{ProgramExample: } Indents the left margin of the selected text and 
displays it in a fixed-width font. Currently looks identical to example, 
but included in case document authors wish to create a semantic distinction 
between example sections and program examples.


\bold{Display:}  Indents both the left and right margins of the selected 
text.  The text at the right margin is ragged (not justified).


\bold{Verbatim: } Displays the selected text in a fixed-width font. 
Included in case document authors wish to create an internal semantic 
distinction between the fixed width facecode, and regions that are 
representing text to be considered space for space verbatim characters.


\bold{Indent:} Indents both the left and right margins of the selected 
text. Both margins are justified.


\bold{Left Indent:}  Indents the left margin of the selected text.


\bold{Format Note:}  This special style is used around commands from the 
formatting package called  \italic{\helptopic{troff} }, which you can 
include in your EZ documents in order to produce formatting effects not 
available as EZ menu items.  When the formatting part of the printing 
program sees a FormatNote, the command contained within the note is 
executed, rather than printed.  For details about some troff commands 
useful in EZ, see the  \italic{\helptopic{ez-troff} } help document. \


 }\


\section{Style keybindings}


\leftindent{Please see the \helptopic{ez-keys} help file for information on 
keybindings which manipulate styles.  To see this help file you can click 
on the word \helptopic{ez-keys} in this paragraph.}


\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}

\helptopic{lookz}

\helptopic{ez-troff}

}}

\begindata{bp,539164224}
\enddata{bp,539164224}
\view{bpv,539164224,3,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,539924760}
