%%
%% This is file `spacingtricks.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% spacingtricks.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2019-2023 by Antoine Missier <antoine.missier@ac-toulouse.fr>
%% 
%% This file 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
%% 2005/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{spacingtricks}
    [2023/12/06 v1.8 .dtx spacingtricks file]


\newif\ifspacingtricks@pifont
\DeclareOption{pifont}{\spacingtricks@pifonttrue}
\ProcessOptions \relax

\RequirePackage{ifthen}
\RequirePackage{calc}
\RequirePackage{setspace}
\RequirePackage{xspace}
\RequirePackage{centeredline}
\ifspacingtricks@pifont \RequirePackage{pifont} \fi

\newcommand*{\centered}[1]{{\setlength{\parskip}{0pt}\par\noindent\hfill
        #1\hfill\mbox{}}}
\newcommand{\footnotespace}{}
\newcommand{\footnoteindent}{}
\let\footnt\footnote
\renewcommand{\footnote}[2][]{\unskip\footnotespace%
    \ifthenelse{\equal{#1}{}}{
        \unskip\footnt{\footnoteindent\ignorespaces #2}
    }{
        \unskip\footnt[#1]{\footnoteindent\ignorespaces #2}
    }\unskip
}
\newlength{\strutheight}
\newcommand*{\vstrut}[2][0pt]{%
    \setlength{\strutheight}{#2}%
    \addtolength{\strutheight}{#1}%
    \unskip%
    \rule[-#1]{0pt}{\strutheight}%
    \ignorespaces%
}

\newlength{\strutdepth}
\newcommand*{\cstrut}[1]{%
    \setlength\strutdepth{#1}%
    \setlength\strutheight{2\strutdepth}% total height
    \addtolength{\strutdepth}{-0.5ex}%
    \unskip%
    \rule[-\strutdepth]{0pt}{\strutheight}%
   \ignorespaces%
}

\newlength{\parindentlength}
\setlength{\parindentlength}{\parindent}
\renewcommand{\indent}{\hspace{\parindentlength}}

\newenvironment*{indentblock}[1][\parindentlength]{
    \begin{list}{}{%
        \setlength{\leftmargin}{#1}
        \setlength{\itemsep}{0pt}
        \setlength{\topsep}{0pt} % previously 1ex
        \setlength{\partopsep}{0pt}
    }
    \item[]
}{\end{list}}

\newlength{\compactlistindent}
\setlength{\compactlistindent}{0.5em}
\newenvironment*{compactlist}[1][\textbullet]{
    \par % sometimes necessary
    \begin{list}{#1\unskip}{% \unskip gobbles space created by \xspace
        \setlength{\itemsep}{0pt}
        \setlength{\parsep}{0pt}
        \setlength{\topsep}{0ex}
        \setlength{\partopsep}{0pt}
        \setlength{\labelwidth}{1em}
        \setlength{\leftmargin}{\labelwidth}
        \addtolength{\leftmargin}{\labelsep}
        \addtolength{\leftmargin}{\compactlistindent}
    }
}{\end{list}}

\providecommand{\bul}{\textbullet\xspace}
\providecommand{\dash}{\textendash\xspace}
\providecommand{\ddash}{\textemdash\xspace}
\providecommand{\aster}{\textasteriskcentered\xspace}
\ifspacingtricks@pifont
    \providecommand{\hand}{\ding{43}\xspace}
    \providecommand{\checksymb}{\ding{51}\xspace}
    \providecommand{\arrowsymb}{\ding{226}\xspace}
\fi

\providecommand{\ie}{i.e.\@\xspace}
\providecommand{\eg}{e.g.\@\xspace}

\newcommand{\@@dualboxes}[3][1]{
    \par\noindent
    \raisebox{\depth-#1\totalheight}{#2} \hfill % needs calc
    \raisebox{\depth-#1\totalheight}{#3} \smallskip
}
\newcommand{\@dualboxes}[3][1]{
    \par\noindent \hfill
    \raisebox{\depth-#1\totalheight}{#2} \hfill
    \raisebox{\depth-#1\totalheight}{#3} \hfill\mbox{}\smallskip
}
\newcommand{\dualboxes}{\@ifstar{\@@dualboxes}{\@dualboxes}}

\newlength\juxtopskip
\setlength\juxtopskip{\smallskipamount}
\newlength\juxbottomskip
\setlength\juxbottomskip{\smallskipamount}
\newlength\juxsepspace
\setlength\juxsepspace{1.5em}
\newlength\side@width

\newenvironment{juxtapose}[1][0.5]{% left side ratio
    \def\otherside{\egroup % the internal function remembers \side@width
        \@tempdima=\side@width
        \side@width=\textwidth
        \advance\side@width by -\@tempdima
        \advance\side@width by -\juxsepspace
        \hskip\juxsepspace
        \linewidth=\side@width % for lists environments
        \vcenter\bgroup\hsize=\side@width\noindent % \ignorespaces useless
        }
    \side@width=#1\textwidth
    \advance\side@width by -0.5\juxsepspace
    \linewidth=\side@width % for lists environments
    \par\vskip\juxtopskip%
    \hbox\bgroup\begin{math}
    \vcenter\bgroup\hsize=\side@width\noindent\ignorespaces
    }{\egroup\end{math}\egroup\vskip\juxbottomskip}

\endinput
%%
%% End of file `spacingtricks.sty'.