diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/ellipsis/ellipsis.sty | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/ellipsis/ellipsis.sty b/Master/texmf-dist/tex/latex/ellipsis/ellipsis.sty index a5c1e555cd0..8eba8ffa631 100644 --- a/Master/texmf-dist/tex/latex/ellipsis/ellipsis.sty +++ b/Master/texmf-dist/tex/latex/ellipsis/ellipsis.sty @@ -22,7 +22,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{ellipsis} - [2004/9/28 v1.6 ellipsis: fixes spacing around \dots] + [2020/5/22 v1.7 ellipsis: fixes spacing around \dots] \newcommand{\ellipsisgap}{\fontdimen3\font} \DeclareOption{chicago}{\renewcommand{\ellipsisgap}{\fontdimen2\font}} \newcommand{\ellipsis@before}{} @@ -42,13 +42,13 @@ \ellipsis@before .\kern\ellipsisgap .\kern\ellipsisgap - .\kern\ellipsisgap + .\@\kern\ellipsisgap \ellipsis@after\relax} \newcommand{\ellipsis@centered}{% \ellipsis@before .\kern\ellipsisgap .\kern\ellipsisgap - .\ellipsis@after\relax} + .\@\ellipsis@after\relax} \newcommand\ellipsispunctuation{,.:;!?} \def\ellipsis@scan{\expandafter\ellipsis@scan@aux\ellipsispunctuation\ellipsis@delim} \def\ellipsis@scan@aux #1#2\ellipsis@delim{% @@ -68,21 +68,30 @@ \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 - \DeclareRobustCommand{\dots}{% - \ifmmode\mathellipsis\else\expandafter\textellipsis\fi}} + \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} + .\@\kern\ellipsisgap\relax} \endinput %% %% End of file `ellipsis.sty'. |