summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/teubner/teubner.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-08-23 03:01:02 +0000
committerNorbert Preining <norbert@preining.info>2023-08-23 03:01:02 +0000
commit76d75859475de5b0b64017c9dfc11644a2ece537 (patch)
treee2f334df5d811d8fe54215e0591eaf227de58fe0 /macros/latex/contrib/teubner/teubner.dtx
parentcf3e954514eb50bea0335bdc97d6b76f80f5d03e (diff)
CTAN sync 202308230300
Diffstat (limited to 'macros/latex/contrib/teubner/teubner.dtx')
-rw-r--r--macros/latex/contrib/teubner/teubner.dtx63
1 files changed, 36 insertions, 27 deletions
diff --git a/macros/latex/contrib/teubner/teubner.dtx b/macros/latex/contrib/teubner/teubner.dtx
index c95283e7f3..bcac1f2b34 100644
--- a/macros/latex/contrib/teubner/teubner.dtx
+++ b/macros/latex/contrib/teubner/teubner.dtx
@@ -43,7 +43,7 @@ See the end of the file.
%<package>\ProvidesPackage{teubner}[%
%<tbtx>\ProvidesPackage{teubnertx}[%
%<*driver,package,tbtx>
-2023/06/10 v.5.8.0
+2023/08/22 v.5.8.2
%<package>Extensions for Greek philology]
%<tbtx>Access to the LGR encoded Greek fonts that match the TX fonts]
%</driver,package,tbtx>
@@ -84,7 +84,7 @@ See the end of the file.
%</driver>
% \fi
%
-% \CheckSum{4206}
+% \CheckSum{4190}
% \begin{multicols}{2}\tableofcontents\end{multicols}
%
%
@@ -646,7 +646,7 @@ Type X <return> to exit.}%
% 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
+% 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
@@ -657,36 +657,45 @@ Type X <return> to exit.}%
% document is being typeset, the |ancient| attribute may work
% satisfactorily, but with some possible “ancient” line breaks.
%
-% In this new version 5.8.0 of this package I had to redefine my macro
-% \cs{strip@slash}, the purpose of which is to compact the ISO date
-% formato in a string made up only of eight digits, without separators,
-% because the maintainer of the \pack{babel-greek} package on 31st o fMay
-% 2023 changed the formati; in facts the previous format was YYYY/MM/DD,
-% the new format is YYYY-MM-DD; Evidently now the separators are hyphen
-% signs, not slashes, I did not change the name of my command; I just
-% modified its definition so as to delete the hyphen signs. The number
-% test that follows checks the digit string against another digit string
-% so as to control if the \pack{babel-greek} package is sufficiently
-% recent.
+% In this new version 5.81 of this package I redefined the test to check
+%if the \texttt{greek.ldf} is sufficiently recent in order to correctly
+% use the ancient Greek version. The 2023 dev release of the \LaTeX format
+% already contains a new control sequence named \cs{IfFileAtLeastTF}
+% LaTeX3 function that allows to test the date of any file the full name
+% of which is passed as the first argument to the function; the syntax is
+% as such
+%
+% \cs{IfFileAtLeastTF}\marg{full file name}\marg{ISO date}\marg{true}\marg{false}
+%
+%\noindent where the \meta{full file name} means with its extension;
+% \meta{ISO date} means any form among yyyy/mm/dd or yyyy-mm-dd.
+% If the LaTeX kernel already contains this LaTeX3 definition the teubner
+% definition is skipped.
% \begin{macrocode}
+\unless\ifcsname IfFileAtLeastTF\endcsname
+ \def\IfFileAtLeastTF#1{\expandafter\@ifl@t@r\csname ver@#1\endcsname}%
+\fi
+
+\def\GreekName{greek}
\ifx\languageattribute\undefined
- \def\GreekName{polutonikogreek}%
+ \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
+\IfFileAtLeastTF{greek.ldf}{2014-09-18}%
+ {\languageattribute{greek}{ancient}}%
+ {\languageattribute{greek}{polutoniko}}%
\fi
% \end{macrocode}
%\end{macro}
-
+% Unfortunately the ISO date allows two formats:
+% for example 2023/08/22 and 2023-08-22, somewhere
+% else \LaTeX\,3 can accept both formats, but the
+% particulare command todays accepts only the
+% dashed variant, not the slashed one, therefore
+% the \texttt{greek.ldf} sometimes changes date
+% format and an error message pops up. Thanks to
+% Ludz Kruschwitz, who set a bug report directly
+% to me, so that <i could correct this teubner.sty
+% version~5.8.2.
%
% \subsection{Compatibility with Latin fonts}\label{ssec:LatinFontComp}
%