makra uzivajici Levyho rectinu

Petr Skoda skoda at pleione.asu.cas.cz
Thu May 19 10:35:14 CEST 1994


Prosim vsechny techove kouzelniky, zvlaste ty, kdo pouzivaji
nekterou z rectin (Silvio Levy, KD rectinu - Dryllerakis) aby
mi pomohli vyresit problem jak psat makra ktere v sobe tuto rectinu
zapinaji a vypinaji -- pro nezasvecene -- jde o to, ze recke akcenty
pouzivaji jako ligatury znaky ~,<,>,",`,', | v ruznych kombinacich
a tyto maji predefinovany catcode na pismeno. Posilam cast Levyho
manualu - (prorezano) - podstatny je posledni odstavec

pripadne budu do smrti zavazan tomu, kdo by mi oxerexoval a poslal
nize citovany clanek Reinhard Wonnebergera , TUGBoat October 1986,
zvlaste strany 179-180

velmi dekuji za kazdou stopu
*************************************************************************
*  Petr Skoda                         Tel   : (0204) 85201, l. 361      *
*  Stelarni oddeleni                          (0204) 857361, 857136     *
*  Astronomicky ustav AVCR            Fax   : (02)   881611             *
*  251 65 Ondrejov                    e-mail: skoda at sunstel.asu.cas.cz  *
*  Ceska republika                            aststel at csearn.bitnet     *
*************************************************************************
-------------------------------------------------------------------------
\heading
Accents and Breathings
\endheading

To get an acute, grave or circumflex accent over a vowel,
type \.{'}, \.{`} or \.{\~}, respectively, before the vowel.
To get a rough or smooth breathing, type \.{<} or \.{>} before
the vowel (or rho) and any accent that it may have.  To get an iota
subscript, type \.{|} {\it after\/} the vowel.  A diaeresis is
represented by \.{"}, and if accompanied by an accent it can come
before or after the accent.

For example, \hbox{\.{>en >arq\~h| >\~hn <o l'ogos}}
gives \hbox{$>en >arq~h| >~hn <o l'ogos$}.
Neat, ain't it?

\begineight
Accents and breathings, too, are typeset by means of ligatures: a
vowel with a breathing, an accent and iota subscript, for example,
is realized as a four-character ligature.  The only exception is
when a breathing is followed by a grave accent, in which case the
breathing\plus accent combination is typeset as a \TeX\ \.{\!accent}
over the vowel.
\endeight

\heading
Interaction with other macros
\endheading

While in Greek mode you can do just about everything that you can
outside: go into math mode, create boxes, alignments, and so on.
The file \.{greekmacros.tex} sets things up so that in Greek mode
the control sequences \.{\!tt} and \.{\!bf} switch to a
typewriter and a bold Greek font, respectively: thus
\.{\{\!tt s''>agap\~w\}} gives \hbox{$\tt s''>agap~w$}.  (Try it.)
On the other hand, there are no ``italic'' or slanted Greek fonts,
so \.{\!it} and \.{\!sl} will give you the same fonts as outside
Greek mode.  The various constructions under
\AmSTeX\ and \LaTeX\ for increasing or decreasing point sizes don't
work yet; they will in a future release.

The characters that form diacritics (\.{<}, \.{>},
\.{'}, \.{`}, \.{\~}, \.{"} and \.{|}) are treated differently
depending on whether or not you're in Greek mode.  More exactly,
under plain \TeX\ these characters (with the exception of
\.{\~}) have a \.{\!catcode} of 12: they print as themselves,
and they cannot appear in control words.  But in Greek mode
\.{'}, \.{`}, \.{\~}, \.{"} and \.{|} are ``letters'', that is,
they have a \.{\!catcode} of 11, while \.{<} and \.{>} are
active, with a \.{\!catcode} of 13.

\begineight
A more subtle problem arises when you use Greek text in macro
arguments, if the arguments are scanned while you're outside Greek
mode.  This is because \TeX\ assigns \.{\!catcode}s to tokens
as it first reads them, so when the argument is plugged into
the body of the macro the characters above have the wrong
\.{\!catcode}.  If the legendary Jonathan Horatio Quick were
to write
\display
\hbox{\.{%
\!def\!hellenize\#1\{\!begingreek \#1\!endgreek\}
\!hellenize\{d'uo >`h tre\~is,\}}}
\enddisplay

he would be unpleasantly surprised by the following output:
.... .... ....
(pozn . P.SKODA ... vyjde lenis kombinovany s grave samostatne
pred ethou - misto nad ni a iota nema vlnovku nad sebou ale pred
sebou jako nerozdelitelnou mezeru)

which can be explained as follows: the \.{\~}, which should be
a letter, is seen as an active character, and expands to a blank
as in plain \TeX; while the breathing, which should be active,
is not, and in particular it doesn't do the right thing when
next to the grave accent.  Solutions to this problem require a
bit of wizardry, and will not be discussed here; see, for example,
Reinhard Wonneberger's article in the October, 1986 issue of
{\it TUGboat}, especially pages 179--180.
\endeight
\end




More information about the csTeX mailing list