diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-19 23:38:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-19 23:38:28 +0000 |
commit | 1d4c2a74644b4bbb8828b70adc492f5da0493236 (patch) | |
tree | ab8b88bea0aae246ed5b3dc4c7a99805ad42ee83 /Master/texmf-dist/source/latex/teubner | |
parent | 69de3344104bfec286cbe7ea63f03fab58d3c1ec (diff) |
teubner (19apr13)
git-svn-id: svn://tug.org/texlive/trunk@30045 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/teubner')
-rw-r--r-- | Master/texmf-dist/source/latex/teubner/teubner.dtx | 178 |
1 files changed, 106 insertions, 72 deletions
diff --git a/Master/texmf-dist/source/latex/teubner/teubner.dtx b/Master/texmf-dist/source/latex/teubner/teubner.dtx index 9ae4a362db7..e5ffc2a84a4 100644 --- a/Master/texmf-dist/source/latex/teubner/teubner.dtx +++ b/Master/texmf-dist/source/latex/teubner/teubner.dtx @@ -13,6 +13,7 @@ Copyright 2001--2012 Claudio Beccari All rights reserved. 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: @@ -28,6 +29,13 @@ 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 \askforoverwritetrue \generateFile{teubner.sty}{t}{\from{teubner.dtx}{package}} @@ -38,14 +46,6 @@ etc. \ifx\tmpa\fmtname\endgroup\expandafter\bye\fi \endgroup %</internal> -% File: teubner.dtx Copyright (C) 2001-2012 Claudio Beccari -% -% 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 -% % \fi % %% \CharacterTable @@ -64,12 +64,22 @@ etc. %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} % \iffalse -%<*dtx> -\ProvidesFile{teubner.dtx}[2012/09/11 v.3.3a extensions for Greek philology] -%</dtx> %<package>\NeedsTeXFormat{LaTeX2e} -%<package>\ProvidesPackage{teubner}[2012/09/11 v.3.3a extensions for Greek philology] -% +%<*driver> +\ProvidesFile{teubner.dtx}[% +%</driver> +%<package>\ProvidesPackage{teubner}[% +%<tbtx>\ProvidesPackage{teubnertx}[% +%<defs>\ProvidesFile{LGRaccents-glyphs}[% +%<*driver,package,defs,tbtx> +2012/09/17 v.3.4 +%<package>Extensions for Greek philology] +%<defs>Definitions of accents and glyphs for LGR encoded Greek fonts] +%<tbtx>Access to the LGR encoded Greek fonts when TX fonts are used] +%</driver,package,defs,tbtx> +%<*driver> +] +%</driver> %<*driver> \documentclass{ltxdoc} \GetFileInfo{teubner.dtx} @@ -98,7 +108,7 @@ etc. %</driver> % \fi % -% \CheckSum{5022} +% \CheckSum{5062} % \begin{multicols}{2}\tableofcontents\end{multicols} % % @@ -362,14 +372,6 @@ etc. % % \section{Code} % \subsection{Preliminaries} -% The beginning of the file starts with the traditional stuff; -% as usual we provide also the means for avoiding reading this file again. -% \begin{macrocode} -%<*package> -\ifx\teubner\undefined - \def\teubner{teubner}\else\expandafter\endinput -\fi -% \end{macrocode} % 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 @@ -380,6 +382,9 @@ etc. % been corrected and this trick is not necessary any more. Nevertheless we define % a new boolean that copes with the fact that sin 2007 the \TeX\ engine is % \textsf{pdftex} even when DVI output is sought: +%\iffalse +%<*package> +%\fi % \begin{macrocode} \newif\ifPDF \PDFfalse \@ifundefined{pdfoutput}{\PDFfalse}{\ifnum\pdfoutput>\z@\PDFtrue\fi} @@ -766,7 +771,7 @@ Type X <return> to exit.}% % |\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 memorized, then the current -% Greek version is selected; the |\let\~\GRcirc| is required because swithching +% Greek version is selected; the |\let\~\Perispomeni| is required because swithching % 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. @@ -784,7 +789,7 @@ Type X <return> to exit.}% \DeclareTextFontCommand{\textli}{\lishape}% \DeclareRobustCommand\Lipsiakostext{% \expandafter\select@language\expandafter{\GreekName}% - \let\~\GRcirc\let~\greek@tilde\lishape} + \let\~\Perispomeni\let~\greek@tilde\lishape} % \end{macrocode} %\end{macro} @@ -838,7 +843,7 @@ Type X <return> to exit.}% % \begin{macrocode} \DeclareRobustCommand\textDidot[1]{{% \expandafter\select@language\expandafter{\GreekName}% - \let\~\GRcirc\let~\greek@tilde + \let\~\Perispomeni\let~\greek@tilde \fontencoding{LGR}\rmfamily#1}} % \end{macrocode} @@ -921,7 +926,6 @@ Type X <return> to exit.}% \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\relax \advance\dimen@\slant@\@tempdima @@ -1128,14 +1132,10 @@ Type X <return> to exit.}% % 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. % Notice that all these declarations are restricted to the Greek font encoding so -% they are usable only when such font is in force. See the |teubner-doc.pdf| file +% 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. % -% \begin{macrocode} -\input{LGRaccents-glyphs.def} -% \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. @@ -1148,7 +1148,7 @@ Type X <return> to exit.}% % past 15 years or so the Greek language definition file has always used the |~| % sign a 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 ot ``dirty tricks'' have been used, but +% |~| 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 @@ -1160,19 +1160,34 @@ Type X <return> to exit.}% \let\nbs\nobreakspace % \end{macrocode % -% Having defined the Greek accents with the extended macroso input with the -% |LGRaccents-glyphs.def| file, we can let some equivalences so that such accents -% may be used with shorter control sequences that are coherent with the -% corresponding ligatures. -% \begin{macrocode} -% grave -\DeclareTextCommand{\`}{\GRencoding@name}[1]{\lift@accent{96}{#1}} -% acute -\DeclareTextCommand{\'}{\GRencoding@name}[1]{\lift@accent{39}{#1}} -% circumflex -\DeclareTextCommand{\~}{\GRencoding@name}[1]{\lift@accent{126}{#1}} -\let\GRcirc\Perispomeni +% Before defining the Greek accents with the extended macros input with the +% |LGRaccents-glyphs.def| file, we have to define the accent supersitioning 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 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 avoidng that the +% normal redefined macros highjack the extended macro facility acquired by inputing +% the external definition file |LGRaccents-glyphs.def|. +% For the diaeresis we need to put an invisible character (|v| in the LGR encoded CB +% fonts) 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{34v}{#1}} +\DeclareTextCommand{\u}{\GRencoding@name}[1]{\lift@accent{30}{#1}} +\DeclareTextCommand{\=}{\GRencoding@name}[1]{\lift@accent{31}{#1}} +\renewcommand*\'[1]{\lift@accent{39}{#1}} +\renewcommand*\`[1]{\lift@accent{96}{#1}} +\renewcommand*\~[1]{\lift@accent{126}{#1}} +\renewcommand*\"[1]{\lift@accent{34v}{#1}} +\input{LGRaccents-glyphs.def} +\let\GRcirc\Perispomeni +% % \end{mcrocode} % 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 multilanguage document @@ -1189,12 +1204,7 @@ Type X <return> to exit.}% % For the diaeresis we need to put an invisible character (|v| in the LGR encoded CB % fonts) in order to avoid any ligature with an implied end of word (boundarychar) % that turns the diaeresis into an apostrophe. -% \begin{macrocode} -% diaeresis -\DeclareTextCommand{\"}{\GRencoding@name}[1]{\lift@accent{34v}{#1}} -% breve -\DeclareTextCommand{\u}{\GRencoding@name}[1]{\lift@accent{30}{#1}} -% \end{macrocode} +% % Besides the normal |\u| 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 @@ -3420,13 +3430,13 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} % \end{macrocode} %\end{macro} %\end{macro} +%\iffalse %</package> +%\fi % +%\iffalse %<*defs> -% \begin{macrocode} -\ProvidesFile{LGRaccents-glyphs.def}% - [2012/09/11 v.3.3a Definitions of accents and glyphs for LGR encoded Greek fonts] -% \end{macrocode} +%\fi % \subsection{First set of extended accent definitions} % These macros were originally defined by Guenter Milde % in his file lgrenc-accents.def version 3.2 dated 2008-06-17 @@ -3455,21 +3465,26 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} % \end{quote} % Solution 1) saves hitting one key but breaks the kerning mechanism; % Solution 2) requires hitting one more key but preserves the kerning -% mechanism. -% -% Only the diacritics that involve the breve (\u) and the macron (\=) -% are regular TeX accent macros and behave as ordinary OT1-like -% accents. There is no addressing of the marked glyphs, because the 256 -% font table can't accommodate so many glyphs. -% -% This file should be usable by inputting it even without requiring the +% mechanism. As explained in |teubner-doc.pdf| there might be some problems when +% typesetting in all capitals or in caps and small caps (just the initial is +% capitalized); in these cases the choice between either solution is not without +% consequences, especially if capitalization takes place behind the scenes, say, +% in typesetting a header that is stylized with |\MakeUppercase|. +% +% Only the diacritics that involve the breve (\u) and the macron (\=) are ``regular'' +% \TeX\ accent macros and behave almost as ordinary OT1-like accents; actually they +% allow to stack several accents over the same base letter. There is no addressing +% of the marked glyphs, because the 256-font table can't accommodate so many glyphs. +% +% This file should be usable by inputting it directly even without requiring the % polutoniko language attribute of the Greek language. % % For more details read the teubner.pdf and the teubner-doc.pdf files % that are part of the teubner package documentation. % -% Thanks to Stanislav Kondratyev who spotted a bug in the definition of -% one of the commands +% Thanks to Stanislav Kondratyev who spotted sneaky bugs in the definition of some +% commands; his testing and feedback resulted very precious. This upgraded version 3.4 +% of the |teubner| package derived from his feedback. % % \begin{macrocode} \providecommand*\GRencoding@name{LGR} @@ -3480,11 +3495,16 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} \DeclareTextAccent{\Oxia}{\GRencoding@name}{"27} % oxia \DeclareTextAccent{\Varia}{\GRencoding@name}{"60} % varia \DeclareTextAccent{\Perispomeni}{\GRencoding@name}{"7E} % perispomeni +\DeclareTextCommand{\'}{\GRencoding@name}{\Oxia} +\DeclareTextCommand{\`}{\GRencoding@name}{\Varia} +\DeclareTextCommand{\~}{\GRencoding@name}{\Perispomeni} +\DeclareTextCommand{\"}{\GRencoding@name}{\Dialytika} + \DeclareTextAccent{\Dasia}{\GRencoding@name}{"3C} % rough breath/spirit \DeclareTextAccent{\Psili}{\GRencoding@name}{"3E} % smooth breath/spirit -\DeclareTextCommand{\<}{\GRencoding@name}{\Dasia} % alias coomand +\DeclareTextCommand{\<}{\GRencoding@name}{\Dasia} % alias command \DeclareTextCommand{\>}{\GRencoding@name}{\Psili} % alias command -% + \DeclareTextAccent{\DialytikaOxia}{\GRencoding@name}{"23} % oxia+dialytika \DeclareTextAccent{\DialytikaVaria}{\GRencoding@name}{"24} % varia+dialytika \DeclareTextAccent{\DialytikaPerispomeni}{\GRencoding@name}{"20} % perisp.+dial. @@ -3494,8 +3514,8 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} \DeclareTextAccent{\DasiaPerispomeni}{\GRencoding@name}{"40}% perisp.+rough \DeclareTextAccent{\PsiliOxia}{\GRencoding@name}{"5E} % oxia+smooth -\DeclareTextAccent{\PsiliVaria}{\GRencoding@name}{"5F} % varia+smooth -\DeclareTextAccent{\PsiliPerispomeni}{\GRencoding@name}{"5C}% perisp/+smooth +\DeclareTextAccent{\PsiliVaria}{\GRencoding@name}{"5F} % varia+smooth +\DeclareTextAccent{\PsiliPerispomeni}{\GRencoding@name}{"5C}% perisp.+smooth % composite commands \DeclareTextCompositeCommand{\"}{\GRencoding@name}{'}{\DialytikaOxia} \DeclareTextCompositeCommand{\"}{\GRencoding@name}{\'}{\DialytikaOxia} @@ -3566,6 +3586,7 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} \DeclareTextComposite{\PsiliOxia}{\GRencoding@name}{a}{138} \DeclareTextComposite{\PsiliPerispomeni}{\GRencoding@name}{a}{146} \DeclareTextComposite{\PsiliVaria}{\GRencoding@name}{a}{139} + \DeclareTextComposite{\`}{\GRencoding@name}{h}{152} \DeclareTextComposite{\Dasia}{\GRencoding@name}{h}{153} \DeclareTextComposite{\Psili}{\GRencoding@name}{h}{154} @@ -3578,6 +3599,7 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} \DeclareTextComposite{\~}{\GRencoding@name}{h}{168} \DeclareTextComposite{\DasiaPerispomeni}{\GRencoding@name}{h}{169} \DeclareTextComposite{\PsiliPerispomeni}{\GRencoding@name}{h}{170} + \DeclareTextComposite{\`}{\GRencoding@name}{w}{176} \DeclareTextComposite{\Dasia}{\GRencoding@name}{w}{177} \DeclareTextComposite{\Psili}{\GRencoding@name}{w}{178} @@ -3590,6 +3612,7 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} \DeclareTextComposite{\~}{\GRencoding@name}{w}{192} \DeclareTextComposite{\DasiaPerispomeni}{\GRencoding@name}{w}{193} \DeclareTextComposite{\PsiliPerispomeni}{\GRencoding@name}{w}{194} + \DeclareTextComposite{\`}{\GRencoding@name}{i}{200} \DeclareTextComposite{\Dasia}{\GRencoding@name}{i}{201} \DeclareTextComposite{\Psili}{\GRencoding@name}{i}{202} @@ -3606,6 +3629,7 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} \DeclareTextComposite{\DialytikaVaria}{\GRencoding@name}{i}{241} \DeclareTextComposite{\DialytikaTonos}{\GRencoding@name}{i}{242} \DeclareTextComposite{\DialytikaPerispomeni}{\GRencoding@name}{i}{243} + \DeclareTextComposite{\`}{\GRencoding@name}{u}{204} \DeclareTextComposite{\Dasia}{\GRencoding@name}{u}{205} \DeclareTextComposite{\Psili}{\GRencoding@name}{u}{206} @@ -3622,6 +3646,7 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} \DeclareTextComposite{\DialytikaVaria}{\GRencoding@name}{u}{245} \DeclareTextComposite{\DialytikaTonos}{\GRencoding@name}{u}{246} \DeclareTextComposite{\DialytikaPerispomeni}{\GRencoding@name}{u}{247} + \DeclareTextComposite{\`}{\GRencoding@name}{e}{224} \DeclareTextComposite{\Dasia}{\GRencoding@name}{e}{225} \DeclareTextComposite{\Psili}{\GRencoding@name}{e}{226} @@ -3711,6 +3736,9 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} \DeclareTextCompositeCommand{\DasiaPerispomeni}{\GRencoding@name}{I}{<\char126I} \DeclareTextCompositeCommand{\>}{\GRencoding@name}{I}{>I} \DeclareTextCompositeCommand{\<}{\GRencoding@name}{I}{<I} +\DeclareTextCompositeCommand{\Dialytica}{\GRencoding@name}{I}{\"I} +\DeclareTextCompositeCommand{\DialytikaOxia}{\GRencoding@name}{I}{\"I} +\DeclareTextCompositeCommand{\DialyticaDasia}{\GRencoding@name}{I}{\"I} \DeclareTextCompositeCommand{\Psili}{\GRencoding@name}{O}{>O} \DeclareTextCompositeCommand{\Dasia}{\GRencoding@name}{O}{<O} @@ -3731,6 +3759,9 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} \DeclareTextCompositeCommand{\DasiaOxia}{\GRencoding@name}{U}{<'U} \DeclareTextCompositeCommand{\DasiaPerispomeni}{\GRencoding@name}{U}{<\char126U} \DeclareTextCompositeCommand{\<}{\GRencoding@name}{U}{<U} +\DeclareTextCompositeCommand{\Dialytica}{\GRencoding@name}{U}{\"U} +\DeclareTextCompositeCommand{\DialytikaOxia}{\GRencoding@name}{U}{\"U} +\DeclareTextCompositeCommand{\DialyticaDasia}{\GRencoding@name}{U}{\"U} \DeclareTextCompositeCommand{\Psili}{\GRencoding@name}{W}{>W} \DeclareTextCompositeCommand{\Dasia}{\GRencoding@name}{W}{<W} @@ -3745,9 +3776,13 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} \DeclareTextCompositeCommand{\DasiaPerispomeni}{\GRencoding@name}{W}{<\char126W} \DeclareTextCompositeCommand{\>}{\GRencoding@name}{W}{>W} \DeclareTextCompositeCommand{\<}{\GRencoding@name}{W}{<W} -%</defs> % \end{macrocode} +%\iffalse +%</defs> +%\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 @@ -3773,8 +3808,6 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} % 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} -\ProvidesPackage{teubnertx}% - [2012/09/11 v.3.3a Access to the LGR encoded Greek fonts when TX fonts are used] \DeclareFontFamily{LGR}{txr}{} \DeclareFontShape{LGR}{txr}{m}{n}{<->ssub * cmr/m/n}{} \DeclareFontShape{LGR}{txr}{m}{it}{<->ssub * cmr/m/it}{} @@ -3826,8 +3859,9 @@ Illegal value (\number#1) for \string\ActicNumeral\space}} \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 |