%%
%% This is file `caption-light.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% caption-light.dtx  (with options: `package')
%% 
%% Copyright (C) 1994-2022 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]
\ProvidesPackage{caption-light}[2021/03/21 v1.0a Customizing captions (AR)]
\RequirePackage{caption3}[2020/08/30] % needs v2.0 or newer
\caption@ifbool{documentclass}{}{%
  \caption@WarningNoLine{%
    Unknown document class (or package),\MessageBreak
    standard defaults will be used}}
\@ifpackageloaded{caption2}{%
  \caption@Error{%
    You can't use both, the (obsolete) caption2 *and*\MessageBreak
    the caption-light package}%
  \endinput
}{}
\caption@SetupOptions{caption-light}{\caption@setkeys{caption}{#2}}
\caption@ProcessOptions*{caption-light}
\caption@ifdefined\caption@makecaption
  {\caption@Info{\noexpand\caption@makecaption is already defined}%
   \endinput}{}
\long\def\caption@makecaption#1#2{%
  \caption@iftop\caption@belowskip\caption@aboveskip
  \caption@labelseparator % defines \caption@iflabelfont and \caption@labelsep
  \caption@singlelinecheck
    {\sbox\@tempboxa{\caption@@makecaption{#1}{#2}}%
     \ifdim \wd\@tempboxa >\hsize}%
    {\iftrue}%
    \caption@@makecaption{#1}{#2}\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \caption@iftop\caption@aboveskip\caption@belowskip
  \caption@@make@epilogue}
\newcommand\caption@@makecaption[2]{%
  \caption@applyfont
  \ifcaption@star\else
    \begingroup
      \captionlabelfont #1\relax\relax
    \endgroup
  \fi
  \ifcaption@star\else
    \begingroup
      \caption@iflabelfont\captionlabelfont
      \relax\caption@labelsep
    \endgroup
  \fi
  \begingroup
    \captiontextfont #2%
  \endgroup}
\let\@makecaption\caption@makecaption
\caption@AtBeginDocument{%
  \DeclareCaptionOption{type}{\setcaptiontype{#1}}%
  \DeclareCaptionOption{type*}{\setcaptiontype*{#1}}%
}
\newcommand*\setcaptiontype{%
  \caption@teststar{\def\@captype}{}{}}
\caption@AtBeginDocument{%
  \def\captionof{\caption@teststar\caption@of{\caption*}\caption}}
\newcommand*\caption@of[2]{\setcaptiontype*{#2}#1}
\endinput
%%
%% End of file `caption-light.sty'.
