%%
%% This is file `caption-memoir.sto',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% caption-memoir.dtx  (with options: `package')
%% 
%% Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%% 
%% https://gitlab.com/axelsommerfeldt/caption
%% 
%% --------------------------------------------------------------------------
%% 
%% 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 your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%% 
%% This work has the LPPL maintenance status "maintained".
%% 
%% This Current Maintainer of this work is Axel Sommerfeldt.
%% 
%% This work consists of the files
%%   caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
%%   caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
%%   caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
%%   caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
%% the derived files
%%   caption.sty, caption-light.sty, caption2.sty, caption3.sty,
%%   caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
%%   caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
%%   caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty.
%% 
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesFile{caption-memoir.sto}[2023/09/08 v2.2c Adaption of the caption package to the memoir document class (AR)]
\providecommand*\AtCaptionSingleLineCheck{\g@addto@macro\caption@prepareslc} % for caption v3.5
\AtCaptionSingleLineCheck{%
  \let\pagenote\caption@gobble}
\DeclareCaptionLabelSeparator{@contdelim}{\@contdelim}
\SetCaptionDefault{labelseparator}{@contdelim}
\let\caption@memoir@delim\captiondelim
\renewcommand\captiondelim{%
  \captionsetup{labelsep=@contdelim}%
  \caption@memoir@delim}
\DeclareCaptionLabelSeparator{gobble}{}
\DeclareCaptionFont{@contnfont}{\@contnfont}
\SetCaptionDefault{labelfont}{@contnfont}
\DeclareCaptionFont{@conttfont}{\@conttfont}
\SetCaptionDefault{textfont}{@conttfont}
\let\caption@memoir@namefont\captionnamefont
\renewcommand\captionnamefont{%
  \captionsetup{labelfont=@contnfont}%
  \caption@memoir@namefont}
\let\caption@memoir@titlefont\captiontitlefont
\renewcommand\captiontitlefont{%
  \captionsetup{textfont=@conttfont}%
  \caption@memoir@titlefont}
\AtCaptionPackage{%
  \setlength\belowcaptionskip{0pt}}
\@ifundefined{DeclareCaptionAutoPosition}{}{%
  \DeclareCaptionAutoPosition{%
    \ifvmode
      \ifdim\prevdepth>-99\p@#2\else#1\fi
    \else
      #2%
    \fi}}%
\AtBeginDocument{\renewcommand*\endsidecaption{%
  \m@mscapend@fbox
  \caption@refstepcounter\@captype
  \m@mscaplabel
  \csname m@mscapcheckside\endcsname %<--- added 2012/08/19
  \begin{lrbox}{\m@mscap@capbox}%
    \begin{minipage}[c]{\sidecapwidth}%
      \sidecapstyle
      \@caption\@captype[\m@mscap@fortoc]{\m@mscap@forcap}
    \end{minipage}%
  \end{lrbox}%
  \m@mscapopboxes}}
\endinput
%%
%% End of file `caption-memoir.sto'.
