From b973409dc13ca2f3d88e8b4af904ac86937bf6a6 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Fri, 22 May 2020 20:49:42 +0000
Subject: ellipsis (22may20)

git-svn-id: svn://tug.org/texlive/trunk@55237 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/ellipsis/ellipsis.sty | 25 +++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/ellipsis/ellipsis.sty')

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'.
-- 
cgit v1.2.3

