summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/xellipsis/xellipsis.sty
blob: a732f41568e11a1ede977fddded733185e21a666 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
%%
%% This is file `xellipsis.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% xellipsis.dtx  (with options: `package')
%% This is a generated file.
%% 
%% This document is copyright 2014 by Donald P. Goodman, and is
%% released publicly under the LaTeX Project Public License.  The
%% distribution and modification of this work is constrained by the
%% conditions of that license.  See
%% http://www.latex-project.org/lppl.txt
%% for the text of the license.  This document is released
%% under version 1.3 of that license, and this work may be distributed
%% or modified under the terms of that license or, at your option, any
%% later version.
%% 
%% This work has the LPPL maintenance status 'maintained'.
%% 
%% The Current Maintainer of this work is Donald P. Goodman
%% (dgoodmaniii@gmail.com).
%% 
%% This work consists of xellipsis.dtx, xellipsis.ins, and
%% derived files xellipsis.sty and xellipsis.pdf.

\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\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
\newdimen\xelipprebef\xelipprebef=0pt
\newdimen\xelippreaft\xelippreaft=0pt
\newdimen\xelippostbef\xelippostbef=0pt
\newdimen\xelippostaft\xelippostaft=0pt
\newcount\xelipnum\xelipnum = 3%
\newif\ifxel@latex\xel@latexfalse
\newif\ifxel@chicago\xel@chicagofalse
\newif\ifxel@oldmla\xel@oldmlafalse
\newif\ifxel@mla\xel@mlafalse
\newif\ifxel@bluebook\xel@bluebookfalse
\DeclareOptionX{latex}{\xel@latextrue}
\DeclareOptionX{chicago}{\xel@chicagotrue}
\DeclareOptionX{oldmla}{\xel@oldmlatrue}
\DeclareOptionX{mla}{\xel@mlatrue}
\DeclareOptionX{bluebook}{\xel@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@loopi\xel@loopi = 0%
\def\xelip{%
\nobreak\hskip0pt\hbox{%
\hskip\xelipprebef\xelipprechar\hskip\xelippreaft%
\hskip\xelipbef\xelipchar%
\xel@loopi = 1%
\loop\ifnum\xelipnum>\xel@loopi%
\advance\xel@loopi by1%
\hskip\xelipgap%
\xelipchar%
\repeat
\hskip\xelipaft%
\hskip\xelippostbef\xelippostchar\hskip\xelippostaft%
}%
}%
\def\xelipend{%
\begingroup%
\xelipaft=0pt
\xelip%
\endgroup%
}%
\ifxel@latex
\xelipbef=0pt%
\xelipaft=\fontdimen3\font%
\xelipgap=\fontdimen3\font%
\fi
\ifxel@chicago
\xelipbef=0pt%
\xelipaft=\fontdimen2\font%
\xelipgap=\fontdimen2\font%
\fi
\ifxel@mla
\xelipbef=\fontdimen2\font%
\xelipaft=\fontdimen2\font%
\xelipgap=\fontdimen2\font%
\fi
\ifxel@bluebook
\xelipbef=\fontdimen2\font%
\xelipaft=\fontdimen2\font%
\xelipgap=\fontdimen2\font%
\fi
\ifxel@oldmla
\xelipbef=\fontdimen2\font%
\xelipaft=\fontdimen2\font%
\xelipgap=\fontdimen2\font%
\def\xelipprechar{[}%
\def\xelippostchar{]}%
\xelipprebef=\fontdimen2\font%
\xelippostaft=\fontdimen2\font%
\fi
\endinput
%%
%% End of file `xellipsis.sty'.