blob: fe69c3246528eb9345afcbfe77ad1413e0d256d0 (
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
|
%%
%% This is file `extdash.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% extdash.dtx (with options: `package')
%%
%% IMPORTANT NOTICE:
%%
%% This file is a generated file from the sources of the `ncctools'
%% bundle.
%%
%% You are not allowed to modify this file.
%%
%% You are allowed to distribute this file if and only if
%% it is distributed with the corresponding source files in
%% the `ncctools' bundle.
%%
%% For the copying and distribution conditions of the source files,
%% see the README file distributed with the ncctools bundle.
%%
%% File: extdash.dtx Copyright (C) 1998-2005 by Alexander I. Rozhenko
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{extdash}
[2005/01/29 v1.2 Extended Dash Package (NCC)]
\def\EXD@test#1{%
\@ifstar{\let\EXD@break\nobreak #1}{\let\EXD@break\@empty #1}%
}
\DeclareRobustCommand{\Hyphdash}{\EXD@test{\EXD@dash-}}
\DeclareRobustCommand{\Endash}{\EXD@test{\EXD@dash{--}}}
\DeclareRobustCommand{\Emdash}{\EXD@test{\EXD@emd@sh}}
\DeclareRobustCommand{\Halfspace}{\@tempcnta\z@
\@ifstar{\nobreak\EXD@space\ignorespaces}{\EXD@space\ignorespaces}%
}
\def\EXD@dash#1{%
\nobreak\leavevmode\hbox{#1}\EXD@break\hskip\z@skip \ignorespaces
}
\def\EXD@emd@sh{%
\ifvmode
\EXD@emdash\nobreak\hskip.35em
\else
\unskip\nobreak\@tempcnta\m@ne
\EXD@space \EXD@emdash \EXD@break \EXD@space
\fi \ignorespaces
}
\def\EXD@space{%
\edef\@tempa{%
\ifnum\@tempcnta<\z@ .4\else \ifnum \@tempcnta=\z@ .5\else .6\fi\fi
}%
\hskip \@tempa\fontdimen2\font \@plus .5\fontdimen3\font
\@minus \@tempa\fontdimen4\font
\@tempcnta -\@tempcnta
}
\def\EXD@emdash{\leavevmode\hbox{---}}
\DeclareOption{shortcuts}{%
\DeclareRobustCommand{\HyphOrDash}{%
\let\EXD@break\@empty
\@ifnextchar/{\EXD@d@sh}{%
\@ifnextchar-{\EXD@hdash}{%
\@ifnextchar,{\EXD@sp@ce}{\EXD@hyph}%
}%
}%
}
\DeclareRobustCommand{\BarOrDash}{%
\let\EXD@break\nobreak
\@ifnextchar/{\EXD@d@sh}{%
\@ifnextchar={\EXD@bdash}{%
\@ifnextchar,{\nobreak\EXD@sp@ce}{\EXD@bar}%
}%
}%
}
\def\EXD@d@sh/{\EXD@dash-}
\def\EXD@sp@ce,{\EXD@space}
\def\EXD@hdash-{\@ifnextchar-{\EXD@hhdash}{\EXD@dash{--}}}
\def\EXD@bdash={\@ifnextchar={\EXD@bbdash}{\EXD@dash{--}}}
\def\EXD@hhdash-{\EXD@emd@sh}
\def\EXD@bbdash={\EXD@emd@sh}
\AtBeginDocument{%
\let\EXD@hyph\- \let\@dischyph\HyphOrDash \let\-\@dischyph
\let\EXD@bar\= \let\@acciii\BarOrDash \let\=\@acciii
}
}
\DeclareOption{cyremdash}{%
\def\EXD@emdash{\leavevmode\hb@xt@.8\fontdimen6\font{--\hss--}}
}
\ProcessOptions\relax
\endinput
%%
%% End of file `extdash.sty'.
|