%%
%% This is file `ellipsis.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ellipsis.dtx (with options: `package')
%%
%% ellipsis -- fixes spacing around ellipses (three dots)
%%
%%
%% Copyright (C) 2003-2020 by Peter Heslin
%% ---------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, version 1.3c of the 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 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status "author-maintained".
%%
%% The current maintainer and author of this work is Peter Heslin.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ellipsis}%
[2020/05/22 v1.8 fixes spacing around ellipses (three dots)]
\newcommand{\ellipsisgap}{\fontdimen3\font}
\DeclareOption{chicago}{\renewcommand{\ellipsisgap}{\fontdimen2\font}}
\newcommand{\ellipsis@before}{}
\newcommand{\ellipsis@after}{}
\newif\ifellipsis@alwayscenter
\ellipsis@alwayscenterfalse
\DeclareOption{mla}{%
\renewcommand{\ellipsis@before}{[\kern\ellipsisgap}%
\renewcommand{\ellipsis@after}{\kern\ellipsisgap ]}
\ellipsis@alwayscentertrue}
\newcommand\ellipsis@xspace{}
\DeclareOption{xspace}{%
\renewcommand{\ellipsis@xspace}{\xspace}}
\ProcessOptions\relax
\RequirePackage{xspace}
\newcommand{\ellipsis@default}{%
\ellipsis@before
.\kern\ellipsisgap
.\kern\ellipsisgap
.\@\kern\ellipsisgap
\ellipsis@after\relax}
\newcommand{\ellipsis@centered}{%
\ellipsis@before
.\kern\ellipsisgap
.\kern\ellipsisgap
.\@\ellipsis@after\relax}
\newcommand\ellipsispunctuation{,.:;!?}
\def\ellipsis@scan{\expandafter\ellipsis@scan@aux\ellipsispunctuation\ellipsis@delim}
\def\ellipsis@scan@aux #1#2\ellipsis@delim{%
\let\ellipsis@one=#1% the first char
\def\ellipsis@two{#2}% the remainder of the string
\ifx\ellipsis@token\ellipsis@one
\ellipsis@default
\else
\ifx\ellipsis@two\empty
\ellipsis@centered
\else
\ellipsis@scan@aux #2\ellipsis@delim
\fi
\fi}
\renewcommand{\textellipsis}{\futurelet\ellipsis@token\@textellipsis}
\def\@textellipsis{%
\ifellipsis@alwayscenter\ellipsis@centered\else
\ellipsis@scan%
\fi\ellipsis@xspace}%
\DeclareRobustCommand\textellipsis {\futurelet\ellipsis@token\@textellipsis}
\ifx\bbl@frenchdots\@undefined\else\def\ellipsis@frenchloaded{\relax}\fi
\AtBeginDocument{%
\ifx\ellipsis@frenchloaded\@undefined
\ifx\bbl@frenchdots\@undefined\else
\PackageError{ellipsis}{Babel French loaded after ellipsis.sty}%
{If you load Babel with the French option, do it before ellipsis.sty}%
\fi
\fi
\@ifpackageloaded{amsmath}%
{%
\DeclareRobustCommand\dots{%
\ifmmode \@xp \mdots@ \else \@xp \textellipsis \fi}%
}%
{%
\DeclareRobustCommand\dots{%
\ifmmode \mathellipsis \else \expandafter \textellipsis\fi}%
}%
}
\DeclareRobustCommand{\midwordellipsis}{%
\kern\ellipsisgap
.\kern\ellipsisgap
.\kern\ellipsisgap
.\@\kern\ellipsisgap\relax}
\endinput
%%
%% End of file `ellipsis.sty'.