%%
%% This is file `decorule.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% decorule.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright © 2010-2024 by Peter Flynn
%% 
%% This file was generated from an XML master source.
%% Amendments and corrections should be notified to the maintiner
%% for inclusion in future versions.
%% 
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
\ProvidesPackage{decorule}[2024/01/04 v0.9
  A decorative swelled rule from type]
%%
%% Packages required for the package
%%
%% Sets the Google NoTo typeface as the default.
\RequirePackage{noto}%
%% Provide for running headers and footers.
\RequirePackage{fancyhdr}%
%% Some \LaTeX{} kernel commands for general use, but in the case of ClassPack, particularly ltx@ifpackageloaded.
\RequirePackage{ltxcmds}%
\ifdefined\IfPackageLoaded\relax
  \else\newcommand{\IfPackageLoaded}[3]{%
    \ltx@ifpackageloaded{#1}{#2}{#3}}\fi
%% Creates paragraphs separated by white-space with no indentation.
\RequirePackage{parskip}%
%% Allow infinitely-variable font scaling. This is still needed even for \XeLaTeX{} and Lua\LaTeX{} but may one day be superseded by the anysizefont package
\RequirePackage{fix-cm}%
%% Provide for graphics (PNG, JPG, or PDF format (only) for pdflatex; EPS format (only) for standard \LaTeX{}); and for reflection and rotation features.
\RequirePackage{graphicx}%
%%
%% ******************************************************************
%%
%% Preliminary declarations
\newcounter{DCR@min}
\setcounter{DCR@min}{1}
\newcounter{DCR@max}
\setcounter{DCR@max}{20}
\newcounter{DCR@step}
\setcounter{DCR@step}{1}
\newcounter{DCR@rotate}
\setcounter{DCR@rotate}{45}
\newcounter{DCR@size}
\newlength{\DCR@raise}
\newlength{\DCR@skip}
\newcommand{\DCR@symbol}{\ensuremath{\sim}}
%%
%% ******************************************************************
%%
%% The main macro
\newcommand{\decorule}{%
  \begingroup\fontencoding{OT1}\fontfamily{cmr}\selectfont%
  \setcounter{DCR@size}{\c@DCR@min}%
  \loop
    \setlength{\DCR@raise}{\c@DCR@size pt}%
    \divide\DCR@raise by2
    \raisebox{-\DCR@raise}{\fontsize{\c@DCR@size}{0}\selectfont
      \rotatebox{\the\c@DCR@rotate}{%
        \reflectbox{\hbox to\c@DCR@size pt{\hss\DCR@symbol\hss}}}}%
    \setlength{\DCR@skip}{\c@DCR@size pt}%
    \divide\DCR@skip by3
    \multiply\DCR@skip by2
    \kern-\DCR@skip
    \addtocounter{DCR@size}{\c@DCR@step}%
    \ifnum\c@DCR@size<\c@DCR@max
  \repeat
  \setlength{\DCR@raise}{\c@DCR@max pt}%
  \divide\DCR@raise by2
  \raisebox{-\DCR@raise}{%
    \fontsize{\c@DCR@max}{0}\selectfont
    \rotatebox{\the\c@DCR@rotate}{\reflectbox{\hbox
        to\c@DCR@max pt{\hss\DCR@symbol\hss}}}}%
  \loop
    \setlength{\DCR@skip}{\c@DCR@size pt}%
    \divide\DCR@skip by3
    \multiply\DCR@skip by2
    \kern-\DCR@skip
    \setlength{\DCR@raise}{\c@DCR@size pt}%
    \divide\DCR@raise by2
    \raisebox{-\DCR@raise}{%
    \fontsize{\c@DCR@size}{0}\selectfont
    \rotatebox{\the\c@DCR@rotate}{\reflectbox{\hbox
        to\c@DCR@size pt{\hss\DCR@symbol\hss}}}}%
    \addtocounter{DCR@size}{-\c@DCR@step}%
    \ifnum\c@DCR@size>\c@DCR@min
  \repeat
  \setlength{\DCR@skip}{\c@DCR@min pt}%
  \divide\DCR@skip by3
  \multiply\DCR@skip by2
  \kern-\DCR@skip
  \setlength{\DCR@raise}{\c@DCR@min pt}%
  \divide\DCR@raise by2
  \raisebox{-\DCR@raise}{%
  \fontsize{\c@DCR@min}{0}\selectfont
  \rotatebox{\the\c@DCR@rotate}{\reflectbox{\hbox
        to\c@DCR@min pt{\hss\DCR@symbol\hss}}}}%
  \endgroup}

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