%%
%% This is file `actuarialangle.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% actuarialangle.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2019 Vincent Goulet
%% 
%% This file 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 2006/05/20 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
%% 
%% The Current Maintainer of this work is Vincent Goulet
%% <vincent.goulet@act.ulaval.ca>.
%% 
%% This work consists of the files actuarialangle.dtx and
%% actuarialangle.ins and the derived files listed in the README.md file.
%% 
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
\ProvidesPackage{actuarialangle}[2019/06/13 v2.1 Actuarial angle]
\newif\ifacta@thinspace \acta@thinspacetrue
\newif\ifacta@bracket   \acta@brackettrue
\DeclareOption{thinspace}{\acta@thinspacetrue}
\DeclareOption{thickspace}{\acta@thinspacefalse}
\DeclareOption{nobracket}{\acta@bracketfalse}
\ProcessOptions
\def\acta@overbarkern@fontdimen{8}
\def\acta@overbarkern@family{\thr@@}
\def\acta@overbarrule@fontdimen{8}
\def\acta@overbarrule@family{\thr@@}
\def\acta@overbarvgap@fontdimen{8}
\def\acta@overbarvgap@family{\thr@@}
\def\acta@overbarkern#1{%
  \fontdimen\acta@overbarkern@fontdimen
  \ifx#1\displaystyle
    \textfont
  \else
    \ifx#1\textstyle
      \textfont
    \else
      \ifx#1\scriptstyle
        \scriptfont
      \else
        \scriptscriptfont
      \fi
    \fi
  \fi
  \acta@overbarkern@family
}
\def\acta@overbarrule#1{%
  \fontdimen\acta@overbarrule@fontdimen
  \ifx#1\displaystyle
    \textfont
  \else
    \ifx#1\textstyle
      \textfont
    \else
      \ifx#1\scriptstyle
        \scriptfont
      \else
        \scriptscriptfont
      \fi
    \fi
  \fi
  \acta@overbarrule@family
}
\def\acta@overbarvgap#1{%
  \ifx\acta@overbarrule@fontdimen\acta@overbarvgap@fontdimen
    \thr@@
  \fi
  \fontdimen\acta@overbarvgap@fontdimen
  \ifx#1\displaystyle
    \textfont
  \else
    \ifx#1\textstyle
      \textfont
    \else
      \ifx#1\scriptstyle
        \scriptfont
      \else
        \scriptscriptfont
      \fi
    \fi
  \fi
  \acta@overbarvgap@family
}
\DeclareRobustCommand{\actuarialangle}{\mathpalette\acta@angle}
\def\acta@angle#1#2{%
  \mathord{%
    \mkern1mu%
    \vbox{%
      \kern\acta@overbarkern#1%
      \hrule \@height\acta@overbarrule#1%
      \hbox{%
        \vbox{%
          \kern\acta@overbarvgap#1%
          \hbox{$\m@th#1#2$}%
        }%
        \setbox\z@\hbox{$#1\mathstrut$}%
        \vrule \@width\acta@overbarrule#1\@depth\dp\z@
      }%
    }%
    \mkern1mu%
  }%
}
\ifacta@thinspace
  \newcommand*\angl[1]{{\actuarialangle{#1\mkern1mu}}}
\else
  \newcommand*\angl[1]{{\actuarialangle{#1\mkern2mu}}}
\fi
\newcommand*\angln{{\angl n}}
\newcommand*\anglr{{\angl r}}
\newcommand*\anglk{{\angl k}}
\ifacta@bracket
  \RequirePackage{pict2e}
  \DeclareRobustCommand{\overanglebracket}{%
    \mathpalette\acta@anglebracket}
  \def\acta@anglebracket#1#2{%
    \mathord{%
      \mkern1mu%
      \linethickness{\acta@overbarrule#1}%
      \setbox\z@\hbox{$\m@th#1#2$}%
      \dimen\z@\wd\z@ \dimen\tw@\ht\z@
      \setbox\tw@\hbox{%
        \unitlength\dimen\tw@
        \begin{picture}(0.4,0)
          \polyline(0.4001,0)(0.4,0)(0,-0.8)
        \end{picture}%
        \unitlength\dimen\z@
        \begin{picture}(1,0)
          \put(0,0){\line(1,0){1}}
        \end{picture}%
        \unitlength\dimen\tw@
        \begin{picture}(0.4,0)
          \polyline(-0.0001,0)(0,0)(0.4,-0.8)
        \end{picture}%
      }%
      \dimen@\wd\tw@
      \vbox{%
        \baselineskip\z@
        \lineskip\acta@overbarvgap#1%
        \advance\lineskip\@halfwidth
        \lineskiplimit\lineskip
        \kern\acta@overbarkern#1%
        \kern\@halfwidth
        \box\tw@
        \hbox to\dimen@{\hss\unhbox\z@\hss}%
      }%
      \mkern1mu%
    }%
  }
  \let\group\overanglebracket
\fi
\AtBeginDocument{%
  \@ifpackageloaded{unicode-math}{%
    \ifx\XeTeXcharclass\@undefined
      \global\let\acta@overbarkern\Umathoverbarkern
      \global\let\acta@overbarrule\Umathoverbarrule
      \global\let\acta@overbarvgap\Umathoverbarvgap
      \global\let\acta@overbarkern@fontdimen\@undefined
      \global\let\acta@overbarkern@family\@undefined
      \global\let\acta@overbarrule@fontdimen\@undefined
      \global\let\acta@overbarrule@family\@undefined
      \global\let\acta@overbarvgap@fontdimen\@undefined
      \global\let\acta@overbarvgap@family\@undefined
    \else
      \gdef\acta@overbarkern@fontdimen{54}% XeTeX mistake? Use 55?
      \gdef\acta@overbarkern@family{\tw@}%
      \gdef\acta@overbarrule@fontdimen{54}%
      \gdef\acta@overbarrule@family{\tw@}%
      \gdef\acta@overbarvgap@fontdimen{54}% XeTeX mistake? Use 53?
      \gdef\acta@overbarvgap@family{\tw@}%
    \fi
  }{}%
}
\endinput
%%
%% End of file `actuarialangle.sty'.
