%%
%% This is file `latex-lab-firstaid-amsproc.ltx',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% latex-lab-firstaid.dtx  (with options: `amscls,amsproc')
%% 
%% This is a generated file.
%% 
%% Copyright 2021-2026 LaTeX Project
%% 
%% This file was generated from file(s) of the  `LaTeX-lab Bundle'.
%% ------------------------------------------------------------------------------------
%% 
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008 or later.
%% 
%% This file may only be distributed together with a copy of the LaTeX
%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle'
%% without such generated files.
%% 
%% The newest sources can be found below
%% 
%%    https://github.com/latex3/latex2e/blob/develop/required/latex-lab
%% 
%% Issues may be reported at
%% 
%%    https://github.com/latex3/latex2e/issues
%% 
%% 
%% File: latex-lab-firstaid.dtx (C) Copyright 2023-2026 LaTeX Project
\def\ltlabfirstaiddate{2026-07-29}
\def\ltlabfirstaidversion{0.85y}

\ExplSyntaxOn
\def\@author{\authors}
\renewenvironment{abstract}{%
    \ifx\maketitle\relax
      \ClassWarning{\@classname}{Abstract~ should~ precede~
        \protect\maketitle\space in~ AMS~ document~ classes;~ reported}%
    \fi
    \global\setbox\abstractbox=\vtop \bgroup
      \normalfont\Small
      \list{}{\labelwidth\z@
        \leftmargin3pc \rightmargin\leftmargin
        \listparindent\normalparindent \itemindent\z@
        \parsep\z@ \@plus\p@
        \let\fullwidthdisplay\relax
      }%
      \item[\hskip\labelsep\scshape\abstractname.]%
  }{%
    \endlist
    \par              % <--- added
    \egroup
    \ifx\@setabstract\relax \@setabstracta \fi
  }
\cs_set_eq:NN \newtheoremstyle \newtheoremstyle@saved
\tl_set:Nn \newtheoremstyle@vspace@default {
  .5\baselineskip \@plus  .2\baselineskip \@minus .2\baselineskip
}
\DeclareDocumentCommand \part {s ={shorttitle}o m}
    { \ParseLaTeXeHeading {part} {#1} {#2} {#3} }
\DeclareDocumentCommand \section {s ={shorttitle}o m}
  { \ParseLaTeXeHeading {section} {#1} {#2} {#3} }
\DeclareDocumentCommand \specialsection {s ={shorttitle}o m}
  { \ParseLaTeXeHeading {specialsection} {#1} {#2} {#3} }
\DeclareDocumentCommand \subsection {s ={shorttitle}o m}
  { \ParseLaTeXeHeading {subsection} {#1} {#2} {#3} }
\DeclareDocumentCommand \subsubsection {s ={shorttitle}o m}
  { \ParseLaTeXeHeading {subsubsection} {#1} {#2} {#3} }
\DeclareDocumentCommand \paragraph {s ={shorttitle}o m}
  { \ParseLaTeXeHeading {paragraph} {#1} {#2} {#3} }
\DeclareDocumentCommand \subparagraph {s ={shorttitle}o m}
  { \ParseLaTeXeHeading {subparagraph} {#1} {#2} {#3} }
\DeclareInstance{heading}{part}{display}
  {
    , name                = part
    , level               = -1                  % -1 or 0 ?
    , mark-cmd            = \partmark{#1}
    , para-indent         = true
    , before-vspace       = \linespacing plus \linespacing
    , after-vspace        = 0.5 \linespacing
    , heading-decls       = \normalfont \bfseries \raggedright
    , headformat-instance = part
    , prefix              = \partname
    , number-format       = \theheading .
    , number-decls        = \upshape
  }
\DeclareInstance{headformat}{part}{hang}
  {
    , number-title-sep = 0.5em
  }
\DeclareInstance{heading}{section}{display}
  {
    , name                = section
    , level               = 1
    , mark-cmd            = \sectionmark{#1}
    , para-indent         = true
    , before-vspace       = 0.7\linespacing plus \linespacing
    , after-vspace        = 0.5\linespacing
    , heading-decls       = \normalfont \bfseries \centering
    , headformat-instance = section
    , number-format       = \theheading .
    , number-decls        = \upshape
  }
\DeclareInstance{headformat}{section}{hang}
  {
    , number-title-sep = 0.5em
  }
\DeclareInstanceCopy{heading}{specialsection}{section}
\EditInstance{heading}{specialsection}
   {
     , before-vspace = \linespacing plus \linespacing
     , heading-decls = \large \scshape \centering
   }
\DeclareInstance{heading}{subsection}{runin}
  {
    , name                = subsection
    , level               = 2
    , mark-cmd            = \subsectionmark{#1}
    , before-vspace       = 0.5\linespacing plus 0.7\linespacing
    , after-vspace        = 0.5em
    , heading-decls       = \normalfont \bfseries
    , headformat-instance = subsection
    , number-format       = \theheading .
    , number-decls        = \upshape
  }
\DeclareInstance{headformat}{subsection}{runin}
  {
    , number-title-sep = 0.5em
    , title-format     = #1 \AddPunctuation{.}
    , heading-indent   = \normalparindent
  }
\DeclareInstance{heading}{subsubsection}{runin}
  {
    , name                = subsubsection
    , level               = 3
    , mark-cmd            = \subsubsectionmark{#1}
    , before-vspace       = 0.5\linespacing plus 0.7\linespacing
    , after-vspace        = 0.5em
    , heading-decls       = \normalfont \itshape
    , headformat-instance = subsubsection
    , number-format       = \theheading .
    , number-decls        =  \upshape
  }
\DeclareInstance{headformat}{subsubsection}{runin}
  {
    , number-title-sep = 0.5em
    , title-format     = #1 \AddPunctuation{.}
    , heading-indent   = \normalparindent
  }
\DeclareInstance{heading}{paragraph}{runin}
  {
    , name                = paragraph
    , level               = 4
    , mark-cmd            = \paragraphmark{#1}
    , before-vspace       = 0pt
    , after-vspace        = \fontdimen2\font
    , heading-decls       = \normalfont
    , headformat-instance = paragraph
    , number-format       = \theheading .
    , number-decls        = \upshape
  }
\DeclareInstance{headformat}{paragraph}{runin}
  {
    , number-title-sep = 0.5em
    , title-format     = #1 \AddPunctuation{.}
    , heading-indent   = \normalparindent
  }
\DeclareInstance{heading}{subparagraph}{runin}
  {
    , name                = subparagraph
    , level               = 5
    , mark-cmd            = \subparagraphmark{#1}
    , before-vspace       = 0pt
    , after-vspace        = \fontdimen2\font
    , heading-decls       = \normalfont
    , headformat-instance = subparagraph
    , number-format       = \theheading .
    , number-decls        = \upshape
  }
\DeclareInstance{headformat}{subparagraph}{runin}
  {
    , number-title-sep = 0.5em
    , title-format     = #1 \AddPunctuation{.}
  }
\ExplSyntaxOff
\endinput
%%
%% End of file `latex-lab-firstaid-amsproc.ltx'.
