\begindata{text,538528536}
\textdsversion{12}
\template{help}
\define{global
}
\define{^
}
\define{sym
}
\define{keylist
menu:[Font~1,Keylist]
attr:[LeftMargin LeftMargin Cm 302867]
attr:[Indent LeftMargin Cm 231196]}
\chapter{Compchar:  Entering International Characters

}
\section{What Compchar is

}
Compchar stands for Compose Character. It is a package for entering certain 
characters which are not normally available from the keyboard.  


\section{Starting Compchar

}
To use compchar you need to add a line  to your .atkinit (or .ezinit) like:


\example{addkey compchar-compose2 ^Xx textview


or


addkey compchar-compose ^Xv textview

}
If you then type ^Xx,  you will be prompted for an initial character. After 
you type this character you will be shown a list of the characters available 
with the prefix character you typed. 


If you type ^Xv instead, you will be prompted for a character, and the text 
caret will appear in the message line. In this mode you can get a listing of 
everything your entry so far can generate by typing a '?'. If you haven't 
entered anything yet when you type '?', you will be given a list of all the 
characters defined in the compchar initialization file.


A default initialization file is provided which contains most language 
characters and Greek and mathematical symbols defined, see the section 
\bold{Composites File Format} for more information.


These two functions are not the only ways to use the compchar package. See the 
\bold{Quick Reference} and \bold{Proctable Entries} sections of this document 
for more information.



\section{Warnings

}
Some characters (most notably those for languages) are only available under 
X11 release 4.


\section{ Preferences}


\leftindent{\bold{CompositesFile}:  the name of a file to get additions or 
changes to the default compositions from.


\bold{OverrideComposites}: Allows you to completely override the default list 
of compositions. If this is on, The file listed in your CompositesFile 
preference must contain all the composites you wish to use.


}\
\begindata{bp,538268296}
\enddata{bp,538268296}
\view{bpv,538268296,173,0,0}\section{
Composites File Format

}
The composites file consists of one or more lines each of the form:


\example{keysequence code troff style ascii

}
\italic{keysequence} is a string giving the key sequence which will generate 
the character; the syntax for these is the same as for key sequences given in 
a .*init file, with the addition that they can be surrounded by double quotes, 
so you can easily include spaces and tabs in them.  If the \italic{keysequence} 
field has only a pair of double quotes, the line simply defines the troff to 
use for the specified code.  If the line consists of just a keysequence, any 
previously defined composition having that keysequence will be deleted.


\italic{code} is a number indicating the character's number within the font 
being used. The various ways to specify the code are covered under "insert" 
below.


The \italic{troff} field is optional and can be omitted by having this field 
start with a '!'. To specify a '!' as the first printing character of a troff 
sequence add a \\& before the '!'.  It gives the troff macros or inline 
commands needed to generate the character when printing.


The \italic{style} field indicates what style should be wrapped around the 
code when it is placed in a document.  If no style should be used, this field 
should be "".  If the style name is followed by a comma, the remainder of the 
field should be the name of a template to get the style from.  If no template 
is specified the default template is called symbol.  Note: you can have space 
after the comma, but not before.


The \italic{ascii} field is for specifying how to convert between local ASCII 
character conventions and the characters CompChar uses.  CompChar allows you 
to convert occurrences of a character to the contents of this field or to 
replace occurrences of the contents of this field with the associated 
character.


As shown below, if a particular field and all fields after it are not being 
used, those fields may be omitted.


For example: 

\example{
# this line is a comment, the next line

# specifies the character code in

# hexadecimal.

ag xe0 a\\*(l`

#blank lines are allowed.


# the next line defines the troff string

# and the ascii string for the code 129

# without adding or changing any keybinding.

"" 129 u\\*(l' "" \{u'x

# the line below demonstrates

# using quotes around the keysequence.

"a^X" 225 a\\*(l'}

\begindata{bp,538270984}
\enddata{bp,538270984}
\view{bpv,538270984,174,0,0}
\section{Proctable Entries}


 (note: all functions should be prefixed with "compchar-")


ATKToASCII:	\indent{\indent{\indent{converts all characters with defined ASCII 
representations to ASCII.    Each occurrence of a character with an ASCII 
representation will be selected and you can use the following keys to tell 
CompChar what to do.  If given any argument in the init file, this function 
will translate all occurrences without asking.  (See Quick Reference, below.)


}}}\keylist{space - replace this occurrence and continue.

. - replace this occurrence and stop.

n - skip this occurrence.

! - replace all remaining occurrences.

q - quit ASCIIToATK.}	\indent{\indent{\indent{

}}}
ASCIIToATK:	\leftindent{\leftindent{\leftindent{attempts to convert the 
defined ASCII representations of ISO characters to their graphic 
representation.  Each occurrence of a ASCII representation for a character 
will be selected and you can use the following keys to tell CompChar what to 
do.  If given any argument in the init file, this function will translate all 
occurrences without asking.

\leftindent{
}}}}\keylist{space - replace this occurrence and continue.

. - replace this occurrence and stop.

n - skip this occurrence.

! - replace all remaining occurrences.

q - quit ASCIIToATK.}\leftindent{\leftindent{\leftindent{\leftindent{

}}}}
compose:	\indent{\indent{\indent{prompts for a character to insert. Typing a 
'?' will give a list of the characters available and the entries necessary to 
obtain them.  Giving this function an argument in a .*init file causes it to 
automatically insert the character specified by the argument.}}}


compose2:	\indent{\indent{\indent{basically the same as compchar-compose, 
except that help is given continuously on the message line and there is no 
need to hit return.  Warning: this doesn't work properly in Typescript. }}}


insert:		\indent{\indent{\indent{inserts a character specified in a .*init 
file at the current cursor position.  The character may be specified in octal, 
decimal, or hexadecimal.

Example:  the following all represent an A with the high bit set.

			xC1 

			o301

			d193

			|A

			193

}}}\
\begindata{bp,538269640}
\enddata{bp,538269640}
\view{bpv,538269640,175,0,0}
Note: the following functions operate on the next character typed if their 
name is extended with -after. If used in a .*init file and given an argument 
they will first insert the first character of the argument in the text and 
then add the appropriate accent.


acuteaccent:	\indent{\indent{\indent{puts an acute accent mark on the 
character before the cursor.}}}


graveaccent:	\indent{\indent{\indent{puts a grave accent mark on the character 
before the cursor.}}}


circumflex:	\indent{\indent{\indent{puts a circumflex over the character 
before the cursor.}}}


tilde:		\indent{\indent{\indent{puts a tilde over the character before the 
cursor.}}}


umlaut:	\indent{\indent{\indent{puts an umlaut over the character before the 
cursor.}}}


\section{Quick reference

}\leftindent{
An example of giving an argument to a compchar function:


\example{addkey compchar-umlaut \\eS textview compchar inherit "u"}

}
\section{Program Author}

\leftindent{
Rob Ryan (rr2b@andrew.cmu.edu)}


\section{Related tools}  


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


\leftindent{\helptopic{initfiles}

}

\begindata{bp,537558784}
\enddata{bp,537558784}
\view{bpv,537558784,177,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,538528536}
