From 79a173622efe7820bb3dfefaeb0b13303ef08b08 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 23 May 2020 03:00:54 +0000 Subject: CTAN sync 202005230300 --- macros/latex/contrib/ellipsis/README | 13 - macros/latex/contrib/ellipsis/README.md | 16 ++ macros/latex/contrib/ellipsis/ellipsis.dtx | 371 +++++++++++++++-------------- macros/latex/contrib/ellipsis/ellipsis.pdf | Bin 133199 -> 215749 bytes macros/latex/contrib/rec-thy/README | 9 +- macros/latex/contrib/rec-thy/rec-thy.pdf | Bin 178442 -> 113103 bytes macros/latex/contrib/rec-thy/rec-thy.sty | 330 +++++++++++++++++++++---- macros/latex/contrib/rec-thy/rec-thy.tex | 50 ++-- 8 files changed, 522 insertions(+), 267 deletions(-) delete mode 100644 macros/latex/contrib/ellipsis/README create mode 100644 macros/latex/contrib/ellipsis/README.md (limited to 'macros/latex/contrib') diff --git a/macros/latex/contrib/ellipsis/README b/macros/latex/contrib/ellipsis/README deleted file mode 100644 index 809b9bec89..0000000000 --- a/macros/latex/contrib/ellipsis/README +++ /dev/null @@ -1,13 +0,0 @@ -There is a problem in the way LaTeX handles ellipses: it always puts a -tiny bit more space after \dots in text mode than before it, which -often results in the ellipsis being off-center when set between two -other things. This is a simple package to fix that bug. - -Run latex on ellipsis.ins to generate the ellipsis.sty file, and then -run latex on ellipsis.dtx to generate the documentation. Put the file -ellipsis.sty where LaTeX will find it, and refresh TeX's list of -available files. - -Peter Heslin -p.j.heslin@dur.ac.uk - diff --git a/macros/latex/contrib/ellipsis/README.md b/macros/latex/contrib/ellipsis/README.md new file mode 100644 index 0000000000..b7b555e565 --- /dev/null +++ b/macros/latex/contrib/ellipsis/README.md @@ -0,0 +1,16 @@ +# Ellipsis.sty + +If you have ever tried to print something like [...] in LateX text mode, you may have noticed that the spacing is slightly off: there is too much spacing after the dots. This extra spacing is there for cases in which you want to put another dot, a comma, a semicolon, or similar, right after the ellipsis, and you want all four bits of punctuation to be evenly spaced. In such cases, you probably want the extra space, but in others you do not. + +Ellipsis.sty is a package that attempts to solve this problem by only adding the extra space in cases where the ellipsis is followed immediately by a punctuation character that should be spaced evenly with respect to the internal spacing between the three dots of the ellipsis. The package is described on p.~82 of the second edition of The LaTeX Companion. + +Get the package from [CTAN](https://www.ctan.org/pkg/ellipsis). + +Alternatively, run latex on ellipsis.ins to generate the ellipsis.sty file, and then run latex on ellipsis.dtx to generate the documentation. Put the file +ellipsis.sty where LaTeX will find it, and refresh TeX's list of +available files. + +See the PDF file for full documentation. + +Peter Heslin +p.j.heslin@dur.ac.uk diff --git a/macros/latex/contrib/ellipsis/ellipsis.dtx b/macros/latex/contrib/ellipsis/ellipsis.dtx index 4db66a1410..42462ab2a2 100644 --- a/macros/latex/contrib/ellipsis/ellipsis.dtx +++ b/macros/latex/contrib/ellipsis/ellipsis.dtx @@ -1,8 +1,8 @@ % \iffalse meta-comment % -% Copyright (C) 2003 by Peter J. Heslin +% Copyright (C) 2003-20 by Peter Heslin % -------------------------------------------------- -% +% % This file may be distributed and/or modified under the conditions of % the LaTeX Project Public License, either version 1.2 of this license % or (at your option) any later version. The latest version of this @@ -18,12 +18,12 @@ % \iffalse %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{ellipsis} -% [2004/9/28 v1.6 ellipsis: fixes spacing around \dots] +% [2020/5/22 v1.7 ellipsis: fixes spacing around \dots] % %<*driver> \documentclass{ltxdoc} \usepackage{ellipsis} -\EnableCrossrefs +\EnableCrossrefs \CodelineIndex \RecordChanges \begin{document} @@ -32,7 +32,7 @@ % % \fi % -% \CheckSum{135} +% \CheckSum{153} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -65,198 +65,189 @@ % from being gobbled.} % \changes{v1.5}{2004/9/24}{Added the xspace option.} % \changes{v1.6}{2004/9/28}{Fixed incompatibility with French Babel.} +% \changes{v1.7}{2020/5/22}{Fixed incompatilbility with amsmath; fixed fragile +% command; fixed spacing when \cs{nofrenchspacing}; all fixes thanks to Frank +% Mittelbach. Added ref to xellipsis package.} % % \GetFileInfo{ellipsis.sty} % % \title{The \textsf{ellipsis} package\thanks{This document % corresponds to \textsf{ellipsis}~\fileversion, dated \filedate. % Many thanks to Frank Mittelbach, who made numerous suggestions -% that greatly improved this package.}} +% and bugfixes that greatly improved this package.}} % \author{Peter J. Heslin \\ \texttt{p.j.heslin@dur.ac.uk}} % % \maketitle % % \section{Introduction} % -% There is an unevenness in the way \LaTeX\ puts space around ellipses -% (|\dots|) in text mode. It is a small problem, but it is a serious -% matter for those who care about such things. This package attempts -% to fix that bug, and this documentation offers an explanation of the -% bug and offers advice on how to use ellipses in your text. This -% document should not be taken as offering guidance on the use of -% ellipses in mathematical formulas or non-English language text. -% -% The standard definition of |\dots| in \LaTeX\ takes the inter-word -% stretch for the current font and puts that amount of space in -% between three normal dots; it then also adds that amount of space -% \emph{after} the final dot. The documentation of the \LaTeX\ code -% acknowledges that this is a `kludge' in that the interword stretch -% is being used for a purpose it was not meant for. There is another -% problem with this definition, however: the extra space after the -% final dot of the ellipsis. Thus there is always more space after -% the ellipsis than before it, so that it is not properly centered -% between the text on either side. -% -% That extra space is there for a good reason. When the ellipsis is -% followed by another dot, as at the end of a sentence, it is -% important that all four dots should be evenly spaced, otherwise the -% final dot is much closer than the others and the result is hideous. -% The same holds true for commas, exclamation marks and other -% punctuation on the baseline. So the extra space is necessary when -% an ellipsis is followed by certain punctuation characters, and the -% bug consists in the fact that \LaTeX\ always adds it, regardless of -% what text follows. -% +% There is an unevenness in the way \LaTeX\ puts space around ellipses (|\dots|) +% in text mode. This package attempts to fix that bug, and this documentation +% offers an explanation of the bug and offers advice on how to use ellipses in +% your text. This document does not offer guidance on the use of ellipses in +% mathematical formulas or non-English language text. +% +% The standard definition of |\dots| in \LaTeX\ takes the inter-word stretch for +% the current font and puts that amount of space in between three normal dots; +% it then also adds that amount of space \emph{after} the final dot. The +% documentation of the \LaTeX\ code acknowledges that this is a `kludge' in that +% the interword stretch is being used for a purpose it was not meant for. There +% is another problem with this definition, however: the extra space after the +% final dot of the ellipsis. There is always more space after the ellipsis +% than before it, so that it is not properly centered between the text on either +% side. +% +% That extra space is there for a good reason. When the ellipsis is followed by +% another dot, as at the end of a sentence, it is important that all four dots +% should be evenly spaced, otherwise the final dot is much closer than the +% others and the result is hideous. The same holds true for commas, exclamation +% marks and other punctuation on the baseline. So the extra space is necessary +% when an ellipsis is followed by certain punctuation characters, and the bug +% consists in the fact that \LaTeX\ always adds it, regardless of what text +% follows. +% % This package implements a simple fix. It redefines the |\dots| and -% |\textellipsis| commands so that they can look ahead at the next -% character and change their behavior accordingly: if the next -% character is one of .,;:?! the extra space is added, if not, no -% extra space is added (if you load a package that makes any of these -% characters active, you may want to reload this list; see the section -% below on see below on |\ellipsispunctuation| and compatibility). -% This particular list of punctuation marks was not chosen -% arbitrarily: it includes all marks with a dot on the baseline (or a -% comma, which is like a dot with a tail). These marks produce a -% series of four dots which must be spaced evenly~-- no other -% punctuation mark would normally benefit from having the extra space -% added. -% -% The solution can be brittle~-- for example, if you write |\dots{}.| -% then the extra space will \emph{not} be added, since the braces come -% between the command and the dot; the result will be very ugly. The -% solution to this is to enter ellipses carefully and consistently in -% your source text. If you use ellipses as recommended below, then -% the potential problem of evenly spacing an ellipsis that comes -% immediately after a baseline punctuation mark does not arise, since -% that combination of characters will not normally be used. -% -% There is another package, \textsf{lips.sty}, that addresses the -% problem of text ellipses in \LaTeX. It strictly follows the advice -% of the \emph{Chicago Manual of Style} in putting full word spaces -% between the dots of the ellipsis, and does not provide the -% possibility of more a tightly set ellipsis like the normal \LaTeX\ -% default. It imposes its own set of rules for the spacing before and -% after an ellipsis. Many typographers, however, firmly reject the -% Chicago style of setting ellipses, and rightly so; see Jan -% Tschichold, \emph{The Form of the Book: Essays on the Morality of -% Good Design} (Hartley \& Marks, 1991), pp~130f, or Robert +% |\textellipsis| commands so that they can look ahead at the next character and +% change their behavior accordingly: if the next character is one of .,;:?! the +% extra space is added, if not, no extra space is added (if you load a package +% that makes any of these characters active, you may want to reload this list; +% see the section below on see below on |\ellipsispunctuation| and +% compatibility). This particular list of punctuation marks was not chosen +% arbitrarily: it includes all marks with a dot on the baseline (or a comma, +% which is like a dot with a tail). These marks produce a series of four dots +% which must be spaced evenly~-- no other punctuation mark would normally +% benefit from having the extra space added. +% +% The solution can be brittle~-- for example, if you write |\dots{}.| then the +% extra space will \emph{not} be added, since the braces come between the +% command and the dot; the result will be very ugly. The solution to this is to +% enter ellipses carefully and consistently in your source text. If you use +% ellipses as recommended below, then the potential problem of evenly spacing an +% ellipsis that comes immediately after a baseline punctuation mark does not +% arise, since that combination of characters will not normally be used. +% +% There are two other packages, \textsf{lips} and \textsf{xellipsis}, that +% address the problem of text ellipses in \LaTeX. The former strictly follows +% the advice of the \emph{Chicago Manual of Style} in putting full word spaces +% between the dots of the ellipsis, and does not provide the possibility of more +% a tightly set ellipsis like the normal \LaTeX\ default. It also imposes its +% own set of rules for the spacing before and after an ellipsis. The latter +% offers more flexibility, but also tends to prefer the Chicago/MLA style. The +% Chicago and MLA manuals are good guides for preparing a typescript that will +% be typeset by someone else; but for fine typography, they are they wrong +% authorities to follow. +% +% Traditional typographers firmly reject the Chicago style of setting ellipses, +% and rightly so; see Jan Tschichold, \emph{The Form of the Book: Essays on the +% Morality of Good Design} (Hartley \& Marks, 1991), pp~130f, or Robert % Bringhurst, \emph{The Elements of Typographic Style} % (2\textsuperscript{nd}~ed, Hartley \& Marks, 1997) pp~82f. +% % \DescribeMacro{chicago} If you nevertheless want or have to use the -% Chicago-style, widely spaced ellipsis with this package, you can -% pass it the option |chicago|, like so: -% |\usepackage[chicago]{ellipsis}|. If, on the other hand, you want -% to adhere to the full recommendations of the Chicago manual, then -% you should probably use \textsf{lips.sty} instead of this package. -% \DescribeMacro{mla} \textsf{Ellipsis.sty} also has an |mla| package -% option, modeled on the same feature of \textsf{lips.sty}, which +% Chicago-style, widely spaced ellipsis with this package, you can pass it the +% option |chicago|, like so: |\usepackage[chicago]{ellipsis}|. If, on the other +% hand, you want to adhere to the full recommendations of the Chicago manual, +% then you should probably use \textsf{lips} or \textsf{xellipsis} instead of +% this package. \DescribeMacro{mla} \textsf{Ellipsis.sty} also has an |mla| +% package option, modeled on the same feature of \textsf{lips.sty}, which % automatically puts square brackets around all ellipses. % -% A different solution to the general problem would be to install a -% font which includes a precomposed ellipsis glyph, and to redefine -% |\dots| simply to insert this character. In that case, you do not -% need this package at all, but you should make sure that the ellipsis -% character kerns properly, especially with following .,:;!? +% In conclusion, the best solution to the problem of typesetting ellipses is not +% to use this package at all, but to use XeTeX. You can put the Unicode +% character for ``horizontal ellipsis'' into your source, and use a font with a +% precomposed ellipsis glyph. If you use a professional-quality OpenType font, +% it will have an ellipsis glyph created by the type designer to fit with the +% typeface and with proper kerning for punctuation afterward. Not all fonts do +% this, so make sure that the ellipsis character kerns properly with following +% .,:;!? % % \section{Usage} -% -% Install the package and put |\usepackage{ellipsis}| in your -% preamble. As noted above, you should be consistent in the way you -% enter ellipses in your text. For English text, Bringhurst (loc.\ -% cit.) recommends putting a space before and after an ellipsis that -% appears between two words, but no space before an ellipsis that -% appears before a punctuation mark such as a period, comma, etc. -% Then there is the question of breaking or non-breaking space. I -% think it is odd to find an ellipsis at the beginning of a line, so -% normally I would enter text like this: |uh~\dots\ oh|. If setting -% text in narrow columns you may prefer to allow line breaks before -% the ellipsis as well as after. Before punctuation, you would enter -% ellipses without a space before or after, like so: -% |one, two, three\dots, ten\dots.| Note, however, that some -% publishers do not like to see an ellipsis combined with a period or -% comma, and would rather a simple ellipsis at the end of a sentence -% and so forth. -% -% One problem with using the |\dots| command is that it does not take -% an argument. So there is no brace to terminate it, and if you want -% a space to follow the ellipsis, you need to take care that it does -% not disappear, and so to write it like this: -% |\dots\|\textvisiblespace\ or |{\dots}|\textvisiblespace\ or -% |\dots{}|\textvisiblespace. If you forget to do this, the space -% will disappear, gobbled up by the macro. I frequently find myself -% making this mistake, so I have added another option to help with -% it. \DescribeMacro{xspace} If you pass the option |xspace| to -% \textsf{ellipsis.sty}, an |\xspace| macro will be added after every -% |\dots| macro. See the \emph{\LaTeX\ Companion} for full -% information on that package, but in short, it adds a space except -% when followed by certain punctuation characters (a superset of the -% |\ellipsispunctuation| list mentioned above). So you automatically -% get space after the ellipsis, unless it is immediately followed by -% punctuation, even if you write it like this: -% |one~\dots|\textvisiblespace|two|. If there are a few places where -% you don't want a space after |\dots|, then write it like this: -% |\dots{}|, and the space will be suppressed. -% -% \DescribeMacro{\ellipsisgap} -% You may wish to redefine the command |\ellipsisgap|, which is the -% space between the dots of the ellipsis. If you do this, you must do -% it in your preamble, \emph{after} the |\usepackage| line. The -% default value is the interword stretch of the current font, which is -% the normal \LaTeX\ definition. If you are using a font other than -% Computer Modern and if you are obsessive, you might wish to examine -% the ellipsis that the font designer included in your font and -% recreate it by defining the |\ellipsisgap| to an appropriate value, +% +% Install the package and put |\usepackage{ellipsis}| in your preamble. As +% noted above, you should be consistent in the way you enter ellipses in your +% text. For English text, Bringhurst (loc.\ cit.) recommends putting a space +% before and after an ellipsis that appears between two words, but no space +% before an ellipsis that appears before a punctuation mark such as a period, +% comma, etc. Then there is the question of breaking or non-breaking space. I +% think it is odd to find an ellipsis at the beginning of a line, so normally I +% would enter text like this: |uh~\dots\ oh|. If setting text in narrow columns +% you may prefer to allow line breaks before the ellipsis as well as after. +% Before punctuation, you would enter ellipses without a space before or after, +% like so: |one, two, three\dots, ten\dots.| Note, however, that some +% publishers do not like to see an ellipsis combined with a period or comma, and +% would rather a simple ellipsis at the end of a sentence and so forth. +% +% One problem with using the |\dots| command is that it does not take an +% argument. So there is no brace to terminate it, and if you want a space to +% follow the ellipsis, you need to take care that it does not disappear, and so +% to write it like this: |\dots\|\textvisiblespace\ or +% |{\dots}|\textvisiblespace\ or |\dots{}|\textvisiblespace. If you forget to +% do this, the space will disappear, gobbled up by the macro. I frequently find +% myself making this mistake, so I have added another option to help with it. +% \DescribeMacro{xspace} If you pass the option |xspace| to +% \textsf{ellipsis.sty}, an |\xspace| macro will be added after every |\dots| +% macro. See the \emph{\LaTeX\ Companion} for full information on that package, +% but in short, it adds a space except when followed by certain punctuation +% characters (a superset of the |\ellipsispunctuation| list mentioned above). +% So you automatically get space after the ellipsis, unless it is immediately +% followed by punctuation, even if you write it like this: +% |one~\dots|\textvisiblespace|two|. If there are a few places where you don't +% want a space after |\dots|, then write it like this: |\dots{}|, and the space +% will be suppressed. +% +% \DescribeMacro{\ellipsisgap} +% You may wish to redefine the command |\ellipsisgap|, which is the space +% between the dots of the ellipsis. If you do this, you must do it in your +% preamble, \emph{after} the |\usepackage| line. The default value is the +% interword stretch of the current font, which is the normal \LaTeX\ definition. +% If you are using a font other than Computer Modern and if you are obsessive, +% you might wish to examine the ellipsis that the font designer included in your +% font and recreate it by defining the |\ellipsisgap| to an appropriate value, % like so: % \begin{verbatim} -% \usepackage{ellipsis} -% This value seems right for the native ellipsis in Adobe Caslon: +% \usepackage{ellipsis} +% This value seems right for the native ellipsis in Adobe Caslon: % \renewcommand{\ellipsisgap}{0.1em} -% \end{verbatim} -% You should probably define this in font-size dependent units, such -% as the em. See Bringhurst (loc.\ cit.) for further thoughts on the -% construction of ellipses. +% \end{verbatim} +% You should probably define this in font-size dependent units, such as the em. +% See Bringhurst (loc.\ cit.) for further thoughts on the construction of +% ellipses. % % \section{Compatibility} % -% It was mentioned above that if certain punctuation characters are -% made active, it will interfere with the ability of this package to -% recognize them. One important example of that practice is in the -% French option of Babel, which makes certain `double punctuation' -% characters active, in order to put a bit of space before them. In -% this particular case, however, you do \emph{not} want to redefine -% the |\ellipsispunctuation| list to make this package aware of these -% characters. If you were to do so, extra kerning would be added -% after an ellipsis in addition to thin space before the following -% punctuation, resulting in about twice as much space as needed. If -% you leave the default value of |\ellipsispunctuation|, then these -% active characters will not be recognized, and no extra kern will be -% added. Instead, the ellipsis will be separated from any following -% double punctuation by a thin space. This may not be quite the same -% as the space between dots of the ellipsis, but it may be close -% enough that no one will notice the difference. In any case, that's -% what French Babel does. -% -% Whether Babel is here following some sophisticated French -% typographical rule, or it's just a fudge, I don't know. Because -% Babel French removes the extra space from after |\dots|, but only -% adds space before `double punctuation', there is no space between an -% ellipsis and `single punctuation', which looks ugly to my -% (non-French) eyes. In these cases, using |ellipsis.sty| will add -% the extra space whereas French Babel on its own does not. This may -% be the wrong thing to do; if you are typesetting a text in French, -% you should familiarize yourself with the relevant norms, and -% possibly refrain from using this package. I have not familiarized -% myself with the rules for typesetting ellipses in languages other -% than English. If you are loading the French option of Babel because -% you are quoting French text in a document whose main language is not -% French, then you should not worry about these issues. Because -% French Babel wants to redefine |\dots|, you must load |ellipsis.sty| -% \emph{after} Babel if you are using the French option (even if you -% have no French text in your document). -% -% The Spanish option of Babel has its own way of setting an -% ellipsis,but it uses a different command (|\...|), so that doesn't -% interfere with the working of this package. +% It was mentioned above that if certain punctuation characters are made active, +% it will interfere with the ability of this package to recognize them. One +% important example of that practice is in the French option of Babel, which +% makes certain `double punctuation' characters active, in order to put a bit of +% space before them. In this particular case, however, you do \emph{not} want +% to redefine the |\ellipsispunctuation| list to make this package aware of +% these characters. If you were to do so, extra kerning would be added after an +% ellipsis in addition to thin space before the following punctuation, resulting +% in about twice as much space as needed. If you leave the default value of +% |\ellipsispunctuation|, then these active characters will not be recognized, +% and no extra kern will be added. Instead, the ellipsis will be separated from +% any following double punctuation by a thin space. This may not be quite the +% same as the space between dots of the ellipsis, but it may be close enough +% that no one will notice the difference. In any case, that's what French Babel +% does. +% +% Whether Babel is here following some sophisticated French typographical rule, +% or it's just a fudge, I don't know. Because Babel French removes the extra +% space from after |\dots|, but only adds space before `double punctuation', +% there is no space between an ellipsis and `single punctuation', which looks +% ugly to my (non-French) eyes. In these cases, using |ellipsis.sty| will add +% the extra space whereas French Babel on its own does not. This may be the +% wrong thing to do; if you are typesetting a text in French, you should +% familiarize yourself with the relevant norms, and possibly refrain from using +% this package. If you are loading the French option of Babel because you are +% quoting French text in a document whose main language is not French, then you +% should not worry about these issues. Because French Babel wants to redefine +% |\dots|, you must load |ellipsis.sty| \emph{after} Babel if you are using the +% French option (even if you have no French text in your document). +% +% The Spanish option of Babel has its own way of setting an ellipsis,but it uses +% a different command (|\...|), so that doesn't interfere with the working of +% this package. % % \StopEventually{\PrintChanges} % @@ -274,8 +265,8 @@ % \begin{macro}{\ellipsis@before} % \begin{macro}{\ellipsis@after} % We provide the hooks \cs{ellipsis@before} and \cs{ellipsis@after} to -% allow the production of automatically bracketed ellipses. -% +% allow the production of automatically bracketed ellipses. +% % \DescribeMacro{mla} % The \textsf{mla} package option sets these so as to produce ellipses % like this: [...] If you do this, you never want the extra space @@ -309,22 +300,22 @@ % when punctuation such as .,:;!? follows. % \begin{macrocode} \newcommand{\ellipsis@default}{% - \ellipsis@before - .\kern\ellipsisgap + \ellipsis@before .\kern\ellipsisgap .\kern\ellipsisgap + .\@\kern\ellipsisgap \ellipsis@after\relax} % \end{macrocode} % \end{macro} % % \begin{macro}{\ellipsis@centered} -% This is our new ellipsis \emph{without} the extra space after it. +% This is our new ellipsis \emph{without} the extra space after it. % \begin{macrocode} \newcommand{\ellipsis@centered}{% \ellipsis@before .\kern\ellipsisgap .\kern\ellipsisgap - .\ellipsis@after\relax} + .\@\ellipsis@after\relax} % \end{macrocode} % \end{macro} % @@ -338,7 +329,8 @@ % then explicitly reset the list. Otherwise the changed character % will no longer be recognized.' (quote from \textsf{ltfntcmd.dtx}) % In such a case, just repeat the line below, substituting -% \cs{renewcommand} for \cs{newcommand}. +% \cs{renewcommand} for \cs{newcommand}, and putting it after +% |\begin{document}| % \begin{macrocode} \newcommand\ellipsispunctuation{,.:;!?} % \end{macrocode} @@ -358,7 +350,7 @@ \def\ellipsis@two{#2}% the remainder of the string \ifx\ellipsis@token\ellipsis@one \ellipsis@default - \else + \else \ifx\ellipsis@two\empty \ellipsis@centered \else @@ -377,6 +369,7 @@ \ifellipsis@alwayscenter\ellipsis@centered\else \ellipsis@scan% \fi\ellipsis@xspace}% +\DeclareRobustCommand\textellipsis {\futurelet\ellipsis@token\@textellipsis} % \end{macrocode} % \end{macro} % @@ -398,13 +391,21 @@ \ifx\bbl@frenchdots\@undefined\else \PackageError{ellipsis}{Babel French loaded after ellipsis.sty}% {If you load Babel with the French option, do it before ellipsis.sty}% - \fi - \fi - \DeclareRobustCommand{\dots}{% - \ifmmode\mathellipsis\else\expandafter\textellipsis\fi}} + \fi + \fi + \@ifpackageloaded{amsmath}% + {% + \DeclareRobustCommand\dots{% + \ifmmode \@xp \mdots@ \else \@xp \textellipsis \fi}% + }% + {% + \DeclareRobustCommand\dots{% + \ifmmode \mathellipsis \else \expandafter \textellipsis\fi}% + }% +} % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\midwordellipsis} % An extra command: this may be useful for the rare time when you want % an ellipsis in the very middle of a word or whenever you just want a @@ -415,7 +416,7 @@ \kern\ellipsisgap .\kern\ellipsisgap .\kern\ellipsisgap - .\kern\ellipsisgap\relax} + .\@\kern\ellipsisgap\relax} % \end{macrocode} % \end{macro} % diff --git a/macros/latex/contrib/ellipsis/ellipsis.pdf b/macros/latex/contrib/ellipsis/ellipsis.pdf index ab198398e9..762e9cb36b 100644 Binary files a/macros/latex/contrib/ellipsis/ellipsis.pdf and b/macros/latex/contrib/ellipsis/ellipsis.pdf differ diff --git a/macros/latex/contrib/rec-thy/README b/macros/latex/contrib/rec-thy/README index a7c9a3aa04..72eaba54d6 100644 --- a/macros/latex/contrib/rec-thy/README +++ b/macros/latex/contrib/rec-thy/README @@ -27,4 +27,11 @@ Github URL: https://github.com/TruePath/Recursion-Theory-Latex-Package 11/14/2017 - v2.2 - Fixed \Tdeg so it works different on symbols and vars and added \Tdegof and \Tvarof. Added \subfunneq and \supfunneq. 12/31/2017 - v2.3 - Added proof cases helper. Also fixed the issue with \ncequiv in XeLaTeX 1/17/2018 - v2.4 - Added priority tree helpers. Should be more robust with respect to existing definitions of common commands -2/14/2018 - v2.4.1 - Moved to using xparse to define the case macros and several other macros to allow nested brackets for optional arguments. Added the recf command and cleaned up some option processing. Also worked around the mathtools/unicode-math font bug described here: https://tex.stackexchange.com/questions/335164/incompatibility-with-mathtools-and-unicode-math-in-xelatex/335177 \ No newline at end of file +2/14/2018 - v2.4.1 - Moved to using xparse to define the case macros and several other macros to allow nested brackets for optional arguments. Added the recf command and cleaned up some option processing. Also worked around the mathtools/unicode-math font bug described here: https://tex.stackexchange.com/questions/335164/incompatibility-with-mathtools-and-unicode-math-in-xelatex/335177 +11/29/2018 - v2.4.2 - Fixed horrible bugs introduced in last version and fixed many symbols to work even in pdflatex mode. Also things are compiling again. +11/29/2018 - v2.4.3 - Rendered compatible with beamer by removing enumitem requirement if beamer is loaded. +02/16/2019 - v3.0 - Added requirements environment for multiple requirements. Changed the \req and \require commands to take their optional argument after the first mandatory arguments as well as before. Added the commands \module and \modof. Added operator \xor. Fixed corner quotes. Added \leftofeq, \rightof, \rightofeq. Added \RE, \CE, \Ce, \Re and \Tincompat, \Tincomp, \Tcompat. Changed the way strings are symbolized and coded. Fixed commands to work even with unicode-math. Also added \require* inside \requirements. Added \nleftofeq, \nrightof, \nrightofeq, \nleftof. Commands \ancestor, \descendant, etc... and \reqof, \Astages and \Vstages now require the option suppPriorityTrees be passed to the class to use and should be viewed as depreciated. Fixed the options system so different symbols can be correctly passed to the class. +02/17/2019 - v3.01 - Fixed \RE \CE \Re and \Ce for the various capitalized versions. Fixed weird bug with recfnl not printing. Removed \interior and \closure as not really appropriate commands for the package and having bugs. Also fixed package to indicate correct version. +02/26/2019 - v3.1 - Fixed \wck to use roman capital CK. +?? - v3.2 Removed \reaop, \alphaREAop, \aREAop in favor of using the single form \REAop. Removed \functo, \map and funcomp, \hgtO as useless synonyms and removed \KleeneOBelow and KleeneOLess as beyond what the package should define. Added package option compat31 to ensure package compatibility with version 3.1. An optional parentheses delimited argument specifying the base has been added to \REAop. Both \REAop and the pair \REA/\CEA have been updated to ignore order of optional arguments. The square brackets used to delimit the argument to the use command are now auto-sized. Added \pmapsto, \pmapsfrom, \kleeneZero, \kleeneNum, \entersat. Also Misc typesetting fixes. +05/08/2020 - v3.3 Fixed/added tweak to overline so it looks correct. Also added real symbols so that \subfunneq and \supfunneq can be defined appropriately. Fixed incorrect use of tiny in math mode. diff --git a/macros/latex/contrib/rec-thy/rec-thy.pdf b/macros/latex/contrib/rec-thy/rec-thy.pdf index beb678f700..0f17d492a9 100644 Binary files a/macros/latex/contrib/rec-thy/rec-thy.pdf and b/macros/latex/contrib/rec-thy/rec-thy.pdf differ diff --git a/macros/latex/contrib/rec-thy/rec-thy.sty b/macros/latex/contrib/rec-thy/rec-thy.sty index 4f69ee5fe3..e4faaa5454 100644 --- a/macros/latex/contrib/rec-thy/rec-thy.sty +++ b/macros/latex/contrib/rec-thy/rec-thy.sty @@ -1,5 +1,7 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{rec-thy}[2019/02/17 v3.01 Provides commands for writing up recursion theory papers] +% Release Notes see README +\def\recthyVersion{3.3} +\ProvidesPackage{rec-thy}[v3.3 Provides commands for writing up recursion theory papers] \makeatletter % \newcommand*{\@curpack}{\@currname} %rec-thy.sty \newcommand*{\@packinfo}[1]{\PackageInfo{rec-thy}{#1}} @@ -12,10 +14,7 @@ %leaves us a command \arg defined to do \@recthy@arg % \ProvidesPackage{\@curpack} %file name is package name -% Release Notes -% Version 1.2 -% Added mrref option -% Fixed horrific option processing bug + \RequirePackage{ltxcmds} \RequirePackage{ifxetex,ifpdf} \RequirePackage{suffix} @@ -23,6 +22,7 @@ \RequirePackage{xifthen} \RequirePackage{xkeyval} \RequirePackage{etoolbox} +\RequirePackage{pict2e,picture} \robustify\( \robustify\) \RequirePackage{xparse} @@ -103,6 +103,7 @@ \newif\ifrecthy@nosuppprioritytrees \recthy@nosuppprioritytreestrue \newif\ifrecthy@hyperreqs \recthy@hyperreqstrue \newif\ifrecthy@nooperators \recthy@nooperatorsfalse +\newif\ifrecthy@fix@typeset \recthy@fix@typesettrue %\newif\ifrecthy@nomodule \recthy@nomodulefalse \DeclareOptionX{nohyphenation}{\recthy@nohyphenationtrue} @@ -131,6 +132,11 @@ \DeclareOptionX{suppPriorityTrees}{\recthy@nosuppprioritytreesfalse} \DeclareOptionX{nohyperreqs}{\recthy@hyperreqsfalse} \DeclareOptionX{nooperators}{\recthy@nooperatorstrue} +\DeclareOptionX{compat31}{\recthy@compat@threeOne} +\DeclareOptionX{nofixtype}{\ifrecthy@fix@typesetfalse} + +\newcommand*{\recthy@compat@threeOne}{\recthy@rollback@threeTwo@threeOne@REA} +\newcommand*{\recthy@rollback@threeTwo@threeOne@REA}{} %\DeclareOptionX{nomodule}{\recthy@nomoduletrue} \DeclareOptionX{degjoin}{\def\Tjoin{\Tdegjoin}} @@ -142,6 +148,84 @@ \let\@recthy@ballsymb\@recthy@ballsymb@default \DeclareOptionX{ballsymb}[@recthy@ballsymb@default]{\letcs{\@recthy@ballsymb}{#1}} +\AtEndOfPackage{ + \ifrecthy@fix@typeset + %Defining \overbar + \let\save@mathaccent\mathaccent + \newcommand*\if@single[3]{% + \setbox0\hbox{${\mathaccent"0362{#1}}^H$}% + \setbox2\hbox{${\mathaccent"0362{\kern0pt#1}}^H$}% + \ifdim\ht0=\ht2 #3\else #2\fi + } + %The bar will be moved to the right by a half of \macc@kerna, which is computed by amsmath: + \newcommand*\rel@kern[1]{\kern#1\dimexpr\macc@kerna} + %If there's a superscript following the bar, then no negative kern may follow the bar; + %an additional {} makes sure that the superscript is high enough in this case: + \providecommand*\overbar{\relax} + \renewcommand*\overbar[1]{\@ifnextchar^{{\over@bar{#1}{0}}}{\over@bar{#1}{1}}} + %Use a separate algorithm for single symbols: + \newcommand*\over@bar[2]{\if@single{#1}{\over@bar@{#1}{#2}{1}}{\over@bar@{#1}{#2}{2}}} + \newcommand*\over@bar@[3]{% + \begingroup + \def\mathaccent##1##2{% + %Enable nesting of accents: + \let\mathaccent\save@mathaccent + %If there's more than a single symbol, use the first character instead (see below): + \if#32 \let\macc@nucleus\first@char \fi + %Determine the italic correction: + \setbox\z@\hbox{$\macc@style{\macc@nucleus}_{}$}% + \setbox\tw@\hbox{$\macc@style{\macc@nucleus}{}_{}$}% + \dimen@\wd\tw@ + \advance\dimen@-\wd\z@ + %Now \dimen@ is the italic correction of the symbol. + \divide\dimen@ 3 + \@tempdima\wd\tw@ + \advance\@tempdima-\scriptspace + %Now \@tempdima is the width of the symbol. + \divide\@tempdima 10 + \advance\dimen@-\@tempdima + %Now \dimen@ = (italic correction / 3) - (Breite / 10) + \ifdim\dimen@>\z@ \dimen@0pt\fi + %The bar will be shortened in the case \dimen@<0 ! + \rel@kern{0.6}\kern-\dimen@ + \if#31 + \overline{\rel@kern{-0.6}\kern\dimen@\macc@nucleus\rel@kern{0.4}\kern\dimen@}% + \advance\dimen@0.4\dimexpr\macc@kerna + %Place the combined final kern (-\dimen@) if it is >0 or if a superscript follows: + \let\final@kern#2% + \ifdim\dimen@<\z@ \let\final@kern1\fi + \if\final@kern1 \kern-\dimen@\fi + \else + \overline{\rel@kern{-0.6}\kern\dimen@#1}% + \fi + }% + \macc@depth\@ne + \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar + \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax}% + \macc@set@skewchar\relax + \let\mathaccentV\macc@nested@a + %The following initialises \macc@kerna and calls \mathaccent: + \if#31 + \macc@nested@a\relax111{#1}% + \else + %If the argument consists of more than one symbol, and if the first token is + %a letter, use that letter for the computations: + \def\gobble@till@marker##1\endmarker{}% + \futurelet\first@char\gobble@till@marker#1\endmarker + \ifcat\noexpand\first@char A\else + \def\first@char{}% + \fi + \macc@nested@a\relax111{\first@char}% + \fi + \endgroup + } + \else + \@packinfo{Not loading Fix Typesetting} + \fi + +} + + \AtEndOfPackage{ \ifrecthy@noprioritytrees \@packinfo{Not loading Priority Tree Helper} @@ -287,16 +371,104 @@ \else \@packinfo{Loading subfun defs.} %DOCUMENT ME + \newcommand{\@pnrelbar}{% + \linethickness{\dimen2}% + \sbox\z@{$\m@th\prec$}% + \dimen@=1.1\ht\z@ + \begin{picture}(\dimen@,.4ex) + \roundcap + \put(0,.2ex){\line(1,0){\dimen@}} + \put(\dimexpr 0.5\dimen@-.2ex\relax,0){\line(1,1){.4ex}} + \end{picture}% +} + +% \newcommand{\not@pnrelbar}{% +% \linethickness{\dimen2}% +% \sbox\z@{$\m@th\nprec$}% +% \dimen@=1.1\ht\z@ +% \begin{picture}(\dimen@,.4ex) +% \roundcap +% \put(0,.2ex){\line(1,0){\dimen@}} +% \put(\dimexpr 0.5\dimen@-.2ex\relax,0){\line(1,1){.4ex}} +% \end{picture}% +% } + + \newcommand{\@snrelbar}{% + \linethickness{\dimen2}% + \sbox\z@{$\m@th\succ$}% + \dimen@=1.1\ht\z@ + \begin{picture}(\dimen@,.4ex) + \roundcap + \put(0,.2ex){\line(1,0){\dimen@}} + \put(\dimexpr 0.5\dimen@-.2ex\relax,0){\line(1,1){.4ex}} + \end{picture}% +} + +% \newcommand{\not@snrelbar}{% +% \linethickness{\dimen2}% +% \sbox\z@{$\m@th\nsucc$}% +% \dimen@=1.1\ht\z@ +% \begin{picture}(\dimen@,.4ex) +% \roundcap +% \put(0,.2ex){\line(1,0){\dimen@}} +% \put(\dimexpr 0.5\dimen@-.2ex\relax,0){\line(1,1){.4ex}} +% \end{picture}% +% } + +\newcommand{\@precneq}{\mathrel{\vcenter{\hbox{\text{\prec@neq}}}}} +\newcommand{\prec@neq}{% + \dimen2=\f@size\dimexpr.04pt\relax + \oalign{% + \noalign{\kern\dimexpr.2ex-.5\dimen2\relax} + $\m@th\prec$\cr + \noalign{\kern-.5\dimen2} + \hidewidth\@pnrelbar\hidewidth\cr + }% +} + +% \newcommand{\@nprecneq}{\mathrel{\vcenter{\hbox{\text{\nprec@neq}}}}} +% \newcommand{\nprec@neq}{% +% \dimen2=\f@size\dimexpr.04pt\relax +% \oalign{% +% \noalign{\kern\dimexpr.2ex-.5\dimen2\relax} +% $\m@th\nprec$\cr +% \noalign{\kern-.5\dimen2} +% \hidewidth\not@pnrelbar\hidewidth\cr +% }% +% } + +\newcommand{\@succneq}{\mathrel{\vcenter{\hbox{\text{\succ@neq}}}}} +\newcommand{\succ@neq}{% + \dimen2=\f@size\dimexpr.04pt\relax + \oalign{% + \noalign{\kern\dimexpr.2ex-.5\dimen2\relax} + $\m@th\prec$\cr + \noalign{\kern-.5\dimen2} + \hidewidth\@snrelbar\hidewidth\cr + }% +} + +% \newcommand{\@nsuccneq}{\mathrel{\vcenter{\hbox{\text{\nsucc@neq}}}}} +% \newcommand{\nsucc@neq}{% +% \dimen2=\f@size\dimexpr.04pt\relax +% \oalign{% +% \noalign{\kern\dimexpr.2ex-.5\dimen2\relax} +% $\m@th\nprec$\cr +% \noalign{\kern-.5\dimen2} +% \hidewidth\not@snrelbar\hidewidth\cr +% }% +% } + \NewDocumentCommand{\subfun}{o}{\prec\IfNoValueTF{#1}{}{_{#1}}} \NewDocumentCommand{\supfun}{o}{\succ\IfNoValueTF{#1}{}{_{#1}}} \NewDocumentCommand{\nsubfun}{o}{\nprec\IfNoValueTF{#1}{}{_{#1}}} \NewDocumentCommand{\nsupfun}{o}{\nsucc\IfNoValueTF{#1}{}{_{#1}}} \NewDocumentCommand{\subfuneq}{o}{\preceq\IfNoValueTF{#1}{}{_{#1}}} + \NewDocumentCommand{\subfunneq}{o}{\@precneq\IfNoValueTF{#1}{}{_{#1}}} \NewDocumentCommand{\supfuneq}{o}{\succeq\IfNoValueTF{#1}{}{_{#1}}} + \NewDocumentCommand{\supfunneq}{o}{\@succneq\IfNoValueTF{#1}{}{_{#1}}} \NewDocumentCommand{\nsubfuneq}{o}{\npreceq\IfNoValueTF{#1}{}{_{#1}}} \NewDocumentCommand{\nsupfuneq}{o}{\nsucceq\IfNoValueTF{#1}{}{_{#1}}} - \NewDocumentCommand{\subfunneq}{o}{\precneq\IfNoValueTF{#1}{}{_{#1}}} - \NewDocumentCommand{\supfunneq}{o}{\succneq\IfNoValueTF{#1}{}{_{#1}}} \fi } @@ -449,7 +621,8 @@ \fi } -\newcommand*{\@recthy@abs}[1]{\lvert#1\rvert} +% \newcommand*{\@recthy@abs}[1]{\lvert#1\rvert} +\DeclarePairedDelimiter\@recthy@abs{\lvert}{\rvert} \newcommand*{\@recthy@ensuretext}[1]{\ensuremath{\text{#1}}} \AtEndOfPackage{ \ifrecthy@nomath @@ -466,7 +639,8 @@ \else \DeclareMathOperator{\Ord}{Ord} \fi - + \DeclarePairedDelimiter\ceil{\lceil}{\rceil} + \DeclarePairedDelimiter\floor{\lfloor}{\rfloor} \recthy@strip{abs} \ifdefined\dom @@ -480,17 +654,40 @@ \providecommand*{\restr}[1]{\mathpunct{\restriction_{#1}}} \providecommand*{\ordpair}[2]{\left( #1, #2 \right) } %%%%%%%%Function commands - \providecommand*{\map}[2]{:#1\mapsto #2} - \providecommand*{\functo}[3]{#1\map{#2}{#3}} + \let\recthy@rollback@threeTwo@threeOne@REA@mathsave=\recthy@rollback@threeTwo@threeOne@REA + \renewcommand*{\recthy@rollback@threeTwo@threeOne@REA}{ + \providecommand*{\map}[2]{:#1\mapsto #2} + \providecommand*{\functo}[3]{#1\map{#2}{#3}} + \ifdefined\funcomp + \else + \let\funcomp=\compfunc + \fi + \recthy@rollback@threeTwo@threeOne@REA@mathsave + } + \providecommand*{\compfunc}{\mathbin{\circ}} \ifdefined\compose \else \let\compose=\compfunc \fi - \ifdefined\funcomp - \else - \let\funcomp=\compfunc - \fi + \ltx@ifpackageloaded{unicode-math}{ + \newcommand{\pmapsto}{\mathrel{\nvrightarrow}} + \newcommand{\pmapsfrom}{\mathrel{\nvleftarrow}} + }{ + % \newcommand{\pmapsto}{}% just for safety + % \newcommand{\pmapsfrom}{}% just for safety + + \DeclareRobustCommand{\pmapsto}{\mathrel{\mathpalette\p@to@gets\to}} + \DeclareRobustCommand{\pmapsfrom}{\mathrel{\mathpalette\p@to@gets\gets}} + + \newcommand{\p@to@gets}[2]{% + \ooalign{\hidewidth$\m@th#1\mapstochar\mkern5mu$\hidewidth\cr$\m@th#1\to$\cr}% + } + } + \newcommand{\fpmapsto}{\mathrel{\pmapsto_{< \infty}}} + \newcommand{\fpmapsfrom}{\mathrel{\pmapsfrom_{< \infty}}} + \newcommand{\ParFuncs}[2]{{#2}^{\subset #1}} + \newcommand{\FinParFuncs}[2]{{#2}^{\subset_{< \infty} #1}} \recthy@strip{ensuretext} \fi } @@ -571,10 +768,16 @@ \newcommand*{\@recthy@Computable}{\@recthy@ensuretext{Computable}} \newcommand*{\@recthy@RecursivelyEnumerable}{\@recthy@ensuretext{Recursively enumerable}} \newcommand*{\@recthy@ComputablyEnumerable}{\@recthy@ensuretext{Computably enumerable}} -\newcommand*{\@recthy@REA}{\ensuremath{\text{REA}}} -\WithSuffix\def\@recthy@REA[#1]{#1-\@recthy@REA\relax} -\newcommand*{\@recthy@CEA}{\ensuremath{\text{CEA}}} -\WithSuffix\def\@recthy@CEA[#1]{#1-\@recthy@CEA\relax} +\def\@recthy@REA{REA} +\def\@recthy@CEA{CEA} + +\NewDocumentCommand{\REA}{d()o}{\ensuremath{\IfValueTF{#2}{#2-}{}\text{\@recthy@REA}\IfValueTF{#1}{[#1]}{}}} +\NewDocumentCommand{\CEA}{d()o}{\ensuremath{\IfValueTF{#2}{#2-}{}\text{\@recthy@CEA}\IfValueTF{#1}{[#1]}{}}} + +% \newcommand*{\@recthy@REA}{\ensuremath{\text{REA}}} +% \WithSuffix\def\@recthy@REA[#1]{#1-\@recthy@REA\relax} +% \newcommand*{\@recthy@CEA}{\ensuremath{\text{CEA}}} +% \WithSuffix\def\@recthy@CEA[#1]{#1-\@recthy@CEA\relax} \DeclareOptionX{reterms}{% \let\@recthy@ce=\@recthy@re @@ -597,9 +800,7 @@ \DeclareOptionX{ceaterms}{% \let\@recthy@REA=\@recthy@CEA } -\DeclareOptionX{reaterms}{% - \let\@recthy@CEA=\@recthy@REA - } + @@ -614,8 +815,6 @@ \recthy@strip{CE} \recthy@strip{Re} \recthy@strip{Ce} - \recthy@strip{REA} - \recthy@strip{CEA} \recthy@strip{recursive} \recthy@strip{computable} \recthy@strip{recursivelyEnumerable} @@ -632,7 +831,7 @@ -\NewDocumentCommand{\@recthy@set}{mg}{\left \{ #1 \IfNoValueTF{#2}{}{\middle | #2} \right \}} +\NewDocumentCommand{\@recthy@set}{mg}{\left \{ #1 \IfNoValueTF{#2}{}{\mid #2} \right \}} % \def\@recthy@set#1{\def\@set@argi@pmg{#1}\@ifnextchar\bgroup\@setst@pmg\@setplain@pmg} % \newcommand*{\@setst@pmg}[1]{\ifthenelse{\isempty{#1}}{\@setplain@pmg}{\left \{ \@set@argi@pmg \middle | #1\right \}}} @@ -652,6 +851,7 @@ % \newcommand*{\@recthy@setcmpminusSYM}{\backsim} % \newcommand*{\@recthy@setminuscmp}[1]{\mathop{\@recthy@setcmpminusSYM} #1} \newcommand*{\@recthy@setovercmp}[1]{\overline{#1}} +\newcommand*{\@recthy@setsimcmp}[1]{\backsim #1} \let\@recthy@setcmp=\@recthy@setovercmp \def\@recthy@setdiffSYM{-} \newcommand*{\@recthy@setdiff}{\mathbin{\@recthy@setdiffSYM}} @@ -663,7 +863,7 @@ \AtEndOfPackage{ -\WithSuffix\def\@recthy@setcmp[#1]#2{#1\@recthy@setminus#2} +% \WithSuffix\def\@recthy@setcmp[#1]#2{#1\@recthy@setminus#2} \ifrecthy@nosets \@packinfo{No set cmds loading.} \else @@ -715,6 +915,8 @@ \newcommand*{\nforall@recthy}{\nforall@orig@recthy} \newcommand*{\existsuniq}{\exists@orig@recthy !} \newcommand*{\nexistsuniq}{\nexists@orig@recthy !} + + \NewDocumentCommand{\axset}{D<>{}d()O{}d()} \WithSuffix\def\existsuniq(#1){\left(\existsuniq #1 \right)\!} \WithSuffix\def\nexistsuniq(#1){\left(\nexistsuniq #1 \right)\!} \WithSuffix\def\existsuniq[#1]{\left[\existsuniq #1 \right]\!} @@ -943,27 +1145,44 @@ \else \@packinfo{ordinal notations loading.} -\providecommand*{\wck}{\ensuremath{\omega^{ck}_1}} +\providecommand*{\wck}{\ensuremath{\omega^{\mathrm{CK}}_1}} % \newcommand*{\ordtype}[1]{\ensuremath{\@recthy@abs{#1}_{\kleeneO}}} \newcommand*{\ordzero}{\ensuremath{0}} \def\kleeneOSYM{\mathcal{O}} - \newcommand*{\kleeneO}{\let\@PMG@parenarg\@PMG@undefined\let\@PMG@braketarg\@PMG@undefined\@kleeneObody} - \newcommand*{\@kleeneObody}{\kleeneOSYM\ifdefined\@PMG@parenarg - ^{\@PMG@parenarg}% - \fi% - \ifdefined\@PMG@braketarg - _{\abs{\@PMG@braketarg}}% - \fi} - \WithSuffix\def\@kleeneObody(#1){\def\@PMG@parenarg{#1}\@kleeneObody} - \WithSuffix\def\@kleeneObody[#1]{\def\@PMG@braketarg{#1}\@kleeneObody} - \WithSuffix\def\@kleeneObody*{\def\kleeneOSYM{\overline{\mathcal{O}}}\@kleeneObody} - -\newcommand*{\kleeneObelow}[2][]{\kleeneOSYM_{<#2\ifthenelse{\isempty{#1}}{}{, #1}}} -\let\kleeneOless\kleeneObelow + \NewDocumentCommand{\kleeneO}{sD(){}oD(){}}{{ + \kleeneOSYM^{#2#4}_{% + \IfNoValueTF{#1}{% + \IfNoValueTF{#3}{}{% + \abs{#3}}% + }% + {% + 1% + \IfNoValueTF{#3}{}{% + , \abs{#3} + }% + }% + }% + }} + % \newcommand*{\kleeneO}{\let\@PMG@parenarg\@PMG@undefined\let\@PMG@braketarg\@PMG@undefined\@kleeneObody} + % \newcommand*{\@kleeneObody}{\kleeneOSYM\ifdefined\@PMG@parenarg + % ^{\@PMG@parenarg}% + % \fi% + % \ifdefined\@PMG@braketarg + % _{\abs{\@PMG@braketarg}}% + % \fi} + % \WithSuffix\def\@kleeneObody(#1){\def\@PMG@parenarg{#1}\@kleeneObody} + % \WithSuffix\def\@kleeneObody[#1]{\def\@PMG@braketarg{#1}\@kleeneObody} + % \WithSuffix\def\@kleeneObody*{\def\kleeneOSYM{\mathcal{O}}\@kleeneObody} + +% \newcommand*{\kleeneObelow}[2][]{\kleeneOSYM_{<#2\ifthenelse{\isempty{#1}}{}{, #1}}} +% \let\kleeneOless\kleeneObelow \newcommand*{\kleeneOuniq}{\kleeneO*} \let\ordNotations=\kleeneO \let\uniqOrdNotations=\kleeneOuniq + \newcommand*{\kleeneNum}[1]{{#1}_{\kleeneO}} + \newcommand*{\kleeneZero}{\kleeneNum{0}} + \newcommand*{\kleeneOne}{\kleeneNum{1}} \NewDocumentCommand{\kleeneless}{o}{<_{\kleeneO\IfNoValueTF{#1}{}{,#1}}} \let\kleenel=\kleeneless \NewDocumentCommand{\kleeneleq}{o}{\leq_{\kleeneO\IfNoValueTF{#1}{}{,#1}}} @@ -979,7 +1198,8 @@ \newcommand*{\kleenePlus}{\mathbin{+_{\kleeneO}}} \newcommand*{\kleeneMul}{\cdot_{\kleeneO}} \newcommand*{\kleenehgt}[1]{\lVert #1\rVert_{\kleeneO}} - \let\hgtO=\kleenehgt + \let\kleeneHgt=\kleenehgt + % \let\hgtO=\kleenehgt \newcommand*{\kleenelim}[2]{{#1}_{[#2]}} \newcommand*{\kleenepred}[1]{{#1}^{-}} @@ -1518,7 +1738,7 @@ \NewDocumentCommand{\nconv}{O{}}{\mathpunct{\mkern-4mu{\smallsetminus\mkern 4mu \downarrow}_{#1}}} \newcommand*{\diverge}{\mathpunct{\uparrow}} % \newcommand*{\use}[2]{\mathscr{u}(#1\ifthenelse{\isempty{#2}}{}{,#2})} - \newcommand*{\use}[1]{\mathop{\@recthy@useSYM}[#1]} + \newcommand*{\use}[1]{\mathop{\@recthy@useSYM}\left[#1\right]} % \newcommand*{\use}[1]{\ltx@ifpackageloaded{unicode-math}{\symbffrak{u}}{\mathfrak{u}}\left(#1\right)} % \NewDocumentCommand{\REset}{omd()}{ % W_{#2\IfNoValueTF{#1}{}{, #1}}\IfNoValueTF{#3}{}{^{#3}} @@ -1535,12 +1755,28 @@ \fi} \WithSuffix\def\@REsetbody(#1){\def\@PMG@parenarg{#1}\@REsetbody} \WithSuffix\def\@REsetbody[#1]{\def\@PMG@braketarg{#1}\@REsetbody} - \newcommand*{\alphaREAop}[2][]{\mathcal{J}^{#2}_{#1}} - \let\aREAop=\alphaREAop - \let\reaop=\alphaREAop - \newcommand*{\oneREAop}[1]{J_{#1}} + \NewDocumentCommand{\REAop}{st+d()od()mm}{{\IfBooleanTF{#1}{\mathcal{J}}{\widehat{\mathcal{J}}}}^{\IfBooleanTF{#1}{\vphantom{x}^\dagger}{}#7}_{#6\IfValueTF{#4}{, #4}{}} \IfValueTF{#3}{\left(#3\right)}{\IfValueTF{#5}{\left(#5\right)}{}}} + \NewDocumentCommand{\oneREAop}{st+d()od()m}{{\IfBooleanTF{#1}{\mathcal{J}}{\widehat{\mathcal{J}}}}^{\IfBooleanTF{#1}{\vphantom{x}^\dagger}{}}_{#6\IfValueTF{#4}{, #4}{}} \IfValueTF{#3}{\left(#3\right)}{\IfValueTF{#5}{\left(#5\right)}{}}} \let\iREAop=\oneREAop - \WithSuffix\def\reaop*#1{\oneREAop{#1}} + + \newcommand*{\entersat}[1]{\mathbin{\searrow_{#1}}} + + + % \newcommand*{\alphaREAop}[2][]{\mathcal{J}^{#2}_{#1}} + \let\recthy@rollback@threeTwo@threeOne@REA@computationssave=\recthy@rollback@threeTwo@threeOne@REA + \renewcommand*{\recthy@rollback@threeTwo@threeOne@REA}{ + \let\reaop=\REAop + \let\alphaREAop=\REAop + \let\aREAop=\alphaREAop + \recthy@rollback@threeTwo@threeOne@REA@computationssave + } + + + + + % \newcommand*{\oneREAop}[1]{J_{#1}} + % \let\iREAop=\oneREAop + % \WithSuffix\def\reaop*#1{\oneREAop{#1}} %converges \fi diff --git a/macros/latex/contrib/rec-thy/rec-thy.tex b/macros/latex/contrib/rec-thy/rec-thy.tex index 8fb6f3cbf2..d0ffdb6a5b 100644 --- a/macros/latex/contrib/rec-thy/rec-thy.tex +++ b/macros/latex/contrib/rec-thy/rec-thy.tex @@ -1,10 +1,3 @@ -% -% untitled -% -% Created by Peter M. Gerdes on 2010-10-14. -% Copyright (c) 2010 . All rights reserved. -% - \documentclass[leqno,11pt]{amsart} \usepackage{amsmath} % \RequirePackage{amsmath} @@ -18,8 +11,10 @@ \usepackage{comment} \usepackage{unicode-math} \unimathsetup{math-style=TeX,bold-style=TeX,nabla=upright,partial=italic} -\setmathfont{xits-math.otf} -\setmathfont{xits-math.otf}[range={cal,bfcal},StylisticSet=1] + \setmainfont{XITS} + \setmathfont{XITS Math} + \setmathfont{XITS Math}[range={\mathscr,\mathbfscr}] + \setmathfont{XITS Math}[range={\mathcal,\mathbfcal},StylisticSet=1] \usepackage{hyperxmp} @@ -86,7 +81,7 @@ \title{The rec-thy Package} \author{Peter M. Gerdes (gerdes@invariant.org)} -\date{\today: Version 2.4} +\date{05/20/2020: Version \recthyVersion} \begin{document} @@ -203,10 +198,10 @@ To disable these commands pass the option \verb=nocomputations=. \\ To specify \verb=\REset(X){e}= & \( \REset(X){e} \) & \\[6pt] \verb=\REset[s](X){e}= & \( \REset[s](X){e} \) & \\ \midrule \verb=\iREAop{e}(\eset)= & \multirow{2}{*}{\( \iREAop{e}(\eset) \)} &\multirow{2}{*}{1-REA operator} \\ - \tab \verb=\reaop*{e}(\eset)= & & \\ \midrule - \verb=\alphaREAop{\alpha}(\eset)= & \multirow{2}{*}{\( \alphaREAop{\alpha}(\eset) \)} &\multirow{2}{*}{\( \alpha \)-REA operator} \\[6pt] - \tab \verb=\reaop{\alpha}(\eset)= & & \\[6pt] - \verb=\alphaREAop[f]{\alpha}(\eset)= & \multirow{2}{*}{\( \alphaREAop[f]{\alpha}(\eset) \)} & \multirow{2}{*}{with particular witness to uniformity}\\[6pt] + \tab \verb=\oneREAop{e}(\eset)= & & \\ \midrule + % \verb=\alphaREAop{\alpha}(\eset)= & \multirow{2}{*}{\( \alphaREAop{\alpha}(\eset) \)} &\multirow{2}{*}{\( \alpha \)-REA operator} \\[6pt] + \verb=\REAop{e}{\alpha}= & \( \REAop{e}{\alpha} \) & \\[6pt] + % \verb=\alphaREAop[f]{\alpha}(\eset)= & \multirow{2}{*}{\( \alphaREAop[f]{\alpha}(\eset) \)} & \multirow{2}{*}{with particular witness to uniformity}\\[6pt] \tab \verb=\reaop[f]{\alpha}(\eset)= & & \\ \bottomrule \end{xtabular} \\ @@ -252,7 +247,7 @@ To disable these commands pass the option \verb=nodegrees=. \\ \verb=\TPlus_{i \in \omega} X_i= & \multirow{2}{*}{\( \TPlus_{i \in \omega} X_i \)} & \\ \tab \verb=\TJoin_{i \in \omega} X_i= & & \\ \midrule % \verb=\ttSYM= & \( \ttSYM \) & \\ \midrule - \verb=X \ttlneq Y= & \( X \ttlneq Y \) & Truth table reducibilities\\ \midrule + \verb=X \ttlneq Y= & \( X \ttlneq Y \) & Truth table reproducibilities\\ \midrule \verb=X \ttleq Y= & \( X \ttleq Y \) & \\ \midrule \verb=X \ttgneq Y= & \( X \ttgneq Y \) & \\ \midrule \verb=X \ttgeq Y= & \( X \ttgeq Y \) & \\ \midrule @@ -335,11 +330,17 @@ To disable these commands pass the option \verb=nomath=. \\ \verb=\rng= & \( \rng \) & Range\\ \midrule \verb=f\restr{X}= & \( f\restr{X} \) & Restriction\\ \midrule \verb=\ordpair{x}{y}= & \( \ordpair{x}{y} \)& Ordered Pair\\ \midrule - \verb=f\map{X}{Y}= & \( f\map{X}{Y} \) & \multirow{2}{*}{Function specification} \\ - \verb=\functo{f}{X}{Y}= & \( \functo{f}{X}{Y} \) &\\ \midrule - \verb=f \compfunc g= & \multirow{3}{*}{\( f \compose g \)} & \multirow{3}{*}{Function composition}\\ - \tab \verb=f \funcomp g= & &\\ + % \verb=f\map{X}{Y}= & \( f\map{X}{Y} \) & \multirow{2}{*}{Function specification} \\ + % \verb=\functo{f}{X}{Y}= & \( \functo{f}{X}{Y} \) &\\ \midrule + \verb=f \compfunc g= & \multirow{2}{*}{\( f \compose g \)} & \multirow{3}{*}{Function composition}\\ + % \tab \verb=f \funcomp g= & &\\ \tab \verb=f \compose g= & &\\ \midrule + \verb=f: X \pmapsto Y= & \( f: X \pmapsto Y \) & partial function from \( X \) to \( Y \). \\ \midrule + \verb=f: Y \pmapsfrom X= & \( f: Y \pmapsfrom X \) & partial function from \( X \) to \( Y \). \\ \midrule + \verb=f: X \fpmapsto Y= & \( f: X \fpmapsto Y \) & finite partial function from \( X \) to \( Y \). \\ \midrule + \verb=f: Y \fpmapsfrom X= & \( f: Y \fpmapsfrom X \) & finite partial function from \( X \) to \( Y \). \\ \midrule + \verb=\ParFuncs{X}{Y}= & \( \ParFuncs{X}{Y} \) & set of partial functions from \( X \) to \( Y \). \\ \midrule + \verb=\FinParFuncs{X}{Y}= & \( \FinParFuncs{X}{Y} \) & set of finite partial functions from \( X \) to \( Y \). \\ \midrule \verb=\( \ensuretext{blah} \)= & \multirow{2}{*}{\( \ensuretext{blah} \)}& \multirow{2}{*}{Types argument in text mode} \\ \tab \verb=\ensuretext{blah}= & & \\ \bottomrule @@ -488,7 +489,9 @@ To disable these commands pass the option \verb=nosubfuns=.\\ \verb=f \nsubfun g= & \( f \nsubfun g \) & \\ \midrule \verb=f \nsupfun g= & \( f \nsupfun g \) & \\ \midrule \verb=f \subfuneq g= & \( f \subfuneq g \) & \\ \midrule + \verb=f \subfunneq g= & \( f \subfunneq g \) & \\ \midrule \verb=f \supfuneq g= & \( f \supfuneq g \) & \\ \midrule + \verb=f \supfunneq g= & \( f \supfunneq g \) & \\ \midrule \verb=f \nsubfuneq g= & \( f \nsubfuneq g \) & \\ \midrule \verb=f \nsupfuneq g= & \( f \nsupfuneq g \) & \\ \midrule \bottomrule @@ -549,8 +552,8 @@ To disable these commands pass the option \verb=noordinalnotations=.\\ \verb=\alpha \kleeneMul \beta= & \( \alpha \kleeneMul \beta \) & Effective multiplication of notations \\ \midrule \verb=\kleenelim{\lambda}{n}= & \( \kleenelim{\lambda}{n} \) & The \( n \)-th element in effective limit defining notation \( \lambda \)\\ \midrule \verb=\kleenepred{\alpha}= & \( \kleenepred{\alpha} \) & Predecessor of \( \alpha \) if defined \\ \midrule - \verb=\kleenehgt{R}= & \multirow{2}{*}{\( \kleenehgt{R} \)} & Heigh of computable relation \( R \) \\ -\tab \verb=\hgtO{R}= & & \\ + \verb=\kleenehgt{R}= & \( \kleenehgt{R} \) & Height of computable relation \( R \) \\ +% \tab \verb=\hgtO{R}= & & \\ \bottomrule \end{tabular} @@ -678,7 +681,12 @@ Finally to enable the mrref helper macros pass the option \verb=mrref=.\\ These \section{Release Notes} + +% TESTING: \verb=\fpmapsto=, \verb=\fpmapsfrom=, \verb=\ParFuncs{Y}{X}= and \verb=\FinParFuncs{Y}{X}= \begin{itemize} + \item[3.3] - Fixed/added tweak to overline so it looks correct. Also added real symbols so that \verb=\subfunneq= and \verb=\supfunneq= can be defined appropriately. Added \verb=\floor= and \verb=\ceil=. Note these aren't yet shown off in package doc. Fixed incorrect use of tiny in math mode. + \item[3.2] - Removed \verb=\reaop=, \verb=\alphaREAop=, \verb=\aREAop= in favor of using the single form \verb=\REAop=. Removed \verb=\functo=, \verb=\map= and \verb=funcomp=, \verb=\hgtO= as useless synonyms and removed \verb=\KleeneOBelow= and \verb=KleeneOLess= as beyond what the package should define. Added package option compat31 to ensure package compatibility with version 3.1. An optional parentheses delimited argument specifying the base has been added to \verb=\REAop=. Both \verb=\REAop= and the pair \verb=\REA=/\verb=\CEA= have been updated to ignore order of optional arguments. The square brackets used to delimit the argument to the use command are now auto-sized. Added \verb=\pmapsto=, \verb=\pmapsfrom=, \verb=\kleeneZero=, \verb=\kleeneNum=, \verb=\entersat=. Also Misc typesetting fixes. + \item[3.1] 02/26/2019 - Fixed \verb=\wck= to be \( \wck \), i.e., have capitalized roman CK. \item[3.01] 02/17/2019 - Fixed \verb=\RE= \verb=\CE= \verb=\Re= and \verb=\Ce= for the various capitalized versions. Fixed weird bug with \verb=\recfnl= no longer working based on let. Removed \verb=\interior= and \\verb=\closure= as not really appropriate commands for the package and having bugs. Also fixed package to have correct version. \item[3.0] 02/16/2019 - Added requirements environment for multiple requirements. Changed the \verb=\req= and \verb=\require= commands to take their optional argument after the first mandatory arguments as well as before. Added the commands \verb=\module= and \verb=\modof= and \verb=\xor=. Improved the corner quotes. Added \verb=\leftofeq=, \verb=\rightof=, \verb=\rightofeq=. Added \verb=\RE=, \verb=\CE=, \verb=\Ce=, \verb=\Re= and \verb=\Tincompat=, \verb=\Tincomp=, \verb=\Tcompat=. Changed the way strings are symbolized and coded. Fixed suffix commands to work with unicode-math. Also added \verb=\require*= inside \verb=\requirements=. Added \verb=\nleftofeq=, \verb=\nrightof=, \verb=\nrightofeq=, \verb=\nleftof=. The commands \verb=\ancestor=, \verb=\descendant= etc... \verb=\reqof=, \verb=\Astages= and \verb=\Vstages=now require the option suppPriorityTrees be passed to the class to use and should be viewed as depreciated. Fixed the options system so different symbols can be correctly passed to the class. Changed the way \verb=\recf= works to comply with the usual syntax. \item[2.4.3] 11/29/2018 - Rendered compatible with beamer by removing enumitem requirement if beamer is loaded. -- cgit v1.2.3