texlive[47546] Master/texmf-dist: xellipsis (16apr18)

commits+karl at tug.org commits+karl at tug.org
Tue May 1 19:57:30 CEST 2018


Revision: 47546
          http://tug.org/svn/texlive?view=revision&revision=47546
Author:   karl
Date:     2018-05-01 19:57:30 +0200 (Tue, 01 May 2018)
Log Message:
-----------
xellipsis (16apr18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/xellipsis/CHANGES
    trunk/Master/texmf-dist/doc/latex/xellipsis/xellipsis.pdf
    trunk/Master/texmf-dist/source/latex/xellipsis/xellipsis.dtx
    trunk/Master/texmf-dist/tex/latex/xellipsis/xellipsis.sty

Modified: trunk/Master/texmf-dist/doc/latex/xellipsis/CHANGES
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xellipsis/CHANGES	2018-05-01 17:57:18 UTC (rev 47545)
+++ trunk/Master/texmf-dist/doc/latex/xellipsis/CHANGES	2018-05-01 17:57:30 UTC (rev 47546)
@@ -1,3 +1,7 @@
+13 Apr 1202 (15 Apr 2018):  Made all of the configuration
+options configurable either by command or by package option.
+Version 2.0.
+
 18 December 1200 (20 December 2016):  Ellipses were able to
 start lines, which shouldn't happen; fixed that.  Added
 command \xelipend, which eliminates closing spaces for the

Modified: trunk/Master/texmf-dist/doc/latex/xellipsis/xellipsis.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/xellipsis/xellipsis.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/xellipsis/xellipsis.dtx	2018-05-01 17:57:18 UTC (rev 47545)
+++ trunk/Master/texmf-dist/source/latex/xellipsis/xellipsis.dtx	2018-05-01 17:57:30 UTC (rev 47546)
@@ -26,7 +26,7 @@
 
 % \iffalse
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-%<package>\ProvidesPackage{xellipsis}[2015/11/01 v1.2 support for highly configurable ellipses of arbitrary symbol, number, and distance]
+%<package>\ProvidesPackage{xellipsis}[2015/11/01 v2.0 support for highly configurable ellipses of arbitrary symbol, number, and distance]
 %<*driver>
 \documentclass{ltxdoc}
 
@@ -67,7 +67,7 @@
 \end{document}
 %</driver> \fi
 %
-% \title{The |xellipsis| Package, v1.2} \author{Donald P.\
+% \title{The |xellipsis| Package, v2.0} \author{Donald P.\
 % Goodman III} \date{\today}
 %
 % \maketitle
@@ -257,6 +257,12 @@
 % \textsc{affirmed}.'' \def\xelipchar{.}  So this sort of
 % thing has some real functionality at times.
 %
+% The same effect can be achieved by using the
+% \DescribeMacro{char}|char| package option; e.g., by
+% loading |xellipsis| with |\usepackage[char=*]{xellipsis}|.
+% Indeed, as of version 2.0, all these settings can be made
+% at the time of package loading.
+%
 % The \emph{number} of characters in an ellipsis is governed
 % by \DescribeMacro{\xelipnum}|\xelipnum|.   |\xelipnum| is
 % a \emph{counter}, not a macro, so if you change it, do so
@@ -268,7 +274,8 @@
 % \vbox{% \xelipnum=6 \xelip } \hfil% } \hfil% } \bigskip
 %
 % Most likely this would be 3 or 4, but I'm not going to try
-% to limit you.  |\xelipnum| defaults to 3.
+% to limit you.  |\xelipnum| defaults to 3.  The package
+% option is \DescribeMacro{num}|num|.
 %
 % There are three lengths responsible for controlling the
 % spacing of the ellipses.  The space \emph{before} the
@@ -278,7 +285,10 @@
 % \DescribeMacro{\xelipaft}|\xelipaft|; and the space
 % \emph{between} the characters of the ellipses is
 % \DescribeMacro{\xelipgap}|\xelipgap|.  Each of these
-% default to |3pt|.
+% default to |3pt|.  Their package options are
+% \DescribeMacro{before}|before|,
+% \DescribeMacro{after}|after|, and
+% \DescribeMacro{gap}|gap|.
 %
 % The benefit of having each of these independently
 % configurable is that you don't have to worry about
