| 1 |
%% |
| 2 |
%% This is file `xspace.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% xspace.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% The source is maintained by the LaTeX Project team and bug |
| 12 |
%% reports for it can be opened at https://latex-project.org/bugs/ |
| 13 |
%% (but please observe conditions on bug reports sent to that address!) |
| 14 |
%% |
| 15 |
%% |
| 16 |
%% Copyright (C) 1993-2026 |
| 17 |
%% The LaTeX Project and any individual authors listed elsewhere |
| 18 |
%% in this file. |
| 19 |
%% |
| 20 |
%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'. |
| 21 |
%% -------------------------------------------------------------------------- |
| 22 |
%% |
| 23 |
%% It may be distributed and/or modified under the |
| 24 |
%% conditions of the LaTeX Project Public License, either version 1.3c |
| 25 |
%% of this license or (at your option) any later version. |
| 26 |
%% The latest version of this license is in |
| 27 |
%% https://www.latex-project.org/lppl.txt |
| 28 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 29 |
%% version 2005/12/01 or later. |
| 30 |
%% |
| 31 |
%% This file may only be distributed together with a copy of the LaTeX |
| 32 |
%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle' |
| 33 |
%% without such generated files. |
| 34 |
%% |
| 35 |
%% The list of all files belonging to the LaTeX `Tools Bundle' is |
| 36 |
%% given in the file `manifest.txt'. |
| 37 |
%% |
| 38 |
%% File: xspace.dtx Copyright (C) 1991-1997 David Carlisle |
| 39 |
%% File: xspace.dtx Copyright (C) 2004-2006 David Carlisle, |
| 40 |
%% Morten H\o gholm |
| 41 |
\NeedsTeXFormat{LaTeX2e} |
| 42 |
\ProvidesPackage{xspace} |
| 43 |
[2014/10/28 v1.13 Space after command names (DPC,MH)] |
| 44 |
\DeclareRobustCommand\xspace{\@xspace@firsttrue |
| 45 |
\futurelet\@let@token\@xspace} |
| 46 |
\newif\if@xspace@first |
| 47 |
\def\@xspace@simple{\futurelet\@let@token\@xspace} |
| 48 |
\def\@xspace@exceptions@tlp{% |
| 49 |
,.'/?;:!~-)\ \/\bgroup\egroup\@sptoken\space\@xobeysp |
| 50 |
\footnote\footnotemark |
| 51 |
\xspace@check@icr |
| 52 |
} |
| 53 |
\begingroup |
| 54 |
\text@command\relax |
| 55 |
\global\let\xspace@check@icr\check@icr |
| 56 |
\endgroup |
| 57 |
\newcommand*\xspaceaddexceptions{% |
| 58 |
\g@addto@macro\@xspace@exceptions@tlp |
| 59 |
} |
| 60 |
\newcommand*\xspaceremoveexception[1]{% |
| 61 |
\def\reserved@a##1#1##2##3\@@{% |
| 62 |
\@xspace@if@q@nil@NF##2{% |
| 63 |
\def\reserved@a####1#1####2\@@{% |
| 64 |
\gdef\@xspace@exceptions@tlp{####1####2}}% |
| 65 |
\expandafter\reserved@a\@xspace@exceptions@tlp\@@ |
| 66 |
}% |
| 67 |
}% |
| 68 |
\expandafter\reserved@a\@xspace@exceptions@tlp#1\@xspace@q@nil\@@ |
| 69 |
} |
| 70 |
\def\@xspace@break@loop#1\@nil{} |
| 71 |
\providecommand*\@xspace@hook{} |
| 72 |
\begingroup\expandafter\expandafter\expandafter\endgroup |
| 73 |
\expandafter\ifx\csname eTeXversion\endcsname\relax |
| 74 |
\begingroup |
| 75 |
\catcode`\;=\active \catcode`\:=\active |
| 76 |
\catcode`\?=\active \catcode`\!=\active |
| 77 |
\catcode`\,=\active \catcode`\'=\active \catcode`\-=\active |
| 78 |
\xspaceaddexceptions{;:?!,'-} |
| 79 |
\endgroup |
| 80 |
\let\@xspace@eTeX@setup\relax |
| 81 |
\else |
| 82 |
\def\@xspace@eTeX@setup{% |
| 83 |
\begingroup |
| 84 |
\everyeof{}% |
| 85 |
\endlinechar=-1\relax |
| 86 |
\catcode`\ =10\relax |
| 87 |
\makeatletter |
| 88 |
\catcode`\\\z@ |
| 89 |
\catcode`\{\@ne |
| 90 |
\catcode`\}\tw@ |
| 91 |
\scantokens\expandafter{\expandafter\gdef |
| 92 |
\expandafter\@xspace@exceptions@tlp |
| 93 |
\expandafter{\@xspace@exceptions@tlp}}% |
| 94 |
\endgroup |
| 95 |
} |
| 96 |
\fi |
| 97 |
\def\@xspace{% |
| 98 |
\@xspace@lettoken@if@letter@TF \space{% |
| 99 |
\if@xspace@first |
| 100 |
\@xspace@firstfalse |
| 101 |
\let\@xspace@maybespace\space |
| 102 |
\@xspace@eTeX@setup |
| 103 |
\fi |
| 104 |
\expandafter\@xspace@check@token |
| 105 |
\@xspace@exceptions@tlp\@xspace@q@nil\@nil |
| 106 |
\@xspace@token@if@equal@NNT \space \@xspace@maybespace |
| 107 |
{% |
| 108 |
\@xspace@lettoken@if@expandable@TF |
| 109 |
{\expandafter\@xspace@simple}% |
| 110 |
{\@xspace@maybespace\@xspace@hook}% |
| 111 |
}% |
| 112 |
}% |
| 113 |
} |
| 114 |
\def\@xspace@check@token #1{% |
| 115 |
\ifx\@xspace@q@nil#1% |
| 116 |
\expandafter\@xspace@break@loop |
| 117 |
\fi |
| 118 |
\expandafter\ifx\csname @let@token\endcsname#1% |
| 119 |
\let\@xspace@maybespace\relax |
| 120 |
\expandafter\@xspace@break@loop |
| 121 |
\fi |
| 122 |
\@xspace@check@token |
| 123 |
} |
| 124 |
\def\@xspace@lettoken@if@letter@TF{% |
| 125 |
\ifcat\noexpand\@let@token @% letter |
| 126 |
\expandafter\@firstoftwo |
| 127 |
\else |
| 128 |
\expandafter\@secondoftwo |
| 129 |
\fi} |
| 130 |
\def\@xspace@lettoken@if@expandable@TF{% |
| 131 |
\expandafter\ifx\noexpand\@let@token\@let@token% |
| 132 |
\expandafter\@secondoftwo |
| 133 |
\else |
| 134 |
\expandafter\@firstoftwo |
| 135 |
\fi |
| 136 |
} |
| 137 |
\def\@xspace@token@if@equal@NNT#1#2{% |
| 138 |
\ifx#1#2% |
| 139 |
\expandafter\@firstofone |
| 140 |
\else |
| 141 |
\expandafter\@gobble |
| 142 |
\fi} |
| 143 |
\def\@xspace@q@nil{\@xspace@q@nil} |
| 144 |
\def\@xspace@if@q@nil@NF#1{% |
| 145 |
\ifx\@xspace@q@nil#1% |
| 146 |
\expandafter\@gobble |
| 147 |
\else |
| 148 |
\expandafter\@firstofone |
| 149 |
\fi} |
| 150 |
\endinput |
| 151 |
%% |
| 152 |
%% End of file `xspace.sty'. |