texlive[47665] Master/texmf-dist: apxproof (10may18)

commits+karl at tug.org commits+karl at tug.org
Thu May 10 23:37:36 CEST 2018


Revision: 47665
          http://tug.org/svn/texlive?view=revision&revision=47665
Author:   karl
Date:     2018-05-10 23:37:35 +0200 (Thu, 10 May 2018)
Log Message:
-----------
apxproof (10may18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/apxproof/README.md
    trunk/Master/texmf-dist/doc/latex/apxproof/apxproof.pdf
    trunk/Master/texmf-dist/source/latex/apxproof/apxproof.dtx
    trunk/Master/texmf-dist/tex/latex/apxproof/apxproof.sty

Modified: trunk/Master/texmf-dist/doc/latex/apxproof/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/apxproof/README.md	2018-05-10 21:37:22 UTC (rev 47664)
+++ trunk/Master/texmf-dist/doc/latex/apxproof/README.md	2018-05-10 21:37:35 UTC (rev 47665)
@@ -34,7 +34,7 @@
 
 ## License
 
-Copyright © 2016-2017 by Pierre Senellart.
+Copyright © 2016-2018 by Pierre Senellart.
 
 This work may be distributed and/or modified under the conditions of the
 LaTeX Project Public License, either version 1.3 of this license or (at

Modified: trunk/Master/texmf-dist/doc/latex/apxproof/apxproof.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/apxproof/apxproof.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/apxproof/apxproof.dtx	2018-05-10 21:37:22 UTC (rev 47664)
+++ trunk/Master/texmf-dist/source/latex/apxproof/apxproof.dtx	2018-05-10 21:37:35 UTC (rev 47665)
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-% Copyright (C) 2016-2017 by Pierre Senellart
+% Copyright (C) 2016-2018 by Pierre Senellart
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3
@@ -24,7 +24,7 @@
 % \iffalse
 %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
 %<package>\ProvidesPackage{apxproof}
-%<package>  [2017/05/31 v1.0.5 Automatic proofs in appendix]
+%<package>  [2018/05/10 v1.0.6 Automatic proofs in appendix]
 %
 %<*driver>
 \documentclass{ltxdoc}
@@ -44,7 +44,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{498}
+% \CheckSum{562}
 %
 % \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
@@ -97,7 +97,7 @@
 %  \addtocounter,\newcounter,\newtoggle,\global,\ifdefined,\iftoggle,
 %  \ifx,\jobname,\makeatletter,\makeatother,\newwrite,\NewEnviron,
 %  \patchcmd,\relax,\renewcommand,\renewenvironment,\RequirePackage,
-%  \roman,\space,\undefined
+%  \roman,\space,\undefined,\unexpanded
 % }
 %
 % \title{The \textsf{apxproof} package}
@@ -588,14 +588,39 @@
 }}
 %    \end{macrocode}
 % \subsection{Macros Common to All Compilation Modes}
