summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lgreek
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/lgreek
Initial commit
Diffstat (limited to 'macros/latex/contrib/lgreek')
-rw-r--r--macros/latex/contrib/lgreek/LGcmr.fd33
-rw-r--r--macros/latex/contrib/lgreek/LGcmtt.fd29
-rw-r--r--macros/latex/contrib/lgreek/LGenc.def2
-rw-r--r--macros/latex/contrib/lgreek/README28
-rw-r--r--macros/latex/contrib/lgreek/lgreek.sty70
-rw-r--r--macros/latex/contrib/lgreek/lgreekuse.pdfbin0 -> 219610 bytes
-rw-r--r--macros/latex/contrib/lgreek/lgreekuse.tex231
7 files changed, 393 insertions, 0 deletions
diff --git a/macros/latex/contrib/lgreek/LGcmr.fd b/macros/latex/contrib/lgreek/LGcmr.fd
new file mode 100644
index 0000000000..897d051727
--- /dev/null
+++ b/macros/latex/contrib/lgreek/LGcmr.fd
@@ -0,0 +1,33 @@
+%%
+%% This is file `LGcmr.fd',
+%% written in close imitation of T1cmr.fd
+%%
+%% ----------------------------------------
+%% This system is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+%%
+\ProvidesFile{LGcmr.fd}
+ [1995/04/22 v2.3f Standard LaTeX font definitions]
+\DeclareFontFamily{LG}{cmr}{}
+\DeclareFontShape{LG}{cmr}{m}{n}{%
+ <5> <6> <7> <8>grreg8
+ <9>grreg9
+ <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88>grreg10}{}
+\DeclareFontShape{LG}{cmr}{b}{n}{
+ <5> <6> <7> <8>grbld8
+ <9>grbld9
+ <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88>grbld10}{}
+\DeclareFontShape{LG}{cmr}{bx}{n}
+ {<->sub * cmr/b/n}{}
+\DeclareFontShape{LG}{cmr}{m}{sl}
+ {<->sub * cmr/m/n}{}
+\DeclareFontShape{LG}{cmr}{m}{it}
+ {<->sub * cmr/m/n}{}
+\DeclareFontShape{LG}{cmr}{bx}{sl}
+ {<->sub * cmr/bx/n}{}
+\DeclareFontShape{LG}{cmr}{bx}{it}
+ {<->sub * cmr/bx/n}{}
+\endinput
+%%
+%% End of file `LGcmr.fd'.
diff --git a/macros/latex/contrib/lgreek/LGcmtt.fd b/macros/latex/contrib/lgreek/LGcmtt.fd
new file mode 100644
index 0000000000..55cf19acd8
--- /dev/null
+++ b/macros/latex/contrib/lgreek/LGcmtt.fd
@@ -0,0 +1,29 @@
+%%
+%% This is file `LGcmtt.fd',
+%%
+%% ----------------------------------------
+%% This system is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+%%
+\ProvidesFile{LGcmtt.fd}
+ [1995/04/22 v2.3f Standard LaTeX font definitions]
+\DeclareFontFamily{LG}{cmtt}{}
+\DeclareFontShape{LG}{cmtt}{m}{n}{%
+ <5> <6> <7> <8> <9> <10> <10.95>
+ <12> <14.4> <17.28> <20.74> <24.88>grtt10}{}
+\DeclareFontShape{LG}{cmtt}{b}{n}
+ {<->sub * cmtt/m/n}{}
+\DeclareFontShape{LG}{cmtt}{bx}{n}
+ {<->sub * cmtt/m/n}{}
+\DeclareFontShape{LG}{cmtt}{m}{sl}
+ {<->sub * cmtt/m/n}{}
+\DeclareFontShape{LG}{cmtt}{m}{it}
+ {<->sub * cmtt/m/n}{}
+\DeclareFontShape{LG}{cmtt}{bx}{sl}
+ {<->sub * cmtt/m/n}{}
+\DeclareFontShape{LG}{cmtt}{bx}{it}
+ {<->sub * cmtt/m/n}{}
+\endinput
+%%
+%% End of file `LGcmtt.fd'.
diff --git a/macros/latex/contrib/lgreek/LGenc.def b/macros/latex/contrib/lgreek/LGenc.def
new file mode 100644
index 0000000000..34f8fe3ad9
--- /dev/null
+++ b/macros/latex/contrib/lgreek/LGenc.def
@@ -0,0 +1,2 @@
+\DeclareFontEncoding{LG}{}{}
+\endinput
diff --git a/macros/latex/contrib/lgreek/README b/macros/latex/contrib/lgreek/README
new file mode 100644
index 0000000000..67c50e8365
--- /dev/null
+++ b/macros/latex/contrib/lgreek/README
@@ -0,0 +1,28 @@
+This package converts Silvio Levy's LaTeX209 "greek" package
+(/tex-archive/fonts/greek/levy at the CTANs)
+for use with LaTeX2e.
+It uses (and requires) the fonts in Levy's package
+(/tex-archive/fonts/greek/levy/mf).
+
+Usage of the package is described in "lgreekuse.tex".
+Basically, if you \usepackage{lgreek} then you can say
+
+\begin{greek}
+...
+\end{greek}
+
+In addition, if you \usepackage[delims]{greek}
+then you can include greek inside $...$.
+
+For details see "lgreekuse.tex".
+
+Please send any bug-reports, suggestions or complaints to
+tim@maths.tcd.ie <Timothy Murphy>
+
+18 Jan 1996
+
+This package is released under the terms of either:
+
+- the GNU GPL version 2 or (at your option) any later version.
+- the LaTeX Project Public License version 1 or (at your option) any
+ later version.
diff --git a/macros/latex/contrib/lgreek/lgreek.sty b/macros/latex/contrib/lgreek/lgreek.sty
new file mode 100644
index 0000000000..c97474e335
--- /dev/null
+++ b/macros/latex/contrib/lgreek/lgreek.sty
@@ -0,0 +1,70 @@
+\DeclareOption{allgreek}{\renewcommand{\encodingdefault}{LG}\greeknames}
+\DeclareOption{delims}{\greekdelims}
+
+\def\greekmode{%
+\catcode`\<=13
+\catcode`\>=13
+\catcode`\'=11
+\catcode`\`=11
+\catcode`\~=11
+\catcode`\"=11
+\catcode`\|=11
+\lccode`\<=`\<%
+\lccode`\>=`\>%
+\lccode`\'=`\'%
+\lccode`\`=`\`%
+\lccode`\~=`\~%
+\lccode`\"=`\"%
+\lccode`\|=`\|%
+}
+\newcount\vwl
+\newcount\acct
+\def\lt{<}
+\def\gt{>}
+{
+ \greekmode
+ \gdef>{\@ifnextchar `{\expandafter\smoothgrave\@gobble}{\char\lq\>}}
+ \gdef<{\@ifnextchar `{\expandafter\roughgrave\@gobble}{\char\lq\<}}
+ \gdef\smoothgrave#1{\acct=\rq137 \vwl=\lq#1 \dobreathinggrave}
+ \gdef\roughgrave#1{\acct=\rq103 \vwl=\lq#1 \dobreathinggrave}
+ \gdef\dobreathinggrave{\ifnum\vwl\lt\rq140 %if uppercase
+ \char\the\acct\char\the\vwl\else\expandafter\testiota\fi}
+ \gdef\testiota{\@ifnextchar |{\addiota\doaccent\@gobble}{\doaccent}}
+ \gdef\addiota{\ifnum\vwl=\lq a\vwl=\rq370
+ \else\ifnum\vwl=\lq h\vwl=\rq371 \else\vwl=\rq372 \fi\fi}
+ \gdef\doaccent{\accent\the\acct \char\the\vwl\relax}
+}
+
+\DeclareFontEncoding{LG}{\greekmode}{}
+
+\newif\ifgreek\greekfalse
+\newenvironment{greek}{\fontencoding{LG}\selectfont\greektrue}{}
+
+{\catcode`\$=13
+\gdef\greekdelims{\catcode`\$=13
+\def${\ifgreek\end{greek}\else\begin{greek}\fi}}}
+
+\def\greeknames{
+% \def\prefacename{Preface}%
+% \def\refname{References}%
+% \def\abstractname{Abstract}%
+\def\bibname{Bibliograf'ia}% <----------
+\def\chaptername{Kef'alaio}% <----------
+\def\appendixname{Par'arthma}% <-----------
+\def\contentsname{Perieq'omena}% <----------
+\def\listfigurename{Eik'onec}% <----------
+\def\listtablename{P'inakec}% <----------
+\def\indexname{Euret'hrio}% <----------
+\def\figurename{Eik'ona}% <----------
+\def\tablename{P'inakac}% <----------
+\def\partname{M'eroc}% <----------
+% \def\enclname{encl}%
+% \def\ccname{cc}%
+% \def\headtoname{To}%
+% \def\pagename{Page}%
+% \def\seename{see}%
+% \def\alsoname{see also}}
+}
+
+\ProcessOptions
+
diff --git a/macros/latex/contrib/lgreek/lgreekuse.pdf b/macros/latex/contrib/lgreek/lgreekuse.pdf
new file mode 100644
index 0000000000..107faf0f3a
--- /dev/null
+++ b/macros/latex/contrib/lgreek/lgreekuse.pdf
Binary files differ
diff --git a/macros/latex/contrib/lgreek/lgreekuse.tex b/macros/latex/contrib/lgreek/lgreekuse.tex
new file mode 100644
index 0000000000..7f70dc0e95
--- /dev/null
+++ b/macros/latex/contrib/lgreek/lgreekuse.tex
@@ -0,0 +1,231 @@
+\documentclass[a4paper]{article}
+\usepackage[delims]{lgreek}
+\usepackage{doc}
+\MakeShortVerb\|
+\newenvironment{TeXystuff}%
+ {\small\renewcommand{\baselinestretch}{0.9}\smallskip}%
+ {\par\smallskip}
+
+\title{Using Greek Fonts with \LaTeX}
+\author{Silvio Levy\\
+ Princeton University \\
+ Fine Hall, Washington Road\\
+ Princeton, NJ, 08544\\
+ (\texttt{levy@princeton.edu})\\[5pt]
+ \emph{modified for \LaTeX2e by}\\[5pt]
+ Timothy Murphy\\
+ School of Mathematics\\
+ Trinity College Dublin\\
+ (\texttt{tim@maths.tcd.ie})}
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+In this document I hope to show that typesetting Greek in \LaTeX\
+using the |lgreek| package (and the |gr| fonts)
+can be as easy as typesetting English text,
+and leads to equally good results.
+This is meant to be a tutorial, not an exhaustive discussion;
+some \TeX nical remarks that should be useful after the reader
+has acquired some familiarity with the fonts are printed in fine
+print.
+\end{abstract}
+
+\section{The Alphabet}
+
+In order to typeset Greek text, you need to go into ``Greek mode.''
+This is achieved by typing |\begin{greek}| anywhere in your document;
+Greek mode will remain in effect until you type a matching |\end{greek}|.
+While in Greek mode, the letters `a' to `z' and `A' to `Z' come out
+as Greek letters, according to the following code:
+
+\begin{center}
+\setlength{\tabcolsep}{3pt}
+\begin{tabular}{cccccccccccccccccccccccc}
+$a$&$b$&$g$&$d$&$e$&$z$&$h$&$j$&$i$&$k$&$l$&$m$&
+$n$&$x$&$o$&$p$&$r$&$s$&$t$&$u$&$f$&$q$&$y$&$w$\\
+|a|&|b|&|g|&|d|&|e|&|z|&|h|&|j|&|i|&|k|&|l|&|m|&
+|n|&|x|&|o|&|p|&|r|&|s|&|t|&|u|&|f|&|q|&|y|&|w|
+\end{tabular}
+\end{center}
+
+There is no digamma yet. The same character `s' will print as
+`$c$' or `$s$', depending on its position in a word.
+
+\begin{TeXystuff}
+The system does this by accessing a ligature of `s' with any other
+letter that follows it. If, for some reason, you want to print
+an initial/medial sigma by itself (as in the table above), or
+at the end of a word, you should type `c'.
+\end{TeXystuff}
+
+Try to typeset some simple text now. Create a file
+containing the following lines:
+
+\begin{quote}
+\begin{verbatim}
+\documentclass{article}
+\usepackage{lgreek}
+\begin{document}
+This is English text.
+\begin{greek}
+This is Greek text.
+\end{greek}
+\end{document}
+\end{verbatim}
+\end{quote}
+
+When you \TeX\ this file, you get the following gibberish:
+\begin{quote}
+%\hbox{
+This is English text.
+\begin{greek}
+This is Greek text.
+\end{greek}
+%}
+\end{quote}
+
+If you give the |delims| option for the package then
+the character |$| can be used
+in place of both |\begin{greek}| and |\end{greek}|,
+as eg
+\begin{quote}
+\begin{verbatim}
+This is English text.
+$This is Greek text.$
+\end{verbatim}
+\end{quote}
+
+The control sequences |\(|\dots|\)| are still available
+for in-text math.
+
+\section{Accents and Breathings}
+
+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 \verb"|" \emph{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{\verb">en >arq\~h| >\~hn <o l'ogos"}
+gives \hbox{$>en >arq~h| >~hn <o l'ogos$}.
+Neat, ain't it?
+
+\begin{TeXystuff}
+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\({}+{}\)accent combination is typeset as a \TeX\ |\accent|
+over the vowel. This means that words containing such combinations
+cannot be hyphenated in (standard) \TeX; but this is not a problem
+because, with the exception of very rare cases of crasis, all such words
+are monosyllables.
+\end{TeXystuff}
+
+\section{Punctuation}
+
+Here's the table of correspondences for punctuation:
+
+\begin{center}
+\setlength{\tabcolsep}{4pt}
+\begin{tabular}{ccccccccc}
+$.$&$,$&$;$&$:$&$!$&$?$&$''$&$(($&$))$\\
+|.|&|,|&|;|&|:|&|!|&|?|&|''|&|((|&|))|
+\end{tabular}
+\end{center}
+
+The last three entries represent the apostrophe and quotations marks.
+The other available non-letters are the ten digits, parentheses,
+brackets, hyphen, em- and en-dashes, slash, percent sign, asterisk,
+plus and equal signs. All of these are accessible in the usual way.
+In a future release there will be tick marks for
+numbers (\(\hbox{$a$}'=1\), \({}_\prime\hbox{$a$}=1000\)).
+
+\section{Hyphenation}
+
+A hyphenation table for both modern and ancient Greek is currently
+being debugged. For now one can use the usual (English)
+hyphenation table, which gives the right results about 90\% of the
+time (amazing, isn't it?). Be sure to proofread your text carefully,
+unless you've turned hyphenation off.
+
+\section{Interaction with other macros}
+
+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
+|\texttt{s''>agap\~w}| gives \hbox{$\texttt{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
+\LaTeX\ for increasing or decreasing point sizes don't
+work yet; they will in a future release.
+
+The characters that form diacritics (|<|, |>|,
+|'|, |`|, |\~|, |"| and \verb"|") 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 \verb"|" are ``letters'', that is,
+they have a |\catcode| of 11, while |<| and |>| are
+active, with a |\catcode| of 13. This may be important even
+for beginners because it means that |'|, for example, can be taken
+as part of a control word. Thus the sequence
+\begin{verbatim}
+ \begin{greek}
+ wm'ega\hfil'alfa
+ \end{greek}
+\end{verbatim}
+\noindent
+will cause an error message about an
+undefined control sequence |\hfil'alfa|, instead of printing
+\begin{quote}
+\begin{greek}
+wm'ega\hfil 'alfa
+\end{greek}
+\end{quote}
+as you might expect. (I hope classicists will forgive this use
+of the modern Greek one-accent system.) The solution, of course,
+is to remember to add a blank after the |\hfil|.
+
+\begin{TeXystuff}
+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
+\begin{quote}
+\begin{verbatim}
+\def\hellenize#1{\begin{greek}#1\end{greek}}
+\hellenize{d'uo >`h tre~is,}
+\end{verbatim}
+\end{quote}
+he would be unpleasantly surprised by the following output:
+\begin{quote}
+\def\hellenize#1{\begin{greek}#1\end{greek}}
+\hellenize{d'uo >`h tre~is,}
+\end{quote}
+\enlargethispage{24pt}
+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.
+\end{TeXystuff}
+
+\end{document}
+