diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/rec-thy/rec-thy.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/rec-thy/rec-thy.sty | 135 |
1 files changed, 130 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/rec-thy/rec-thy.sty b/Master/texmf-dist/tex/latex/rec-thy/rec-thy.sty index 02e13a16a28..a10b493e04f 100644 --- a/Master/texmf-dist/tex/latex/rec-thy/rec-thy.sty +++ b/Master/texmf-dist/tex/latex/rec-thy/rec-thy.sty @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{rec-thy}[2017/09/26 v2.1 Provides commands for writing up recursion theory papers] +\ProvidesPackage{rec-thy}[2017/12/31 v2.3 Provides commands for writing up recursion theory papers] \makeatletter % \newcommand*{\@curpack}{\@currname} %rec-thy.sty \newcommand*{\@packinfo}[1]{\PackageInfo{rec-thy}{#1}} @@ -81,6 +81,7 @@ \newif\ifrecthy@nostructresets \recthy@nostructresetsfalse \newif\ifrecthy@noreqhelper \recthy@noreqhelperfalse \newif\ifrecthy@nosubfun \recthy@nosubfunfalse +\newif\ifrecthy@nopfcases \recthy@nopfcasesfalse \newif\ifrecthy@hyperreqs \recthy@hyperreqstrue \DeclareOptionX{nohyphenation}{\recthy@nohyphenationtrue} @@ -104,15 +105,124 @@ \DeclareOptionX{nostructresets}{\recthy@nostructresetstrue} \DeclareOptionX{noreqhelper}{\recthy@noreqhelpertrue} \DeclareOptionX{nosubfun}{\recthy@nosubfuntrue} +\DeclareOptionX{nopfcases}{\recthy@nopfcasestrue} \DeclareOptionX{nohyperreqs}{\recthy@hyperreqsfalse} \DeclareOptionX{degjoin}{\def\Tjoin{\Tdegjoin}} +\let\pmg@casefont=\textsc +\DeclareOptionX{pfcasefont}[textsc]{\edef\pmg@casefont{\expandafter\noexpand\csname #1 \endcsname}} + +\AtEndOfPackage{ + \ifrecthy@nopfcases + \@packinfo{Not loading Proof Cases Helper} + \else + \@packinfo{Loading Proof Cases Helper.} + \RequirePackage{enumitem} + \ltx@ifpackageloaded{cleveref}{ + % \crefname{pfcasesnonumi}{case}{cases} + % \Crefname{pfcasesnonumi}{Case}{Cases} + \crefformat{pfcasesnonumi}{#2case~#1#3} + \Crefformat{pfcasesnonumi}{#2Case~#1#3} + % \crefname{pfcasesnonumii}{case}{cases} + % \Crefname{pfcasesnonumii}{Case}{Cases} + \crefformat{pfcasesnonumii}{#2subcase~#1#3} + \Crefformat{pfcasesnonumii}{#2Subcase~#1#3} + % \crefname{pfcasesnonumiii}{case}{cases} + % \Crefname{pfcasesnonumiii}{Case}{Cases} + \crefformat{pfcasesnonumiii}{#2subsubcase~#1#3} + \Crefformat{pfcasesnonumiii}{#2Subsubcase~#1#3} + % \crefname{pfcasesnumberedi}{case}{cases} + % \Crefname{pfcasesnumberedi}{Case}{Cases} + \crefformat{pfcasesnumberedi}{#2case~#1#3} + \Crefformat{pfcasesnumberedi}{#2Case~#1#3} + % \crefname{pfcasesnumberedii}{case}{cases} + % \Crefname{pfcasesnumberedii}{Case}{Cases} + \crefformat{pfcasesnumberedii}{#2case~#1#3} + \Crefformat{pfcasesnumberedii}{#2Case~#1#3} + % \crefname{pfcasesnumberediii}{case}{cases} + % \Crefname{pfcasesnumberediii}{Case}{Cases} + \crefformat{pfcasesnumberediii}{#2case~#1#3} + \Crefformat{pfcasesnumberediii}{#2Case~#1#3} + }{} + \newlist{pfcasesnonum}{enumerate}{3} + \setlist[pfcasesnonum]{ + label={\pmg@casefont{Case}}\protect\thiscase:~, + align=left, + labelsep=!, + itemindent=-1em, + leftmargin=2em, + labelindent=0pt, + labelwidth=0pt + } + \setlist[pfcasesnonum,1]{ + before=\def\pfcasecounter@pmg{pfcasesnonumi}, + } + \setlist[pfcasesnonum,2]{ + before=\def\pfcasecounter@pmg{pfcasesnonumii}, + } + \setlist[pfcasesnonum,3]{ + before=\def\pfcasecounter@pmg{pfcasesnonumiii}, + } + \newlist{pfcasesnumbered}{enumerate}{3} + \setlist[pfcasesnumbered]{ + align=left, + labelsep=!, + itemindent=-1em, + leftmargin=2em, + labelindent=0pt, + labelwidth=0pt + } + \setlist[pfcasesnumbered,1]{ + before=\def\pfcasecounter@pmg{pfcasesnumberedi}, + label={{\pmg@casefont{Case}}~\arabic*\protect\thiscase:~}, + ref={\arabic*}, + } + \setlist[pfcasesnumbered,2]{ + before=\def\pfcasecounter@pmg{pfcasesnumberedii}, + label={{\pmg@casefont{Case}}~\arabic{pfcasesnumberedi}\alph*:\protect\thiscase.~}, + ref={\arabic{pfcasesnumberedi}\alph*}, + } + \setlist[pfcasesnumbered,3]{ + before=\def\pfcasecounter@pmg{pfcasesnumberediii}, + label={{\pmg@casefont{Case}}~\arabic{pfcasesnumberedi}\alph{pfcasesnumberedii}.\roman*:\protect\thiscase.~}, + ref={\arabic{pfcasesnumberedi}\alph{pfcasesnumberedii}.\roman*}, + } + \newenvironment{pfcases*}{ + \providecommand{\case}[1][]{% + \if\relax\detokenize{##1}\relax + \def\thiscase{}% + \else + \def\thiscase{~##1}% + \fi + \item \ltx@ifpackageloaded{cleveref}{% + \cref@constructprefix{pfcases}{\cref@result}% + \protected@xdef\cref@currentlabel{[\pfcasecounter@pmg][][\cref@result]##1}}{} \protected@edef\@currentlabel{##1}% + } + \begin{pfcasesnonum} + } + {\end{pfcasesnonum}} + + \newenvironment{pfcases}{ + \providecommand{\case}[1][]{% + \if\relax\detokenize{##1}\relax + \def\thiscase{}% + \else + \def\thiscase{~##1}% + \fi + \item \ltx@ifpackageloaded{cleveref}{% + \cref@constructprefix{\pfcasecounter@pmg}{\cref@result} + \protected@xdef\cref@currentlabel{[\pfcasecounter@pmg][][\cref@result] \csname the\pfcasecounter@pmg \endcsname}}{}% + } + \begin{pfcasesnumbered}}{\end{pfcasesnumbered}} + \fi +} + \AtEndOfPackage{ \ifrecthy@nosubfun \@packinfo{Not loading subfun defs.} \else - \@packinfo{Loading subfun defs DOCUMENT ME.} + \@packinfo{Loading subfun defs.} %DOCUMENT ME \newcommand*{\subfun}[1][]{\prec\ifthenelse{\isempty{#1}}{_{#1}}{}} \newcommand*{\supfun}[1][]{\succ\ifthenelse{\isempty{#1}}{_{#1}}{}} @@ -122,6 +232,8 @@ \newcommand*{\supfuneq}[1][]{\succeq\ifthenelse{\isempty{#1}}{_{#1}}{}} \newcommand*{\nsubfuneq}[1][]{\npreceq\ifthenelse{\isempty{#1}}{_{#1}}{}} \newcommand*{\nsupfuneq}[1][]{\nsucceq\ifthenelse{\isempty{#1}}{_{#1}}{}} + \newcommand*{\subfunneq}[1][]{\precneq\ifthenelse{\isempty{#1}}{_{#1}}{}} + \newcommand*{\supfunneq}[1][]{\succneq\ifthenelse{\isempty{#1}}{_{#1}}{}} \fi } @@ -1167,8 +1279,8 @@ }} - \newcommand*{\cequiv}{\mathrel{\backsimeq}} - \newcommand*{\ncequiv}{\mathrel{\not\cequiv}} + \newcommand*{\cequiv}{\mathrel{\simeq}} + \newcommand*{\ncequiv}{\mathrel{\not\simeq}} \newcommand*{\conv}[1][]{\mathpunct{\downarrow}_{#1}} \let\converge=\conv %\newcommand*{\convs}[1]{\ensuremath{\conv_{#1}}} @@ -1207,7 +1319,20 @@ %%%%%%Turing Degrees - \newcommand*{\Tdeg}[1]{\utilde{\mathbf{#1}}} + \def\firsttokof@pmg#1{\first@pmg@rdmxs(#1)} + \def\first@pmg@rdmxs(#1#2){#1} + + \newcommand*{\Tdegvar}[1]{\mathbf{#1}} + \newcommand*{\Tdegof}[1]{\utilde{#1}} + \newcommand*{\Tdeg}[1]{\ifthenelse{ + %\equal{\detokenize{\Tzero}}{\futurelet\next@pmg\discard#1\@nil\expandafter\detokenize{\next@pmg}} + \equal{\detokenize{\Tzero}}{\detokenize{#1}} \OR + \equal{\detokenize{\Tzero}}{\detokenize{#1}} \OR + \equal{\detokenize{\zeroj}}{\detokenize{#1}} \OR + \equal{\detokenize{\zerojj}}{\detokenize{#1}} \OR + \equal{\detokenize{\zerojjj}}{\detokenize{#1}} \OR + \equal{\string \zeron }{\expandafter\string \first@pmg@rdmxs(#1)} + }{\Tdegof{#1}}{\Tdegvar{#1}}} \newcommand*{\Tjump}[1]{#1'} \let\jump=\Tjump |