From 53b22757814343c6071be2e64dc0639f7afc5468 Mon Sep 17 00:00:00 2001
From: Norbert Preining Babel support for the Greek language and script copy packages into a local TeX tree,[1] copy packages into a local TeX tree,[1] copy documentation and sources into a local
-TeX tree,[1]
delete auxiliary files.
@@ -926,7 +926,7 @@ package are not removed.To load Greek language support with Babel, use the greek document option or pass the greek option to Babel. For example,
\usepackage[greek,english]{babel}
-activates support for Greek text parts in an English document.[2]
+activates support for Greek text parts in an English document.[2]
For ancient Greek, set the language attribute “ancient”, either after loading Babel
\usepackage[greek,english]{babel}
@@ -948,9 +948,9 @@ case-changing and hyphenation rules.
For details see the Babel documentation and babel-greek.pdf.
Input of Greek characters is possible
-as literal characters (α … Ω)[3],
+as literal characters (α … Ω)[3],
as LICR macro (\textalpha{} ... \textOmega),
-or via the LGR Latin transliteration (a … W)[4].
+or via the LGR Latin transliteration (a … W)[4].
For details and caveats, see test-greek.pdf and the example files
provided with greek-fontenc.
@@ -1154,7 +1154,7 @@ via the ligature definitions in the font (see dialytika
"i
ϊ
-ano teleia[5]
+ano teleia[5]
;
·
@@ -1192,7 +1192,8 @@ from the city of Miletus in Ionia replacing the
Greek numerals use several now obsolete letters:
-digamma ϝ or stigma ϛ, koppa ϟ or ϙ, and sampi ϡ [Nicholas-05].
+digamma ϝ or stigma ϛ, koppa ϟ or ϙ, and sampi ϡ
+[Nicholas-05] [Haralambous-98].
Standing for 6 is the digamma ϝ, the sixth letter of the Ionic
alphabet (just as its Latin equivalent F is the sixth letter of the
@@ -1329,7 +1330,7 @@ This package is outdated and obsoleted by
Babel 3.9i deprecated \textlatin and fixed \latinencoding.
1.9h (2019-07-11)
-Move breathing composite commands to textalpha.
+Move breathing composite commands to textalpha.
Do not change the uccode values if the LaTeX version is newer than 2022/06. The new \MakeUppercase definition ignores them and fails -with the “dummy” character 0x9f (cf. [ltnews35], LaTeX issue 987).
New modifiers local-LGR-fixes and no-LGR-fixes to address indexing problmes with Roman numerals (Babel issue 170). Provisional.
New TextCommand \EnsureStandardFontEncoding.
Fix upcasing of Greek letters with standard accent macros.
New modifier local-MakeUppercase-fixes.
LaTeX Project Team LaTeX News 35, June 2022. https://www.latex-project.org/news/latex2e-news/ltnews35.pdf
Yannis Haralambous From Unicode to Typography, a Case Study: the Greek Script, 1998. https://hal.science/hal-02101618
diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst b/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst index 73f921de32..e714318919 100644 --- a/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst +++ b/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst @@ -3,7 +3,7 @@ babel-greek Babel support for the Greek language and script =============================================== -:Version: 1.13.2 (changelog_) +:Version: 1.14 (changelog_) :Copyright: © 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms, © 2013 -- 2023 Günter Milde. @@ -261,7 +261,8 @@ They are still used in everyday life for ordinal numbers and more generally by the Orthodox church and certain scholars. Greek numerals use several now obsolete letters: -digamma_ ϝ or stigma_ ϛ, koppa_ ϟ or ϙ, and sampi_ ϡ [Nicholas-05]_. +digamma_ ϝ or stigma_ ϛ, koppa_ ϟ or ϙ, and sampi_ ϡ +[Nicholas-05]_ [Haralambous-98]_. * Standing for 6 is the digamma_ ϝ, the sixth letter of the Ionic alphabet (just as its Latin equivalent F is the sixth letter of the @@ -406,6 +407,9 @@ Changelog (code contributed by Javier Bezos). - Fix upcasing of text using the `LGR Latin transliteration`_: drop accents with ``\DeclareUppercaseMapping`` (`new in LaTeX 2023`_). +1.14 (2023-08-18) + - Fix upcasing of Greek letters with standard accent macros. + - New modifier `local-MakeUppercase-fixes`. .. _babel/4303: http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=babel/4303 .. _babel/4305: http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=babel/4305 @@ -447,7 +451,7 @@ References .. _e-TeX: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=etex .. _grtimes: https://ctan.org/pkg/grtimes .. _hyperref: https://ctan.org/pkg/hyperref -.. _textalpha: +.. _textalpha: http://mirrors.ctan.org/language/greek/greek-fontenc/textalpha-doc.pdf .. _greek-fontenc: https://ctan.org/pkg/greek-fontenc .. _LGR: http://mirrors.ctan.org/language/greek/greek-fontenc/greek-fontenc-doc.html#lgr .. _greek-inputenc: https://ctan.org/pkg/greek-inputenc diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx b/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx index 7cf57237f7..bc3060207e 100644 --- a/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx +++ b/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx @@ -26,7 +26,7 @@ % and covered by LPPL is defined by the unpacking script (babel-greek.ins) % which is part of the package. % \fi -% \CheckSum{1675} +% \CheckSum{1701} % % \iffalse % Tell the \LaTeX\ system who we are and write an entry on the @@ -37,7 +37,7 @@ %\ProvidesLanguage{greek}
%\fi
%\ProvidesFile{babel-greek.dtx}
- [2023-06-01 1.13.2 Greek support for the babel system]
+ [2023/08/18 1.14 Greek support for the babel system]
%\iffalse
%% File `babel-greek.dtx'
%% Greek language Definition File
@@ -105,8 +105,6 @@
% \cs{textlatin} and fixed \cs{latinencoding}.}
% \changes{babel-greek-1.09i}{2020/02/28}{
% Fix accent in \cs{seename} and \cs{alsoname}.}
-% \changes{babel-greek-1.12}{2023/03/04}{
-% Update and restructure documentation.}
%
% \title{Babel support for the Greek language}
% \author{Apostolos Syropoulos, Günter Milde}
@@ -114,7 +112,7 @@
%
% Babel-greek is a contributed package providing support for the Greek
% language and script via the \pkgref{babel} system.
-% See the \href{README.html}{README} file for an overwiew of the
+% See \href{babel-greek-doc.html}{babel-greek-doc} for an overwiew of the
% \pkg{babel-greek} package and links to requirements and related packages.
%
% The file \file{\filename}\footnote{
@@ -210,17 +208,17 @@
%
% \subsection{Modifiers \label{sec:modifiers}}
%
+% \changes{babel-greek-1.12}{2023/03/04}{
+% New modifiers \Lopt{local-LGR-fixes} and \Lopt{no-LGR-fixes}.}
+% \changes{babel-greek-1.14}{2023-08-18}{
+% New modifier \Lopt{local-MakeUppercase-fixes}.}
+%
% All language attributes may also be used as modifiers, e.g.
% \begin{verbatim}
% \usepackage[greek.polutoniko,english]{babel}\end{verbatim}
-% In addition, there are two modifiers that cannot be set with
+% In addition, there are modifiers that cannot be set with
% |\languageattribute|.
%
-% \changes{babel-greek-1.12}{2023/03/04}{
-% New modifiers \Lopt{local-LGR-fixes} and \Lopt{no-LGR-fixes}.}
-%
-% Some workarounds for the non-standard LGR font encoding may have
-% serious side-effects.
% The \hyperref[sec:lgr-redefinitions]{\Lopt{local-LGR-fixes}} modifier
% restricts the re-definitions in section~\ref{sec:lgr-redefinitions}
% to text parts using the Greek language.
@@ -232,8 +230,14 @@
% and using Xe/LuaTeX with Unicode fonts is not an option.
% Check for problems with enumerations in Greek text parts and with
% Roman and Greek numerals everywhere (especially in the ToC).
+%
+% The \hyperref[sec:MakeUppercase-fixes]{\Lopt{local-MakeUppercase-fixes}}
+% modifier skips the mapping of standard accents to ``capital'' accents
+% in section~\ref{sec:MakeUppercase-fixes}.
+%
% These modifiers are provisional, naming and behaviour may change.
%
+%
% \subsection{Language hooks \label{sec:language-hooks}}
%
% \DescribeMacro\extrasgreek
@@ -524,7 +528,11 @@
% modern Greek with ``polytonic'' spelling can also be
% selected via the dummy language \Lopt{polutonikogreek}.
% However, it is not possible to use both options,
-% \Lopt{greek} and \Lopt{polutonikogreek} in one document.
+% \Lopt{greek} and \Lopt{polutonikogreek} in one document.^^A
+% \footnote{Use of more than one Greek orthograpies in one document
+% is possible with \cs{babelprovide}.
+% However, there are side-effects.
+% See the example in \file{test-greek.tex}.}
% We also define aliases to allow language switching commands using
% the language name |polutonikogreek|:
% \changes{greek-1.3f}{1999/09/29}{
@@ -619,8 +627,9 @@
% Test for unsupported (or misspelled) \hyperref[sec:modifiers]{modifiers}
% (code contributed by Javier Bezos).
% \begin{macrocode}
-\def\bbl@greek@modifiers{,polutoniko,polytonic,ancient,keep-semicolon,}
-\addto\bbl@greek@modifiers{local-LGR-fixes,no-LGR-fixes,}
+\def\bbl@greek@modifiers{,%
+ polutoniko,polytonic,ancient,keep-semicolon,%
+ local-LGR-fixes,no-LGR-fixes,local-MakeUppercase-fixes,}
\ifx\BabelModifiers\relax\else
\bbl@foreach\BabelModifiers{%
\@expandtwoargs\in@{,#1,}{\bbl@greek@modifiers}
@@ -1228,7 +1237,7 @@
%
% \begin{macro}{\dategreek}
% The macro |\dategreek| redefines the command |\today| to
-% produce greek dates. The name of the month is produced
+% produce Greek dates. The name of the month is produced
% by the macro |\gr@month| since it is also needed in the definition
% of the macro |\Grtoday|.
% \changes{greek-1.1a}{1997/03/03}{Fixed typo, \texttt{Oktwbr'iou}
@@ -1245,9 +1254,10 @@
%
% \begin{macro}{\Grtoday}
% \changes{greek-1.1}{1996/10/28}{Added macro \cs{Grtoday}}
-% The macro |\Grtoday| produces the current date, only that the
-% month and the day are shown as greek numerals instead of arabic
-% as it is usually the case.
+% The macro |\Grtoday| produces the current date, only that the
+% month and the day are shown as greek numerals instead of arabic
+% as it is usually the case. (The \pkgref{teubner} package defines
+% a matching lowercase version \cs{grtoday}.)
% \begin{macrocode}
\def\Grtoday{%
\expandafter\Greeknumeral\expandafter{\the\day}\space
@@ -1506,34 +1516,24 @@
%
% \subsection{Character codes \label{sec:character-codes}}
%
-% Greek letters drop diacritics (eccept dialytika and sub-iota) in
-% UPPERCASE. This is not cared for by the Unicode standard.
-%
-% Up to the June 2022 LaTeX release, this could be corrected by
-% defining |\lccode| and |\uccode| values. The June 2023 release introduced
-% the |\DeclareUppercaseMapping| command as a replacement configuration
-% option.
-%
-% The file \file{tuenc-greek.def} from \pkg{greek-fontenc}
-% contains the required |\lccode| and |\uccode| corrections from the
-% \pkgref{xgreek} package by Apostolos Syropoulos. It is loaded if the
-% Greek font encoding is TU (i.e. with XeTeX/LuaTeX),
-% see section~\ref{load-greek-font-encoding-definitions}.
+% \changes{greek-1.1c}{1997/04/30}{fixed two typos}
+% \changes{greek-1.1e}{1997/10/12}{Added lowercase code for v}
+% \changes{greek-1.2}{1997/10/28}{Definitions for ``modern'' Greek are
+% now the definitions of ``polutoniko'' Greek}
+% \changes{greek-1.2}{1997/10/28}{Added lowercase codes for ``modern''
+% greek}
+% \changes{greek-1.3e}{1999/09/24}{\cs{extrasgreek} and
+% \cs{extraspolutonikogreek} should be complementary}
+% \changes{babel-greek-1.09}{2014/07/20}{Added lc codes for chars 128 to 255}
+% \changes{babel-greek-1.09b}{2014/09/18}{Remove spurious whitespace from
+% `extrasgreek' definition (report Eike Schmidt).}
+% \changes{babel-greek-1.09e}{2015/11/27}{Fix bug in lccode-setting loop
+% (patch by Enrico Gregorio).}
+% \changes{babel-greek-1.12}{2023/03/04}{
+% Only change uc/lccodes if \cs{greekfontencoding} is LGR.}
%
-% If the Greek font encoding is LGR, configuration is done here because
-% character code changes must be restricted to text parts using the
-% LGR encoding.
-% \changes{greek-1.5}{2013/06/21}{Support XeTeX/LuaTeX.}
-% \changes{babel-greek-1.09d}{2015/07/06}{uc-/lccode corrections from xgreek
-% are now in greek-euenc.def (the polyglossia version has bugs).}
-% \changes{babel-greek-1.12}{2023/03/04}{%
-% Only change uc/lccodes if \cs{greekfontencoding} is LGR.}
-% \begin{macrocode}
-\def\bbl@tempa{LGR}
-\ifx\greekfontencoding\bbl@tempa
-% \end{macrocode}
% In order to get correct hyphenation we need to set the lower case
-% code of a number of characters.
+% code for all characters that can be part of a word.
%
% In LGR encoded fonts, diacritics can be obtained using Knuth's
% ligature mechanism (see usage.pdf). This means that the characters
@@ -1547,18 +1547,9 @@
% ligature mechanism so that it is possible to typeset an isolated $\sigma$
% without it becoming a $\varsigma$.
% Because of this we make sure its lowercase code is not changed.
-% \changes{greek-1.1c}{1997/04/30}{fixed two typos}
-% \changes{greek-1.1e}{1997/10/12}{Added lowercase code for v}
-% \changes{greek-1.2}{1997/10/28}{Definitions for ``modern'' Greek are
-% now the definitions of ``polutoniko'' Greek}
-% \changes{greek-1.2}{1997/10/28}{Added lowercase codes for ``modern''
-% greek}
-% \changes{greek-1.3e}{1999/09/24}{\cs{extrasgreek} and
-% \cs{extraspolutonikogreek} should be complementary}
-% \changes{babel-greek-1.09}{2014/07/20}{Added lc codes for chars 128 to 255}
-% \changes{babel-greek-1.09b}{2014/09/18}{Remove spurious whitespace from
-% `extrasgreek' definition (report Eike Schmidt).}
% \begin{macrocode}
+\def\bbl@tempa{LGR}
+\ifx\greekfontencoding\bbl@tempa
\addto\extrasgreek{%
\babel@savevariable{\lccode`v}\lccode`v=`v%
\babel@savevariable{\lccode`\'}\lccode`\'=`\'%
@@ -1573,15 +1564,12 @@
\babel@savevariable{\lccode`\`}\lccode`\`=`\`%
}
% \end{macrocode}
-% In order to process the suitable characters and in such a way that
-% hyphenation patterns work also with precomposed characters, it is
-% necessary to declare the lc code for all characters that can be part
-% of a word. We do this in |\extrasgreek| because this is a feature of
+% Also set the lc code for the precomposed characters in the upper half
+% of the code table.
+% We do this in |\extrasgreek| because this is a feature of
% the LGR font encoding (used in all language variants).
% This means that multi-accented characters are regarded parts of a word
-% (and not non-word characters) also in monotonic spelling.
-% \changes{babel-greek-1.09e}{2015/11/27}{Fix bug in lccode-setting loop
-% (patch by Enrico Gregorio).}
+% also in monotonic spelling.
% \begin{macrocode}
\addto\extrasgreek{%
% ``high bit characters'': set in a loop and correct exceptions
@@ -1603,34 +1591,103 @@
\lccode223=244% GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
}
% \end{macrocode}
-% Drop diacritics (except dialytika and sub-iota) in UPPERCASE also with
-% ``input ligatures''. (The optional ``locale'' argument |[el]| restricts
-% this change to Greek text parts.)
-% If LaTeX is older than 2022/06/01, set the |\uccode| of the
-% relevant characters to a dummy character instead.
+%
+% \begin{macro}{\bbl@greek@tilde}
+% \changes{greek-1.0c}{1997/02/19}{Added command}
+% \changes{greek-1.1b}{1997/03/06}{Made tilde expand to a tilde with
+% \cs{catcode 12}.}
+% \changes{greek-1.3k}{2003/04/10}{Make sure the character `!' is not
+% active during the definition of \cs{greek@tilde}}
+% \changes{greek-1.4}{2013/05/17}{Do not re-define the tilde accent macro:
+% it works as expected with \file{lgrenc.def} from \pkg{greek-fontenc}.}
+% \changes{babel-greek-1.13}{2023/03/15}{
+% Renamed from \cs{greek@tilde}. Simplified definition.}
+%
+% By default, the tilde produces an unbreakable space in text mode.
+% For the variants ``polutoniko'' and ``ancient'', we change its meaning
+% to allow using |~| in the Latin transliteration of characters with
+% perispomeni and in composite diacritics.
+% \begin{macrocode}
+ \DeclareTextSymbol{\bbl@greek@tilde}{LGR}{126}
+ \addto\bbl@greek@setup@polytonic{
+ \declare@shorthand{greek}{~}{\bbl@greek@tilde}
+ }
+\fi % End of LGR-specific code.
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{MakeUppercase fixes \label{sec:MakeUppercase-fixes}}
+%
% \changes{greek-1.1b}{1997/03/06}{Added setting of \cs{uccode}s
-% (after \file{kdgreek.sty})}
+% (after \file{kdgreek.sty})}
% \changes{greek-1.1e}{1997/10/12}{Added uppercase code for special
-% letter ``v''. Uppercase code for accents is now \texttt{9f},
-% instead of \texttt{ff}}
+% letter ``v''. Uppercase code for accents is now \texttt{9f},
+% instead of \texttt{ff}}
% \changes{greek-1.2}{1997/10/28}{Added uppercase codes for ``modern''
-% Greek. The old codes are now for ``Polutoniko'' Greek}
+% Greek. The old codes are now for ``Polutoniko'' Greek}
% \changes{greek-1.3e}{1999/09/24}{\cs{extrasgreek} and
-% \cs{extraspolutonikogreek} should be complementary}
+% \cs{extraspolutonikogreek} should be complementary}
% {\catcode`|=12\relax\gdef\indexbar{\cs{|}}}
% \changes{greek-1.3g}{1999/11/17}{uc code of \indexbar{} is now just
-% \indexbar{} to reflect recent changes in the cb fonts}
+% \indexbar{} to reflect recent changes in the cb fonts}
% \changes{greek-1.3i}{2000/10/02}{uc code of `v' is switched to V
-% so that mixed text appears correctly in headers.}
+% so that mixed text appears correctly in headers.}
% \changes{greek-1.3j}{2001/02/03}{Don't use the double caret notation here,
-% because other languages might make the caret active.}
+% because other languages might make the caret active.}
+% \changes{greek-1.5}{2013/06/21}{Support XeTeX/LuaTeX.}
+% \changes{babel-greek-1.09d}{2015/07/06}{uc-/lccode corrections from xgreek
+% are now in greek-euenc.def (the polyglossia version has bugs).}
% \changes{babel-greek-1.12}{2023/03/04}{
-% Only change uccodes if LaTeX is older than 2022/06/01.}
+% Only change uccodes if LaTeX is older than 2022/06/01.}
% \changes{babel-greek-1.13.2}{2023-06-01}{
-% Use \cs{DeclareUppercaseMapping} to drop diacritics.}
+% \cs{MakeUppercase} fix for transliteration input.}
+% \changes{babel-greek-1.14}{2023-08-18}{
+% \cs{MakeUppercase} fix for standard accent macros.}
+% In Greek typographical praxis,
+% letters drop accents (eccept dialytika) and breathings in
+% UPPERCASE. This is not cared for by the Unicode standard.
+% For Unicode literals, |\MakeUppercase| implements locale-specific
+% corrections.\footnote{
+% The pre-2022 implementation is corrected by character code definitions
+% in \file{tuenc-greek.def} from \pkgref{greek-fontenc},
+% cf. section~\ref{load-greek-font-encoding-definitions}.}
+%
+% To fix the behaviour of the 2022 |\MakeUppercase| implementation with
+% standard accent macros, we define and use ``capital'' accent
+% macros.
+% Font-encoding specific definitions for the ``capital'' accent macros
+% in \pkgref{greek-fontenc}~$\ge 2.4$ suppress them on Greek letters.
+% The \Lopt{local-MakeUppercase-fixes} modifier can be used to skip this step
+% (cf. section~\ref{sec:modifiers}).
+% \begin{macrocode}
+\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} % new in 2020
+\bbl@xin@{,local-MakeUppercase-fixes,}{,\BabelModifiers,}%
+\ifin@
+\else
+ \IfFormatAtLeastTF{2022/06/01}
+ {\ProvideTextCommandDefault{\accACUTE}{\@tabacckludge'}
+ \ProvideTextCommandDefault{\accGRAVE}{\@tabacckludge`}
+ \ProvideTextCommandDefault{\accTILDE}{\@tabacckludge~}
+ \ProvideTextCommandDefault{\accDIAERESIS}{\@tabacckludge"}
+ \addto\@uclclist{\'\accACUTE \`\accGRAVE \~\accTILDE \"\accDIAERESIS}%
+ }
+ {}
+\fi
+% \end{macrocode}
+% Drop diacritics also with ``input ligatures'' defined in LGR fonts:
+%
+% Since 2023/06, we can set up character mappings to be used on the argument
+% of |\MakeUppercase|.\footnote{cf.
+% \href{https://www.latex-project.org/news/latex2e-news/ltnews37.pdf}
+% {LaTeX News~37}}
+% The optional ``locale'' argument |[el]| restricts the mapping to Greek
+% text parts.
% \begin{macrocode}
+\def\bbl@tempa{LGR}
+\ifx\greekfontencoding\bbl@tempa
\ifdefined\DeclareUppercaseMapping % new in 2023
- \DeclareUppercaseMapping[el]{"1FBE}{\prosgegrammeni}%
+ % \DeclareUppercaseMapping[el]{"1FBE}{\prosgegrammeni}%
\DeclareUppercaseMapping[el]{"0027}{}% '
\addto\bbl@greek@setup@polytonic{
\DeclareUppercaseMapping[el]{"003C}{}% <
@@ -1639,11 +1696,14 @@
\DeclareUppercaseMapping[el]{"007E}{}% ~
}
\fi
- % fallback for for LaTeX versions older than 2020-10-01
- \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
- \IfFormatAtLeastTF{2022/06/01}%
- {}
- {% else
+% \end{macrocode}
+% If LaTeX is older than 2022/06,
+% we set the |\uccode| of the relevant characters to a dummy character
+% (|\uccode| changes are ignored by |\MakeUppercase| since 2022).
+% To minimize side-effects, the re-definition is limited to Greek text parts.
+% \begin{macrocode}
+ \IfFormatAtLeastTF{2022/06/01}{}
+ {% else (LaTeX format older than 2022/06/01)
\addto\extrasgreek{%
\babel@savevariable{\uccode`\"}\uccode`\"=`\"%
\babel@savevariable{\uccode`\'}\uccode`\'=159% 159 == ^^9f
@@ -1652,7 +1712,6 @@
\babel@savevariable{\uccode`\~}\uccode`\~=159%
\babel@savevariable{\uccode`\>}\uccode`\>=159%
\babel@savevariable{\uccode`\<}\uccode`\<=159%
- \babel@savevariable{\uccode`\|}\uccode`\|=`\|%
\babel@savevariable{\uccode`\`}\uccode`\`=159%
}
% \end{macrocode}
@@ -1685,8 +1744,8 @@
}
% \end{macrocode}
% Add composite commands, so that the dialytika is kept or put on the
-% following character of a diphthong with |\MakeUppercase|
-% (see lgrdef.enc from the the greek-fontenc package for details).
+% following character of a diphthong with |\MakeUppercase| (see
+% \file{lgrdef.enc} from the \pkgref{greek-fontenc} package for details).
% \changes{greek-1.4}{2013/05/17}{
% Add TextCompositeCommands for ``uppercase diacritics''.}
% \changes{greek-1.5}{2013/05/27}{Bugfix: @hiatus->LGR@hiatus}
@@ -1708,35 +1767,9 @@
\DeclareTextCompositeCommand{\"}{TU}{^^9f}{\accdialytika}
\fi
}% end of the \IfFormatAtLeastTF else block
-% \end{macrocode}
-%
-% \begin{macro}{\bbl@greek@tilde}
-% By default, the tilde produces an unbreakable space in text mode.
-% In polytonic and ancient Greek, we change its meaning to allow
-% using |~| in the Latin transliteration of characters with perispomeni.
-% As the perispomeni is not required with monotonic Greek, this is
-% only done for the variants ``polutoniko'' and ``ancient''.
-% \changes{greek-1.0c}{1997/02/19}{Added command}
-% \changes{greek-1.1b}{1997/03/06}{Made tilde expand to a tilde with
-% \cs{catcode 12}.}
-% \changes{greek-1.3k}{2003/04/10}{Make sure the character `!' is not
-% active during the definition of \cs{greek@tilde}}
-% \changes{greek-1.4}{2013/05/17}{Do not re-define the tilde accent macro:
-% it works as expected with \file{lgrenc.def} from \pkg{greek-fontenc}.}
-% \changes{babel-greek-1.13}{2023/03/15}{
-% Renamed from \cs{greek@tilde}. Simplify definition.}
-% \begin{macrocode}
- \DeclareTextSymbol{\bbl@greek@tilde}{LGR}{126}
- \addto\bbl@greek@setup@polytonic{
- \declare@shorthand{greek}{~}{\bbl@greek@tilde}
- }
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
\fi % End of LGR-specific code.
% \end{macrocode}
%
-%
% \subsection{Symbol name aliases}
% For backwards compatibility, we keep aliases for a few symbols.
% \changes{greek-1.1c}{1997/03/10}{Added a couple of symbols, needed
diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf b/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf
index 0a2586bb5c..20ab08d842 100644
Binary files a/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf and b/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-athnum.pdf b/macros/latex/contrib/babel-contrib/greek/test-athnum.pdf
index badf0226a5..2f8f10102f 100644
Binary files a/macros/latex/contrib/babel-contrib/greek/test-athnum.pdf and b/macros/latex/contrib/babel-contrib/greek/test-athnum.pdf differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-case-changing.tex b/macros/latex/contrib/babel-contrib/greek/test-case-changing.tex
deleted file mode 100644
index 50eaf650ea..0000000000
--- a/macros/latex/contrib/babel-contrib/greek/test-case-changing.tex
+++ /dev/null
@@ -1,1117 +0,0 @@
-% Backrolling does not work for \MakeUppercase (cf. LaTeX News 35)
-% \RequirePackage{latexbug}
-%\RequirePackage[2022-05-01]{latexrelease}
-
-\documentclass[a4paper]{article}
-
-\usepackage[LGR,T1]{fontenc}
-\usepackage{lmodern}
-
-\ifdefined \UnicodeEncodingName
- \usepackage{fontspec}
- \setmainfont{FreeSerif}
- \newcommand*{\texengine}{Xe/LuaLaTeX}
-\else
- \usepackage{lmodern}
- \newcommand*{\texengine}{pdfLaTeX}
-\fi
-
-% Load encoding definitions
-\usepackage[normalize-symbols]{textalpha} % "Greek script everywhere"
-
-% With TL22, the special handling of Greek UPPERCASE is only triggered
-% if the text language is set to "greek" with Babel:
-%
-\usepackage[greek,english]{babel} % babel-greek
-% \usepackage[greek,english,provide=*]{babel} % Babel's Greek "ini"
-% \languageattribute{greek}{polutoniko} % "modern" polytonic Greek
-\languageattribute{greek}{ancient}
-
-
-\usepackage[unicode,colorlinks,linkcolor=blue]{hyperref}
-\usepackage{bookmark}
-
-% Auxiliary commands
-
-\newcommand{\langGreek}{\foreignlanguage{greek}}
-
-% print the selected language variant
-\newcommand{\GreekLanguageVariant}{%
- \ifx\captionsgreek\captionspolutonikogreek
- \ifx\captionsgreek\captionsancientgreek
- ancient%
- \else
- polutoniko%
- \fi
- \else
- monotoniko%
- \fi
-}
-
-% test effect of new implementations on compilation time:
-%
-% pdflatex from TL22 is about 7 times slower than the version from TL21
-% (7s vs. 1s for this document with 13 pages).
-% With the dummy definitons,
-% \renewcommand{\MakeUppercase}{}
-% \renewcommand{\MakeLowercase}{}
-% pdflatex from TL22 is a bit faster than before
-% (0.7s vs. 1s for this document),
-
-% -----------------------------------------------------------------------
-
-\begin{document}
-
-\tableofcontents
-
-\section{Test case conversions of Greek letters}
-
-This document tests the combination of \verb|MakeUppercase| and Greek.
-
-\makeatletter
-It is compiled with \texengine, format version \fmtversion{} patch-level
-\patch@level{} and the L3 programming layer from \ExplFileDate{}.
-\makeatother
-The \verb|\greekfontencoding| is \greekfontencoding.
-
-\section{Unicode literals}
-
-\subsection{Greek and Coptic}
-
-Characters from the Greek and Coptic Unicode block that are supported by
-\emph{greek-fontenc} and \emph{greek-inputenc}:
-
-\newcommand{\GreekAndCoptic}{
- \raggedright
- ␣ ␣ ␣ ␣ ʹ ͵ ␣ ␣ ␣ ␣ ͺ ␣ ␣ ␣ ; ␣ \\
- ␣ ␣ ␣ ␣ ΄ ΅ Ά · Έ Ή Ί ␣ Ό ␣ Ύ Ώ \\
- ΐ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο \\
- Π Ρ ␣ Σ Τ Υ Φ Χ Ψ Ω Ϊ Ϋ ά έ ή ί \\
- ΰ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο \\
- π ρ ς σ τ υ φ χ ψ ω ϊ ϋ ό ύ ώ ␣ \\
- ϐ ϑ ␣ ␣ ␣ ϕ ϖ ␣ Ϙ ϙ Ϛ ϛ Ϝ ϝ Ϟ ϟ \\
- Ϡ ϡ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ϰ ϱ ϴ ϵ ␣ \\
-
-}
-\begin{quote}
- \selectlanguage{greek}
- \GreekAndCoptic
-\end{quote}
-%
-MakeUppercase:
-\begin{quote}
- \selectlanguage{greek}
- \MakeUppercase{\GreekAndCoptic}
-\end{quote}
-%
-MakeLowercase:
-\begin{quote}
- \selectlanguage{greek}
- \MakeLowercase{\GreekAndCoptic}
-\end{quote}
-
-The lowercase of \langGreek{Σ} is the «auto-sigma»
-(\verb|\textautosigma|): \langGreek{ΣΣ $\mapsto$ \MakeLowercase{ΣΣ}}.
-Add a ZWNJ or use the \verb|\noboundary| macro to prevent conversion to
-final sigma: \langGreek{\MakeLowercase{ΣΣ}} (works only with "old"
-(pre-2022) \verb|\MakeLowercase|).
-
-
-\subsection{Greek extended}
-
-Characters of the Greek Extended Unicode block:
-
-\newcommand{\GreekExtended}{\raggedright
- ἀ ἁ ἂ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ \\
- ἐ ἑ ἒ ἓ ἔ ἕ ␣ ␣ Ἐ Ἑ Ἒ Ἓ Ἔ Ἕ \\
- ἠ ἡ ἢ ἣ ἤ ἥ ἦ ἧ Ἠ Ἡ Ἢ Ἣ Ἤ Ἥ Ἦ Ἧ \\
- ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ \\
- ὀ ὁ ὂ ὃ ὄ ὅ ␣ ␣ Ὀ Ὁ Ὂ Ὃ Ὄ Ὅ \\
- ὐ ὑ ὒ ὓ ὔ ὕ ὖ ὗ ␣ Ὑ ␣ Ὓ ␣ Ὕ ␣ Ὗ \\
- ὠ ὡ ὢ ὣ ὤ ὥ ὦ ὧ Ὠ Ὡ Ὢ Ὣ Ὤ Ὥ Ὦ Ὧ \\
- ὰ ά ὲ έ ὴ ή ὶ ί ὸ ό ὺ ύ ὼ ώ \\
- ᾀ ᾁ ᾂ ᾃ ᾄ ᾅ ᾆ ᾇ ᾈ ᾉ ᾊ ᾋ ᾌ ᾍ ᾎ ᾏ \\
- ᾐ ᾑ ᾒ ᾓ ᾔ ᾕ ᾖ ᾗ ᾘ ᾙ ᾚ ᾛ ᾜ ᾝ ᾞ ᾟ \\
- ᾠ ᾡ ᾢ ᾣ ᾤ ᾦ ᾧ ᾥ ᾨ ᾩ ᾪ ᾫ ᾬ ᾭ ᾮ ᾯ \\
- ᾰ ᾱ ᾲ ᾳ ᾴ ␣ ᾶ ᾷ Ᾰ Ᾱ Ὰ Ά ᾼ ᾽ ι ᾿ \\
- ῀ ῁ ῂ ῃ ῄ ␣ ῆ ῇ Ὲ Έ Ὴ Ή ῌ ῍ ῎ ῏ \\
- ῐ ῑ ῒ ΐ ␣ ␣ ῖ ῗ Ῐ Ῑ Ὶ Ί ␣ ῝ ῞ ῟ \\
- ῠ ῡ ῢ ΰ ␣ ␣ ῤ ῥ ῦ ῧ Ὺ Ύ Ῥ ῭ ΅ ` \\
- ␣ ␣ ῲ ῳ ῴ ␣ ῶ ῷ Ὸ Ό Ὼ Ώ ῼ ´ ῾ ␣
-}
-
-\begin{quote}
- \selectlanguage{greek}
- \GreekExtended
-\end{quote}
-%
-MakeUppercase:
-\begin{quote}
- \selectlanguage{greek}
- \MakeUppercase{\GreekExtended}
-\end{quote}
-
-MakeLowercase:
-\begin{quote}
- \selectlanguage{greek}
- \MakeLowercase{\GreekExtended}
-\end{quote}
-
-% With TeXLive 2020 (old \verb|\Makeuppercase|),
-% all accents except dialytika and prosgegrammeni are dropped in UPPERCASE
-% and kept in lowercase.
-% No errors.
-%
-% With current TeXLive:
-% pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022)
-% LaTeX2e <2022-11-01> patch level 1
-% L3 programming layer <2023-02-22>
-%
-% Upcasing ``Unicode errors'' are resolved.
-%
-% Uppercase of character ';' 0x37E GREEK QUESTION MARK is a semicolon
-% which is mapped to '·' 0x387 GREEK ANO TELEIA by LGR. :(
-%
-% Accents dropped with MakeUppercase (not for single letter ή) :)
-% TODO: how to treat MakeUppercase of a single captial «΄Η»?
-%
-% Should the “educational”/“Latin” accents *macron* and *breve* (*vrachy*)
-% be kept (they stay above capital letters similar to the dialytika,
-% they are kept by Apostolos Syropoulos' “xgreek” package and in babel-greek
-% “since ages”) or dropped (they are optional even in lowercase or titlecase
-% and dropped for the entry by the English wiktionary).
-% https://en.wiktionary.org/wiki/Wiktionary:About_Ancient_Greek#Diacritics_and_accentuation
-%
-% Spacing prosgegrammeni (ι) turned to capital Iota. (minor)
-%
-% Spacing single diacritics are kept. (irrelevant, OK)
-% Spacing combining diacritics are mapped to single diacritics. (irrelevant)
-%
-% Auto-Hiatus: ἀυπνία → ΑΥΠΝΙΑ (missing dialytika on the Upsilon).
-
-% With pdfLaTeX and LGR, a ZWNJ or the ``\noboundary`` macro can be used to
-% prevent conversion of trailing Σ to a final sigma ς by ``\MakeLowercase``.
-% This does not work with Unicode fonts (XeTeX/LuaTeX).
-
-% With XeTeX and Unicode fonts,
-\subsubsection{hiatus}
-
-Tonos and dasia mark a \emph{hiatus} (break-up of a diphthong) if placed on
-the first of two consecutive vowels (άι, άυ, έι, ἀυ, ἄι, ἄυ, ἔι).
-A dialytika must be placed on the second vowel if they are dropped.
-
-Since the 2022/06 LaTeX release, it works with monotonic Unicode literals
-(since 2023/02/10] also some polytonic but fails with psili):
-\begin{quote}
- \selectlanguage{greek}
- \newcommand*{\hiatest}{άι, άυ, έι, ἄι, ἄυ, ἔι, ἀυ}
- \hiatest{} $\mapsto$ \MakeUppercase{\hiatest}
-\end{quote}
-
-Example \foreignlanguage{greek}{ἀυπνία $\mapsto$ \MakeUppercase{ἀυπνία}}
-(missing dialytika on the Upsilon).
-
-\section{LICR macros}
-
-This section compares literal Unicode Greek characters to characters input
-as LICR macros
-
-\subsection{Greek and Coptic}
-
-\subsubsection{short accent macros}
-
-\renewcommand{\GreekAndCoptic}{% only characters supported by LGR
- \raggedright
- ␣ ␣ ␣ ␣ ʹ ͵ ␣ ␣ ␣ ␣ ͺ ␣ ␣ ␣ ; ␣ \\
- ␣ ␣ ␣ ␣ \textnumeralsigngreek{} \textnumeralsignlowergreek{}
- ␣ ␣ ␣ ␣ { }\ypogegrammeni{} ␣ ␣ ␣ \texterotimatiko\\
-
- ␣ ␣ ␣ ␣ ΄ ΅ Ά · Έ Ή Ί ␣ Ό ␣ Ύ Ώ \\
-
- ␣ ␣ ␣ ␣ \'{ } \"'{ } \'\textAlpha{} \textanoteleia{}
- \'\textEpsilon{} \'\textEta{} \'\textIota{}
- ␣ \'\textOmicron{} ␣ \'\textUpsilon{} \'\textOmega{} \\
-
- ΐ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο \\
- \'"\textiota{} \textAlpha{} \textBeta{} \textGamma{} \textDelta{}
- \textEpsilon{} \textZeta{} \textEta{} \textTheta{} \textIota{}
- \textKappa{} \textLambda{} \textMu{} \textNu{} \textXi{} \textOmicron{} \\
-
- Π Ρ ␣ Σ Τ Υ Φ Χ Ψ Ω Ϊ Ϋ ά έ ή ί \\
- \textPi{} \textRho{} ␣ \textSigma{} \textTau{} \textUpsilon{}
- \textPhi{} \textChi{} \textPsi{} \textOmega{} \"\textIota{}
- \"\textUpsilon{} \'\textalpha{} \'\textepsilon{} \'\texteta{}
- \'\textiota{} \\
-
- ΰ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο \\
- \"'\textupsilon{} \textalpha{} \textbeta{} \textgamma{} \textdelta{}
- \textepsilon{} \textzeta{} \texteta{} \texttheta{} \textiota{}
- \textkappa{} \textlambda{} \textmu{} \textnu{} \textxi{} \textomicron{} \\
-
- π ρ ς σ τ υ φ χ ψ ω ϊ ϋ ό ύ ώ ␣ \\
- \textpi{} \textrho{} \textfinalsigma{} \textsigma{} \texttau{}
- \textupsilon{} \textphi{} \textchi{} \textpsi{} \textomega{} \"\textiota{}
- \"\textupsilon{} \'\textomicron{} \'\textupsilon{} \'\textomega{} \\
-
- ϐ ϑ ␣ ␣ ␣ ϕ ϖ ␣ Ϙ ϙ Ϛ ϛ Ϝ ϝ Ϟ ϟ \\
- \textbetasymbol{} \textthetasymbol{} ␣ ␣ ␣ \textphisymbol{}
- \textpisymbol{} ␣ \textQoppa{} \textqoppa{} \textStigma{} \textstigma{}
- \textDigamma{} \textdigamma{} \textKoppa{} \textkoppa{} \\
-
- Ϡ ϡ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ϰ ϱ ϴ ϵ \\
- \textSampi{} \textsampi{} ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣
- \textkappasymbol{} \textrhosymbol{} \textThetasymbol{} \textepsilonsymbol
-}
-
-No case change:
-
-\begin{quote}
- \selectlanguage{greek}
- \GreekAndCoptic
-\end{quote}
-%
-MakeUppercase:
-\begin{quote}
- \selectlanguage{greek}
- \MakeUppercase{\GreekAndCoptic}
-\end{quote}
-%
-MakeLowercase:
-\begin{quote}
- \selectlanguage{greek}
- \MakeLowercase{\GreekAndCoptic}
-\end{quote}
-
-\subsubsection{named accent macros}
-
-\renewcommand{\GreekAndCoptic}{% only characters supported by LGR
- \raggedright
- ␣ ␣ ␣ ␣ ʹ ͵ ␣ ␣ ␣ ␣ ͺ ␣ ␣ ␣ ; ␣ \\
- ␣ ␣ ␣ ␣ \textnumeralsigngreek{} \textnumeralsignlowergreek{}
- ␣ ␣ ␣ ␣ { }\ypogegrammeni{} ␣ ␣ ␣ \texterotimatiko\\
-
- ␣ ␣ ␣ ␣ ΄ ΅ Ά · Έ Ή Ί ␣ Ό ␣ Ύ Ώ \\
- ␣ ␣ ␣ ␣ \acctonos{ } \accdialytikatonos{ } \acctonos\textAlpha{}
- \textanoteleia{} \acctonos\textEpsilon{} \acctonos\textEta{}
- \acctonos\textIota{} ␣ \acctonos\textOmicron{} ␣ \acctonos\textUpsilon{}
- \acctonos\textOmega{} \\
-
- ΐ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο \\
- \accdialytikatonos\textiota{} \textAlpha{} \textBeta{} \textGamma{}
- \textDelta{} \textEpsilon{} \textZeta{} \textEta{} \textTheta{} \textIota{}
- \textKappa{} \textLambda{} \textMu{} \textNu{} \textXi{} \textOmicron{} \\
-
- Π Ρ ␣ Σ Τ Υ Φ Χ Ψ Ω Ϊ Ϋ ά έ ή ί \\
- \textPi{} \textRho{} ␣ \textSigma{} \textTau{} \textUpsilon{}
- \textPhi{} \textChi{} \textPsi{} \textOmega{} \accdialytika\textIota{}
- \accdialytika\textUpsilon{} \acctonos\textalpha{} \acctonos\textepsilon{}
- \acctonos\texteta{} \acctonos\textiota{} \\
-
- ΰ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο \\
- \accdialytikatonos\textupsilon{} \textalpha{} \textbeta{} \textgamma{}
- \textdelta{} \textepsilon{} \textzeta{} \texteta{} \texttheta{} \textiota{}
- \textkappa{} \textlambda{} \textmu{} \textnu{} \textxi{} \textomicron{} \\
-
- π ρ ς σ τ υ φ χ ψ ω ϊ ϋ ό ύ ώ ␣ \\
- \textpi{} \textrho{} \textfinalsigma{} \textsigma{} \texttau{}
- \textupsilon{} \textphi{} \textchi{} \textpsi{} \textomega{}
- \accdialytika\textiota{} \accdialytika\textupsilon{}
- \acctonos\textomicron{} \acctonos\textupsilon{} \acctonos\textomega{} ␣\\
-
- ϐ ϑ ␣ ␣ ␣ ϕ ϖ ␣ Ϙ ϙ Ϛ ϛ Ϝ ϝ Ϟ ϟ \\
- \textbetasymbol{} \textthetasymbol{} ␣ ␣ ␣ \textphisymbol{}
- \textpisymbol{} ␣ \textQoppa{} \textqoppa{} \textStigma{} \textstigma{}
- \textDigamma{} \textdigamma{} \textKoppa{} \textkoppa{} \\
-
- Ϡ ϡ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ϰ ϱ ϴ ϵ \\
- \textSampi{} \textsampi{} ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣
- \textkappasymbol{} \textrhosymbol{} \textThetasymbol{} \textepsilonsymbol
-}
-No case change:
-\begin{quote}
- \selectlanguage{greek}
- \GreekAndCoptic
-\end{quote}
-%
-MakeUppercase:
-\begin{quote}
- \selectlanguage{greek}
- \MakeUppercase{\GreekAndCoptic}
-\end{quote}
-%
-MakeLowercase:
-\begin{quote}
- \selectlanguage{greek}
- \MakeLowercase{\GreekAndCoptic}
-\end{quote}
-
-\subsubsection{symbol variants}
-
-\newcommand{\symbolvariants}{
- \textbeta \textvarbeta \textbetasymbol ϐ
- \textepsilon \textvarepsilon \textepsilonsymbol ϵ
- \texttheta \textvartheta \textthetasymbol ϑ
- \textTheta \textvarTheta \textThetasymbol ϴ
- \textkappa \textvarkappa \textkappasymbol ϰ
- \textpi \textvarpi \textpisymbol ϖ
- \textrho \textvarrho \textrhosymbol ϱ
- \textphi \textvarphi \textphisymbol ϕ
-}
-
-No case change (letter, ``var''-letter, letter-``symbol'', literal symbol)
-\begin{quote}
- \selectlanguage{greek}
- \symbolvariants
-\end{quote}
-%
-MakeUppercase selects the matching capital lette
-\begin{quote}
- \selectlanguage{greek}
- \MakeUppercase{\symbolvariants}
-\end{quote}
-%
-MakeLowercase select the lowercase letter (not the symbol)
-\begin{quote}
- \selectlanguage{greek}
- \MakeLowercase{\textBeta Β \textEpsilon Ε
- \textTheta Θ \textThetasymbol \textvarTheta ϴ
- \textKappa Κ \textPi Π \textRho Ρ \textPhi Φ}
-\end{quote}
-
-
-
-\subsection{Greek extended}
-
-\subsubsection{short accent macros}
-
-\renewcommand{\GreekExtended}{\raggedright
- ἀ ἁ ἂ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ \\
- \>\textalpha{}
- \<\textalpha{}
- \>`\textalpha{}
- \<`\textalpha{}
- \>'\textalpha{}
- \<'\textalpha{}
- \~>\textalpha{}
- \~<\textalpha{}
- \>\textAlpha{}
- \<\textAlpha{}
- \>`\textAlpha{}
- \<`\textAlpha{}
- \>'\textAlpha{}
- \<'\textAlpha{}
- \~>\textAlpha{}
- \~<\textAlpha{} \\
-
- ἐ ἑ ἒ ἓ ἔ ἕ ␣ ␣ Ἐ Ἑ Ἒ Ἓ Ἔ Ἕ \\
- \>\textepsilon{}
- \<\textepsilon{}
- \>`\textepsilon{}
- \<`\textepsilon{}
- \>'\textepsilon{}
- \<'\textepsilon{}
- ␣ ␣ \>\textEpsilon{}
- \<\textEpsilon{}
- \>`\textEpsilon{}
- \<`\textEpsilon{}
- \>'\textEpsilon{}
- \<'\textEpsilon{}\\
-
- ἠ ἡ ἢ ἣ ἤ ἥ ἦ ἧ Ἠ Ἡ Ἢ Ἣ Ἤ Ἥ Ἦ Ἧ \\
- \>\texteta{}
- \<\texteta{}
- \>`\texteta{}
- \<`\texteta{}
- \>'\texteta{}
- \<'\texteta{}
- \~>\texteta{}
- \~<\texteta{}
- \>\textEta{}
- \<\textEta{}
- \>`\textEta{}
- \<`\textEta{}
- \>'\textEta{}
- \<'\textEta{}
- \~>\textEta{}
- \~<\textEta{} \\
-
- ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ \\
- \>\textiota{}
- \<\textiota{}
- \>`\textiota{}
- \<`\textiota{}
- \>'\textiota{}
- \<'\textiota{}
- \~>\textiota{}
- \~<\textiota{}
- \>\textIota{}
- \<\textIota{}
- \>`\textIota{}
- \<`\textIota{}
- \>'\textIota{}
- \<'\textIota{}
- \~>\textIota{}
- \~<\textIota{} \\
-
- ὀ ὁ ὂ ὃ ὄ ὅ ␣ ␣ Ὀ Ὁ Ὂ Ὃ Ὄ Ὅ \\
- \>\textomicron{}
- \<\textomicron{}
- \>`\textomicron{}
- \<`\textomicron{}
- \>'\textomicron{}
- \<'\textomicron{}
- ␣ ␣ \>\textOmicron{}
- \<\textOmicron{}
- \>`\textOmicron{}
- \<`\textOmicron{}
- \>'\textOmicron{}
- \<'\textOmicron{} \\
-
- ὐ ὑ ὒ ὓ ὔ ὕ ὖ ὗ ␣ Ὑ ␣ Ὓ ␣ Ὕ ␣ Ὗ \\
- \>\textupsilon{}
- \<\textupsilon{}
- \>`\textupsilon{}
- \<`\textupsilon{}
- \>'\textupsilon{}
- \<'\textupsilon{}
- \~>\textupsilon{}
- \~<\textupsilon{}
- ␣ \<\textUpsilon{}
- ␣ \<`\textUpsilon{}
- ␣ \<'\textUpsilon{}
- ␣ \~<\textUpsilon{} \\
-
- ὠ ὡ ὢ ὣ ὤ ὥ ὦ ὧ Ὠ Ὡ Ὢ Ὣ Ὤ Ὥ Ὦ Ὧ \\
- \>\textomega{}
- \<\textomega{}
- \>`\textomega{}
- \<`\textomega{}
- \>'\textomega{}
- \<'\textomega{}
- \~>\textomega{}
- \~<\textomega{}
- \>\textOmega{}
- \<\textOmega{}
- \>`\textOmega{}
- \<`\textOmega{}
- \>'\textOmega{}
- \<'\textOmega{}
- \~>\textOmega{}
- \~<\textOmega{} \\
-
- ὰ ά ὲ έ ὴ ή ὶ ί ὸ ό ὺ ύ ὼ ώ \\
- \`\textalpha{}
- \'\textalpha{}
- \`\textepsilon{}
- \'\textepsilon{}
- \`\texteta{}
- \'\texteta{}
- \`\textiota{}
- \'\textiota{}
- \`\textomicron{}
- \'\textomicron{}
- \`\textupsilon{}
- \'\textupsilon{}
- \`\textomega{}
- \'\textomega{} \\
-
- ᾀ ᾁ ᾂ ᾃ ᾄ ᾅ ᾆ ᾇ ᾈ ᾉ ᾊ ᾋ ᾌ ᾍ ᾎ ᾏ \\
- \>\textalpha\ypogegrammeni{}
- \<\textalpha\ypogegrammeni{}
- \>`\textalpha\ypogegrammeni{}
- \<`\textalpha\ypogegrammeni{}
- \>'\textalpha\ypogegrammeni{}
- \<'\textalpha\ypogegrammeni{}
- \~>\textalpha\ypogegrammeni{}
- \~<\textalpha\ypogegrammeni{}
- \>\textAlpha\ypogegrammeni{}
- \<\textAlpha\ypogegrammeni{}
- \>`\textAlpha\ypogegrammeni{}
- \<`\textAlpha\ypogegrammeni{}
- \>'\textAlpha\ypogegrammeni{}
- \<'\textAlpha\ypogegrammeni{}
- \~>\textAlpha\ypogegrammeni{}
- \~<\textAlpha\ypogegrammeni{} \\
-
- ᾐ ᾑ ᾒ ᾓ ᾔ ᾕ ᾖ ᾗ ᾘ ᾙ ᾚ ᾛ ᾜ ᾝ ᾞ ᾟ \\
- \>\texteta\ypogegrammeni{}
- \<\texteta\ypogegrammeni{}
- \>`\texteta\ypogegrammeni{}
- \<`\texteta\ypogegrammeni{}
- \>'\texteta\ypogegrammeni{}
- \<'\texteta\ypogegrammeni{}
- \~>\texteta\ypogegrammeni{}
- \~<\texteta\ypogegrammeni{}
- \>\textEta\ypogegrammeni{}
- \<\textEta\ypogegrammeni{}
- \>`\textEta\ypogegrammeni{}
- \<`\textEta\ypogegrammeni{}
- \>'\textEta\ypogegrammeni{}
- \<'\textEta\ypogegrammeni{}
- \~>\textEta\ypogegrammeni{}
- \~<\textEta\ypogegrammeni{} \\
-
- ᾠ ᾡ ᾢ ᾣ ᾤ ᾦ ᾧ ᾥ ᾨ ᾩ ᾪ ᾫ ᾬ ᾭ ᾮ ᾯ \\
- \>\textomega\ypogegrammeni{}
- \<\textomega\ypogegrammeni{}
- \>`\textomega\ypogegrammeni{}
- \<`\textomega\ypogegrammeni{}
- \>'\textomega\ypogegrammeni{}
- \<'\textomega\ypogegrammeni{}
- \~>\textomega\ypogegrammeni{}
- \~<\textomega\ypogegrammeni{}
- \>\textOmega\ypogegrammeni{}
- \<\textOmega\ypogegrammeni{}
- \>`\textOmega\ypogegrammeni{}
- \<`\textOmega\ypogegrammeni{}
- \>'\textOmega\ypogegrammeni{}
- \<'\textOmega\ypogegrammeni{}
- \~>\textOmega\ypogegrammeni{}
- \~<\textOmega\ypogegrammeni{} \\
-
- ᾰ ᾱ ᾲ ᾳ ᾴ ␣ ᾶ ᾷ Ᾰ Ᾱ Ὰ Ά ᾼ ᾽ ι ᾿ \\
- \u\textalpha{}
- \=\textalpha{}
- \`\textalpha\ypogegrammeni{}
- \textalpha\ypogegrammeni{}
- \'\textalpha\ypogegrammeni{}
- ␣ \~\textalpha{}
- \~\textalpha\ypogegrammeni{}
- \u\textAlpha{}
- \=\textAlpha{}
- \`\textAlpha{}
- \'\textAlpha{}
- \textAlpha\ypogegrammeni{}
- \>{}
- \prosgegrammeni{}
- \>{} \\
-
- ῀ ῁ ῂ ῃ ῄ ␣ ῆ ῇ Ὲ Έ Ὴ Ή ῌ ῍ ῎ ῏ \\
- \~{}
- \"\~{}
- \`\texteta\ypogegrammeni{}
- \texteta\ypogegrammeni{}
- \'\texteta\ypogegrammeni{}
- ␣ \~\texteta{}
- \~\texteta\ypogegrammeni{}
- \`\textEpsilon{}
- \'\textEpsilon{}
- \`\textEta{}
- \'\textEta{}
- \textEta\ypogegrammeni{}
- \>`{}
- \>'{}
- \~>{} \\
-
- ῐ ῑ ῒ ΐ ␣ ␣ ῖ ῗ Ῐ Ῑ Ὶ Ί ␣ ῝ ῞ ῟ \\
- \u\textiota{}
- \=\textiota{}
- \`"\textiota{}
- \'"\textiota{}
- ␣ ␣ \~\textiota{}
- \~"\textiota{}
- \u\textIota{}
- \=\textIota{}
- \`\textIota{}
- \'\textIota{}
- ␣
- \<`{}
- \<'{}
- \~<{} \\
-
- ῠ ῡ ῢ ΰ ῤ ῥ ῦ ῧ Ῠ Ῡ Ὺ Ύ Ῥ ῭ ΅ ` \\
- \u\textupsilon{}
- \=\textupsilon{}
- \`"\textupsilon{}
- \'"\textupsilon{}
- \>\textrho{}
- \<\textrho{}
- \~\textupsilon{}
- \~"\textupsilon{}
- \u\textUpsilon{}
- \=\textUpsilon{}
- \`\textUpsilon{}
- \'\textUpsilon{}
- \<\textRho{}
- \`"{}
- \'"{}
- \`{} \\
-
- ␣ ␣ ῲ ῳ ῴ ␣ ῶ ῷ Ὸ Ό Ὼ Ώ ῼ ´ ῾ ␣ \\
-
- ␣ ␣ \`\textomega\ypogegrammeni{}
- \textomega\ypogegrammeni{}
- \'\textomega\ypogegrammeni{}
- ␣ \~\textomega{}
- \~\textomega\ypogegrammeni{}
- \`\textOmicron{}
- \'\textOmicron{}
- \`\textOmega{}
- \'\textOmega{}
- \textOmega\ypogegrammeni{}
- \'{}
- \<{} ␣
-}
-
-No case change:
-\begin{quote}
- \selectlanguage{greek}
- \GreekExtended
-\end{quote}
-%
-MakeUppercase:
-\begin{quote}
- \selectlanguage{greek}
- \MakeUppercase{\GreekExtended}
-\end{quote}
-%
-MakeLowercase:
-\begin{quote}
- \selectlanguage{greek}
- \MakeLowercase{\GreekExtended}
-\end{quote}
-
-
-\subsubsection{named accent macros}
-
-\renewcommand{\GreekExtended}{\raggedright
- ἀ ἁ ἂ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ \\
- \accpsili\textalpha{}
- \accdasia\textalpha{}
- \accpsilivaria\textalpha{}
- \accdasiavaria\textalpha{}
- \accpsilioxia\textalpha{}
- \accdasiaoxia\textalpha{}
- \accpsiliperispomeni\textalpha{}
- \accdasiaperispomeni\textalpha{}
- \accpsili\textAlpha{}
- \accdasia\textAlpha{}
- \accpsilivaria\textAlpha{}
- \accdasiavaria\textAlpha{}
- \accpsilioxia\textAlpha{}
- \accdasiaoxia\textAlpha{}
- \accpsiliperispomeni\textAlpha{}
- \accdasiaperispomeni\textAlpha{} \\
-
- ἐ ἑ ἒ ἓ ἔ ἕ ␣ ␣ Ἐ Ἑ Ἒ Ἓ Ἔ Ἕ \\
- \accpsili\textepsilon{}
- \accdasia\textepsilon{}
- \accpsilivaria\textepsilon{}
- \accdasiavaria\textepsilon{}
- \accpsilioxia\textepsilon{}
- \accdasiaoxia\textepsilon{}
- ␣ ␣ \accpsili\textEpsilon{}
- \accdasia\textEpsilon{}
- \accpsilivaria\textEpsilon{}
- \accdasiavaria\textEpsilon{}
- \accpsilioxia\textEpsilon{}
- \accdasiaoxia\textEpsilon{}\\
-
- ἠ ἡ ἢ ἣ ἤ ἥ ἦ ἧ Ἠ Ἡ Ἢ Ἣ Ἤ Ἥ Ἦ Ἧ \\
- \accpsili\texteta{}
- \accdasia\texteta{}
- \accpsilivaria\texteta{}
- \accdasiavaria\texteta{}
- \accpsilioxia\texteta{}
- \accdasiaoxia\texteta{}
- \accpsiliperispomeni\texteta{}
- \accdasiaperispomeni\texteta{}
- \accpsili\textEta{}
- \accdasia\textEta{}
- \accpsilivaria\textEta{}
- \accdasiavaria\textEta{}
- \accpsilioxia\textEta{}
- \accdasiaoxia\textEta{}
- \accpsiliperispomeni\textEta{}
- \accdasiaperispomeni\textEta{} \\
-
- ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ \\
- \accpsili\textiota{}
- \accdasia\textiota{}
- \accpsilivaria\textiota{}
- \accdasiavaria\textiota{}
- \accpsilioxia\textiota{}
- \accdasiaoxia\textiota{}
- \accpsiliperispomeni\textiota{}
- \accdasiaperispomeni\textiota{}
- \accpsili\textIota{}
- \accdasia\textIota{}
- \accpsilivaria\textIota{}
- \accdasiavaria\textIota{}
- \accpsilioxia\textIota{}
- \accdasiaoxia\textIota{}
- \accpsiliperispomeni\textIota{}
- \accdasiaperispomeni\textIota{} \\
-
- ὀ ὁ ὂ ὃ ὄ ὅ ␣ ␣ Ὀ Ὁ Ὂ Ὃ Ὄ Ὅ \\
- \accpsili\textomicron{}
- \accdasia\textomicron{}
- \accpsilivaria\textomicron{}
- \accdasiavaria\textomicron{}
- \accpsilioxia\textomicron{}
- \accdasiaoxia\textomicron{}
- ␣ ␣ \accpsili\textOmicron{}
- \accdasia\textOmicron{}
- \accpsilivaria\textOmicron{}
- \accdasiavaria\textOmicron{}
- \accpsilioxia\textOmicron{}
- \accdasiaoxia\textOmicron{} \\
-
- ὐ ὑ ὒ ὓ ὔ ὕ ὖ ὗ ␣ Ὑ ␣ Ὓ ␣ Ὕ ␣ Ὗ \\
- \accpsili\textupsilon{}
- \accdasia\textupsilon{}
- \accpsilivaria\textupsilon{}
- \accdasiavaria\textupsilon{}
- \accpsilioxia\textupsilon{}
- \accdasiaoxia\textupsilon{}
- \accpsiliperispomeni\textupsilon{}
- \accdasiaperispomeni\textupsilon{}
- ␣ \accdasia\textUpsilon{}
- ␣ \accdasiavaria\textUpsilon{}
- ␣ \accdasiaoxia\textUpsilon{}
- ␣ \accdasiaperispomeni\textUpsilon{} \\
-
- ὠ ὡ ὢ ὣ ὤ ὥ ὦ ὧ Ὠ Ὡ Ὢ Ὣ Ὤ Ὥ Ὦ Ὧ \\
- \accpsili\textomega{}
- \accdasia\textomega{}
- \accpsilivaria\textomega{}
- \accdasiavaria\textomega{}
- \accpsilioxia\textomega{}
- \accdasiaoxia\textomega{}
- \accpsiliperispomeni\textomega{}
- \accdasiaperispomeni\textomega{}
- \accpsili\textOmega{}
- \accdasia\textOmega{}
- \accpsilivaria\textOmega{}
- \accdasiavaria\textOmega{}
- \accpsilioxia\textOmega{}
- \accdasiaoxia\textOmega{}
- \accpsiliperispomeni\textOmega{}
- \accdasiaperispomeni\textOmega{} \\
-
- ὰ ά ὲ έ ὴ ή ὶ ί ὸ ό ὺ ύ ὼ ώ \\
- \accvaria\textalpha{}
- \accoxia\textalpha{}
- \accvaria\textepsilon{}
- \accoxia\textepsilon{}
- \accvaria\texteta{}
- \accoxia\texteta{}
- \accvaria\textiota{}
- \accoxia\textiota{}
- \accvaria\textomicron{}
- \accoxia\textomicron{}
- \accvaria\textupsilon{}
- \accoxia\textupsilon{}
- \accvaria\textomega{}
- \accoxia\textomega{} \\
-
- ᾀ ᾁ ᾂ ᾃ ᾄ ᾅ ᾆ ᾇ ᾈ ᾉ ᾊ ᾋ ᾌ ᾍ ᾎ ᾏ \\
- \accpsili\textalpha\ypogegrammeni{}
- \accdasia\textalpha\ypogegrammeni{}
- \accpsilivaria\textalpha\ypogegrammeni{}
- \accdasiavaria\textalpha\ypogegrammeni{}
- \accpsilioxia\textalpha\ypogegrammeni{}
- \accdasiaoxia\textalpha\ypogegrammeni{}
- \accpsiliperispomeni\textalpha\ypogegrammeni{}
- \accdasiaperispomeni\textalpha\ypogegrammeni{}
- \accpsili\textAlpha\ypogegrammeni{}
- \accdasia\textAlpha\ypogegrammeni{}
- \accpsilivaria\textAlpha\ypogegrammeni{}
- \accdasiavaria\textAlpha\ypogegrammeni{}
- \accpsilioxia\textAlpha\ypogegrammeni{}
- \accdasiaoxia\textAlpha\ypogegrammeni{}
- \accpsiliperispomeni\textAlpha\ypogegrammeni{}
- \accdasiaperispomeni\textAlpha\ypogegrammeni{} \\
-
- ᾐ ᾑ ᾒ ᾓ ᾔ ᾕ ᾖ ᾗ ᾘ ᾙ ᾚ ᾛ ᾜ ᾝ ᾞ ᾟ \\
- \accpsili\texteta\ypogegrammeni{}
- \accdasia\texteta\ypogegrammeni{}
- \accpsilivaria\texteta\ypogegrammeni{}
- \accdasiavaria\texteta\ypogegrammeni{}
- \accpsilioxia\texteta\ypogegrammeni{}
- \accdasiaoxia\texteta\ypogegrammeni{}
- \accpsiliperispomeni\texteta\ypogegrammeni{}
- \accdasiaperispomeni\texteta\ypogegrammeni{}
- \accpsili\textEta\ypogegrammeni{}
- \accdasia\textEta\ypogegrammeni{}
- \accpsilivaria\textEta\ypogegrammeni{}
- \accdasiavaria\textEta\ypogegrammeni{}
- \accpsilioxia\textEta\ypogegrammeni{}
- \accdasiaoxia\textEta\ypogegrammeni{}
- \accpsiliperispomeni\textEta\ypogegrammeni{}
- \accdasiaperispomeni\textEta\ypogegrammeni{} \\
-
- ᾠ ᾡ ᾢ ᾣ ᾤ ᾦ ᾧ ᾥ ᾨ ᾩ ᾪ ᾫ ᾬ ᾭ ᾮ ᾯ \\
- \accpsili\textomega\ypogegrammeni{}
- \accdasia\textomega\ypogegrammeni{}
- \accpsilivaria\textomega\ypogegrammeni{}
- \accdasiavaria\textomega\ypogegrammeni{}
- \accpsilioxia\textomega\ypogegrammeni{}
- \accdasiaoxia\textomega\ypogegrammeni{}
- \accpsiliperispomeni\textomega\ypogegrammeni{}
- \accdasiaperispomeni\textomega\ypogegrammeni{}
- \accpsili\textOmega\ypogegrammeni{}
- \accdasia\textOmega\ypogegrammeni{}
- \accpsilivaria\textOmega\ypogegrammeni{}
- \accdasiavaria\textOmega\ypogegrammeni{}
- \accpsilioxia\textOmega\ypogegrammeni{}
- \accdasiaoxia\textOmega\ypogegrammeni{}
- \accpsiliperispomeni\textOmega\ypogegrammeni{}
- \accdasiaperispomeni\textOmega\ypogegrammeni{} \\
-
- ᾰ ᾱ ᾲ ᾳ ᾴ ␣ ᾶ ᾷ Ᾰ Ᾱ Ὰ Ά ᾼ ᾽ ι ᾿ \\
- \u\textalpha{}
- \=\textalpha{}
- \accvaria\textalpha\ypogegrammeni{}
- \textalpha\ypogegrammeni{}
- \accoxia\textalpha\ypogegrammeni{}
- ␣ \accperispomeni\textalpha{}
- \accperispomeni\textalpha\ypogegrammeni{}
- \u\textAlpha{}
- \=\textAlpha{}
- \accvaria\textAlpha{}
- \accoxia\textAlpha{}
- \textAlpha\ypogegrammeni{}
- \accpsili{}
- \prosgegrammeni{}
- \accpsili{} \\
-
- ῀ ῁ ῂ ῃ ῄ ␣ ῆ ῇ Ὲ Έ Ὴ Ή ῌ ῍ ῎ ῏ \\
- \accperispomeni{}
- \accdialytikaperispomeni{}
- \accvaria\texteta\ypogegrammeni{}
- \texteta\ypogegrammeni{}
- \accoxia\texteta\ypogegrammeni{}
- ␣ \accperispomeni\texteta{}
- \accperispomeni\texteta\ypogegrammeni{}
- \accvaria\textEpsilon{}
- \accoxia\textEpsilon{}
- \accvaria\textEta{}
- \accoxia\textEta{}
- \textEta\ypogegrammeni{}
- \accpsilivaria{}
- \accpsilioxia{}
- \accpsiliperispomeni{} \\
-
- ῐ ῑ ῒ ΐ ␣ ␣ ῖ ῗ Ῐ Ῑ Ὶ Ί ␣ ῝ ῞ ῟ \\
- \u\textiota{}
- \=\textiota{}
- \accdialytikavaria\textiota{}
- \accdialytikatonos\textiota{}
- ␣ ␣ \accperispomeni\textiota{}
- \accperispomeni"\textiota{}
- \u\textIota{}
- \=\textIota{}
- \accvaria\textIota{}
- \accoxia\textIota{}
- ␣
- \accdasiavaria{}
- \accdasiaoxia{}
- \accdasiaperispomeni{} \\
-
- ῠ ῡ ῢ ΰ ῤ ῥ ῦ ῧ Ῠ Ῡ Ὺ Ύ Ῥ ῭ ΅ ` \\
- \u\textupsilon{}
- \=\textupsilon{}
- \accdialytikavaria\textupsilon{}
- \accdialytikatonos\textupsilon{}
- \accpsili\textrho{}
- \accdasia\textrho{}
- \accperispomeni\textupsilon{}
- \accdialytikaperispomeni\textupsilon{}
- \u\textUpsilon{}
- \=\textUpsilon{}
- \accvaria\textUpsilon{}
- \accoxia\textUpsilon{}
- \accdasia\textRho{}
- \accdialytikavaria{}
- \accdialytikatonos{}
- \accvaria{} \\
-
- ␣ ␣ ῲ ῳ ῴ ␣ ῶ ῷ Ὸ Ό Ὼ Ώ ῼ ´ ῾ ␣ \\
-
- ␣ ␣ \accvaria\textomega\ypogegrammeni{}
- \textomega\ypogegrammeni{}
- \accoxia\textomega\ypogegrammeni{}
- ␣ \accperispomeni\textomega{}
- \accperispomeni\textomega\ypogegrammeni{}
- \accvaria\textOmicron{}
- \accoxia\textOmicron{}
- \accvaria\textOmega{}
- \accoxia\textOmega{}
- \textOmega\ypogegrammeni{}
- \accoxia{}
- \accdasia{} ␣
-}
-
-No case change:
-\begin{quote}
- \selectlanguage{greek}
- \GreekExtended
-\end{quote}
-%
-MakeUppercase:
-\begin{quote}
- \selectlanguage{greek}
- \MakeUppercase{\GreekExtended}
-\end{quote}
-%
-MakeLowercase:
-\begin{quote}
- \selectlanguage{greek}
- \MakeLowercase{\GreekExtended}
-\end{quote}
-
-
-\section{Latin transliteration}
-
-\ifdefined \UnicodeEncodingName % set by LaTeX for Unicode-aware engines
- \textbf{Warning:}
- As the uc/lccode re-definitions are not performed when Unicode fonts are
- used, the accents are not dropped from upcased Latin transliterations.
- Accent macros work fine also in Latin transliterations with Xe/LuaTeX.
-\fi
-
-\subsection{Greek and Coptic}
-
-Every second line is input as Latin transliteration:
-
-\let\:\textvisiblespace
-
-\renewcommand{\GreekAndCoptic}{%
- ͺ ; ␣ ␣ ΄ ΅ Ά · Έ Ή Ί ␣ Ό ␣ Ύ Ώ \\
- \lgrfont{ | ? \: \: ' "' 'A ; 'E 'H 'I \: 'O \: 'U 'W} \\
- ΐ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο \\
- \lgrfont{'"i A B G D E Z H J I K L M N X O} \\
- Π Ρ ␣ Σ Τ Υ Φ Χ Ψ Ω Ϊ Ϋ ά έ ή ί \\
- \lgrfont{ P R \: S T U F Q Y W "I "U 'a 'e 'h 'i} \\
- ΰ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο \\
- \lgrfont{'"u a b g d e z h j i k l m n x o} \\
- π ρ ς σ τ υ φ χ ψ ω ϊ ϋ ό ύ ώ ␣ \\
- \lgrfont{ p r s s\textcompwordmark{}
- t u f q y w "i "u 'o 'u 'w \:}
-}
-
-\begin{quote}
- \selectlanguage{greek}
- \GreekAndCoptic
-\end{quote}
-%
-MakeUppercase:
-
-\begin{quote}
- \selectlanguage{greek}
- \MakeUppercase{\GreekAndCoptic}
-\end{quote}
-%
-Letters upcased, dialytika and sub-iota unchanged, other diacritics dropped
-(if \verb|\greekfontencoding| is LGR).
-
-
-MakeLowercase:
-
-\begin{quote}
- \selectlanguage{greek}
- \MakeLowercase{\GreekAndCoptic}
-\end{quote}
-%
-With LGR, the lowercase of \ensuregreek{Σ} is the «auto-sigma»
-(\verb|\textautosigma|): \ensuregreek{ΣΣ $\mapsto$ \MakeLowercase{ΣΣ}}.
-Add a ZWNJ or use the \verb|\noboundary| macro to prevent conversion to
-final sigma: \ensuregreek{\MakeLowercase{ΣΣ}}.
-The lowercase of GREEK LETTER STIGMA \ensuregreek{Ϛ} is
-\ensuregreek{\MakeLowercase{Ϛ}}, not \verb|\textvarstigma|%
-\ifdefined \UnicodeEncodingName \else
- (\ensuregreek\textvarstigma)%
-\fi .
-
-\subsection{Greek extended}
-
-Every second line is input as Latin transliteration. The current language
-variant is \emph\GreekLanguageVariant.
-
-\renewcommand{\GreekExtended}{\raggedright
- ἀ ἁ ἂ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ \\
- \lgrfont{>a `a <`a >'a <'a >~a <~a >A `A <`A >'A <'A >~A <~A } \\
- ἐ ἑ ἒ ἓ ἔ ἕ ␣ ␣ Ἐ Ἑ Ἒ Ἓ Ἔ Ἕ \\
- \lgrfont{>e `e <`e >'e <'e \: \: >E `E <`E >'E <'E } \\
- ἠ ἡ ἢ ἣ ἤ ἥ ἦ ἧ Ἠ Ἡ Ἢ Ἣ Ἤ Ἥ Ἦ Ἧ \\
- \lgrfont{>h `h <`h >'h <'h >~h <~h >H `H <`H >'H <'H >~H <~H } \\
- ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ \\
- \lgrfont{>i `i <`i >'i <'i >~i <~i >I `I <`I >'I <'I >~I <~I } \\
- ὀ ὁ ὂ ὃ ὄ ὅ ␣ ␣ Ὀ Ὁ Ὂ Ὃ Ὄ Ὅ \\
- \lgrfont{>o `o <`o >'o <'o \: \: >O `O <`O >'O <'O } \\
- ὐ ὑ ὒ ὓ ὔ ὕ ὖ ὗ ␣ Ὑ ␣ Ὓ ␣ Ὕ ␣ Ὗ \\
- \lgrfont{>u `u <`u >'u <'u >~u <~u \: w `w <`w >'w <'w >~w <~w >W `W <`W >'W <'W >~W <~W } \\
- ὰ ά ὲ έ ὴ ή ὶ ί ὸ ό ὺ ύ ὼ ώ \\
- \lgrfont{`a 'a `e 'e `h 'h `i 'i `o 'o `u 'u `w 'w } \\
- ᾀ ᾁ ᾂ ᾃ ᾄ ᾅ ᾆ ᾇ ᾈ ᾉ ᾊ ᾋ ᾌ ᾍ ᾎ ᾏ \\
- \lgrfont{>a| `a| <`a| >'a| <'a| >~a| <~a| >A| `A| <`A| >'A| <'A| >~A| <~A|} \\
- ᾐ ᾑ ᾒ ᾓ ᾔ ᾕ ᾖ ᾗ ᾘ ᾙ ᾚ ᾛ ᾜ ᾝ ᾞ ᾟ \\
- \lgrfont{>h| `h| <`h| >'h| <'h| >~h| <~h| >H| `H| <`H| >'H| <'H| >~H| <~H|} \\
- ᾠ ᾡ ᾢ ᾣ ᾤ ᾦ ᾧ ᾥ ᾨ ᾩ ᾪ ᾫ ᾬ ᾭ ᾮ ᾯ \\
- \lgrfont{>w| `w| <`w| >'w| <'w| >~w| <~w| >W| `W| <`W| >'W| <'W| >~W| <~W|} \\
- ᾰ ᾱ ᾲ ᾳ ᾴ ␣ ᾶ ᾷ Ᾰ Ᾱ Ὰ Ά ᾼ ᾽ ι ᾿ \\
-\lgrfont{\u{a} \=a `a| a| 'a| \: ~a ~a| \u{A} \=A `A 'A A| > | > } \\
- ῀ ῁ ῂ ῃ ῄ ␣ ῆ ῇ Ὲ Έ Ὴ Ή ῌ ῍ ῎ ῏ \\
- \lgrfont{~ "~ `h| h| 'h| \: ~h ~h| `E 'E `H 'H H| >` >' ~> } \\
- ῐ ῑ ῒ ΐ ␣ ␣ ῖ ῗ Ῐ Ῑ Ὶ Ί ␣ ῝ ῞ ῟ \\
-\lgrfont{\u{i} \=i `"i '"i \: \: ~i ~"i \u{I} \=I `I 'I \: <` <' ~< } \\
- ῠ ῡ ῢ ΰ ␣ ␣ ῤ ῥ ῦ ῧ Ὺ Ύ Ῥ ῭ ΅ ` \\
-\lgrfont{\u{u} \=u `"u '"u \: \: >r to the "empty" char for accent
-dropping: the characters vanish if used stand-alone
-(also with the ``old'' MakeUppercase):
-\begin{quote}
- \selectlanguage{greek}
- ` ' ~ < > → \MakeUppercase{` ' ~ < >}
- ``x'' <> → \MakeUppercase{``x'' <>}
-\end{quote}
-
-Workaround: use literal typographical quote characters:
-\begin{quote}
- \selectlanguage{greek}
- ‘x’ «y» → \MakeUppercase{‘x’ «y»}
-\end{quote}
-
-MakeLowercase:
-
-\begin{quote}
- \selectlanguage{greek}
- \MakeLowercase{\GreekExtended}
-\end{quote}
-
-
-\end{document}
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek-ini.tex b/macros/latex/contrib/babel-contrib/greek/test-greek-ini.tex
index 244ee3e345..fcf1f763cf 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-greek-ini.tex
+++ b/macros/latex/contrib/babel-contrib/greek/test-greek-ini.tex
@@ -26,15 +26,16 @@
% \usepackage{textalpha}
\ProvideTextCommand{\ensuregreek}{TU}[1]{##1}
\ProvideTextCommand{\greekscript}{TU}{}
- \ProvideTextCommand{\textalpha}{TU}{\cs{textalpha}}
- \ProvideTextCommand{\textOmega}{TU}{\cs{textOmega}}
+ \ProvideTextCommand{\textalpha}{TU}{only with the \pkgref{textalpha}
+ package}
+ \ProvideTextCommand{\textOmega}{TU}{}
\fi
\usepackage{hyperref}
\hypersetup{unicode, colorlinks=true,linkcolor=blue,urlcolor=blue}
% fallbacks for commands defined in babel-greek:
- \providecommand*\greekfontencoding{None}
+ \providecommand*\greekfontencoding{not set}
% \providecommand*\lgrfont[1]{\cs{lgrfont} \emph{missing}}
\ProvideTextCommandDefault{\textampersand}{\&}
\providecommand*\greeknumeral[1]{\{##1\}}
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek.pdf b/macros/latex/contrib/babel-contrib/greek/test-greek.pdf
index 50235b0c51..9a12610f7c 100644
Binary files a/macros/latex/contrib/babel-contrib/greek/test-greek.pdf and b/macros/latex/contrib/babel-contrib/greek/test-greek.pdf differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek.tex b/macros/latex/contrib/babel-contrib/greek/test-greek.tex
index f46b1db526..1bae1bb88d 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-greek.tex
+++ b/macros/latex/contrib/babel-contrib/greek/test-greek.tex
@@ -39,7 +39,7 @@
% Uncomment the desired language variant
% Default: modern monotonic Greek
%
- \languageattribute{greek}{polutoniko} % "modern" polytonic Greek
+ % \languageattribute{greek}{polutoniko} % "modern" polytonic Greek
% \languageattribute{greek}{polytonic} % alias for polutoniko
% \languageattribute{greek}{ancient} % ancient Greek
%
@@ -51,6 +51,12 @@
% \selectlanguage{polutonikogreek} instead of \selectlanguage{greek} etc.
% if the "polutoniko" Greek language variant is selected.
+ % To use modern and ancient Greek in one document, load the second language
+ % with \babelprovide.
+ % Caveat: With 8-bit Greek, the font-encoding switch to LGR fails
+ % in the ToC: section titles with Greek come out wrong!
+ \babelprovide[hyphenrules=ancientgreek]{ancientgreek}
+
% Make ; active to prevent mapping to a middle dot:
\languageattribute{greek}{keep-semicolon}
}
@@ -66,19 +72,18 @@
\usepackage{hyperref}
\hypersetup{unicode, colorlinks=true,linkcolor=blue,urlcolor=blue}
-% \usepackage{bookmark}
+\usepackage{bookmark}
\usepackage{parskip}
-% Semantic styling:
+% Auxiliary commands:
+
+% Semantic styling:
\newcommand{\file}{\texttt}
\newcommand{\cs}[1]{\texttt{\textbackslash#1}}
\newcommand{\pkgref}[1]{\emph{\href{https://ctan.org/pkg/#1}{#1}}}
-
-% Auxiliary commands:
-
% print the selected language variant
\newcommand{\GreekLanguageVariant}{%
\ifx\captionsgreek\captionspolutonikogreek
@@ -92,6 +97,17 @@
\fi
}
+% which engine is used?
+\ifdefined \UnicodeEncodingName
+ \ifdefined\luatexversion
+ \newcommand*{\texengine}{LuaLaTeX}
+ \else
+ \newcommand*{\texengine}{XeLaTeX}
+ \fi
+\else
+ \newcommand*{\texengine}{pdfLaTeX}
+\fi
+
% The paragraph after \showhyphenpar is printed with all words
% shown as hy-phen-ated.
% from https://tex.stackexchange.com/questions/55282/display-hyphenation-options-for-a-specific-word/55283#55283
@@ -120,6 +136,15 @@
\SETUPDOC % print additional setup information.
+\makeatletter
+This document is compiled with \texengine,
+format version \fmtversion{} patch-level \patch@level{},
+and the L3 programming layer from \ExplFileDate{}.
+The Greek font encoding is \greekfontencoding{}
+and the language variant is \GreekLanguageVariant.
+\makeatother
+
+
\tableofcontents
@@ -134,6 +159,15 @@ The declaration \verb|\selectlanguage| switches between languages.
ἐρῶν άπῆλθες εὐθύς;
\end{quote}
+The command \verb|\foreignlanguage| sets its second argument in the language
+specified as first argument. This is intended for short text parts or
+single words like \foreignlanguage{greek}{Βιβλιοθήκη}.
+
+Input may use literal Greek characters (\foreignlanguage{greek}{α \ldots Ω}),
+LICR macros (\foreignlanguage{greek}{\textalpha{} \ldots{} \textOmega}),
+or (if the LGR font encoding is used) the Latin transliteration
+(\foreignlanguage{greek}{a \ldots{} W}).
+
\textbf{Warning: With 8-bit TeX, Latin letters and some symbols in the input
are mapped to Greek equivalents!}.
Without precautions, quotes copied from external sources (like this Wikpedia
@@ -146,15 +180,6 @@ entry about the question mark) may come out simply wrong:
\end{quote}
See section~\ref{Latin transliteration} for remedies.
-The command \verb|\foreignlanguage| sets its second argument in the language
-specified as first argument. This is intended for short text parts or
-single words like \foreignlanguage{greek}{Βιβλιοθήκη}.
-
-Input may use literal Greek characters (\foreignlanguage{greek}{α \ldots Ω}),
-LICR macros (\foreignlanguage{greek}{\textalpha{} \ldots{} \textOmega}),
-or the Latin transliteration (\foreignlanguage{greek}{a \ldots{} W}) defined
-by the LGR font encoding (if LGR is used).
-
There should be no inserted space before or after the language switch (this
may happen if there are unescaped linebreaks in the font or language
definitions):
@@ -266,30 +291,53 @@ ancient: \verb|\l@ancientgreek| = \the\l@ancientgreek
current: \verb|\l@greek| = \the\l@greek
\makeatletter
+\newcommand*{\sample}{%
+ \ensureascii{monotonic:} Ευρετήριο, επίσης, Απόδειξη, Θράκη, τραγωδία\\
+ \ifdefined \UnicodeEncodingName \else
+ \ensureascii{'' '' translit:} Euret'hrio, ep'ishs, Ap'odeixh, Jr'akh,
+ tragwd'ia\\
+ \fi
+ \ensureascii{polytonic:} Εὑρετήριο, ἐπίσης, Ἀπόδειξη, Θρᾴκη, τραγῳδία\\
+ \ifdefined \UnicodeEncodingName \else
+ \ensureascii{'' translit:} Eep'ishs, >Ap'odeixh, Jr'a|kh,
+ tragw|d'ia\\
+ \fi
+ \ensureascii{ancient:} Εὑρετήριον, ὡσαύτως, Ἀπόδειξις, Θρᾴκη, τραγῳδία%
+}
+
Greek paragraph:
-\begin{quote}
- \selectlanguage{greek}
- \showhyphenpar
- \ensureascii{monotonic:} Ευρετήριο, επίσης, Απόδειξη \\
- \ensureascii{polytonic:} Εὑρετήριο, ἐπίσης, Ἀπόδειξη \\
- \ensureascii{ancient:} Εὑρετήριον, ὡσαύτως, Ἀπόδειξις
-\end{quote}
+
+{
+ \selectlanguage{greek}
+ \showhyphenpar
+ \sample
+ \par % (new paragraph to end \showhyphenpar before leaving group)
+}
English paragraph with Greek text (\verb|\foreignlanguage{greek}|):
-\begin{quote}
- \showhyphenpar
- monotonic: \foreignlanguage{greek}{Ευρετήριο, επίσης, Απόδειξη } \\
- polytonic: \foreignlanguage{greek}{Εὑρετήριο, ἐπίσης, Ἀπόδειξη } \\
- ancient: \foreignlanguage{greek}{Εὑρετήριον, ὡσαύτως, Ἀπόδειξις}
-\end{quote}
-English paragraph with Greek script (\verb|\ensuregreek|): no hypenation
-\begin{quote}
- \showhyphenpar
- monotonic: \ensuregreek{Ευρετήριο, επίσης, Απόδειξη } \\
- polytonic: \ensuregreek{Εὑρετήριο, ἐπίσης, Ἀπόδειξη } \\
- ancient: \ensuregreek{Εὑρετήριον, ὡσαύτως, Ἀπόδειξις}
-\end{quote}
+\showhyphenpar
+\foreignlanguage{greek}{\sample}
+
+English paragraph with Greek script (\verb|\ensuregreek|):
+
+\showhyphenpar
+\ensuregreek{\sample}
+
+% Ancient Greek paragraph:
+%
+% {
+% \selectlanguage{ancientgreek}
+% \greekscript
+% \showhyphenpar
+% \sample
+% }
+%
+% !! Warning !!
+% After use of \verb|\selectlanguage{ancientgreek}| (set up with
+% \cs{babelprovide} in the preamble), Greek text in section headings
+% is written with the wrong font encoding in the ToC.
+
\section{Greek Numerals (\greeknumeral{1} \ldots{} \greeknumeral{999999})%
\label{sec:greek-numerals}}
@@ -467,27 +515,35 @@ the final output.
With the \texttt{keep-semicolon} language attribute, 003B SEMICOLON is made
active and inserts an \emph{erotimatiko} also with LGR encoded fonts, if the
-text language is set to Greek:
+text language is set to Greek
+(in this document, the semicolon is
+\ifnum\catcode59 = 13
+ active).
+\else
+ not active).
+\fi
-\begin{tabular}{lcccl}
- Input & \latinencoding{} & \greekfontencoding & Greek \\
+\begin{tabular}{lccc}
+ Input & \latinencoding{} & \greekfontencoding
+ & Greek language \\
003F QUESTION MARK & ? & \ensuregreek{?}
- & \foreignlanguage{greek}{?} \\
- \\
- 037E GREEK QUESTION MARK & ␣ & \ensuregreek{;}
- & \foreignlanguage{greek}{;}
- & not defined for T1 \\
+ & \foreignlanguage{greek}{?} \\
+ \\
+ 037E GREEK QUESTION MARK & {\footnotesize n/d} & \ensuregreek{;}
+ & \foreignlanguage{greek}{;} \\
003B SEMICOLON & ; & \ensuregreek{;}
- & \foreignlanguage{greek}{;} \\
+ & \foreignlanguage{greek}{;} \\
00B7 MIDDLE DOT & · & \ensuregreek{·}
- & \foreignlanguage{greek}{·} \\
+ & \foreignlanguage{greek}{·} \\
\end{tabular}
+{\footnotesize n/d}: character not defined in T1 encoding.
+
This attribute is ignored with Unicode fonts (where the SEMICOLON literal
always prints a semicolon character).
Test in math mode:
-\newcommand{\semicolontest}{ab; $a b; a\;b, (\mathrm{a;}\textrm{a;}2)$}
+\newcommand{\semicolontest}{$a b; a\;b, (\mathrm{a;}\textrm{a;}2)$}
English: \semicolontest, Greek: \foreignlanguage{greek}{\semicolontest}.
\subsubsection{LGR-proofed macros}
@@ -602,15 +658,14 @@ More test of the LGR-redefinitions are in \file{test-lgr-fixes.tex}.
\end{document}
\fi
+
\section{Up- and downcasing in Greek}
Capital Greek letters have diacritics (except the dialytika and sub-iota) to
the left (instead of above) and drop them in uppercase (except the
dialytika), e.g., \ensuregreek{μαΐστρος $\mapsto$ \MakeUppercase{μαΐστρος}}.
-For literal Greek characters and accent macros, these rules are implemented
-and tested in the required package \pkgref{greek-fontenc}.
-Tonos and dasia mark a \emph{hiatus} (break-up of a diphthong) if
+Tonos and psili mark a \emph{hiatus} (break-up of a diphthong) if
placed on the first vowel of a diphthong.
A dialytika must be placed on the second vowel if they are dropped, e.g.
%
@@ -620,8 +675,8 @@ A dialytika must be placed on the second vowel if they are dropped, e.g.
\'>\textalpha\textiota,
\'>\textalpha\textupsilon,
\accpsili\textalpha\textupsilon,
- \accdasiaoxia\textepsilon\textiota}%
-\ensuregreek{\HiatusLICR\ $\mapsto$ \MakeUppercase{\HiatusLICR}}.
+ \accpsilioxia\textepsilon\textiota}%
+\foreignlanguage{greek}{\HiatusLICR\ $\mapsto$ \MakeUppercase{\HiatusLICR}}.
Some affected words:
\begin{quotation}
@@ -634,9 +689,9 @@ Some affected words:
\aylos{} $\mapsto$ \MakeUppercase{\aylos},
% from http://diacritics.typo.cz/index.php?id=69
- \newcommand*{\maina}{%μάινα → ΜΑΪΝΑ
- \textmu\acctonos\textalpha\textiota\textnu\textalpha}
- \maina{} $\mapsto$ \MakeUppercase{\maina},
+ \newcommand*{\maine}{%μάινη → ΜΑΪΝΗ
+ \textmu\acctonos\textalpha\textiota\textnu\texteta}
+ \maine{} $\mapsto$ \MakeUppercase{\maine},
% from http://de.wikipedia.org/wiki/Neugriechische_Orthographie#Das_Trema
\newcommand*{\keik}{% κέικ → ΚΕΪΚ
@@ -651,134 +706,142 @@ Some affected words:
\newcommand*{\romeika}{\textrho\textomega\textmu
\acctonos\textepsilon\textiota\textkappa\textalpha}
\romeika{} $\mapsto$ \MakeUppercase{\romeika}.
-\end{quotation}
-
-With the pre-2022/06 \cs{MakeUppercase}, automatic upcasing of words with
-\emph{hiatus} works correctly only if the accents are input as macro and the
-letters as macro or via the Latin transliteration.
-With the current (2023/02/10) \cs{MakeUppercase}, it works for literal
-Unicode input and named accents. The \cs{uccode} changes are ignored.
+ % from Yannis Haralambous https://hal.science/hal-02101618
+ \newcommand*{\aute}{% ἀυτή → ΑΫΤΗ a cry, shout, esp. battle-shout
+ \accpsili\textalpha\textupsilon\texttau\acctonos\texteta}
+ \aute{} → \MakeUppercase{\aute}
+\end{quotation}
+The file \file{char-list.tex} in the \pkgref{greek-fontenc} package includes
+a comprehensive test of case changing for all supported Greek characters and
+their various input methods.
-\subsection{Iota subscript vs. iota adscript}
-Pre-composed capital letters with \emph{mute iota} decompose to the base
-letter and COMBINING GREEK YPOGEGRAMMENI (U+0345) even if they are named
-... WITH [... AND] PROSGEGRAMMENI for ``historic reasons''.%
-\footnote{cf. \href{https://opoudjis.net/unicode/unicode_adscript.html}
- {Nick Nicholas `Titlecase and Adscripts'}}
-Accordingly, the ``canonical'' LICR for capital letters with mute iota
-is the base character LICR followed by \verb|\ypogegrammeni|.
+\subsection{Problems and fixes}
-Compare letters followed by \verb|\prosgegrammeni| and
-\verb|\ypogegrammeni| with the pre-composed characters and with
-character + literal GREEK YPOGEGRAMMENI.
+\subsubsection{Input variants}
-prosgegrammeni:
-\begin{quotation}
- \selectlanguage{greek}
- \newcommand{\alphapros}{\textalpha\prosgegrammeni α\prosgegrammeni{} αι /
- \textAlpha\prosgegrammeni Α\prosgegrammeni{} ᾼΑι /
- \accpsili\textAlpha\prosgegrammeni Ἀ\prosgegrammeni{} ᾈἈι}
+Depending on the LaTeX version and input variant, there are several
+limitations and problems.
- \phantom{MakeUppercase} \alphapros
+With \cs{greekfontencoding} \greekfontencoding, LaTeX version \fmtversion,
+and language variant ``\GreekLanguageVariant'', we get
- \ensureascii{MakeUppercase} \MakeUppercase{\alphapros}
+\newcommand{\precomposed}{ῶ, ή, ΐ, ᾂ, άι}
+\newcommand{\translit}{{~w, 'h, '"i, >`a|, 'ai}}
+\newcommand{\acconLICR}{\~\textomega, \'\texteta, \'"\textiota,
+ \`>\textalpha\ypogegrammeni, \'\textalpha\textiota}
+\newcommand{\accontranslit}{{\~w, \'h, \'"i, \`>a|, \'ai}}
+\newcommand{\acconliteral}{\~ω, \'η, \'"ι, \`>ᾳ, \'αι}
- \ensureascii{MakeLowercase} \MakeLowercase{\alphapros}
-\end{quotation}
+pre-composed:
+\foreignlanguage{greek}{\precomposed\ → \MakeUppercase{\precomposed}}
-ypogegrammeni:
-\begin{quotation}
- \selectlanguage{greek}
- \newcommand{\alphaypo}{\textalpha\ypogegrammeni α\ypogegrammeni{} ᾳ /
- \textAlpha\ypogegrammeni Α\ypogegrammeni{} ᾼ /
- \accpsili\textAlpha\ypogegrammeni Ἀ\ypogegrammeni{} ᾈ}
+transliteration:
+\foreignlanguage{greek}{\translit\ → \MakeUppercase{\translit}}
- \phantom{MakeUppercase} \alphaypo
+accent macro + LICR:
+\foreignlanguage{greek}{\acconLICR\ → \MakeUppercase{\acconLICR}}
- \ensureascii{MakeUppercase} \MakeUppercase{\alphaypo}
+accent macro + transliteration:
+\foreignlanguage{greek}{\accontranslit\ → \MakeUppercase{\accontranslit}}
- \ensureascii{MakeLowercase} \MakeLowercase{\alphaypo}
-\end{quotation}
+accent macro + literal:
+\ifdefined \UnicodeEncodingName
+ \foreignlanguage{greek}{\acconliteral\ → \MakeUppercase{\acconliteral}}
+\else
+ → inputenc Error: Invalid UTF-8 byte sequence
+\fi
+\begin{itemize}
+\item The implementation of \cs{MakeUppercase}
+ introduced in the 2022/06 LaTeX release\footnote{cf.\
+ \href{https://www.latex-project.org/news/latex2e-news/ltnews35.pdf}%
+ {LaTeX News 35}}
+ works (almost) fine with pre-composed literal characters but there are
+ Unicode errors (unknown characters) under 8-bit TeX.
+ Fixed with LaTeX 2023, babel-greek 1.13 and greek-fontenc 2.3.
+
+\item The new \cs{MakeUppercase} did not drop
+ accents input as short accent macros or with the Latin transliteration.
+ Fixed with the 2023 LaTeX release, babel-greek~1.14, and
+ greek-fontenc~2.4.
+
+\item The \emph{hiatus} feature fails with the Latin transliteration.
+ Use accent macros, e.g., replace \verb|k'eik| with \verb|k\'eik|.
+
+ It also failed with pre-composed characters and LaTeX
+ versions older than 2022/06.%
+ \footnote{Some ``pro'' Unicode fonts provide this feature on their own,
+ cf. \href{http://multilingualtypesetting.co.uk/blog/greek-typesetting-tips/}%
+ {Greek typesetting without the tears}}
+
+% \item With \emph{babel-greek} versions up to 1.11, using the tilde for the
+% \emph{perispomeni} accent inside \verb|\MakeUppercase| led to
+% \texttt{inputenc Error: Invalid UTF-8 byte "9F}.%
+% \footnote{even without loading \emph{inputenc} and with
+% \cs{UseRawInputEncoding}, cf.
+% \href{https://www.latex-project.org/news/latex2e-news/ltnews28.pdf}%
+% {LaTeX News 28}}
-\subsection{Changed uccode/lccode values for LGR}
+\end{itemize}
-LGR encoded fonts define ligatures for characters with diacritics. To enable
-correct upcasing, \emph{babel-greek} changes the uc/lccodes of some
-characters. Characters used to input diacritics are mapped to the ``empty''
-character 0x9f = 159.
+\subsubsection{Particuliarities of the Latin Transliteration}
-To minimise side-effects (see below), uc/lccodes are only changed:
+To enable correct upcasing of the ``Latin transliteration'',
+\emph{babel-greek} changes the uppercase
+equivalent of some characters with special meaning in LGR.
+To minimise side-effects, this is done:
\begin{itemize}
- \item if \cs{greekfontencoding} is a ``short macro'' expanding to LGR,%
- \footnote{i.e. not in documents using Unicode fonts unless
- \cs{greekfontencoding} is explicitly set to \texttt{LGR} before
- loading \emph{babel-greek}}
- \item if the LaTeX version is older than 2022/06, as \cs{uccode}s are ignored
- by the \cs{MakeUppercase} implementation introduced in this version,
- \item for accents that are actually required in the selcected language
- variant (i.e. only for the \emph{tonos}, if the language variant
- is the default ``monotonic''.
-\end{itemize}
-
-With \cs{greekfontencoding} \greekfontencoding, LaTeX version \fmtversion,
-and language variant ``\GreekLanguageVariant'' we get for
-dialytika\footnote{%
- Unless followed by a to-be accented vowel, the quotation mark \texttt{"}
- is converted to an upper right apostrophe by LGR.},
-sub-iota, tonos/oxia, varia, psili, and dasia:
+\item only if \cs{greekfontencoding} is a ``short macro'' expanding to LGR,
+ i.e.\ not in documents using Unicode fonts
+ (unless \cs{greekfontencoding} is explicitly set to \texttt{LGR}
+ before loading \emph{babel-greek}),
+\item only for diacritics that are actually required in the selected language
+ variant (i.e.\ only for the \emph{tonos} \texttt{'},
+ if the language variant is the default \texttt{monotoniko}),
+\item not for the characters ``v'' (zero-width space) and ``c'' (final sigma).
+ Use \verb|\textcompwordmark| instead of \texttt{v} and autosigma
+ (\texttt{s}) instead of \texttt{c} in text parts that could/should
+ become upcased, e.g., \lgrfont{a\textcompwordmark us $\mapsto$
+ \MakeUppercase{a\textcompwordmark us}}
+ not \lgrfont{avuc $\mapsto$ \MakeUppercase{avuc}}.
-\newcommand{\AccentCharacters}{" | ' ` > <}
-\begin{quote}
- \selectlanguage{greek}
- \AccentCharacters{} $\mapsto$ \MakeUppercase{\AccentCharacters}
-\end{quote}
+\end{itemize}
+Since version 1.13.2, \emph{babel-greek} utilises \cs{DeclareUppercaseMapping}
+(a LaTeX kernel command, new in 2023) for the required change.
+For LaTeX version older than 2022/06, the \cs{uccode} is set to
+the ``empty'' character 0x9f = 159.
\emph{Composite command} definitions ensure that combined accents
also work for accent characters ``upcased'' to the charcter
-No 159 = 0x9f):
-
-\newcommand{\CombinedAccentSample}{
+No 159 = 0x9f:
+\newcommand{\CombinedAccentSample}{%
\ifdefined \UnicodeEncodingName
- % TODO: combined accents swallow whitespace after base char
- % unless protected
\"'υ{} \"`υ{} \`"υ{} \'"υ{} \`<α{} \'<α{}
\else
\"'u \"`u \`"u \'"u \` <}
+With font encoding \greekfontencoding, LaTeX version \fmtversion,
+and language variant ``\GreekLanguageVariant'', we get for
+\texttt{\AccentCharacters} (dialytika\footnote{%
+ Unless followed by a to-be accented vowel, the quotation mark \texttt{"}
+ is converted to an upper right apostrophe by LGR.},
+sub-iota, tonos/oxia, varia, psili, and dasia):
\begin{quote}
\selectlanguage{greek}
- \greektext
- ~u \~u \accperispomeni{u} $\mapsto$ \MakeUppercase{~u \~u \accperispomeni{u}}
+ \AccentCharacters{} $\mapsto$ \MakeUppercase{\AccentCharacters}
\end{quote}
-
The changed uc/lccodes have strange effects on Latin text parts
in Greek paragraphs if only the encoding is switched:
\begin{quote}
@@ -790,14 +853,51 @@ in Greek paragraphs if only the encoding is switched:
Let's see: \AccentCharacters{} $\mapsto$
\MakeUppercase{Let's see: \AccentCharacters}}
\end{quote}
-%
-To limit the effect on, e.g., section headings (which are printed
-capitalised with the ``headings'' style), uccodes for ``v''
-(zero-width space) and ``c'' (final sigma) are not changed.
-Use \verb|\textcompwordmark| instead of \texttt{v} and autosigma
-(\texttt{s}) instead of \texttt{c} in text parts that could/should
-become upcased, e.g., \lgrfont{a\textcompwordmark us $\mapsto$
-\MakeUppercase{a\textcompwordmark us}}
-not \lgrfont{avuc $\mapsto$ \MakeUppercase{avuc}}.
+
+\subsubsection{Iota subscript vs. iota adscript}
+
+Unicode decomposes letters with \emph{mute iota}
+(GREEK CAPITAL LETTER ... WITH [... AND] PROSGEGRAMMENI)
+to the base letter and a COMBINING GREEK YPOGEGRAMMENI (U+0345).%
+\footnote{They are named ... WITH PROSGEGRAMMENI
+ for ``historic reasons''
+ (cf. \href{https://opoudjis.net/unicode/unicode_adscript.html}
+ {Nick Nicholas \emph{Titlecase and Adscripts}}).}
+Accordingly, the ``canonical'' LICR for all pre-composed letters with
+mute iota is the base character LICR followed by \verb|\ypogegrammeni|.
+
+The appearance in the output and upcasing results depend on the chosen font
+and LaTeX version.
+Compare letters followed by \verb|\ypogegrammeni| with pre-composed
+characters
+\begin{quotation}
+ \selectlanguage{greek}
+ \newcommand{\alphaypo}{\textalpha\ypogegrammeni α\ypogegrammeni{} ᾳ /
+ \textAlpha\ypogegrammeni Α\ypogegrammeni{} ᾼ /
+ \accpsili\textAlpha\ypogegrammeni Ἀ\ypogegrammeni{} ᾈ}
+
+ \phantom{MakeUppercase} \alphaypo
+
+ \ensureascii{MakeUppercase} \MakeUppercase{\alphaypo}
+
+ \ensureascii{MakeLowercase} \MakeLowercase{\alphaypo}
+\end{quotation}
+
+and letters followed by \verb|\prosgegrammeni|
+with literal character + literal GREEK YPOGEGRAMMENI:
+\begin{quotation}
+ \selectlanguage{greek}
+ \newcommand{\alphapros}{\textalpha\prosgegrammeni α\prosgegrammeni{} αι /
+ \textAlpha\prosgegrammeni Α\prosgegrammeni{} Αι /
+ \accpsili\textAlpha\prosgegrammeni Ἀ\prosgegrammeni{} Ἀι}
+
+ \phantom{MakeUppercase} \alphapros
+
+ \ensureascii{MakeUppercase} \MakeUppercase{\alphapros}
+
+ \ensureascii{MakeLowercase} \MakeLowercase{\alphapros}
+\end{quotation}
+
+See also the \href{https://www.unicode.org/faq/greek.html#6}{Unicode FAQ}.
\end{document}
diff --git a/macros/latex/contrib/readablecv/ReadableCV.cls b/macros/latex/contrib/readablecv/ReadableCV.cls
index a6fbe38354..8e30cb7a56 100644
--- a/macros/latex/contrib/readablecv/ReadableCV.cls
+++ b/macros/latex/contrib/readablecv/ReadableCV.cls
@@ -1,5 +1,5 @@
-%% ReadableCV
-%% Copyright 2021 Philip Stone
+%% ReadableCV 4
+%% Copyright 2023 Philip Stone
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -16,8 +16,8 @@
% This work consists of the files ReadableCV.cls and ReadableCV.tex
\NeedsTeXFormat{LaTeX2e}
-\def\ClassDate{2021/01/09}
-\def\ClassVersion{3.0}
+\def\ClassDate{2023/08/19}
+\def\ClassVersion{4.0}
\ProvidesClass{ReadableCV}[\ClassDate ReadableCV \ClassVersion class written by Philip Stone]
\DeclareOption{twocolumn}{\OptionNotUsed}
@@ -429,7 +429,7 @@
% \vspace{\baselineskip}
}
-\newcommand{\addSkills}[9]{
+\newcommand{\addSkills}[8]{
\def\sone{#1}
\def\stwo{#2}
\def\sthree{#3}
@@ -438,9 +438,9 @@
\def\ssix{#6}
\def\sseven{#7}
\def\seight{#8}
- \def\snine{#9}
+ %\def\snine{#9}
- \begin{multicols}{3}
+ \begin{multicols}{2}
\begin{itemize}
\ifdefempty{\sone}{}{\item \sone}
\ifdefempty{\stwo}{}{\item \stwo}
@@ -450,7 +450,7 @@
\ifdefempty{\ssix}{}{\item \ssix}
\ifdefempty{\sseven}{}{\item \sseven}
\ifdefempty{\seight}{}{\item \seight}
- \ifdefempty{\snine}{}{\item \snine}
+ % \ifdefempty{\snine}{}{\item \snine}
\end{itemize}
\end{multicols}
}
@@ -493,6 +493,30 @@
\end{samepage}
}
+\newcommand{\newQuickRole}[3]{
+ % This displays the whole of the role information
+ % including dates [1], job title [2],
+ % company name [3]
+
+ \vspace{0.5em}
+ \begin{samepage}
+ \iftoggle{jobfirst}{
+ % Display job before company
+ \noindent\begin{tabular}{@{}p{3cm} l}
+ \textbf{#1} & \textbf{#2}\\
+ & \textbf{#3}\\
+ \end{tabular}
+ }
+ {
+ % Display company before job
+ \noindent\begin{tabular}{@{}p{3cm} l}
+ \textbf{#1} & \textbf{#3}\\
+ & \textbf{#2}\\
+ \end{tabular}
+ }
+ \end{samepage}
+}
+
\newcommand{\roleResponsibilities}[5]{
% Adds up to five responsibilities in an itemized list
\vspace{\baselineskip}
@@ -527,7 +551,7 @@
\def\afive{#5}
\def\asix{#6}
-% \begin{samepage}
+ %\begin{samepage}
\vspace{-0.5em}
\noindent\sffamily{\textit{Achievements}}\rmfamily
\vspace{-1em}
@@ -552,13 +576,15 @@
\iftoggle{jobfirst}{
% Display job before company
\begin{tabular}{@{}p{3cm} l}
- \textbf{#1} & \textbf{#2} (#3)\\
+ \textbf{#1} & \textbf{#2}\\
+ & #3\\
\end{tabular}
}
{
% Display company before job
\begin{tabular}{@{}p{3cm} l}
- \textbf{#1} & \textbf{#3} (#2)\\
+ \textbf{#1} & \textbf{#3}\\
+ & #2\\
\end{tabular}
}
}
@@ -597,4 +623,4 @@
% Finish letter image of signature and your name
\newcommand{\closeletter}[1]{%
\includegraphics{#1}\\ \bigskip \rcvname
-}
\ No newline at end of file
+}
diff --git a/macros/latex/contrib/readablecv/ReadableCV.pdf b/macros/latex/contrib/readablecv/ReadableCV.pdf
index 63c79940e7..36c7bdb252 100644
Binary files a/macros/latex/contrib/readablecv/ReadableCV.pdf and b/macros/latex/contrib/readablecv/ReadableCV.pdf differ
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb b/systems/texlive/tlnet/tlpkg/texlive.tlpdb
index 3f649a6c5a..2b2827514e 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb
@@ -26,11 +26,11 @@ depend container_split_src_files/1
depend frozen/0
depend minrelease/2016
depend release/2023
-depend revision/67975
+depend revision/67987
name 00texlive.image
category TLCore
-revision 67974
+revision 67987
shortdesc TeX Live files only in the source repository
longdesc The files here are not copied by the installer and containers
longdesc are not built for them; they exist only in the source
@@ -29775,7 +29775,7 @@ catalogue-version 2.13
name babel-greek
category Package
-revision 67268
+revision 67985
shortdesc Babel support for the Greek language and script
relocated 1
longdesc The bundle provides comprehensive support for the Greek
@@ -29784,11 +29784,11 @@ longdesc select between the monotonic (single-diacritic), polytonic
longdesc (multiple-diacritic), and ancient orthography of the Greek
longdesc language. Included are the packages grmath for Greek function
longdesc names in mathematics, and athnum for Attic numerals.
-containersize 6912
-containerchecksum 1184ea2de3eeb3dec5df62b2d401e343863a13cdee98a37a207d24043db3d5a3a507343c7104067ca3e02dde010727af6c49e177a6faee5e7ccc3bd4ae7ecf90
-doccontainersize 1682388
-doccontainerchecksum f12285bf43d3028b201d88ec2dcc811176d89e55400a2987d3a79f828b15fa0aa4bbfd217c45088342d08a60c25008c3d162924fad91fe44e68ae5e78e653fd5
-docfiles size=462
+containersize 7004
+containerchecksum e00505b6fd27e227d00b688eaed59c4a1fb99b9b3c8f7a18e48aee8799f92f874f103477d75df5dd0e2d43fa26fc1eca6e5d4fc18541180abebc1674c9112c1c
+doccontainersize 1705812
+doccontainerchecksum e7f20794c6cdcb2175ad9196180582d174cb7edb28689b304d8184f56d3a73e2e48608a482300ff6dd956f0a7801e015ea017557df698130f5deb7c232240fd0
+docfiles size=466
RELOC/doc/generic/babel-greek/README.md details="Readme"
RELOC/doc/generic/babel-greek/athnum.pdf
RELOC/doc/generic/babel-greek/babel-greek-doc.html details="Documentation (HTML)"
@@ -29797,7 +29797,6 @@ docfiles size=462
RELOC/doc/generic/babel-greek/grmath.pdf
RELOC/doc/generic/babel-greek/test-athnum.pdf
RELOC/doc/generic/babel-greek/test-athnum.tex
- RELOC/doc/generic/babel-greek/test-case-changing.tex
RELOC/doc/generic/babel-greek/test-greek-8bitcompat.tex
RELOC/doc/generic/babel-greek/test-greek-ini.tex
RELOC/doc/generic/babel-greek/test-greek.pdf
@@ -29806,8 +29805,8 @@ docfiles size=462
RELOC/doc/generic/babel-greek/test-lgr-fixes.tex
RELOC/doc/generic/babel-greek/usage.pdf
RELOC/doc/generic/babel-greek/usage.tex
-srccontainersize 24712
-srccontainerchecksum 26f9f92fa30a3c04511fd6ad9e03d1bbdaa2c8b1dc6a3936e5f90a6d71c1870c5ea5bf8eeb4280b030ac9d1b620784da64bc824238857e4f464e15285d9bd742
+srccontainersize 25008
+srccontainerchecksum d00eea3cf4d940c4a6fa1925f4ba0073c4046feac8b1e265205e1723314e60e4a42aeb8b5b695ae028c7f3103eb22915e88a5b5f570134eebbfb5c9154d2bb3d
srcfiles size=26
RELOC/source/generic/babel-greek/athnum.dtx
RELOC/source/generic/babel-greek/babel-greek.dtx
@@ -29822,7 +29821,7 @@ catalogue-contact-repository https://codeberg.org/milde/greek-tex
catalogue-ctan /macros/latex/contrib/babel-contrib/greek
catalogue-license lppl1.3
catalogue-topics greek multilingual-addon
-catalogue-version 1.13.2
+catalogue-version 1.14
name babel-hebrew
category Package
@@ -89027,7 +89026,7 @@ catalogue-version 1.1.0
name cweb
category Package
-revision 67845
+revision 67979
catalogue cwebbin
shortdesc CWEB for ANSI-C/C++ compilers
longdesc A highly portable and extended version of Levy/Knuth CWEB 3.64c
@@ -89045,10 +89044,10 @@ longdesc version and adding new features from CWEBbin. As of November
longdesc 2019 CTAN no longer holds a copy of this material. Please go to
longdesc the package's github repository for more information.
depend cweb.ARCH
-containersize 24544
-containerchecksum 347dbd17afdfe45a2bfad91afd0eb8737752b9a0f210c3607c196e006bd84f8e1563c4c5ba5fcc06d32a6b6768acd31c54c3c85e51fd9cb49718e917b7fd835d
-doccontainersize 73548
-doccontainerchecksum 2fa3239d34d736473cf94543c8856a936271d3c5a8122ca1c98686283397e5141e73dac9b0200f5fbdeaf2180ba5b993dbee24ae8ea3369cbc9b5bc2f6665c99
+containersize 24552
+containerchecksum 50206f4516a4fb7fb67bc2aa007b3f4b1cdc4b5091efe80732760bbcd19984d6989ec2a4f1a8a8902037a3a4f936e24d72b052b5432f8af0ddf8619ab597fb63
+doccontainersize 73552
+doccontainerchecksum 294f7de0936e5cf35db702bd49953f727239525be9ea9739db73eda1986021bc8f298c9b103b86677fcaddd51c3a562dc6b721adaea4ecc217c158f9055cdb85
docfiles size=64
texmf-dist/doc/man/man1/ctangle.1
texmf-dist/doc/man/man1/ctangle.man1.pdf
@@ -195726,20 +195725,20 @@ catalogue-version 1.2a
name luacolor
category Package
-revision 57829
+revision 67987
shortdesc Color support based on LuaTeX's node attributes
relocated 1
longdesc This package implements color support based on LuaTeX's node
longdesc attributes.
-containersize 4152
-containerchecksum 39252eb36291bf6023e8ab24e7f4cbca10caa9d89204e8e80a5962b08e66c6ba5b588e98d17f9b13be3a52fb5c392499ebb73ded2e43a4ce7ccad4cf30a24302
-doccontainersize 328240
-doccontainerchecksum 4aeb524631531e6d18decde7b01acae4aaaee8f80392da87a2e7fadec9d353749b2d1dc65573ce2f184c24494ba340589fb83203ffcd49271e05dcbb79a1fd19
-docfiles size=82
+containersize 4164
+containerchecksum 142376345f25de68236e56fd334d8f24af90f510abc0d2314049bb03142df76988cd5451e22cf98df4443348f7686bbf9c269e311d5036cf8ae621200ae585ba
+doccontainersize 344248
+doccontainerchecksum d6654c3ac1ca1c18cc60cea463cc3b4b4ed902ba6c29521883079123b9906f089ed25e2268e7a1f92800d9b1158225b50c0b019ea28c68b846e73bcb350dee6a
+docfiles size=88
RELOC/doc/latex/luacolor/README.md details="Readme"
RELOC/doc/latex/luacolor/luacolor.pdf details="Package documentation"
-srccontainersize 9244
-srccontainerchecksum 93d7f9ac094612760c7cbaa1b591dee5f31f8278f462808a484311e2ba6dd6a20671e7431e7f22985a7f77e23436eefe02484026820d4b125a7a1b4b9d6becbc
+srccontainersize 9328
+srccontainerchecksum 8b29907f0e0d865704e5de710ac2dd37607330d66a4282ff1f4673306be40ce366a0c2eccdf4dd25c3592e804cd6fa1e2a35044c494c4a3c73e64bd0c264d102
srcfiles size=9
RELOC/source/latex/luacolor/luacolor.dtx
runfiles size=4
@@ -195750,7 +195749,7 @@ catalogue-contact-repository https://github.com/ho-tex/luacolor
catalogue-ctan /macros/latex/contrib/luacolor
catalogue-license lppl1.3
catalogue-topics colour luatex
-catalogue-version 1.17
+catalogue-version 1.18
name luacomplex
category Package
@@ -270678,16 +270677,16 @@ catalogue-version 1.11
name readablecv
category Package
-revision 61719
+revision 67986
shortdesc A highly readable and good looking CV and letter class
relocated 1
longdesc This class provides, what I have found, to be an extremely
longdesc attractive and highly readable CV which will lead to your CV
longdesc being read rather than disgarded.
-containersize 3884
-containerchecksum ca024cf78918406ca68a750832bf4046b22ca36cbd8ad7784cc2cc9aef6440de43c7d5c38aea95d738ec1f67685f02e1fd37440dc90d76046ee663cc475a187f
-doccontainersize 207540
-doccontainerchecksum c7b793994b11ae49bc93c8b39c0e257c24c54ebf19026db125ff1ae236f9b8443290b31443baff3a587fff073259621b001a75b0bb4f8f4e4963245f7c739019
+containersize 3948
+containerchecksum bfbc2764d56277d9a215d4366f812e53361faabd136ae86ae8152ab763742f51d27e9b61bf4a1d42fe2f14a90d5d3d0cf6cb513b3c6f5990ad34abeb26c22d44
+doccontainersize 207192
+doccontainerchecksum 6a337934b2f52cc8543ac0bee5dd52d2deff2e3fbf192977937c8331134227d816c846845923ead87615ddc117b44fb141239024e766e17e1896cfa1c4afbb05
docfiles size=57
RELOC/doc/latex/readablecv/README.md details="Readme"
RELOC/doc/latex/readablecv/ReadableCV.pdf details="Package documentation"
@@ -270700,7 +270699,7 @@ catalogue-contact-home https://www.typewithtex.com
catalogue-ctan /macros/latex/contrib/readablecv
catalogue-license lppl1.3
catalogue-topics class cv
-catalogue-version 3.0
+catalogue-version 4.0
name readarray
category Package
@@ -314859,7 +314858,7 @@ docfiles size=376
name texlive-scripts
category TLCore
-revision 67964
+revision 67977
shortdesc TeX Live infrastructure programs
longdesc Includes install-tl, tl-portable, rungs, etc.; not needed for
longdesc tlmgr to run but still ours. Not included in tlcritical.
@@ -314868,9 +314867,9 @@ depend texlive.infra
execute addMap mathpple.map
postaction shortcut type=menu name="TeX Live command-line" cmd=TEXDIR/tlpkg/installer/tl-cmd.bat
containersize 114124
-containerchecksum 24a2ae4a4bcb727aad0b2388521b560a74221002f8f809e3602940b88899a3a1ac1aacefa9991796409325f744dfefaa82382313c5274ff19ae2ed73874d68e7
-doccontainersize 428768
-doccontainerchecksum 6d68a0bf6c2f5cd4933556ed082a40890f139ffda4a2a15cc5cae73c556b4c2684bcd5f75bb0ff553150d3e2ea39fc4a31d2b0e7a01de85fa5d6d3b9b5390cc7
+containerchecksum d85270241c544a77697d2d7a10c7e2c9f95f7cd3a1174d99b9f77dac1c22cde732ea8e6a4007995289af8975c098e5ff51203381fde441434634450eee24a5f7
+doccontainersize 428724
+doccontainerchecksum f832853d2be50b682c0b8ee27d65240a961bf2830c0058209f6a3c907d16235c29cacc041c4ded5d09207719e079e0beeea3656ced9f7dcb466dffaa2b1eac34
docfiles size=549
doc.html
texmf-dist/doc/man/man1/fmtutil-sys.1
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5 b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
index 7603c7f578..40bcde0a4f 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
@@ -1 +1 @@
-63e378597b51e45e6b48d57d2b0637e7 texlive.tlpdb
+0965219b6c63f7e733591cedbbb70c51 texlive.tlpdb
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512 b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
index 3a20eaec28..25d426573d 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
@@ -1 +1 @@
-c34c0aa7781cc59d2b3f63ea5f16acf20ff2b3d0236eb17f581e0a594b04e7040ea2daf84a70de7562d4d302bd10b25b70c3362588970202d6ebe25a12f8c747 texlive.tlpdb
+50753ec5322dab923160a11cb23e6bbfdd36298b3655c21b17b3cb970a19f978567d94c71c0a7cf52e8a1c5e93f681a98a55e55aed5ef2b0b51a14437ed80d9c texlive.tlpdb
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
index c43da5a3f0..0a2f8fd912 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
@@ -1,11 +1,11 @@
-----BEGIN PGP SIGNATURE-----
-iQEzBAEBCgAdFiEE2PL4YFeoV+QqiBBqTOGHfhlDjHAFAmTgAmwACgkQTOGHfhlD
-jHAktQf/Rz4MrE0EaPJNP79xexl56sqWsN3otYJaebitpL40PevSCXQCCJtMtiIr
-XYqIy6WcyH1AAWvaVxvFaDQEztzETXi1i5EBK89SIiO+Hh91zmYzLOgo4DN6swUH
-YJb20huuFB8myLaAFsK+TGmBFJH5PugNvUgPufvJPXBPW9TqC4ehFkWPXsq+BEFq
-a1FIT8zXi2oZr1/K2L59VBzbg1IzXX8+eM7VDffibyTczA8TDJ1oQ280MkYDbd72
-b40gtnVo1Hu+HpOQtuHp7Au0uzln437CB3UXB33ZCGvQ6Zi5nfHBdYk8GujUlxof
-HGNhD6dHTHLgihm9V1uti4GMlnNcVw==
-=flXk
+iQEzBAEBCgAdFiEE2PL4YFeoV+QqiBBqTOGHfhlDjHAFAmThVSUACgkQTOGHfhlD
+jHA0Ogf8C9ufsvQi8bKDmS5NMujeKgRw/0Xf3sW+QEq1I7ipu8wuVFLpg5AJb735
+oQebnijmYYck/H4lN2PNaI9NbEbSid+rkuCOPj8umjz7ggMQ/a6NIBTPxvCWg1w2
+Wmbd4v50CmICxM4YlVivRV3etAsYcrZdL+Oa2pQs4nDWcpuJSkL5NpUMZyjy/UOk
+MtPo+qXLQ724NqAd3QT+NTTZK08m7TULeR5fAUeinsDSu25BJfFadwD/ZTkSCuoO
+fkyCGZMWgocZUv2lOK2fDx39O539QzduAH0Mg7DP2+tdbmzJsDCijOx8sdxc8F2C
+sI3X14asqmqz0O9oDlI6rqYPVl5FUg==
+=NOik
-----END PGP SIGNATURE-----
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
index f499c7d27c..b7ac7d4e72 100644
Binary files a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz and b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz differ
diff --git a/systems/win32/miktex/tm/packages/files.csv.lzma b/systems/win32/miktex/tm/packages/files.csv.lzma
index 17b1a1e54e..cf9ab94c7f 100644
Binary files a/systems/win32/miktex/tm/packages/files.csv.lzma and b/systems/win32/miktex/tm/packages/files.csv.lzma differ
diff --git a/systems/win32/miktex/tm/packages/next/files.csv.lzma b/systems/win32/miktex/tm/packages/next/files.csv.lzma
index 3233e8e4e5..9fef00bcf8 100644
Binary files a/systems/win32/miktex/tm/packages/next/files.csv.lzma and b/systems/win32/miktex/tm/packages/next/files.csv.lzma differ
diff --git a/systems/win32/miktex/tm/packages/next/pr.ini b/systems/win32/miktex/tm/packages/next/pr.ini
index b4b16ff78e..a8e7deabec 100644
--- a/systems/win32/miktex/tm/packages/next/pr.ini
+++ b/systems/win32/miktex/tm/packages/next/pr.ini
@@ -1,13 +1,13 @@
[repository]
-date=1690545662
+date=1692469259
lastupd=miktex-zzip-bin-x64-2.9 miktex-zlib-bin-x64-2.9 miktex-yap-bin-x64-2.9 miktex-xml2pmx-bin-x64 miktex-xetex-bin-x64-2.9 miktex-web-bin-x64-2.9 miktex-uriparser-bin-x64-2.9 miktex-upmendex-bin-x64 miktex-ttf2pk2-bin-x64-2.9 miktex-texworks-bin-x64-2.9 miktex-texware-bin-x64-2.9 miktex-texify-bin-x64-2.9 miktex-tex4ht-bin-x64-2.9 miktex-tex2xindy-bin-x64-2.9 miktex-tex-bin-x64-2.9 miktex-teckit-bin-x64-2.9 miktex-tdsutil-bin-x64 miktex-synctex-bin-x64-2.9 miktex-runtime-bin-x64-2.9 miktex-ptex-bin-x64
-lstdigest=cacde0bda63a131621313baaa534abd4
-numpkg=6706
+lstdigest=c99a7e731bf95f23786c39f051b45c68
+numpkg=6769
relstate=next
-version=8609
+version=8631
;;;;This configuration file is signed by a MiKTeX maintainer. The signature follows.
;;;;-----BEGIN MIKTEX SIGNATURE-----
-;;;; signature/miktex: AI+30B+ukWI4BsWg03++AGt1DLHuks/6PX/0F8FqPhDrtonRf1wxoZys1WyjxACkrlNFDn5mX57aZJShLkKYers5bXFOEcam4/vemFQavTV83TCZ/lafX1xYumVvqZ7M94gds0ObP8P3tkGOmwX25uFR6W7LcYAoHOSbLv06i/AzVDE+wYZxyloT8AfGAAUqgmY8u7d30i+4Ap71/0ovUVB4Ld1W+BWJjMIwVqruyM7LpryCWoP1AVN68ErwY9iOQ1EmhSS+tzEjPdHzMbpV1GjG1y/jAUrPUn7g9u4G86Ph7M81U8CObURs6fAMrX/cmy3FZnfFsZGSIYQRvmOSZw==
+;;;; signature/miktex: k60kb4JbLpPWhWxtgkKHmMmJOVlV+Fnm6jMOPYMIc2ISwl0KuGcsJavUSQ7onFlhy0ytTD9f6MmZU4PGX5t8NzKQjYgVyNqiY4eTvYHTqPyWrMpYfXkfFpzSCdGI4oCjXZeawvZFBOB3teaBPngWN7acEWlJkSGfrmvVQHIFZLHZ+7u7i716JvnIak37H4kvZdAZUfHnyKa8sIsJ4WYj1xLE6elUYhfQHWJYC/pawWoYCFxhW+1Vu2J2833jLZFfxjHebrYKSJ13gP/eWOxp8wzd62+mPa/xkLGp1Sez64et8tYWNl/EULVur61KIFlP5wKK2m2ndd/ghfJ0xHCzsA==
;;;;-----END MIKTEX SIGNATURE-----
diff --git a/systems/win32/miktex/tm/packages/pr.ini b/systems/win32/miktex/tm/packages/pr.ini
index dae600dfe9..c6be2141c7 100644
--- a/systems/win32/miktex/tm/packages/pr.ini
+++ b/systems/win32/miktex/tm/packages/pr.ini
@@ -1,13 +1,13 @@
[repository]
-date=1690545625
-lastupd=hyphenex__source hyphenex typeoutfileinfo__source typeoutfileinfo__doc typeoutfileinfo yamlvars__source yamlvars__doc yamlvars xcharter__source xcharter__doc xcharter tikz3d-fr__source tikz3d-fr__doc tikz3d-fr tikz-nfold__source tikz-nfold__doc tikz-nfold tidyres__source tidyres__doc tidyres
-lstdigest=d2faac3518324868730e3537b208fb00
-numpkg=6706
+date=1692469140
+lastupd=zref-vario__source zref-vario__doc zref-vario zref-clever__source zref-clever__doc zref-clever zref-check__source zref-check__doc zref-check xpunctuate__source xpunctuate__doc xpunctuate xkcdcolors__source xkcdcolors__doc xkcdcolors xindex__source xindex__doc xindex writeongrid__source writeongrid__doc
+lstdigest=5ca73f1fb3cfdc806c9259cd72f8adf1
+numpkg=6769
relstate=stable
-version=8609
+version=8631
;;;;This configuration file is signed by a MiKTeX maintainer. The signature follows.
;;;;-----BEGIN MIKTEX SIGNATURE-----
-;;;; signature/miktex: w4EzHygpsAc+4W1tO1UEBxvT7yRWT++U0lrs9fB5DyKEnlKBEjn2I8QyZ0nnffLpG2JAbhIT3HtIm03F+clK3U/DkGBmlBugMGHnArwXNyM81XGau4KTaBILyOumprn9RYdIdn2gsE9KvzRHMtRs3OeHIKRUvsZBeiMCs7Aw8Omw/Sz5xTK20IAeTT8a8l1mc/Q6J6sEnYuuUmVIjSemezvE+nygqUGlvFAQSsQvT+vhQ4VJce4Yc9amQgulsgnWMv7tb/WVJ9ucWEewZlRX3Lxl5xWth/f/yGVasKg4BrXJd7JOQeBELVSgcISx6/Dmr3atlLMAW0Xq1vbe0MMrNw==
+;;;; signature/miktex: a/kRzcYUz8vRMOmCHd2T+/6zRLanlQLiT34Df8Owji9tG/wGy20spa9hWO0n2WV6qRg3kVMM1c8XwQOjzLgptTuMBW8yJdYrcEN5Q75t8cgx1X2wx+VPgkgvjZyonZ0UJvPdR2EKqBMf4kfbl6V1GaqfeiiGWL8RHNbkfKaBW0SGTvttoio/brSCFzU1EznIITvmPgfQlBXHPxPp0YqUVgoS0Ww3l7NAXGMXe1t0qdnZB7TX1bLrLlgwb2qG/z18fJiFUSyKyJjvlTmVw1noqeFPglYS1K57HDcCKpXlaxlK6VLNA5Mopz1I2tXfXnxReAzGvsBjWxf0aHz/DYxMhg==
;;;;-----END MIKTEX SIGNATURE-----
diff --git a/timestamp b/timestamp
index 96c7ab50ae..73ccfc37dd 100644
--- a/timestamp
+++ b/timestamp
@@ -2,4 +2,4 @@
# The source CTAN of this site's material:
dante.ctan.org
# The year-month-day-hour-minute of this site's material:
-2023-08-19-02-02
+2023-08-20-02-02
diff --git a/web/c_cpp/cweb/Makefile b/web/c_cpp/cweb/Makefile
index e3db8819c6..c547ef9154 100644
--- a/web/c_cpp/cweb/Makefile
+++ b/web/c_cpp/cweb/Makefile
@@ -1,6 +1,6 @@
# This file is part of CWEB.
# It is distributed WITHOUT ANY WARRANTY, express or implied.
-# Version 4.8 --- June 2022
+# Version 4.10 --- August 2023
# Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
@@ -203,3 +203,8 @@ tarfile: $(ALL) examples
tarball:
tar zcvhf /tmp/cweb.tgz $(ALL) examples
+
+ctan:
+ git archive -o ~/cweb-4.10.zip --prefix=cweb/ cweb-4.10
+ make PDF=pdf usermanual
+ cd ..; zip -r ~/cweb-4.10.zip cweb/cwebman.pdf
diff --git a/web/c_cpp/cweb/comm-bs.ch b/web/c_cpp/cweb/comm-bs.ch
index b5e1d21b9b..ac2e26e9bd 100644
--- a/web/c_cpp/cweb/comm-bs.ch
+++ b/web/c_cpp/cweb/comm-bs.ch
@@ -15,8 +15,8 @@ by using "huge" pointers.
(Update attempt by Andreas Scherer, 31 Jan 2021. Good luck!)
-@x Section 9.
- for section names */
+@x Section 10.
+@d ilk dummy.Ilk /* used by \.{CWEAVE} only */
@=
typedef struct name_info {
@@ -25,7 +25,7 @@ typedef struct name_info {
union {
struct name_info *Rlink; /* right link in binary search tree for section
names */
- char Ilk; /* used by identifiers in \.{CWEAVE} only */
+ eight_bits Ilk; /* used by identifiers in \.{CWEAVE} only */
} dummy;
void *equiv_or_xref; /* info corresponding to names */
} name_info; /* contains information about an identifier or section name */
@@ -34,7 +34,7 @@ typedef name_pointer *hash_pointer;
extern char byte_mem[]; /* characters of names */
extern char *byte_mem_end; /* end of |byte_mem| */
@y
- for section names */
+@d ilk dummy.Ilk /* used by \.{CWEAVE} only */
@f huge extern
@@ -45,7 +45,7 @@ typedef struct name_info {
union {
struct name_info *Rlink; /* right link in binary search tree for section
names */
- char Ilk; /* used by identifiers in \.{CWEAVE} only */
+ eight_bits Ilk; /* used by identifiers in \.{CWEAVE} only */
} dummy;
union {
void huge* equiv_member;
@@ -59,7 +59,7 @@ extern char huge* byte_mem_end; /* end of |byte_mem| */
@z
-@x Section 39.
+@x Section 36.
cur_file_name[l]='/'; /* \UNIX/ pathname separator */
@y
cur_file_name[l]='/'; /* A valid {\mc MSDOS} pathname separator */
diff --git a/web/c_cpp/cweb/comm-mac.ch b/web/c_cpp/cweb/comm-mac.ch
index 6bad610d1b..83df560cb4 100644
--- a/web/c_cpp/cweb/comm-mac.ch
+++ b/web/c_cpp/cweb/comm-mac.ch
@@ -4,29 +4,29 @@ No changes to CTANGLE or CWEAVE are needed.
(Contributed 13 Oct 2000 by AndPio@aol.com; slightly edited by Don Knuth)
@x in limbo, change the title page document to specify Mac version
- \centerline{(Version 4.8)}
+ \centerline{(Version 4.10)}
@y
- \centerline{(Version 4.8 for MacOS)}
+ \centerline{(Version 4.10 for MacOS)}
@z
@x section 23: Make input_ln accept \n, \r, \n\r, or \r\n as line endings
@ In the unlikely event that your standard I/O library does not
-support |feof|, |getc|, and |ungetc| you may have to change things here.
+support |feof| and |getc| you may have to change things here.
@^system dependencies@>
@c
static boolean input_ln( /* copies a line into |buffer| or returns |false| */
FILE *fp) /* what file to read from */
{
- register int c=EOF; /* character read; initialized so some compilers won't complain */
- register char *k; /* where next character goes */
+ int c=EOF; /* character read; initialized so some compilers won't complain */
+ char *k; /* where next character goes */
if (feof(fp)) return false; /* we have hit end-of-file */
limit = k = buffer; /* beginning of buffer */
while (k<=buffer_end && (c=getc(fp)) != EOF && c!='\n')
if ((*(k++) = c) != ' ') limit = k;
- if (k>buffer_end)
- if ((c=getc(fp))!=EOF && c!='\n') {
- ungetc(c,fp); loc=buffer; err_print("! Input line too long");
+ if (k>buffer_end) {
+ while ((c=getc(fp))!=EOF && c!='\n'); /* discard rest of line */
+ loc=buffer; err_print("! Input line too long");
@.Input line too long@>
}
if (c==EOF && limit==buffer) return false; /* there was nothing after
@@ -46,8 +46,8 @@ line endings, so that \.{CWEB} will works with ASCII files stored in
static boolean input_ln( /* copies a line into |buffer| or returns |false| */
FILE *fp) /* what file to read from */
{
- register int c=EOF; /* character read; initialized so some compilers won't complain */
- register char *k; /* where next character goes */
+ int c=EOF; /* character read; initialized so some compilers won't complain */
+ char *k; /* where next character goes */
if (feof(fp)) return false; /* we have hit end-of-file */
limit = k = buffer; /* beginning of buffer */
while (true) {
@@ -61,7 +61,7 @@ FILE *fp) /* what file to read from */
return true;
}
else if (k>buffer_end) {
- ungetc(c,fp); loc=buffer; err_print("! Input line too long");
+ while ((c=getc(fp))!=EOF && c!='\n' && c!='\r'); /* discard rest of line */
return true;
@.Input line too long@>
}
@@ -81,17 +81,7 @@ FILE *fp) /* what file to read from */
@@;
@z
-@x section 36, don't try to open a change file if none was specified
-if ((change_file=fopen(change_file_name,"r"))==NULL)
- fatal("! Cannot open change file ", change_file_name);
-@y
-if (change_file_name[0] == '\0') /* no change file specified */
- change_file = NULL; /* reset at least the |change_file| */
-else if ((change_file=fopen(change_file_name,"r"))==NULL)
- fatal("! Cannot open change file ", change_file_name);
-@z
-
-@x section 39, declare colon as Mac's path separator
+@x section 36, declare colon as Mac's path separator
(Colon-separated paths are not supported.)
The remainder of the \.{@@i} line after the file name is ignored.
@@ -104,12 +94,22 @@ The remainder of the \.{@@i} line after the file name is ignored.
@d PATH_SEP ':' /* MacOS pathname separator */
@^system dependencies@>
@z
-@x section 39, use the path separator constant
+@x section 36, use the path separator constant
cur_file_name[l]='/'; /* \UNIX/ pathname separator */
@y
cur_file_name[l]=PATH_SEP; /* pathname separator */
@z
+@x section 41, don't try to open a change file if none was specified
+if ((change_file=fopen(change_file_name,"r"))==NULL)
+ fatal("! Cannot open change file ", change_file_name);
+@y
+if (change_file_name[0] == '\0') /* no change file specified */
+ change_file = NULL; /* reset at least the |change_file| */
+else if ((change_file=fopen(change_file_name,"r"))==NULL)
+ fatal("! Cannot open change file ", change_file_name);
+@z
+
@x section 75, explain the convention for omitted change files
An omitted change file argument means that |"/dev/null"| should be used,
@y
@@ -134,7 +134,7 @@ An omitted change file argument means that no change file should be used,
@z
@x section 85, insert an extra module before the index
-@** Index.
+@* Index.
@y by putting the new module here, we preserve all the previous section numbers
@ We assume an interface to \CEE/ command-line emulation as supplied by
the |ccommand| function of Metrowerks CodeWarrior, as defined in
@@ -144,5 +144,5 @@ the header file \.{console.h}.
#include
@^system dependencies@>
-@** Index.
+@* Index.
@z
diff --git a/web/c_cpp/cweb/comm-ql.ch b/web/c_cpp/cweb/comm-ql.ch
index 52c4834bed..592c7e04a1 100644
--- a/web/c_cpp/cweb/comm-ql.ch
+++ b/web/c_cpp/cweb/comm-ql.ch
@@ -10,24 +10,24 @@ ex cc;'-v -h -c -=500000 -DCWEBINPUTS=flp2_ common_c'
@x
\def\v{\char'174} % vertical (|) in typewriter font
-\def\title{Common code for CTANGLE and CWEAVE (Version 4.8)}
+\def\title{Common code for CTANGLE and CWEAVE (Version 4.10)}
\def\topofcontents{\null\vfill
\centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
{\ttitlefont CWEAVE}}
\vskip 15pt
- \centerline{(Version 4.8)}
+ \centerline{(Version 4.10)}
\vfill}
\def\botofcontents{\vfill
\noindent
@y
\def\v{\char'174} % vertical (|) in typewriter font
-\def\title{Common code for CTANGLE and CWEAVE (QL Version 4.8)}
+\def\title{Common code for CTANGLE and CWEAVE (QL Version 4.10)}
\def\topofcontents{\null\vfill
\centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
{\ttitlefont CWEAVE}}
\vskip 15pt
- \centerline{(Version 4.8)}
+ \centerline{(Version 4.10)}
\vfill}
\def\botofcontents{\vfill
\noindent
@@ -212,17 +212,15 @@ the routine as if it would work.
@@;
if (dot_pos==NULL) {
sprintf(tex_file_name,"%s.tex",*argv);
- sprintf(idx_file_name,"%s.idx",*argv);
- sprintf(scn_file_name,"%s.scn",*argv);
sprintf(C_file_name,"%s.c",*argv);
} else {
strcpy(tex_file_name,*argv);
strcpy(C_file_name,*argv);
- if (make_xrefs) { /* indexes will be generated */
- *dot_pos='\0';
- sprintf(idx_file_name,"%s.idx",*argv);
- sprintf(scn_file_name,"%s.scn",*argv);
- }
+ *dot_pos='\0'; /* string now ends where the dot was */
+ }
+ if (make_xrefs) { /* indexes will be generated */
+ sprintf(idx_file_name,"%s.idx",*argv);
+ sprintf(scn_file_name,"%s.scn",*argv);
}
found_out=true;
}
@@ -233,17 +231,15 @@ the routine as if it would work.
@;
if (dot_pos==NULL) {
sprintf(tex_file_name,"%s_tex",*argv);
- sprintf(idx_file_name,"%s_idx",*argv);
- sprintf(scn_file_name,"%s_scn",*argv);
sprintf(C_file_name,"%s_c",*argv);
} else {
strcpy(tex_file_name,*argv);
strcpy(C_file_name,*argv);
- if (make_xrefs) { /* indexes will be generated */
- *dot_pos='\0';
- sprintf(idx_file_name,"%s_idx",*argv);
- sprintf(scn_file_name,"%s_scn",*argv);
- }
+ *dot_pos='\0'; /* string now ends where the dot was */
+ }
+ if (make_xrefs) { /* indexes will be generated */
+ sprintf(idx_file_name,"%s_idx",*argv);
+ sprintf(scn_file_name,"%s_scn",*argv);
}
found_out=true;
}
diff --git a/web/c_cpp/cweb/comm-vms.ch b/web/c_cpp/cweb/comm-vms.ch
index a5ddc252f3..fe72d604fd 100644
--- a/web/c_cpp/cweb/comm-vms.ch
+++ b/web/c_cpp/cweb/comm-vms.ch
@@ -75,7 +75,7 @@ null device |"NL:"| should be used, when no changes are desired.
@z
@x section 85 (01-FEB-1992 ST)
-@** Index.
+@* Index.
@y
@* VAX/VMS specific code.
We have used |SS$_NORMAL| and |SS$_ABORT| as return codes,
@@ -84,5 +84,5 @@ so we have to include the system message codes.
@=
#include ssdef /* we need VAX/VMS system messages */
-@** Index.
+@* Index.
@z
diff --git a/web/c_cpp/cweb/comm-w32.ch b/web/c_cpp/cweb/comm-w32.ch
index 38c209981a..cf5d63c9c1 100644
--- a/web/c_cpp/cweb/comm-w32.ch
+++ b/web/c_cpp/cweb/comm-w32.ch
@@ -34,16 +34,10 @@ header files to be safe.
Admittedly, this is not vital for cweb, except that I build the whole texlive
set of programs using the __fastcall convention.
-@x
-extern boolean names_match(name_pointer,const char *,size_t,eight_bits);@/
+@x section 11
+extern boolean names_match(name_pointer,const char *,size_t,eight_bits);
@y
-extern boolean __cdecl names_match(name_pointer,const char *,size_t,eight_bits);@/
-@z
-
-@x
-extern void init_p(name_pointer,eight_bits);@/
-@y
-extern void __cdecl init_p(name_pointer,eight_bits);@/
+extern boolean __cdecl names_match(name_pointer,const char *,size_t,eight_bits);
@z
@x section 75
diff --git a/web/c_cpp/cweb/common.c b/web/c_cpp/cweb/common.c
index 2b5c7c9ccc..ccedc5e914 100644
--- a/web/c_cpp/cweb/common.c
+++ b/web/c_cpp/cweb/common.c
@@ -1,8 +1,8 @@
/*1:*/
#line 62 "common.w"
-/*3:*/
-#line 44 "common.h"
+/*4:*/
+#line 48 "common.h"
#include
#include
@@ -12,7 +12,7 @@
#include
#include
-/*:3*/
+/*:4*/
#line 63 "common.w"
#define ctangle false
@@ -61,14 +61,15 @@
#define llink link
#define rlink dummy.Rlink
#define root name_dir->rlink \
- \
+
+#define ilk dummy.Ilk \
#define spotless 0
#define harmless_message 1
#define error_message 2
#define fatal_message 3
-#define mark_harmless if(history==spotless) history= harmless_message
-#define mark_error history= error_message
+#define mark_harmless() if(history==spotless) history= harmless_message
+#define mark_error() history= error_message
#define confusion(s) fatal("! This can't happen: ",s) \
\
@@ -78,8 +79,8 @@
#define show_stats flags['s']
#define make_xrefs flags['x'] \
-#define update_terminal fflush(stdout)
-#define new_line putchar('\n')
+#define update_terminal() fflush(stdout)
+#define new_line() putchar('\n')
#define term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout) \
#define buf_size 200
@@ -133,24 +134,24 @@ typedef uint16_t sixteen_bits;
extern boolean program;
extern int phase;
-/*:2*//*4:*/
-#line 74 "common.h"
+/*:2*//*5:*/
+#line 78 "common.h"
extern char section_text[];
extern char*section_text_end;
extern char*id_first;
extern char*id_loc;
-/*:4*//*5:*/
-#line 92 "common.h"
+/*:5*//*6:*/
+#line 96 "common.h"
extern char buffer[];
extern char*buffer_end;
extern char*loc;
extern char*limit;
-/*:5*//*6:*/
-#line 109 "common.h"
+/*:6*//*7:*/
+#line 113 "common.h"
extern int include_depth;
extern FILE*file[];
@@ -165,16 +166,16 @@ extern boolean input_has_ended;
extern boolean changing;
extern boolean web_file_open;
-/*:6*//*8:*/
-#line 129 "common.h"
+/*:7*//*9:*/
+#line 133 "common.h"
extern sixteen_bits section_count;
extern boolean changed_section[];
extern boolean change_pending;
extern boolean print_where;
-/*:8*//*9:*/
-#line 143 "common.h"
+/*:9*//*10:*/
+#line 148 "common.h"
typedef struct name_info{
char*byte_start;
@@ -182,7 +183,7 @@ struct name_info*link;
union{
struct name_info*Rlink;
-char Ilk;
+eight_bits Ilk;
}dummy;
void*equiv_or_xref;
}name_info;
@@ -198,13 +199,13 @@ extern name_pointer hash[];
extern hash_pointer hash_end;
extern hash_pointer h;
-/*:9*//*11:*/
-#line 187 "common.h"
+/*:10*//*12:*/
+#line 193 "common.h"
extern int history;
-/*:11*//*13:*/
-#line 203 "common.h"
+/*:12*//*14:*/
+#line 211 "common.h"
extern int argc;
extern char**argv;
@@ -214,8 +215,8 @@ extern char idx_file_name[];
extern char scn_file_name[];
extern boolean flags[];
-/*:13*//*14:*/
-#line 217 "common.h"
+/*:14*//*15:*/
+#line 225 "common.h"
extern FILE*C_file;
extern FILE*tex_file;
@@ -223,7 +224,7 @@ extern FILE*idx_file;
extern FILE*scn_file;
extern FILE*active_file;
-/*:14*/
+/*:15*/
#line 65 "common.w"
/*18:*/
@@ -275,8 +276,8 @@ boolean web_file_open= false;
static char change_buffer[buf_size];
static char*change_limit;
-/*:26*//*37:*/
-#line 393 "common.w"
+/*:26*//*42:*/
+#line 545 "common.w"
sixteen_bits section_count;
boolean changed_section[max_sections];
@@ -284,7 +285,7 @@ boolean change_pending;
boolean print_where= false;
-/*:37*//*43:*/
+/*:42*//*43:*/
#line 590 "common.w"
char byte_mem[max_bytes];
@@ -306,12 +307,12 @@ hash_pointer hash_end= hash+hash_size-1;
hash_pointer h;
/*:46*//*65:*/
-#line 1003 "common.w"
+#line 1002 "common.w"
int history= spotless;
/*:65*//*73:*/
-#line 1126 "common.w"
+#line 1125 "common.w"
int argc;
char**argv;
@@ -322,7 +323,7 @@ char scn_file_name[max_file_name_length];
boolean flags[128];
/*:73*//*83:*/
-#line 1269 "common.w"
+#line 1266 "common.w"
FILE*C_file;
FILE*tex_file;
@@ -333,41 +334,43 @@ FILE*active_file;
/*:83*/
#line 66 "common.w"
-/*7:*/
-#line 123 "common.h"
+/*3:*/
+#line 43 "common.h"
+
+extern void common_init(void);
+
+/*:3*//*8:*/
+#line 127 "common.h"
extern boolean get_line(void);
extern void check_complete(void);
extern void reset_input(void);
-/*:7*//*10:*/
-#line 166 "common.h"
+/*:8*//*11:*/
+#line 171 "common.h"
-extern boolean names_match(name_pointer,const char*,size_t,eight_bits);
extern name_pointer id_lookup(const char*,const char*,eight_bits);
extern name_pointer section_lookup(char*,char*,boolean);
-extern void init_node(name_pointer);
-extern void init_p(name_pointer,eight_bits);
extern void print_prefix_name(name_pointer);
extern void print_section_name(name_pointer);
extern void sprint_section_name(char*,name_pointer);
-/*:10*//*12:*/
-#line 190 "common.h"
+extern boolean names_match(name_pointer,const char*,size_t,eight_bits);
+
+extern void init_node(name_pointer);
+
+/*:11*//*13:*/
+#line 196 "common.h"
extern int wrap_up(void);
extern void err_print(const char*);
extern void fatal(const char*,const char*);
extern void overflow(const char*);
-/*:12*//*15:*/
-#line 225 "common.h"
-
-extern void common_init(void);
extern void print_stats(void);
-/*:15*//*24:*/
+/*:13*//*24:*/
#line 176 "common.w"
static boolean input_ln(FILE*);
@@ -380,18 +383,18 @@ static void prime_the_change_buffer(void);
static void check_change(void);
/*:33*//*55:*/
-#line 764 "common.w"
+#line 763 "common.w"
static int web_strcmp(char*,size_t,char*,size_t);
static name_pointer add_section_name(name_pointer,int,char*,char*,boolean);
static void extend_section_name(name_pointer,char*,char*,boolean);
/*:55*//*64:*/
-#line 991 "common.w"
+#line 990 "common.w"
static int section_name_cmp(char**,size_t,name_pointer);
/*:64*//*76:*/
-#line 1186 "common.w"
+#line 1185 "common.w"
static void scan_args(void);
/*:76*/
@@ -421,7 +424,7 @@ for(h= hash;h<=hash_end;*h++= NULL);
#line 99 "common.w"
/*74:*/
-#line 1139 "common.w"
+#line 1138 "common.w"
show_banner= show_happiness= show_progress= make_xrefs= true;
@@ -429,7 +432,7 @@ show_banner= show_happiness= show_progress= make_xrefs= true;
#line 100 "common.w"
/*84:*/
-#line 1276 "common.w"
+#line 1273 "common.w"
scan_args();
if(program==ctangle){
@@ -453,15 +456,15 @@ fatal("! Cannot open output file ",tex_file_name);
static boolean input_ln(
FILE*fp)
{
-register int c= EOF;
-register char*k;
+int c= EOF;
+char*k;
if(feof(fp))return false;
limit= k= buffer;
while(k<=buffer_end&&(c= getc(fp))!=EOF&&c!='\n')
if((*(k++)= c)!=' ')limit= k;
-if(k> buffer_end)
-if((c= getc(fp))!=EOF&&c!='\n'){
-ungetc(c,fp);loc= buffer;err_print("! Input line too long");
+if(k> buffer_end){
+while((c= getc(fp))!=EOF&&c!='\n');
+loc= buffer;err_print("! Input line too long");
}
if(c==EOF&&limit==buffer)return false;
@@ -544,15 +547,15 @@ change_limit= change_buffer;changing= false;
return;
}
if(limit> buffer+1&&buffer[0]=='@'){
-char xyz_code= xisupper(buffer[1])?tolower((int)buffer[1]):buffer[1];
+if(xisupper(buffer[1]))buffer[1]= tolower((int)buffer[1]);
/*34:*/
#line 336 "common.w"
-if(xyz_code=='x'||xyz_code=='z'){
+if(buffer[1]=='x'||buffer[1]=='z'){
loc= buffer+2;err_print("! Where is the matching @y?");
}
-else if(xyz_code=='y'){
+else if(buffer[1]=='y'){
if(n> 0){
loc= buffer+2;
printf("\n! Hmm... %d ",n);
@@ -590,44 +593,14 @@ if(lines_dont_match)n++;
}
/*:32*//*35:*/
-#line 356 "common.w"
-
-void
-reset_input(void)
-{
-limit= buffer;loc= buffer+1;buffer[0]= ' ';
-/*36:*/
-#line 371 "common.w"
-
-if((web_file= fopen(web_file_name,"r"))==NULL){
-strcpy(web_file_name,alt_web_file_name);
-if((web_file= fopen(web_file_name,"r"))==NULL)
-fatal("! Cannot open input file ",web_file_name);
-}
-
-
-web_file_open= true;
-if((change_file= fopen(change_file_name,"r"))==NULL)
-fatal("! Cannot open change file ",change_file_name);
-
-/*:36*/
-#line 361 "common.w"
-
-include_depth= cur_line= change_line= 0;
-change_depth= include_depth;
-changing= true;prime_the_change_buffer();changing= !changing;
-limit= buffer;loc= buffer+1;buffer[0]= ' ';input_has_ended= false;
-}
-
-/*:35*//*38:*/
-#line 400 "common.w"
+#line 362 "common.w"
boolean get_line(void)
{
restart:
if(changing&&include_depth==change_depth)
-/*41:*/
-#line 508 "common.w"
+/*38:*/
+#line 470 "common.w"
{
change_line++;
if(!input_ln(change_file)){
@@ -657,12 +630,12 @@ prime_the_change_buffer();changing= !changing;print_where= true;
}
}
-/*:41*/
-#line 405 "common.w"
+/*:38*/
+#line 367 "common.w"
if(!changing||include_depth> change_depth){
-/*40:*/
-#line 491 "common.w"
+/*37:*/
+#line 453 "common.w"
{
cur_line++;
while(!input_ln(cur_file)){
@@ -680,8 +653,8 @@ if(buffer[0]==change_buffer[0])
if(change_limit> change_buffer)check_change();
}
-/*:40*/
-#line 407 "common.w"
+/*:37*/
+#line 369 "common.w"
if(changing&&include_depth==change_depth)goto restart;
}
@@ -701,8 +674,8 @@ err_print("! Too many nested includes");
goto restart;
}
include_depth++;
-/*39:*/
-#line 445 "common.w"
+/*36:*/
+#line 407 "common.w"
{
char temp_file_name[max_file_name_length];
char*cur_file_name_end= cur_file_name+max_file_name_length-1;
@@ -723,7 +696,6 @@ cur_line= 0;print_where= true;
goto restart;
}
if((kk= getenv("CWEBINPUTS"))!=NULL){
-
if((l= strlen(kk))> max_file_name_length-2)too_long();
strcpy(temp_file_name,kk);
}
@@ -732,10 +704,10 @@ else{
if((l= strlen(CWEBINPUTS))> max_file_name_length-2)too_long();
strcpy(temp_file_name,CWEBINPUTS);
#else
-#line 474 "common.w"
+#line 435 "common.w"
l= 0;
#endif
-#line 476 "common.w"
+#line 437 "common.w"
}
if(l> 0){
if(k+l+2>=cur_file_name_end)too_long();
@@ -743,6 +715,7 @@ if(k+l+2>=cur_file_name_end)too_long();
for(;k>=cur_file_name;k--)*(k+l+1)= *k;
strcpy(cur_file_name,temp_file_name);
cur_file_name[l]= '/';
+
if((cur_file= fopen(cur_file_name,"r"))!=NULL){
cur_line= 0;print_where= true;
goto restart;
@@ -751,15 +724,15 @@ goto restart;
include_depth--;err_print("! Cannot open include file");goto restart;
}
-/*:39*/
-#line 426 "common.w"
+/*:36*/
+#line 388 "common.w"
}
return true;
}
-/*:38*//*42:*/
-#line 540 "common.w"
+/*:35*//*39:*/
+#line 502 "common.w"
void
check_complete(void){
@@ -772,7 +745,37 @@ err_print("! Change file entry did not match");
}
}
-/*:42*//*48:*/
+/*:39*//*40:*/
+#line 518 "common.w"
+
+void
+reset_input(void)
+{
+limit= buffer;loc= buffer+1;buffer[0]= ' ';
+/*41:*/
+#line 533 "common.w"
+
+if((web_file= fopen(web_file_name,"r"))==NULL){
+strcpy(web_file_name,alt_web_file_name);
+if((web_file= fopen(web_file_name,"r"))==NULL)
+fatal("! Cannot open input file ",web_file_name);
+}
+
+
+web_file_open= true;
+if((change_file= fopen(change_file_name,"r"))==NULL)
+fatal("! Cannot open change file ",change_file_name);
+
+/*:41*/
+#line 523 "common.w"
+
+include_depth= cur_line= change_line= 0;
+change_depth= include_depth;
+changing= true;prime_the_change_buffer();changing= !changing;
+limit= buffer;loc= buffer+1;buffer[0]= ' ';input_has_ended= false;
+}
+
+/*:40*//*48:*/
#line 633 "common.w"
name_pointer
@@ -811,13 +814,13 @@ p->link= hash[h];hash[h]= p;
#line 647 "common.w"
if(p==name_ptr)/*51:*/
-#line 676 "common.w"
+#line 675 "common.w"
{
if(byte_ptr+l> byte_mem_end)overflow("byte memory");
if(name_ptr>=name_dir_end)overflow("name");
strncpy(byte_ptr,first,l);
(++name_ptr)->byte_start= byte_ptr+= l;
-init_p(p,t);
+if(program==cweave)p->ilk= t,init_node(p);
}
/*:51*/
@@ -827,7 +830,7 @@ return p;
}
/*:48*//*52:*/
-#line 708 "common.w"
+#line 707 "common.w"
void
print_section_name(
@@ -846,7 +849,7 @@ if(q)term_write("...",3);
}
/*:52*//*53:*/
-#line 725 "common.w"
+#line 724 "common.w"
void
sprint_section_name(
@@ -866,7 +869,7 @@ s= p->byte_start;
}
/*:53*//*54:*/
-#line 743 "common.w"
+#line 742 "common.w"
void
print_prefix_name(
@@ -879,7 +882,7 @@ if(s+l<(p+1)->byte_start)term_write("...",3);
}
/*:54*//*56:*/
-#line 769 "common.w"
+#line 768 "common.w"
static int web_strcmp(
char*j,
@@ -897,7 +900,7 @@ else return greater;
}
/*:56*//*57:*/
-#line 798 "common.w"
+#line 797 "common.w"
static name_pointer
add_section_name(
@@ -927,7 +930,7 @@ return par==NULL?(root= p):c==less?(par->llink= p):(par->rlink= p);
}
/*:57*//*58:*/
-#line 826 "common.w"
+#line 825 "common.w"
static void
extend_section_name(
@@ -951,7 +954,7 @@ if(ispref)*(byte_ptr-1)= ' ';
}
/*:58*//*59:*/
-#line 854 "common.w"
+#line 853 "common.w"
name_pointer
section_lookup(
@@ -966,7 +969,7 @@ name_pointer par= NULL;
size_t name_len= (size_t)(last-first+1);
/*60:*/
-#line 878 "common.w"
+#line 877 "common.w"
while(p){
c= web_strcmp(first,name_len,first_chunk(p),prefix_length(p));
@@ -993,19 +996,19 @@ p= q,q= NULL;
}
/*:60*/
-#line 868 "common.w"
+#line 867 "common.w"
/*61:*/
-#line 903 "common.w"
+#line 902 "common.w"
if(r==NULL)
return add_section_name(par,c,first,last+1,ispref);
/*:61*/
-#line 869 "common.w"
+#line 868 "common.w"
/*62:*/
-#line 911 "common.w"
+#line 910 "common.w"
switch(section_name_cmp(&first,name_len,r)){
@@ -1039,12 +1042,12 @@ err_print(">");
return r;
/*:62*/
-#line 870 "common.w"
+#line 869 "common.w"
}
/*:59*//*63:*/
-#line 959 "common.w"
+#line 958 "common.w"
static int section_name_cmp(
char**pfirst,
@@ -1066,7 +1069,7 @@ if(ispref){
*pfirst= first+(ptrdiff_t)(ss-s);
return extension;
}else return equal;
-else return(q->byte_start==(q+1)->byte_start)?equal:prefix;
+else return length(q)==0?equal:prefix;
case extension:
if(!ispref)return bad_extension;
first+= ss-s;
@@ -1078,7 +1081,7 @@ default:return c;
}
/*:63*//*66:*/
-#line 1013 "common.w"
+#line 1012 "common.w"
void
err_print(
@@ -1086,7 +1089,7 @@ const char*s)
{
*s=='!'?printf("\n%s",s):printf("%s",s);
if(web_file_open)/*67:*/
-#line 1032 "common.w"
+#line 1031 "common.w"
{char*k,*l;
if(changing&&include_depth==change_depth)
@@ -1098,7 +1101,7 @@ if(l> buffer){
for(k= buffer;k harmless_message)return EXIT_FAILURE;
else return EXIT_SUCCESS;
}
/*:68*//*70:*/
-#line 1093 "common.w"
+#line 1092 "common.w"
void
fatal(
const char*s,const char*t)
@@ -1152,7 +1155,7 @@ history= fatal_message;exit(wrap_up());
}
/*:70*//*71:*/
-#line 1104 "common.w"
+#line 1103 "common.w"
void
overflow(
const char*t)
@@ -1162,27 +1165,27 @@ printf("\n! Sorry, %s capacity exceeded",t);fatal("","");
/*:71*//*75:*/
-#line 1157 "common.w"
+#line 1156 "common.w"
static void
scan_args(void)
{
char*dot_pos;
char*name_pos;
-register char*s;
+char*s;
boolean found_web= false,found_change= false,found_out= false;
strcpy(change_file_name,"/dev/null");
while(--argc> 0){
if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/
-#line 1247 "common.w"
+#line 1244 "common.w"
for(dot_pos= *argv+1;*dot_pos> '\0';dot_pos++)
flags[(eight_bits)*dot_pos]= flag_change;
/*:80*/
-#line 1169 "common.w"
+#line 1168 "common.w"
else{
s= name_pos= *argv;dot_pos= NULL;
@@ -1191,17 +1194,17 @@ if(*s=='.')dot_pos= s++;
else if(*s=='/')dot_pos= NULL,name_pos= ++s;
else s++;
if(!found_web)/*77:*/
-#line 1195 "common.w"
+#line 1194 "common.w"
{
if(s-*argv> max_file_name_length-5)
/*82:*/
-#line 1263 "common.w"
+#line 1260 "common.w"
fatal("! Filename too long\n",*argv);
/*:82*/
-#line 1198 "common.w"
+#line 1197 "common.w"
if(dot_pos==NULL)
sprintf(web_file_name,"%s.w",*argv);
@@ -1218,21 +1221,21 @@ found_web= true;
}
/*:77*/
-#line 1177 "common.w"
+#line 1176 "common.w"
else if(!found_change)/*78:*/
-#line 1213 "common.w"
+#line 1212 "common.w"
{
if(strcmp(*argv,"-")!=0){
if(s-*argv> max_file_name_length-4)
/*82:*/
-#line 1263 "common.w"
+#line 1260 "common.w"
fatal("! Filename too long\n",*argv);
/*:82*/
-#line 1217 "common.w"
+#line 1216 "common.w"
if(dot_pos==NULL)
sprintf(change_file_name,"%s.ch",*argv);
@@ -1242,43 +1245,41 @@ found_change= true;
}
/*:78*/
-#line 1178 "common.w"
+#line 1177 "common.w"
else if(!found_out)/*79:*/
-#line 1225 "common.w"
+#line 1224 "common.w"
{
if(s-*argv> max_file_name_length-5)
/*82:*/
-#line 1263 "common.w"
+#line 1260 "common.w"
fatal("! Filename too long\n",*argv);
/*:82*/
-#line 1228 "common.w"
+#line 1227 "common.w"
if(dot_pos==NULL){
sprintf(tex_file_name,"%s.tex",*argv);
-sprintf(idx_file_name,"%s.idx",*argv);
-sprintf(scn_file_name,"%s.scn",*argv);
sprintf(C_file_name,"%s.c",*argv);
}else{
strcpy(tex_file_name,*argv);
strcpy(C_file_name,*argv);
-if(make_xrefs){
*dot_pos= '\0';
+}
+if(make_xrefs){
sprintf(idx_file_name,"%s.idx",*argv);
sprintf(scn_file_name,"%s.scn",*argv);
}
-}
found_out= true;
}
/*:79*/
-#line 1179 "common.w"
+#line 1178 "common.w"
else/*81:*/
-#line 1251 "common.w"
+#line 1248 "common.w"
{
if(program==ctangle)
@@ -1292,12 +1293,12 @@ else fatal(
}
/*:81*/
-#line 1180 "common.w"
+#line 1179 "common.w"
}
}
if(!found_web)/*81:*/
-#line 1251 "common.w"
+#line 1248 "common.w"
{
if(program==ctangle)
@@ -1311,7 +1312,7 @@ else fatal(
}
/*:81*/
-#line 1183 "common.w"
+#line 1182 "common.w"
}
diff --git a/web/c_cpp/cweb/common.h b/web/c_cpp/cweb/common.h
index 186e87fd63..4104965917 100644
--- a/web/c_cpp/cweb/common.h
+++ b/web/c_cpp/cweb/common.h
@@ -2,7 +2,7 @@
% This program by Silvio Levy and Donald E. Knuth
% is based on a program by Knuth.
% It is distributed WITHOUT ANY WARRANTY, express or implied.
-% Version 4.8 --- June 2022 (works also with later versions)
+% Version 4.10 --- August 2023 (works also with later versions)
% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
@@ -32,13 +32,17 @@ First comes general stuff:
@d ctangle false
@d cweave true
-@=
+@=@^system dependencies@>
typedef bool boolean;
typedef uint8_t eight_bits;
typedef uint16_t sixteen_bits;
extern boolean program; /* \.{CWEAVE} or \.{CTANGLE}? */
extern int phase; /* which phase are we in? */
+@ The procedure that gets everything rolling:
+@=
+extern void common_init(void);@/
+
@ Interface to the standard \CEE/ library:
@=
@@ -139,6 +143,7 @@ extern boolean print_where; /* tells \.{CTANGLE} to print line and file info */
@d rlink dummy.Rlink /* right link in binary search tree for section names */
@d root name_dir->rlink /* the root of the binary search tree
for section names */
+@d ilk dummy.Ilk /* used by \.{CWEAVE} only */
@=
typedef struct name_info {
@@ -147,7 +152,7 @@ typedef struct name_info {
union {
struct name_info *Rlink; /* right link in binary search tree for section
names */
- char Ilk; /* used by identifiers in \.{CWEAVE} only */
+ eight_bits Ilk; /* used by identifiers in \.{CWEAVE} only */
} dummy;
void *equiv_or_xref; /* info corresponding to names */
} name_info; /* contains information about an identifier or section name */
@@ -164,23 +169,24 @@ extern hash_pointer hash_end; /* end of |hash| */
extern hash_pointer h; /* index into hash-head array */
@ @=
-extern boolean names_match(name_pointer,const char *,size_t,eight_bits);@/
extern name_pointer id_lookup(const char *,const char *,eight_bits);
/* looks up a string in the identifier table */
extern name_pointer section_lookup(char *,char *,boolean); /* finds section name */
-extern void init_node(name_pointer);@/
-extern void init_p(name_pointer,eight_bits);@/
extern void print_prefix_name(name_pointer);@/
extern void print_section_name(name_pointer);@/
extern void sprint_section_name(char *,name_pointer);
+@#
+extern boolean names_match(name_pointer,const char *,size_t,eight_bits);
+/* two routines defined in \.{ctangle.w} and \.{cweave.w} */
+extern void init_node(name_pointer);
@ Code related to error handling:
@d spotless 0 /* |history| value for normal jobs */
@d harmless_message 1 /* |history| value when non-serious info was printed */
@d error_message 2 /* |history| value when an error was noted */
@d fatal_message 3 /* |history| value when we had to stop prematurely */
-@d mark_harmless if (history==spotless) history=harmless_message
-@d mark_error history=error_message
+@d mark_harmless() if (history==spotless) history=harmless_message
+@d mark_error() history=error_message
@d confusion(s) fatal("! This can't happen: ",s)
@.This can't happen@>
@@ -192,6 +198,8 @@ extern int wrap_up(void); /* indicate |history| and exit */
extern void err_print(const char *); /* print error message and context */
extern void fatal(const char *,const char *); /* issue error message and die */
extern void overflow(const char *); /* succumb because a table has overflowed */
+@#
+extern void print_stats(void); /* defined in \.{ctangle.w} and \.{cweave.w} */
@ Code related to command line arguments:
@d show_banner flags['b'] /* should the banner line be printed? */
@@ -210,8 +218,8 @@ extern char scn_file_name[]; /* name of |scn_file| */
extern boolean flags[]; /* an option for each 7-bit code */
@ Code related to output:
-@d update_terminal fflush(stdout) /* empty the terminal output buffer */
-@d new_line putchar('\n')
+@d update_terminal() fflush(stdout) /* empty the terminal output buffer */
+@d new_line() putchar('\n')
@d term_write(a,b) fflush(stdout),fwrite(a,sizeof(char),b,stdout)
@=
@@ -221,11 +229,6 @@ extern FILE *idx_file; /* where index from \.{CWEAVE} goes */
extern FILE *scn_file; /* where list of sections from \.{CWEAVE} goes */
extern FILE *active_file; /* currently active file for \.{CWEAVE} output */
-@ The procedure that gets everything rolling:
-@=
-extern void common_init(void);@/
-extern void print_stats(void);
-
@ The following parameters are sufficient to handle \TEX/ (converted to
\.{CWEB}), so they should be sufficient for most applications of \.{CWEB}.
diff --git a/web/c_cpp/cweb/common.w b/web/c_cpp/cweb/common.w
index 4ec17241c3..dbcd57e31f 100644
--- a/web/c_cpp/cweb/common.w
+++ b/web/c_cpp/cweb/common.w
@@ -2,7 +2,7 @@
% This program by Silvio Levy and Donald E. Knuth
% is based on a program by Knuth.
% It is distributed WITHOUT ANY WARRANTY, express or implied.
-% Version 4.8 --- June 2022
+% Version 4.10 --- August 2023
% Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
@@ -22,12 +22,12 @@
\def\v{\char'174} % vertical (|) in typewriter font
-\def\title{Common code for CTANGLE and CWEAVE (Version 4.8)}
+\def\title{Common code for CTANGLE and CWEAVE (Version 4.10)}
\def\topofcontents{\null\vfill
\centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
{\ttitlefont CWEAVE}}
\vskip 15pt
- \centerline{(Version 4.8)}
+ \centerline{(Version 4.10)}
\vfill}
\def\botofcontents{\vfill
\noindent
@@ -47,7 +47,7 @@ under the terms of a permission notice identical to this one.
\pageno=\contentspagenumber \advance\pageno by 1
\let\maybe=\iftrue
-@** Introduction. This file contains code common
+@* Introduction. This file contains code common
to both \.{CTANGLE} and \.{CWEAVE}, which roughly concerns the following
problems: character uniformity, input routines, error handling and
parsing of command line. We have tried to concentrate in this file
@@ -129,7 +129,7 @@ char *section_text_end = section_text+longest_name; /* end of |section_text| */
char *id_first; /* where the current identifier begins in the buffer */
char *id_loc; /* just after the current identifier in the buffer */
-@** Input routines. The lowest level of input to the \.{CWEB} programs
+@* Input routines. The lowest level of input to the \.{CWEB} programs
is performed by |input_ln|, which must be told which file to read from.
The return value of |input_ln| is |true| if the read is successful and
|false| if not (generally this means the file has ended). The conventions
@@ -150,22 +150,22 @@ char *loc=buffer; /* points to the next character to be read from the buffer */
char *limit=buffer; /* points to the last character in the buffer */
@ In the unlikely event that your standard I/O library does not
-support |feof|, |getc|, and |ungetc| you may have to change things here.
+support |feof| and |getc| you may have to change things here.
@^system dependencies@>
@c
static boolean input_ln( /* copies a line into |buffer| or returns |false| */
FILE *fp) /* what file to read from */
{
- register int c=EOF; /* character read; initialized so some compilers won't complain */
- register char *k; /* where next character goes */
+ int c=EOF; /* character read; initialized so some compilers won't complain */
+ char *k; /* where next character goes */
if (feof(fp)) return false; /* we have hit end-of-file */
limit = k = buffer; /* beginning of buffer */
while (k<=buffer_end && (c=getc(fp)) != EOF && c!='\n')
if ((*(k++) = c) != ' ') limit = k;
- if (k>buffer_end)
- if ((c=getc(fp))!=EOF && c!='\n') {
- ungetc(c,fp); loc=buffer; err_print("! Input line too long");
+ if (k>buffer_end) {
+ while ((c=getc(fp))!=EOF && c!='\n'); /* discard rest of line */
+ loc=buffer; err_print("! Input line too long");
@.Input line too long@>
}
if (c==EOF && limit==buffer) return false; /* there was nothing after
@@ -175,8 +175,8 @@ FILE *fp) /* what file to read from */
@ @=@+static boolean input_ln(FILE *);
-@ Now comes the problem of deciding which file to read from next.
-Recall that the actual text that \.{CWEB} should process comes from two
+@* File handling. Now comes the problem of deciding which file to read from
+next. Recall that the actual text that \.{CWEB} should process comes from two
streams: a |web_file|, which can contain possibly nested include
commands~\.{@@i}, and a |change_file|, which might also contain
includes. The |web_file| together with the currently open include
@@ -313,7 +313,7 @@ check_change(void) /* switches to |change_file| if the buffers match */
return;
}
if (limit>buffer+1 && buffer[0]=='@@') {
- char xyz_code=xisupper(buffer[1])? tolower((int)buffer[1]): buffer[1];
+ if (xisupper(buffer[1])) buffer[1]=tolower((int)buffer[1]);
@@;
}
@@ -334,11 +334,11 @@ check_change(void) /* switches to |change_file| if the buffers match */
@ @=@+static void check_change(void);
@ @=
-if (xyz_code=='x' || xyz_code=='z') {
+if (buffer[1]=='x' || buffer[1]=='z') {
loc=buffer+2; err_print("! Where is the matching @@y?");
@.Where is the match...@>
}
-else if (xyz_code=='y') {
+else if (buffer[1]=='y') {
if (n>0) {
loc=buffer+2;
printf("\n! Hmm... %d ",n);
@@ -349,37 +349,6 @@ else if (xyz_code=='y') {
return;
}
-@ The |reset_input| procedure, which gets \.{CWEB} ready to read the
-user's \.{CWEB} input, is used at the beginning of phase one of \.{CTANGLE},
-phases one and two of \.{CWEAVE}.
-
-@c
-void
-reset_input(void)
-{
- limit=buffer; loc=buffer+1; buffer[0]=' ';
- @@;
- include_depth=cur_line=change_line=0;
- change_depth=include_depth;
- changing=true; prime_the_change_buffer(); changing=!changing;
- limit=buffer; loc=buffer+1; buffer[0]=' '; input_has_ended=false;
-}
-
-@ The following code opens the input files.
-@^system dependencies@>
-
-@=
-if ((web_file=fopen(web_file_name,"r"))==NULL) {
- strcpy(web_file_name,alt_web_file_name);
- if ((web_file=fopen(web_file_name,"r"))==NULL)
- fatal("! Cannot open input file ", web_file_name);
-}
-@.Cannot open input file@>
-@.Cannot open change file@>
-web_file_open=true;
-if ((change_file=fopen(change_file_name,"r"))==NULL)
- fatal("! Cannot open change file ", change_file_name);
-
@ The |get_line| procedure is called when |loc>limit|; it puts the next
line of merged input into the buffer and updates the other variables
appropriately. A space is placed at the right end of the line.
@@ -390,14 +359,7 @@ If we've just changed from the |cur_file| to the |change_file|, or if
the |cur_file| has changed, we tell \.{CTANGLE} to print this
information in the \CEE/ file by means of the |print_where| flag.
-@=
-sixteen_bits section_count; /* the current section number */
-boolean changed_section[max_sections]; /* is the section changed? */
-boolean change_pending; /* if the current change is not yet recorded in
- |changed_section[section_count]| */
-boolean print_where=false; /* should \.{CTANGLE} print line and file info? */
-
-@ @c
+@c
boolean get_line(void) /* inputs the next line */
{
restart:
@@ -432,7 +394,7 @@ boolean get_line(void) /* inputs the next line */
stop reading it and start reading from the named include file. The
\.{@@i} line should give a complete file name with or without
double quotes.
-If the environment variable \.{CWEBINPUTS} is set, or if the compiler flag
+If the environment variable |CWEBINPUTS| is set, or if the compiler flag
of the same name was defined at compile time,
\.{CWEB} will look for include files in the directory thus named, if
it cannot find them in the current directory.
@@ -462,7 +424,6 @@ The remainder of the \.{@@i} line after the file name is ignored.
goto restart; /* success */
}
if ((kk=getenv("CWEBINPUTS"))!=NULL) {
-@.CWEBINPUTS@>
if ((l=strlen(kk))>max_file_name_length-2) too_long();
strcpy(temp_file_name,kk);
}
@@ -480,6 +441,7 @@ The remainder of the \.{@@i} line after the file name is ignored.
for (; k>=cur_file_name; k--) *(k+l+1)=*k;
strcpy(cur_file_name,temp_file_name);
cur_file_name[l]='/'; /* \UNIX/ pathname separator */
+@^system dependencies@>
if ((cur_file=fopen(cur_file_name,"r"))!=NULL) {
cur_line=0; print_where=true;
goto restart; /* success */
@@ -549,7 +511,45 @@ check_complete(void) {
}
}
-@** Storage of names and strings.
+@ The |reset_input| procedure, which gets \.{CWEB} ready to read the
+user's \.{CWEB} input, is used at the beginning of phase one of \.{CTANGLE},
+phases one and two of \.{CWEAVE}.
+
+@c
+void
+reset_input(void)
+{
+ limit=buffer; loc=buffer+1; buffer[0]=' ';
+ @@;
+ include_depth=cur_line=change_line=0;
+ change_depth=include_depth;
+ changing=true; prime_the_change_buffer(); changing=!changing;
+ limit=buffer; loc=buffer+1; buffer[0]=' '; input_has_ended=false;
+}
+
+@ The following code opens the input files.
+@^system dependencies@>
+
+@=
+if ((web_file=fopen(web_file_name,"r"))==NULL) {
+ strcpy(web_file_name,alt_web_file_name);
+ if ((web_file=fopen(web_file_name,"r"))==NULL)
+ fatal("! Cannot open input file ", web_file_name);
+}
+@.Cannot open input file@>
+@.Cannot open change file@>
+web_file_open=true;
+if ((change_file=fopen(change_file_name,"r"))==NULL)
+ fatal("! Cannot open change file ", change_file_name);
+
+@ @=
+sixteen_bits section_count; /* the current section number */
+boolean changed_section[max_sections]; /* is the section changed? */
+boolean change_pending; /* if the current change is not yet recorded in
+ |changed_section[section_count]| */
+boolean print_where=false; /* should \.{CTANGLE} print line and file info? */
+
+@* Storage of names and strings.
Both \.{CWEAVE} and \.{CTANGLE} store identifiers, section names and
other strings in a large array of |char|s, called |byte_mem|.
Information about the names is kept in the array |name_dir|, whose
@@ -670,15 +670,14 @@ if (p==NULL) {
}
@ The information associated with a new identifier must be initialized
-in a slightly different way in \.{CWEAVE} than in \.{CTANGLE}; hence the
-|init_p| procedure.
+in a slightly different way in \.{CWEAVE} than in \.{CTANGLE}.
@= {
if (byte_ptr+l>byte_mem_end) overflow("byte memory");
if (name_ptr>=name_dir_end) overflow("name");
strncpy(byte_ptr,first,l);
(++name_ptr)->byte_start=byte_ptr+=l;
- init_p(p,t);
+ if (program==cweave) p->ilk=t, init_node(p);
}
@ If |p| is a |name_pointer| variable, as we have seen,
@@ -977,7 +976,7 @@ name_pointer r) /* section name being compared */
*pfirst=first+(ptrdiff_t)(ss-s);
return extension; /* null extension */
} else return equal;
- else return (q->byte_start==(q+1)->byte_start)? equal: prefix;
+ else return length(q)==0? equal: prefix;
case extension:
if (!ispref) return bad_extension;
first += ss-s;
@@ -990,7 +989,7 @@ name_pointer r) /* section name being compared */
@ @=@+static int section_name_cmp(char **,size_t,name_pointer);
-@** Reporting errors to the user.
+@* Reporting errors to the user.
A global variable called |history| will contain one of four values
at the end of every run: |spotless| means that no unusual messages were
printed; |harmless_message| means that a message of possible interest
@@ -1017,7 +1016,7 @@ const char *s)
{
*s=='!'? printf("\n%s",s) : printf("%s",s);
if (web_file_open) @@;
- update_terminal; mark_error;
+ update_terminal(); mark_error();
}
@ The error locations can be indicated by using the global variables
@@ -1040,7 +1039,7 @@ if (l>buffer) {
for (k=buffer; k@;
@@ -1114,7 +1113,7 @@ and \.{CWEB} prints an error message that is really for the \.{CWEB}
maintenance person, not the user. In such cases the program says
|confusion("indication of where we are")|.
-@** Command line arguments.
+@* Command line arguments.
The user calls \.{CWEAVE} and \.{CTANGLE} with arguments on the command line.
These are either file names or flags to be turned off (beginning with |"-"|)
or flags to be turned on (beginning with |"+"|).
@@ -1160,7 +1159,7 @@ scan_args(void)
{
char *dot_pos; /* position of |'.'| in the argument */
char *name_pos; /* file name beginning, sans directory */
- register char *s; /* register for scanning strings */
+ char *s; /* pointer for scanning strings */
boolean found_web=false,found_change=false,found_out=false;
/* have these names been seen? */
@@ -1228,17 +1227,15 @@ after the dot. We must check that there is enough room in
@@;
if (dot_pos==NULL) {
sprintf(tex_file_name,"%s.tex",*argv);
- sprintf(idx_file_name,"%s.idx",*argv);
- sprintf(scn_file_name,"%s.scn",*argv);
sprintf(C_file_name,"%s.c",*argv);
} else {
strcpy(tex_file_name,*argv);
strcpy(C_file_name,*argv);
- if (make_xrefs) { /* indexes will be generated */
- *dot_pos='\0';
- sprintf(idx_file_name,"%s.idx",*argv);
- sprintf(scn_file_name,"%s.scn",*argv);
- }
+ *dot_pos='\0'; /* string now ends where the dot was */
+ }
+ if (make_xrefs) { /* indexes will be generated */
+ sprintf(idx_file_name,"%s.idx",*argv);
+ sprintf(scn_file_name,"%s.scn",*argv);
}
found_out=true;
}
@@ -1263,7 +1260,7 @@ else fatal(
@ @= fatal("! Filename too long\n", *argv);
@.Filename too long@>
-@** Output. Here is the code that opens the output file:
+@* Output. Here is the code that opens the output file:
@^system dependencies@>
@=
@@ -1285,4 +1282,4 @@ else {
fatal("! Cannot open output file ", tex_file_name);
}
-@** Index.
+@* Index.
diff --git a/web/c_cpp/cweb/ctang-bs.ch b/web/c_cpp/cweb/ctang-bs.ch
index 911d7d5dcf..6c6331c0c7 100644
--- a/web/c_cpp/cweb/ctang-bs.ch
+++ b/web/c_cpp/cweb/ctang-bs.ch
@@ -17,17 +17,17 @@ by using "huge" pointers.
The ``banner line'' defined here should be changed whenever \.{CTANGLE}
is modified.
-@d banner "This is CTANGLE (Version 4.8)"
+@d banner "This is CTANGLE (Version 4.10)"
@y
The ``banner line'' defined here should be changed whenever \.{CTANGLE}
is modified.
-@d banner "This is CTANGLE (Version 4.8pc/big)"
+@d banner "This is CTANGLE (Version 4.10pc/big)"
@z
-@x Section 10.
- for section names */
+@x Section 11.
+@d ilk dummy.Ilk /* used by \.{CWEAVE} only */
@=
typedef struct name_info {
@@ -36,7 +36,7 @@ typedef struct name_info {
union {
struct name_info *Rlink; /* right link in binary search tree for section
names */
- char Ilk; /* used by identifiers in \.{CWEAVE} only */
+ eight_bits Ilk; /* used by identifiers in \.{CWEAVE} only */
} dummy;
void *equiv_or_xref; /* info corresponding to names */
} name_info; /* contains information about an identifier or section name */
@@ -52,7 +52,7 @@ extern name_pointer hash[]; /* heads of hash lists */
extern hash_pointer hash_end; /* end of |hash| */
extern hash_pointer h; /* index into hash-head array */
@y
- for section names */
+@d ilk dummy.Ilk /* used by \.{CWEAVE} only */
@f huge extern
@@ -63,7 +63,7 @@ typedef struct name_info {
union {
struct name_info *Rlink; /* right link in binary search tree for section
names */
- char Ilk; /* used by identifiers in \.{CWEAVE} only */
+ eight_bits Ilk; /* used by identifiers in \.{CWEAVE} only */
} dummy;
union {
char *equiv_member;
@@ -144,10 +144,8 @@ text_ptr=text_info+1; text_ptr->tok_start=tok_mem;
@x Section 31.
- eight_bits *end_field; /* ending location of replacement text */
eight_bits *byte_field; /* present location within replacement text */
@y
- eight_bits huge* end_field; /* ending location of replacement text */
eight_bits huge* byte_field; /* present location within replacement text */
@z
@@ -156,10 +154,10 @@ text_ptr=text_info+1; text_ptr->tok_start=tok_mem;
out_char(
eight_bits cur_char)
{
- char *j, *k; /* pointer into |byte_mem| */
+ char *j; /* pointer into |byte_mem| */
@y
out_char(cur_char)
eight_bits cur_char;
{
- char huge* j, huge* k; /* pointer into |byte_mem| */
+ char huge* j; /* pointer into |byte_mem| */
@z
diff --git a/web/c_cpp/cweb/ctang-pc.ch b/web/c_cpp/cweb/ctang-pc.ch
index 00c1937307..25d62cdb6b 100644
--- a/web/c_cpp/cweb/ctang-pc.ch
+++ b/web/c_cpp/cweb/ctang-pc.ch
@@ -9,9 +9,9 @@ that allows >64K arrays. If you need lots of bytes and toks, try the
alternate change files with -bs suffix instead of -pc.
@x section 1
-@d banner "This is CTANGLE (Version 4.8)"
+@d banner "This is CTANGLE (Version 4.10)"
@y
-@d banner "This is CTANGLE (Version 4.8pc)"
+@d banner "This is CTANGLE (Version 4.10pc)"
@z
@x section 17
@d max_bytes 100000 /* the number of bytes in identifiers,
diff --git a/web/c_cpp/cweb/ctang-ql.ch b/web/c_cpp/cweb/ctang-ql.ch
index 809dff497d..91aa24fff2 100644
--- a/web/c_cpp/cweb/ctang-ql.ch
+++ b/web/c_cpp/cweb/ctang-ql.ch
@@ -7,15 +7,15 @@ ex cc;"-v -h -c -=500000 ctangle_c"
@x
-\def\title{CTANGLE (Version 4.8)}
+\def\title{CTANGLE (Version 4.10)}
@y
-\def\title{CTANGLE (QL Version 4.8)}
+\def\title{CTANGLE (QL Version 4.10)}
@z
@x section 1
-@d banner "This is CTANGLE (Version 4.8)"
+@d banner "This is CTANGLE (Version 4.10)"
@y
-@d banner "This is CTANGLE (QL Version 4.8)"
+@d banner "This is CTANGLE (QL Version 4.10)"
@z
@x
diff --git a/web/c_cpp/cweb/ctang-vms.ch b/web/c_cpp/cweb/ctang-vms.ch
index a928d912cf..9e311d3aa3 100644
--- a/web/c_cpp/cweb/ctang-vms.ch
+++ b/web/c_cpp/cweb/ctang-vms.ch
@@ -10,12 +10,12 @@ created:
(these changes not necessary for initial bootstrapping)
@x section 1 (01-FEB-1992 ST)
-@d banner "This is CTANGLE (Version 4.8)"
+@d banner "This is CTANGLE (Version 4.10)"
@y
-@d banner "This is CTANGLE (VAX/VMS Version 4.8)"
+@d banner "This is CTANGLE (VAX/VMS Version 4.10)"
@z
-@x section 4 (01-FEB-1992 ST)
+@x section 5 (01-FEB-1992 ST)
#include /* definition of |@!isalpha|, |@!isdigit| and so on */
#include /* definition of |@!bool|, |@!true| and |@!false| */
#include /* definition of |@!ptrdiff_t| */
diff --git a/web/c_cpp/cweb/ctang-w32.ch b/web/c_cpp/cweb/ctang-w32.ch
index ab76415410..51d3212b13 100644
--- a/web/c_cpp/cweb/ctang-w32.ch
+++ b/web/c_cpp/cweb/ctang-w32.ch
@@ -4,12 +4,12 @@ This is the change file for CWEB's CTANGLE under Win32
Changes necessary for compiling with Borland C/C++
@x section 1
-@d banner "This is CTANGLE (Version 4.8)"
+@d banner "This is CTANGLE (Version 4.10)"
@y
-@d banner "This is CTANGLE (Version 4.8win32)"
+@d banner "This is CTANGLE (Version 4.10win32)"
@z
-@x
+@x section 24
boolean names_match(
name_pointer p, /* points to the proposed match */
const char *first, /* position of first character of string */
@@ -23,15 +23,13 @@ size_t l, /* length of identifier */
eight_bits t) /* not used by \.{CTANGLE} */
@z
-@x
+@x section 25
void
init_node(
name_pointer node)
{
node->equiv=(void *)text_info;
}
-void
-init_p(name_pointer p,eight_bits t) {@+(void)p;@+(void)t;@+}
@y
void
init_node(
@@ -39,6 +37,4 @@ name_pointer node)
{
node->equiv=(void *)text_info;
}
-void __cdecl
-init_p(name_pointer p,eight_bits t) {@+(void)p;@+(void)t;@+}
@z
diff --git a/web/c_cpp/cweb/ctangle.c b/web/c_cpp/cweb/ctangle.c
index 262469d611..2c31732e22 100644
--- a/web/c_cpp/cweb/ctangle.c
+++ b/web/c_cpp/cweb/ctangle.c
@@ -1,8 +1,8 @@
/*1:*/
#line 66 "ctangle.w"
-/*4:*/
-#line 44 "common.h"
+/*5:*/
+#line 48 "common.h"
#include
#include
@@ -12,10 +12,10 @@
#include
#include
-/*:4*/
+/*:5*/
#line 67 "ctangle.w"
-#define banner "This is CTANGLE (Version 4.8)" \
+#define banner "This is CTANGLE (Version 4.10)" \
#define ctangle false
#define cweave true \
@@ -63,14 +63,15 @@
#define llink link
#define rlink dummy.Rlink
#define root name_dir->rlink \
- \
+
+#define ilk dummy.Ilk \
#define spotless 0
#define harmless_message 1
#define error_message 2
#define fatal_message 3
-#define mark_harmless if(history==spotless) history= harmless_message
-#define mark_error history= error_message
+#define mark_harmless() if(history==spotless) history= harmless_message
+#define mark_error() history= error_message
#define confusion(s) fatal("! This can't happen: ",s) \
\
@@ -80,8 +81,8 @@
#define show_stats flags['s']
#define make_xrefs flags['x'] \
-#define update_terminal fflush(stdout)
-#define new_line putchar('\n')
+#define update_terminal() fflush(stdout)
+#define new_line() putchar('\n')
#define term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout) \
#define buf_size 200
@@ -107,11 +108,13 @@
#define output_defs_flag (2*024000-1) \
#define stack_size 50
-#define cur_end cur_state.end_field
+#define cur_state stack[stack_size+1] \
+
#define cur_byte cur_state.byte_field
#define cur_name cur_state.name_field
#define cur_repl cur_state.repl_field
-#define cur_section cur_state.section_field \
+#define cur_section cur_state.section_field
+#define cur_end (cur_repl+1) ->tok_start \
#define section_number 0201
#define identifier 0202 \
@@ -123,8 +126,10 @@
#define verbatim 4 \
#define max_files 256
+#define macro_end (cur_text+1) ->tok_start \
+
#define C_printf(c,a) fprintf(C_file,c,a)
-#define C_putc(c) putc((int) (c) ,C_file) \
+#define C_putc(c) fputc((int) (c) ,C_file) \
#define translit_length 10 \
@@ -162,24 +167,24 @@ typedef uint16_t sixteen_bits;
extern boolean program;
extern int phase;
-/*:3*//*5:*/
-#line 74 "common.h"
+/*:3*//*6:*/
+#line 78 "common.h"
extern char section_text[];
extern char*section_text_end;
extern char*id_first;
extern char*id_loc;
-/*:5*//*6:*/
-#line 92 "common.h"
+/*:6*//*7:*/
+#line 96 "common.h"
extern char buffer[];
extern char*buffer_end;
extern char*loc;
extern char*limit;
-/*:6*//*7:*/
-#line 109 "common.h"
+/*:7*//*8:*/
+#line 113 "common.h"
extern int include_depth;
extern FILE*file[];
@@ -194,16 +199,16 @@ extern boolean input_has_ended;
extern boolean changing;
extern boolean web_file_open;
-/*:7*//*9:*/
-#line 129 "common.h"
+/*:8*//*10:*/
+#line 133 "common.h"
extern sixteen_bits section_count;
extern boolean changed_section[];
extern boolean change_pending;
extern boolean print_where;
-/*:9*//*10:*/
-#line 143 "common.h"
+/*:10*//*11:*/
+#line 148 "common.h"
typedef struct name_info{
char*byte_start;
@@ -211,7 +216,7 @@ struct name_info*link;
union{
struct name_info*Rlink;
-char Ilk;
+eight_bits Ilk;
}dummy;
void*equiv_or_xref;
}name_info;
@@ -227,13 +232,13 @@ extern name_pointer hash[];
extern hash_pointer hash_end;
extern hash_pointer h;
-/*:10*//*12:*/
-#line 187 "common.h"
+/*:11*//*13:*/
+#line 193 "common.h"
extern int history;
-/*:12*//*14:*/
-#line 203 "common.h"
+/*:13*//*15:*/
+#line 211 "common.h"
extern int argc;
extern char**argv;
@@ -243,8 +248,8 @@ extern char idx_file_name[];
extern char scn_file_name[];
extern boolean flags[];
-/*:14*//*15:*/
-#line 217 "common.h"
+/*:15*//*16:*/
+#line 225 "common.h"
extern FILE*C_file;
extern FILE*tex_file;
@@ -252,7 +257,7 @@ extern FILE*idx_file;
extern FILE*scn_file;
extern FILE*active_file;
-/*:15*/
+/*:16*/
#line 69 "ctangle.w"
/*19:*/
@@ -265,10 +270,9 @@ sixteen_bits text_link;
typedef text*text_pointer;
/*:19*//*31:*/
-#line 274 "ctangle.w"
+#line 267 "ctangle.w"
typedef struct{
-eight_bits*end_field;
eight_bits*byte_field;
name_pointer name_field;
text_pointer repl_field;
@@ -290,32 +294,30 @@ static eight_bits*tok_mem_end= tok_mem+max_toks-1;
static eight_bits*tok_ptr;
/*:20*//*26:*/
-#line 200 "ctangle.w"
+#line 196 "ctangle.w"
static text_pointer last_unnamed;
/*:26*//*32:*/
-#line 291 "ctangle.w"
+#line 285 "ctangle.w"
-static output_state cur_state;
-
-static output_state stack[stack_size+1];
+static output_state stack[stack_size+2];
static stack_pointer stack_end= stack+stack_size;
static stack_pointer stack_ptr;
/*:32*//*37:*/
-#line 367 "ctangle.w"
+#line 357 "ctangle.w"
static int cur_val;
/*:37*//*42:*/
-#line 459 "ctangle.w"
+#line 449 "ctangle.w"
static eight_bits out_state;
static boolean protect;
/*:42*//*45:*/
-#line 490 "ctangle.w"
+#line 480 "ctangle.w"
static name_pointer output_files[max_files];
static name_pointer*cur_out_file,*end_output_files,*an_output_file;
@@ -323,33 +325,33 @@ static char cur_section_name_char;
static char output_file_name[longest_name+1];
/*:45*//*52:*/
-#line 590 "ctangle.w"
+#line 573 "ctangle.w"
static boolean output_defs_seen= false;
/*:52*//*57:*/
-#line 703 "ctangle.w"
+#line 687 "ctangle.w"
-static char translit[128][translit_length];
+static char translit[0200][translit_length];
/*:57*//*62:*/
-#line 779 "ctangle.w"
+#line 763 "ctangle.w"
static eight_bits ccode[256];
/*:62*//*66:*/
-#line 839 "ctangle.w"
+#line 823 "ctangle.w"
static boolean comment_continues= false;
/*:66*//*68:*/
-#line 876 "ctangle.w"
+#line 860 "ctangle.w"
static name_pointer cur_section_name;
static boolean no_where;
/*:68*//*82:*/
-#line 1193 "ctangle.w"
+#line 1177 "ctangle.w"
static text_pointer cur_text;
static eight_bits next_control;
@@ -357,92 +359,94 @@ static eight_bits next_control;
/*:82*/
#line 71 "ctangle.w"
-/*8:*/
-#line 123 "common.h"
+/*4:*/
+#line 43 "common.h"
+
+extern void common_init(void);
+
+/*:4*//*9:*/
+#line 127 "common.h"
extern boolean get_line(void);
extern void check_complete(void);
extern void reset_input(void);
-/*:8*//*11:*/
-#line 166 "common.h"
+/*:9*//*12:*/
+#line 171 "common.h"
-extern boolean names_match(name_pointer,const char*,size_t,eight_bits);
extern name_pointer id_lookup(const char*,const char*,eight_bits);
extern name_pointer section_lookup(char*,char*,boolean);
-extern void init_node(name_pointer);
-extern void init_p(name_pointer,eight_bits);
extern void print_prefix_name(name_pointer);
extern void print_section_name(name_pointer);
extern void sprint_section_name(char*,name_pointer);
-/*:11*//*13:*/
-#line 190 "common.h"
+extern boolean names_match(name_pointer,const char*,size_t,eight_bits);
+
+extern void init_node(name_pointer);
+
+/*:12*//*14:*/
+#line 196 "common.h"
extern int wrap_up(void);
extern void err_print(const char*);
extern void fatal(const char*,const char*);
extern void overflow(const char*);
-/*:13*//*16:*/
-#line 225 "common.h"
-
-extern void common_init(void);
extern void print_stats(void);
-/*:16*//*30:*/
-#line 246 "ctangle.w"
+/*:14*//*30:*/
+#line 242 "ctangle.w"
static void store_two_bytes(sixteen_bits);
/*:30*//*35:*/
-#line 330 "ctangle.w"
+#line 321 "ctangle.w"
static void push_level(name_pointer);
static void pop_level(boolean);
/*:35*//*39:*/
-#line 404 "ctangle.w"
+#line 394 "ctangle.w"
static void get_output(void);
/*:39*//*44:*/
-#line 480 "ctangle.w"
+#line 470 "ctangle.w"
static void flush_buffer(void);
/*:44*//*49:*/
-#line 557 "ctangle.w"
+#line 541 "ctangle.w"
static void phase_two(void);
/*:49*//*53:*/
-#line 593 "ctangle.w"
+#line 576 "ctangle.w"
static void output_defs(void);
static void out_char(eight_bits);
/*:53*//*65:*/
-#line 819 "ctangle.w"
+#line 803 "ctangle.w"
static eight_bits skip_ahead(void);
static boolean skip_comment(boolean);
/*:65*//*70:*/
-#line 926 "ctangle.w"
+#line 910 "ctangle.w"
static eight_bits get_next(void);
/*:70*//*84:*/
-#line 1219 "ctangle.w"
+#line 1203 "ctangle.w"
static void scan_repl(eight_bits);
/*:84*//*91:*/
-#line 1411 "ctangle.w"
+#line 1395 "ctangle.w"
static void scan_section(void);
/*:91*//*99:*/
-#line 1488 "ctangle.w"
+#line 1472 "ctangle.w"
static void phase_one(void);
/*:99*//*101:*/
-#line 1521 "ctangle.w"
+#line 1505 "ctangle.w"
static void skip_limbo(void);
/*:101*/
@@ -471,24 +475,24 @@ text_ptr= text_info+1;text_ptr->tok_start= tok_mem;
init_node(name_dir);
/*:23*//*27:*/
-#line 203 "ctangle.w"
+#line 199 "ctangle.w"
last_unnamed= text_info;text_info->text_link= macro;
/*:27*//*46:*/
-#line 500 "ctangle.w"
+#line 490 "ctangle.w"
cur_out_file= end_output_files= output_files+max_files;
/*:46*//*58:*/
-#line 706 "ctangle.w"
+#line 690 "ctangle.w"
-{
-int i;
-for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned int)(128+i));
+{int i;
+for(i= 0;i<0200;i++)
+snprintf(translit[i],translit_length,"X%02X",(unsigned int)(0200+i));
}
/*:58*//*63:*/
-#line 782 "ctangle.w"
+#line 766 "ctangle.w"
{
int c;
for(c= 0;c<256;c++)ccode[c]= ignore;
@@ -508,7 +512,7 @@ ccode['<']= ccode['(']= section_name;
ccode['\'']= ord;
/*:63*//*78:*/
-#line 1114 "ctangle.w"
+#line 1098 "ctangle.w"
section_text[0]= ' ';
/*:78*/
@@ -534,7 +538,7 @@ return length(p)==l&&strncmp(first,p->byte_start,l)==0;
}
/*:24*//*25:*/
-#line 170 "ctangle.w"
+#line 168 "ctangle.w"
void
init_node(
@@ -542,11 +546,9 @@ name_pointer node)
{
node->equiv= (void*)text_info;
}
-void
-init_p(name_pointer p,eight_bits t){(void)p;(void)t;}
/*:25*//*29:*/
-#line 236 "ctangle.w"
+#line 232 "ctangle.w"
static void
store_two_bytes(
@@ -558,7 +560,7 @@ if(tok_ptr+2> tok_mem_end)overflow("token");
}
/*:29*//*34:*/
-#line 315 "ctangle.w"
+#line 307 "ctangle.w"
static void
push_level(
@@ -569,13 +571,12 @@ if(stack_ptr==stack_end)overflow("stack");
stack_ptr++;
if(p!=NULL){
cur_name= p;cur_repl= (text_pointer)p->equiv;
-cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start;
-cur_section= 0;
+cur_byte= cur_repl->tok_start;cur_section= 0;
}
}
/*:34*//*36:*/
-#line 338 "ctangle.w"
+#line 329 "ctangle.w"
static void
pop_level(
@@ -583,15 +584,14 @@ boolean flag)
{
if(flag&&cur_repl->text_linktext_link+text_info;
-cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start;
-return;
+cur_byte= cur_repl->tok_start;return;
}
stack_ptr--;
if(stack_ptr> stack)cur_state= *stack_ptr;
}
/*:36*//*38:*/
-#line 374 "ctangle.w"
+#line 364 "ctangle.w"
static void
get_output(void)
@@ -614,7 +614,7 @@ switch(a/024000){
case 0:cur_val= (int)a;out_char(identifier);break;
case 1:if(a==output_defs_flag)output_defs();
else/*40:*/
-#line 409 "ctangle.w"
+#line 399 "ctangle.w"
{
a-= 024000;
@@ -628,7 +628,7 @@ goto restart;
}
/*:40*/
-#line 395 "ctangle.w"
+#line 385 "ctangle.w"
break;
default:cur_val= (int)a-050000;
@@ -639,7 +639,7 @@ out_char(section_number);
}
/*:38*//*43:*/
-#line 467 "ctangle.w"
+#line 457 "ctangle.w"
static void
flush_buffer(void)
@@ -648,13 +648,13 @@ C_putc('\n');
if(cur_line%100==0&&show_progress){
putchar('.');
if(cur_line%500==0)printf("%d",cur_line);
-update_terminal;
+update_terminal();
}
cur_line++;
}
/*:43*//*48:*/
-#line 519 "ctangle.w"
+#line 509 "ctangle.w"
static void
phase_two(void){
@@ -662,47 +662,41 @@ phase= 2;
web_file_open= false;
cur_line= 1;
/*33:*/
-#line 304 "ctangle.w"
+#line 296 "ctangle.w"
stack_ptr= stack+1;cur_name= name_dir;cur_repl= text_info->text_link+text_info;
-cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start;cur_section= 0;
+cur_byte= cur_repl->tok_start;cur_section= 0;
/*:33*/
-#line 525 "ctangle.w"
+#line 515 "ctangle.w"
/*51:*/
-#line 586 "ctangle.w"
+#line 569 "ctangle.w"
if(!output_defs_seen)
output_defs();
/*:51*/
-#line 526 "ctangle.w"
+#line 516 "ctangle.w"
if(text_info->text_link==macro&&cur_out_file==end_output_files){
-fputs("\n! No program text was specified.",stdout);mark_harmless;
+fputs("\n! No program text was specified.",stdout);mark_harmless();
}
else{
-if(cur_out_file==end_output_files){
if(show_progress){
-printf("\nWriting the output file (%s):",C_file_name);
-update_terminal;
-}
-}
-else{
-if(show_progress){
-fputs("\nWriting the output files:",stdout);
+printf(cur_out_file==end_output_files?
+"\nWriting the output file (%s):":
+"\nWriting the output files: (%s)",C_file_name);
-printf(" (%s)",C_file_name);
-update_terminal;
-}
-if(text_info->text_link==macro)goto writeloop;
+update_terminal();
}
+if(text_info->text_link!=macro){
while(stack_ptr> stack)get_output();
flush_buffer();
-writeloop:/*50:*/
-#line 563 "ctangle.w"
+}
+/*50:*/
+#line 547 "ctangle.w"
for(an_output_file= end_output_files;an_output_file> cur_out_file;){
an_output_file--;
@@ -711,29 +705,28 @@ fclose(C_file);
if((C_file= fopen(output_file_name,"wb"))==NULL)
fatal("! Cannot open output file ",output_file_name);
-if(show_progress){printf("\n(%s)",output_file_name);update_terminal;}
+if(show_progress){printf("\n(%s)",output_file_name);update_terminal();}
cur_line= 1;
stack_ptr= stack+1;
cur_name= *an_output_file;
cur_repl= (text_pointer)cur_name->equiv;
cur_byte= cur_repl->tok_start;
-cur_end= (cur_repl+1)->tok_start;
while(stack_ptr> stack)get_output();
flush_buffer();
}
/*:50*/
-#line 549 "ctangle.w"
+#line 533 "ctangle.w"
if(show_happiness){
-if(show_progress)new_line;
+if(show_progress)new_line();
fputs("Done.",stdout);
}
}
}
/*:48*//*54:*/
-#line 600 "ctangle.w"
+#line 585 "ctangle.w"
static void
output_defs(void)
@@ -743,13 +736,12 @@ push_level(NULL);
for(cur_text= text_info+1;cur_texttext_link==macro){
cur_byte= cur_text->tok_start;
-cur_end= (cur_text+1)->tok_start;
C_printf("%s","#define ");
out_state= normal;
protect= true;
-while(cur_bytebyte_start,k= (cur_val+name_dir+1)->byte_start;
-jbyte_start;
+j<(cur_val+name_dir+1)->byte_start;j++)
if((eight_bits)(*j)<0200)C_putc(*j);
else C_printf("%s",translit[(eight_bits)(*j)-0200]);
out_state= num_or_id;break;
/*:59*/
-#line 655 "ctangle.w"
+#line 639 "ctangle.w"
/*60:*/
-#line 722 "ctangle.w"
+#line 706 "ctangle.w"
case section_number:
if(cur_val> 0)C_printf("/*%d:*/",cur_val);
@@ -819,8 +811,8 @@ C_printf("\n#line %d \"",(int)a);
cur_val= (int)(*cur_byte++-0200)*0400;
cur_val+= *cur_byte++;
-for(j= (cur_val+name_dir)->byte_start,k= (cur_val+name_dir+1)->byte_start;
-jbyte_start;
+j<(cur_val+name_dir+1)->byte_start;j++){
if(*j=='\\'||*j=='"')C_putc('\\');
C_putc(*j);
}
@@ -829,10 +821,10 @@ C_putc('"');C_putc('\n');
break;
/*:60*/
-#line 656 "ctangle.w"
+#line 640 "ctangle.w"
/*56:*/
-#line 674 "ctangle.w"
+#line 658 "ctangle.w"
case plus_plus:C_putc('+');C_putc('+');out_state= normal;break;
case minus_minus:C_putc('-');C_putc('-');out_state= normal;break;
@@ -853,7 +845,7 @@ case minus_gt_ast:C_putc('-');C_putc('>');C_putc('*');out_state= normal;
break;
/*:56*/
-#line 657 "ctangle.w"
+#line 641 "ctangle.w"
case'=':case'>':C_putc(cur_char);C_putc(' ');
out_state= normal;break;
@@ -872,7 +864,7 @@ default:C_putc(cur_char);out_state= normal;break;
}
/*:55*//*64:*/
-#line 803 "ctangle.w"
+#line 787 "ctangle.w"
static eight_bits
skip_ahead(void)
@@ -890,7 +882,7 @@ if(c!=ignore||*(loc-1)=='>')return c;
}
/*:64*//*67:*/
-#line 842 "ctangle.w"
+#line 826 "ctangle.w"
static boolean skip_comment(
boolean is_long_comment)
@@ -924,7 +916,7 @@ else loc++;
}
/*:67*//*69:*/
-#line 883 "ctangle.w"
+#line 867 "ctangle.w"
static eight_bits
get_next(void)
@@ -938,7 +930,7 @@ if(get_line()==false)return new_section;
else if(print_where&&!no_where){
print_where= false;
/*85:*/
-#line 1229 "ctangle.w"
+#line 1213 "ctangle.w"
{
eight_bits a;
@@ -955,7 +947,7 @@ store_id(a);
}
/*:85*/
-#line 895 "ctangle.w"
+#line 879 "ctangle.w"
}
else return(eight_bits)'\n';
@@ -968,7 +960,7 @@ else continue;
}
loc++;
if(xisdigit(c)||c=='.')/*73:*/
-#line 967 "ctangle.w"
+#line 951 "ctangle.w"
{
boolean hex_flag= false;
id_first= loc-1;
@@ -1002,13 +994,13 @@ return constant;
}
/*:73*/
-#line 906 "ctangle.w"
+#line 890 "ctangle.w"
else if(c=='\''||c=='"'
||((c=='L'||c=='u'||c=='U')&&(*loc=='\''||*loc=='"'))
||((c=='u'&&*loc=='8')&&(*(loc+1)=='\''||*(loc+1)=='"')))
/*74:*/
-#line 1004 "ctangle.w"
+#line 988 "ctangle.w"
{
char delim= (char)c;
id_first= section_text+1;
@@ -1052,11 +1044,11 @@ return string;
}
/*:74*/
-#line 910 "ctangle.w"
+#line 894 "ctangle.w"
else if(isalpha((int)c)||isxalpha(c)||ishigh(c))
/*72:*/
-#line 958 "ctangle.w"
+#line 942 "ctangle.w"
{
id_first= --loc;
do
@@ -1067,10 +1059,10 @@ id_loc= loc;return identifier;
}
/*:72*/
-#line 912 "ctangle.w"
+#line 896 "ctangle.w"
else if(c=='@')/*75:*/
-#line 1049 "ctangle.w"
+#line 1033 "ctangle.w"
switch(c= ccode[(eight_bits)*loc++]){
case ignore:continue;
@@ -1085,11 +1077,11 @@ continue;
case section_name:
cur_section_name_char= *(loc-1);
/*77:*/
-#line 1094 "ctangle.w"
+#line 1078 "ctangle.w"
{
char*k= section_text;
/*79:*/
-#line 1116 "ctangle.w"
+#line 1100 "ctangle.w"
while(true){
if(loc> limit&&get_line()==false){
@@ -1099,7 +1091,7 @@ loc= buffer+1;break;
}
c= (eight_bits)*loc;
/*80:*/
-#line 1139 "ctangle.w"
+#line 1123 "ctangle.w"
if(c=='@'){
c= (eight_bits)*(loc+1);
@@ -1118,7 +1110,7 @@ err_print("! Nesting of section names not allowed");break;
}
/*:80*/
-#line 1124 "ctangle.w"
+#line 1108 "ctangle.w"
loc++;if(k=section_text_end){
fputs("\n! Section name too long: ",stdout);
term_write(section_text+1,25);
-printf("...");mark_harmless;
+printf("...");mark_harmless();
}
if(*k==' '&&k> section_text)k--;
/*:79*/
-#line 1096 "ctangle.w"
+#line 1080 "ctangle.w"
if(k-section_text> 3&&strncmp(k-2,"...",3)==0)
cur_section_name= section_lookup(section_text+1,k-3,true);
@@ -1144,7 +1136,7 @@ else cur_section_name= section_lookup(section_text+1,k,false);
if(cur_section_name_char=='(')
/*47:*/
-#line 504 "ctangle.w"
+#line 494 "ctangle.w"
{
for(an_output_file= cur_out_file;
@@ -1158,16 +1150,16 @@ else overflow("output files");
}
/*:47*/
-#line 1104 "ctangle.w"
+#line 1088 "ctangle.w"
return section_name;
}
/*:77*/
-#line 1062 "ctangle.w"
+#line 1046 "ctangle.w"
case string:/*81:*/
-#line 1161 "ctangle.w"
+#line 1145 "ctangle.w"
id_first= loc++;*(limit+1)= '@';*(limit+2)= '>';
while(*loc!='@'||*(loc+1)!='>')loc++;
@@ -1177,10 +1169,10 @@ id_loc= loc;loc+= 2;
return string;
/*:81*/
-#line 1063 "ctangle.w"
+#line 1047 "ctangle.w"
case ord:/*76:*/
-#line 1074 "ctangle.w"
+#line 1058 "ctangle.w"
id_first= loc;
if(*loc=='\\')
@@ -1202,13 +1194,13 @@ loc++;
return ord;
/*:76*/
-#line 1064 "ctangle.w"
+#line 1048 "ctangle.w"
default:return c;
}
/*:75*/
-#line 913 "ctangle.w"
+#line 897 "ctangle.w"
else if(xisspace(c)){
if(!preprocessing||loc> limit)continue;
@@ -1218,7 +1210,7 @@ else return(eight_bits)' ';
}
else if(c=='#'&&loc==buffer+1)preprocessing= true;
mistake:/*71:*/
-#line 935 "ctangle.w"
+#line 919 "ctangle.w"
switch(c){
case'+':if(*loc=='+')compress(plus_plus);break;
@@ -1243,14 +1235,14 @@ case'!':if(*loc=='=')compress(non_eq);break;
}
/*:71*/
-#line 921 "ctangle.w"
+#line 905 "ctangle.w"
return c;
}
}
/*:69*//*83:*/
-#line 1197 "ctangle.w"
+#line 1181 "ctangle.w"
static void
scan_repl(
@@ -1258,7 +1250,7 @@ eight_bits t)
{
sixteen_bits a;
if(t==section_name)/*85:*/
-#line 1229 "ctangle.w"
+#line 1213 "ctangle.w"
{
eight_bits a;
@@ -1275,11 +1267,11 @@ store_id(a);
}
/*:85*/
-#line 1203 "ctangle.w"
+#line 1187 "ctangle.w"
while(true)switch(a= get_next()){
/*86:*/
-#line 1244 "ctangle.w"
+#line 1228 "ctangle.w"
case identifier:store_id(a);
if(*buffer=='#'&&(
@@ -1292,7 +1284,7 @@ break;
case section_name:if(t!=section_name)goto done;
else{
/*87:*/
-#line 1285 "ctangle.w"
+#line 1269 "ctangle.w"
{
char*try_loc= loc;
while(*try_loc==' '&&try_loctok_start= tok_ptr;
}
/*:83*//*90:*/
-#line 1378 "ctangle.w"
+#line 1362 "ctangle.w"
static void
scan_section(void)
@@ -1468,12 +1460,12 @@ text_pointer q;
sixteen_bits a;
section_count++;no_where= true;
if(*(loc-1)=='*'&&show_progress){
-printf("*%d",(int)section_count);update_terminal;
+printf("*%d",(int)section_count);update_terminal();
}
next_control= ignore;
while(true){
/*92:*/
-#line 1419 "ctangle.w"
+#line 1403 "ctangle.w"
while(next_controltext_link= macro;
/*:93*/
-#line 1394 "ctangle.w"
+#line 1378 "ctangle.w"
continue;
}
@@ -1512,14 +1504,14 @@ p= name_dir;break;
if(next_control==section_name){
p= cur_section_name;
/*94:*/
-#line 1448 "ctangle.w"
+#line 1432 "ctangle.w"
while((next_control= get_next())=='+');
if(next_control!='='&&next_control!=eq_eq)
continue;
/*:94*/
-#line 1402 "ctangle.w"
+#line 1386 "ctangle.w"
break;
}
@@ -1527,20 +1519,20 @@ return;
}
no_where= print_where= false;
/*95:*/
-#line 1453 "ctangle.w"
+#line 1437 "ctangle.w"
/*96:*/
-#line 1458 "ctangle.w"
+#line 1442 "ctangle.w"
store_two_bytes((sixteen_bits)(0150000+section_count));
/*:96*/
-#line 1454 "ctangle.w"
+#line 1438 "ctangle.w"
scan_repl(section_name);
/*97:*/
-#line 1462 "ctangle.w"
+#line 1446 "ctangle.w"
if(p==name_dir||p==NULL){
last_unnamed->text_link= cur_text-text_info;last_unnamed= cur_text;
@@ -1557,16 +1549,16 @@ cur_text->text_link= section_flag;
/*:97*/
-#line 1456 "ctangle.w"
+#line 1440 "ctangle.w"
/*:95*/
-#line 1408 "ctangle.w"
+#line 1392 "ctangle.w"
}
/*:90*//*98:*/
-#line 1477 "ctangle.w"
+#line 1461 "ctangle.w"
static void
phase_one(void){
@@ -1579,7 +1571,7 @@ check_complete();
}
/*:98*//*100:*/
-#line 1493 "ctangle.w"
+#line 1477 "ctangle.w"
static void
skip_limbo(void)
@@ -1593,7 +1585,7 @@ char c= *loc++;
switch(ccode[(eight_bits)c]){
case new_section:return;
case translit_code:/*102:*/
-#line 1523 "ctangle.w"
+#line 1507 "ctangle.w"
while(xisspace(*loc)&&loc=translit_length)
err_print("! Replacement string in @l too long");
@@ -1618,7 +1610,7 @@ translit[i-0200][loc-beg]= '\0';
}
/*:102*/
-#line 1505 "ctangle.w"
+#line 1489 "ctangle.w"
break;
case format_code:case'@':break;
case control_text:if(c=='q'||c=='Q'){
@@ -1636,7 +1628,7 @@ default:err_print("! Double @ should be used in limbo");
}
/*:100*//*103:*/
-#line 1549 "ctangle.w"
+#line 1533 "ctangle.w"
void
print_stats(void){
diff --git a/web/c_cpp/cweb/ctangle.w b/web/c_cpp/cweb/ctangle.w
index 0c372e59ed..c8ae55df85 100644
--- a/web/c_cpp/cweb/ctangle.w
+++ b/web/c_cpp/cweb/ctangle.w
@@ -2,7 +2,7 @@
% This program by Silvio Levy and Donald E. Knuth
% is based on a program by Knuth.
% It is distributed WITHOUT ANY WARRANTY, express or implied.
-% Version 4.8 --- June 2022
+% Version 4.10 --- August 2023
% Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
@@ -27,11 +27,11 @@
\mathchardef\RA="3221 % right arrow
\mathchardef\BA="3224 % double arrow
-\def\title{CTANGLE (Version 4.8)}
+\def\title{CTANGLE (Version 4.10)}
\def\topofcontents{\null\vfill
\centerline{\titlefont The {\ttitlefont CTANGLE} processor}
\vskip 15pt
- \centerline{(Version 4.8)}
+ \centerline{(Version 4.10)}
\vfill}
\def\botofcontents{\vfill
\noindent
@@ -61,7 +61,7 @@ Joachim Schrod, Lee Wittenberg, and others who have contributed improvements.
The ``banner line'' defined here should be changed whenever \.{CTANGLE}
is modified.
-@d banner "This is CTANGLE (Version 4.8)"
+@d banner "This is CTANGLE (Version 4.10)"
@c
@@/
@@ -162,10 +162,8 @@ eight_bits t) /* not used by \.{CTANGLE} */
return length(p)==l && strncmp(first,p->byte_start,l)==0;
}
-@ The common lookup routine refers to separate routines |init_node| and
-|init_p| when the data structure grows. Actually |init_p| is called only by
-\.{CWEAVE}, but we need to declare a dummy version so that
-the loader won't complain of its absence.
+@ The common lookup routine |id_lookup| refers to a separate routine
+|init_node| when the data structure grows.
@c
void
@@ -174,8 +172,6 @@ name_pointer node)
{
node->equiv=(void *)text_info;
}
-void
-init_p(name_pointer p,eight_bits t) {@+(void)p;@+(void)t;@+}
@* Tokens.
Replacement texts, which represent \CEE/ code in a compressed format,
@@ -247,13 +243,10 @@ sixteen_bits x)
@** Stacks for output. The output process uses a stack to keep track
of what is going on at different ``levels'' as the sections are being
-written out. Entries on this stack have five parts:
-
-\yskip\hang |end_field| is the |tok_mem| location where the replacement
-text of a particular level will end;
+written out. Entries on this stack have four parts:
-\hang |byte_field| is the |tok_mem| location from which the next token
-on a particular level will be read;
+\yskip\hang |byte_field| is the |tok_mem| location from which the next
+token on a particular level will be read;
\hang |name_field| points to the name corresponding to a particular level;
@@ -262,10 +255,10 @@ at a particular level;
\hang |section_field| is the section number, or zero if this is a macro.
-\yskip\noindent The current values of these five quantities are referred to
-quite frequently, so they are stored in a separate place instead of in
-the |stack| array. We call the current values |cur_end|, |cur_byte|,
-|cur_name|, |cur_repl|, and |cur_section|.
+\yskip\noindent The current values of these four quantities are referred to
+quite frequently, so they are stored in an extra slot at the very end of the
+|stack| array. We call the current values |cur_byte|, |cur_name|, |cur_repl|,
+and |cur_section|.
The global variable |stack_ptr| tells how many levels of output are
currently in progress. The end of all output occurs when the stack is
@@ -273,7 +266,6 @@ empty, i.e., when |stack_ptr==stack|.
@=
typedef struct {
- eight_bits *end_field; /* ending location of replacement text */
eight_bits *byte_field; /* present location within replacement text */
name_pointer name_field; /* |byte_start| index for text being output */
text_pointer repl_field; /* |tok_start| index for text being output */
@@ -282,16 +274,16 @@ typedef struct {
typedef output_state *stack_pointer;
@ @d stack_size 50 /* number of simultaneous levels of macro expansion */
-@d cur_end cur_state.end_field /* current ending location in |tok_mem| */
+@d cur_state stack[stack_size+1] /* |cur_byte|, |cur_name|, |cur_repl|,
+ and |cur_section| */
@d cur_byte cur_state.byte_field /* location of next output byte in |tok_mem|*/
@d cur_name cur_state.name_field /* pointer to current name being expanded */
@d cur_repl cur_state.repl_field /* pointer to current replacement text */
@d cur_section cur_state.section_field /* current section number being expanded */
+@d cur_end (cur_repl+1)->tok_start /* current ending location in |tok_mem| */
@=
-static output_state cur_state; /* |cur_end|, |cur_byte|, |cur_name|, |cur_repl|,
- and |cur_section| */
-static output_state stack[stack_size+1]; /* info for non-current levels */
+static output_state stack[stack_size+2]; /* info for non-current levels */
static stack_pointer stack_end=stack+stack_size; /* end of |stack| */
static stack_pointer stack_ptr; /* first unused location in the output state stack */
@@ -303,7 +295,7 @@ error message will have been generated before we do any of the initialization.
@=
stack_ptr=stack+1; cur_name=name_dir; cur_repl=text_info->text_link+text_info;
-cur_byte=cur_repl->tok_start; cur_end=(cur_repl+1)->tok_start; cur_section=0;
+cur_byte=cur_repl->tok_start; cur_section=0;
@ When the replacement text for name |p| is to be inserted into the output,
the following subroutine is called to save the old level of output and get
@@ -322,8 +314,7 @@ name_pointer p)
stack_ptr++;
if (p!=NULL) { /* |p==NULL| means we are in |output_defs| */
cur_name=p; cur_repl=(text_pointer)p->equiv;
- cur_byte=cur_repl->tok_start; cur_end=(cur_repl+1)->tok_start;
- cur_section=0;
+ cur_byte=cur_repl->tok_start; cur_section=0;
}
}
@@ -342,11 +333,10 @@ boolean flag) /* |flag==false| means we are in |output_defs| */
{
if (flag && cur_repl->text_linktext_link+text_info; /* stay on the same level */
- cur_byte=cur_repl->tok_start; cur_end=(cur_repl+1)->tok_start;
- return;
+ cur_byte=cur_repl->tok_start; return;
}
stack_ptr--; /* go down to the previous level */
- if (stack_ptr>stack) cur_state=*stack_ptr;
+ if (stack_ptr>stack) cur_state=*stack_ptr;@^system dependencies@>
}
@ The heart of the output procedure is the function |get_output|,
@@ -472,7 +462,7 @@ flush_buffer(void) /* writes one line to output file */
if (cur_line % 100 == 0 && show_progress) {
putchar('.');
if (cur_line % 500 == 0) printf("%d",cur_line);
- update_terminal; /* progress report */
+ update_terminal(); /* progress report */
}
cur_line++;
}
@@ -525,30 +515,24 @@ phase_two (void) {
@@;
@