@@ -329,7 +339,9 @@
 % \DescribeMacro{\xelipprechar}|\xelipprechar|, while the
 % character that is to go \emph{after} the ellipsis is
 % \DescribeMacro{\xelippostchar}|\xelippostchar|.  Both of
-% these default to be empty.
+% these default to be empty.  Their package options are
+% \DescribeMacro{prechar}|prechar| and
+% \DescribeMacro{postchar}|postchar|.
 %
 % \bigskip
 % \hbox to\linewidth{%
@@ -367,6 +379,11 @@
 % spacing around these two characters; by default, all four
 % are set to |0pt|.  They are |dimen|s and can be set in
 % either the \TeX\ way or the \LaTeX\ |\setlength| way.
+% Their package options are
+% \DescribeMacro{prebefore}|prebefore|,
+% \DescribeMacro{preafter}|preafter|,
+% \DescribeMacro{postbefore}|postbefore|, and
+% \DescribeMacro{postafter}|postafter|,
 %
 % \bigskip
 % \hbox to\linewidth{%
@@ -419,21 +436,15 @@
 % current MLA behavior.  These all default to \emph{off},
 % and the default |xellipsis| behavior described above is
 % \emph{on}.  We define the conditions for the options, then
-% process the options themselves.
+% process the options themselves.  We use |xkeyval| to get
+% these options, so we can easily give them key-value
+% arguments.  We also need to define our default characters.
 %    \begin{macrocode}
-\newif\ifxel at latex\xel at latexfalse
-\newif\ifxel at chicago\xel at chicagofalse
-\newif\ifxel at oldmla\xel at oldmlafalse
-\newif\ifxel at mla\xel at mlafalse
-\newif\ifxel at bluebook\xel at bluebookfalse
-\DeclareOption{latex}{\xel at latextrue}
-\DeclareOption{chicago}{\xel at chicagotrue}
-\DeclareOption{oldmla}{\xel at oldmlatrue}
-\DeclareOption{mla}{\xel at mlatrue}
-\DeclareOption{bluebook}{\xel at bluebooktrue}
-\ProcessOptions
+\RequirePackage{xkeyval}
+\def\xelipchar{.}
+\def\xelipprechar{}
+\def\xelippostchar{}
 %    \end{macrocode}
-%
 % Proceed to define the dimens that we will need.  These are
 % mostly self-explanatory; the first is for the gap
 % between the characters of the ellipsis, the second is for
@@ -456,17 +467,31 @@
 %    \begin{macrocode}
 \newcount\xelipnum\xelipnum = 3%
 %    \end{macrocode}
-% Next we devise a command which will hold the characters we
-% use for ellipses.  The main ellipsis character defaults to
-% a period; the pre- and post-ellipsis characters default to
-% nothing.
 %    \begin{macrocode}
-\def\xelipchar{.}
-\def\xelipprechar{}
-\def\xelippostchar{}
+\newif\ifxel at latex\xel at latexfalse
+\newif\ifxel at chicago\xel at chicagofalse
+\newif\ifxel at oldmla\xel at oldmlafalse
+\newif\ifxel at mla\xel at mlafalse
+\newif\ifxel at bluebook\xel at bluebookfalse
+\DeclareOptionX{latex}{\xel at latextrue}
+\DeclareOptionX{chicago}{\xel at chicagotrue}
+\DeclareOptionX{oldmla}{\xel at oldmlatrue}
+\DeclareOptionX{mla}{\xel at mlatrue}
+\DeclareOptionX{bluebook}{\xel at bluebooktrue}
+\DeclareOptionX{char}{\def\xelipchar{#1}}
+\DeclareOptionX{num}{\xelipnum=#1}
+\DeclareOptionX{before}{\xelipbef=#1}
+\DeclareOptionX{after}{\xelipaft=#1}
+\DeclareOptionX{gap}{\xelipgap=#1}
+\DeclareOptionX{prechar}{\def\xelipprechar{#1}}
+\DeclareOptionX{postchar}{\def\xelippostchar{#1}}
+\DeclareOptionX{prebefore}{\xelipprebef=#1}
+\DeclareOptionX{preafter}{\xelippreaft=#1}
+\DeclareOptionX{postbefore}{\xelippostbef=#1}
+\DeclareOptionX{postafter}{\xelippostaft=#1}
+\ProcessOptionsX
 %    \end{macrocode}
-% Finally, we're ready to define the actual ellipsis code.
-% First, we need to define a counter for the loop.
+% Now we define the loop variable.
 %    \begin{macrocode}
 \newcount\xel at loopi\xel at loopi = 0%
 %    \end{macrocode}
@@ -559,7 +584,6 @@
 	\xelipprebef=\fontdimen2\font%
 	\xelippostaft=\fontdimen2\font%
 \fi
-% 		This is\xelip how it's supposed to work, I guess? (|\xelip|)
 %		}
 %    \end{macrocode}
 % And there's the |xellipsis| package.  I hope it proves

Modified: trunk/Master/texmf-dist/tex/latex/xellipsis/xellipsis.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xellipsis/xellipsis.sty	2018-05-01 17:57:18 UTC (rev 47545)
+++ trunk/Master/texmf-dist/tex/latex/xellipsis/xellipsis.sty	2018-05-01 17:57:30 UTC (rev 47546)
@@ -26,18 +26,11 @@
 %% derived files xellipsis.sty and xellipsis.pdf.
 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{xellipsis}[2015/11/01 v1.2 support for highly configurable ellipses of arbitrary symbol, number, and distance]
-\newif\ifxel at latex\xel at latexfalse
-\newif\ifxel at chicago\xel at chicagofalse
-\newif\ifxel at oldmla\xel at oldmlafalse
-\newif\ifxel at mla\xel at mlafalse
-\newif\ifxel at bluebook\xel at bluebookfalse
-\DeclareOption{latex}{\xel at latextrue}
-\DeclareOption{chicago}{\xel at chicagotrue}
-\DeclareOption{oldmla}{\xel at oldmlatrue}
-\DeclareOption{mla}{\xel at mlatrue}
-\DeclareOption{bluebook}{\xel at bluebooktrue}
-\ProcessOptions
+\ProvidesPackage{xellipsis}[2015/11/01 v2.0 support for highly configurable ellipses of arbitrary symbol, number, and distance]
+\RequirePackage{xkeyval}
+\def\xelipchar{.}
+\def\xelipprechar{}
+\def\xelippostchar{}
 \newdimen\xelipgap\xelipgap=3pt
 \newdimen\xelipbef\xelipbef=3pt
 \newdimen\xelipaft\xelipaft=3pt
@@ -46,9 +39,28 @@
 \newdimen\xelippostbef\xelippostbef=0pt
 \newdimen\xelippostaft\xelippostaft=0pt
 \newcount\xelipnum\xelipnum = 3%
-\def\xelipchar{.}
-\def\xelipprechar{}
-\def\xelippostchar{}
+\newif\ifxel at latex\xel at latexfalse
+\newif\ifxel at chicago\xel at chicagofalse
+\newif\ifxel at oldmla\xel at oldmlafalse
+\newif\ifxel at mla\xel at mlafalse
+\newif\ifxel at bluebook\xel at bluebookfalse
+\DeclareOptionX{latex}{\xel at latextrue}
+\DeclareOptionX{chicago}{\xel at chicagotrue}
+\DeclareOptionX{oldmla}{\xel at oldmlatrue}
+\DeclareOptionX{mla}{\xel at mlatrue}
+\DeclareOptionX{bluebook}{\xel at bluebooktrue}
+\DeclareOptionX{char}{\def\xelipchar{#1}}
+\DeclareOptionX{num}{\xelipnum=#1}
+\DeclareOptionX{before}{\xelipbef=#1}
+\DeclareOptionX{after}{\xelipaft=#1}
+\DeclareOptionX{gap}{\xelipgap=#1}
+\DeclareOptionX{prechar}{\def\xelipprechar{#1}}
+\DeclareOptionX{postchar}{\def\xelippostchar{#1}}
+\DeclareOptionX{prebefore}{\xelipprebef=#1}
+\DeclareOptionX{preafter}{\xelippreaft=#1}
+\DeclareOptionX{postbefore}{\xelippostbef=#1}
+\DeclareOptionX{postafter}{\xelippostaft=#1}
+\ProcessOptionsX
 \newcount\xel at loopi\xel at loopi = 0%
 \def\xelip{%
 \nobreak\hskip0pt\hbox{%



More information about the tex-live-commits mailing list