summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/teubner
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/teubner
Initial commit
Diffstat (limited to 'macros/latex/contrib/teubner')
-rw-r--r--macros/latex/contrib/teubner/README44
-rw-r--r--macros/latex/contrib/teubner/teubner-doc.pdfbin0 -> 381111 bytes
-rw-r--r--macros/latex/contrib/teubner/teubner-doc.tex1057
-rw-r--r--macros/latex/contrib/teubner/teubner.dtx3613
-rw-r--r--macros/latex/contrib/teubner/teubner.pdfbin0 -> 611666 bytes
-rw-r--r--macros/latex/contrib/teubner/teubner.txt170
-rw-r--r--macros/latex/contrib/teubner/teubnertx.sty91
7 files changed, 4975 insertions, 0 deletions
diff --git a/macros/latex/contrib/teubner/README b/macros/latex/contrib/teubner/README
new file mode 100644
index 0000000000..f1c8b924fc
--- /dev/null
+++ b/macros/latex/contrib/teubner/README
@@ -0,0 +1,44 @@
+This accompanies the teubner bundle version 4.x dated November 2015 or later.
+
+Copyright 2010-2016 Claudio Beccari
+
+The bundle contains the files
+
+README this file
+teubner.txt a more descriptive file
+teubner.dtx the self extracting documented TeX source file
+teubner-doc.tex an extended documentation file
+teubner.pdf general and technical documentation
+teubner-doc.pdf specific documentation with examples
+
+The bundle is distributed under the LPPL license version 1.3c or any later version.
+
+The bundle has the status of author maintained.
+
+The main purpose of this bundle is to provide classical philologists with some
+means for typesetting their documents that usually contain very specific mark up.
+This version allows the typesetter to use both "italic" shapes: the Olga-like
+and the Lipsian-like ones; it complies with the LICR (LaTeX Internal Character
+Representation) of the Greek glyphs that avoid the kerning problems that arise
+with the ligature mechanism embedded in the LGR encoded default CBfonts; it is
+compatible with the use of different vector Latin Type 1 fonts;
+contains new designs for the horizontally stretchable markers, et cetera.
+
+Running pdflatex on the .dtx file produces both the documentation and
+extracts the byproduct files teubner.sty, teubnertx.sty, teubner.pdf.
+The readable extended documentation file teubner-doc.pdf is obtained by running
+pdflatex on the teubner-doc.tex file.
+
+Moreover this teubner package generates on the fly the font description files
+necessary to use the LGR encoded Greek fonts with some non standard TeX
+PostScript fonts; for example, it automatically generates the necessary files if using
+the TX or the PX fonts; with other Type 1 fonts the necessary .fd files require
+manual intervention, which simply means giving a suitable command from within another
+open file that loads teubner.
+
+Please, be sure to work with a 2010 updated collection of the CBfonts; with a 2014
+updated version of the TeX system; with a babel version 3.9g or later; with the
+language description file greek.ldf version 1.9b or later. The teubner package works also with previous versions of the above pieces of software, but with limited performances.
+
+Claudio Beccari
+claudio dot beccari at gmail dot com \ No newline at end of file
diff --git a/macros/latex/contrib/teubner/teubner-doc.pdf b/macros/latex/contrib/teubner/teubner-doc.pdf
new file mode 100644
index 0000000000..803ba492c4
--- /dev/null
+++ b/macros/latex/contrib/teubner/teubner-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/teubner/teubner-doc.tex b/macros/latex/contrib/teubner/teubner-doc.tex
new file mode 100644
index 0000000000..a1ec488d22
--- /dev/null
+++ b/macros/latex/contrib/teubner/teubner-doc.tex
@@ -0,0 +1,1057 @@
+% !TEX encoding = UTF-8 Unicode
+% !TEX TS-program = pdflatex
+\documentclass[12pt,a4paper]{article}
+%\usepackage{trace}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+%\usepackage{lmodern}
+\usepackage{txfonts}
+%\usepackage{pxfonts}
+\usepackage{mflogo}
+\usepackage[greek,english]{babel}
+\def\workingdate{2016/03/31}% see two lines ahead
+\usepackage[boldLipsian,10pt,GlyphNames]% <-------- teubner options
+ {teubner}[\workingdate]% <--- older versions don't work well
+\usepackage[scaled=0.90]{helvet}
+\ifFamily{phv}{cmss}
+\makeatletter
+ \def\GetFileInfo#1{%
+ \def\filename{#1}%
+ \def\@tempb##1 ##2 ##3\relax##4\relax{%
+ \def\filedate{##1}%
+ \def\fileversion{##2}%
+ \def\fileinfo{##3}}%
+ \edef\@tempa{\csname ver@#1\endcsname}%
+ \expandafter\@tempb\@tempa\relax? ? \relax\relax}
+ \GetFileInfo{teubner.sty}
+ \ifnum\expandafter\@parse@version\filedate//00\@nil<%
+ \expandafter\@parse@version\workingdate//00\@nil
+ \def\@tbnhlp{Probably your typesetting will fail;
+ in any case\MessageBreak
+ expect a lot of errors and warnings!\@ehc}%
+ \@latex@error{This file must be processed with\MessageBreak
+ a teubner package\MessageBreak
+ with a file date not older than \workingdate;\MessageBreak
+ your teubner package has a date mark of \filedate.
+ }\@tbnhlp
+ \fi
+\makeatother
+\usepackage{mflogo}
+\usepackage{afterpage}
+\usepackage{graphicx}
+\usepackage{microtype}
+\usepackage{multicol}
+\title{\texttt{teubner.sty}%
+\thanks{This paper documents \texttt{teubner.sty} version \fileversion\ of \filedate.}\\
+An extension to the \textsf{greek} option\\ of the \babel\ package}
+\author{Claudio Beccari\thanks{\texttt{claudio dot beccari at gmail dot com}}}
+\date{Turin, March 2016}% <---- this is the date of the teubenr-doc document!
+\def\comando#1{\expandafter\texttt\expandafter{\string#1}}
+\def\cs#1{\texttt{\char92#1}}
+\def\ARG#1{\texttt{\char123}\meta{#1}\texttt{\char125}}
+\def\meta#1{$\langle${\normalfont\itshape#1}$\rangle$}
+\let\marg\ARG\let\Arg\meta
+\def\brArg#1{\texttt{\char123#1\char125}}
+\def\opt#1{\texttt{[}\meta{#1}\texttt{]}}
+\def\g#1 {\textDidot{#1}}
+\def\l#1 {\textLipsias{#1}}
+\renewcommand*{\textfraction}{0}
+\renewcommand*{\topfraction}{1.}
+\renewcommand*{\bottomfraction}{.5}
+\def\acro#1{\expandafter\textsc\expandafter{\MakeLowercase{#1}}}
+
+\def\thrule{\par\hrule\medskip}
+\def\bhrule{\par\medskip\hrule}
+
+\newcommand*\class[1]{\textsf{\slshape#1}}\let\amb\class
+\newcommand*\pack[1]{\textsf{\slshape#1}}
+\def\babel{\pack{babel}}
+\newcommand*\file[1]{\texttt{#1}}
+
+\newcommand\pdfLaTeX{pdf\/\LaTeX}
+\newcommand\XeLaTeX{X\kern-0.14em\raisebox{-0.7ex}{\rotatebox[origin=c]{180}{E}}\kern-0.075em\LaTeX}
+\newcommand\LuaLaTeX{Lua\/\LaTeX}
+
+\advance\textheight80pt \advance\topmargin-40pt
+
+\begin{document}\errorcontextlines=20
+
+%\expandafter\show\csname ver@greek.ldf\endcsname %%versione del file-opzione
+
+\maketitle
+{\columnseprule=0.4pt
+\begin{multicols}{2}
+\tableofcontents
+\end{multicols}}
+
+\section{Introduction}
+%\begin{sloppypar}
+This package \texttt{teubner.sty} is an extension of the \textsf{greek} option
+of the \babel\ package intended to typeset classical Greek with
+a philological approach. This version 4.x cannot yet typeset the critical
+apparatus as the philologists are used to, but may be this work will continue
+and include also that facility. Apparently it is not incompatible with \textsf{eledmac}, but it may be considered a complement.
+%\end{sloppypar}
+
+{\tolerance=9999
+This document does not substitute the official package documentation \texttt{teubner.dtx} and its typeset version \texttt{teubner.pdf}; it extends the information contained into those files.\par}
+
+This package is supposed to work with my CB fonts available on the
+Comprehensive \TeX\ Archive Network (\textsc{ctan}); one of the actions of this
+package consists in adding to the default ``italic'' Greek shape another one
+called ``Lispiakos'' in Greece; this name derives from the high quality of the
+fonts used in the printers' shops in the city of Lipsia in the past 100~years
+or so; one of the printer shops that continues printing books for philologists
+(since 1849) is the B.G.~Teubner Verlags\-gesell\-schaft, that publishes the
+collection called ``Bibliotheca Scriptorum Graecorum et Latinorum
+Teubneriana''. The name given to this extension package is in homage to that
+printing company and to its high quality tradition in printing Greek texts.
+
+This package is generally loaded by default with any complete distribution of the \TeX\ system; in basic distributions it might not be there, but in general it is sufficient to use the distribution facilities for loading it; with MiKTeX, for example one uses the MiKTeX settings and the Package tab. With \TeX\-live it is sufficient to operate with the program \textsf{tlmgr}; and so on.
+
+The problem, if there is one, is to have the full collection of the CB fonts; in partial distributions the scalable PostScript CB fonts are in one size, 10\,pt, and it is necessary to use the \emph{10pt} option in order to have the various enlarged or reduced sizes. For professional work, if the user has a partial \TeX\ system installation, it is necessary to load the \texttt{cbgreek-full} font collection and be sure that the map files are duly upgraded. In case, read your distribution instructions to see how to control and, possibly, how to provide for this upgrade. Please, notice that this very file has been typeset with the \emph{10pt} option in force, so that if you want to typeset it again from source, you need the minimum amount of vector fonts needed by \textsf{pdflatex} to do its job.
+
+In any case this \texttt{teubner} extension package makes the CB font collection (full or reduced) directly compatible by construction with both the CM fonts (OT1 and T1 encoded; the latter ones are often referred to as the EC fonts) and with the LM fonts; it also contains adequate hooks in order to make them compatible and usable with other font collections; this very file has been successfully typeset using the CM and LM fonts, and also resorting to the Times and Palatino eXtended collections requested with the packages \texttt{txfonts}\footnote{Antonis Tsolomitis wrote package \textsf{txfontsb} for using a different Greek font collection together with the TX fonts so that the Latin and Greek glyph styles directly match each other; see the \textsf{txfontsb} package documentation for more information.} and \texttt{pxfonts} respectively.
+
+This additional documentation will start by briefly recalling some peculiarities
+of the CB fonts and their mapping to the Latin keyboard; afterwards it will
+list the new commands and their syntax.
+
+\section{Usage}
+The \pack{teubner} extension is loaded in the usual way, but there are some simple rules to follow:
+\begin{quote}
+\texttt{\string\usepackage}\opt{options}\brArg{teubner}
+\end{quote}
+
+
+Since \pack{teubner} is an extension of the \pack{babel} package, it must be loaded after the latter. If you load it before and/or if you load it after, but you invoked the \texttt{babel} package without specifying the \meta{greek} language and the \texttt{polutoniko} Greek language attribute, \texttt{teubner} refuses to be completely loaded and emits a message very clear on this subject, so that you know what you should do in order to use the facilities offered by its extensions.
+
+\noindent\textbf{Warning}: Some people like the Lipsian font shape and want to load it also for writing mathematics with it. No problem, but they shouldn't do this with \pack{teubner}, which is useful only to typeset Greek text. For using other alphabets in mathematics there are more suitable ways that rely on the commands described in the \texttt{fntguide.pdf} distributed with every \TeX\ system in \texttt{\$TEXMFDIST\slash doc\slash latex\slash base/}.
+
+\section{Package options}
+
+The options available to \pack{teubner} are collected in table~\ref{t:opzioni} with their meaning and usefulness.
+
+\begin{table}
+\thrule
+\centering\def\R{\rule[-1ex]{0pt}{3ex}}\let \i\itshape
+\begin{tabular}{lp{.7\textwidth}}
+Option & Meaning\R \\\hline
+\i or\R & obsolete option kept for backwards compatibility\\
+\i 10pt & for using only one real font size and geometrically enlarging or reducing the other sizes from the original single 10\,pt one\\
+\i boldLipsian& to be selected in order to use a moderately blacker Lipsian font\\
+\i NoGlyphNames& to be selected in order to avoid the definition of accented glyphs (default)\\
+\i GlyphNames & to be selected in order to have available also the set of macros that directly address the accented glyphs\\[1ex]
+\hline
+\end{tabular}
+\caption{Options for the \pack{teubner} extension package}\label{t:opzioni}
+\bhrule
+\end{table}
+
+You should never need (and therefore never use) the \textit{or} option for two reasons: $(a)$ glyph name macros are not needed for the first letter of any word since there are no kerning problems with a preceding letter; $(b)$ glyph name macros are insensitive to uppercasing.
+
+\noindent\textbf{Warning}: You might need to use the \textit{10pt} option because your Greek font collection is the minimal one. But if you are using \texttt{teubner}, you are likely to seek the best possible typeset text; therefore you should download and install the full collection of the Greek CB fonts. This full collection is generally already available with any complete distribution of the \TeX\ system.
+
+If you are using Latin fonts different from the CM , EC, or LM collections, you have to control what you get with or without the option \textit{boldLipsian}; generally speaking, this option is best used with darker normal fonts; I have tried the Times, the Palatino, and the Fourier ones, and actually this option is desirable. This might not be true with other vector fonts.
+
+With the inclusion of the extended accent macros in the \pack{teubner} package (see below), the named accented glyphs should not be needed anymore; these accented glyph name macros are not defined by default, but for backwards compatibility they are available if the \emph{GlyphNames} option is specified; with the 2013 new Greek support for the \babel\ package, the extended accent macros are defined in a more efficient way and you should not need them any more; therefore, unless you specify this option, you avoid overloading the internal \TeX\ memory areas, thus leaving extra space for more useful extensions. I suggest you to let the \emph{default} option \textit{NoGlyphNames} act as its name implies, and make use of the extended accent macros, should the need arise (see below). Moreover, if your keyboard has facilities for entering polytonic Greek, or if you installa a keyboard driver that allows you to do so, you can directly input Greek text with the Greek alphabet, without using the transliteration provided by the Greek support for \babel.
+
+\section{The CB Greek fonts}
+The CB Greek fonts (full collection) come in all shapes, sizes and series as the European Modern fonts that conform with the T1 encoding introduced after the Cork Conference of the \TeX\ Users Group Society in 1991\footnote{If you want to or you have to use the single 10pt size fonts, you certainly produce smaller PDF files, at the expense of a slightly poorer typographical quality.}. The CB fonts conform
+to the encoding that is still being called LGR, since up to now there is no
+established encoding name for the Greek alphabet among the \TeX\ users, not
+yet, at least.
+
+The regular shape has capital letters with serifs that are in the
+same style as the Latin capital ones, while the lower case letters
+derive from the design by Didot and are very common in all texts.
+This shape comes also in boldface, together with the corresponding
+oblique (or slanted) versions. The CB fonts contain
+also the upright and slanted, medium and boldface small caps
+alphabets.
+
+The ``italic'' shape was designed in order to imitate the Olga font designed so
+as to have a contrasting style compared with the slanted Didot shape, in order
+to play the same role as the italic letters play with the Latin roman
+ones. The Olga alphabets come in medium and boldface series, and in
+oblique and upright shapes.
+
+The CB fonts are completed with the sans serif fonts, the
+monospaced typewriter fonts and the fonts for slides, besides an
+outline family that shows the regular shapes and series just with
+their contours; there is also a shape with serifed lower case letters.
+
+The CB Lipsian fonts imitate the beautiful shapes used in
+Lipsia; they come in medium, bold, and extra-bold series, without
+an upright version, and they are meant to replace the
+corresponding Olga shapes. Their `simple bold' series is good for mixing
+with PostScript fonts, whose medium series is slightly blacker
+than the corresponding EC and LM fonts nurmally used with \LaTeX; this is easily achieved by passing the \emph{boldLipsian} option when invoking this \pack{teubner} extension file. Notice that the Lipsian font produces an alternative to the ordinary `italic' Olga shape, it is not any more the default `italic' shape as it used to be with previous versions of this package; now, in the same document, you can use both shapes and produce both versions:
+\foreignlanguage{greek}{\textit{Baq'ulides}
+\textlatin{\upshape and}
+\textli{Baq'ulides}}.
+With the availability of the unslanted Olga font and the serifed lowercase alphabet, you can use also the \verb|\textui| and the \verb|\textrs| commands so as to obtain \foreignlanguage{greek}{\textui{Baq'ulides} \textlatin{\upshape and} \textrs{Baq'ulides}}; also in extended boldface: \foreignlanguage{greek}{\bfseries\textui{Baq'ulides} \textlatin{\upshape \mdseries and} \textrs{Baq'ulides}}.
+
+But if you really want to permanently change the ``italic'' Greek font shape to the Lipsian one, without keeping the alternative, then in your preamble add the following statements \emph{after} you have loaded the \texttt{teubner} package:
+\begin{verbatim}
+\addto\extrasgreek{\def\itdefault{li}}%
+\addto\noextrasgreek{\def\itdefault{it}}%
+\end{verbatim}
+With these settings, \verb|\textit| and \verb|\textli| become equivalent and both use the Lipsian shape while typesetting Greek text. Reverting to Latin script the \verb|\textli| text command uses the italic shape by default and there is no need to add anything else to the \verb|\noextrasgreek| macro.
+
+
+\subsection*{Technical information}
+Typesetting documents with different scripts sets forth some problems. The \emph{greek} option to the \babel\ package, besides setting up the typographical rules for Greek, as it does for any other language, provides the script change; it defines also the \verb|\textlatin| macro in order to typeset something with the Latin script while the default script is Greek, as well as the \verb|\textgreek| macro to typeset something with the Greek script when typesetting with a Latin one. Of course the usual \verb|\selectlanguage| and \verb|\foreinglanguage| commands, as well as the \texttt{otherlanguage} environment, provide for a global change of the typesetting characteristics or an environment where the settings are reset to Greek.
+
+\noindent\textbf{Beware}! Differently from before, \verb|\textlatin| changes only the encoding and sets some other small details, but it does not reset the local font family to "roman", as it used to do before \verb|teubner| version~4.8. This was remarked by Jens Börstinghaus, whom I thank very much for this bug notification. In facts \verb|\textlatin| is often used behind the scenes by \LaTeX\ internal commands and the user has little or no control over the font characteristics; before the font family was reset to the default, instead of continuing with the current family, series and shape. Now it does, and the users should explicitly declare some other family, series or shape if they do not want the current ones.
+
+
+With standard \babel\ the CB fonts used to work only in conjunction with the CM fonts with either the OT1 (real CM fonts) or T1 (EC fonts) encoding. Since the 2008 distribution of standard \babel, the CB fonts work fine also with the Latin Modern fonts. This \pack{teubner} extension tries to work seamlessly also with other font families, but it is not that simple. Some technical explanations are necessary.
+
+When \LaTeX\ needs to use a specific font in a certain encoding and belonging to a particular family, series and shape, available in such and such sizes, it gets this information by reading a \emph{font description file}; this file's name is composed with the encoding and the family names glued together and has the extension \texttt{.fd}; for OT1 encoded Computer Modern CM regular (serifed) fonts this file would be \texttt{ot1cmr.fd}. Any other package that is requested for using different fonts defines possibly a different encoding and certainly different family names. For using the Times eXtended TX fonts with T1 encoding, the \texttt{txfonts.sty} package defines the family name \texttt{txr} (for serifed fonts) so that \LaTeX\ reads the font description file \texttt{t1txr.fd} that contains the relevant information for all the series, shapes, and sizes available.
+
+The CB fonts are encoded according to the LGR encoding but have the same family names as the CM ones; since 2008, also the family names of the Latin Modern LM collection are recognised; therefore the relevant font description files for the regular\footnote{The regular lower case Greek alphabet does not have serifs; serifs are present in the font shape called `serifed' that corresponds to the\texttt{\string\textrs} font command.} family are \texttt{lgrcmr.fd} and \texttt{lgrlmr.fd} respectively. The two collections of description files are not equivalent with one another, and they are not equivalent to the OT1 or T1 encoded CM or LM fonts, in the sense that the series and shapes available for these sets of fonts are not identical, even if most of them are.
+
+In this way with CM and LM fonts the script switching for the same (existing) series and shapes amounts to switching the encoding name. At the same time there might exist some font switching commands that refer to a series or shape that does not exist in the other script families; one important example in our case is the Lipsian shape that is available only with the CB fonts. There is no problem in declaring the Lipsian shape switching commands that behave in a proper way together with the CM and LM fonts, but even if I did my best for working with other font families, I am not 100\% confident that my macros restore correctly the other font characteristics when declaring a different series or shape.
+
+Going more technical, the default family settings are stored into the three macros
+\verb|\rmdefault|, \verb|\sfdefault|, \verb|\ttdefault|; the series and the shape symbols are stored in similar macros; these default macros are accessed every time a font characteristic switching declaration or command is used. In the background the \verb|\selectfont| macro is executed and during the whole process the \emph{current} font characteristic macros are updated. Such macros are \verb|\f@encoding|, \verb|\f@family|, \verb|\f@series|, and \verb|\f@shape|; therefore when just one characteristic is modified, the new value is stored in the relevant current value macro and used in order to create the association with the actual font to be used.
+
+If the font switching macros are used within a group, upon exiting that group the previous values are restored; but if declarations are used without a delimiting scope, there is no simple (universal) way to use another ready-made declaration that resets valid font characteristics.
+
+An example where the necessity of delimiting scopes is shown: suppose we are typesetting with T1 encoded LM roman medium normal (upright) fonts; then the current font characteristics codes are stored in the relevant macros as \texttt{T1}, \texttt{lmr}, \texttt{m}, \texttt{n}. We switch to Greek with a language setting declaration, and the current encoding is changed to \texttt{LGR}, but the other characteristics remain the same, therefore we would be typesetting with LGR encoded, CB Didot (upright) medium normal font. While typesetting in Greek we switch to Lipsian shape with a declaration such as \verb|\lishape|\footnote{Notice that the \texttt{\string\lishape} declaration and the corresponding text command \texttt{\string\textli} are defined in such a way that they switch to the Lipsian shape only when the Greek encoding LGR is in force; with other encodings they behave as the corresponding italic font commands. In spite of this the example being carried on is valid, because the \texttt{\string\lishape} \emph{declaration} is supposed to be issued while the Greek encoding was in force.}, and this declaration changes only the current shape characteristic, so that the four ones would be \texttt{LGR}, \texttt{lmr}, \texttt{m}, \texttt{li}. Up to this point everything runs smoothly because every characteristic that was set is present in the specific font family in use. At this point we revert to typesetting with the Latin script by means of a language switching declaration; the only change that takes place is on the encoding and the four characteristics would become \texttt{T1}, \texttt{lmr}, \texttt{m}, \texttt{li}, but\dots\ The Latin Modern fonts do not contain a Lipsian shape, therefore there is no actual font that meets the requirements and \LaTeX\ selects the \emph{error font}, the T1 encoded LM roman medium normal one, that in this case is the correct one, and apparently the font switching process achieved the correct result. This is only apparent: remember that the \emph{error font} was selected, not the right font. If the Latin family and the Greek family hadn't been the same, there would have been other difficulties and the error font would have been selected; this is why, if the user does not pay attention, when the default font should be, say, the TX font, after a switch to Greek, upon reverting to the Latin script the wrong font series or shape might be used. In the next paragraphs some indications are given in order to overcome this feature.
+
+All these technicalities are really too technical, but it's necessary to have some clues in order to find out why sometimes the font switching commands don't work as expected. In some cases the font description file might provide a smart substitution for missing fonts, but it is not always the case.
+
+In this package I tried to forecast most situations, but I am not sure I coped with every font characteristic combination.
+
+In particular I hooked the language changing declarations with suitable default family names; for example, when using the Times or the Palatino eXtended TX or PX fonts, three new family description files are created so as to connect the LGR encoding and the names of the above scalable fonts to the corresponding CB fonts\footnote{I chose the CM Greek families, instead of the LM ones, because only the former are described by means of macros that cope with the \emph{10pt} option to the \texttt{teubner} package; just in case\dots\ The actual used fonts are the same in any case, except possibly for the visual sizes; the CM fonts come in fixed sizes, while the LM fonts are continuously scalable by enlarging or reducing a smaller number of base visual sizes.}.
+
+If you use different scalable fonts you can specify yourself the font associations you want to use; simply, after loading a package that sets other default font family or families, open the the package file and take notice of the new family names; for each \meta{latin} family (serifed, sans serif, monospace) create a connection with the corresponding \meta{greek} family by means of the following command:
+\begin{quote}
+\texttt{\string\ifFamily}\marg{latin}\marg{greek}
+\end{quote}
+right after the \verb|\usepackage| command with which you call that package.
+
+Example: suppose you want to use the regular Fourier fonts to replace the default roman normal serifed fonts; then you should load the package \texttt{fourier} \emph{after} the \texttt{teubner} extension and specify:
+\begin{verbatim}
+\usepackage{fourier}
+\Lipsiantrue
+\ifFamily{futs}{cmr}
+\end{verbatim}
+You can see that the family name \texttt{futs}, corresponding to the regular Fourier font family, has been matched to the CB Greek \texttt{cmr} font family; the name \texttt{futs} has been deduced by reading the \texttt{fourier.sty} file from which one can see that the family declaration for the regular Fourier font family is \texttt{futs}. This sort of coding does not take place with all fonts: if the Iwona fonts had to be chosen, for example, then the font family name would coincide with the font name, making it difficult to distinguish between the \emph{font name} and the \emph{font family name}.
+
+Notice the \verb|\Lipsiantrue| command before issuing the matching command
+\verb|\ifFamily}|. This command is optional and is used only if the composer wishes to use the Lipsian fonts; in this case the \texttt{li} shape is also defined, so that the \verb|\textli| and \verb|\lishape| commands do not issue any error message. At the end of the execution if the \verb|\ifFamily| command, the boolean switch is automatically reset to \verb|\Lipsianfalse|.
+
+\noindent\textbf{Warning}: According to several maintainers of the language support packages, the procedure used with \verb|\ifFamily|, that produces in the local working directory a real, permanent \texttt{.fd} file, is not the best approach to create such pairing of fonts. G\"unter Milde, for example, produce a \pack{substitutefontfamily} package that defines the command \comando\subtitutefontfamily\ which creates a similar association, but does not write anything to the disk; simply the created association declarations are stored in the job memory, so that when the typesetting job is over, no traces remain on disk; this certainly avoids clogging the disk with the same files scattered all over in different directories that were the working one for different typesetting jobs.
+
+A small caveat: when you issue for the first time the command \verb|\ifFamily| you might not see the expected result (while with Milde's package you immediately obtain the expected result), and your Greek text might be typeset with the default ``Greek error font''. But the second time you typeset your document the expected result is obtained with the correct fonts. This is because with the very first run a new font description file is generated, and this file will be available only in subsequent typesetting runs.
+
+Nevertheless this does not imply that the correct fonts are used if the font switching macros are used without scoping groups or environments. Sometimes, when you use declarations instead of commands, it might be necessary to issue an apparently redundant \verb|\rmfamily| or \verb|\selectfont| command in order to re-establish the correct defaults.
+
+In order to insert \emph{short texts} in Greek, either in Didot upright or in Lipsian inclined shape, the \emph{text} commands \verb|\textDidot| and \verb|\textLipsias| may be used, as well as a redefined \verb|\textlatin| \emph{text} command for typesetting a short Latin script text while typesetting in Greek; these macros should already select the correct encoding, family, series and shape in most circumstances. If the users want to change some of these font characteristics, they have to do it explicitly.
+
+The \emph{text commands}, contrary to the corresponding \emph{text declarations}, typeset their argument within a group, so that the font characteristics are also correctly restored after the command execution is completed.
+
+Therefore I suggest you to either use the text commands or to use the declarations as environment names (without the initial backslash), so that they provide the necessary group delimiters; it's syntactically correct and useful to input something such as:
+\begin{quote}
+\verb|\begin{Lipsiakostext}|\\
+\meta{Greek text to be typeset with the Lipsian font}\\
+\verb|\end{Lipsiakostext}|
+\end{quote}
+
+
+\section{Font installation}
+In order to use the Greek CB fonts and the extensions provided with this
+package, you need to install them, if they are not already installed by default when you install your preferred \TeX\ system \emph{complete} distribution. You can freely download those fonts from \acro{ctan}, where you can find both the PostScript scalable ones and the driver files for generating their bitmaped with \MF; since nowadays it's very unlikely that \LaTeX\ users limit themselves to a final DVI file, but typeset their documents in PDF (or PS formats), the pixel files are very unlikely needed to produce their final documents; the \MF\ pixel files just allow the DVI previewer (should one be used) to run \MF\ in the background in order to produce the necessary pixel files so as to display on the screen the typeset documents\footnote{I mean documents that have been typeset with \textsf{latex}, not with \textsf{pdflatex}.}. These days there are other solutions to preview directly the typeset output file in PDF format and to use the previewer for direct and inverse search, so that the DVI format becomes really necessary only in very special and rare occasions. In the future it's very likely that the choice among such PDF previewers is much greater than today: there are certainly the multi\-platform shell editors \textsf{TeXworks}, \textsf{TeXstudio}, and \textsf{Texmaker} that incorporate a PDF previewer capable of direct and inverse search; for modern Windows platforms there is the \textsf{SumatraPDF} previewer that may be configured to work with various shell editors in order to perform in the same way. For Mac platforms, besides the default shell editor and previewer \textsf{TeXShop}, and the multi-platform program \textsf{TeXworks}, the Mac specific \textsf{TeXnicle} and \textsf{Texpad}, one can proceed with \textsf{Aquamacs} as a shell editor and \textsf{Skim} as PDF previewer that work together so as to allow direct and inverse search.
+
+\section{\TeX\ font metric files}
+The package \texttt{teubner} requires the updated \TeX\ font metric files \texttt{.tfm} for all sizes and series of the Lipsian fonts. With your file system explorer go to the folder \texttt{\$TEXMFDIST/fonts/tfm/public/cbfonts/} and read the date of, say, \texttt{grml1000.tfm}; if this date precedes the year 2010, then this \texttt{.tfm} file is ``old'' and must be replaced, and you should update your Greek CB font collection (may be you should update your whole \TeX\ system installation).
+
+The updated \texttt{.tfm} files add some ligature and kerning information that is missing from the ``old'' ones. The Type~1 \texttt{pfb} font files have not been modified at all.
+
+
+\section{Greek text and Latin keys}
+
+In order to input Greek text with a Latin keyboard\footnote{Although tables~\ref{t:corrispondenza} and~\ref{t:accenti} display only Latin ASCII characters in the second line, there are some national keyboards where some of these ASCII symbols can't be typeset by striking a single, possibly shifted, keyboard key or a simple key combination; an example is the Italian keyboard, where both the `back tick' and the `tilde' can be input only in one of these two ways: $(a)$ open the Character Map accessory [some shell editors can open their internal character map, where to select the desired characters] and select the required glyph(s), or $(b)$ while pressing the \fbox{\rule{0pt}{1.1ex}\smash{\ttfamily Alt}} key, input the numerical glyph code from the numeric pad. Very uncomfortable!} some simple and mostly obvious key substitutions are performed according to the correspondence shown in table~\ref{t:corrispondenza}.
+
+\begin{table}[bt]\tabcolsep4pt
+\thrule
+\centering
+\begin{tabular}{*{25}c}
+\g a & \g b &\g g &\g d &\g e &\g z &\g h &\g j &\g i &\g k &\g l &\g m &\g n &\g x &\g o &\g p &\g r &\g c &\g sv &\g t &\g u &\g f &\g q &\g y &\g w \\
+ a & b & g & d & e & z & h & j & i & k & l & m & n & x & o & p & r & c & s & t & u & f & q & y & w
+\end{tabular}
+\caption{Keyboard correspondence between Latin and Greek
+letters}\label{t:corrispondenza}
+\bhrule
+\end{table}
+
+Notice that there is the possibility of inputting \texttt{c} in
+order to get the final sigma \textDidot{c}, but the CB fonts are
+conceived with the non-Greek typist in mind, so that it is even
+possible to input \texttt{s} at the end of words, because the
+whole software is smart enough to detect the word boundary and to
+use the correct shape of the letter sigma within or at the word
+end. This mechanism is so ``sticky'' that it becomes difficult to
+type an isolated initial or middle sigma; the CB
+fonts contain an invisible character, \texttt{v}, that may be
+used for several purposes, one of which is to hide the word
+boundary after a sigma; therefore if you type \texttt{sv}, you get
+\textDidot{sv} without any effort.
+
+The invisible character \texttt{v} may be used also as a support
+for (apparently) isolated accents, especially when macros have to
+be used; if you type \verb"\M{v}" you get
+\enspace\textDidot{\M{v}}\enspace, while if you omit the invisible
+\texttt{v} you get \enspace\textDidot{\M{}}\enspace.
+
+In LICR (\LaTeX\ Internal Character Representation), that is being used by the modern (2013) Greek support for \babel, the \texttt{v} character is represented by the macro \comando\textcompwordmark\ whose name recalls a compound word separator; actually it may perform also in this way; but it is a special character, not simply an invisible strut; it has the same category code as the other alphabetic characters, it has a very small width but its height is equal to the other lower case letters without ascenders; it's a real character even if in practice it is invisible; in particular it does not impeach hyphenation as an equally sized normal strut would do. But its usefulness is $(a)$ to hide the word boundary; $(b)$ to support an accent that would drop to the base line if this character was absent; $(c)$ to break ligatures in those rare cases where it's necessary to do so.
+
+Accents, spirits and dieresis may be input \emph{before} each letter
+(prefix notation) without using any particular control sequence, that is resorting to the ligature mechanism that is part of the font characteristics; but since with certain fonts this mechanism may break kernings, it's better to use the proper accent macros;
+the correspondence between the Latin symbols and the Greek
+diacritical marks is shown in table~\ref{t:accenti}; all ``upper''
+diacritical marks must be prefixed (in any order), while the iota
+subscript must be postfixed. Therefore if you input \verb">'a|", you
+get~\textDidot{>'a|}.
+
+\begin{table}\let\t\ttfamily
+\thrule
+\centering
+\begin{tabular}{l*{7}c}
+Greek diacritics &\g > & \g < &\g "v &\g ' &\g ` &\g \~v &\g | \\
+Latin keys &\t> & \t< &\t" & \t' &\t ` &\t\string~{} &\t| \\
+extended accent macros
+ &\t\string\>&\t\string\<&\t\string\"&\t\string\'&\t\string\`&\t\string\~&
+\end{tabular}
+\caption{Correspondence between the Latin keyboard symbols and
+Greek diacritical marks; extended accent macros are also shown; notice that a couple of ``high'' diacritical marks may be joined in one macro (in any order) to produce the same result as with two separate macros; in other words, \texttt{\string\>\string\'}, \texttt{\string\'\string\>}, \texttt{\string\>'} and \texttt{\string\'>} are equivalent with one another. For what concerns \texttt{\string\~}, see remarks below table~\ref{t:accentmacros}}\label{t:accenti}
+\bhrule
+\end{table}
+
+Macrons and breves are just single glyphs and do not appear in combination with
+any letter, due to the limitation of 256 glyphs per font; but they may be input
+by means of commands \verb|\M| and \verb|\B| respectively when typesetting in Greek
+in order to use them as single diacritics; for more than one diacritic superimposed to one another, when macrons and breves are involved, some other commands are available as shown in table~\ref{t:accentmacros}.
+
+The new (2013) Greek support for \babel\ contains now the LICR encoded accent macros that allow to use any encoding input method, including direct input of Greek characters. The internal representation of accent macros resorts to the same symbols shown in table~\ref{t:accenti}; simply they are prefixed by a backslash and/or the accent sequence is prefixed with one backslash; therefore \textDidot{>'a|} may be obtained with \verb+>'a|+, or \verb+\>\'a|+, or \verb+\>'a|+. The last form is to be preferred with some shapes as discussed in the following paragraphs. But the LICR (\LaTeX\ Internal Character Representation) is much more than this; it separates the input encoding from the output font encoding, so that direct literal greek input is possible (of course with the \opt{utf8} encoding) and the output is useful for both LGR encoded 8-bit fonts and the UNICODE encoded OpentType fonts; this way \pack{babel} and the Greek support for \babel, provided by the new \file{greek.ldf}, may be used also with \XeLaTeX\ and \LuaLaTeX. Moreover now (October 2014) file \file{greek.ldf} can select the ancient Greek hyphenation when typesetting with \pdfLaTeX\footnote{This is why with this release of the \pack{teubner} package, the default language attribute is set to \texttt{ancient}.}; with \pack{polyglossia} this possibility was available from the very beginning of the Greek support by this package.
+
+Together with the macros for inserting such symbols, a complete set is available for inserting any combination of diacritical marks over or under any letter, not only vowels: see table~\ref{t:accentmacros}.
+
+Of course the results may not be comparable with the ones one can obtain with the regular ligature mechanism or by using the LICR macros; the advantage of the redefined accent macros is twofold: (a) it is connected to the possibility of inserting macrons and breves and/or to set the various combinations over or under \emph{any} letter, even if it is a consonant; (b) for all accent vowel combinations that have a specific glyph in the font, the actual accented symbol is used so that kernings and ligatures are maintained; this result is achieved also by using the extended accent macros shown in the third line of table~\ref{t:accenti}; as shown elsewhere there is a noticeable difference between {\Lipsiakostext a>ut'os} and \textLipsias{a\s{u}t\'os} or \textLipsias{a\>ut\'os} or \textLipsias{a\>ut'os}. In this example the first word is typed in as \verb+a>ut'os+, while the other words may be typed in as \verb+a\s{u}t\'os+, or \verb*+a\us t\oa s+, or \verb+a\>ut'os+, or even in mixed form \verb*+a\us t'os+, thanks to the fact that there is no kerning between `tau' and `omicron with or without acute'.
+
+The attentive reader might have noticed that some accent macros use the control symbols that are available for other standard \LaTeX\ environments or even defined in the \LaTeX\ kernel. Accent macros \cs{`}, \cs{'} and \cs{=} are already taken care by the \LaTeX\ kernel that uses a particular trick to use them as control macros in the \amb{tabbing} environment; therefore there should not be any conflict.
+
+On the opposite some conflicts may arise with \cs{<} and \cs{>}, as reported by David Kastrup. We have examined these conflict occurrences and we noticed that actually \cs{>} is defined as a `math wide space' command; an alias \cs{:} is defined immediately after the definition, and the \LaTeX\ handbook by Leslie Lamport does not even mention \cs{>}; therefore \cs{>} may be considered a leftover from the beginnings of \LaTeX, and it would be surprising if anybody used it; nevertheless\dots\ The control symbol \cs{<} has been reported as being used as a macro with a delimited argument \cs{<}\meta{arg}\texttt{>} in the documentation of package \pack{calc}. We immagine that it is very unlikely that this \pack{teubner} package might be used in another package documentation, but\dots
+
+These conflicts are avoided if Günter Milde package \pack{textalpha} is loaded; we did not find out any conflict in any testing run we made, but such conflicts may arise; therefore we decided to have \pack{teubner} load the \pack{textalpha} package at \verb|\begin{document}| execution time, so as to avoid any possible conflicts.
+
+
+\begin{table}[tb]\thrule
+\makebox[\textwidth]{\def\V{\rule{0pt}{2.5ex}}%
+\begin{tabular}{cl|cl}
+Example & \multicolumn1c{Syntax} & Example & \multicolumn1c{Syntax} \\[0.7ex]
+\hline
+\g \`{a} & \comando\G\ARG{letter}\ap{1}\V & \g\ut{aw} & \comando\ut\ARG{letters} \\
+\g \'{a} & \comando\A\ARG{letter}\ap{1} & \g\Ab{a} & \comando\Ab\ARG{letter} \\
+\g \~{a} & \comando\C\ARG{letter}\ap{1} & \g\Gb{a} & \comando\Gb\ARG{letter} \\
+\g \"{i} & \comando\D\ARG{letter}\ap{1} & \g\Arb{a} & \comando\Arb\ARG{letter} \\
+\g \B{a} & \comando\B\ARG{letter}\ap{4} & \g\Grb{a} & \comando\Grb\ARG{letter} \\
+\g \U{ai} & \comando\U\ARG{diphthong} & \g\Asb{a} & \comando\Asb\ARG{letter} \\
+\g \M{a} & \comando\M\ARG{letter}\ap{4} & \g\Gsb{a} & \comando\Gsb\ARG{letter} \\
+\g \>a & \comando\>\ARG{letter}\ap{3} & \g\Am{a} & \comando\Am\ARG{letter} \\
+\g \<a & \comando\<\ARG{letter}\ap{3} & \g\Gm{a} & \comando\Gm\ARG{letter} \\
+\g \r{a} & \comando\r\ARG{letter} & \g\Cm{a} & \comando\Cm\ARG{letter} \\
+\g \s{a} & \comando\s\ARG{letter} & \g\Arm{a} & \comando\Arm\ARG{letter} \\
+\g\Ad{i} & \comando\Ad\ARG{letter} & \g\Grm{a} & \comando\Grm\ARG{letter} \\
+\g\Gd{i} & \comando\Gd\ARG{letter} & \g\Crm{a} & \comando\Crm\ARG{letter} \\
+\g\Cd{i} & \comando\Cd\ARG{letter} & \g\Asm{a} & \comando\Asm\ARG{letter} \\
+\g\Ar{a} & \comando\Ar\ARG{letter} & \g\Gsm{a} & \comando\Gsm\ARG{letter} \\
+\g\Gr{a} & \comando\Gr\ARG{letter} & \g\Csm{a} & \comando\Csm\ARG{letter} \\
+\g\Cr{a} & \comando\Cr\ARG{letter} & \g\Sm{a} & \comando\Sm\ARG{letter} \\
+\g\As{a} & \comando\As\ARG{letter} & \g\Rm{a} & \comando\Rm\ARG{letter} \\
+\g\Sb{a} & \comando\Sb\ARG{letter} & \g\Rb{a} & \comando\Rb\ARG{letter} \\
+\g\Gs{a} & \comando\Gs\ARG{letter} & \g\iS{a} & \comando\iS\ARG{letter} \\
+\g\Cs{a} & \comando\Cs\ARG{letter} & \g\d{p} & \comando\d\ARG{letter} \\
+\g\c{i} & \comando\c\ARG{letter} & \g\bd{i} & \comando\bd\ARG{letter} \\
+\semiv{u} & \comando\semiv\ARG{letter}\ap{2} & \ring{a} & \comando\ring\ARG{letter}\ap{2} \\[0.7ex]
+\hline
+\end{tabular}}
+\caption{Accent macros}\label{t:accentmacros}
+\vskip\baselineskip
+REMARKS\\[3pt]\footnotesize
+\mbox{\quad}\ap{1}These four commands superimpose the corresponding accent over the \meta{letter} belonging to the Greek alphabet; the corresponding commands \comando\`, \comando\', \comando\~, and \comando\" play the same rôle also with non Greek letters; this allows the stacking of several accents on the same base \meta{letter}. \\
+\mbox{\quad}\ap{2}Most commands may be used also with latin letters.\\
+\mbox{\quad}\ap{3}While typesetting in Greek within a \texttt{tabbing} environment,
+both commands \comando\> and \comando\< play a different r\^ole as tab shifters;
+in this case either \comando\s\ and \comando\r\ are used for the spirit macros, or
+the standard ligature mechanism is used, especially if the spirit diacritics
+fall on the very first vowel of a word. Suggestion; never use the \texttt{tabbing} environment; there are more effective ways to align chunks of text, for example the \texttt{tabular} environment.\\
+\mbox{\quad}\ap{4}In \pack{teubner} versions preceding 4.0 macros for typesetting macrons and breves in Greek had the same name as the corresponding macros used when typesetting with Latin script, that is \comando\=\ and \comando\u. With the new Greek support for the \pack{babel} package that was implemented during year 2013, the Latin macros were not functional any more in the proper way, and were updated in \pack{teubner} version 4.0 with new names.
+\bhrule
+\end{table}
+
+\section{Ligatures}
+It should be clear from the previous section that the ligature mechanism is the
+one that offers good results with most accented vowels, while speeding up the keying-in of the text to be typeset; nevertheless there are situations where you might be unsatisfied.
+
+For example compare \textLipsias{a>ut'os} with \textLipsias{a\>ut\'os}. The small spacing difference, if any, between tau and the accented omicron is not noticeable, but the spacing difference between alpha and the marked upsilon is remarkable. Where does that difference come from? It comes from the fact that the smooth spirit marker inhibits kerning between the previous alpha and the resulting ligature from the spirit marker and the upsilon\footnote{The CB fonts may be used also with monotoniko spelling; in this case \textLipsias{A"ULOS} comes out well even with ligatures \texttt{A"ULOS}, because a special kludge has been devised; with the extended accent macros it would not be too boring to typeset \texttt{A\string\"ULOS} and do away with that kludge; without it and without such extended macros that word would be set as \textLipsias{Av"ULOS} with a much larger space between the capital alpha and the marked capital upsilon.}.
+In other words, by inputting \verb"a>ut'os", as it is suggested in the previous
+section, the spirit marker and the acute accent inhibit the kerning mechanism with the previous letter. In most instances the lack of such kerning is hardly noticeable, but in others it strikes your attention.
+
+For this reason two mechanisms are implemented in this package:
+\begin{enumerate}\itemsep=0pt\parsep=0pt
+\item the extended accent macros created by Günter Milde are now the default setting in the Greek support for \babel, and
+\item the character names have been defined with macros that access directly their own glyphs.
+\end{enumerate}
+The first solution has been described in the previous section and the extended accent macros are shown in table~\ref{t:accenti}. At the expense of one slash, these macros create a chain of commands that deeply exploit the \LaTeXe\ kernel commands and allow to fetch directly each accented character; notice that there is no need to treat the \verb+|+ sign this way, because its postfixed position does not break the kerning/ligature mechanism. The spirit macros \verb+\>+ and \verb+\<+ work also with the consonant `r' to produce \textLipsias{\>r, \<r}. The extended accent macros work correctly also with capital letters (where, in all caps, accents should not be typeset, except the dieresis, while in normal initial capitalising the upper diacritics must be written at the left of the initial letter); for example\footnote{In the capitalised word the spirit and accent at the left of A imply a hiatus between the A and the \textDidot{u}; in the all caps word this hiatus is marked with the ``dialytika'' (dieresis) over the \textDidot{U}. This is an unusual example, but it shows also why the \texttt{\string\uppercase} and the \texttt{\string\MakeUppercase} require some attention in polytonic Greek.} \textDidot{\>'Aulos, A\"ULOS} was typeset with \verb+\>'Aulos, A\"ULOS+. Notice also that the initial capital vowel has a spirit and possibly an accent, or is not preceded by anything, since the possible spirit with or without accent falls on the second element of a descending diphthong: \textDidot{a\>ut'os}, \textDidot{A\>ut'os}, and \textDidot{AUTOS}; \textDidot{e\>'inai}, \textDidot{E\>'inai}, \textDidot{EINAI}. If you really want to show an example of how accents should \emph{not} be used in all caps words, you can type \textDidot{A\>UT\A{O}S} but you have to use the macros of
+table~\ref{t:accentmacros} as such: \verb+A\>UT\A{O}S+.
+
+Another solution is available if the \emph{GlyphNames} option is specified to the \texttt{teubner} package: a set of macros has been defined such that it is
+possible to input the accented characters directly, without
+resorting to the ligature mechanism. Such macros have a common
+structure; they are formed with the letters that make up the
+complex glyph in a certain order, precisely every macro is made
+up as such:
+\begin{enumerate}\itemsep=0pt\parsep=0pt
+\item the first character, obviously, is the backslash character \texttt{\char92};
+\item the next character is the name of the base character, one of the vowels a, e, h, i, o, u, w, or the consonant r, or one of the capitalised vowels I~or~U;
+\item the next optional character is the code for dieresis, or smooth, or rough spirit, with one of the letters d, s, r;
+\item the next character is the code for the circumflex, acute, or grave accent with one of the letters c, a, or g;
+\item the last optional character indicates iota subscript with the presence of an i;
+\item there are no glyph names for upper case letters, since they should never be marked with diacritics, except for the diaeresis over \textDidot{I} and~\textDidot{U} and for these glyphs adequate names are provided.
+\end{enumerate}
+
+This means that, for instance, \comando\asai\ stands for \textDidot{\asai}. For
+your convenience such macros are collected in table~\ref{t:compoundvowels}.
+Of course one can always resort to the accent--vowel
+combination as exemplified at the end of the previous section; the above
+example \textDidot{\asai} may be obtained also with \verb+\>'a|+ or \verb+\As{a}|+.%
+\footnote{Postfixed markings do not pose any problem with
+kernings and ligatures; this is why the postfixed ligature for the iota
+subscript may still be used also when the accent--vowel combinations are used.}
+
+\begin{table}[tb]\thrule\let\c\comando\let\l\textLipsias
+\def\V{\rule{0pt}{2.5ex}}\def\D{\rule[-1.2ex]{0pt}{2ex}}
+\makebox[\textwidth]{%
+\begin{tabular}{*6{lc}}
+\c\aa &\l\aa &\c\ag &\l\ag &\c\ac &\l\ac &\c\ai &\l\ai &\c\ar &\l\ar &\c\as &\l\as \\
+\c\asa &\l\asa &\c\asg &\l\asg &\c\asc &\l\asc &\c\asi &\l\asi &\c\aai &\l\aai \\
+\c\ara &\l\ara &\c\arg &\l\arg &\c\arc &\l\arc &\c\ari &\l\ari &\c\agi &\l\agi &\c\aci &\l\aci \\
+\c\arai &\l\arai&\c\argi&\l\argi&\c\arci&\l\arci&\c\asai&\l\asai&\c\asgi&\l\asgi&\c\asci&\l\asci\D\\
+\hline
+\c\ha &\l\ha &\c\hg &\l\hg &\c\hc &\l\hc &\c\hi &\l\hi &\c\hr &\l\hr &\c\hs &\l\hs \\
+\c\hsa &\l\hsa &\c\hsg &\l\hsg &\c\hsc &\l\hsc &\c\hsi &\l\hsi &\c\hai &\l\hai \\
+\c\hra &\l\hra &\c\hrg &\l\hrg &\c\hrc &\l\hrc &\c\hri &\l\hri &\c\hgi &\l\hgi &\c\hci &\l\hci \\
+\c\hrai &\l\hrai&\c\hrgi&\l\hrgi&\c\hrci&\l\hrci&\c\hsai&\l\hsai&\c\hsgi&\l\hsgi&\c\hsci&\l\hsci\D\\
+\hline
+\c\wa &\l\wa &\c\wg &\l\wg &\c\wc &\l\wc &\c\wi &\l\wi &\c\wr &\l\wr &\c\ws &\l\ws \\
+\c\wsa &\l\wsa &\c\wsg &\l\wsg &\c\wsc &\l\wsc &\c\wsi &\l\wsi &\c\wai &\l\wai \\
+\c\wra &\l\wra &\c\wrg &\l\wrg &\c\wrc &\l\wrc &\c\wri &\l\wri &\c\wgi &\l\wgi &\c\wci &\l\wci \\
+\c\wrai &\l\wrai&\c\wrgi&\l\wrgi&\c\wrci&\l\wrci&\c\wsai&\l\wsai&\c\wsgi&\l\wsgi&\c\wsci&\l\wsci\D\\
+\hline
+\c\ia &\l\ia &\c\ig &\l\ig &\c\ic &\l\ic &\c\ir &\l\ir &\c\is &\l\is \\
+\c\isa &\l\isa &\c\isg &\l\isg &\c\isc &\l\isc &\c\ida &\l\ida &\c\idg &\l\idg \\
+\c\ira &\l\ira &\c\irg &\l\irg &\c\irc &\l\irc &\c\idc &\l\idc &\c\id &\l\id &\c\Id &\l\Id \\
+\hline
+\c\ua &\l\ua &\c\ug &\l\ug &\c\uc &\l\uc &\c\ur &\l\ur &\c\us &\l\us \\
+\c\usa &\l\usa &\c\usg &\l\usg &\c\usc &\l\usc &\c\uda &\l\uda &\c\udg &\l\udg \\
+\c\ura &\l\ura &\c\urg &\l\urg &\c\urc &\l\urc &\c\udc &\l\udc &\c\ud &\l\ud &\c\Ud &\l\Ud \\
+\hline
+\c\ea &\l\ea &\c\eg &\l\eg &\c\er &\l\er &\c\es &\l\es \\
+\c\esa &\l\esa &\c\esg &\l\esg &\c\era &\l\era &\c\erg &\l\erg \\
+\hline
+\c\oa &\l\oa &\c{\`o}\ap{1,3} &\l{\`o} &\c{\<o}\ap{2,3}&\l{\<o} &\c\os &\l\os & \V\\
+\c\osa &\l\osa &\c\osg &\l\osg &\c\ora &\l\ora &\c\org &\l\org \\
+\hline
+\c\rs &\l\rs &\c\rr &\l\rr &\D \\
+\hline
+\end{tabular}%
+}
+\caption{Glyph name macros}\label{t:compoundvowels}
+\bigskip
+REMARKS\\[3pt]\footnotesize
+\mbox{\quad}\ap{1}Some users remarked that with previous \pack{teubner} versions \verb|\og| macro conflicted with the homonymous command available when typesetting French texts with the \texttt{french} option to \babel\ in force; for this reason it's necessary to use \verb|\`o| in its place.\par
+\mbox{\quad}\ap{2}As mentioned in the body of this text the command
+\comando{\or} is incompatible with the primitive \TeX\ command with the same name, therefore it is necessary to use \verb|\<o| in its place.\par
+\mbox{\quad}\ap{3}In both cases macros are unnecessary, specifically for \verb|\<o|, since an initial accented letter has no preceding letter whith whom some kerning might be necessary; therefore at the start of a word use \verb|'o| or \verb|<o|, and use \verb|\'o| in a word internal position, should some kerning be necessary; actually the shape of the omicron seldom requires any kerning.
+\bhrule
+\end{table}
+
+What I suggest is to typeset your paper with the regular accent
+vowel ligatures and to substitute them in the final revision with
+the extended accent macros or the glyph name macros only in those instances where the lack of kerning is disturbing. The extended accent macros should set forth less conflicts with other packages and should be the first choice when cleaning up the final revision. The glyph names will be kept in future releases of this package just for backwards compatibility. Up to now these glyph name macros are disabled by default but, if the option \emph{GlyphNames} is specified in the call statement to the \texttt{teubner.sty} package, they are turned on and become available.
+
+
+
+\section{Upper case initials and capitalised text}
+As we have seen in the previous sections the ligature and kerning mechanisms are strictly connected and the extended accent macros may be useful in solving certain situations. The suggestion at the end of the previous section holds true, but some remarks must be underlined in order to use at its best the coexistence of both methods for using the accented glyphs.
+
+The remarks concern the use of capital letters and, to a certain extent also the caps and small caps font shape. As mentioned before in Greek typography words with capital initials starting with a vowel require their diacritics in front and at the left of the initial capital vowel (for example:\textLipsias{>Aristot'elhs}) provided the vowel is not the first element of a Greek diphthong; in the latter case the diacritics go on top of the diphthong lower case second element (for example: \textLipsias{A>isq'ulos}). On the opposite, all-caps words, such as in book titles or, with certain \LaTeX\ classes, in the headings, are typeset without any diacritic, except the diaeresis.
+
+
+I have already shown the unusual example of the word \textLipsias{>'aulos} where the first two vowels do not form a diphthong, but a hiatus; and this is why the diacritics fall on top of the alpha, not on the second element of the diphthong, for the very reason that there is no diphthong. In order to stress this unusual situation the word is most often spelled as \textLipsias{>'a\"ulos}, where the dieresis is sort of redundant, because the diacritics over the alpha already denote the hiatus. Similarly \textLipsias{>a\"upn'ia} is spelled with the redundant dieresis, although the soft spirit on the alpha already marks the hiatus. When these words require a capital initial, they become \textLipsias{>'A\"ulos} and \textLipsias{>A\"upn'ia}.
+
+Notice that an initial single vowel may receive only a spirit marker with or without an accompanying accent, never a dieresis or a single accent\footnote{Of course we are talking of the polytonic spelling, since this package \texttt{teubner} sets this spelling as the default one; nobody forbids to spell in monotonic even when the polytonic spelling is assumed, but in some rare instances there might be some inconsistencies.}. I tried hard to set up all the ligature and extended accent macros so as to do the right things when capitalising or uppercasing, and if you follow the suggestions given in this section you should not meet any particular inconvenience.
+
+Assume these words have to go in an all-caps header that is made up (behind the scenes) by making use of the \verb|\MakeUppercase| command; they have to be spelled \textLipsias{A\"ULOS} and \textLipsias{A\"UPNIA}, even if in the sectioning command argument they were spelled in lowercase with all the necessary diacritics. %>>>>>
+
+This is where the ligature and/or the extended accent macros may show their different behaviour. With the \texttt{teubner} generated secondary \texttt{LGRaccents-glyphs\discretionary{}{.}{.}def} file, that contains all the extended accent macros, such macros do not disappear in uppercasing, i.e.\ in transforming the mixed case argument of the
+\verb|\MakeUppercase| command into an all-caps letter string. On the opposite the ligature sequences completely loose any reference to diacritics.
+
+
+In other words we have:
+\begin{flushleft}
+1) \verb|\MakeUppercase{>'aulos}| yields \textLipsias{\MakeUppercase{>'aulos}};\\
+2) \verb|\MakeUppercase{>'a"ulos}| yields \textLipsias{\MakeUppercase{>'a"ulos}};\\
+3) \verb|\MakeUppercase{>'a\"ulos}| yields \textLipsias{\MakeUppercase{>'a\"ulos}};\\
+4) \verb|\MakeUppercase{\>'a\"ulos}| yields \textLipsias{\MakeUppercase{\>'a\"ulos}};\\
+5) \verb|\MakeUppercase{\>\'a"ulos}| yields \textLipsias{\MakeUppercase{\>\'a\"ulos}};\\
+6) \verb*|\MakeUppercase{\asa\ud los}| yields \textLipsias{\MakeUppercase{\asa\ud los}}\\
+7) \verb|\MakeUppercase{e>uzw"'ia}| yields \textLipsias{\MakeUppercase{e>uzw"'ia}};\\
+8) \verb|\MakeUppercase{e>uzw'"ia}| yields \textLipsias{\MakeUppercase{e>uzw'"ia}};\\
+9) \verb|\MakeUppercase{e>uzw\"\'ia}| yields \textLipsias{\MakeUppercase{e>uzw\"\'ia}};\\
+10) \verb|\MakeUppercase{e>uzw\"ia}| yields \textLipsias{\MakeUppercase{e>uzw\"ia}}.%\\
+\end{flushleft}
+%
+and it's easily seen that: 1) corresponds to a non redundant lowercase correct spelling but misses the required dieresis in upper case; 2) is correct but it relies on a special kludge on which it's better not to rely on, because in future releases of the fonts it may be eliminated; meanwhile it is usable; 3) is correct; 4) is correct because \verb|\MakeUppercase| does not act on macros, but \verb|\>'| \emph{is} a macro, precisely an accent macro, that acts on the following letter before uppercasing, and the uppercase of an alpha with diacritics si simply the capital alpha; 5) is corret, but relies in the same kludge as case 2, so the same warnings apply; case 6) displays the result of using the accented glyph names which are not subject to capitalisation since they are given by means of macros; therefore they can never be used for words that are possibly subject to all-caps transformation.
+
+Let's examine another case where the lower case word has both the dieresis and an accent over the same vowel: \textLipsias{e>uzw"'ia}. Case 7) shows the effect of uppercasing when using ligatures, and the result is not correct because the dieresis does not fall over the capital iota, but between the capital omega end th capital iota; 8) by simply inverting the sequence of the dieresis and the acute accent a correct result is obtained, but kerning problems might take place because of the invisible presence of the lower cased acute accent; notice that the same result would be obtained if instead of the dieresis-vowel ligature the extended dieresis macro had been used; case 9) displays the situation when both extended accent macros are used so that the result does not suffer of any kerning problem; finally, case 10) displays a correct upper case result but the lower case counterpart would miss the acute accent.
+
+When using small caps or caps and small caps, in other words, when using the
+\verb|\scshape| declaration or the \verb|\textsc| command you should pay attention to other details; for example:
+\begin{flushleft}
+11) \verb|\textDidot{\scshape >Arqim'hdhs}| yields \textDidot{\scshape>Arqim'hdhs}\\
+12) \verb|\textDidot{\scshape \>Arqim'hdhs}| yields \textDidot{\scshape\>Arqim'hdhs}\\
+13) \verb|\textDidot{\scshape \>Arqim\'hdhs}| yields \textDidot{\scshape\>Arqim\'hdhs}\\
+14) \verb|\textDidot{\scshape >Arqim\'hdhs}| yields \textDidot{\scshape>Arqim\'hdhs}\\
+15) \verb|\textDidot{\scshape \>Arqim\ha dhs}| yields \textDidot{\scshape\>Arqim\ha dhs}\\
+16) \verb|\textDidot{\scshape \>{v}Arqim\'hdhs}| yields \textDidot{\scshape\>{v}Arqim\'hdhs}\\
+\end{flushleft}
+
+With caps and small caps a spirit, or a spirit-accent combination prefixed to a capital letter does not produce any mark; this is the usual modern Greek habit of avoiding accents with capital letters and the \verb|\scshape| specification to Greek fonts excludes all the ligatures and kernings with such signs; the same holds true also with small caps. The extended accent macros explicitly avoid any mark over capital letters, but even in front they are ``silenced'' by the very characteristics of the specific font shape. With small caps there is a similar situation, and the extended accent macros produce the expected result. But accents are apparently used in French also when proper names are typeset in caps and small caps, contrary to Greek, so that in French the spelling of case 16 is correct; for the initial spirit, therefore it is necessary to resort to the invisible character obtained with the Latin letter `v', that is uppercased to itself and is suitable for supporting any diacritic mark at the proper height. Julien Browaeys pointed out this specific typesetting French tradition; I thank him very much for his feedback on this point.
+
+Conclusion: when writing the input code for a sectioning command, the argument of which has to be transformed to upper case, use \verb|\"| (in the proper sequence with other accents) for the internal diereses, as in cases 3), 4), 8), and 9) above. With the extended accent macros there are really few problems; the remaining ones take place in complete uppercasing remain with French traditions in caps and small caps that can be easily handled through the use of the \texttt{v} special invisible glyph. If you want to avoid also this possibility, then either avoid classes that typeset their headings in all-caps, or use any external package that defines sectioning commands with two optional arguments, one for the heading contents and the other for the table of contents; or use equivalent tricks: for example the \texttt{memoir} class has a specific command \verb|\nouppercaseheads| that eliminates any heading uppercasing.
+
+\section{Other Greek symbols}
+Other Greek symbols may be obtained with ligatures or explicit
+commands; table~\ref{t:gsymbols} contains such ligatures and
+symbols; notice that some of these are specific additions
+introduced with this extension package.
+
+\begin{table}\thrule\let\c\comando\let\l\textDidot
+\makebox[\textwidth]{%
+\begin{tabular}{lclclc}
+\c{''} &\l{''} &\c{((} &\l{((} &\c{))} &\l{))} \\
+\c\GEodq &\l\GEodq &\c\GEcdq &\l\GEcdq &\c: &\l: \\
+\c\GEoq &\l\GEoq &\c\GEcq &\l\GEcq &\c? &\l? \\
+\c\ENodq &\l\ENodq &\c\ENcdq &\l\ENcdq &\c; &\l; \\
+\c\stigma &\l\stigma &\c\varstigma&\l\varstigma&\c\Stigma&\l\Stigma\\
+\c\coppa &\l\coppa &\c\koppa &\l\koppa &\c\Koppa &\l\Koppa\\
+\c\sampi &\l\sampi &\c\Sampi &\l\Sampi &\c\permill &\l\permill\\
+\c\textdigamma &\l\textdigamma &\c\Digamma &\l\Digamma &\c\euro &\l\euro\\
+\c\f &\l\f &\c\F &\l\F &\c\shwa &\l\shwa\\
+\end{tabular}%
+}
+\caption{Greek and other symbols}\label{t:gsymbols}
+\bhrule
+\end{table}
+
+I draw your attention on the necessity of using the ligature
+\comando{''} for producing the simple apostrophe, which, by the
+way, in Greek typography must always be followed by a space. The
+single tick mark \comando'\ produces an acute accent, not an
+apostrophe, this is why it is necessary to use the double tick
+mark ligature. Actually also a double quote mark \verb+"+ followed by a space produces an apostrophe followed by a space.
+
+\section{Milesian and Attic numerals}
+
+The Milesian numerals should not worry anybody, because they are seldom used as
+isolated symbols; the \textsf{greek} or \textsf{polutonikogreek} language option or the \textsf{polutoniko} attribute of the Greek language with the \babel\ package offer the commands \comando\greeknumeral\ and
+\comando\Greeknumeral, that convert common arabic positive numbers in the
+Milesian counterparts within a Greek section of your document; the
+corresponding commands followed by an asterisk change the digamma glyph with
+the stigma one\footnote{The stigma version is the standard one with the
+\babel\ language support for Greek; with this package we
+adopted the digamma as the ``regular'' sign with the value of~6, and attributed
+stigma to the ``variant'', archaic representation of Milesian numbers. Here the archaic qoppa sign is used for the value 90; compare the archaic sign \textDidot{\coppa} with the modern one \textDidot{\koppa}.}:
+\begin{quote}\obeylines
+if you type \verb"\greeknumeral{1996}" you get \textLipsias{\greeknumeral{1996}}
+if you type \verb"\Greeknumeral{1996}" you get \textLipsias{\Greeknumeral{1996}}
+if you type \verb"\greeknumeral*{1996}" you get \textLipsias{\greeknumeral*{1996}}
+if you type \verb"\Greeknumeral*{1996}" you get \textLipsias{\Greeknumeral*{1996}}
+if you type \verb+\greeknumeral{123456}+ you get \textLipsias{\greeknumeral{123456}}
+if you type \verb+\greeknumeral{234567}+ you get \textLipsias{\greeknumeral{234567}}
+This was typeset on \begin{otherlanguage}{greek}\grtoday, \end{otherlanguage} which is \today.
+\end{quote}
+
+The \textsf{teubner} package offers also the possibility of typesetting the Attic numerals, without the need of loading Apostolos Syropoulos' \textsf{athnum} package; the functionality is the same, although the code is different; in order to avoid clashes, the \textsf{teubner} command for transforming Arabic numerals into Attic ones is \comando\AtticNumeral. As for the original macro, the maximum value that can be transformed is 99\,999, while, of course, no vanishing or negative numbers can be transformed:
+\begin{quote}\obeylines
+if you type \verb|\AtticNumeral{2015}| you get \textLipsias{\AtticNumeral{2015}}
+if you type \verb|\AtticNumeral{1999}| you get \textLipsias{\AtticNumeral{1999}}
+if you type \verb|\AtticNumeral{55555}| you get \textLipsias{\AtticNumeral{55555}}
+\end{quote}
+
+\section{New commands}
+This extension package introduces many new commands for
+typesetting Greek in a philological way. Most such commands are collected in table~\ref{t:extcomandi}.
+
+A short remark on the command \comando\ap: this useful command inserts
+\emph{anything} as a superscript of anything else; it works both in text mode
+and in math mode\footnote{Numerical superscripts or apices do not require math
+mode; numerical footnote labels are automatically inserted by \LaTeX's
+\comando\footnote\ command; non numerical footnote labels are easily inserted
+with \LaTeX's \comando\footnotemark\ and \comando\footnotetext\ commands with
+their optional arguments.}. In particular while typesetting a philological text
+in different languages and with different alphabets, \comando\ap\ typesets the
+superscript with the current language and alphabet; if any change is required,
+the \comando\ap's argument can contain any language or alphabet specific
+declaration. You can typeset something such as \textLipsias{Baq\'ulides\,\ap{\textlatin{a}}} by switching language and alphabet as required; the specific declarations and the commands contained in table~\ref{t:extcomandi} come handy also in these cases.
+
+
+\begin{table}[!p]\thrule%\centering
+\let\c\comando
+\resizebox*{\textwidth}{!}{\footnotesize
+\begin{tabular}{cl|cl}
+Example & Syntax &Example & Syntax \\[3pt]
+\l{Baq\'ulides} & (declaration) &abcde & (declaration) \\
+\l{Baq\'ulides} & \c\textLipsias\ARG{text} &\l{\lesp{abg}} &\c\lesp\ARG{text} \\
+\g{Baq\'ulides} &\c\textDidot\ARG{text} &\LitNil &\c\LitNil \\
+text & \c\textlatin\ARG{text} &\cap{g} &\c{\cap}\ARG{letter}\ap{($a$)} \\
+\l\frapar{Baq\'ulides} & \c\frapar\ARG{text} &\Coronis &\c\Coronis \\
+( & \c\lpar &\lmqi &\c\lmqi \\
+) &\c\rpar &\rmqi &\c\rmqi \\
+\qmark &\c\qmark &\l{\mqi{abg}} &\c\mqi\ARG{text} \\
+\l{\Dots[3]} &\c\Dots\opt{number} &\lmqs &\c\lmqs \\
+\l{\DOTS[3]} &\c\DOTS\opt{number} &\rmqs &\c\rmqs \\
+\l{\Dashes[3]} &\c\Dashes\opt{number} &\l{\mqs{abg}} &\c\mqs\ARG{text} \\
+\l{\DASHES[3]} &\c\DASHES\opt{number} &\l{\zeugma{abg}} &\c\zeugma\ARG{text} \\
+\l\slzeugma{ba} &\c\slzeugm\ARG{two letters} &\l\rszeugma{ab} &\c\rszeugma\ARG{two letters} \\
+\ap{foo} &\c\ap\ARG{text} &\l{\siniz{abg}} &\c\siniz\ARG{text} \\
+\sinafia &\c\sinafia &\paragr &\c\paragr \\
+\l{\:} &\c\: &\dparagr &\c\dparagr \\
+\l\; &\c\; &\FinisCarmen &\c\FinisCarmen \\
+\l\? &\c\? &\crux &\c\crux \\
+\Lipsiakostext\mutpers &\c\antilabe &\l\apici{abg} &\c\apici\ARG{text} \\
+\| &\c\| &\apex &\c\apex \\
+\dBar &\c\dBar &\responsio &\c\responsio \\
+\tBar &\c\tBar &\Int &\c\Int \\
+\lbrk &\c\lbrk &\l{\star a} &\c\star \\
+\rbrk &\c\rbrk &\l{\dstar a} &\c\dstar \\
+\l{\ladd{abg}} &\c\ladd\ARG{text} &\l{\tstar a} &\c\tstar \\
+\l{\lladd{abg}} &\c\lladd\ARG{text} &\l{\|\|\quad\|\,\|} &\c\, \\
+\l{\Ladd{abg}} &\c\Ladd\ARG{text} &\l{\|\|\quad\|\!\|} &\c\! \\
+\l{\LLadd{abg}} &\c\LLadd\ARG{text} &\OSN{0123456789} &\c\OSN\ARG{digits} \\
+\l{\nexus{abgdezh}} &\c\nexus\ARG{text} &\kclick &\c\kclick\\
+\Utie{AB} &\c\Utie\ARG{2 letters} &\l{a\h b} &\c\h \\
+\l{a\yod b} &\c\yod &\l{a\shwa b} &\c\shwa \\
+\l{a\q b} &\c\q &\l{A\F B} &\c\F \\
+\l{a\f b} &\c\f &\semiv{i} &\c\semiv\ARG{letter} \\
+\hv &\c\skewstack\ARG{base}\ARG{apex}&\md{e} &\c\md\ARG{letter} \\
+\Ud{e} &\c\Ud\ARG{letter} &\mO{e} &\c\mO\ARG{letter} \\
+\UO{e} &\c\UO\ARG{letter} &\Open{e} &\c\Open\ARG{letter} \\
+\nasal{e} &\c\nasal\ARG{letter} &\cut{d} &\c\cut\ARG{b\|d\|g} \\
+\dracma &\c\dracma &\denarius &\c\denarius \\
+\stater &\c\stater &\etos &\c\etos \\
+\hemiobelion &\c\hemiobelion &\tetartemorion &\c\tetartemorion \\
+\splus &\c\splus &\stimes &\c\stimes
+\end{tabular}%
+}
+\bhrule\smallskip
+
+{\footnotesize\mbox{\ap{($a$)}\enspace}Ansten M\o rch Klev spotted a conflict
+with the homonymous math command; this is now resolved. Thank you Ansten.\par}
+\caption{Extended commands}\label{t:extcomandi}
+\end{table}
+
+
+\section{Metrics}
+Philological writings often require the description of metrics;
+for this purpose a new font has been developed that contains most
+of the frequent metric signs; the corresponding macros have been
+defined so as to set the metric glyphs as if they were text; but,
+most important, a new definition command has been introduced so
+as to enable to declare new control sequences to represent
+complete metric feet or even complete verse metrics.
+
+The metric glyph names are collected in table~\ref{t:metrics},
+while the declaration command is described hereafter.
+
+The syntax for that definition command is similar to that of
+{\comando\newcommand};
+\[
+\hbox{\comando\newmetrics\ARG{name}\ARG{definition}}
+\]
+where \Arg{name} is a control sequence name made up of letters
+(as usual with \LaTeX) with the exception that it may start with
+one of the digits 2, or 3, or 4. Of course the \Arg{definition}
+must reflect the replication by 2, or 3, or 4 times; moreover if the
+\Arg{name} starts with a digit, when it is used
+\emph{it must be followed by a space}. Some examples follow:
+\begin{quote}\let\c\comando\obeylines%
+\c\newmetrics\brArg{\c\iam}\brArg{\c\barbrevis\c\longa\c\brevis\c\longa}
+\c\newmetrics\brArg{\c{\2iam}}\brArg{\c\iam\c\iam}
+\c\newmetrics\brArg{\c{\4MACRO}}\brArg{\c\longa\c\longa\c\longa\c\longa}
+\end{quote}
+The above definitions produce the following results (notice the space
+before the colon):
+\begin{quote}\let\c\comando\obeylines%
+\verb*|\iam|: \iam
+\verb*|\2iam |: \iam\iam
+\verb*|\4MACRO |: \4MACRO \
+\end{quote}
+The definitions may contain also some symbols collected in
+table~\ref{t:extcomandi}, such as \dBar, for example, and other
+symbols from the other tables.
+
+\afterpage{\clearpage
+\begin{table}[!tb]\thrule\let\c\comando\small
+\tabcolsep=4pt
+\makebox[\textwidth]{%
+\begin{tabular}{llll}
+Command & Metric symbol & Command & Metric symbol \\[3pt]
+\c\longa & \longa &\c\brevis & \brevis \\
+\c\bbrevis & \bbrevis &\c\barbrevis & \barbrevis \\
+\c\ubarbrevis & \ubarbrevis &\c\ubarbbrevis & \ubarbbrevis \\
+\c\ubarsbrevis & \ubarsbrevis &\c\coronainv & \coronainv \\
+\c\corona & \corona & \c\ElemInd & \ElemInd \\
+\c\catal & \catal &\c\ipercatal & \ipercatal \\
+\c\anceps & \anceps &\c\banceps & \banceps \\
+\c\ancepsdbrevis& \ancepsdbrevis &\c\hiatus\ap{1}& \hiatus \\
+\c\iam\ap{2} & \iam &\c\chor & \chor \\
+\c\enopl & \enopl &\c{\4MACRO} & \4MACRO \ \\
+\c\aeolchorsor & \aeolchorsor &\c\hexam & \hexam \\
+\c{\2tr} & \2tr \ &\c\pentam & \pentam \\
+\c\ubrevislonga & \ubrevislonga &\c\aeolicbii & \aeolicbii \\
+\c\aeolicbiii & \aeolicbiii &\c\aeolicbiv & \aeolicbiv\ap{3} \\
+\end{tabular}%
+}
+\caption{Metric symbols}\label{t:metrics}
+\bigskip
+\footnotesize
+REMARKS\\[3pt]
+\ap{1}\quad A similar command \c\Hiatus\ produces the same
+visible result as \c\hiatus, except for the fact that it does not
+occupy horizontal space; it is useful in the definitions of full
+verse metrics where a hiatus needs to be inserted between two
+consecutive metric symbols; for example: \longa\Hiatus\longa\,.\\
+\ap{2}\quad This extension package predefines some examples
+of metric feet and complete verses.\\
+\ap{3}\quad Sometimes it might be convenient to use a shortcut
+for inserting the Aeolic bases
+by inputting \texttt{I} or
+\texttt{II} or
+\texttt{III}, while the \texttt{\string\metricsfont} declaration is in force, in order to get
+\aeolicbii\ or \aeolicbiii\ or \aeolicbiv.
+\bhrule
+\end{table}}
+
+Another important metric command is the following:
+\[
+\hbox{\comando\metricstack\ARG{base}\ARG{superscript}}
+\]
+which is meant for superimposing some superscript (generally a
+number) over some metric symbol, which may be a single symbol or a
+metric foot, such as~\smash{\metricstack{\longa\brevis\brevis}{48}}; since
+the superscript gets printed in math mode, the
+superscript hiatus \hiatus\ may be obtained with \comando\Hiatus\
+when it falls between two metric symbols, but must be well
+described as a math roman element when it is superscripted over
+something else; similarly any other superscript which is not a
+math symbol must be suitably set as a math roman object.
+
+The environment for setting metric sequences grouped with braces
+is described in the next section, since it is generally used within
+the composition of verses.
+
+\section{Poetry environments}
+In order to set poetry it is always possible to use the
+standard \LaTeX\ \texttt{verse} environment; nevertheless such
+simple environment is not suited for philological purposes, except
+perhaps for very short citations. This extension package contains
+three new environments with various levels of complexity. Due to
+their relative complexity an example will be given for each one
+with both the input code and the corresponding result. All three
+environments require that any language change be declared before
+their opening statement, otherwise the language change lasts only
+to the end of the verse. It's worth noting that if you feel uncomfortable with Italian names for verses, you can use the Latin aliases, \texttt{versus}, \texttt{Versus}, and \texttt{VERSUS}.
+
+\begin{description}
+\item[\texttt{versi}] This environment does not actually set each
+verse on a separate line; it rather resembles an in-line list; it
+resorts to a command \comando\verso\ that inserts a small vertical
+separator with a progressive number over it. Both the environment
+opening and the command \comando\verso\ accept arguments
+according to the following syntax:
+ \begin{quote}\let\c\comando\obeylines
+ \c\begin\brArg{versi}\ARG{label}
+ \Arg{verses}
+ \c\end\brArg{versi}
+ \null\
+ \c\verso\opt{number}
+ \end{quote}
+where \Arg{label} is a short text (let's say not more than 15
+characters) indicating for example the poem title and the stanza
+number; the whole set of verses will be typeset with a left margin
+wide enough to contain \Arg{label}; the optional argument
+\Arg{number} indicates the starting value for the verse
+enumeration; the default value is~1, but if it is specified, it is
+required only with the first occurrence of \comando\verso\ or when
+the enumeration is restarted. In this environment the standard
+\LaTeX\ command \comando{\\} behaves normally as in regular text.
+\begin{verbatim}
+\begin{versi}{Meropis fr. 3}
+>'enj'' <o m`en e\ladd{>isplh} \verso[68] j`un
+Mer'opwn k'ien. <h \ladd{d`e dia} \verso pr`o\\
+a>iqem\hc i sj~htos \ladd{>'elassen.}
+\verso <`o d'' >ex'equt''; o>u
+g`ar \ladd{<omo~iai}\\
+\ladd{>a} \verso j'anatai jnhta~isi bol\ladd{a`i kat`a}
+\verso ga~ian >'asin.\\
+prh\lladd{m}n\ladd{~hs d\dots} \verso thse. m'elas d`e
+perie.\ladd{\dots}\verso rw
+\end{versi}
+\end{verbatim}
+
+\begin{Lipsiakostext}
+\begin{versus}{\textlatin{Meropis fr. 3}}
+>'enj'' <o m`en e\ladd{>isplh} \verso[68] j`un
+Mer'opwn k'ien. <h \ladd{d`e dia} \verso pr`o\\
+a>iqem\hc i sj~htos \ladd{>'elassen.} \verso <`o d'' >ex'equt'';
+o>u
+g`ar \ladd{<omo~iai}\\
+\ladd{>a} \verso j'anatai jnhta~isi bol\ladd{a`i kat`a}
+\verso ga~ian >'asin.\\
+prh\lladd{m}n\ladd{~hs d\dots} \verso thse. m'elas d`e perie.\ladd{\dots}\verso
+rw
+\end{versus}
+\end{Lipsiakostext}
+
+Since each verse in this environment is not on a single line, unless it's deliberately specified, this environment may be used also for prose whose sentences are numbered as, for example, biblical versicles:
+\begin{Lipsiakostext}
+\begin{versi}{\textlatin{Mt: 6,8--6,13}}
+\verso[8]\textDidot{m`h o>~un <omoiwj~hte a\>uto~is; o~>iden g`ar <o pat`hr <um~wn <~wn qre'ian >'eqete pr`o to~u <um~as a>it~hsai a\>ut'on. \verso o<'utws o>~un prose'uqesje
+<ume~is;}\\[1ex]
+P'ater <hm~wn <o >en to~is o>urano~is;\\
+<agisj'htw t`o >'onom'a sou; \\
+\verso
+>elj'etw <h basile'ia sou;\\
+genhj'htw t`o j'elhm'a sou,\\
+<ws >en o>uran~w| ka`i >ep`i g~hs;\\
+\verso
+t`on >'arton <hm~wn t`on >epio'usion d`os <hm~in s'hmeron;\\
+\verso
+ka`i >'afes <hm~in t`a >ofeil'hmata <hm~wn,\\
+<ws ka`i <hme~is >af'hramen to~is >ofeil'etais <hm~wn;\\
+\verso
+ka`i m`h e>isen'egkhis <hm~as e>is peirasm'on,\\
+>all`a <r~usai <hm~as >ap`o to~u ponhro~u,\\
+>'oti sou >'estin <h basile'ia ka`i <h d'unamis ka`i <h d'oxa\\
+>'eis to`us a>i~wnas; >am'hn.
+\end{versi}
+\end{Lipsiakostext}
+
+\item[\texttt{Versi}] This environment is very similar to the
+standard \LaTeX\ environment \texttt{verse}; the difference is
+that \texttt{Versi} automatically enumerates the verses
+(displaying only verse numbers that are multiples of 5) with a
+number in the left margin. The syntax is as follows:
+ \begin{quote}\let\c\comando\obeylines
+ \c\begin\brArg{Versi}\opt{number}
+ \Arg{verses}
+ \c\end\brArg{Versi}
+ \end{quote}
+where \Arg{number} is the starting value of the verse enumeration;
+of course each verse is separated from the next one with the usual
+command \comando{\\}, which has been redefined so that it just
+divides the verses and provides to the possible display of the
+verse number; it accepts the optional information that the
+standard \LaTeX\ command usually accepts, both the asterisk and
+the vertical space amount.
+
+
+
+\begin{verbatim}
+\begin{Versi}[45]
+ta; pr'osje qeir~wn b'ian\\
+\paragr de\ladd{'i}xomen;
+t`a d" >epi'onta da\ladd{'imo}n srine~i.---\\
+t'os" e>'ipen >ar'etaikmos <'hrws;\\
+t{\rbrk}'afon d`e naub'atai\\
+f{\rbrk}wt`os <uper'afanon\\[1ex]
+j{\rbrk}'arsos; <Al'iou te gambr~wi q'olwsen >~htor
+\end{Versi}
+\end{verbatim}
+
+\begin{Lipsiakostext}
+\begin{Versi}[45]
+ta; pr'osje qeir~wn b'ian\\
+\paragr de\ladd{'i}xomen;
+t`a d" >epi'onta da\ladd{'imo}n srine~i.---\\
+t'os" e>'ipen >ar'etaikmos <'hrws;\\
+t{\rbrk}'afon d`e naub'atai\\
+f{\rbrk}wt`os <uper'afanon\\[1ex]
+j{\rbrk}'arsos; <Al'iou te gambr~wi q'olwsen >~htor
+\end{Versi}
+\end{Lipsiakostext}
+
+\item[\texttt{VERSI}] This third poetry environment behaves
+similarly to \texttt{Versi} but it displays a double verse
+enumeration in the left margin. The principal verse enumeration
+is displayed when the value is a multiple of 5; the second
+enumeration, just to the left of the verses, may be turned on and
+off; when the secondary enumeration is on, the verses are flush
+left, while when it is off the verses are suitably indented. The
+turning on and off of the secondary enumeration is achieved by
+means of the commands \comando\SubVerso\ and \comando\NoSubVerso;
+the syntax is as follows:
+ \begin{quote}\let\c\comando\obeylines
+ \c\begin\brArg{VERSI}\opt{outer number}
+ \Arg{verses}
+ \c\end\brArg{VERSI}
+ \null{}
+ \c\SubVerso\opt{inner number}
+ \c\NoSubVerso{}
+ \end{quote}
+where \Arg{outer number} is the starting value of the primary
+verse enumeration, while \Arg{inner number} is the starting value
+of the secondary enumeration. The commands \comando\SubVerso\ and
+\comando\NoSubVerso\ must be input at the very beginning of the
+verse they should be applicable to. The command \comando{\\} behaves
+as in \LaTeX, and accepts the usual optional arguments.
+
+With the environments \texttt{Versi} and \texttt{VERSI}, when typesetting in two
+column format, you have the possibility of specifying \comando\BreakVersitrue\
+(and of course \comando\BreakVersifalse) for allowing (or disallowing) line
+breaks of verses; broken verses are continued on the next line with a
+generous indentation so as to recognize them as belonging to the same verse;
+the verse counter is not incremented when breaking verses across lines.
+
+
+\begin{verbatim}
+\begin{VERSI}[40]
+k'elomai pol\ua stonon\\
+\SubVerso[18]
+>er'uken <'ub\apex rin; o>u g`ar >`an j'eloi-\\
+\NoSubVerso
+m'' >'ambroton >erann`on >Ao\lbrk ~us\\
+\SubVerso
+>ide~in f'aos, >epe'i tin'' >h"ij\siniz{'e\lbrk w}n\\
+s`u dam'aseias >a'ekon-\\
+\NoSubVerso
+ta; pr'osje qeir~wn b'ian\\
+\SubVerso
+\paragr de\ladd{'i}xomen;
+t`a d'' >epi'onta da\ladd{'imw}n krine~i.\GEcdq\\
+\SubVerso[1]
+t'os'' e>~ipen >ar'etaiqmos <'hrws;\\
+t\rbrk 'afon d`e na\ua batai\\
+f\rbrk wt`os <uper'afanon\\
+j\rbrk 'arsos;\Dots[4]
+\end{VERSI}
+\end{verbatim}
+
+\Lipsiakostext
+\begin{VERSI}[40]
+k'elomai pol\ua stonon\\
+\SubVerso[18]
+>er'uken <'ub\apex rin; o>u g`ar >`an j'eloi-\\
+\NoSubVerso
+m'' >'ambroton >erann`on >Ao\lbrk ~us\\
+\SubVerso
+>ide~in f'aos, >epe'i tin'' >h"ij\siniz{'e\lbrk w}n\\
+s`u dam'aseias >a'ekon-\\
+\NoSubVerso
+ta; pr'osje qeir~wn b'ian\\
+\SubVerso
+\coronis de\ladd{'i}xomen; t`a d'' >epi'onta da\ladd{'imw}n krine~i.\GEcdq\\
+\SubVerso[1]
+t'os'' e>~ipen >ar'etaiqmos <'hrws;\\
+t\rbrk 'afon d`e na\ua batai\\
+f\rbrk wt`os <uper'afanon\\
+j\rbrk 'arsos;\Dots[4]
+\end{VERSI}%}
+\NoLipsiakostext
+
+\item[\texttt{bracedmetrics}] This is an environment different
+from the preceding ones, although it always deals with verses.
+Its purpose is to set the verse metric lines grouped with a right
+brace, so as to show the variants of a certain metric scheme.
+
+In order to align the metric variants and in order to place the
+right brace in the proper place it is necessary to fix specific
+lengths in terms of a unit that is compatible with the metric
+symbols; therefore the syntax of such spacing command and of the
+environment itself is the following
+ \begin{quote}\let\c\comando\obeylines
+ \c\begin\brArg{bracedmetrics}\ARG{length}
+ \Arg{metric lines}
+ \c\end\brArg{bracedmetrics}
+ \null
+ \c\verseskip\ARG{number}
+ \end{quote}
+where \Arg{number} specifies the number of metric symbols the
+\comando\verseskip\ should be equivalent to. Approximately the
+\comando\verseskip\ will be as long as a sequence of \Arg{number}
+long syllables; the \Arg{length} specified as the width of the
+environment should equal the longest metric line contained in the
+block, and should be specified by means of the
+\comando\verseskip\ command with its argument; but since the
+metric symbols are not all of the same length, it is wise to
+count the symbols of the longest metric line and to add a couple
+of units; after producing the first draft it is possible to review
+the number specified as the argument of \comando\verseskip. Of
+course the same \comando\verseskip\ command may be used to align
+the various fragments of metric lines within the environment.
+Examine the following example of input code:
+\begin{verbatim}
+\begin{verse}
+ \brevis\svert\longa\brevis\brevis\longa
+ \brevis\brevis\longa\svert\longa\\
+ \begin{bracedmetrics}{\verseskip{13}}
+ \Hfill \brevis\svert\longa\brevis\longa
+ \svert\longa\\
+ \longa\brevis\brevis\longa\brevis\brevis
+ \zeugma{\longa\svert\longa}\\
+ \Hfill\longa\brevis\longa\svert\longa
+ \verseskip{2}\\
+ \Hfill\longa\brevis\longa\dBar
+ \end{bracedmetrics}\\
+ \begin{bracedmetrics}{\longa\brevis\brevis\longa
+ \brevis\brevis\longa\svert\longa}
+ \longa\brevis\brevis\longa\brevis\brevis
+ \longa\svert\longa\\
+ \longa\brevis\brevis\longa\brevis\brevis\longa
+ \end{bracedmetrics}\\
+\verseskip{7}\brevis\brevis\longa\svert\ubarbrevis\tBar
+\end{verse}
+\end{verbatim}
+which produces:
+\begin{verse}
+ \brevis\svert\longa\brevis\brevis\longa
+ \brevis\brevis\longa\svert\longa\\
+ \begin{bracedmetrics}{\verseskip{13}}
+ \Hfill \brevis\svert\longa\brevis\longa\svert\longa\\
+ \longa\brevis\brevis\longa\brevis\brevis
+ \zeugma{\longa\svert\longa}\\
+ \Hfill\longa\brevis\longa\svert\longa\verseskip{2}\\
+ \Hfill\longa\brevis\longa\dBar
+ \end{bracedmetrics}\\
+ \begin{bracedmetrics}{\longa\brevis\brevis\longa
+ \brevis\brevis\longa\svert\longa}
+ \longa\brevis\brevis\longa\brevis\brevis\longa\svert\longa\\
+ \longa\brevis\brevis\longa\brevis\brevis\longa
+ \end{bracedmetrics}\\
+\verseskip{7}\brevis\brevis\longa\svert\ubarbrevis\tBar
+\end{verse}%
+
+
+\end{description}
+
+\section*{Acknowledgements}
+This project was initially carried on with the help of Mr Paolo Ciacchi when he was writing his ancient Greek philology ``master thesis''. After he got his ``master's'' degree at the University of Trieste, I continued by myself, but I remain really indebted to Mr~Ciacchi.
+
+
+\end{document}
diff --git a/macros/latex/contrib/teubner/teubner.dtx b/macros/latex/contrib/teubner/teubner.dtx
new file mode 100644
index 0000000000..f7b457ada7
--- /dev/null
+++ b/macros/latex/contrib/teubner/teubner.dtx
@@ -0,0 +1,3613 @@
+% \iffalse meta comment
+%<*internal>
+\begingroup
+\input docstrip.tex
+\keepsilent
+\preamble
+Copyright 2001--2015 Claudio Beccari All rights reserved.
+
+ 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.
+
+This file is distributed under the LPPL licence, version 1.3c
+dated 2008-05-04 or later as it appears in
+CTAN/macros/latex/base/lppl.tex.
+See the end of the file.
+
+IMPORTANT NOTICE:
+
+You are allowed to distribute this file under the conditions that are
+specified in the source file teubner.dtx.
+
+If you receive only some of these files from someone, complain!
+
+You are NOT ALLOWED to distribute this file alone.
+You are NOT ALLOWED to take money for the distribution or use
+of either this file or a changed version, except for a nominal
+charge for copying, etc.
+\endpreamble
+\postamble
+ It may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either version 1.3
+ of this license or (at your option) any later version.
+ The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+\endpostamble
+\askforoverwritefalse
+
+\generateFile{teubner.sty}{f}{\from{teubner.dtx}{package}}
+\generateFile{teubnertx.sty}{f}{\from{teubner.dtx}{tbtx}}
+
+\def\tmpa{plain}
+\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
+\endgroup
+%</internal>
+% \fi
+%
+% \iffalse
+%^^A The following trick uses the same date for every file header.
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<*driver>
+\ProvidesFile{teubner.dtx}[%
+%</driver>
+%<package>\ProvidesPackage{teubner}[%
+%<tbtx>\ProvidesPackage{teubnertx}[%
+%<*driver,package,tbtx>
+2016/03/31 v.4.8
+%<package>Extensions for Greek philology]
+%<tbtx>Access to the LGR encoded Greek fonts that match the TX fonts]
+%</driver,package,tbtx>
+%<*driver>
+]
+%</driver>
+%<*driver>
+\documentclass{ltxdoc}
+\GetFileInfo{teubner.dtx}
+\title{The \textsf{teubner} package\\
+ Extensions for Greek philology}
+ \author{Claudio Beccari --- \texttt{claudio dot beccari at gmail dot com}}
+ \date{Version \fileversion\ last revised \filedate}
+ \providecommand\babel{\pack{babel}}
+ \newcommand\lbr{\char123\relax}\newcommand\rbr{\char125\relax}
+ \newenvironment{sintassi}{%
+ \begin{quote}\parskip0pt\hfuzz10pt\ttfamily\obeylines
+ }{%
+ \end{quote}\ignorespaces
+ }
+ \renewcommand*\meta[1]{{\normalfont\textlangle\textit{#1}\textrangle}}
+ \newcommand*\pack[1]{\textsf{#1}}
+ \newcommand*\acro[1]{\expandafter\textsc\expandafter{\MakeLowercase{#1}}}
+ \usepackage{multicol}
+\usepackage[T1]{fontenc}
+\usepackage{lmodern,textcomp}
+\begin{document}
+ \maketitle
+ \DocInput{teubner.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{4368}
+% \begin{multicols}{2}\tableofcontents\end{multicols}
+%
+%
+% \begin{abstract}
+% This extension package complements the greek option of the \babel\
+% package so as to enable the use of the Lipsian\footnote{What here
+% are called Lipsian fonts are a family of fonts that in Greece are
+% called ``Lipsiakos''; they are similar to the ones that were being
+% used in the Teubner Printing Company of Lipsia from mid XIX century on.}
+% fonts and to use several macros for inserting special annotations
+% in the written text, as well as to typeset verses with special
+% layout. Metric sequences may be defined and typeset by means of a
+% companion font \texttt{gmtr????} that follows the same conventions
+% as the CB fonts that are normally used when the \babel\ |greek|
+% option is in force.
+%
+% Examples and lists of commands are available in the file
+% \texttt{teubner-doc.pdf} which, as a regular pdf file, embeds all
+% the necessary fonts and may be read on screen as well as printed on paper;
+% beware, though, that the PostScript fonts that are being used
+% in \texttt{teubner-doc.pdf} are not installed by default if a basic
+% installation is sought.
+%
+% This version 4.0 tries to adapt to the new handling of the Greek language
+% by \babel, since now this language script is based on the
+% LICR (\LaTeX\ Internal Character Representation), and source files now can
+% include Greek glyphs, besides the usual transliteration with Latin letters.
+% \end{abstract}
+%
+% \section{Introduction}
+% Philologists in general have the necessity of using special
+% alphabets and several special symbols in order to mark up their
+% texts and to typeset them in a special way. Greek philology makes
+% no exception, therefore I prepared this file and some extra fonts
+% in order to complement what is already available with the |greek|
+% option of the \babel\ package.
+%
+% I must warmly thank Paolo Ciacchi of the University of Trieste who
+% invited me in this ``adventure'', since I know nothing about
+% philology; he assisted me with all his competence, so that I
+% could learn so many new things and I could appreciate the world of
+% philologists.
+%
+% Paolo Ciacchi's ``invitation'' arrived when I was almost finished
+% with the design of the Lipsian font family; I was working on this new
+% typeface after a kind request by Dimitri Filippou, with whom I
+% already collaborated for other questions related to Greek
+% typesetting. I warmly thank also Dimitri Filippou for the
+% patience with which he revised every single glyph of the new
+% typeface. Paolo Ciacchi added his constructive criticism to the
+% typeface, especially for what concerns diacritical marks. At the
+% end I think that the new typeface turned out pretty well thanks to
+% both my friends.
+%
+% The Lipsian font, also called Leipzig, or Lipsiakos in Greece, is one of the
+% oblique fonts that used to be employed by the typesetters working in the
+% German city of Leipzig, among which the Teubner Printing Company.
+% This Company's classical works of ancient Greek poetry are considered among
+% the best ever published. The name of this file and this extension
+% package is in honour of that printing company.
+%
+% This package documentation does not contain any example written in
+% Greek, because when you process this file it is very likely that
+% you don't have the suitable Greek fonts and you must still download
+% all or some of them. Therefore a companion file \texttt{teubner-doc.pdf}
+% is included in this bundle where most, if not all, new commands
+% are documented and suitably shown.
+%
+% This package contains new environments and new commands; it presumes
+% the user invokes it after declaring the |greek| option to the \babel\
+% package; should he forget, this package will complain. But once the
+% |greek| option is properly declared, this package verifies that the
+% |polutonikogreek| dialect (deprecated) is selected, or that the
+% |polutoniko| attribute or modifier is set; if no attribute is set this package
+% will set |polutoniko| or |ancient| depending on the presence of an
+% updated Greek support to the \babel\ package. This choice depends on
+% the particular version of the \babel\ package, but should not concern
+% the user; switching back and forth between classical Greek and some
+% modern western language is performed in a transparent way; possibly
+% there might be some problem switching from classical to modern spelling
+% in Greek itself, but since in modern spelling the multiplicity of Greek
+% diacritical marks is not forbidden, it's the author choice to select
+% classical or modern words, Lipsian or Didot fonts, polytonic or monotonic
+% accentuation. The worst it can happen is that \babel\ uses just one
+% hyphenation pattern set, so that in one of the three Greek versions some
+% words might turn out with the wrong hyphens points.
+%
+% The CB Greek fonts, which have been available for some years now on
+% \acro{ctan} in the directory \texttt{/fonts/greek/cb} have
+% been completed with the new files for the Lipsian fonts, and the metric
+% symbols font \texttt{gmtr????.*}; the latter does not need a formal font
+% definition file, because the necessary definitions are included in this package.
+% All fonts are available also as Type~1 scalable fonts. In general, recent
+% distributions of the \TeX\ system already contain the necessary
+% configuration to use the Type~1 font in one size, 10\,pt, but, thanks to
+% scaling, these can be used at any size; this version of \textsf{teubner}
+% is compatible with this reduced set. If optical sizes are desired for
+% a more professional typesetting, the \acro{ctan} archives contain also
+% the \textsf{cbgreek-full} package, which includes also all the Type~1
+% fonts at the various standard (EC) sizes, plus other facilities that allow
+% to use the CB fonts also in conjunction with the Latin Modern ones. Complete
+% installations of the \TeX\ system include the full CB fonts installation.
+%
+% The CB Greek fonts allow to input Greek text with a Latin keyboard and
+% by employing the prefix notation; with a Greek keyboard and file
+% \texttt{iso-8859-7.def} it is possible to directly input Greek text with the
+% monotonic spelling; if polytonic spelling is required I fear that the above
+% file is of little help and that a Latin keyboard does the job without
+% an excessive burden. The recent modifications to the \babel\ package and of the
+% Greek language description file allow to enter also polytonic Greek text,
+% keyboard permitting, with no effort; it is necessary to use the |utf8|
+% input encoding. It's important to notice the Apple computers have available
+% a virtual keyboard (called keyboard viewer) that is operable with the mouse
+% and, just by selecting the \emph{Greek Polytonic} keyboard driver, the
+% author can enter Greek text directly in the source file. Computer with a
+% touch screen virtual keyboard allow to switch from the national to
+% the Greek keyboard just by a single sweep of the finger. Some platforms
+% have the possibility of switching keyboard but they don't show the new
+% keyboard layout on the screen, but the user can generally build a personal
+% table that describes the correspondence between the key board and the
+% physical keyboard layout. Windows operating system Win8 has available
+% a virtual keyboard similar to the Mac's.
+%
+% Nevertheless there is a little point to observe; Lipsian fonts are very
+% nice but show some kerning errors with more evidence than the traditional
+% Didot Greek fonts. With the prefix notation in force, kerning programs may
+% result disabled and some diphthongs and some consonant-vowel combinations
+% appear poorly matched when the second letter caries any diacritical mark. In
+% order to avoid this ``feature'', the accented vowels may be input by means of
+% macros, that directly translate to the accented glyph, rather than invoking the
+% ligature programs that are implied by the prefix notation; reading a Greek text
+% on the screen while editing the input \texttt{.tex} file when a Latin
+% keyboard and such macros are used may be very strange, but authors get
+% used to it, and agree that the effort is worth the result. The direct input
+% of Greek glyphs, evidently is the real solution, even if it may be difficult
+% to enter Greek glyphs without a suitable virtual keyboard or a suitable
+% keyboard map.
+%
+% \section{Environments}
+% I apologise if I chose Italian names for verse environments; I wanted to
+% use names very different from the corresponding English ones, but at the
+% same time easily recognisable; after all \emph{versi} is the plural of
+% \emph{verso} and therefore is the exact Italian translation of \emph{verses}.
+% If you feel more comfortable with Latin, the alias environment names
+% in Latin, |versus|, |Versus|, and |VERSUS|, are also available.
+%
+% \DescribeEnv{versi}
+%\DescribeMacro{\verso}
+% The environment \texttt{versi} (|versus|) is used to typeset verses
+% in line, without an implicit end of line at the end of each verse; a vertical
+% bar with a number on top of it marks the verse limit while allowing a numeric
+% reference to a specific verse; the opening environment statement requires
+% a string, a short text, in order to indent the verse lines the amount of
+% this string width; the syntax is the following
+% \begin{sintassi}
+% \bslash begin\lbr versi\rbr\lbr\meta{string}\rbr{}
+% \meta{verse}\bslash verso[\meta{starting number}]\meta{verse}\bslash verso
+% \meta{verse}\bslash verso\meta{verse}\dots{}
+% \bslash end\lbr versi\rbr
+% \end{sintassi}
+% where, of course, \meta{starting number} is required only for the first
+% instance of |\verso| or when numbering must be restarted, for example
+% after an ellipsis.
+%
+% \DescribeEnv{Versi}
+% The environment \texttt{Versi} (|Versus|) is similar to the
+% standard \LaTeX\ environment \texttt{verse}, except verse lines are numbered
+% on multiples of~5; the opening statement requires the \meta{starting
+% number} as an optional argument; if this optional argument is not specified,
+% the starting number is assumed to be~1.
+% \begin{sintassi}
+% \bslash begin\lbr Versi\rbr[\meta{starting number}]
+% \meta{verse}\bslash\bslash{}\meta{*}[\meta{vertical space}]
+% \meta{verse}\bslash\bslash{}
+% \dots{}
+% \bslash end\lbr Versi\rbr
+%\end{sintassi}
+%
+% \DescribeEnv{VERSI}
+% \DescribeMacro{\SubVerso}
+% \DescribeMacro{\NoSubVerso}
+% The environment \texttt{VERSI} (|VERSUS|) allows for two verse
+% enumerations; the main enumeration is identical to the one performed by
+% the previous environment \texttt{Versi}, while the secondary enumeration
+% is in smaller digits and normally numbers consecutive verses, except
+% that it can be turned on and off; the verses that lack the secondary
+% enumeration are indented by moving them to the right.
+% \begin{sintassi}
+% \bslash begin\lbr VERSI\rbr[\meta{starting principal number}]
+% \meta{verse}\bslash\bslash\meta{*}[\meta{vertical space}]
+% \bslash SubVerso[\meta{starting secondary number}]
+% \meta{verse}\bslash\bslash\meta{*}[\meta{vertical space}]
+% \dots{}
+% \bslash NoSubVerso
+% \meta{verse}\bslash\bslash\meta{*}[\meta{vertical space}]
+% \dots
+% \bslash end\lbr VERSI\rbr
+% \end{sintassi}
+% where if \meta{starting principal number} is missing, 1 is assumed,
+% while if \meta{starting secondary number} is missing, the enumeration
+% is continued from the next available integer. Of course
+% \meta{starting secondary number} is used again when the secondary
+% enumeration must be restarted; there are no means to restart the
+% principal enumeration.
+%
+% \DescribeEnv{bracedmetrics} The previous environments accept \meta{verses}
+% in any language and in any alphabet, the one that is in force before opening
+% the environment; the language and, even less, the alphabet cannot be
+% globally changed within the above environments; if such a change is performed,
+% it is valid only for one verse, or for the remaining fraction of the verse
+% after the language or font change. This means, among the other things, that
+% if the default ``alphabet'' is the one that shows the metric symbols,
+% the above environments may be used to display ``metric verses'', that is the
+% pattern of long, short or ancipital symbols, together with any other metric
+% symbol so as to display the metrics without disturbing the written text; when
+% doing this metric typesetting, it may happen that some verse patterns exhibit
+% some variants; in this case the \texttt{bracedmetrics} environment comes handy,
+% because it can display such variants in separate lines but grouped with a large
+% right brace; some commands allow to roughly align these variants, so as to
+% allow to nest several such environments as if they were single blocks of metric
+% symbols. The argument of the opening statement specifies the width of the
+% block so as to align properly all the symbols even in nested environments.
+% \begin{sintassi}
+% \bslash begin\lbr bracedmetrics\rbr\lbr\meta{length}\rbr{}
+% \meta{metric pattern}\bslash\bslash
+% \meta{metric pattern}\bslash\bslash
+% \dots{}
+% \bslash end\lbr bracedmetrics\rbr
+% \end{sintassi}
+% \DescribeMacro{\verseskip}\DescribeMacro{\Hfill} Within the \meta{metric
+% pattern} it is possible to flush right the symbols
+% by prefixing the whole string with a |\Hfill| command; the \meta{length} may
+% be specified as an integer multiple of a ``long'' symbol by means of
+%\begin{sintassi}
+% \bslash verseskip\lbr\meta{number}\rbr
+%\end{sintassi}
+% The macro |\verseskip| can be used also within \meta{metric pattern}
+% in order to space out metric symbols.
+%
+% \section{Commands and symbols}
+% This package defines a lot of commands for inserting special signs in the middle
+% of regular text, for marking zeugmas and synizeses, for putting unusual accents
+% on any symbol, for inserting special ``parentheses'' that are used by
+% philologists for marking blocks of letters or blocks of text. I suggest that the
+% user reads the documentation file \texttt{teubner-doc.pdf} for a complete
+% list of commands and symbols.
+%
+% \DescribeMacro{\newmetrics} Here it might be useful to describe a command
+% for defining metric sequences, so as to shorten the definition of metric verses;
+% this new command is |\newmetrics| and may be used for the definition of new
+% commands whose name \emph{may start with one digit}: precisely this digit may be
+% one of~2, 3,~4. Even if \LaTeX\ does not allow macros to contain both digits
+% and letters, other service macros have been defined so as to handle these
+% special control sequences even if they start with \emph{one} digit strictly
+% lower than~5. The syntax is:
+% \begin{sintassi}
+% \bslash newmetrics\lbr\meta{control sequence}\rbr\lbr\meta{definition}\rbr
+% \end{sintassi}
+% where \meta{definition} consists in general of a sequence of metric commands
+% such as |\longa|, |\brevis|, |\anceps|, etc.
+%
+% \section{Acknowledgements}
+% I must thank with gratitude Paolo Ciacchi that urged me to prepare this
+% extension file in order to help him typeset his master thesis of philological
+% kind in classical Greek.
+%
+% I am pleased to thank G\"unter Milde who wrote a definition file for accessing
+% the LGR encoded fonts in order to fetch the accented glyphs; I kindly gave me
+% permission to use his macros, that I adapted to the conventions used within this
+% file. These macros were saved into the definition file |LGRaccent-glyph.def|, so
+% that it could be used also without the |teubner| package, for example for
+% typesetting without setting the \emph{polutoniko} language attribute. But
+% since he became the maintainer of the Greek language support for the \babel\
+% package, he extended this support to the point that the extended macros are
+% already part of the new Greek support files.
+%
+% I got some ideas also from a paper that Werner Lemberg published on Eutypon, the
+% magazine of the Hellenic Friends of \TeX, where he discussed in a constructive
+% critical way the problems connected with the LGR encoded fonts and the Unicode
+% encoding.
+%
+% Now the new Greek support for the \babel\ package, thanks to G\"unter Milde,
+% includes also the support for Unicode input in the source file, in spite of
+% using LGR encoded output fonts. The actual support is partially useful also
+% with XeLaTeX and LuaLaTeX.
+%
+% \StopEventually{}
+%
+% \section{Code}
+% \subsection{Preliminaries}
+% In order to use the PostScript pfb fonts (CM, EC, and CB) it is necessary to
+% know if we are dealing with \LaTeX\ or pdf\LaTeX; this was necessary because
+% apparently the pfb math scalable fonts derived from the \textsf{META\-FONT}
+% counterparts do not have exactly the same effective dimensions; this is why
+% the ``zeugma'' and the ``synizesis'' signs have to be corrected when the pfb
+% fonts are used; with these, in facts, the black leader that joins the curved
+% extremities appeared a little too fat and did not join exactly the left mark.
+% Recently, apparently, the fonts have been corrected and this trick is not
+% necessary any more. Nevertheless we define a new boolean that copes with the
+% fact that at least since 2007 the \TeX\ engine is \textsf{pdftex} even when DVI
+% output is sought; the package \pack{iftex} creates three |\if|s that allow to
+% diagnose if the typesetting engine is \textsf{pdftex} in PDF mode,
+% \textsf{XeTeX} or \textsf{Luatex}; since at the moment this package
+% \pack{teubner} is compatible only with \textsf{pdftex} in PDF mode, we equate
+% the |\ifPDF| switch (defined in previous versions of \pack{teubner}) with the
+% switch defined by package \pack{iftex}:
+%\iffalse
+%<*package>
+%\fi
+% \begin{macrocode}
+\RequirePackage{iftex}
+\let\ifPDF\ifPDFTeX
+% \end{macrocode}
+% When \texttt{teubner.sty} is input the language Greek must have been already
+% defined; otherwise an error message is issued and processing is terminated.
+% \begin{macrocode}
+\ifx\captionsgreek\undefined
+\PackageError{teubner}{Greek language unknown!\MessageBreak
+I am not going to use Lipsian fonts and Scholars' signs\MessageBreak
+if Greek is unknown.\MessageBreak
+Use the babel package greek option.\MessageBreak
+Type X <return> to exit.}%
+{Type X <return> to exit.}
+\fi
+% \end{macrocode}
+% If this test is passed, this means that not only the greek option to the \babel\
+% package is set, but also that all the \babel\ machinery is available.
+%
+% Since \texttt{teubner.sty} accepts some options it is necessary to provide
+% their definitions; in particular the |\or| control sequence conflicts
+% with the |\or| primitive command used within the syntax of |\ifcase|\footnote{With
+% version 2002/07/18 v.1.0d this has been eliminated; the option remains for
+% compatibility with older versions, but the only legal command is now
+% \texttt{\string\oR}.}; |\oR| is a little exception since all the other
+% accent-vowel macros contain only lowercase letters; |og| is another exception,
+% and the accent macros have to be used; |\og| collided with the French command
+% for inserting the opening guillemets (see below). The point is that accent vowel
+% sequences that directly access the accented glyph are made up as such:
+% \begin{sintassi}
+% \bslash \meta{base character}\meta{first diacritic}\meta{second diacritic}\meta{third diacritic}
+% \textrm{where}
+% \meta{first diacritic} \textrm{is \texttt{d} or \texttt{r} or \texttt{s} for diaeresis, rough or smooth breath}
+% \meta{second diacritic} \textrm{is \texttt{c} or \texttt{a} or \texttt{g} for circumflex or acute or grave}
+% \meta{third diacritic} \textrm{is \texttt{i} for iota subscript or adscript}
+% \end{sintassi}
+% Evidently none of the diacritical marks is compulsory, but at least one must
+% be present; if more than one is present it must be given in that sequence. Since
+% |\oR| means omicron with rough breath, it is not very important that it is
+% declared with the standard sequence |<o| or with |\oR| or with |\<o|, because
+% it never falls after another letter, so that it never breaks any ligature or
+% kerning command. The command is there just for completeness. More or less the
+% same is true with the |\og| sequence; it fails to work correctly when the main
+% language is French and the |french| option to the |babel| package is in force;
+% matter of facts, |\og| conflicts with the homonymous command defined by that
+% option to mean ``ouvrir guillemets''; therefore it's necessary to use
+% either the plain sequence |`o| or the extended accent macro |\`o|.
+%
+% At the same time since all accent combinations are defined as ``text commands'',
+% in \LaTeX\ jargon, when their commands are followed by a vowel (or `r') they
+% define a ``text symbol'' i.e.\ they fetch directly the glyph of the accented
+% character; therefore |<o|, |\oR| and |\r{o}| are all equivalent (at the
+% beginning of a word where omicron with rough breath is the only place where you
+% might find it). See more on this point in the following sections.
+%
+% These glyph name macros are not defined by default, because the |GlyphNames|
+% boolean variable is false by default; you can specify the option
+% \emph{GlyphNames} for activating these macro names.
+% In any case the same result is more comfortably obtained by using the
+% extended accent macros whose behaviour is specified by the new
+% \babel\-greek settings.
+%
+% Another unusual option is set up for being used with non standard \TeX\ system
+% fonts; we have noticed that the Lipsian fonts appear a little too light when
+% used together with the Times or the Palatino fonts; probably this is true also
+% with other PostScript fonts. In this case the user might specify the option
+% |boldLipsian| and the Lipsian fonts used in medium series will be substituted
+% with those of the semi\-bold one.
+%
+% At the same time, from July 2005 and for a few years, the full collection
+% of the complete size set of the CB fonts has not been available any more
+% \emph{as the default \TeX\ system set up}; only the 10pt size were available
+% unless the \texttt{cbgreek-full} font package was loaded; for this reason
+% a new option was needed in order to instruct \texttt{teubner.sty} to use
+% the specific file \texttt{type1ec.sty} dated at least 2002/09/07, so as to
+% scale up or down all the EC and CB fonts from an original 10\,pt size.
+% In order that the \texttt{10pt} plays its role correctly, it was convenient,
+% if not compulsory, to require first the \texttt{babel} package, then the
+% \texttt{teubner} one with the option \texttt{10pt}, then all other packages
+% required for a specific document, in particular the \texttt{fontenc}
+% one if the \texttt{T1} encoding is requested. All this is maintained for
+% backward compatibility, and should not be necessary any more; now the
+% complete set of the CB fonts gets installed with every full installation
+% of the \TeX\ system, but with partial or basic installations, such option
+% might turn out to be useful even now.
+%
+% This kludge is necessary for all fonts that have description files that use the
+% |\EC@family| command for describing the available shapes and sizes; in practice
+% this happens only with the EC fonts, even when the \texttt{cm-super} scalable
+% implementation is used. For using the Latin Modern fonts (LM) new specific font
+% description files for the CB fonts are part of the \babel\ package, so this
+% problem does not exist; when using other fonts, such as the TX, PX, ZE,~\dots,
+% other kludges are necessary, because their font family names are different from
+% those normally used with \TeX: |cmr| for serifed fonts, |cmss| for sans serif
+% ones, and |cmtt| for monospaced ones.\footnote{Even the Latin Modern fonts have
+% different family names, but, due to their importance, specific font description
+% files have been added to the \babel\ package. The LM fonts are more comfortable
+% than the EC ones, when scalable fonts are to be used, because they are
+% continuously scalable and download into the produced files less font files than
+% the EC o cm-super ones. Unless specifically requested, the LM fonts should
+% always be preferred to the EC and cm-super ones. When using the LM fonts, its
+% better to use the full collection of the CB fonts, even if the CB font
+% description files are compatible with the single 10\,pt size.}
+%
+% Notice that when using, for example, the TX fonts and no kludge is available,
+% the CB fonts are loaded only as the ``error font'', since the TX fonts have
+% different family names than the CB ones; in many cases this might pass
+% un-noticed, but if real Greek text in different shapes and series has to be
+% typeset, the unaware typesetter might get crazy trying to force shape and series
+% changes in the Greek text; it would not be impossible, but it would be very,
+% very boring. In any case see in the next sections the implemented kludges in
+% order to run successful compilations also with non standard \TeX\ system fonts.
+% \begin{macrocode}
+\newif\ifor\orfalse % Compatibility with older versions
+\DeclareOption{or}{\relax}
+\newif\ifboldLipsian \boldLipsianfalse
+\DeclareOption{boldLipsian}{\boldLipsiantrue}
+\newif\ifonesizetypeone
+\DeclareOption{10pt}{\onesizetypeonetrue}
+\newif\ifGlyphNames \GlyphNamesfalse
+\DeclareOption{NoGlyphNames}{\GlyphNamesfalse}
+\DeclareOption{GlyphNames}{\GlyphNamestrue}
+\ProcessOptions*
+% \end{macrocode}
+%
+% In the next sections we frequently use the acronym for the Greek font encoding;
+% we hope it will eventually become \texttt{GR} or, following the actual 256 glyph
+% font encodings, \texttt{T7} or \texttt{X7}\footnote{Apparently \texttt{T7} has been
+% reserved to define an encoding where the first 128 glyphs are the standard
+% \texttt{OT1} encoded Latin fonts, and the second group, again of 128 glyphs,
+% contains the Greek characters; therefore, since polytonic spelling requires more
+% than 128 glyphs, the extended encoding \texttt{X7} will probably become the one
+% applicable to the whole set of the CB fonts. Time passing by, the \texttt{X7}
+% encoding name apparently has been used for some nordic language.}.
+% Meanwhile the acronym is \texttt{LGR}, so we'd better define a symbolic name, so
+% that we can change the definitive name in just one place.
+% \begin{macrocode}
+\def\GRencoding@name{LGR}
+% \end{macrocode}
+%
+% Now the default Olga Greek fonts, used for rendering the ``Greek italic shape''
+% are an alternative with the Lipsian ones.
+%
+% If the \texttt{10pt} option was
+% specified it is necessary to load also the package texttt{type1ec.sty}.
+% In any case we load also packages |graphicx| and |ifthen| that shall be useful
+% for some commands.
+% \begin{macrocode}
+\ifonesizetypeone
+ \RequirePackage[10pt]{type1ec}[2002/09/07]
+\fi
+\RequirePackage{graphicx}
+\RequirePackage{ifthen}
+% \end{macrocode}
+%
+% \begin{macro}{\metricsfont} Similarly the metric symbol font is declared
+% together with a command for selecting it:
+% \begin{macrocode}
+\DeclareFontFamily{U}{mtr}{\hyphenchar\font\m@ne}
+\ifonesizetypeone
+ \DeclareFontShape{U}{mtr}{m}{n}{<-> gmtr1000}{}%
+\else
+ \DeclareFontShape{U}{mtr}{m}{n}{%
+ <-5.5> gmtr0500 <5.5-6.5> gmtr0600
+ <6.5-7.5> gmtr0700 <7.5-8.5> gmtr0800
+ <8.5-9.5> gmtr0900 <9.5-11> gmtr1000
+ <11-15> gmtr1200 <15-> gmtr1728}{}%
+\fi
+\DeclareFontShape{U}{mtr}{m}{it}{<->ssub*mtr/m/n}{}%
+\DeclareFontShape{U}{mtr}{b}{it}{<->ssub*mtr/m/n}{}%
+\DeclareFontShape{U}{mtr}{b}{n}{<->ssub*mtr/m/n}{}%
+\newcommand*\metricsfont{\fontencoding{U}\fontfamily{mtr}\upshape}
+% \end{macrocode}
+% \end{macro}
+% Next we require the package for extensible math fonts; it might be strange to
+% use extensible math fonts in Greek philology, but a certain glyph must be picked
+% up from such fonts, with the assurance that it changes size together with the
+% current font size.
+% \begin{macrocode}
+\RequirePackage{exscale}
+% \end{macrocode}
+%
+% Some macros are necessary to switch languages; such macros must be independent
+% (at least for now) from the particular \babel\ version, whether it be version
+% 3.6, 3.7, 3.8, or~3.9; in the former the concept of ``language attribute'' is
+% unknown, while the latter recognises varieties of the same language by the
+% attribute setting.
+% With \babel\ version 3.9g things have further changed; the attribute
+% to a language may be appended to the language name with an interposed dot;
+% for example for Greek it might be |greek.polutoniko|.
+% Such macros, besides being as robust as possible, must provide the
+% alphabet changes as required.
+%
+%\begin{macro}{\GreekName}
+% During the language switching operations |\GreekName|
+% distinguishes the variant or the main language whose attribute
+% gets set and, evidently, becomes effective when the main language |greek|
+% is in force. Notice that if the |greek.ldf| has a date previous to 2014/09/18,
+% the attribute |ancient| may not be defined; in this case the |polutoniko|
+% attribute is set, else the |ancient| attribute is selected. The difference
+% is that the attribute |polutoniko| selects the polytonic spelling and the
+% modern Greek hyphenation, while |ancient| selects the polytonic spelling and
+% the classical Greek hyphenation. It is assumed that this |teubner| package
+% gets used for philological purposes only for ancient Greek. Nevertheless,
+% if some work on modern polytonic Greek philological document is being
+% typeset, the |ancient| attribute may work satisfactorily, but with some
+% possible ``ancient'' line breaks.
+% \begin{macrocode}
+\ifx\languageattribute\undefined
+ \def\GreekName{polutonikogreek}%
+\else
+ \def\GreekName{greek}
+ \def\strip@slash#1/#2/#3!{\edef\@tempA{#1#2#3}}
+ \def\getgreekdate#1 #2 #3 #4!{\def\@tempA{#1}\expandafter\strip@slash\@tempA!}
+ \expandafter\expandafter\expandafter\getgreekdate\csname ver@greek.ldf\endcsname !
+ \ifnum\@tempA<20140918
+ \languageattribute{greek}{polutoniko}%
+ \else
+ \languageattribute{greek}{ancient}%
+ \fi
+ \let\strip@slash\@undefined
+ \let\getgreekdate\@undefined
+\fi
+% \end{macrocode}
+%\end{macro}
+
+%
+% \subsection{Compatibility with Latin fonts}\label{ssec:LatinFontComp}
+%\begin{macro}{\previouslanguage}
+%\begin{macro}{\previousencoding}
+% The ``default'' language is defined as the
+% ``previous'' language; similarly the ``default'' encoding is defined as the
+% ``previous'' encoding; these are the language and the encoding in force when the
+% document starts; this is why such macros are defined at the beginning of the
+% document. At the same time we assure that if the CM (or EC) or the LM fonts are
+% the default ones, nothing special is done, while if the default fonts are, say,
+% the TX ones, they are correctly restored, but the CM families are used for the CB
+% ones.
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\substitutefontfamily}
+%\begin{macro}{\ifLipsian}
+% The font macro |\substitutefontfamily| is already present in the \babel\ kernel, but
+% with version 3.9g it is deprecated, although maintained for backwards compatibility;
+% it copes only with the standard families, series and shapes, therefore it does not
+% consider the Lipsian shape and its series. I had to redefine it together with a
+% new conditional macro in order to do the same job as the original one but taking
+% into consideration also the Lipsian shape; the purpose of this macro is to write
+% in the working directory a number of font description files that refer to the LGR
+% Greek encoding, but have the names of the Latin font families; such font
+% description files, simply substitute these non existent encoding-family series and
+% shapes with the existing series and shapes of any other LGR encoded Greek font, in
+% particular the CB ones.
+% Things might change in the future, so as to use the package by G\"unter Milde
+% \texttt{substitutefont} package (already present in the \acro{ctan} archive) or
+% other solutions by the core of \babel. Meanwhile we cope with what is available
+% right now.
+%
+% By issuing a command such as:
+% \begin{sintassi}\ttfamily
+% \texttt{\string\ifFamily}\{pxr\}\{cmr\}
+% \end{sintassi}
+% an association is made with all the series and shapes of the Palatino serifed
+% fonts to the corresponding CB serifed series and shapes; therefore when a language
+% shift changes the default encoding from, say, \texttt{T1} to \texttt{LGR} the
+% font family \texttt{LGR+pxr} is mapped to the font family \texttt{LGR+cmr} and
+% everything is supposed to work fine; when another language change resets the
+% encoding to \texttt{T1}, the original Latin script is used again. The redefined
+% |\substitutefontfamily| macro is as such:
+% \begin{macrocode}
+\newif\ifLipsian
+
+\providecommand*\substitutefontfamily{}%
+\renewcommand*\substitutefontfamily[3]{{%
+ \edef\@tempA{#1#2.fd}%
+ \lowercase\expandafter{\expandafter\def\expandafter\@tempA\expandafter{\@tempA}}%
+ \expandafter\IfFileExists\expandafter{\@tempA}{}{%
+ \immediate\openout15=\@tempA
+ \typeout{Writing file #1#2.fd}
+ \immediate\write15{%
+ \string\ProvidesFile{#1#2.fd}^^J
+ [\the\year/\two@digits{\the\month}/\two@digits{\the\day}
+ \space generated font description file]^^J
+ \string\DeclareFontFamily{#1}{#2}{}^^J
+ \string\DeclareFontShape{#1}{#2}{m}{n}{<->ssub * #3/m/n}{}^^J
+ \string\DeclareFontShape{#1}{#2}{m}{it}{<->ssub * #3/m/it}{}^^J
+ \string\DeclareFontShape{#1}{#2}{m}{sl}{<->ssub * #3/m/sl}{}^^J
+ \string\DeclareFontShape{#1}{#2}{m}{sc}{<->ssub * #3/m/sc}{}^^J
+ \string\DeclareFontShape{#1}{#2}{b}{n}{<->ssub * #3/bx/n}{}^^J
+ \string\DeclareFontShape{#1}{#2}{b}{it}{<->ssub * #3/bx/it}{}^^J
+ \string\DeclareFontShape{#1}{#2}{b}{sl}{<->ssub * #3/bx/sl}{}^^J
+ \string\DeclareFontShape{#1}{#2}{b}{sc}{<->ssub * #3/bx/sc}{}^^J
+ \string\DeclareFontShape{#1}{#2}{bx}{n}{<->ssub * #3/bx/n}{}^^J
+ \string\DeclareFontShape{#1}{#2}{bx}{it}{<->ssub * #3/bx/it}{}^^J
+ \string\DeclareFontShape{#1}{#2}{bx}{sl}{<->ssub * #3/bx/sl}{}^^J
+ \string\DeclareFontShape{#1}{#2}{bx}{sc}{<->ssub * #3/bx/sc}{}^^J
+ }%
+ \ifLipsian
+ \immediate\write15{%
+ \string\DeclareFontShape{#1}{#2}{m}{li}{<->ssub * #3/m/li}{}^^J %<- Lipsian
+ \string\DeclareFontShape{#1}{#2}{b}{li}{<->ssub * #3/b/li}{}^^J %<- Lipsian
+ \string\DeclareFontShape{#1}{#2}{bx}{li}{<->ssub * #3/bx/li}{}^^J %<-Lipsian
+ \string\DeclareFontShape{#1}{#2}{m}{ui}{<->ssub * #3/m/ui}{}^^J %<- upright Olga
+ \string\DeclareFontShape{#1}{#2}{b}{ui}{<->ssub * #3/m/ui}{}^^J %<- upright Olga
+ \string\DeclareFontShape{#1}{#2}{bx}{ui}{<->ssub * #3/bx/ui}{}^^J%<-upright Olga
+ \string\DeclareFontShape{#1}{#2}{m}{rs}{<->ssub * #3/m/rs}{}^^J %<-serifed lc
+ \string\DeclareFontShape{#1}{#2}{b}{rs}{<->ssub * #3/m/rs}{}^^J %<-serifed lc
+ \string\DeclareFontShape{#1}{#2}{bx}{rs}{<->ssub * #3/bx/rs}{}^^J%<-serifed lc
+ }%
+ \global\Lipsianfalse\fi
+ \closeout15}%
+ }}
+
+% \end{macrocode}
+% Notice that together with the Lipsian fonts the upright italics (Olga) and upright
+% serifed lowercase alphabets are defined. In a while there are the definition for
+% selecting these shapes. Of course you are not obliged to use them, but in case you
+% wanted\dots
+%
+% These results are obtained by means of the following macros.
+%\begin{macro}{\ifCMLM}
+%\begin{macro}{\ifFamily}
+% The |\ifCMLM| processes the necessary test in order to set the auxiliary macro
+% |\n@xt| to be an alias to |\iftrue| or |iffalse| depending on the fact that the
+% CM (or EC) fonts or the LM fonts are the default Latin ones, in this case it sets
+% the |\n@xt| macro equivalent to |\iftrue|, otherwise it sets it to |\iffalse|. In
+% order to succeed, it requires to analyse the first two letters of the default
+% family name; if these letters form one of the sequences |cm| or |lm|, the CM or
+% LM fonts have been loaded, otherwise some other fonts are in force. We need
+% therefore a macro with delimited arguments in order to extract the first two
+% letters of the family name.
+%
+% \begin{macrocode}
+\def\ifCMLM#1#2#3!{\edef\f@milyprefix{#1#2}%
+ \ifthenelse{\(\equal{\f@milyprefix}{cm}\OR\equal{\f@milyprefix}{lm}\)}%
+ {\let\n@xt\iftrue}{\def\f@milyprefix{cmr}\let\n@xt\iffalse}\n@xt}
+
+% \end{macrocode}
+% The other macro |\ifFamily| uses the previous macro and according to the test
+% result, possibly runs the |\substitutefontfamily| macro that, if
+% necessary, creates the description file that map the specified family font
+% description file to the second specified font family, both connected to the LGR
+% encoding. Therefore, after these font definition files exist, \LaTeX\ can fetch
+% the Greek fonts by way of substitution. Let's explain again: if you specify
+% \begin{verbatim}
+% \Lipsiantrue\ifFamily{pxr}{lmr}
+% \end{verbatim}
+% you state that you want to run the macro on the serifed Palatino font family, by
+% associating the |pxr| family to the |lmr| one\footnote{If you have the full CB
+% Greek font collection it's more convenient to map the missing fonts to the Latin
+% Modern Greek ones, while if you need to use the \emph{10pt} option, you'd better
+% map the missing family to the ordinary Computer Modern ones; the actual fonts are
+% the same, but the latter font definition files cope with the \emph{10pt} option,
+% while the former don't.}; by specifying |\Lipsiantrue| you state that you want to
+% create entries also for the Lipsian series and shape; the macro provides to reset
+% |\Lipsianfalse| in order to avoid that other calls of that macro on non serifed
+% or monospaced fonts try to create entries that in any case do not exist: the
+% Lipsian font comes only as a serifed font! In this way, if you are using
+% Palatino fonts through the \textsf{pxfonts} package, the |teubner| macros provide
+% to create the necessary font description files so that while you are typesetting
+% in medium normal Latin Palatino and you switch to Greek, the built in macros
+% change the encoding to LGR; the LGR Palatino serifed medium normal Greek font
+% does not exist, but that family, series and shape are mapped by the font
+% description file to the corresponding LGR encoded Latin Modern CB fonts in medium
+% series and normal shape, and typesetting goes on with the right Greek fonts.
+% \begin{macrocode}
+\newcommand*\ifFamily[2]{%
+\expandafter\ifCMLM#1!\else\substitutefontfamily{LGR}{#1}{#2}\fi}
+
+% \end{macrocode}
+% You don't actually need to use that macro for the Times or the Palatino eXtended
+% fonts loaded by means of the corresponding packages \textsf{txfonts} or
+% \textsf{pxfonts}, because a hook is set up so that ``at begin document'' the
+% loading of those packages is tested, and if the test is true, the necessary font
+% description files are possibly created. If you load the Times or the Palatino or
+% any other non standard font by means of other packages, it's up to you to issue
+% the |\substitutefontfamily| macro right after calling that font package and by
+% using the correct family names; similarly you might substitute the new Latin font
+% family names to other Greek font family names, if you have other fonts available.
+% At the same time at begin document we memorise the name and encoding of the Latin
+% font used for the default language, so that when returning to Latin font
+% typesetting after Greek font typesetting, the proper language typesetting rules
+% and encoding are restored.
+% \begin{macrocode}
+\AtBeginDocument{%
+\@ifpackageloaded{pxfonts}{\typeout{Palatino fonts loaded}%
+\Lipsiantrue\ifFamily{pxr}{cmr}\Lipsianfalse
+\ifFamily{pxss}{cmss}\ifFamily{pxtt}{cmtt}}{\relax}}
+
+\AtBeginDocument{%
+\@ifpackageloaded{txfonts}{\typeout{Times fonts loaded}%
+\RequirePackage{teubnertx}}{}}
+
+\AtBeginDocument{%
+ \edef\previouslanguage{\languagename}%
+ \edef\previousencoding{\f@encoding}}
+% \end{macrocode}
+%
+% Nevertheless all this requires a minimum of attention in specifying the options
+% for the \babel\ package and in the order extensions packages are input. The
+% |teubner.sty| package should be read \emph{after} any other package that sets or
+% resets the Latin font encoding; for example if the T1 encoding is selected as the
+% default one, in place of the OT1 encoding, then this choice must be made before
+% this package is read in. Similarly when the \babel\ options are specified,
+% remember that the last language name becomes the default language at begin
+% document; never specify |greek| as the last
+% language option!
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\Lipsiakostext}
+%\begin{macro}{\lishape}
+%\begin{macro}{\textli}
+% |\lishape| is the normal declaration, modelled on the other similar macros in the
+% \LaTeX\ kernel, made up to chose the Lipsian shape. Nevertheless since it is a
+% light character, if it must blend well with the other PostScript fonts, not only
+% the CM and LM, but also the other ones available for typesetting with the \TeX\
+% system, it is necessary to chose the |b| (bold) series in place of the |m|
+% (medium) one, while maintaining the |bx| (bold extended) series when the other
+% fonts are set with the blacker and larger series. This is why the |\lishape|
+% declaration is a little more complicate than normal, since it has to test the
+% value of the current series. The text command |\textli| matches the similar
+% commands for Latin fonts. But the |\lishape| declaration is used also within the
+% more complicated macros for declaring or setting the Lipsian font.
+%
+% |\Lipsiakostext| is a \emph{declaration} stating that from now on
+% typesetting will be done with the Lipsian fonts; notice that the encoding and the
+% language name in force before this declaration are memorised, then the current
+% Greek version is selected; the |\let\~\accperispomeni| is required because
+% switching on and off may reset the active tilde and connected macros definitions.
+% |\~| in Greek must set the circumflex accent, so we make sure that this really
+% occurs.
+% \begin{macrocode}
+\DeclareRobustCommand{\lishape}{%
+\not@math@alphabet\lishape\relax
+\ifthenelse{\equal{\f@encoding}{\GRencoding@name}}{%
+\ifboldLipsian
+\ifthenelse{\equal{\f@series}{m}}%
+{\fontseries{b}\fontshape{li}\rmfamily}%
+{\fontshape{li}\rmfamily}\else
+\fontshape{li}\rmfamily\fi}%
+{\fontshape{it}\selectfont}}%
+
+\DeclareTextFontCommand{\textli}{\lishape}%
+\DeclareRobustCommand\Lipsiakostext{%
+ \expandafter\select@language\expandafter{\GreekName}%
+ \let\~\accperispomeni\let~\accperispomeni\lishape}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\begin{macro}{\textLipsias}
+% |\textLipsias| is a command that typesets its argument with the |\Lipsiakostext|
+% declaration in force. The \LaTeX\ command declaration used here makes sure that
+% possible italic corrections are taken into account; the actual font switching is
+% made through the same |\Lipsiakostext| declaration, but the inner working
+% maintain local this declaration; for this reason we suggest to use this text
+% command rather than the font declaration.
+% \begin{macrocode}
+\DeclareTextFontCommand{\textLipsias}{\Lipsiakostext}
+
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\NoLipsiakostext} |\NoLipsiakostext| is the opposite declaration
+% that undoes everything that was done with |\Lipsiakostext|. Probably it is
+% superfluous, but it has been asked for. If |\Lipsiakostext| is delimited within a
+% scope by means of an explicit group or an environment, it stops its effectiveness
+% with the end of its scope.
+%
+% It is worth noting that, in order to delimit within a scope the action of this and
+% of the other declarations, it is possible to use them as environments with the
+% same name without the backslash. for example one might input in the source file
+% something as:
+%\begin{quote}\obeylines
+% |\begin{Lipsiakostext}|
+% \meta{Greek text to be typeset with the Lipsian font}
+% |\end{Lipsiakostext}|
+%\end{quote}
+% Remember also that these Greek text declarations may be issued while typesetting
+% with Latin fonts; they provide also the language switch, so that they do not
+% require the typesetter to first switch to Greek and then to choose a certain Greek
+% font.
+% \begin{macrocode}
+\DeclareRobustCommand\NoLipsiakostext{%
+ \ifthenelse{\equal{\f@series}{b}}{\fontseries{m}}{\relax}%
+ \fontshape{n}\selectfont
+ \expandafter\select@language\expandafter{\previouslanguage}%
+ \rmfamily\bbl@activate{~}}
+
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\textDidot}
+% |\textDidot| is a similar macro where the common upright Greek characters are
+% selected; it goes by itself that if |\textli| is specified within the
+% |\textDidot| argument, the typesetting is or becomes identical with what
+% one can obtain with the |\textLipsias| command.
+% \begin{macrocode}
+\DeclareRobustCommand\textDidot[1]{{%
+ \expandafter\select@language\expandafter{\GreekName}%
+ \let\~\accperispomeni\let~\accperispomeni
+ \fontencoding{LGR}\rmfamily#1}}
+
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\textlatin}
+% |\textlatin| is a redefinition of the standard \babel\ macro that is adapted to
+% the present situation, where it may be called behind the scenes in certain
+% situations that are beyond the control of the typesetter. Therefore every
+% precaution is taken in order to be sure that the composition of the command
+% argument is really done with the default encoding but maintaining the current
+% font familY, series and shape; of course, if the shape is that
+% related to the Lipsian font, then the italic shape is temporarily restored
+% (local definition). Moreover, with the (default) Latin fonts the tilde is
+% restored to a non breaking space by simply making it an active character.
+% \begin{macrocode}
+\DeclareRobustCommand\textlatin[1]{\edef\externalencoding{\f@encoding}{%
+ \def\itdefault{it}\def\@tempA{li}\ifx\@tempA\f@shape\def\f@shape{it}\fi%
+ \expandafter\select@language\expandafter{\previouslanguage}%
+ \fontencoding{\previousencoding}\selectfont
+ \bbl@activate{~}#1}%
+ \expandafter\fontencoding\expandafter{\externalencoding}}
+
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\uishape}
+%\begin{macro}{\textui}
+%\begin{macro}{\rsshape}
+%\begin{macro}{\textrs}
+% The other switching font macros for using the other shapes that are available
+% with the CB fonts are working only when typesetting in Greek and the default
+% encoding is therefore LGR.
+% \begin{macrocode}
+\DeclareRobustCommand\uishape{%
+\ifthenelse{\equal{\f@encoding}{\GRencoding@name}}%
+{\fontshape{ui}\selectfont}{\relax}}
+\DeclareTextFontCommand{\textui}{\uishape}
+
+\DeclareRobustCommand\rsshape{%
+\ifthenelse{\equal{\f@encoding}{\GRencoding@name}}%
+{\fontshape{rs}\selectfont}{\relax}}
+\DeclareTextFontCommand{\textrs}{\rsshape}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+% \subsection{Service macros}
+% Now we start the specific additions introduced with this package.
+%
+% \begin{macro}{\strip@pt}
+% The \LaTeX\ kernel has the macro |\strip@pt| that strips off the pt part from the
+% expanded value of a dimension register and makes available the measure in pt
+% of the contained length (the register contains the length measure in scaled
+% points; the expansion performed by \TeX\ with the command |\the| converts the
+% scaled points to printer points and shows the result with a string of decimal
+% digits with, possibly, a decimal fraction); its argument is supposed
+% to be a dimension register name, not its expanded contents. The |\strip@pt|
+% command eliminates the decimal point and the fractional part if the latter is
+% nought.
+%
+% With the help of such service macro we are going to define a certain number of
+% ``lift accent'' macros or ``put cedilla'' macros that work with both upright and
+% slanted fonts, although they contain different parameters for Latin compared to
+% Greek alphabets.
+% \end{macro}
+%
+% \begin{macro}{\lift@accent}
+% The first ``lift accent'' macro just puts an accent over
+% a letter, without inserting any space between them; the first argument is the
+% accent code (decimal, hexadecimal or octal; I prefer decimal), while the second
+% argument is the letter --~any letter, even if it is not a vowel!
+% \begin{macrocode}
+\newcommand*\lift@accent[2]{\leavevmode
+{\edef\slant@{\strip@pt\fontdimen1\font}%
+\dimen@=\z@\setbox\z@\hbox{\char#1}\advance\dimen@-.5\wd\z@
+\setbox\tw@\hbox{i}\setbox\z@\hbox{#2}%
+\ifdim\wd\z@>\wd\tw@\advance\dimen@ .5\wd\z@
+ \else\advance\dimen@ .3\wd\z@\fi
+\ifx#2h\advance\dimen@.05\wd\z@\fi
+\@tempdima\ht\z@\advance\@tempdima-1ex\relax
+\advance\dimen@\slant@\@tempdima
+\raise\@tempdima\hbox to\z@{\kern\dimen@\char#1\relax\hss}\box\z@}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Lift@accent}
+% The second ``lift accent'' macro behaves as the first one except it interposes a
+% small vertical distance between the accent and the letter:
+% \begin{macrocode}
+\newcommand*\Lift@accent[2]{\leavevmode
+{\edef\slant@{\strip@pt\fontdimen1\font}%
+\dimen@=\z@\setbox\z@\hbox{\char#1}\advance\dimen@-.5\wd\z@
+\setbox\tw@\hbox{i}\setbox\z@\hbox{#2}%
+\ifdim\wd\z@>\wd\tw@\advance\dimen@ .5\wd\z@
+\else\advance\dimen@ .3\wd\z@\fi
+\ifx#2a\advance\dimen@-.1\wd\z@\fi
+\ifx#2h\advance\dimen@.05\wd\z@\fi
+\@tempdima\ht\z@\advance\@tempdima-1ex\advance\@tempdima.1ex\relax
+\advance\dimen@\slant@\@tempdima
+\raise\@tempdima\hbox to\z@{\kern\dimen@\char#1\relax\hss}\box\z@}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LIFT@accent}
+% The third ``lift accent'' macro behaves as the first one, except it interposes a
+% specified vertical space between the letter and the accent; this space is
+% specified as the second argument:
+% \begin{macrocode}
+\newcommand*\LIFT@accent[3]{\leavevmode
+{\edef\slant@{\strip@pt\fontdimen1\font}%
+\dimen@=\z@\setbox\z@\hbox{\char#1}\advance\dimen@-.5\wd\z@
+\setbox\tw@\hbox{i}\setbox\z@\hbox{#3}%
+\ifdim\wd\z@>\wd\tw@\advance\dimen@ .5\wd\z@
+\else\advance\dimen@ .3\wd\z@\fi
+\ifx#2a\advance\dimen@-.1\wd\z@\fi
+\ifx#2h\advance\dimen@.05\wd\z@\fi
+\@tempdima\ht\z@\advance\@tempdima-1ex\relax
+\def\@tempA{#2}\ifx\@tempA\undefined\else
+\advance\@tempdima#2\fi\let\@tempA\undefined
+\advance\dimen@\slant@\@tempdima
+\raise\@tempdima\hbox to\z@{\kern\dimen@\char#1\relax\hss}\box\z@}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% All these macros will be used in subsequent ``put accent'' macros, that will
+% stack also several accents one above the other; the necessity arises for example
+% when the macron or breve diacritical marks have to be put over accented letters;
+% according to typographical practice the accents must go over the macron or the
+% breve.
+% In a similar way philologists often must use other diacritical marks in addition
+% to the traditional Greek ones, therefore these macros will be used, for example,
+% for setting the Scandinavian ring (from a Latin font) over a Greek letter (from a
+% Greek font).
+%
+% \begin{macro}{\cap@}
+% The first such unusual diacritical mark is a small cap, a small upside down breve
+% sign, that is in position~1 of the Greek font table.
+% \begin{macrocode}
+\DeclareRobustCommand{\cap@}[1]{\leavevmode
+{\edef\slant@{\strip@pt\fontdimen1\font}%
+\setbox\tw@\hbox{\fontencoding{\GRencoding@name}\selectfont
+ \char1}\dimen@-.5\wd\tw@
+\setbox\z@\hbox{#1}%
+\advance\dimen@ .5\wd\z@
+\@tempdima\ht\z@\advance\@tempdima.55ex\relax
+\advance\dimen@\slant@\@tempdima
+\ifx\cf@encoding\GRencoding@name\else
+\ifx#1k\advance\dimen@-.3\wd\tw@\fi\fi
+\raise\@tempdima\hbox to\z@{\kern\dimen@\box\tw@\relax\hss}\box\z@}}
+
+% \end{macrocode}
+% The |\ifx\cf@encoding\GRencoding@name| conditional construct shows that this
+% macro behaves differently with different font encodings; the following |\ifx#1k|
+% checks the argument against the Greek letter kappa, which shows very clearly
+% that these macros operate on any letter, not only on vowels.
+% \end{macro}
+%
+% \begin{macro}{\cap}
+% By means of the above |\cap@| macro we can define three equivalent commands to be
+% used either when the Greek encoding is in force, or when one of the Latin
+% encodings is in force; but we must pay attention, because there exist already
+% the command |\cap| to be used in mathematics; therefore we better exclude this
+% possibility through a clever use of the |\textormath| macro. Therefore we
+% first save the math command into an alia |\mcap|; then we define three
+% textual commands for the various encodings |\tcap|; finnally we use
+% |\textormath|:
+% \begin{macrocode}
+\let\mcap\cap
+\DeclareTextCommand{\tcap}{\GRencoding@name}{\cap@}
+\DeclareTextCommand{\tcap}{OT1}{\cap@}
+\DeclareTextCommand{\tcap}{T1}{\cap@}
+\DeclareRobustCommand*\cap{\textormath{\tcap}{\mcap}}
+% \end{macrocode}
+% Probably one definition would be sufficient, but on one side the presence of three
+% encoding dependent macros are the remains of initial works, while on the other
+% side they prevent to use these macros with encodings for which the macro might not
+% work well, because it was not tested with them.
+% \end{macro}
+%
+% \begin{macro}{\cap@cedilla}
+% Similarly a small cap can be put under another letter as it was a cedilla; for
+% this task another macro is defined, which makes use of the same glyph in
+% position~1 in the Greek font table:
+% \begin{macrocode}
+\newcommand*\cap@cedilla[1]{\leavevmode
+{\setbox4\hbox{\fontencoding{\GRencoding@name}\selectfont\char1}%
+\dimen@-.5\wd4
+\setbox\z@\hbox{#1}%
+\ifx\cf@encoding\GRencoding@name
+ \ifx#1i\advance\dimen@ .65\wd\z@\else\advance\dimen@ .5\wd\z@\fi
+\else
+ \ifx#1i\advance\dimen@ .55\wd\z@\else\advance\dimen@ .5\wd\z@\fi
+\fi
+\hbox to\z@{\kern\dimen@\box4\hss}\unhbox\z@}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ring@cedilla}
+% Another cedilla like diacritical mark is the Scandinavian ring put under a letter;
+% the ring is taken from the metrics font, so its slot position does not depend
+% on the various Latin encodings; the correct positioning requires careful
+% examination of the letter under which it is to be placed, distinguishing the Greek
+% from the Latin encodings:
+% \begin{macrocode}
+\newcommand*\ring@cedilla[1]{\leavevmode
+{\setbox4\hbox{\metricsfont\char26}%
+\edef\slant@{\strip@pt\fontdimen1\font}%
+\dimen@-.5\wd4\ifdim\slant@\p@>\z@\advance\dimen@-.04ex\fi
+\setbox\z@\hbox{#1}%
+\ifx\cf@encoding\GRencoding@name
+ \advance\dimen@ .45\wd\z@
+ \ifx#1h\advance\dimen@-.13\wd\z@\fi
+ \ifx#1a\advance\dimen@-.07\wd\z@\fi
+ \ifx#1o\advance\dimen@-.07\wd\z@\fi
+ \ifx#1u\advance\dimen@+.07\wd\z@\fi
+ \ifx#1w\advance\dimen@+.03\wd\z@\fi
+\else
+ \ifx#1i\advance\dimen@.55\wd\z@\else
+ \ifx#1r\advance\dimen@.38\wd\z@\else
+ \ifx#1o\advance\dimen@.47\wd\z@\else
+ \advance\dimen@0.5\wd\z@
+ \fi\fi\fi
+\fi
+\hbox to\z@{\kern\dimen@\box4\hss}\unhbox\z@}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dot@cedilla}
+% Even the standard \LaTeX\ macro |dot| must be redefined with a cedilla like macro,
+% so as to make use of a special dot from the metric symbols font:
+% \begin{macrocode}
+\newcommand*\dot@cedilla[1]{\leavevmode
+{\setbox4\hbox{\metricsfont\char27}%
+\dimen@-.5\wd4
+\setbox\tw@\hbox{i}\setbox\z@\hbox{#1}%
+\ifx\cf@encoding\GRencoding@name
+ \advance\dimen@ .5\wd\z@
+ \ifx#1h\advance\dimen@-.13\wd\z@\fi
+\else
+ \ifdim\wd\z@>\wd\tw@\advance\dimen@.55\wd\z@
+ \else\advance\dimen@.5\wd\tw@\fi
+\fi
+\setbox\tw@\hbox{o}\ifdim\wd\z@=\wd\tw@\advance\dimen@-.05\wd\z@\fi
+\hbox to\z@{\kern\dimen@\box4\hss}\unhbox\z@}}
+
+% \end{macrocode}
+%\end{macro}
+%
+% \begin{macro}{\tie@cedilla}
+% \LaTeX\ has the macro |\t| for placing a ``tie'' over two letters; philologists
+% require also a tie under two letters; this is why another cedilla like macro is
+% needed:
+% \begin{macrocode}
+\newcommand*\tie@cedilla[1]{\leavevmode
+{\setbox4\hbox{\fontencoding{\GRencoding@name}\selectfont\char20}%
+\dimen@-.5\wd4
+\setbox\tw@\hbox{i}\setbox\z@\hbox{#1}%
+\ifx\cf@encoding\GRencoding@name
+ \advance\dimen@.5\wd\z@
+ \ifx#1h\advance\dimen@-.1\wd\z@\fi
+ \ifx#1u\advance\dimen@.15\wd\z@\fi
+\else
+ \ifdim\wd\z@>\wd\tw@\advance\dimen@ .55\wd\z@
+ \else\advance\dimen@ .5\wd\tw@\fi
+\fi
+\setbox\tw@\hbox{o}\ifdim\wd\z@=\wd\tw@\advance\dimen@-.05\wd\z@\fi
+\hbox to\z@{\kern\dimen@\box4\hss}\unhbox\z@}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Extended accent definitions}
+% We will use those service macros in the definition of several accent like macros
+% that keep all the intricacies away from the user.
+%
+% In particular the \LaTeX\ kernel macros are used in order to declare accents,
+% composite glyphs, composite commands, and the like; these are used as the default
+% definitions; afterwards other definitions will be given that work when these
+% composite macros don't work.
+%
+% In other words, while |\~| and |u| in Greek form the composite glyph ``upsilon
+% with circumflex'' that exists in the Greek font table, the same macro |\~| and the
+% letter |k| produce the superposition of a circumflex on top of a ``kappa'' glyph,
+% since this glyph does not exist in the Greek font table.
+%^^A
+%^^A NON SEMBRA CHE FUNZIONI CON TUTTI I COMANDI; CHIEDERE A GÜNTER
+%^^A
+% Notice that all these declarations are restricted to the Greek font encoding
+% so they are usable only when such encoding is in force. See the
+% |teubner-doc.pdf| file for more details concerning the usefulness of the
+% extended accent macros vs.~the ligature mechanism. In any case, with version
+% 3.9g of \babel\ and the modifications introduced by G\"unter Milde, the
+% actual \babel\-greek maintainer, during the year 2013, such extended accent
+% macros are LICR encoded and may always be used when typesetting in Greek;
+% see file \texttt{greek-fontenc.def} and \texttt{lgrenc.def} for further
+% details, remembering that such files are always loaded when typesetting
+% Greek texts, irrespective of the input encoding; if the encoding is
+% \texttt{utf8} direct Greek glyph input is possible (if your keyboard
+% allows you to do such input).
+%
+%\section{Avoiding conflicts}
+% Some LICR definitions are necessary to use \pack{teubner}, but some of them
+% are really important; therefore G\"unter Milde developed package
+% \pack{textslpha} that comes with the other special files for the Greek LICR
+% encoding, that avoids any conflict;we load it at the |\begin{document}|
+% execution so that it will be loaded only if necessary:
+% \begin{macrocode}
+\AtBeginDocument{\RequirePackage{textalpha}}
+% \end{macrocode}
+%
+% \subsection{Special accent macros}
+% Now we come back to the ``accent like'' and ``cedilla like'' general macros we
+% defined above, and that will be extensively used in the following definitions.
+% Note that for what the circumflex is concerned, when |teubner| is in effect it
+% is not defined as an active character and does not work as a non breaking space.
+% The command |\~| is just an accent macro; how do you put a non breaking space in
+% a Greek context? By simply using the \LaTeX\ kernel macro |\nobreakspace|; when
+% typesetting with non-Greek fonts the |~| is certainly handy
+% to insert a non breaking space (a tie), but for polytonic Greek spelling in the
+% past 15 years or so the Greek language definition file has always used the |~|
+% sign a letter, not as an active character. If you look in the \babel\ package
+% documentation related to the Greek language, you find that for what concerns the
+% |~| with polytonic spelling a number of ``dirty tricks'' have been used, but
+% nothing has been done to replace the ``tie'' function of this character when
+% typesetting in languages that use the Latin script; the only action related to
+% this point has been to redefine the kernel macros for typesetting figure and
+% table% captions so as to substitute the |~| character with its explicit
+% definition |\nobreakspace|. It is necessary to do the same when this package is
+% used, although a shorter alias command |\nbs| is provided in order to simplify
+% the input keying.
+% \begin{macrocode}
+\let\nbs\nobreakspace
+% \end{macrocode}
+%
+% Before defining the Greek accents with the extended macros input with the
+% LICR accent macros, we have to define the accent superpositioning macros that
+% with \pack{teubner} allow to stack from one to more accent over the base letter,
+% taking into account the slant of the font from which the base letter is taken.
+% Notice that these macros allow to set an accent on any base latter, even if that
+% might be meaningless. At the same time we redefine the standard macros so as to
+% let them do the same work when the LGR encoding is not in force. This duality is
+% necessary, not only for backward compatibility, but also for avoiding that the
+% normal redefined macros highjack the LICR facility.
+%
+% We first define aliases for the standard \LaTeX\ accents, so that when
+% entering Greek typesetting mode we can save the \LaTeX\ macros, and restore
+% them upon exiting:
+% \begin{macrocode}
+\let\accacuto\'
+\let\accgrave\`
+\let\acccircon\~
+\let\accdieresi\"
+\let\accbreve\u
+\let\accmacron\=
+% \end{macrocode}
+%
+% Then we define alternate macros for these accents, as ``lifting'' accent macros,
+% so that they can put their respective accent over any letter.
+% For the diaeresis we need to put an invisible character (|v| in the LGR encoded
+% CB fonts, that with LICR becomes |\textcompwordmark|) in order to avoid any
+% ligature with an implied end of word (boundarychar) that turns the diaeresis
+% into an apostrophe.
+% \begin{macrocode}
+\DeclareTextCommand{\G}{\GRencoding@name}[1]{\lift@accent{96}{#1}}
+\DeclareTextCommand{\A}{\GRencoding@name}[1]{\lift@accent{39}{#1}}
+\DeclareTextCommand{\C}{\GRencoding@name}[1]{\lift@accent{126}{#1}}
+\DeclareTextCommand{\D}{\GRencoding@name}[1]{\lift@accent{34\textcompwordmark}{#1}}
+\DeclareTextCommand{\B}{\GRencoding@name}[1]{\lift@accent{30}{#1}}
+\DeclareTextCommand{\M}{\GRencoding@name}[1]{\lift@accent{31}{#1}}
+%
+% \end{macrocode}
+% But we have to provide also the means for disabling the |~| shorthand that is
+% reset every time the Greek language is selected again in a multi language document
+% where language shifts take place quite often; we must also counteract the
+% resetting of the |\~| definition performed by the |greek.ld| file in every
+% language shift; we add the accent definition to the |\extrasgreek| macro,
+% and we reset them at |\noextrasgreek| execution.
+% \begin{macrocode}
+\addto\extrasgreek{\shorthandoff{~}\let\~\accperispomeni
+\let\"\accdialytika\let\'\acctonos\let\`\accvaria}
+\addto\noextrasgreek{\shorthandon{~}\let\~\acccircon
+\let\"\accdieresi\let\'\accacuto\let\`\accgrave}
+
+% \end{macrocode}
+%
+% Besides the normal |\B| command for setting a breve command, another ``large
+% breve'' is required by philologists, who need to mark a diphthong, or in general
+% two letters; the macro |\U| does the job, but it is the typesetter's
+% responsibility to input the macro argument as made of two letters (possibly with
+% their own accents):
+% \begin{macrocode}
+\DeclareTextCommand{\U}{\GRencoding@name}[1]{\lift@accent{151}{#1}}
+% rough
+\DeclareTextCommand{\r}{\GRencoding@name}[1]{\lift@accent{60}{#1}}
+% smooth
+\DeclareTextCommand{\s}{\GRencoding@name}[1]{\lift@accent{62}{#1}}
+% acute+diaeresis
+\DeclareTextCommand{\Ad}{\GRencoding@name}[1]{\lift@accent{35}{#1}}
+% grave+diaeresis
+\DeclareTextCommand{\Gd}{\GRencoding@name}[1]{\lift@accent{36}{#1}}
+% circumflex+diaeresis
+\DeclareTextCommand{\Cd}{\GRencoding@name}[1]{\lift@accent{32}{#1}}
+% acute+rough
+\DeclareTextCommand{\Ar}{\GRencoding@name}[1]{\lift@accent{86}{#1}}
+% grave+rough
+\DeclareTextCommand{\Gr}{\GRencoding@name}[1]{\lift@accent{67}{#1}}
+% circumflex+rough
+\DeclareTextCommand{\Cr}{\GRencoding@name}[1]{\lift@accent{64}{#1}}
+% acute+smooth
+\DeclareTextCommand{\As}{\GRencoding@name}[1]{\lift@accent{94}{#1}}
+% grave+smooth
+\DeclareTextCommand{\Gs}{\GRencoding@name}[1]{\lift@accent{95}{#1}}
+% circumflex+smooth
+\DeclareTextCommand{\Cs}{\GRencoding@name}[1]{\lift@accent{92}{#1}}
+% \end{macrocode}
+% Most of the above accent commands are used again in order to tie a text symbol
+% meaning to certain combinations, that is when they receive as argument a vowel
+% whose accented glyph is present in the font; in this way in order to type
+% ``alpha with rough breath, acute accent and iota subscript'' you can type
+% \verb"<'a|", or \verb"\Ar{a}|" or |\arai| or \verb+\<'a|+, if you use the new standard
+% accent macros; the advantage of using the first notation is its short string; the
+% advantage of the second is that it does not break kerning commands with a
+% preceding letter; the advantage of the third is that it does not break any
+% kerning either before or after; the fourth solution produces the same result as
+% the third, but it's easier to make up and you don't have to memorise any specific
+% naming rule for accented glyphs. With the Lipsian font this trick is particularly
+% useful for any sequence of alpha and upsilon each one with its own accents and/or
+% diaeresis.
+%
+% In Greek the regular cedilla is meaningless, so that |\c| may be redefined
+% as a semivowel command; at the same time the typesetter might be more
+% comfortable if he could always use the same, although longer, macro for
+% marking a vowel as a semivowel one; therefore |\c| plays the same role
+% in Greek as |\semiv|.
+% \begin{macrocode}
+% cap cedilla
+\DeclareTextCommand{\c}{\GRencoding@name}[1]{\cap@cedilla{#1}}
+\DeclareTextCommand{\semiv}{\GRencoding@name}[1]{\cap@cedilla{#1}}
+\DeclareTextCommand{\semiv}{OT1}[1]{\cap@cedilla{#1}}
+\DeclareTextCommand{\semiv}{T1}[1]{\cap@cedilla{#1}}
+% ring cedilla
+\DeclareTextCommand{\ring}{\GRencoding@name}[1]{\ring@cedilla{#1}}
+\DeclareTextCommand{\ring}{OT1}[1]{\ring@cedilla{#1}}
+\DeclareTextCommand{\ring}{T1}[1]{\ring@cedilla{#1}}
+% dot cedilla
+\DeclareTextCommand{\Dot}{\GRencoding@name}[1]{\dot@cedilla{#1}}
+\DeclareTextCommand{\Dot}{OT1}[1]{\dot@cedilla{#1}}
+\DeclareTextCommand{\Dot}{T1}[1]{\dot@cedilla{#1}}
+% tie cedilla
+\DeclareTextCommand{\ut}{\GRencoding@name}[1]{\tie@cedilla{#1}}
+\DeclareTextCommand{\ut}{OT1}[1]{\tie@cedilla{#1}}
+\DeclareTextCommand{\ut}{T1}[1]{\tie@cedilla{#1}}
+%
+% Acute breve
+\DeclareTextCommand{\Ab}{\GRencoding@name}[1]%
+ {\LIFT@accent{39}{-.15ex}{\lift@accent{30}{#1}}}
+% Grave breve
+\DeclareTextCommand{\Gb}{\GRencoding@name}[1]%
+ {\LIFT@accent{96}{-.15ex}{\lift@accent{30}{#1}}}
+% Acute rough breve
+\DeclareTextCommand{\Arb}{\GRencoding@name}[1]%
+ {\LIFT@accent{86}{-.15ex}{\lift@accent{30}{#1}}}
+% Grave rough breve
+\DeclareTextCommand{\Grb}{\GRencoding@name}[1]%
+ {\LIFT@accent{67}{-.15ex}{\lift@accent{30}{#1}}}
+% Acute smooth breve
+\DeclareTextCommand{\Asb}{\GRencoding@name}[1]%
+ {\LIFT@accent{94}{-.15ex}{\lift@accent{30}{#1}}}
+% Grave smooth breve
+\DeclareTextCommand{\Gsb}{\GRencoding@name}[1]%
+ {\LIFT@accent{95}{-.15ex}{\lift@accent{30}{#1}}}
+%
+% Acute macron
+\DeclareTextCommand{\Am}{\GRencoding@name}[1]%
+ {\Lift@accent{39}{\lift@accent{31}{#1}}}
+% Grave macron
+\DeclareTextCommand{\Gm}{\GRencoding@name}[1]%
+ {\Lift@accent{96}{\lift@accent{31}{#1}}}
+% Circumflex macron
+\DeclareTextCommand{\Cm}{\GRencoding@name}[1]%
+ {\Lift@accent{126}{\lift@accent{31}{#1}}}
+% Acute rough macron
+\DeclareTextCommand{\Arm}{\GRencoding@name}[1]%
+ {\Lift@accent{86}{\lift@accent{31}{#1}}}
+% Grave rough macron
+\DeclareTextCommand{\Grm}{\GRencoding@name}[1]%
+ {\Lift@accent{67}{\lift@accent{31}{#1}}}
+% Circumflex rough macron
+\DeclareTextCommand{\Crm}{\GRencoding@name}[1]%
+ {\Lift@accent{64}{\lift@accent{31}{#1}}}
+% Acute smooth macron
+\DeclareTextCommand{\Asm}{\GRencoding@name}[1]%
+ {\Lift@accent{94}{\lift@accent{31}{#1}}}
+% Grave smooth macron
+\DeclareTextCommand{\Gsm}{\GRencoding@name}[1]%
+ {\Lift@accent{95}{\lift@accent{31}{#1}}}
+% Circumflex smooth macron
+\DeclareTextCommand{\Csm}{\GRencoding@name}[1]%
+ {\Lift@accent{92}{\lift@accent{31}{#1}}}
+% smooth macron
+\DeclareTextCommand{\Sm}{\GRencoding@name}[1]%
+ {\Lift@accent{62}{\lift@accent{31}{#1}}}
+% rough macron
+\DeclareTextCommand{\Rm}{\GRencoding@name}[1]%
+ {\Lift@accent{60}{\lift@accent{31}{#1}}}
+% smooth breve
+\DeclareTextCommand{\Sb}{\GRencoding@name}[1]%
+ {\LIFT@accent{62}{-0.15ex}{\lift@accent{30}{#1}}}
+% rough breve
+\DeclareTextCommand{\Rb}{\GRencoding@name}[1]%
+ {\LIFT@accent{60}{-0.15ex}{\lift@accent{30}{#1}}}
+% breve and dieresis
+\DeclareTextCommand{\bd}{\GRencoding@name}[1]%
+ {\LIFT@accent{30}{-.1ex}{\lift@accent{34v}{#1}}}
+%
+% iota subscript
+\DeclareTextCommand{\iS}{\GRencoding@name}[1]
+ {\ooalign{#1\crcr\hidewidth\char124\hidewidth}}
+
+% \end{macrocode}
+%
+% \begin{macro}{\d}
+% The |\d| macro must be made available also with the Greek encoding
+% \begin{macrocode}
+\DeclareTextCommand{\d}{\GRencoding@name}[1]%
+ {\leavevmode\bgroup\o@lign{\relax#1\crcr
+ \hidewidth\sh@ft{10}.\hidewidth}\egroup}
+
+% \end{macrocode}
+% \end{macro}
+%
+% Some other philologist diacritical marks are needed.
+%
+% \begin {macro}{\Open}
+% The |\Open| macro sets a special sign under a letter in order
+% to mark it with an open pronunciation.
+% \begin{macrocode}
+\DeclareRobustCommand{\Open}[1]{\leavevmode
+{\setbox4\hbox{\raise-.33ex\hbox{\metricsfont\char14}}%
+\dimen@-.5\wd4
+\setbox\tw@\hbox{i}\setbox\z@\hbox{#1}%
+\ifx\cf@encoding\GRencoding@name
+ \advance\dimen@ .5\wd\z@
+ \setbox\tw@\hbox{h}\ifdim\wd\z@=\wd\tw@\advance\dimen@-.13\wd\z@\fi
+\else
+ \ifdim\wd\z@>\wd\tw@\advance\dimen@ .55\wd\z@
+ \else\advance\dimen@ .5\wd\tw@\fi
+\fi
+\setbox\tw@\hbox{o}\ifdim\wd\z@=\wd\tw@\advance\dimen@-.05\wd\z@\fi
+\hbox to\z@{\kern\dimen@\box4\hss}\unhbox\z@}}
+
+% \end{macrocode}
+% \end{macro}
+% \begin {macro}{\nasal}
+% The macro |\nasal| marks a letter for a nasal pronunciation.
+% \begin{macrocode}
+\DeclareRobustCommand{\nasal}[1]{\leavevmode
+{\setbox4\hbox{\raise-1.7ex\hbox{\GEcq}}%
+\dimen@-.5\wd4
+\setbox\tw@\hbox{i}\setbox\z@\hbox{#1}%
+\ifx\cf@encoding\GRencoding@name
+ \advance\dimen@ .5\wd\z@
+ \setbox\tw@\hbox{h}\ifdim\wd\z@=\wd\tw@\advance\dimen@-.13\wd\z@\fi
+\else
+ \ifdim\wd\z@>\wd\tw@\advance\dimen@ .55\wd\z@
+ \else\advance\dimen@ .5\wd\tw@\fi
+\fi
+\setbox\tw@\hbox{o}\ifdim\wd\z@=\wd\tw@\advance\dimen@-.05\wd\z@\fi
+\hbox to\z@{\kern\dimen@\box4\hss}\unhbox\z@}}
+
+% \end{macrocode}
+% \end{macro}
+%\begin {macro}{\tenaspir}
+% Similarly |\tenaspir| marks a ``tenuis aspiratio''
+% \begin{macrocode}
+\DeclareRobustCommand{\tenaspir}[1]{#1\/%
+ {\fontencoding{\GRencoding@name}\selectfont<v}}
+% \end{macrocode}
+% \end{macro}
+%\begin{macro}{\palat}
+% |\palat| marks a palatal pronunciation of some consonants.
+% \begin{macrocode}
+\DeclareRobustCommand{\palat}[1]{#1{%
+ \expandafter\fontencoding\expandafter{\GRencoding@name}\selectfont
+ \anwtonos}}
+
+% \end{macrocode}
+%\end{macro}
+%
+% With the help of the previous macros some new commands get defined so as
+% to use a simple more or less mnemonic macro instead of having the typesetter type
+% in nested macros; these macros are valid only in the Greek and Latin encodings.
+% \begin{macrocode}
+% dot and breve
+\DeclareTextCommand{\Ud}{\GRencoding@name}[1]{\d{\u{#1}}}
+% dot and macron
+\DeclareTextCommand{\md}{\GRencoding@name}[1]{\d{\={#1}}}
+% open and breve
+\DeclareTextCommand{\UO}{\GRencoding@name}[1]{\Open{\u{#1}}}
+% open and macron
+\DeclareTextCommand{\mO}{\GRencoding@name}[1]{\Open{\={#1}}}
+
+%
+\DeclareTextCommand{\Ud}{T1}[1]{\d{\u{#1}}}
+\DeclareTextCommand{\md}{T1}[1]{\d{\={#1}}}
+\DeclareTextCommand{\UO}{T1}[1]{\Open{\u{#1}}}
+\DeclareTextCommand{\mO}{T1}[1]{\Open{\={#1}}}
+%
+\DeclareTextCommand{\Ud}{OT1}[1]{\d{\u{#1}}}
+\DeclareTextCommand{\md}{OT1}[1]{\d{\={#1}}}
+\DeclareTextCommand{\UO}{OT1}[1]{\Open{\u{#1}}}
+\DeclareTextCommand{\mO}{OT1}[1]{\Open{\={#1}}}
+
+% \end{macrocode}
+%
+% \subsection{Some text commands}
+% \begin{macro}{\greekquoteleft}
+% \begin{macro}{\greekquoteright}
+% \begin{macro}{\textguillemotleft}
+% \begin{macro}{\textguillemotright}
+% \begin{macro}{\textcompwordmark}
+% \begin{macro}{\textemdash}
+% \begin{macro}{emdash}
+% \begin{macro}{\textendash}
+% All these macros are defined by the new \texttt{lgrenc.def} file, so it is not necessary to redefine them.% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%\begin{macro}{\stigma}
+%\begin{macro}{\varstigma}
+%\begin{macro}{\koppa}
+%\begin{macro}{\coppa}
+%\begin{macro}{\varkoppa}
+%\begin{macro}{\sampi}
+%\begin{macro}{\Coppa}
+%\begin{macro}{\Stigma}
+%\begin{macro}{\Sampi}
+%\begin{macro}{\Euro}
+%\begin{macro}{\permill} S
+% These macros, too, are defined by the \texttt{lgrenc.def} file and subsidiaries,
+% but with different names; therefore we make some aliases:
+% \begin{macrocode}
+\let\stigma\textstigma
+\let\varstigma\textvarstigma
+\let\koppa\textkoppa
+\let\qoppa\textqoppa
+\let\coppa\textqoppa
+\let\Koppa\textQoppa
+\let\Coppa\textQoppa
+\let\varkoppa\textqoppa
+\let\sampi\textsampi
+\let\Stigma\textStigma
+\let\Sampi\textsampi
+\let\f\textdigamma
+\let\F\textDigamma\let\Digamma\F
+\let\Euro\texteuro
+\let\permill\textperthousand
+\let\schwa\textschwa
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\textdollar}
+%\begin{macro}{\textsection}
+%\begin{macro}{\textsterling}
+%\begin{macro}{\textunderscore}
+%\begin{macro}{\textvisiblespace}
+% More important, although unlikely to be found in a philological text, is the
+% question of standard \LaTeX\ commands that are defined with reference to some
+% encoding; if Greek text is being typeset, the Greek encoding is being used and
+% such symbols would not be available any more; \LaTeX would issue warning messages
+% complaining for their absence. Therefore we redefined them also for the Greek
+% encoding.
+% \begin{macrocode}
+\DeclareTextCommand{\textdollar}{\GRencoding@name}%
+ {{\fontencoding{T1}\selectfont\char36}}
+\DeclareTextCommand{\textsection}{\GRencoding@name}%
+ {{\fontencoding{T1}\selectfont\char159}}
+\DeclareTextCommand{\textsterling}{\GRencoding@name}%
+ {{\fontencoding{T1}\selectfont\char191}}
+\DeclareTextCommand{\textunderscore}{\GRencoding@name}%
+ {{\fontencoding{T1}\selectfont\char95}}
+\DeclareTextCommand{\textvisiblespace}{\GRencoding@name}%
+ {{\fontencoding{T1}\selectfont\char32}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%
+% \subsection{Accent macros and glyph names}
+% Now come dozens of macros that allow to access Greek accented vowels (plus rho
+% with rough and smooth breaths) with macros instead of ligatures; such macros
+% allow the kerning information to be used by \TeX, while the ligature mechanism
+% would sometimes impeach the use of such kerning information. Notice that the
+% same glyphs are often accessed with a ``text symbol'' or a ``text composite
+% symbol''; as explained above the opportunity of using either one derives from
+% the necessity of maintaining the kerning mechanism embedded in the font; if the
+% CB fonts had a postfixed accent notation, instead of a prefixed one, none of
+% these macros would be necessary (probably\dots!), but there would be other
+% inconveniences.
+%
+% Notice that the following code is subject to the boolean variable |GlyphNames|
+% which is set to \emph{false} by default, just for compatibility with the past;
+% I suggest to use the \emph{GlyphNames} option when when you really want to use
+% such macros; remember though that all these glyphs are more easily specified by
+% means of the extended accent macros that are also less restricted in their
+% names; for a letter marked with a smooth breath and an acute accent you can
+% indifferently type before the letter one of the following |\>\'|, |\>'|, |\'\>|,
+% |\'>| at your choice. Moreover you can always postfix the mark for the iota
+% subscribed at the right of the letter, without any need o memorising complicated
+% names.
+%
+% Notice the macros |\oR| and |\oG| that have the second letter capitalised in
+% order to avoid conflicts with otherwise homonymous macros defined in the \LaTeX\
+% kernel or in other packages; by maintaining the false value to the boolean
+% variable |GlyphNames| you are sure to avoid conflicts.
+% \begin{macrocode}
+\ifGlyphNames
+\DeclareTextSymbol{\ag}{\GRencoding@name}{128}
+\DeclareTextSymbol{\ar}{\GRencoding@name}{129}
+\DeclareTextComposite{\r}{\GRencoding@name}{a}{129}
+\DeclareTextSymbol{\as}{\GRencoding@name}{130}
+\DeclareTextComposite{\s}{\GRencoding@name}{a}{130}
+\DeclareTextSymbol{\aa}{\GRencoding@name}{136}
+\DeclareTextSymbol{\ac}{\GRencoding@name}{144}
+\DeclareTextSymbol{\ai}{\GRencoding@name}{248}
+\DeclareTextSymbol{\aai}{\GRencoding@name}{140}
+\DeclareTextSymbol{\aci}{\GRencoding@name}{148}
+\DeclareTextSymbol{\agi}{\GRencoding@name}{132}
+\DeclareTextSymbol{\ara}{\GRencoding@name}{137}
+\DeclareTextComposite{\Ar}{\GRencoding@name}{a}{137}
+\DeclareTextSymbol{\arc}{\GRencoding@name}{145}
+\DeclareTextComposite{\Cr}{\GRencoding@name}{a}{145}
+\DeclareTextSymbol{\arg}{\GRencoding@name}{131}
+\DeclareTextComposite{\Gr}{\GRencoding@name}{a}{131}
+\DeclareTextSymbol{\ari}{\GRencoding@name}{133}
+\DeclareTextSymbol{\asa}{\GRencoding@name}{138}
+\DeclareTextComposite{\As}{\GRencoding@name}{a}{138}
+\DeclareTextSymbol{\asc}{\GRencoding@name}{146}
+\DeclareTextComposite{\Cs}{\GRencoding@name}{a}{146}
+\DeclareTextSymbol{\asg}{\GRencoding@name}{139}
+\DeclareTextComposite{\Gs}{\GRencoding@name}{a}{139}
+\DeclareTextSymbol{\asi}{\GRencoding@name}{134}
+\DeclareTextSymbol{\argi}{\GRencoding@name}{135}
+\DeclareTextSymbol{\arai}{\GRencoding@name}{141}
+\DeclareTextSymbol{\arci}{\GRencoding@name}{149}
+\DeclareTextSymbol{\asai}{\GRencoding@name}{142}
+\DeclareTextSymbol{\asgi}{\GRencoding@name}{143}
+\DeclareTextSymbol{\asci}{\GRencoding@name}{150}
+\DeclareTextSymbol{\hg}{\GRencoding@name}{152}
+\DeclareTextSymbol{\hr}{\GRencoding@name}{153}
+\DeclareTextComposite{\r}{\GRencoding@name}{h}{153}
+\DeclareTextSymbol{\hs}{\GRencoding@name}{154}
+\DeclareTextComposite{\s}{\GRencoding@name}{h}{154}
+\DeclareTextSymbol{\hrg}{\GRencoding@name}{163}
+\DeclareTextComposite{\Gr}{\GRencoding@name}{h}{163}
+\DeclareTextSymbol{\hgi}{\GRencoding@name}{156}
+\DeclareTextSymbol{\hri}{\GRencoding@name}{157}
+\DeclareTextSymbol{\hsi}{\GRencoding@name}{158}
+\DeclareTextSymbol{\hrgi}{\GRencoding@name}{167}
+\DeclareTextSymbol{\ha}{\GRencoding@name}{160}
+\DeclareTextSymbol{\hra}{\GRencoding@name}{161}
+\DeclareTextComposite{\Ar}{\GRencoding@name}{h}{161}
+\DeclareTextSymbol{\hsa}{\GRencoding@name}{162}
+\DeclareTextComposite{\As}{\GRencoding@name}{h}{162}
+\DeclareTextSymbol{\hsg}{\GRencoding@name}{171}
+\DeclareTextComposite{\Gs}{\GRencoding@name}{h}{171}
+\DeclareTextSymbol{\hai}{\GRencoding@name}{164}
+\DeclareTextSymbol{\hrai}{\GRencoding@name}{165}
+\DeclareTextSymbol{\hsai}{\GRencoding@name}{166}
+\DeclareTextSymbol{\hsgi}{\GRencoding@name}{175}
+\DeclareTextSymbol{\hc}{\GRencoding@name}{168}
+\DeclareTextSymbol{\hrc}{\GRencoding@name}{169}
+\DeclareTextComposite{\Cr}{\GRencoding@name}{h}{169}
+\DeclareTextSymbol{\hsc}{\GRencoding@name}{170}
+\DeclareTextComposite{\Cs}{\GRencoding@name}{h}{170}
+\DeclareTextSymbol{\hci}{\GRencoding@name}{172}
+\DeclareTextSymbol{\hrci}{\GRencoding@name}{173}
+\DeclareTextSymbol{\hsci}{\GRencoding@name}{174}
+\DeclareTextSymbol{\hi}{\GRencoding@name}{249}
+\DeclareTextSymbol{\wg}{\GRencoding@name}{176}
+\DeclareTextSymbol{\wr}{\GRencoding@name}{177}
+\DeclareTextComposite{\r}{\GRencoding@name}{w}{177}
+\DeclareTextSymbol{\ws}{\GRencoding@name}{178}
+\DeclareTextComposite{\s}{\GRencoding@name}{w}{178}
+\DeclareTextSymbol{\wrg}{\GRencoding@name}{179}
+\DeclareTextComposite{\Gr}{\GRencoding@name}{w}{179}
+\DeclareTextSymbol{\wgi}{\GRencoding@name}{180}
+\DeclareTextSymbol{\wri}{\GRencoding@name}{181}
+\DeclareTextSymbol{\wsi}{\GRencoding@name}{182}
+\DeclareTextSymbol{\wrgi}{\GRencoding@name}{183}
+\DeclareTextSymbol{\wa}{\GRencoding@name}{184}
+\DeclareTextSymbol{\wra}{\GRencoding@name}{185}
+\DeclareTextComposite{\Ar}{\GRencoding@name}{w}{185}
+\DeclareTextSymbol{\wsa}{\GRencoding@name}{186}
+\DeclareTextComposite{\As}{\GRencoding@name}{w}{186}
+\DeclareTextSymbol{\wsg}{\GRencoding@name}{187}
+\DeclareTextComposite{\Gs}{\GRencoding@name}{w}{187}
+\DeclareTextSymbol{\wai}{\GRencoding@name}{188}
+\DeclareTextSymbol{\wrai}{\GRencoding@name}{189}
+\DeclareTextSymbol{\wsai}{\GRencoding@name}{190}
+\DeclareTextSymbol{\wsgi}{\GRencoding@name}{191}
+\DeclareTextSymbol{\wc}{\GRencoding@name}{192}
+\DeclareTextSymbol{\wrc}{\GRencoding@name}{193}
+\DeclareTextComposite{\Cr}{\GRencoding@name}{w}{193}
+\DeclareTextSymbol{\wsc}{\GRencoding@name}{194}
+\DeclareTextComposite{\Cs}{\GRencoding@name}{w}{194}
+\DeclareTextSymbol{\wci}{\GRencoding@name}{196}
+\DeclareTextSymbol{\wrci}{\GRencoding@name}{197}
+\DeclareTextSymbol{\wsci}{\GRencoding@name}{198}
+\DeclareTextSymbol{\wi}{\GRencoding@name}{250}
+\DeclareTextSymbol{\ig}{\GRencoding@name}{200}
+\DeclareTextSymbol{\ir}{\GRencoding@name}{201}
+\DeclareTextComposite{\r}{\GRencoding@name}{i}{201}
+\DeclareTextSymbol{\is}{\GRencoding@name}{202}
+\DeclareTextComposite{\s}{\GRencoding@name}{i}{202}
+\DeclareTextSymbol{\irg}{\GRencoding@name}{203}
+\DeclareTextComposite{\Gr}{\GRencoding@name}{i}{203}
+\DeclareTextSymbol{\ia}{\GRencoding@name}{208}
+\DeclareTextSymbol{\ira}{\GRencoding@name}{209}
+\DeclareTextComposite{\Ar}{\GRencoding@name}{i}{209}
+\DeclareTextSymbol{\isa}{\GRencoding@name}{210}
+\DeclareTextComposite{\As}{\GRencoding@name}{i}{210}
+\DeclareTextSymbol{\isg}{\GRencoding@name}{211}
+\DeclareTextComposite{\Gs}{\GRencoding@name}{i}{211}
+\DeclareTextSymbol{\ic}{\GRencoding@name}{216}
+\DeclareTextSymbol{\irc}{\GRencoding@name}{217}
+\DeclareTextComposite{\Cr}{\GRencoding@name}{i}{217}
+\DeclareTextSymbol{\isc}{\GRencoding@name}{218}
+\DeclareTextComposite{\Cs}{\GRencoding@name}{i}{218}
+\DeclareTextSymbol{\id}{\GRencoding@name}{240}
+\DeclareTextSymbol{\idg}{\GRencoding@name}{241}
+\DeclareTextComposite{\Gd}{\GRencoding@name}{i}{241}
+\DeclareTextSymbol{\ida}{\GRencoding@name}{242}
+\DeclareTextComposite{\Ad}{\GRencoding@name}{i}{242}
+\DeclareTextSymbol{\idc}{\GRencoding@name}{243}
+\DeclareTextComposite{\Cd}{\GRencoding@name}{i}{243}
+\DeclareTextSymbol{\ug}{\GRencoding@name}{204}
+\DeclareTextSymbol{\ur}{\GRencoding@name}{205}
+\DeclareTextComposite{\r}{\GRencoding@name}{u}{205}
+\DeclareTextSymbol{\us}{\GRencoding@name}{206}
+\DeclareTextComposite{\s}{\GRencoding@name}{u}{206}
+\DeclareTextSymbol{\urg}{\GRencoding@name}{207}
+\DeclareTextComposite{\Gr}{\GRencoding@name}{u}{207}
+\DeclareTextSymbol{\ua}{\GRencoding@name}{212}
+\DeclareTextSymbol{\ura}{\GRencoding@name}{213}
+\DeclareTextComposite{\Ar}{\GRencoding@name}{u}{213}
+\DeclareTextSymbol{\usa}{\GRencoding@name}{214}
+\DeclareTextComposite{\As}{\GRencoding@name}{u}{214}
+\DeclareTextSymbol{\usg}{\GRencoding@name}{215}
+\DeclareTextComposite{\Gs}{\GRencoding@name}{u}{215}
+\DeclareTextSymbol{\uc}{\GRencoding@name}{220}
+\DeclareTextSymbol{\urc}{\GRencoding@name}{221}
+\DeclareTextComposite{\Cr}{\GRencoding@name}{u}{221}
+\DeclareTextSymbol{\usc}{\GRencoding@name}{222}
+\DeclareTextComposite{\Cs}{\GRencoding@name}{u}{222}
+\DeclareTextSymbol{\ud}{\GRencoding@name}{244}
+\DeclareTextSymbol{\udg}{\GRencoding@name}{245}
+\DeclareTextComposite{\Gd}{\GRencoding@name}{u}{245}
+\DeclareTextSymbol{\uda}{\GRencoding@name}{246}
+\DeclareTextComposite{\Ad}{\GRencoding@name}{u}{246}
+\DeclareTextSymbol{\udc}{\GRencoding@name}{247}
+\DeclareTextComposite{\Cd}{\GRencoding@name}{u}{247}
+\DeclareTextSymbol{\eg}{\GRencoding@name}{224}
+\DeclareTextSymbol{\er}{\GRencoding@name}{225}
+\DeclareTextComposite{\r}{\GRencoding@name}{e}{225}
+\DeclareTextSymbol{\es}{\GRencoding@name}{226}
+\DeclareTextComposite{\s}{\GRencoding@name}{e}{226}
+\DeclareTextSymbol{\erg}{\GRencoding@name}{227}
+\DeclareTextComposite{\Gr}{\GRencoding@name}{e}{227}
+\DeclareTextSymbol{\ea}{\GRencoding@name}{232}
+\DeclareTextSymbol{\era}{\GRencoding@name}{233}
+\DeclareTextComposite{\Ar}{\GRencoding@name}{e}{233}
+\DeclareTextSymbol{\esa}{\GRencoding@name}{234}
+\DeclareTextComposite{\As}{\GRencoding@name}{e}{234}
+\DeclareTextSymbol{\esg}{\GRencoding@name}{235}
+\DeclareTextComposite{\Gs}{\GRencoding@name}{e}{235}
+\DeclareTextSymbol{\oR}{\GRencoding@name}{229}
+\DeclareTextComposite{\r}{\GRencoding@name}{o}{229}
+\DeclareTextSymbol{\oG}{\GRencoding@name}{228}
+\DeclareTextSymbol{\os}{\GRencoding@name}{230}
+\DeclareTextComposite{\s}{\GRencoding@name}{o}{230}
+\DeclareTextSymbol{\org}{\GRencoding@name}{231}
+\DeclareTextComposite{\Gr}{\GRencoding@name}{o}{231}
+\DeclareTextSymbol{\oa}{\GRencoding@name}{236}
+\DeclareTextSymbol{\ora}{\GRencoding@name}{237}
+\DeclareTextComposite{\Ar}{\GRencoding@name}{o}{237}
+\DeclareTextSymbol{\osa}{\GRencoding@name}{238}
+\DeclareTextComposite{\As}{\GRencoding@name}{o}{238}
+\DeclareTextSymbol{\osg}{\GRencoding@name}{239}
+\DeclareTextComposite{\Gs}{\GRencoding@name}{o}{239}
+\DeclareTextSymbol{\rr}{\GRencoding@name}{251}
+\DeclareTextComposite{\r}{\GRencoding@name}{r}{251}
+\DeclareTextSymbol{\rs}{\GRencoding@name}{252}
+\DeclareTextComposite{\s}{\GRencoding@name}{r}{252}
+\DeclareTextSymbol{\Id}{\GRencoding@name}{219}
+\DeclareTextSymbol{\Ud}{\GRencoding@name}{223}
+\DeclareTextComposite{\"}{\GRencoding@name}{U}{223}
+\fi
+
+%
+% \end{macrocode}
+%
+% \subsection{Text philological symbols and macros}
+% Next come some short macros for inserting special symbols that philologists
+% use quite often in Greek.
+%\begin{macro}{\h}
+% Macro |\h| is used to insert a Latin ``h'' while typesetting in Greek.
+%\begin{macro}{\q}
+% Macro |\q| is used to insert a Latin ``q'' while typesetting in Greek.
+%\begin{macro}{\yod}
+%\begin{macro}{\iod}
+% Macros |\yod| and |\iod| are used to insert a
+% Latin ``j'' while typesetting in Greek; the control sequence |\jod| was avoided in
+% order to reduce the possibility of typing |\jot| which is a \TeX\ internal
+% dimension.
+% \begin{macrocode}
+\DeclareTextCommand{\h}{\GRencoding@name}%
+ {{\fontencoding{OT1}\selectfont h}}
+\DeclareTextCommand{\q}{\GRencoding@name}%
+ {{\fontencoding{OT1}\selectfont q}}
+\DeclareTextCommand{\yod}{\GRencoding@name}%
+ {{\fontencoding{OT1}\selectfont j}}%
+\let\iod\yod
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin {macro}{\f}
+%\begin {macro}{\F}
+%\begin {macro}{\digamma}
+%\begin {macro}{\Digamma}
+% At the same time it was believed that for inserting lower and upper case
+% ``digamma'' it was preferable to use short macros and to avoid the dilemma between
+% the |\ddigamma| and the |\digamma| macros, the former being the
+% one defined in the |greek| option to \babel, the latter being
+% a standard mathematical symbol; initially I believed that philologists do
+% not use mathematical symbols so we made |\digamma| an alias for |\f|;
+% afterwards I
+% found out that mathematicians, physicists, engineers,~\dots\ use the
+% \textsf{teubner.sty} package and that the |\digamma| is a symbol already defined
+% in the package \textsf{amssymb.sty}; therefore I made a conditional creation of
+% this alias; this trick is delayed to the beginning of the document, so as to
+% make it independent on the order with which packages are loaded.
+% \begin{macrocode}
+\AtBeginDocument{\unless\ifcsname digamma\endcsname\let\digamma\textdigamma\fi}
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin {macro}{\fLow}
+%\begin {macro}{\fHigh}
+% The digamma glyphs set forth another question because, according to Paolo
+% Ciacchi, a different glyph should be used for typesetting text compared with
+% the one that is used as a variant in Milesian numerals in place of the standard
+% stigma symbol.
+% By means of macros |\fLow| or |\fHigh| it is possible to chose the raised or the
+% lowered digamma glyphs; Greek numerals always use the lowered one, while when
+% text is being typeset the typesetter can chose the version he likes best.
+% \begin{macrocode}
+\DeclareRobustCommand{\fLow}%
+ {{\setbox\z@\hbox{\f}\dimen@\ht\z@
+ \advance\dimen@-1ex\raise-\dimen@\hbox{\box\z@}}}
+\DeclareRobustCommand{\fHigh}%
+ {{\setbox\z@\hbox{\f}\dimen@\dp\z@\raise\dimen@\hbox{\box\z@}}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\qmark}
+%\begin{macro}{\lpar}
+%\begin{macro}{\rpar}
+%\begin{macro}{\frapar}
+% Here we start a set of miscellaneous macros. We begin with some parentheses
+% that should turn out in upright shape, even if the default font is the Lipsian
+% one which is oblique; its parentheses are oblique as in all oblique fonts,
+% therefore we need to quietly change fonts behind the scenes. The same is true with
+% the question mark that, philologically speaking, represents an uncertain element,
+% not the termination of a real question; it should therefore always come out
+% between parentheses and in upright shape from a Latin font. While the
+% parenthesized question mark comes from the OT1 Latin upright font, the parentheses
+% obtained with |\lpar| and |\rpar| are taken from the metric symbols font, as well
+% as the parentheses used in the parenthesized text processed with macro |\frapar|.
+% \begin{macrocode}
+\DeclareRobustCommand\qmark{\hskip.16ex{\fontencoding{OT1}\upshape(?)}}
+\DeclareRobustCommand\lpar{{\metricsfont(}}
+\DeclareRobustCommand\rpar{{\metricsfont)}}
+\DeclareRobustCommand\frapar[1]{\lpar#1\rpar}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\ap}
+% The apex/superscript macro |\ap| does not differ much from the plain standard
+% \LaTeX\ macro |\textsuperscript|, the only difference being the italic correction
+% that precedes |\textsuperscript|.
+% \begin{macrocode}
+\DeclareRobustCommand{\ap}[1]{\/\textsuperscript{#1}}
+
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Dots}
+%\begin{macro}{\DOTS}
+%\begin{macro}{\Dashes}
+%\begin{macro}{\DASHES}
+% Four macros are defined so as to insert a certain number of dots or dashes as
+% specified in the optional command argument; |\Dots| and |\Dashes| fit the dots or
+% the dashes pretty close together, while |\DOTS| and |\DASHES| fit them more
+% loosely apart.
+% \begin{macrocode}
+\newcommand\Dots[1][1]{{\count255=#1\@whilenum\count255>\z@
+ \do{\kern.4ex\d{v}\kern.4ex\advance\count255\m@ne}}}
+\newcommand\DOTS[1][1]{{\count255=#1\@whilenum\count255>\z@
+ \do{\kern.8ex\d{v}\kern.8ex\advance\count255\m@ne}}}
+\newcommand\Dashes[1][1]{{\count255=#1\@whilenum\count255>\z@
+ \do{\kern.4ex--\kern.4ex\advance\count255\m@ne}}}
+\newcommand\DASHES[1][1]{{\count255=#1\@whilenum\count255>\z@
+ \do{\kern.8ex--\kern.8ex\advance\count255\m@ne}}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\:}
+%\begin{macro}{\;}
+%\begin{macro}{\?}
+%\begin{macro}{\MutPers}
+% Greek text or poetry sometimes requires some stacked dots; here we prepared macros
+% for two (|\:|), three (|\;|), and four (|\?|) stacked dots. Two stacked dots in a
+% row indicate that the speaker of a drama or comedy has changed (\textit{mutatio
+% personae}). For |\:| and |\;| it is necessary to preserve the mathematical
+% meaning, while |\?| apparently does not have any previous use in standard \LaTeX.
+% The real macros are |\tw@dots|, |\thre@dots|,
+% and |\f@urdots|.
+% \begin{macrocode}
+\DeclareRobustCommand{\:}{\textormath{\tw@dots}{\mskip\medmuskip}}
+\DeclareRobustCommand{\;}{\textormath{\thre@dots}{\mskip\thickmuskip}}
+\DeclareRobustCommand{\?}{\f@urdots}
+\DeclareRobustCommand{\mutpers}{\makebox[1ex]{\:\hfill\:}\space}
+\let\MutPers\mutpers\let\antilabe\mutpers
+\def\tw@dots{\mbox{\kern1\p@\vbox to1ex{\hbox{.}\vss\hbox{.}}}}
+\def\thre@dots{\mbox{\kern1\p@\vbox to 2ex{\hbox{.}\vss
+ \hbox{.}\vss\hbox{.}}}}
+\def\f@urdots{\mbox{\kern1\p@\vbox to 2ex{\hbox{.}\vss
+ \hbox{.}\vss\hbox{.}\vss\hbox{.}}}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+% \DeleteShortVerb{\|}
+%\begin{macro}{\|}
+% \MakeShortVerb{\|}
+%\begin{macro}{\dBar}
+%\begin{macro}{\tBar}
+% Similarly Greek text and poetry require certain \emph{cesurae} indicated with
+% vertical bars; we provided commands for one (\verb"\|"), two (|\dBar|), and
+% three (|\tBar|) vertical bars.
+% \begin{macrocode}
+\DeclareRobustCommand{\|}{\relax\ensuremath{\mskip2mu\vert}}
+\DeclareRobustCommand{\dBar}{\ensuremath{\vert\vert}}
+\DeclareRobustCommand{\tBar}{\ensuremath{\vert\vert\vert}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\negthinspace}
+%\begin{macro}{\posthinspace}
+%\begin{macro}{\posthindspace}
+%\begin{macro}{\,}
+%\begin{macro}{\!}
+% The following are mostly service macros for adjusting the spacing within macro
+% definitions. Nevertheless they are available also to the typesetter, because
+% sometimes certain glyph combinations require a little adjustment. Of course the
+% typesetter will not use them at the very beginning, but only during proof
+% revision, so as to introduce them only where really necessary.
+% \begin{macrocode}
+\def\negthinspace{\nobreak\hskip-0.07em}
+\def\posthinspace{\nobreak\hskip0.07em}
+\def\posthindspace{\nobreak\hskip0.14em}
+\renewcommand{\,}{\textormath{\posthinspace}{\mskip\thinmuskip}}
+\renewcommand{\!}{\textormath{\negthinspace}{\mskip-\thinmuskip}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\lbrk}
+%\begin{macro}{\rbrk}
+%\begin{macro}{\lmqi}
+%\begin{macro}{\rmqi}
+%\begin{macro}{\lmqs}
+%\begin{macro}{\rmqs}
+%\begin{macro}{\mqi}
+%\begin{macro}{\mqs}
+%\begin{macro}{\Ladd}
+%\begin{macro}{\LLadd}
+%\begin{macro}{\ladd}
+%\begin{macro}{\lladd}
+%\begin{macro}{\lesp}
+%\begin{macro}{\ldel}
+% Philologists require a certain number of special parentheses in order to
+% enclose parts of text that are doubtful or that have been added although
+% they are missing from the original manuscripts; even letter strings that have
+% been modified under the assumption that the copyist made some error.
+% Such enclosing marks include angle brackets, square brackets, upper part
+% of square brackets, lower part of square brackets. Such symbols may even
+% appear doubled. Most of these glyphs have been designed anew, because they
+% are missing or are inadequate if they are taken from the usual CM fonts (either
+% text or math fonts). Brackets for example have been designed as to be higher
+% and deeper than the font total height, so as not to interfere with Greek
+% accents and to accomodate for at least one level of nesting (for example square
+% brackets enclosing lower part of square brackets. The single glyphs may be used
+% directly by the typesetter, but we think that the commands requiring some text are
+% far more useful. |\Ladd| and its double version |\LLadd| enclose text that should
+% be added for sure.
+% |\ladd| and its double version |\lladd| enclose text that probably should be
+% added. |\lesp| and its synonymous |\ldel| enclose text that should be deleted.
+% |\mqi| surrounds some text with the lower part of open and closed square brackets.
+% |\mqs| surrounds some text with the upper part of open and closed square brackets.
+% See \texttt{teubenr-doc.pdf} for samples of such commands.
+% \begin{macrocode}
+\DeclareRobustCommand{\lbrk}{{\metricsfont\posthindspace[\negthinspace}}
+\DeclareRobustCommand{\rbrk}{{\metricsfont]}}
+\DeclareRobustCommand\lmqi{{\metricsfont!}}
+\DeclareRobustCommand\rmqi{{\metricsfont:}}
+\DeclareRobustCommand\lmqs{{\metricsfont?}}
+\DeclareRobustCommand\rmqs{{\metricsfont;}}
+\DeclareRobustCommand\mqi[1]{\posthinspace\lmqi\negthinspace
+ {#1\/}\rmqi}\let\mezzeq\mqi
+\DeclareRobustCommand\mqs[1]{\lmqs{#1\/}\rmqs}
+\DeclareRobustCommand{\Ladd}[1]{{\metricsfont<}{\!\!#1\/}%
+ {\metricsfont>}}% litterae certe addendae
+\DeclareRobustCommand{\LLadd}[1]{{\metricsfont<\kern-.3ex<}
+ {\!\!#1\/}{\metricsfont>\kern-.3ex>}}% litterae certe addendae
+\DeclareRobustCommand{\ladd}[1]{{\metricsfont\kern.15ex[\negthinspace}%
+ {#1\/}{\metricsfont]\kern-.15ex}}% litterae addendae
+\DeclareRobustCommand{\lladd}[1]{{\metricsfont\kern.15ex[\kern-.3ex[%
+ \negthinspace}{#1\/}{\metricsfont]\kern-.3ex]%
+ \kern-.15ex}}% litterae addendae
+\DeclareRobustCommand{\lesp}[1]%
+ {\mbox{$\{\kern-.20ex$#1\kern.16ex$\}$}}% litterae delendae
+\let\ldel\lesp
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+% \subsection{Greek, English, and German quotes}
+%\begin{macro}{\itopenquotes}
+%\begin{macro}{\itclosedquotes}
+%\begin{macro}{\itoq}
+%\begin{macro}{\itcq}
+% The following macros allow to set Italian\slash English high quotes even while
+% typing in Greek; such quotes are standard in Italian and in English typesetting
+% and their commands preserve the font family shape and series of the surrounding
+% font. In French typography, as well in the typographic traditions of other
+% countries, different quotes are used. In that case the typesetter must resort to a
+% change of language, for example returning to German, inputting the German quotes,
+% then turning back to Greek. He might as well define his own macros, or he might
+% clone the following definitions and change them according to his country
+% typographic traditions. If he decides to modify these definitions he should either
+% rename this file or he should put his redefinitions in a private package to be
+% input \emph{after} \texttt{teubner.sty}.
+% \begin{macrocode}
+\DeclareTextCommand{\itopenquotes}{\GRencoding@name}%
+ {{\fontencoding{OT1}\selectfont\char92}}%
+\DeclareTextCommand{\itclosedquotes}{\GRencoding@name}%
+ {{\fontencoding{OT1}\selectfont\char34}}%
+\let\itoq\itopenquotes
+\let\itcq\itclosedquotes
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\GEodq}
+%\begin{macro}{\GEcdq}
+%\begin{macro}{\GEdqtext}
+%\begin{macro}{\GEoq}
+%\begin{macro}{\GEcq}
+%\begin{macro}{\GEqtext}
+%\begin{macro}{\ENodq}
+%\begin{macro}{\ENcdq}
+%\begin{macro}{\ENdqtext}
+% On the opposite the following German and English quotes are redesigned and
+% included in the metric symbols font. Since this font is in one shape and one
+% series, these quotes do not change as the outside font does, but remain fixed; the
+% most useful commands are |\GEdqtext| for enclosing some text within German double
+% quotes, |\GEqtext| for enclosing some text within German single quotes, and
+% |\ENdqtext| for enclosing some text in English double quotes. Apparently
+% while setting Greek poetry in stacked, possibly enumerated, verses, German double
+% or single quotes are often used, since they cannot be misunderstood with Greek
+% diacritical marks. Modern Greek double quotes apparently are not appreciated by
+% philologists, at least outside Greece.
+% \begin{macrocode}
+\newcommand\GEodq{\bgroup\futurelet\@tempA\GE@dq}
+\def\GE@dq{{\metricsfont\char18}\ifx\@tempA m\posthinspace\fi\egroup}
+\newcommand\GEcdq{{\metricsfont\char16}}
+\newcommand\GEdqtext[1]{\GEodq\posthinspace#1\/\posthinspace\GEcdq}
+\newcommand\GEoq{\bgroup\futurelet\@tempA\GE@q}
+\def\GE@q{{\metricsfont\char13}\ifx\@tempA m\posthinspace\fi\egroup}
+\newcommand\GEcq{{\metricsfont\char19}}
+\newcommand\GEqtext[1]{\GEoq\posthinspace#1\/\posthinspace\GEcq}
+\newcommand\ENodq{{\metricsfont\char16}}
+\newcommand\ENcdq{{\metricsfont\char17}}
+\newcommand\ENdqtext[1]{\ENodq\negthinspace#1\/\posthinspace\ENcdq}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+% \subsection{Other philological symbols and macros}
+% \begin{macro}{\LitNil}
+% \begin{macro}{\litnil}
+% The next synonymous macros indicate the \emph{littera nihil}.
+% \begin{macrocode}
+\DeclareRobustCommand\LitNil{\textbullet}
+\let\litnil\LitNil
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\sva}
+%\begin{macro}{\shva}
+%\begin{macro}{\shwa}
+% The CB fonts include also the letter ``shwa'', the glyph that
+% appears as a roman ``e'' rotated 180$^\circ$ around its center. Philologists
+% need it even when writing Greek. In order to make it available also when the
+% Latin encodings are in force, suitable definitions have been given so that the
+% suitable CB font was changed behind the scenes without any intervention by the
+% typesetter. With this version of |teubner.sty| a new definition is made up that
+% uses the |\rotatebox| facility of the |graphicx| package; In a future revision of
+% the CB fonts the |\schwa| slot shall be freed so that Greek glyphs only populate
+% it, without extraneous presences. The |\schwa| glyph is made available also with
+% the Latin encodings.
+% \begin{macrocode}
+%\DeclareTextSymbol{\sva}{\GRencoding@name}{26}
+\DeclareTextCommand{\sva}{\GRencoding@name}{%
+\rotatebox[origin=c]{180}{\def\@tempA{li}%
+\fontencoding{OT1}\ifx\f@shape\@tempA\fontshape{it}\fi\selectfont e}}
+\DeclareTextCommand\sva{OT1}{{\expandafter\fontencoding
+ \expandafter{\GRencoding@name}\selectfont\sva}}
+\DeclareTextCommand\sva{T1}{{\expandafter\fontencoding
+ \expandafter{\GRencoding@name}\selectfont\sva}}
+\let\shva\sva\let\shwa\sva
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\skewstack}
+% The |\skewstack| command stacks two arguments not one on top of the other, but the
+% second argument is placed to the right and upwards relative to the first argument.
+% The second argument is set in script font size. Although there are similarities
+% with the |\textsuperscript| command, the exact placement of the second argument
+% depends on the shape (height and depth) of both arguments. This command will be
+% used for creating some philologist's symbols, but is readily available to the
+% typesetter both for direct use and for writing macros defining new symbols.
+% \begin{macrocode}
+\DeclareRobustCommand\skewstack[2]{{%
+\edef\slant@{\strip@pt\fontdimen1\font}%
+\setbox\z@\hbox{#1}\dimen@\ht\z@\box\z@
+\kern-.045em\setbox\@ne\hbox{\scriptsize#2}%
+\ifdim\dimen@>1.2ex\advance\dimen@-\ht\@ne\else
+ \dimen@1ex\advance\dimen@-.5\ht\@ne\fi
+\kern\slant@\dimen@\raise\dimen@\hbox{\box\@ne}}}
+
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\hv}
+%\begin{macro}{\qw}
+%\begin{macro}{\gw}
+%\begin{macro}{\gusv}
+%\begin{macro}{\qusv}
+%\begin{macro}{\qu}
+% Matter of fact some common Latin stacked symbols are defined here in terms of
+% |\skewstack|. As it may bee seen, the second argument (the first as well, but here
+% there are no examples) may in turn contain other macros for composite symbols.
+% \begin{macrocode}
+\DeclareRobustCommand\hv{{\fontencoding{OT1}\selectfont
+ \skewstack{h}{v}}}
+\DeclareRobustCommand\qw{{\fontencoding{OT1}\selectfont
+ \skewstack{q}{w}}}
+\DeclareRobustCommand\gw{{\fontencoding{OT1}\selectfont
+ \skewstack{g}{w}}}
+\DeclareRobustCommand\gusv{{\fontencoding{OT1}\selectfont
+ \skewstack{g}{\semiv{u}}}}
+\DeclareRobustCommand\qusv{{\fontencoding{OT1}\selectfont
+ \skewstack{q}{\semiv{u}}}}
+\DeclareRobustCommand\qu{{\fontencoding{OT1}\selectfont
+ \skewstack{q}{u}}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\dz}
+% Without using |\skewstack| other symbols may be defined; here |\dz| is just an
+% example, where the kerning between `d' and `z' has been found by cut and try. With
+% other glyphs may be different kerning is necessary.
+% \begin{macrocode}
+\DeclareRobustCommand\dz{{\fontencoding{OT1}\selectfont d\kern-.33ex z}}
+
+% \end{macrocode}
+%\end{macro}
+%
+% Now we come to another set of commands like the ones needed to mark the syneresis
+% or the zeugma and other similar marks.
+%\begin{macro}{\Utie}
+% This first macro sets a ``smile'' symbol under a couple of letters. The glyph is
+% fine but is good only for two adjacent letters, therefore
+% it is necessary to have a stretchable symbol.
+% \begin{macrocode}
+\DeclareRobustCommand\Utie[1]{%
+\mbox{\vtop{\ialign{##\crcr
+ \hfil#1\hfil\crcr
+ \noalign{\kern.3ex\nointerlineskip}%
+ \hfil$\smile$\hfil\crcr}}}}
+
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\siner}
+%\begin{macro}{\siniz}
+% This is why the |\siner| and |\siniz| synonymous commands have been defined; in
+% place of or in addition to the ``smile'' symbol; they contain a stretchable
+% filler |\upfill| that behaves almost as the stretchable horizontal brace that is
+% used in the definition of the \LaTeX\ commands |\underbrace| or |\overbrace|.
+% \begin{macrocode}
+\DeclareRobustCommand{\siner}[1]{%
+\mbox{\vtop{\ialign{##\crcr
+ \hfil#1\hfil\crcr
+ \noalign{\kern.6ex\nointerlineskip}%
+ \upfill\crcr}}}}
+\let\siniz\siner
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\upfill}
+% The |\upfill| is defined as a leader, the same way as the corresponding \LaTeX\
+% stretchable horizontal brace.
+% \begin{macrocode}
+\def\upfill{$\m@th \scriptstyle\setbox\z@\hbox{$\scriptstyle\bracelu$}%
+ \kern.16ex\bracelu\ifPDF\kern-.15ex\fi
+ \leaders\vrule \@height\ht\z@ \@depth\z@\hfill
+ \braceru\kern.16ex$}
+
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\downfill}
+% The |\downfill| arc is totally similar to the |\upfill| one, except for its
+% terminating elements that change the shape of the arc from ``up'' to ``down''.
+% \begin{macrocode}
+\def\downfill{$\m@th\scriptstyle\setbox\z@\hbox{$\scriptstyle\braceld$}%
+ \kern.16ex\braceld\ifPDF\kern-.15ex\fi
+ \leaders\vrule \@height\ht\z@ \@depth\z@\hfill
+ \bracerd\kern.16ex$}
+
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\zeugma}
+% Similarly |\zeugma| puts a stretchable arc over its argument; it must take into
+% account the slant of the argument font so as to skew the placement of the arc.
+% \begin{macrocode}
+\newcommand*\zeugma[1]{{\vbox{\setbox\z@\hbox{#1}\dimen@=\ht\z@
+ \edef\@slant{\strip@pt\fontdimen1\font}%
+ \dimen\tw@=\wd\z@
+ \dimen@=\@slant\dimen@\ifmetricsfont\dimen@=\z@
+ \advance\dimen\tw@-.5ex\fi
+ \kern-.2ex\ialign{##\crcr
+ \hbox to\z@{\ifmetricsfont\kern.25ex\fi\kern\dimen@
+ \hbox to\dimen\tw@{\hss\downfill\kern.2\dimen@\hss}\hss}\crcr
+ \noalign{\ifmetricsfont\kern.6ex
+ \else\kern.4ex\fi\nointerlineskip}%
+ \hfil{#1}\hfil\crcr}}}%
+}
+
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\slzeugma}
+%\begin{macro}{\rszeugma}
+% Although the shape of oblique zeugma arcs cannot be changed depending on the width
+% and height of the zeugma argument, in certain circumstances the philologists want
+% to use oblique zeugma marks. This is why we defined a ``sloping zeugma arc''
+% |\slzeugma|, and a ``rising zeugma arc'' |\rszeugma| that can be used with poor
+% results, if such arcs are superimposed over the ``wrong'' letters. There is
+% nothing automatic in the choice of the oblique arc and is totally on the
+% typesetter responsibility to use the correct command. These slanted zeugma signs
+% are possibly useful only for two letters since they are not stretchable.
+% \begin{macrocode}
+\newcommand*\slzeugma[1]{{\leavevmode
+ \setbox\tw@\hbox{\metricsfont\char120}%
+ \setbox\z@\hbox{#1}\dimen@.5\wd\z@\advance\dimen@-.5\wd\tw@
+ \edef\@slant{\strip@pt\fontdimen1\font}%
+ \advance\dimen@\@slant\ht\z@
+ \hbox to\z@{\kern\dimen@\box\tw@\hss}\box\z@
+ }%
+}
+
+\newcommand*\rszeugma[1]{{\leavevmode
+ \setbox\tw@\hbox{\metricsfont\char122}%
+ \setbox\z@\hbox{#1}\dimen@.5\wd\z@\advance\dimen@-.5\wd\tw@
+ \edef\@slant{\strip@pt\fontdimen1\font}%
+ \advance\dimen@\@slant\ht\z@
+ \hbox to\z@{\kern\dimen@\box\tw@\hss}\box\z@
+ }%
+}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\nexus}
+%\begin{macro}{\nesso}
+% Originally I had two different macros for marking a \emph{nexus}; one made use of a ``up stretchable turtle bracket'', and the user used a leader of Latin circumflex signs. Both were unsatisfactory; the latter was really ugly, but I kept the macro name as a synonym for compatibility with the past. The good looking marker is obtained from a mathematical |\widehat| sign by stretching it to the width of the string the marcher should mark; the new macro |\nexus| (that replaces the stretchable turtle bracket) relies on the facilities offered by the |\resizebox| of the package |graphicx|.
+% \begin{macrocode}
+\newcommand*{\nexus}[1]{{\setbox\tw@\hbox{#1\/}%
+ \edef\slant@{\strip@pt\fontdimen1\font}%
+ \@tempdima=\slant@\ht\tw@\advance\@tempdima.45ex
+ \setbox4\hbox{\resizebox{\wd\tw@}{\height}{$\widehat{\phantom{aaa}}$}}%
+ \setbox4\hbox{\smash{\lower1.35ex\hbox{\box4}}}%
+ \vbox{\ialign{##\crcr%
+ \kern\@tempdima\box4%
+ \crcr
+ \noalign{\kern.15ex\nointerlineskip}%
+ \hfil{#1}\hfil\crcr}}}}
+\let\nesso\nexus
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%
+%
+%\begin{macro}{\coronis}
+%\begin {macro}{\Coronis}
+%\begin {macro}{\paragr}
+% \begin {macro}{\dpar}
+% While setting poetry it is necessary to mark the end of paragraphs, which do not
+% necessarily coincide with the ends of stanzas. After the verse that concludes a
+% logical paragraph philologists insert a mark called ``coronis'' (synonymous of
+% paragraph, therefore the command |\paragr|) or a ``stronger'' mark called
+% ``Coronis'', which differs from the common ``coronis'' because it bears an
+% inverted semilunar sign on its left. Both marks are input by means of their
+% respective commands |\paragr| (preferred to |\coronis|) or |\Coronis| inserted
+% \emph{at the beginning of the paragraph terminating verse}.
+% The command |\dparagr| inserts a double coronis mark, which is sometimes required
+% in place of the ordinary single mark.
+% \begin{macrocode}
+\def\C@rule{\vrule\@height.45ex\@depth-.35ex\@width1.5em}
+\def\coronis@rule{\hbox to\z@{\hss\C@rule\hss}}
+\def\Coronis@rule{\hbox to\z@
+ {\hss\hbox to\z@{\hss$\scriptstyle)$\kern-1.5\p@}\C@rule\hss}}
+\DeclareRobustCommand\paragr{\raisebox{-1ex}[\z@][\z@]{\coronis@rule}}
+\let\coronis\paragr
+\DeclareRobustCommand\Coronis{\raisebox{-1ex}[\z@][\z@]{\Coronis@rule}}
+\DeclareRobustCommand{\dparagr}%
+ {\raisebox{-1.3ex}[\z@][\z@]{\coronis@rule}%
+ \raisebox{-1.6ex}[\z@][\z@]{\coronis@rule}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin {macro}{\sinafia}
+%\begin {macro}{\crux}
+%\begin {macro}{\FinisCarmen}
+%\begin {macro}{\apici}
+%\begin {macro}{\positio}
+%\begin {macro}{\Int}
+%\begin {macro}{\star}
+%\begin {macro}{\dstar}
+%\begin {macro}{\tstar}
+%\begin {macro}{\responsio}
+% The next group of commands are intended to insert special symbols in the
+% philological text; just the command |\apici| requires an argument, a block of text
+% that shall be enclosed within straight vertical apices, irrespective of the font
+% slant. The command |\FinisCarmen| although very descriptive, is long to type,
+% therefore a shorter alias |\FinCar| has been defined. |\apex| was the initial name
+% given to the command, but on a second time it was changed to |\positio|, and the
+% latter should always be used in place of the former. For what concerns |\star|
+% which is a standard \LaTeX\ math command, the original definition is saved in the
+% service macro |\m@thst@r| and the command is redefined so as to perform as it
+% should both in text and in math mode. The symbol $\int$, on the contrary, was
+% redefined so as not to mix math with text, even if its rendering resorts to
+% mathematics.
+% \begin{macrocode}
+\DeclareRobustCommand*\sinafia{{\metricsfont s}}
+\DeclareRobustCommand*{\crux}{{\metricsfont\char'171}}
+\DeclareRobustCommand*{\FinisCarmen}{\ensuremath{\otimes}}
+\let\FinCar\FinisCarmen
+\DeclareRobustCommand*{\apici}[1]%
+ {\posthinspace{\metricsfont\char96}\negthinspace#1%
+ \posthinspace{\metricsfont\char39}\negthinspace}
+\DeclareRobustCommand*{\apex}%
+ {\/\hskip.5ex\vrule\@height1.7ex\@depth-1ex\hskip.2ex}
+\let\positio\apex
+\DeclareRobustCommand*{\Int}{\ensuremath{\int}}
+\let\m@thst@r\star
+\DeclareRobustCommand*{\star}{\textormath{{{\upshape *}}}{\m@thst@r}}
+\DeclareRobustCommand*{\dstar}{{\upshape **}}
+\DeclareRobustCommand*{\tstar}{{\upshape ***}}
+\DeclareRobustCommand*{\responsio}{{\boldmath\ensuremath{\sim}}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\thorn}
+%\begin{macro}{\Thorn} |\thorn| and |\Thorn| are the exact equivalents of |\th|
+% and |\Th| that are defined only for the T1 encoding. Therefore such encoding is
+% selected in an implicit way.
+% \begin{macrocode}
+\DeclareRobustCommand{\thorn}{{\fontencoding{T1}\selectfont\th}}
+\DeclareRobustCommand{\Thorn}{{\fontencoding{T1}\selectfont\TH}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%
+% \subsection{Ancient Greek monetary unit symbols}
+%\begin{macro}{\dracma}
+%\begin {macro}{\hemiobelion}
+%\begin {macro}{\tetartemorion}
+%\begin {macro}{\stater}
+%\begin {macro}{\denarius}
+%\begin {macro}{\etos}
+% This set of symbols, taken from the metrics symbol font (which by this time is
+% evident does not contain only metrics symbols) represents the unit symbols of some
+% coins of ancient Greece, as they were found on many ``ostraka'' in several
+% archeological sites.
+% \begin{macrocode}
+\DeclareRobustCommand{\dracma}{{\metricsfont D}}
+\DeclareRobustCommand{\hemiobelion}{{\metricsfont A}}
+\DeclareRobustCommand{\tetartemorion}{{\metricsfont B}}
+\DeclareRobustCommand{\stater}{{\metricsfont C}}
+\DeclareRobustCommand{\denarius}{{\metricsfont E}}
+\DeclareRobustCommand{\etos}{{\metricsfont G}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+% \subsection{Another set of philological symbols and macros}
+%\begin{macro}{\cut}
+%\begin{macro}{\dcutbar}
+%\begin{macro}{\bcutbar}
+%\begin{macro}{\gcutbar}
+% The following set of macros are all connected with the principal macro |\cut|,
+% which should position a horizontal tie or bar across a certain number of latin
+% letters, specifically `d', `b', and `g'; due to their different shapes, such bars
+% are of different length and located at different heights; if they are in italics
+% the bar position must change again. Therefore even if the user command |\cut| is
+% the same for all these letters, its action must change depending on different
+% circumstances.
+% It merely checks its argument (it must be \emph{one} letter and unpredictable
+% results are obtained if more that one token is passed as an argument to |\cut|)
+% and selects the proper bar. The specific bar commands |\dcutbar|, |\bcutbar|, and
+% |\gcutbar|, are defined in such a way as to cope only with the their initial
+% letter.
+% \begin{macrocode}
+\DeclareRobustCommand{\cut}[1]{%
+ \ifx#1d\dcutbar\else
+ \ifx#1b\bcutbar\else
+ \ifx#1g\gcutbar
+ \fi
+ \fi
+ \fi}
+%
+\def\dcutbar{{\edef\slant@{\strip@pt\fontdimen1\font}%
+ d\dimen@1.2ex\kern\slant@\dimen@
+ \llap{\vrule\@height1.3ex\@depth-\dimen@
+ \ifdim\slant@\p@>\z@\@width.35em\else\@width.4em\fi\kern.03em}}}
+\def\bcutbar{{\edef\slant@{\strip@pt\fontdimen1\font}%
+ \rlap{\dimen@1.2ex\kern\slant@\dimen@
+ \ifdim\slant@\p@=\z@\kern.03em\fi
+ \vrule\@height1.3ex\@depth-\dimen@
+ \ifdim\slant@\p@>\z@\@width.3em\else\@width.4em\fi}b}}
+\def\gcutbar{{\edef\slant@{\strip@pt\fontdimen1\font}%
+ \ifdim\slant@\p@>\z@
+ g\kern-.55ex\dimen@.2ex\kern-\slant@\dimen@
+ \vrule\@height-.1ex\@depth\dimen@\@width.6ex
+ \else
+ \dimen@.2ex\kern\slant@\dimen@\vrule\@height.3ex\@depth-\dimen@
+ \@width.6ex\kern-.55ex\relax g
+ \fi}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\OSN}
+% The next macro is just a shortcut instead of using |\oldstylenums|.
+% \begin{macrocode}
+\let\OSN\oldstylenums
+
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\splus}
+%\begin{macro}{\stimes}
+%\begin{macro}{\kclick}
+% The next three macros are used in glottology; the first two ones are used to
+% mark special pronunciations of the sibilant, while the last one is used to mark
+% a special pronunciation of the guttural that produces a ``click''.
+%\begin{macrocode}
+\newcommand\splus{\leavevmode{%
+ \edef\slant@{\strip@pt\fontdimen1\font}%
+ \setbox\z@\hbox{s}%
+ \dimen@=\wd\z@
+ \setbox\tw@\hbox{$\scriptscriptstyle+$}%
+ \advance\dimen@.35\ht\tw@
+ \raisebox{\dimen@}[\z@][\z@]{%
+ \makebox[\z@][l]{\kern.5\wd\z@
+ \kern\slant@\dimen@\kern-.5\wd\tw@\box\tw@}}%
+ \box\z@}}%
+\newcommand\stimes{\leavevmode{%
+ \edef\slant@{\strip@pt\fontdimen1\font}%
+ \setbox\z@\hbox{s}%
+ \dimen@=\wd\z@
+ \setbox\tw@\hbox{$\scriptscriptstyle\times$}%
+ \advance\dimen@.2\ht\tw@
+ \raisebox{\dimen@}[\z@][\z@]{%
+ \makebox[\z@][l]{\kern.5\wd\z@
+ \kern\slant@\dimen@\kern-.5\wd\tw@\box\tw@}}%
+ \box\z@}}%
+\newcommand\kclick{\leavevmode{%
+ \edef\slant@{\strip@pt\fontdimen1\font}%
+ \setbox\z@\hbox{k}%
+ \setbox\tw@\hbox{\fontencoding\GRencoding@name\selectfont\s{v}}%
+ \dimen@\wd\z@
+ \ifdim\slant@\p@=\z@
+ \advance\dimen@-.1\wd\z@\else\advance\dimen@\wd\tw@
+ \fi
+ k\makebox[\z@][r]{\unhcopy\tw@\kern.5\dimen@}%
+ }}%
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+% \subsection{Poetry environments and macros}
+%\begin {macro}{\verso}
+%\begin{environment}{versi}
+% Here we start with verse environments; we already explained that we defined three
+% new verse environments that typeset poetry in ``in-line'' verses,
+% ``numbered by five'' verses, and ``numbered by five and subnumbered'' verses.
+% For the environment |versi| we first need a counter and a little macro for
+% generating the short bar that has to receive the verse number as a ``limits''
+% superscript.
+% \begin{macrocode}
+\newcounter{verso}\setcounter{verso}{0}
+\newcommand{\smallvert}{\vrule\@height.6ex\@depth.4ex}
+
+% \end{macrocode}
+% Next we define the macro |\verso| that sets the small bar with the verse number on
+% top. Since the initial numbering might be different from~1, |\verso| accepts an
+% optional argument, which is intended to be the initial counter value. Since
+% |\verso| steps up the counter a different action must be taken if the optional
+% argument is present; in order to be able to reference such verse by means of the
+% |\label|--|\ref| cross reference mechanism, this stepping up must be done by means
+% of |\refstepcounter|; therefore we have to leave |\refstepcounter| outside the
+% conditional code, and step down the counter by one unit only in case the initial
+% value is specified.
+% \begin{macrocode}
+\DeclareRobustCommand\verso[1][]{%
+ \def\@tempA{#1}\ifx\@tempA\empty
+ \else
+ \setcounter{verso}{#1}\addtocounter{verso}{\m@ne}%
+ \fi
+ \refstepcounter{verso}%
+ \@killglue\space
+ \ensuremath{\mathop{\smallvert}\limits^{\scriptscriptstyle\theverso}}%
+ \space\ignorespaces}
+
+% \end{macrocode}
+% Now that the verse separation macro is ready we can define the environment; the
+% required opening statement argument represents a short text whose width is taken
+% as a measure for indentation, so that verses are typeset with a left margin that
+% leaves out this short text. Substantially this environment is a \texttt{list} one,
+% and the left margin variable width is totally similar to the one used in
+% |thebibiography| environment. Also the |\makelabel| command has been modified
+% accordingly.
+% \begin{macrocode}
+\newenvironment{versi}[1]{%
+\def\makelabel##1{##1}
+\setbox\z@\hbox{#1}%
+\list{}{\labelwidth\wd\z@\leftmargin\labelwidth
+ \advance\leftmargin\labelsep}%
+ \item[\box\z@]
+}{%
+\endlist
+}
+\let\versus\versi \let\endversus\endversi
+% \end{macrocode}
+%\end{environment}
+%\end{macro}
+%
+%\begin{environment}{Versi}
+% The second environment |Versi| accepts an optional starting number in the opening,
+% statement, whose default value is~1: verses are composed as in the standard
+% \LaTeX\ |verse| environment (with one minor difference) except they are numbered
+% in the left margin with a progression of five; only verse numbers that are integer
+% multiples of five are displayed. The minor difference is that stanzas cannot be
+% marked with a blank line in the input |.tex| file, as it is customary with
+% the standard environment, but if a visual mark is desired, such as extra vertical
+% space, it is necessary to resort to the optional spacing parameter that can be
+% specified to the |\\| command. This environment uses the same verse counting
+% counter, defined for use with the |versi| environment.
+%
+%\begin{macro}{\BreakVersotrue}
+%\begin{macro}{\BreakVersofalse}
+% For specific purposes it is necessary to have a boolean variable for allowing or
+% prohibiting verses to split up at the end of line; the default is not
+% to split.
+% \begin{macrocode}
+\newif\ifBreakVersi
+\BreakVersifalse
+\newenvironment{Versi}[1][1]{%
+ \setcounter{verso}{#1}%
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+% An internal macro |\writ@verso| does not actually write out the complete, possibly
+% numbered verse, but provides for checking that the verse counter contains a
+% multiple of~5, and to write it out using old stile numbers; in case the number is
+% not an integer multiple of~5 the number is written out as the |\empty| macro.
+% \begin{macrocode}
+ \def\writ@verso{%
+ \count255=\value{verso}\divide\count255by5\relax
+ \multiply\count255by5\relax
+ \advance\count255-\value{verso}%
+ \ifnum\count255=\z@
+ {\fontseries{m}\small\expandafter\oldstylenums\expandafter{\the\c@verso}}%
+ \else
+ \empty
+ \fi}%
+% \end{macrocode}
+% Since the |\\| command should provide the same functionality as the regular
+% \LaTeX\ command, while in this environment it should provide other
+% functionalities, such as triggering the display of the verse number. It is
+% necessary to define an intermediate command |\v@rscr|, that examines the possible
+% optional arguments, such as the optional star or the brackets enclosing vertical
+% spacing
+% \begin{macrocode}
+ \def\acapo{\@ifstar{\v@rscr{\@M}}{\v@rscr{\z@}}}%
+ \let\\\acapo
+ \def\v@rscr##1{\@ifnextchar[{\wr@teverse{##1}}%
+ {\wr@teverse{##1}[\z@]}}%
+% \end{macrocode}
+% Finally the |\wr@teverse| macro does the actual typesetting of the verse. Notice
+% that the environment opening statement and every succeeding previous verse starts
+% an horizontal box where the contents of the current verse is stored. Therefore the
+% first thing to do is to close the box with the |\egroup| command, then a line of
+% text is output that contains a possibly empty box or the verse number and the
+% command for stepping up the verse counter, followed by the verse box number~0 and
+% an end of paragraph; in this way the |\\| operates always in vertical mode,
+% contrary to what happens in the |verse| standard \LaTeX\ environment. Even in this
+% environment the actual typesetting is done within a |list| environment, whose
+% parameters are set differently from what they are in the |verse| environment.
+% Notice in any case that the command |\wr@teverse| reopens the~0 box, so on the
+% last verse, upon closing the environment, it is necessary to remember to close
+% such box, whose contents is irrelevant and can be thrown away.
+%
+% I have experienced some problems in typesetting verses in two-column format; the
+% column width might be too short for setting up verses even if verses are not that
+% long, because in the left margin there must be room for the verse numbering; for
+% homogeneity the spacing must conform also with the following environment
+% \texttt{VERSI} that has a secondary verse numbering, therefore it can't be too
+% small. The result is that there might be a test for controlling the two-column
+% format, but I think that it is more useful for the typesetter to be able to switch
+% on and off the possibility of breaking long verses on more lines.
+% On two-column format in any case it is better to leave the right margin to
+% coincide with the column right margin.
+% \begin{macrocode}
+ \def\wr@teverse##1[##2]{\egroup
+ \makebox[3em][r]{%
+ \writ@verso\refstepcounter{verso}\kern1.5em}
+ \ifBreakVersi
+ \begingroup\raggedright
+ \hyphenpenalty \@M
+ \unhbox\z@\par
+ \endgroup
+ \else
+ \rlap{\box\z@}\par
+ \fi
+ \penalty##1\vskip##2\relax
+ \setbox\z@\hbox\bgroup\ignorespaces}%
+ \list{}{\itemsep\z@\parsep\z@
+ \if@twocolumn
+ \itemindent -5.3em%
+ \listparindent\itemindent
+ \rightmargin\z@
+ \advance\leftmargin 3.3em
+ \else
+ \itemindent -1.5em%
+ \listparindent\itemindent
+ \rightmargin \leftmargin
+ \advance\leftmargin 1.5em
+ \fi
+ }%
+ \item\leavevmode\setbox\z@\hbox\bgroup\ignorespaces
+}{%
+% \end{macrocode}
+% Upon closing it is necessary to activate the writing out of the last verse that is
+% still in the~0 box, but since this box is immediately reopened, it is necessary to
+% close it again before exiting the environment.
+% \begin{macrocode}
+ \\%
+ \egroup
+ \endlist
+}
+\let\Versus\Versi \let\endVersus\endVersi
+
+% \end{macrocode}
+%\end{environment}
+%
+%\begin{environment}{VERSI} The third environment |VERSI| set verses in the
+% traditional way, but numbers them with two different enumerations; the principal
+% one is by multiples of five, while the secondary one counts by units, and may be
+% turned on and off, or reset at will. We therefore need another counter for the
+% secondary enumeration and commands for turning it on and off and for resetting the
+% counter. We need also a new length and a new boolean variable in order to manage
+% the secondary enumeration.
+% The new length represents an indentation of those verses that do no have the
+% secondary enumeration, while secondary enumerated verses are not indented. For
+% \texttt{VERSI} there is the same possibility of turning on and off the possibility
+% of breaking verses at the end of line as it happens for the environment
+% \texttt{Versi}.
+% \begin {macro}{\SubVerso}
+% \begin {macro}{\NoSubVerso}
+% Macro |\NoSubVerso| turns off the secondary enumeration; macro |\SubVerso| turns
+% on the secondary enumeration, but it accepts an optional argument for resetting
+% the secondary counter; the default value is~0; if no optional argument is
+% specified, and therefore if the optional argument has its default value~0, no
+% resetting is performed and the enumeration keeps going from the last contents of
+% the secondary counter; if the first use of |\SubVerso| does not contain the
+% optional argument, the secondary enumeration keeps going from the old contents of
+% the secondary counter which is unpredictable, depending upon the previous
+% occurrences of the environment |VERSI|. The typesetter, therefore, must remember
+% to specify the optional argument to |\SubVerso| the first time he uses it in this
+% environment.
+% \begin{macrocode}
+\newcounter{subverso} \setcounter{subverso}{0}
+\newif\ifSubVerso
+\newlength{\versoskip}
+\newcommand*\NoSubVerso{\global\SubVersofalse
+ \global\versoskip1.3em\ignorespaces}
+\newcommand*\SubVerso[1][0]{\global\SubVersotrue
+ \ifnum#1=0\else
+ \setcounter{subverso}{#1}%
+ \global\protected@edef\@currentlabel{\the\c@subverso}%
+ \fi
+ \global\versoskip.3em\ignorespaces}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+% The opening environment statement accepts an optional argument (default equals~1)
+% which represents the primary enumeration starting number:
+% \begin{macrocode}
+\newenvironment{VERSI}[1][1]{%
+ \setcounter{verso}{#1}%
+% \end{macrocode}
+% We need two macros |\writ@verso| and |\writ@subverso|, that typeset the primary
+% and secondary enumeration; the first one is similar to the one used in the |Versi|
+% environment, while the second one has no special features except the conditional
+% construct needed to check if the secondary enumeration has to be printed out.
+% \begin{macrocode}
+ \def\writ@verso{%
+ \count255=\value{verso}\divide\count255by5\relax
+ \multiply\count255by5\relax
+ \advance\count255-\value{verso}%
+ \ifnum\count255=0\relax
+ {\fontseries{m}\small\expandafter\oldstylenums\expandafter{\the\c@verso}}%
+ \else
+ \empty
+ \fi}%
+ \NoSubVerso
+ \def\writ@subverso{%
+ \ifSubVerso
+ {\fontseries{m}\scriptsize\expandafter\oldstylenums
+ \expandafter{\the\c@subverso}}%
+ \fi}%
+% \end{macrocode}
+% Similarly to the previous environment, the |\\| command must be redefined
+% so as to perform more or less as the standard one, while doing all the necessary
+% actions needed in this environment. It must check the presence of the optional
+% star and of the optional vertical skip and it has to pass control to a service
+% macro |\v@rscr| that does the actual job; actually it passes control to a third
+% macro |\writ@verse| that effectively outputs the current verse.
+% \begin{macrocode}
+ \def\\%
+ {\@ifstar{\v@rscr{\@M}}{\v@rscr{\z@}}}%
+ \def\v@rscr##1{\@ifnextchar[{\writ@verse{##1}}%
+ {\writ@verse{##1}[\z@]}}%
+ \def\writ@verse##1[##2]{\egroup
+ \makebox[1.5em][r]{\writ@verso\refstepcounter{verso}}%
+ \makebox[1.5em][r]{\writ@subverso\refstepcounter{subverso}}%
+ \kern1.5ex\hskip\versoskip
+ \ifBreakVersi
+ \begingroup
+ \hyphenpenalty \@M
+ \unhbox\z@\par
+ \endgroup
+ \else
+ \rlap{\box\z@}\par
+ \fi
+ \penalty##1\vskip##2\relax
+ \setbox\z@\hbox\bgroup\ignorespaces}%
+% \end{macrocode}
+% For the remaining part, the environment is a normal |list| environment with
+% specific initial parameters.
+% \begin{macrocode}
+ \list{}{\parsep\z@\itemsep\z@
+ \if@twocolumn
+ \itemindent -5.3em%
+ \listparindent\itemindent
+ \rightmargin\z@
+ \advance\leftmargin 3.3em
+ \else
+ \itemindent -1.5em%
+ \listparindent\itemindent
+ \rightmargin \leftmargin
+ \advance\leftmargin 1.5em
+ \fi
+ }%
+ \item\leavevmode\setbox\z@\hbox\bgroup\ignorespaces
+}{%
+% \end{macrocode}
+% The closing statement must output the last verse, which is still contained in
+% box~0; since box~0 is automatically reopened, it must be closed again and its
+% contents, of no significance now, can be lost upon closing the environment group.
+% \begin{macrocode}
+ \\%
+ \egroup\endlist}
+\let\VERSUS\VERSI \let\endVERSUS\endVERSUS
+
+% \end{macrocode}
+%\end{environment}
+%
+% \subsection{Metrics symbols, macros and environmnets}
+% Now we start defining many macros concerned with metrics; the metric symbol font
+% has been developed mainly for this purpose. We start defining some macros for
+% inputting specific symbols; many such macros have their own aliases in Latin.
+%
+%\begin{macro}{\lunga}
+%\begin{macro}{\longa}
+%\begin{macro}{\breve}
+%\begin{macro}{\brevis}
+%\begin{macro}{\bbreve}
+%\begin{macro}{\bbrevis}
+%\begin{macro}{\barbreve}
+%\begin{macro}{\barbrevis}
+%\begin{macro}{\barbbrev}
+%\begin{macro}{\barbbrevis}
+%\begin{macro}{\ubarbreve}
+%\begin{macro}{\ubarbrevis}
+%\begin{macro}{\ubarbbreve}
+%\begin{macro}{\ubarbbrevis}
+%\begin{macro}{\ubarsbreve}
+%\begin{macro}{\ubarsbrevis}
+%\begin{macro}{\ubrevelunga}
+%\begin{macro}{\ubrevislonga}
+% The following definitions are straightforward; a small comment on |\breve|: since
+% it is also a math command in standard \LaTeX, its meaning is saved in a service
+% macro |\br@ve| and the |\breve| macro is redefined taking into account whether the
+% typesetting is being done in text or in math mode. The unusual letters that appear
+% in the definitions of the various metric symbols have no mysterious meaning; they
+% might have been specified by |\char|\meta{number}, but it seemed shorter to
+% specify the corresponding letters that would occupy the same slots in literal
+% fonts.
+% \begin{macrocode}
+\DeclareRobustCommand\lunga{{\metricsfont l}}
+\let\longa\lunga
+\let\br@ve\breve
+\DeclareRobustCommand\breve{\textormath{{{\metricsfont b}}}{\br@ve}}
+\let\brevis\breve
+\DeclareRobustCommand\bbreve{{\metricsfont c}}
+\let\bbrevis\bbreve
+\DeclareRobustCommand\barbreve{{\metricsfont i}}
+\let\barbrevis\barbreve
+\DeclareRobustCommand\barbbreve{{\metricsfont j}}
+\let\barbbrevis\barbbreve
+\DeclareRobustCommand\ubarbreve{{\metricsfont d}}
+\let\ubarbrevis\ubarbreve
+\DeclareRobustCommand\ubarbbreve{{\metricsfont e}}
+\let\ubarbbrevis\ubarbbreve
+\DeclareRobustCommand\ubarsbreve{{\metricsfont f}}
+\let\ubarsbrevis\ubarsbreve
+\DeclareRobustCommand{\ubrevelunga}{{\metricsfont\char107}}
+\let\ubrevislonga\ubrevelunga
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin {macro}{\corona}
+%\begin {macro}{\ElemInd}
+%\begin {macro}{\coronainv}
+%\begin {macro}{\catal}
+%\begin {macro}{\ipercatal}
+%\begin {macro}{\hiatus}
+%\begin {macro}{\Hiatus}
+%\begin {macro}{\X}
+%\begin {macro}{\anceps}
+%\begin {macro}{\banceps}
+%\begin {macro}{\ancepsdbrevis}
+%\begin {macro}{\aeolicbii}
+%\begin {macro}{\aeolicbiii}
+%\begin {macro}{\aeolicbiv}
+% Similarly the following symbols have straightforward definitions. Only |\hiatus|
+% and |\Hiatus| require a small explanation; |\hiatus| inserts a small capital `H'
+% in superscript position; in a first moment it was chosen the solution of designing
+% a specific sans serif glyph in superscript position directly in the metric symbol
+% font (actually this symbol is still part of the font), but while testing it, Paolo
+% Ciacchi observed that a regular `H' with serifs was better looking than the sans
+% serif counterpart. Therefore the definition was changed in order to use the
+% current font upright shape; by specifying `H', it is irrelevant if the current one
+% is a Latin font, and the letter is a capital 'h', or if the current one is a Greek
+% font and the letter is a capital `eta'. |\Hiatus| displays the same symbol in a
+% zero width box so that it does not occupy any horizontal space; it is useful while
+% writing down complicated metric sequences. Macro|\X| may be considered, thanks to
+% its shape, a mnemonic shortcut in place of the full name |\anceps|.
+% \begin{macrocode}
+\DeclareRobustCommand\corona{{\metricsfont\char20}}
+\let\ElemInd\corona
+\DeclareRobustCommand\coronainv{{\metricsfont\char21}}
+\DeclareRobustCommand\catal{{\metricsfont g}}
+\DeclareRobustCommand\ipercatal{{\metricsfont h}}
+\DeclareRobustCommand\hiatus{\textsuperscript{\upshape H}}
+\DeclareRobustCommand\Hiatus{\makebox[\z@]{\hiatus}}
+\DeclareRobustCommand\X{{\metricsfont X}}
+\let\anceps\X
+\DeclareRobustCommand\banceps{{\metricsfont Y}}
+\DeclareRobustCommand\ancepsdbrevis{{\metricsfont Z}}
+\DeclareRobustCommand{\aeolicbii}{{\metricsfont I}}
+\DeclareRobustCommand{\aeolicbiii}{{\metricsfont J}}
+\DeclareRobustCommand{\aeolicbiv}{{\metricsfont K}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\stripsl@sh}
+%\begin{macro}{\2}
+%\begin{macro}{\3}
+%\begin{macro}{\4}
+% Here we prepare for the definition of a very useful macro, |\newmetrics|, that
+% should ease quite a lot writing complicated and repetitive metric sequences.
+% We shall define |\newmetrics| by means of the internal \LaTeX\ macro |\@namedef|
+% which accepts a macro name containing any character, provided this name does not
+% contain the initial back slash (if it does this back slash becomes part of the
+% macro name; see the \TeX{}book where there is an example for the definition of
+% |\\TeX|). Therefore we need a service macro |\stripsl@sh| that strips the first
+% token from the control sequence, so that the na\"if user does not have to treat
+% the new metrics control sequence differently from the control sequences it uses
+% for example with |\newcommand|. Next we define three numeric control sequences
+% that should be followed by the rest of the macro name.
+% The na\"if user can then type in something like \verb*+\2iamb + in order to
+% activate a macro whose name is formed by the tokens |2iamb|, which is normally
+% impossible in \LaTeX. Notice, though, the compulsory space after the macro name.
+% \begin{macrocode}
+\newif\ifmetricsfont\metricsfontfalse
+\def\stripsl@sh#1{\expandafter\@gobble\string#1}
+\def\2#1 {\csname2#1\endcsname}
+\def\3#1 {\csname3#1\endcsname}
+\def\4#1 {\csname4#1\endcsname}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\begin {macro}{\newmetrics}
+% Here is the user macro |\newmetrics|, to be used just as |\newcommand|, except it
+% accepts a macro name starting with one of the digits `2', `3', or `4', and sets
+% the suitable boolean variable to true so that in a long metric sequence the metric
+% font might be selected just once.
+% \begin{macrocode}
+\newcommand\newmetrics[2]{%
+ \expandafter\@namedef\expandafter{\stripsl@sh#1}%
+ {{\metricsfonttrue#2}}}
+
+% \end{macrocode}
+%\end{macro}
+%
+%\begin {macro}{\iam}
+%\begin {macro}{\chor}
+%\begin {macro}{\enopl}
+%\begin {macro}{\4MACRO}
+%\begin {macro}{\aeolchorsor}
+%\begin {macro}{\hexam}
+%\begin {macro}{\pentam}
+%\begin {macro}{\2tr}
+% Here some common metric sequences are defined; some define single measures, such
+% as the `iambus' or the `choriambus', while some define complete verses such as the
+% `hexameter' or the `pentameter'.
+% \begin{macrocode}
+\newmetrics\iam{\barbreve\lunga\breve\lunga}
+\newmetrics\chor{\lunga\breve\breve\lunga}
+\newmetrics\enopl{\breve\lunga\breve\breve\lunga\breve\breve\lunga}
+\newmetrics{\4MACRO}{\lunga\lunga\lunga\lunga}
+\newmetrics{\aeolchorsor}{\lunga\zeugma{\breve\breve}\breve
+ \breve\zeugma{\breve\breve}}
+\newmetrics{\hexam}{\lunga\breve\breve\lunga\breve\breve
+ \lunga\breve\breve\lunga\breve\breve\lunga\breve\breve
+ \lunga\lunga}
+\newmetrics{\pentam}{\lunga\barbbreve\lunga\barbbreve\lunga\dBar
+ \lunga\breve\breve\lunga\breve\breve\lunga}
+\newmetrics{\2tr}{\lunga\breve\lunga\X\ \lunga\breve\lunga\X\ }
+
+% \end{macrocode}
+% As it may be seen, the definition of such metric sequences may contain almost
+% anything; here |\zeugma| was used as well as \verb*+\ +, but almost every
+% macro defined in the previous parts may be freely used.
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\metricstack}
+% |\metricstack| is a command similar to |\shortstack| used to stack something over
+% something else; specifically the second argument over the third one; it was
+% specifically designed for use while typesetting metric sequences, but actually
+% there is nothing that forbids to use it with any base character (typeset in text
+% LR mode) and any superscript character belonging to a math alphabet (which is
+% being set in script--script style, not in script style, as it happens with
+% |\shortstack|.
+% \begin{macrocode}
+\DeclareRobustCommand*{\metricstack}[2]%
+ {$\mathord{\mathop{\hbox{#1\rule{\z@}{1ex}}}%
+ \limits^{\scriptscriptstyle\relax#2\relax}}$}
+
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\svert}
+% |\svert| is a short vertical rule that may be used, for example, with
+% |\metricstack| for putting a small number over a dividing vertical bar in metric
+% sequences.
+% \begin{macrocode}
+\newcommand*{\svert}{\vrule\@height.8ex\@depth.2ex\relax}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\textoverline}
+% \LaTeX\ has macro |\underline| that can be used in both text and math mode; there
+% is nothing similar for overlining, therefore we defined a new command for this
+% task.
+% \begin{macrocode}
+\DeclareRobustCommand*{\textoverline}[1]{%
+ \leavevmode\vbox{\setbox\z@\hbox{#1}
+ \ialign{##\crcr
+ \hbox to\wd\z@{\hrulefill}\crcr
+ \noalign{\kern.4ex\nointerlineskip}%
+ \hfil\box\z@\hfil\crcr}}}
+
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\verseskip}
+%\begin {environment}{bracedmetrics}
+% The environment |bracedmetrics| is used primarily for setting some metric
+% sequences one atop the other, with a certain alignment and grouped together with a
+% right brace. We need therefore a length name |\br@cedmetrics| for measuring the
+% width of this large metrics sequence stack; we need a command |\verseskip| for
+% inserting a blank space before, after or in the middle of a metric sequence, that
+% more or less is as wide as an integer number of metric symbols, and, last but not
+% least, the environment itself for typesetting this large object containing the
+% said metric sequences; see the documentation file \texttt{teubner-doc.pdf} for
+% examining some examples.
+% \begin{macrocode}
+\newlength{\br@cedmetrics}
+\newcommand*{\verseskip}[1]{{%
+ \setbox\z@\hbox{\longa}\dimen@\wd\z@\leavevmode\hbox to#1\dimen@{}}}
+
+\newenvironment{bracedmetrics}[1]{\def\Hfill{\leavevmode\hfill}%
+\settowidth{\br@cedmetrics}{#1}%
+\ifvmode\vskip1ex\fi
+$\displaystyle\left.%
+\vcenter\bgroup\hsize\br@cedmetrics\parindent\z@\parskip\z@
+}{\egroup\right\}$}
+
+% \end{macrocode}
+%\end{environment}
+%\end{macro}
+%
+% \subsection{Debugging commands}
+%\begin{macro}{\TRON}
+%\begin{macro}{\GTRON}
+%\begin{macro}{\TROF}
+%\begin{macro}{\GTROF}
+%\begin{macro}{\treceon}
+%\begin{macro}{\traceoff}
+% Here there are some macros for turning on and off the tracing facilities of \TeX,
+% that turn out to be useful while debugging; they are accessible also to the end
+% user. Global settings must be turned on and off globally; local settings
+% die out by themselves when a group is closed, but it is a good habit to explicitly
+% turn them out regardless of groups. Attention that when the tracing facilities are
+% on and a page ship out takes place, the |.log| file receives a lot of material,
+% and this file gets very large. In order to avoid logging too much information the
+% |trace| package is loaded; this package give access to the macros |\traceon| and
+% |\traceoff| that log a lot of information, except the redundant one, specifically
+% all the macros executed during any font change. Users don't realize the amount of
+% processing done behind the scenes when with the New Font Selection Scheme (NFSS) a
+% font change takes place; luckily enough modern processors are quite fast so that
+% the compilation CPU time does not become too heavy. But if the \TeX\ processing is
+% logged, this amount of work implies thousands of lines of almost meaningless
+% information when the purpose of logging depends on errors that are difficult to
+% spot; Font changes are almost exempt from errors, so the processing of the inner
+% workings need not be logged down.
+%
+% If the user needs to trace something in order to spot errors, s/he is invited to
+% use the commands |\traceon| and |\traceoff|; commands |\TRON| and |\TROF| do log
+% much more material, in particular font changes, but at least they action may be
+% confined within groups or environments; |\GTRON| and |\GTROF| are global settings
+% and can't be confined within groups or environments; sometimes they are necessary,
+% but it's important to turn off global tracing as soon as possible.
+% \begin{macrocode}
+\RequirePackage{trace}
+\def\GTRON{\global\tracingcommands=\tw@ \global\tracingmacros=\tw@}
+\def\GTROF{\global\tracingcommands=\z@ \global\tracingmacros=\z@}
+\def\TRON{\tracingcommands=\tw@ \tracingmacros=\tw@}
+\def\TROF{\tracingcommands=\z@ \tracingmacros=\z@}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+% \subsection{Classical Greek numerals}
+% When typesetting Greek it may occur to specify numbers written out as Milesian
+% numerals; the |greek| option to the \babel\ package defines a couple of
+% macros for transforming explicit arabic numerals or counter contents as Milesian
+% numerals. Since this package offers more possibilities in the choice of those
+% ``non alphabetic'' characters used in the Milesian notation, such macros have to
+% be redefined. On the occasion we changed some little internal details so as to make such macros a little faster and more robust.
+%\begin{macro}{\Greeknumeral}
+%\begin{macro}{\greeknumeral}
+%\begin{macro}{\@ifStar}
+%\begin{macro}{\grtoday}
+% Both |\greeknumeral| and |\Greeknumeral|, the latter producing upper case Greek
+% numerals, while the former produces lower case ones, resort to a service macro
+% |\gr@@numeral|. But the new definition accepts the starred version; without the
+% star the digit value~6 is represented with a ``stigma'', while with the star that
+% value is represented with a lowered ``digamma''. The upper case version requires
+% intermediate macros before using |\MakeUppercase| on the result in order to
+% convert lower to upper case Milesian value symbols. This means that |\gr@@numeral|
+% may work only with lower case symbols.
+% It turned out that the normal redefinition command |\renewcommand| produced
+% fragile commands that broke out when used as arguments of other commands,
+% specifically the Greek date was broken when it was passed as the argument to the
+% |\date| command of the class \textsf{memoir}; therefore I decided to redefine the
+% |\@ifstar| macro into another |\@ifStar| one so as not to fiddle with \LaTeX\
+% kernel commands. I defined also the lowercase version of the |\grtoday| date,
+% since the \babel\ package provides only the |\today| command with no control over
+% the use of which type of numerals; |\grtoday| uses the lowercase Milesian numerals
+% through the redefined |\greeknumeral| macro.
+% \begin{macrocode}
+\def\@ifStar#1#2{\def\@tempA{#1}\def\@tempB{#2}\futurelet\@tempC\@testStar}
+\def\@testStar{\ifx\@tempC*\bbl@afterelse\expandafter\@tempA\@gobble\else
+ \bbl@afterfi\@tempB\fi}
+
+\DeclareRobustCommand*{\Greeknumeral}{%
+ \let\n@vanta\textQoppa\let\n@vecento\textSampi
+ \@ifStar{\Gr@@kn@meral}{\Gr@@knum@ral}}
+
+\DeclareRobustCommand*{\greeknumeral}{%
+ \let\n@vanta\textqoppa\let\n@vecento\textsampi
+ \@ifStar{\let\s@i\textstigma\gr@@numeral}{\let\s@i\fLow\gr@@numeral}}
+
+\def\Gr@@kn@meral#1{\let\s@i\textStigma
+ \expandafter\MakeUppercase\expandafter{\gr@@numeral{#1}}}
+
+\def\Gr@@knum@ral#1{\let\s@i\textDigamma
+ \expandafter\MakeUppercase\expandafter{\gr@@numeral{#1}}}
+
+\def\grtoday{{\expandafter\greeknumeral\expandafter{\the\day}}\space
+\gr@c@month\space{\expandafter\greeknumeral\expandafter{\the\year}}}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\begin{macro}{\gr@@numeral}
+% |\gr@@numeral| must do most of the processing; it must check that the argument is
+% within the allowable range $1\sim999\,999$ and issue suitable warnings if not. On
+% the other side, if the number is within the correct range, it must check in which
+% decade it falls and must call other macros so as to produce the correct decimal
+% digit~$\leftrightarrow$ Milesian symbol. Six such macros are needed because the
+% allowable range contains at maximum six decimal places. Apparently Milesian
+% symbology allows to go beyond one million, but Apostolos Syropoulos, who
+% originally wrote the code thought (correctly) that Milesian numbers would not be
+% used for ``acrobatic performances'' but possibly for writing the Greek date with
+% the AD year; six decimal places are more than enough for this purpose.
+% |\gr@ill@value| was not redefined from Apostolos Syropoulos' \babel\ definition;
+% it simply issues a warning message about an argument out of range. The presence
+% of the primitive command |number| in these macros is for two purposes:
+% (a) transforms a counter contents into a sequence of digits tokens, and
+% (b) if the argument is already a digit string, it removes any leading zeros.
+% No braces are present because this string is examined sequentially one digit
+% at a time from the leading position to the least significant position; of
+% course this means that the decimal zero is treated correctly even if Milesian
+% symbols do not have the equivalent of a zero.
+% The double opening and closing braces are necessary to avoid a space vanishing
+% after using the |\gr@@numeral| macro; the six levels of digit reprentation are
+% corrected with the LICR macoros.
+% \begin{macrocode}
+\def\gr@@numeral#1{{%
+ \ifnum#1<\@ne\space\gr@ill@value{#1}%
+ \else
+ \ifnum#1<10\relax\expandafter\gr@num@i\number#1%
+ \else
+ \ifnum#1<100\relax\expandafter\gr@num@ii\number#1%
+ \else
+ \ifnum#1<\@m\relax\expandafter\gr@num@iii\number#1%
+ \else
+ \ifnum#1<\@M\relax\expandafter\gr@num@iv\number#1%
+ \else
+ \ifnum#1<100000\relax\expandafter\gr@num@v\number#1%
+ \else
+ \ifnum#1<1000000\relax\expandafter\gr@num@vi\number#1%
+ \else
+ \space\gr@ill@value{#1}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\gr@num@i}
+%\begin{macro}{\gr@num@ii}
+%\begin{macro}{\gr@num@iii}
+%\begin{macro}{\gr@num@iv}
+%\begin{macro}{\gr@num@v}
+%\begin{macro}{\gr@num@vi}
+% The next six macros transform single decimal digits into Milesian symbols. The
+% argument to each macro is a single decimal digit; their positional value is
+% determined by the calling a macro that invokes a different transformation routine
+% for every position.
+% To the right of the least significant position there must be the symbol
+% ``anwtonos'', similar to an apostrophe, while to the left of each most significant
+% symbol whose value is greater than 999 there must be a ``katwtonos'' symbol,
+% similar to a lowered and inverted apostrophe. Zeros are examined in all macros,
+% except the one for ``units'', because their value cannot be printed but there
+% still is the possibility that there are no more digits higher than zero, so that
+% the anwtonos must be set.
+% Macros |\n@vanta| and |\n@vecento| are set by the calling macros so as to be the
+% correct lower or upper case `qoppa' or sampi' respectively.
+% \begin{macrocode}
+\def\gr@num@i#1{%
+ \ifcase#1\or \textalpha\or \textbeta\or \textgamma\or
+ \textdelta\or \textepsilon
+ \or \s@i\or \textzeta\or \texteta\or \texttheta\fi
+ \ifnum#1=\z@\else\anw@true\fi\anw@print}
+\def\gr@num@ii#1{%
+ \ifcase#1\or \textiota\or \textkappa\or \textlambda\or \textmu\or \textnu%
+ \or \textxi\or \textomicron\or \textpi\or \n@vanta\fi
+ \ifnum#1=\z@\else\anw@true\fi\gr@num@i}
+\def\gr@num@iii#1{%
+ \ifcase#1\or \textrho\or \textsigma\or \texttau\or \textupsilon
+ \or \textphi\or \textchi\or \textpsi\or \textomega\or \n@vecento\fi
+ \ifnum#1=\z@\anw@false\else\anw@true\fi\gr@num@ii}
+\def\gr@num@iv#1{%
+ \ifnum#1=\z@\else\katwtonos\fi
+ \ifcase#1\or \textalpha\or \textbeta\or \textgamma\or \textdelta
+ \or \textepsilon\or \s@i\or \textzeta\or \texteta\or \texttheta\fi
+ \gr@num@iii}
+\def\gr@num@v#1{%
+ \ifnum#1=\z@\else\katwtonos\fi
+ \ifcase#1\or \textiota\or \textkappa\or \textlambda\or
+ \textmu\or \textnu\or \textxi\or \textomicron\or \textpi\or \n@vanta\fi
+ \gr@num@iv}
+\def\gr@num@vi#1{%
+ \katwtonos
+ \ifcase#1\or \textrho\or \textsigma\or \texttau\or \textupsilon
+ \or \textphi\or \textchi\or \textpsi\or \textomega\or \n@vecento\fi
+ \gr@num@v}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\subsection{Attic numerals}
+% It's true that Apostolos Siropoulos wrote also the |athnum.sty| extension package
+% in order to typeset integer numbers with the Athenian or Attic notation; this
+% representation of integer strictly positive integers was similar in a way to the
+% Roman notation, based on a biquinalry representation of decimal digits (taking
+% into account that there was not a symbol for zero) so as the Romans had the
+% symbols for 1, 5, 10, 50, 100, 500 and 1000 (I, V, X, L, C, D, M) the Attic
+% notation has symbols for the same sequence of decimal values extended with
+% 10\,000 and 50\,000. While typesetting philological texts in Greek it might be
+% necessary to use also the Attic notation. % As the original Roman notation used
+% to be purely additive (i.e.\ 9\,=\,VIIII), so is the Attic notation.
+%
+%\begin{macro}{\AtticNumeral}
+%\begin{macro}{\AtticCycl@}
+% Therefore another conversion macro was devised that receives the value to be
+% converted as its argument and checks that it falls between the boundaries;
+% actually the lower boundary is zero, while the upper boundary was chosen to be
+% 99\,999, for no other reason that the lack of further symbols, beyond the value
+% 50\,000, would force to long sequences of identical symbols that are difficult
+% to read. The |athnum.sty| package allows to extend this range to 249\,9999;
+% should it be necessary, the user is invited to load that package and its
+% transformation command |\athnum|.
+%
+% The user command |\AtticNumeral| is very simple, but it must be preceded by the
+% definitions of the quinary symbols for 50, 500, 5000, and 50\,000; such symbols
+% are present in all the CB Greek fonts in all sizes, series and shapes; therefore
+% the definitions must be subject to the LGR enconding:
+% \begin{macrocode}
+\DeclareTextSymbol{\Vmiria}{\GRencoding@name}{5}
+\DeclareTextSymbol{\Vkilo}{\GRencoding@name}{4}
+\DeclareTextSymbol{\Vetto}{\GRencoding@name}{3}
+\DeclareTextSymbol{\Vdeka}{\GRencoding@name}{2}
+% \end{macrocode}
+% The we need a command for issuing a warning message if the number to be
+% transformed is out of range:
+% \begin{macrocode}
+\newcommand*\attic@ill@value[1]{\PackageWarning{teubner}{%
+Illegal value (\number#1) for \string\ActicNumeral\space}}
+% \end{macrocode}
+% Finally the robust definition of the |\AtticNumeral| command"
+% \begin{macrocode}
+\DeclareRobustCommand*\AtticNumeral[1]{%
+\ifnum#1<\@ne \attic@ill@value{#1}\else
+ \ifnum#1>99999\relax \attic@ill@value{#1}\else
+ \AtticCycl@{#1}%
+ \fi
+\fi}
+
+% \end{macrocode}
+% The real transformation algorithm is transfered to the auxiliary macro
+% |\AttiCycl@|, where successive division by 10 allow to extract the various decimal
+% digits of various weights maintaining the remainder in the original counter; each
+% decimal digit is possibly divided into the quinary value and the remaining units
+% up to 4; the the cycle is repeated untile the decimal units, that do not require
+% the computation of the remainder and terminate the cycle. Notice that we use also
+% the $\varepsilon$-\TeX\ extended commands for integer computations; this implies
+% that |teubner| mus be run with a suitably recent version of the typesetting engine
+% that embeds the above extensions.
+% \begin{macrocode}
+\def\AtticCycl@#1{%
+ \bgroup
+ \countdef\valore=252\countdef\cifra=250\relax
+ \valore=#1\relax
+ \cifra=\valore\divide\cifra10000\relax
+ \valore=\numexpr\valore-\cifra*10000\relax
+ \ifnum\cifra>4\relax\Vmiria \advance\cifra-5\relax\fi
+ \@whilenum\cifra>\z@\do{M\advance\cifra\m@ne}%
+ \cifra=\valore\divide\cifra1000\relax
+ \valore=\numexpr\valore-\cifra*1000\relax
+ \ifnum\cifra>4\relax\Vkilo \advance\cifra-5\relax\fi
+ \@whilenum\cifra>\z@\do{Q\advance\cifra\m@ne}%
+ \cifra=\valore\divide\cifra100\relax
+ \valore=\numexpr\valore-\cifra*100\relax
+ \ifnum\cifra>4\relax\Vetto \advance\cifra-5\relax\fi
+ \@whilenum\cifra>\z@\do{H\advance\cifra\m@ne}%
+ \cifra=\valore\divide\cifra10\relax
+ \valore=\numexpr\valore-\cifra*10\relax
+ \ifnum\cifra>4\relax\Vdeka \advance\cifra-5\relax\fi
+ \@whilenum\cifra>\z@\do{D\advance\cifra\m@ne}%
+ \cifra=\valore
+ \ifnum\cifra>4\relax P\advance\cifra-5\relax\fi
+ \@whilenum\cifra>\z@\do{I\advance\cifra\m@ne}%
+ \egroup}
+
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\iffalse
+%</package>
+%\fi
+%
+%\iffalse
+%<*tbtx>
+%\fi
+%\section{Accessing the CBgreek fonts when the TX fonts are selected}
+% During the year 2010 this package \textsf{teubner.sty} was upgraded in order to allow
+% using the CBgreek fonts even when other Latin fonts, different from the ``standard'' CM
+% and LM ones are selected for typesetting text with the Latin script.
+
+% At the same time Antonis Tsolomitis uploaded a new package in order to let
+% Greek users use some Greek fonts that match the Times eXtended
+% ones\footnote{Probably Antonis Tsolomitis' Greek fonts match also the
+% newer Times eXtended fonts produced by Michael Sharpe. The newer fonts
+% have different font family names than the previous TX fonts; in order
+% to produce similar \texttt{.fd} files to be used with the newer Times
+% fonts, it is necessary to procede as for any other font collection
+% different from the TX ones.}. In order to use the de facto default
+% encoding LGR for Greek fonts, he produced the necessary |lgrtxr.fd|,
+% |lgrtxss.fd|, |lgrtxtt.fd|, font definition files that allow the font
+% switching implied by the |greek| option to the \textsf{babel} package.
+% These files take precedence over the mechanism outlined in
+% section~\ref{ssec:LatinFontComp}, because command |\substitutefontfamily|
+% first tests the existence of |lgrtxr.fd|, and, if this is not available,
+% it may generate a specific one suitable for working smoothly with
+% \textsf{teubner.sty}.
+%
+% Now if Tsolomitis' files are available on the main system tree, these
+% take precedence and the \textsf{teubner} compatible files are not
+% generated. Unfortunately Tsolomitis' fonts, although better suited to
+% match the TX fonts, are well matched to modern Greek typesettin,
+% but they are incomplete for philological typesetting.
+%
+% We therefore avoid this clash by creating a \textsf{teubnertx.sty} file.
+% This extension defines the families and shapes available with the
+% familiar fond definition files, but the information gets input by
+% \textsf{teubner.sty} at the ``begin document'' time, without resorting
+% to any |.fd| file. May be more information is loaded than is strictly
+% necessary, but it better to do this way than to clash with other packages.
+% \begin{macrocode}
+ \DeclareFontFamily{LGR}{txr}{}
+ \DeclareFontShape{LGR}{txr}{m}{n}{<->ssub * cmr/m/n}{}
+ \DeclareFontShape{LGR}{txr}{m}{it}{<->ssub * cmr/m/it}{}
+ \DeclareFontShape{LGR}{txr}{m}{sl}{<->ssub * cmr/m/sl}{}
+ \DeclareFontShape{LGR}{txr}{m}{sc}{<->ssub * cmr/m/sc}{}
+ \DeclareFontShape{LGR}{txr}{b}{n}{<->ssub * cmr/bx/n}{}
+ \DeclareFontShape{LGR}{txr}{b}{it}{<->ssub * cmr/bx/it}{}
+ \DeclareFontShape{LGR}{txr}{b}{sl}{<->ssub * cmr/bx/sl}{}
+ \DeclareFontShape{LGR}{txr}{b}{sc}{<->ssub * cmr/bx/sc}{}
+ \DeclareFontShape{LGR}{txr}{bx}{n}{<->ssub * cmr/bx/n}{}
+ \DeclareFontShape{LGR}{txr}{bx}{it}{<->ssub * cmr/bx/it}{}
+ \DeclareFontShape{LGR}{txr}{bx}{sl}{<->ssub * cmr/bx/sl}{}
+ \DeclareFontShape{LGR}{txr}{bx}{sc}{<->ssub * cmr/bx/sc}{}
+
+ \DeclareFontShape{LGR}{txr}{m}{li}{<->ssub * cmr/m/li}{}
+ \DeclareFontShape{LGR}{txr}{b}{li}{<->ssub * cmr/b/li}{}
+ \DeclareFontShape{LGR}{txr}{bx}{li}{<->ssub * cmr/bx/li}{}
+ \DeclareFontShape{LGR}{txr}{m}{ui}{<->ssub * cmr/m/ui}{}
+ \DeclareFontShape{LGR}{txr}{b}{ui}{<->ssub * cmr/m/ui}{}
+ \DeclareFontShape{LGR}{txr}{bx}{ui}{<->ssub * cmr/bx/ui}{}
+ \DeclareFontShape{LGR}{txr}{m}{rs}{<->ssub * cmr/m/rs}{}
+ \DeclareFontShape{LGR}{txr}{b}{rs}{<->ssub * cmr/m/rs}{}
+ \DeclareFontShape{LGR}{txr}{bx}{rs}{<->ssub * cmr/bx/rs}{}
+
+ \DeclareFontFamily{LGR}{txss}{}
+ \DeclareFontShape{LGR}{txss}{m}{n}{<->ssub * cmss/m/n}{}
+ \DeclareFontShape{LGR}{txss}{m}{it}{<->ssub * cmss/m/it}{}
+ \DeclareFontShape{LGR}{txss}{m}{sl}{<->ssub * cmss/m/sl}{}
+ \DeclareFontShape{LGR}{txss}{m}{sc}{<->ssub * cmss/m/sc}{}
+ \DeclareFontShape{LGR}{txss}{b}{n}{<->ssub * cmss/bx/n}{}
+ \DeclareFontShape{LGR}{txss}{b}{it}{<->ssub * cmss/bx/it}{}
+ \DeclareFontShape{LGR}{txss}{b}{sl}{<->ssub * cmss/bx/sl}{}
+ \DeclareFontShape{LGR}{txss}{b}{sc}{<->ssub * cmss/bx/sc}{}
+ \DeclareFontShape{LGR}{txss}{bx}{n}{<->ssub * cmss/bx/n}{}
+ \DeclareFontShape{LGR}{txss}{bx}{it}{<->ssub * cmss/bx/it}{}
+ \DeclareFontShape{LGR}{txss}{bx}{sl}{<->ssub * cmss/bx/sl}{}
+ \DeclareFontShape{LGR}{txss}{bx}{sc}{<->ssub * cmss/bx/sc}{}
+
+ \DeclareFontFamily{LGR}{txtt}{\hyphenchar=-1}
+ \DeclareFontShape{LGR}{txtt}{m}{n}{<->ssub * cmtt/m/n}{}
+ \DeclareFontShape{LGR}{txtt}{m}{it}{<->ssub * cmtt/m/it}{}
+ \DeclareFontShape{LGR}{txtt}{m}{sl}{<->ssub * cmtt/m/sl}{}
+ \DeclareFontShape{LGR}{txtt}{m}{sc}{<->ssub * cmtt/m/sc}{}
+ \DeclareFontShape{LGR}{txtt}{b}{n}{<->ssub * cmtt/bx/n}{}
+ \DeclareFontShape{LGR}{txtt}{b}{it}{<->ssub * cmtt/bx/it}{}
+ \DeclareFontShape{LGR}{txtt}{b}{sl}{<->ssub * cmtt/bx/sl}{}
+ \DeclareFontShape{LGR}{txtt}{b}{sc}{<->ssub * cmtt/bx/sc}{}
+ \DeclareFontShape{LGR}{txtt}{bx}{n}{<->ssub * cmtt/bx/n}{}
+ \DeclareFontShape{LGR}{txtt}{bx}{it}{<->ssub * cmtt/bx/it}{}
+ \DeclareFontShape{LGR}{txtt}{bx}{sl}{<->ssub * cmtt/bx/sl}{}
+ \DeclareFontShape{LGR}{txtt}{bx}{sc}{<->ssub * cmtt/bx/sc}{}
+% \end{macrocode}
+%\iffalse
+%</tbtx>
+%\fi
+% \Finale
+\endinput
diff --git a/macros/latex/contrib/teubner/teubner.pdf b/macros/latex/contrib/teubner/teubner.pdf
new file mode 100644
index 0000000000..90735cb33b
--- /dev/null
+++ b/macros/latex/contrib/teubner/teubner.pdf
Binary files differ
diff --git a/macros/latex/contrib/teubner/teubner.txt b/macros/latex/contrib/teubner/teubner.txt
new file mode 100644
index 0000000000..6594a1ecc5
--- /dev/null
+++ b/macros/latex/contrib/teubner/teubner.txt
@@ -0,0 +1,170 @@
+
+ THE TEUBNER PACKAGE VERSION 4.x OF MARCH 2016
+ EXTENSION FOR PHILOLOGICAL TYPESETTING
+
+
+Copyright 2001-2004-2016 Claudio Beccari
+
+The programs contained in this bundle can be distributed and/or modified
+under the terms of the LaTeX Project Public License (LPPL), version 1.3c
+dated 2008-05-04 or later as it appears in
+ CTAN/macros/latex/base/lppl.tex.
+
+
+This bundle contains the following files
+
+README short information abut installing this bundle
+teubner.txt this file
+teubner.dtx documented TeX file
+teubner-doc.tex documentation file
+teubner.pdf technical documentation
+teubner-doc.pdf usage documentation
+
+By running pdflatex on teubner.dtx in addition to the documentation
+file teubner.pdf, the byproduct files teubner.sty, teubnertx.sty, are
+generated; teubner-doc.pdf must be generated by running pdflatex on the
+source file teubner-doc.tex file.
+These two .pdf files are already contained in the bundle.
+
+The previous versions 3.x of this packages used a LGRaccents-glyphs.def
+file, that now is not necessary, and is not contained in this bundle any
+more.
+
+File teubner-doc.pdf is the documentation file that shows what can be
+done with this extension package and displays several examples.
+
+Version 4.x of the teubner package contains many new enhancements, among
+which it's worth noting the compliance with the new Greek language
+support to babel, that makes use of the encoding independent LICR (LaTeX
+Internal Character Representation) of the Greek characters & diacritics;
+it contains also the macros that allow using the LGR encoded CBfonts
+together with other PostScript scalable fonts; the compatibility with
+the Times and the Palatino eXtended fonts, through the packages txfonts
+and pxfonts, are already built in; the compatibility with the Latin
+Modern fonts was already available with version 2.x of this package.
+
+While this package was upgraded and uploaded to CTAN, Antonis Tsolomitis
+uploaded the package txfontsb which adds the possibility of using nice
+TX compatible Greek fonts when using the TX latin fonts so as to let the
+users typeset their documents in mixed script.
+The upright shape resembles the traditional Didot one, and the italic
+shape resembles the Lipsian one; they come in both the medium and the
+bold series and match the TX latin fonts pretty well. They probably match
+also the newer newtxtext fonts by Michael Sharpe, but since the latter
+have different font family names, the automatically produced .fd files
+for adapting the LGR encoded fonts to the TX fonts are not suited any
+more; in order to have matching .fd files it is necessary to proceed as
+with any other font collection different from the TX one
+
+Although Tsolomitis' fonts satisfy very well the everyday typesetting
+necessities of the Greek users and blend well also with the TX math
+fonts, they do not satisfy the requirements of the teubner package. This
+is why the processing of the teubner.dtx file generates also the file
+teubnertx.sty that is being input at begin document time if the user
+specified the TX fonts by calling the txfonts package.
+
+In order to use this extension package with LaTeX you have to
+install it. May be the very installation of your (recent) TeX system
+distribution already provided for this task; may be your TeX system is
+configured to load missing packages on the fly. In any case you can
+check and possibly run your Package Manager (with MiKTeX follow the path
+Programs|MiKTeX Settings|Packages; with TeXlive and MacTeX (if their
+installation configuration was not the default complete one) run tlmgr.
+
+If you feel more comfortable to do everything by yourself and/or want to
+make a personal installation, run teubner.dtx through pdflatex; the
+generated files are teubner.sty and the aforementioned teubnertx.sty
+file; they must be moved where TeX-the-program can find them. This
+depends very much on your particular implementation of the TeX system,
+but if your system copes with the TDS (standard TeX Directory Structure)
+and has a multiplicity of different TeX directory trees, you probably
+have a \localtexmf rooted TDS, or a /texmmf one in your Home directory
+containing a tex directory tree which on turn contains a latex directory.
+Under the latter one create a new directory named, say, teubner, and
+move there teubner.sty, and teubnertx.sty.
+
+I suggest you to create a directory teubner in the doc directory of the
+locally rooted structure and move there both teubner-doc.pdf and the
+teubner.pdf file that you get by running pdflatex directly on teubner.dtx.
+
+For what concerns fonts, they should already be installed with a recent
+TeX system distribution; this means that there are already all the
+files TeX-the-program needs in order to do its work; there is one
+point, though, that requires full attention; the default basic TeX
+system installation loads only the PostScript fonts in size 10pt; all
+other sizes are are obtained by reducing or enlarging that single size.
+A complete TeX system installation does not exhibit this limitation.
+There are also non standard scalable Type 1 fonts, such for example, the
+Fourier ones, that come only in one size, the 10pt one; for these
+fonts it is not strictly necessary to do the same with the sizes of the
+CBfonts, but if you prefer you can.
+
+In any case the teubner package copes with this situation if you specify
+the "10pt" option when calling this package, but if you want to have
+perfect optical sizes, then you should download from CTAN the full
+collection and install it in your computer. The details for this
+installation require you read with due attention the instructions that
+come with your TeX system distribution; it's not difficult, but it
+requires to be very careful at every step. Remember, though, that your
+Package Manager can do all the work for you.
+
+It's important to control that you have the latest CBfonts; even if you
+got them pre-installed with your TeX system distribution, may be they
+are not the latest version. The full collection has been redone in
+the year 2007, and partially upgraded in 2010; the reduced collection is
+a subset of the full one. Earlier distributions, dated at least 2002,
+might be compatible; if you notice something strange with the CBfonts,
+verify if your fonts are up to date.
+
+Another question you might ask yourself: is my TeX system complete and
+up to date? The fact you installed a TeX system and you did not have the
+CBfonts may be an index that you still have the babel package locked at
+a version number earlier than 3.9g. I suggest you to upgrade your TeX
+system to the most up to date one you can find on CTAN.
+
+This point is connected with the question of the updated metric files
+related to the Lipsian fonts; if your TeX system distribution has been
+updated to what was available on CTAN by May 2010, your distribution
+already contains the updated .tfm files. Otherwise, please, update your
+CBfonts.
+
+After all these steps are done, you are ready to use your teubner
+extensions; it will not be easy at the beginning, because there are
+hundreds of new commands. Be sure to have already thoroughly read the
+documentation file teubner-doc.pdf and that you have the hard copy close
+to you.
+
+Remember, though, that most commands are Latin names or abbreviations
+that should be familiar to any philologist specialised in classical/
+ancient European languages, such as classical Greek, Latin, and so on.
+
+This set of extension commands has been tested in several documents;
+Since I am neither a philologist nor a Greek scholar, I prepared them as
+a *hobby* while trying to help a philologist friend. I hope this package
+may be useful also to you, but I must disclaim any liability for any
+unwanted results you might get, including the most dreadful possible
+things that may happen to anybody using a computer.
+
+I will not write down any strong disclaimer sentence in capital letters,
+because it should be absolutely evident that I did something I consider
+useful, but is up to you to decide to use it and face the consequences
+(... which, nevertheless, I hope they are what you expected).
+
+If you find this package of some utility but you find some errors and/or
+some glitches, please write me an e-mail (see below). If you'd like me
+to realise some other commands, please send me by e-mail your request
+together with a scanned image containing the visual result you'd like to
+obtain. I don't guarantee I'll be able to satisfy your request, but I'll
+give it a try. In any case don't ask for things LaTeX can't do; and if
+you use LaTeX, you know what are its pros and cons.
+
+Happy philological LaTeXing!
+
+Claudio Beccari Turin, March 2016
+Professor Emeritus
+Politecnico di Torino, Italy
+claudio dot beccari at gmail dot com
+
+PS: I underline my former professorship in electronics, in order to
+stress the point that I am not a philologist, therefore beware: this
+work might simply be "trash" to the eyes of a real philologist!
diff --git a/macros/latex/contrib/teubner/teubnertx.sty b/macros/latex/contrib/teubner/teubnertx.sty
new file mode 100644
index 0000000000..b37e8e8d9b
--- /dev/null
+++ b/macros/latex/contrib/teubner/teubnertx.sty
@@ -0,0 +1,91 @@
+%%
+%% This is file `teubnertx.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% teubner.dtx (with options: `tbtx')
+%% Copyright 2001--2015 Claudio Beccari All rights reserved.
+%%
+%% 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.
+%%
+%% This file is distributed under the LPPL licence, version 1.3c
+%% dated 2008-05-04 or later as it appears in
+%% CTAN/macros/latex/base/lppl.tex.
+%% See the end of the file.
+%%
+%% IMPORTANT NOTICE:
+%%
+%% You are allowed to distribute this file under the conditions that are
+%% specified in the source file teubner.dtx.
+%%
+%% If you receive only some of these files from someone, complain!
+%%
+%% You are NOT ALLOWED to distribute this file alone.
+%% You are NOT ALLOWED to take money for the distribution or use
+%% of either this file or a changed version, except for a nominal
+%% charge for copying, etc.
+\ProvidesPackage{teubnertx}[%
+2016/03/31 v.4.8
+Access to the LGR encoded Greek fonts that match the TX fonts]
+
+ \DeclareFontFamily{LGR}{txr}{}
+ \DeclareFontShape{LGR}{txr}{m}{n}{<->ssub * cmr/m/n}{}
+ \DeclareFontShape{LGR}{txr}{m}{it}{<->ssub * cmr/m/it}{}
+ \DeclareFontShape{LGR}{txr}{m}{sl}{<->ssub * cmr/m/sl}{}
+ \DeclareFontShape{LGR}{txr}{m}{sc}{<->ssub * cmr/m/sc}{}
+ \DeclareFontShape{LGR}{txr}{b}{n}{<->ssub * cmr/bx/n}{}
+ \DeclareFontShape{LGR}{txr}{b}{it}{<->ssub * cmr/bx/it}{}
+ \DeclareFontShape{LGR}{txr}{b}{sl}{<->ssub * cmr/bx/sl}{}
+ \DeclareFontShape{LGR}{txr}{b}{sc}{<->ssub * cmr/bx/sc}{}
+ \DeclareFontShape{LGR}{txr}{bx}{n}{<->ssub * cmr/bx/n}{}
+ \DeclareFontShape{LGR}{txr}{bx}{it}{<->ssub * cmr/bx/it}{}
+ \DeclareFontShape{LGR}{txr}{bx}{sl}{<->ssub * cmr/bx/sl}{}
+ \DeclareFontShape{LGR}{txr}{bx}{sc}{<->ssub * cmr/bx/sc}{}
+
+ \DeclareFontShape{LGR}{txr}{m}{li}{<->ssub * cmr/m/li}{}
+ \DeclareFontShape{LGR}{txr}{b}{li}{<->ssub * cmr/b/li}{}
+ \DeclareFontShape{LGR}{txr}{bx}{li}{<->ssub * cmr/bx/li}{}
+ \DeclareFontShape{LGR}{txr}{m}{ui}{<->ssub * cmr/m/ui}{}
+ \DeclareFontShape{LGR}{txr}{b}{ui}{<->ssub * cmr/m/ui}{}
+ \DeclareFontShape{LGR}{txr}{bx}{ui}{<->ssub * cmr/bx/ui}{}
+ \DeclareFontShape{LGR}{txr}{m}{rs}{<->ssub * cmr/m/rs}{}
+ \DeclareFontShape{LGR}{txr}{b}{rs}{<->ssub * cmr/m/rs}{}
+ \DeclareFontShape{LGR}{txr}{bx}{rs}{<->ssub * cmr/bx/rs}{}
+
+ \DeclareFontFamily{LGR}{txss}{}
+ \DeclareFontShape{LGR}{txss}{m}{n}{<->ssub * cmss/m/n}{}
+ \DeclareFontShape{LGR}{txss}{m}{it}{<->ssub * cmss/m/it}{}
+ \DeclareFontShape{LGR}{txss}{m}{sl}{<->ssub * cmss/m/sl}{}
+ \DeclareFontShape{LGR}{txss}{m}{sc}{<->ssub * cmss/m/sc}{}
+ \DeclareFontShape{LGR}{txss}{b}{n}{<->ssub * cmss/bx/n}{}
+ \DeclareFontShape{LGR}{txss}{b}{it}{<->ssub * cmss/bx/it}{}
+ \DeclareFontShape{LGR}{txss}{b}{sl}{<->ssub * cmss/bx/sl}{}
+ \DeclareFontShape{LGR}{txss}{b}{sc}{<->ssub * cmss/bx/sc}{}
+ \DeclareFontShape{LGR}{txss}{bx}{n}{<->ssub * cmss/bx/n}{}
+ \DeclareFontShape{LGR}{txss}{bx}{it}{<->ssub * cmss/bx/it}{}
+ \DeclareFontShape{LGR}{txss}{bx}{sl}{<->ssub * cmss/bx/sl}{}
+ \DeclareFontShape{LGR}{txss}{bx}{sc}{<->ssub * cmss/bx/sc}{}
+
+ \DeclareFontFamily{LGR}{txtt}{\hyphenchar=-1}
+ \DeclareFontShape{LGR}{txtt}{m}{n}{<->ssub * cmtt/m/n}{}
+ \DeclareFontShape{LGR}{txtt}{m}{it}{<->ssub * cmtt/m/it}{}
+ \DeclareFontShape{LGR}{txtt}{m}{sl}{<->ssub * cmtt/m/sl}{}
+ \DeclareFontShape{LGR}{txtt}{m}{sc}{<->ssub * cmtt/m/sc}{}
+ \DeclareFontShape{LGR}{txtt}{b}{n}{<->ssub * cmtt/bx/n}{}
+ \DeclareFontShape{LGR}{txtt}{b}{it}{<->ssub * cmtt/bx/it}{}
+ \DeclareFontShape{LGR}{txtt}{b}{sl}{<->ssub * cmtt/bx/sl}{}
+ \DeclareFontShape{LGR}{txtt}{b}{sc}{<->ssub * cmtt/bx/sc}{}
+ \DeclareFontShape{LGR}{txtt}{bx}{n}{<->ssub * cmtt/bx/n}{}
+ \DeclareFontShape{LGR}{txtt}{bx}{it}{<->ssub * cmtt/bx/it}{}
+ \DeclareFontShape{LGR}{txtt}{bx}{sl}{<->ssub * cmtt/bx/sl}{}
+ \DeclareFontShape{LGR}{txtt}{bx}{sc}{<->ssub * cmtt/bx/sc}{}
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%%
+%% End of file `teubnertx.sty'.