+% \begin{macro}{\axp at newtheorem}
+% \changes{v1.0.6}{2018/05/10}{Introduce intermediary command for theorem
+% macro}
+% \begin{macro}{\@axp at newtheorem}
+% \begin{macro}{\@@axp at newtheorem}
+% We introduce an intermediate |\axp at newtheorem| command to define a new
+% theorem, differently depending on whether there is a section counter or
+% not. This will be useful, in particular to allow changing this
+% definition depending on the document class. This command uses two
+% intermediary commands, |\@axp at newtheorem| and |\@@axp at newtheorem|, for
+% the non-starred and starred versions.
+\def\axp at newtheorem{\@ifstar\@@axp at newtheorem\@axp at newtheorem}
+\def\@axp at newtheorem#1#2#3#4{%
+  \ifx\relax#4\relax
+    \newtheorem{#1}[#2]{#3}%
+  \else
+    \newtheorem{#1}{#3}[#4]%
+  \fi
+}
+\def\@@axp at newtheorem#1#2{%
+  \newtheorem*{#1}{#2}%
+}
+% \end{macro}
+% \end{macro}
+% \end{macro}
 % \begin{macro}{\newtheoremrep}
 % \begin{macro}{\axp at newtheoremreptmp}
 % We define the high-level |\newtheoremrep| to have the same syntax as
 % \textsf{amsthm}'s |\newtheorem|. For this purpose, we need a little
 % trick to deal with the second and fourth optional arguments, which is what
-% |\@oparg| and |\axp at newtheoremrep| are 
+% |\@oparg| and |\axp at newtheoremreptmp| are 
 % used for. |\axp at newtheoremrep| is defined differently
-% depending on the compilation mode
+% depending on the compilation mode.
 %    \begin{macrocode}
 \newcommand\newtheoremrep[1]{%
   \@oparg{\axp at newtheoremreptmp{#1}}[]%
@@ -648,31 +673,6 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
-% Finally, some class-specific behavior ensures that the theorems created by
-% |\newtheoremrep| appear with the correct style.
-% For now, only the styling for ACM document classes (e.g.,
-% \textsf{sig-alternate}) and \textsf{llncs} needs to be adapted, as both
-% redefine the proof environments in different ways.
-% \changes{v1.0.4}{2017/03/08}{More faithful theorem style for ACM templates}
-% \changes{v1.0.4}{2017/03/08}{More robust coherent styling of proof sketches}
-%    \begin{macrocode}
-\ifdefined\@acmtitlebox
-  \newtheoremstyle{mystyle}
-    {6pt}
-    {6pt}
-    {\itshape}
-    {10pt}
-    {\scshape}
-    {.}
-    {.5em}
-    {}
-  \theoremstyle{mystyle}
-  \renewenvironment{proofsketch}{\begin{axp at oldproof}[sketch]}{\end{axp at oldproof}}
-\fi
-  \@ifclassloaded{llncs}{
-    \renewenvironment{proofsketch}{\begin{axp at oldproof}[sketch]}{\end{axp at oldproof}}
-  }{}
-%    \end{macrocode}
 % \begin{environment}{axp at oldproof}
 %   We save the definition of the existing |proof| environment.
 %    \begin{macrocode}  
@@ -680,6 +680,52 @@
   \let\endaxp at oldproof\endproof
 %    \end{macrocode}  
 % \end{environment}
+% \subsubsection{Class-Specific Behavior}    
+% Finally, some class-specific behavior common to all compilation modes  
+% \paragraph{\textsf{llncs} and other Springer document classes}
+% \changes{v1.0.6}{2018/05/10}{Better support of Springer document
+% classes}
+%     \begin{macrocode}
+   \ifdefined\spnewtheorem
+%    \end{macrocode}
+% \begin{macro}{\@axp at newtheorem}
+% \begin{macro}{\@@axp at newtheorem}
+% It is necessary to use |\spnewtheorem| instead of |\newtheorem| in
+% Springer document classes to obtain standard formatting.
+%    \begin{macrocode}
+\def\@axp at newtheorem#1#2#3#4{%
+  \ifx\relax#4\relax
+    \ifx\relax#2\relax
+      \spnewtheorem{#1}{#3}{\bfseries}{\itshape}%
+    \else
+      \spnewtheorem{#1}[#2]{#3}{\bfseries}{\itshape}%
+    \fi
+  \else
+    \spnewtheorem{#1}{#3}[#4]{\bfseries}{\itshape}%
+  \fi
+}
+\def\@@axp at newtheorem#1#2{%
+  \spnewtheorem*{#1}{#2}{\upshape\bfseries}{\itshape}%
+}
+%    \end{macrocode}
+% \end{macro}    
+% \end{macro}    
+% We have to redefine the macro |\@thmcountersep| for proper sectioned
+% counters.
+%    \begin{macrocode}
+\def\@thmcountersep{.}
+%    \end{macrocode}
+% We remove the parentheses added by default for theorem notes, which are
+% not compatible with the use of theorem notes by \textsf{apxproof}.
+%    \begin{macrocode}
+\def\@Opargbegintheorem#1#2#3#4{#4\trivlist
+      \item[\hskip\labelsep{#3#1}]{#3 #2\@thmcounterend\ }}
+\def\@spopargbegintheorem#1#2#3#4#5{\trivlist
+      \item[\hskip\labelsep{#4#1\ #2}]{#4 #3\@thmcounterend\ }#5}
+%    \end{macrocode}
+%    \begin{macrocode}
+  \fi
+%    \end{macrocode}
 % \subsection{Inline Compilation Mode}
 %    \begin{macrocode}
 \ifthenelse{\equal{\axp at appendix}{inline}}{
@@ -693,11 +739,7 @@
   \def\axp at newtheoremrep#1[#2]#3[#4]{%
     \expandafter\let\csname #1\endcsname\undefined
     \expandafter\let\csname c@#1\endcsname\undefined
-    \ifx\relax#4\relax
-      \newtheorem{#1}[#2]{#3}%
-    \else
-      \newtheorem{#1}{#3}[#4]%
-    \fi
+    \axp at newtheorem{#1}{#2}{#3}{#4}%
     \NewEnviron{#1rep}[1][]{%
       \begin{#1}[##1]\BODY\end{#1}%
     }
@@ -822,21 +864,25 @@
   \def\axp at newtheoremrep#1[#2]#3[#4]{%
     \expandafter\let\csname #1\endcsname\undefined
     \expandafter\let\csname c@#1\endcsname\undefined
-    \ifx\relax#4\relax
-      \newtheorem{#1}[#2]{#3}%
-    \else
-      \newtheorem{#1}{#3}[#4]%
-    \fi
+    \axp at newtheorem{#1}{#2}{#3}{#4}%
     \expandafter\pretocmd\csname #1\endcsname{\noproofinappendix}{}{}%
-    \newtheorem*{axp@#1rp}{#3}%
+    \axp at newtheorem*{axp@#1rp}{#3}%
 %    \end{macrocode}  
 % We then define a |foobarrep| environment that increments the
 % |axp at rpcounter| and typeset the regular |foobar| theorem with a label
-% derived from the counter.    
+% derived from the counter. We distinguish the case when the theorem
+% argument has a note and when it does not.
+% \changes{v1.0.6}{2018/05/10}{Better handling of note-free theorems in
+% document classes that treat theorems differently when they have an
+% empty note}
 %    \begin{macrocode}  
     \NewEnviron{#1rep}[1][]{%
       \addtocounter{axp at rpcounter}{1}%
-      \begin{#1}[##1]\label{axp at r\roman{axp at rpcounter}}\BODY\end{#1}%
+      \ifx\relax##1\relax
+        \begin{#1}\label{axp at r\roman{axp at rpcounter}}\BODY\end{#1}%
+      \else
+        \begin{#1}[##1]\label{axp at r\roman{axp at rpcounter}}\BODY\end{#1}%
+      \fi    
 %    \end{macrocode}  
 % We set the |axp at seenreptheorem| toggle to indicate that we are looking
 % for the proof of the theorem, then store in a macro the content of the
@@ -854,12 +900,14 @@
 % defined labels.
 % \changes{v1.0.2}{2016/12/13}{Fix missing space between repeated theorem
 % counter and theorem note}
+% \changes{v1.0.6}{2018/05/10}{Fix incorrect use of \texttt{\textbackslash noexpand}
+% in optional argument of macro environment}
 %    \begin{macrocode}  
       \axp at writesection%
       \immediate\write\axp at proofsfile{%
         \noexpand\begin{axp@#1rp}
           [\noexpand\ref{axp at r\roman{axp at rpcounter}}%
-           \@ifnotempty{##1}{ \noexpand##1}]%
+           \@ifnotempty{##1}{ \unexpanded{##1}}]%
           \noexpand\let\noexpand\label\noexpand\@gobble%
           \expandafter\noexpand\csname rplet\roman{axp at rpcounter}%
                                \endcsname
@@ -1006,6 +1054,8 @@
 % \begin{macro}{\axp at writesection}
 % If |\axp at sectitle| is not empty, we create
 % a new section in the appendix, referring to the main text section.
+% \changes{v1.0.6}{2018/05/10}{Fix extraneous space after section number
+% in appendix titles}
 %    \begin{macrocode}  
   \newcommand\axp at writesection{%
     \ifx\axp at sectitle\@empty
@@ -1012,7 +1062,7 @@
     \else
       \immediate\write\axp at proofsfile{%
         \noexpand\def\noexpand\axp at tmp{%
-          \noexpand\ref{axp at s\roman{axp at seccounter}}
+          \noexpand\ref{axp at s\roman{axp at seccounter}}%
         }
         \noexpand\axp at section{%
           \noexpand\appendixsectionformat{\protect\noexpand\axp at tmp}%
@@ -1047,6 +1097,11 @@
 % a separate bibliography for the appendix (unless the |bibliography|
 % option is set to |common|). There is an extra test to
 % ensure an empty bibliography environment is not produced.
+% The name of the bibliography is changed to |\appendixrefname|; in most
+% document classes, it is called |\refname| but it is occasionally
+% (|scrartcl|, |scrreprt|) called |\bibname|.
+% \changes{v1.0.6}{2018/05/10}{Deal with document classes where the
+% bibliography is called \texttt{\textbackslash bibname}}
 %    \begin{macrocode}
     \AtEndDocument{
       \appendixprelim
@@ -1057,7 +1112,11 @@
         \immediate\closeout\axp at proofsfile
         \input{\jobname.axp}
       \ifthenelse{\equal{\axp at bibliography}{separate}}{
-        \renewcommand{\refname}{\appendixrefname}
+        \ifdefined\refname
+          \renewcommand{\refname}{\appendixrefname}
+        \else\ifdefined\bibname
+          \renewcommand{\bibname}{\appendixrefname}
+        \fi\fi
         \let\axp at oldthebibliography\thebibliography
         \renewcommand\thebibliography[1]{%
           \ifx\relax#1\relax\else\axp at oldthebibliography{#1}\fi}
@@ -1072,24 +1131,30 @@
 %    \end{macrocode}
 % \subsubsection{Class-Specific Behavior}    
 % We conclude with some class-specific behavior.
-% \begin{macro}{\@getcl at ss}
-% \begin{macro}{\@getclass}
-% \begin{macro}{\@currentclass}
-% We first use a little trick to store the document class in
-% macro |\@currentclass|, from
-% \url{http://tex.stackexchange.com/a/43541}.
+% \paragraph{ACM Document Classes (old versions, till 2017)}
+% \changes{v1.0.4}{2017/03/08}{More faithful theorem style for ACM templates}
+% \changes{v1.0.4}{2017/03/08}{More robust coherent styling of proof sketches}
 %    \begin{macrocode}
-  \def\@getcl at ss#1.cls#2\relax{\def\@currentclass{#1}}
-  \def\@getclass{\expandafter\@getcl at ss\@filelist\relax}
-  \@getclass
+  \ifdefined\@acmtitlebox
 %    \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \paragraph{ACM Document Classes}
+% We first redefine the |proofsketch| environment, which is used
+% differently in the base class.    
 %    \begin{macrocode}
-  \ifdefined\@acmtitlebox
+  \renewenvironment{proofsketch}{\begin{axp at oldproof}[sketch]}{\end{axp at oldproof}}
 %    \end{macrocode}
+% We adjust the styling of theorems for the needs of \textsf{apxproof}.
+%    \begin{macrocode}  
+  \newtheoremstyle{mystyle}
+    {6pt}
+    {6pt}
+    {\itshape}
+    {10pt}
+    {\scshape}
+    {.}
+    {.5em}
+    {}
+  \theoremstyle{mystyle}
+%    \end{macrocode}
 % \begin{macro}{\thebibliography}
 % \begin{macro}{\refname}
 % \begin{macro}{\appendixrefname}
@@ -1125,6 +1190,30 @@
 %    \begin{macrocode}
   \fi
 %    \end{macrocode}
+% \paragraph{ACM Document Classes (new version)}
+% \changes{v1.0.6}{2018/05/10}{Support of new ACM document class
+% (\texttt{acmart.cls})}
+% Again, we adjust the styling of theorems for the needs of \textsf{apxproof}.
+%    \begin{macrocode}
+  \@ifclassloaded{acmart}{  
+%    \end{macrocode}
+%    \begin{macrocode}  
+  \newtheoremstyle{mystyle}
+    {.5\baselineskip\@plus.2\baselineskip
+      \@minus.2\baselineskip}
+    {.5\baselineskip\@plus.2\baselineskip
+      \@minus.2\baselineskip}
+    {\@acmplainbodyfont}
+    {\@acmplainindent}
+    {\@acmplainheadfont}
+    {.}
+    {.5em}
+    {\thmname{#1}\thmnumber{ #2}\thmnote{ {\@acmplainheadfont #3}}}
+  \theoremstyle{mystyle}
+%    \end{macrocode}
+%    \begin{macrocode}
+  }{} 
+%    \end{macrocode}
 % \paragraph{\textsf{lipcs}}
 %    \begin{macrocode}
    \ifdefined\lipics at opterrshort
@@ -1144,7 +1233,21 @@
 %    \begin{macrocode}
   \fi
 %    \end{macrocode}
+% \paragraph{\textsf{llncs} and other Springer document classes}
 %    \begin{macrocode}
+  \@ifclassloaded{llncs}{
+%    \end{macrocode}
+% \begin{macro}{proofsketch}
+% We first redefine the |proofsketch| environment, which is used
+% differently in the base class.    
+%    \begin{macrocode}
+    \renewenvironment{proofsketch}{\begin{axp at oldproof}[sketch]}{\end{axp at oldproof}}
+%    \end{macrocode}
+% \end{macro}
+%    \begin{macrocode}
+  }{}
+%     \end{macrocode}
+%    \begin{macrocode}
 }
 %    \end{macrocode}
 % \Finale

Modified: trunk/Master/texmf-dist/tex/latex/apxproof/apxproof.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/apxproof/apxproof.sty	2018-05-10 21:37:22 UTC (rev 47664)
+++ trunk/Master/texmf-dist/tex/latex/apxproof/apxproof.sty	2018-05-10 21:37:35 UTC (rev 47665)
@@ -27,7 +27,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2005/12/01]
 \ProvidesPackage{apxproof}
-  [2017/05/31 v1.0.5 Automatic proofs in appendix]
+  [2018/05/10 v1.0.6 Automatic proofs in appendix]
 \RequirePackage{bibunits}
 \RequirePackage{environ}
 \RequirePackage{etoolbox}
@@ -72,6 +72,17 @@
   \errmessage{Error: unsupported option bibliography=\axp at bibliography for
   package apxproof}
 }}
+\def\axp at newtheorem{\@ifstar\@@axp at newtheorem\@axp at newtheorem}
+\def\@axp at newtheorem#1#2#3#4{%
+  \ifx\relax#4\relax
+    \newtheorem{#1}[#2]{#3}%
+  \else
+    \newtheorem{#1}{#3}[#4]%
+  \fi
+}
+\def\@@axp at newtheorem#1#2{%
+  \newtheorem*{#1}{#2}%
+}
 \newcommand\newtheoremrep[1]{%
   \@oparg{\axp at newtheoremreptmp{#1}}[]%
 }
@@ -89,33 +100,34 @@
 \newcommand{\appendixbibliographyprelim}{}
 \newcommand{\appendixprelim}{\clearpage\onecolumn}
 \newcommand{\appendixsectionformat}[2]{Proofs for Section~#1 (#2)}
-\ifdefined\@acmtitlebox
-  \newtheoremstyle{mystyle}
-    {6pt}
-    {6pt}
-    {\itshape}
-    {10pt}
-    {\scshape}
-    {.}
-    {.5em}
-    {}
-  \theoremstyle{mystyle}
-  \renewenvironment{proofsketch}{\begin{axp at oldproof}[sketch]}{\end{axp at oldproof}}
-\fi
-  \@ifclassloaded{llncs}{
-    \renewenvironment{proofsketch}{\begin{axp at oldproof}[sketch]}{\end{axp at oldproof}}
-  }{}
   \let\axp at oldproof\proof
   \let\endaxp at oldproof\endproof
+   \ifdefined\spnewtheorem
+\def\@axp at newtheorem#1#2#3#4{%
+  \ifx\relax#4\relax
+    \ifx\relax#2\relax
+      \spnewtheorem{#1}{#3}{\bfseries}{\itshape}%
+    \else
+      \spnewtheorem{#1}[#2]{#3}{\bfseries}{\itshape}%
+    \fi
+  \else
+    \spnewtheorem{#1}{#3}[#4]{\bfseries}{\itshape}%
+  \fi
+}
+\def\@@axp at newtheorem#1#2{%
+  \spnewtheorem*{#1}{#2}{\upshape\bfseries}{\itshape}%
+}
+\def\@thmcountersep{.}
+\def\@Opargbegintheorem#1#2#3#4{#4\trivlist
+      \item[\hskip\labelsep{#3#1}]{#3 #2\@thmcounterend\ }}
+\def\@spopargbegintheorem#1#2#3#4#5{\trivlist
+      \item[\hskip\labelsep{#4#1\ #2}]{#4 #3\@thmcounterend\ }#5}
+  \fi
 \ifthenelse{\equal{\axp at appendix}{inline}}{
   \def\axp at newtheoremrep#1[#2]#3[#4]{%
     \expandafter\let\csname #1\endcsname\undefined
     \expandafter\let\csname c@#1\endcsname\undefined
-    \ifx\relax#4\relax
-      \newtheorem{#1}[#2]{#3}%
-    \else
-      \newtheorem{#1}{#3}[#4]%
-    \fi
+    \axp at newtheorem{#1}{#2}{#3}{#4}%
     \NewEnviron{#1rep}[1][]{%
       \begin{#1}[##1]\BODY\end{#1}%
     }
@@ -159,16 +171,16 @@
   \def\axp at newtheoremrep#1[#2]#3[#4]{%
     \expandafter\let\csname #1\endcsname\undefined
     \expandafter\let\csname c@#1\endcsname\undefined
-    \ifx\relax#4\relax
-      \newtheorem{#1}[#2]{#3}%
-    \else
-      \newtheorem{#1}{#3}[#4]%
-    \fi
+    \axp at newtheorem{#1}{#2}{#3}{#4}%
     \expandafter\pretocmd\csname #1\endcsname{\noproofinappendix}{}{}%
-    \newtheorem*{axp@#1rp}{#3}%
+    \axp at newtheorem*{axp@#1rp}{#3}%
     \NewEnviron{#1rep}[1][]{%
       \addtocounter{axp at rpcounter}{1}%
-      \begin{#1}[##1]\label{axp at r\roman{axp at rpcounter}}\BODY\end{#1}%
+      \ifx\relax##1\relax
+        \begin{#1}\label{axp at r\roman{axp at rpcounter}}\BODY\end{#1}%
+      \else
+        \begin{#1}[##1]\label{axp at r\roman{axp at rpcounter}}\BODY\end{#1}%
+      \fi
       \global\toggletrue{axp at seenreptheorem}%
       \global\expandafter\let\csname rplet\roman{axp at rpcounter}%
                              \endcsname
@@ -177,7 +189,7 @@
       \immediate\write\axp at proofsfile{%
         \noexpand\begin{axp@#1rp}
           [\noexpand\ref{axp at r\roman{axp at rpcounter}}%
-           \@ifnotempty{##1}{ \noexpand##1}]%
+           \@ifnotempty{##1}{ \unexpanded{##1}}]%
           \noexpand\let\noexpand\label\noexpand\@gobble%
           \expandafter\noexpand\csname rplet\roman{axp at rpcounter}%
                                \endcsname
@@ -253,7 +265,7 @@
     \else
       \immediate\write\axp at proofsfile{%
         \noexpand\def\noexpand\axp at tmp{%
-          \noexpand\ref{axp at s\roman{axp at seccounter}}
+          \noexpand\ref{axp at s\roman{axp at seccounter}}%
         }
         \noexpand\axp at section{%
           \noexpand\appendixsectionformat{\protect\noexpand\axp at tmp}%
@@ -278,7 +290,11 @@
         \immediate\closeout\axp at proofsfile
         \input{\jobname.axp}
       \ifthenelse{\equal{\axp at bibliography}{separate}}{
-        \renewcommand{\refname}{\appendixrefname}
+        \ifdefined\refname
+          \renewcommand{\refname}{\appendixrefname}
+        \else\ifdefined\bibname
+          \renewcommand{\bibname}{\appendixrefname}
+        \fi\fi
         \let\axp at oldthebibliography\thebibliography
         \renewcommand\thebibliography[1]{%
           \ifx\relax#1\relax\else\axp at oldthebibliography{#1}\fi}
@@ -288,10 +304,18 @@
       }{}
     }
   }{}
-  \def\@getcl at ss#1.cls#2\relax{\def\@currentclass{#1}}
-  \def\@getclass{\expandafter\@getcl at ss\@filelist\relax}
-  \@getclass
   \ifdefined\@acmtitlebox
+  \renewenvironment{proofsketch}{\begin{axp at oldproof}[sketch]}{\end{axp at oldproof}}
+  \newtheoremstyle{mystyle}
+    {6pt}
+    {6pt}
+    {\itshape}
+    {10pt}
+    {\scshape}
+    {.}
+    {.5em}
+    {}
+  \theoremstyle{mystyle}
     \patchcmd{\thebibliography}{References}{\protect\refname}{}{}
     \patchcmd{\thebibliography}{References}{\protect\refname}{}{}
     \newcommand{\refname}{REFERENCES}
@@ -304,6 +328,20 @@
       \label{axp at s\roman{axp at seccounter}}%
     }
   \fi
+  \@ifclassloaded{acmart}{
+  \newtheoremstyle{mystyle}
+    {.5\baselineskip\@plus.2\baselineskip
+      \@minus.2\baselineskip}
+    {.5\baselineskip\@plus.2\baselineskip
+      \@minus.2\baselineskip}
+    {\@acmplainbodyfont}
+    {\@acmplainindent}
+    {\@acmplainheadfont}
+    {.}
+    {.5em}
+    {\thmname{#1}\thmnumber{ #2}\thmnote{ {\@acmplainheadfont #3}}}
+  \theoremstyle{mystyle}
+  }{}
    \ifdefined\lipics at opterrshort
     \renewcommand{\appendixbibliographyprelim}{%
       \global\let\@oldbiblabel\@biblabel
@@ -310,6 +348,9 @@
       \def\@biblabel{\hspace*{-2em}\small\@oldbiblabel}%
     }
   \fi
+  \@ifclassloaded{llncs}{
+    \renewenvironment{proofsketch}{\begin{axp at oldproof}[sketch]}{\end{axp at oldproof}}
+  }{}
 }
 \endinput
 %%



More information about the tex-live-commits mailing list