| 1 |
%% |
| 2 |
%% This is file `mleftright.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% mleftright.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Project: mleftright |
| 12 |
%% Version: 2019/12/03 v1.2 |
| 13 |
%% |
| 14 |
%% Copyright (C) |
| 15 |
%% 2010 Heiko Oberdiek |
| 16 |
%% 2016-2019 Oberdiek Package Support Group |
| 17 |
%% |
| 18 |
%% This work may be distributed and/or modified under the |
| 19 |
%% conditions of the LaTeX Project Public License, either |
| 20 |
%% version 1.3c of this license or (at your option) any later |
| 21 |
%% version. This version of this license is in |
| 22 |
%% https://www.latex-project.org/lppl/lppl-1-3c.txt |
| 23 |
%% and the latest version of this license is in |
| 24 |
%% https://www.latex-project.org/lppl.txt |
| 25 |
%% and version 1.3 or later is part of all distributions of |
| 26 |
%% LaTeX version 2005/12/01 or later. |
| 27 |
%% |
| 28 |
%% This work has the LPPL maintenance status "maintained". |
| 29 |
%% |
| 30 |
%% The Current Maintainers of this work are |
| 31 |
%% Heiko Oberdiek and the Oberdiek Package Support Group |
| 32 |
%% https://github.com/ho-tex/mleftright/issues |
| 33 |
%% |
| 34 |
%% |
| 35 |
%% The Base Interpreter refers to any `TeX-Format', |
| 36 |
%% because some files are installed in TDS:tex/generic//. |
| 37 |
%% |
| 38 |
%% This work consists of the main source file mleftright.dtx |
| 39 |
%% and the derived files |
| 40 |
%% mleftright.sty, mleftright.pdf, mleftright.ins, mleftright.drv, |
| 41 |
%% mleftright-test1.tex. |
| 42 |
%% |
| 43 |
\begingroup\catcode61\catcode48\catcode32=10\relax% |
| 44 |
\catcode13=5 % ^^M |
| 45 |
\endlinechar=13 % |
| 46 |
\catcode35=6 % # |
| 47 |
\catcode39=12 % ' |
| 48 |
\catcode44=12 % , |
| 49 |
\catcode45=12 % - |
| 50 |
\catcode46=12 % . |
| 51 |
\catcode58=12 % : |
| 52 |
\catcode64=11 % @ |
| 53 |
\catcode123=1 % { |
| 54 |
\catcode125=2 % } |
| 55 |
\expandafter\let\expandafter\x\csname [email protected]\endcsname |
| 56 |
\ifx\x\relax % plain-TeX, first loading |
| 57 |
\else |
| 58 |
\def\empty{}% |
| 59 |
\ifx\x\empty % LaTeX, first loading, |
| 60 |
% variable is initialized, but \ProvidesPackage not yet seen |
| 61 |
\else |
| 62 |
\expandafter\ifx\csname PackageInfo\endcsname\relax |
| 63 |
\def\x#1#2{% |
| 64 |
\immediate\write-1{Package #1 Info: #2.}% |
| 65 |
}% |
| 66 |
\else |
| 67 |
\def\x#1#2{\PackageInfo{#1}{#2, stopped}}% |
| 68 |
\fi |
| 69 |
\x{mleftright}{The package is already loaded}% |
| 70 |
\aftergroup\endinput |
| 71 |
\fi |
| 72 |
\fi |
| 73 |
\endgroup% |
| 74 |
\begingroup\catcode61\catcode48\catcode32=10\relax% |
| 75 |
\catcode13=5 % ^^M |
| 76 |
\endlinechar=13 % |
| 77 |
\catcode35=6 % # |
| 78 |
\catcode39=12 % ' |
| 79 |
\catcode40=12 % ( |
| 80 |
\catcode41=12 % ) |
| 81 |
\catcode44=12 % , |
| 82 |
\catcode45=12 % - |
| 83 |
\catcode46=12 % . |
| 84 |
\catcode47=12 % / |
| 85 |
\catcode58=12 % : |
| 86 |
\catcode64=11 % @ |
| 87 |
\catcode91=12 % [ |
| 88 |
\catcode93=12 % ] |
| 89 |
\catcode123=1 % { |
| 90 |
\catcode125=2 % } |
| 91 |
\expandafter\ifx\csname ProvidesPackage\endcsname\relax |
| 92 |
\def\x#1#2#3[#4]{\endgroup |
| 93 |
\immediate\write-1{Package: #3 #4}% |
| 94 |
\xdef#1{#4}% |
| 95 |
}% |
| 96 |
\else |
| 97 |
\def\x#1#2[#3]{\endgroup |
| 98 |
#2[{#3}]% |
| 99 |
\ifx#1\@undefined |
| 100 |
\xdef#1{#3}% |
| 101 |
\fi |
| 102 |
\ifx#1\relax |
| 103 |
\xdef#1{#3}% |
| 104 |
\fi |
| 105 |
}% |
| 106 |
\fi |
| 107 |
\expandafter\x\csname [email protected]\endcsname |
| 108 |
\ProvidesPackage{mleftright}% |
| 109 |
[2019/12/03 v1.2 Math left/right delim. as open/close (HO)]% |
| 110 |
\begingroup\catcode61\catcode48\catcode32=10\relax% |
| 111 |
\catcode13=5 % ^^M |
| 112 |
\endlinechar=13 % |
| 113 |
\catcode123=1 % { |
| 114 |
\catcode125=2 % } |
| 115 |
\catcode64=11 % @ |
| 116 |
\def\x{\endgroup |
| 117 |
\expandafter\edef\csname mleftright@AtEnd\endcsname{% |
| 118 |
\endlinechar=\the\endlinechar\relax |
| 119 |
\catcode13=\the\catcode13\relax |
| 120 |
\catcode32=\the\catcode32\relax |
| 121 |
\catcode35=\the\catcode35\relax |
| 122 |
\catcode61=\the\catcode61\relax |
| 123 |
\catcode64=\the\catcode64\relax |
| 124 |
\catcode123=\the\catcode123\relax |
| 125 |
\catcode125=\the\catcode125\relax |
| 126 |
}% |
| 127 |
}% |
| 128 |
\x\catcode61\catcode48\catcode32=10\relax% |
| 129 |
\catcode13=5 % ^^M |
| 130 |
\endlinechar=13 % |
| 131 |
\catcode35=6 % # |
| 132 |
\catcode64=11 % @ |
| 133 |
\catcode123=1 % { |
| 134 |
\catcode125=2 % } |
| 135 |
\def\TMP@EnsureCode#1#2{% |
| 136 |
\edef\mleftright@AtEnd{% |
| 137 |
\mleftright@AtEnd |
| 138 |
\catcode#1=\the\catcode#1\relax |
| 139 |
}% |
| 140 |
\catcode#1=#2\relax |
| 141 |
} |
| 142 |
\TMP@EnsureCode{38}{4}% & |
| 143 |
\TMP@EnsureCode{39}{12}% ' |
| 144 |
\TMP@EnsureCode{40}{12}% ( |
| 145 |
\TMP@EnsureCode{41}{12}% ) |
| 146 |
\TMP@EnsureCode{42}{12}% * |
| 147 |
\TMP@EnsureCode{43}{12}% + |
| 148 |
\TMP@EnsureCode{44}{12}% , |
| 149 |
\TMP@EnsureCode{45}{12}% - |
| 150 |
\TMP@EnsureCode{46}{12}% . |
| 151 |
\TMP@EnsureCode{47}{12}% / |
| 152 |
\TMP@EnsureCode{60}{12}% < |
| 153 |
\TMP@EnsureCode{91}{12}% [ |
| 154 |
\TMP@EnsureCode{93}{12}% ] |
| 155 |
\edef\mleftright@AtEnd{% |
| 156 |
\mleftright@AtEnd |
| 157 |
\escapechar\the\escapechar\relax |
| 158 |
\noexpand\endinput |
| 159 |
} |
| 160 |
\escapechar=92 % |
| 161 |
\begingroup\expandafter\expandafter\expandafter\endgroup |
| 162 |
\expandafter\ifx\csname RequirePackage\endcsname\relax |
| 163 |
\input infwarerr.sty\relax |
| 164 |
\input ltxcmds.sty\relax |
| 165 |
\else |
| 166 |
\RequirePackage{infwarerr}[2010/04/08]% |
| 167 |
\RequirePackage{ltxcmds}[2010/04/26]% |
| 168 |
\fi |
| 169 |
\let\mleftright@OrgLeft\left |
| 170 |
\let\mleftright@OrgRight\right |
| 171 |
\ltx@IfUndefined{protected}{% |
| 172 |
\ltx@IfUndefined{DeclareRobustCommand}{% |
| 173 |
\def\mleftright@Def{\def}% |
| 174 |
}{% |
| 175 |
\def\mleftright@Def{\DeclareRobustCommand*}% |
| 176 |
}% |
| 177 |
}{% |
| 178 |
\def\mleftright@Def{\protected\def}% |
| 179 |
} |
| 180 |
\edef\mleftright@Def#1{% |
| 181 |
\noexpand\ltx@IfUndefined{% |
| 182 |
\noexpand\expandafter\noexpand\ltx@gobble\noexpand\string#1% |
| 183 |
}{% |
| 184 |
\expandafter\noexpand\mleftright@Def#1% |
| 185 |
}{% |
| 186 |
\noexpand\@PackageError{mleftright}{% |
| 187 |
Command \noexpand\string#1 already defined% |
| 188 |
}\noexpand\@ehd |
| 189 |
\noexpand\ltx@gobble |
| 190 |
}% |
| 191 |
} |
| 192 |
\ltx@IfUndefined{currentgrouplevel}{% |
| 193 |
\catcode38=14 % & = comment |
| 194 |
}{% |
| 195 |
\catcode38=9 % & = ignore |
| 196 |
} |
| 197 |
& \def\mleftright@GroupLevel{-1}% |
| 198 |
& \def\mleftright@WrongGroup#1(#2){% |
| 199 |
& \ifnum\mleftright@GroupLevel<\ltx@zero |
| 200 |
& \@PackageError{mleftright}{% |
| 201 |
& Missing previous \string\mleft |
| 202 |
& }\@ehc |
| 203 |
& \else |
| 204 |
& \@PackageError{mleftright}{% |
| 205 |
& Unexpected group status for \string\mright% |
| 206 |
& \ifnum\mleftright@GroupLevel=#1 % |
| 207 |
& \else |
| 208 |
& .\MessageBreak |
| 209 |
& Group level is #1, % |
| 210 |
& expected is \mleftright@GroupLevel |
| 211 |
& \fi |
| 212 |
& \ifnum16=#2 % |
| 213 |
& \else |
| 214 |
& .\MessageBreak |
| 215 |
& Group type is #2 (% |
| 216 |
& \ifcase#2 % |
| 217 |
& bottom level% |
| 218 |
& \expandafter\expandafter\expandafter\ltx@gobblefour |
| 219 |
& \expandafter\ltx@gobbletwo |
| 220 |
& \or simple% |
| 221 |
& \or hbox% |
| 222 |
& \or adjusted hbox% |
| 223 |
& \or vbox% |
| 224 |
& \or vtop% |
| 225 |
& \or align% |
| 226 |
& \or no align% |
| 227 |
& \or output% |
| 228 |
& \or math% |
| 229 |
& \or disc% |
| 230 |
& \or insert% |
| 231 |
& \or vcenter% |
| 232 |
& \or math choice% |
| 233 |
& \or semi simple% |
| 234 |
& \or math shift% |
| 235 |
& \or math left% |
| 236 |
& \else |
| 237 |
& unknown% |
| 238 |
& \fi |
| 239 |
& \space group),\MessageBreak |
| 240 |
& expected is 16 (math left group)% |
| 241 |
& \fi |
| 242 |
& }\@ehd |
| 243 |
& \fi |
| 244 |
& }% |
| 245 |
\mleftright@Def\mleft{% |
| 246 |
\mathopen{}\mathclose\bgroup |
| 247 |
& \edef\mleftright@GroupLevel{\the\numexpr\the\currentgrouplevel+1}% |
| 248 |
\mleftright@OrgLeft |
| 249 |
} |
| 250 |
\mleftright@Def\mright{% |
| 251 |
& \ifnum\mleftright@GroupLevel=\currentgrouplevel |
| 252 |
& \ifnum16=\currentgrouptype |
| 253 |
\aftergroup\egroup |
| 254 |
& \else |
| 255 |
& \expandafter\mleftright@WrongGroup |
| 256 |
& \the\expandafter\currentgrouplevel |
| 257 |
& \expandafter(\the\currentgrouptype)% |
| 258 |
& \fi |
| 259 |
& \else |
| 260 |
& \expandafter\mleftright@WrongGroup |
| 261 |
& \the\expandafter\currentgrouplevel |
| 262 |
& \expandafter(\the\currentgrouptype)% |
| 263 |
& \fi |
| 264 |
\mleftright@OrgRight |
| 265 |
} |
| 266 |
\mleftright@Def\mleftright{% |
| 267 |
\let\left\mleft |
| 268 |
\let\right\mright |
| 269 |
} |
| 270 |
\mleftright@Def\mleftrightrestore{% |
| 271 |
\ifx\left\mleft |
| 272 |
\let\left\mleftright@OrgLeft |
| 273 |
\fi |
| 274 |
\ifx\right\mright |
| 275 |
\let\right\mleftright@OrgRight |
| 276 |
\fi |
| 277 |
} |
| 278 |
\mleftright@AtEnd% |
| 279 |
%% \section{Installation} |
| 280 |
\endinput |
| 281 |
%% |
| 282 |
%% End of file `mleftright.sty'. |