Pārlūkot izejas kodu

MRTif performance tweaks and fixing some N-type bugs

master
Jonathan Spratte 1 gadu atpakaļ
vecāks
revīzija
8e52b80e07
2 mainītis faili ar 31 papildinājumiem un 33 dzēšanām
  1. Binārs
      Doc/doc_MRTbundle.pdf
  2. 31
    33
      MRTif/MRTif.sty

Binārs
Doc/doc_MRTbundle.pdf Parādīt failu


+ 31
- 33
MRTif/MRTif.sty Parādīt failu

@@ -1,5 +1,5 @@
1
-\newcommand*\MRTif@version{0.0.6}
2
-\newcommand*\MRTif@date{2019-01-30}
1
+\newcommand*\MRTif@version{0.0.7}
2
+\newcommand*\MRTif@date{2019-02-02}
3 3
 
4 4
 \NeedsTeXFormat{LaTeX2e}
5 5
 
@@ -25,6 +25,11 @@
25 25
 \long\def\MRTif@fifiBAb#1\fi\fi#2#3{\fi\fi#3}
26 26
 \long\def\MRTif@fifiBBa\fi\fi#1#2{\fi\fi#1}
27 27
 \long\def\MRTif@fifiBBb\fi\fi#1#2{\fi\fi#2}
28
+\long\def\MRTif@fiBTa\fi#1#2#3{\fi#1}
29
+\long\def\MRTif@fiBTb\fi#1#2#3{\fi#2}
30
+\long\def\MRTif@fiBTc\fi#1#2#3{\fi#3}
31
+\long\def\MRTif@fiBg\fi#1#2{\fi}
32
+\long\def\MRTif@fiBTg\fi#1#2#3{\fi}
28 33
 % <<<
29 34
 
30 35
 \def\endMRTif@argument{\MRTif@IfYouSeeThisContactTheMaintainer}
@@ -148,38 +153,35 @@
148 153
 \MRTutil@def[\long]\MRTifEmptyTF#1% >>>
149 154
   {%
150 155
     \if\relax\detokenize{#1}\relax
151
-      \MRTif@fiAa
152
-    \else
153
-      \MRTif@fiBb
156
+      \MRTif@fiBTb
154 157
     \fi
158
+    \@secondoftwo
155 159
   }% <<<
156 160
 \MRTutil@def[\long]\MRTifEmptyT#1% >>>
157 161
   {%
158 162
     \if\relax\detokenize{#1}\relax
159
-      \MRTif@fiAy
160
-    \else
161
-      \MRTif@fiBn
163
+      \MRTif@fiBb
162 164
     \fi
165
+    \@gobble
163 166
   }% <<<
164 167
 \MRTutil@def[\long]\MRTifEmptyF#1% >>>
165 168
   {%
166 169
     \if\relax\detokenize{#1}\relax
167
-      \MRTif@fiAn
168
-    \else
169
-      \MRTif@fiBy
170
+      \MRTif@fiBg
170 171
     \fi
172
+    \@firstofone
171 173
   }% <<<
172
-\MRTutil@def\MRTifEmptyNTF% >>>
174
+\MRTutil@def[\long]\MRTifEmptyNTF#1% >>>
173 175
   {%
174
-    \expandafter\MRTifEmptyTF\expandafter
176
+    \expandafter\MRTifEmptyTF\expandafter{#1}%
175 177
   }% <<<
176
-\MRTutil@def\MRTifEmptyNT% >>>
178
+\MRTutil@def[\long]\MRTifEmptyNT#1% >>>
177 179
   {%
178
-    \expandafter\MRTifEmptyT\expandafter
180
+    \expandafter\MRTifEmptyT\expandafter{#1}%
179 181
   }% <<<
180
-\MRTutil@def\MRTifEmptyNF% >>>
182
+\MRTutil@def[\long]\MRTifEmptyNF#1% >>>
181 183
   {%
182
-    \expandafter\MRTifEmptyF\expandafter
184
+    \expandafter\MRTifEmptyF\expandafter{#1}%
183 185
   }% <<<
184 186
 \MRTif@groupify@TF{Empty}
185 187
 \MRTif@create@TandF@N@TandF{EmptyG}
@@ -195,7 +197,7 @@
195 197
   }% <<<
196 198
 \long\def\MRTifGroup@b#1#2#3\MRTifGroup@endargument% >>>
197 199
   {%
198
-    \MRTifEmptyTF{#3}{\@firstoftwo}{\@secondoftwo}%
200
+    \MRTifEmptyTF{#3}%
199 201
   }% <<<
200 202
 \long\def\MRTifGroup@c#1\MRTifGroup@endargument% >>>
201 203
   {%
@@ -206,7 +208,7 @@
206 208
 % MRTifGroupNoSpaces >>>
207 209
 \MRTutil@def[\long]\MRTifGroupNoSpacesTF#1% >>>
208 210
   {%
209
-    \expandafter\MRTifStringsMatchTF\expandafter
211
+    \MRTifStringsMatchXXTF
210 212
       {\MRTifGroupNoSpaces@a#1\end@MRTifGroupNoSpaces@a}{#1}
211 213
       {\@secondoftwo}
212 214
       {\@firstoftwo}
@@ -236,10 +238,9 @@
236 238
 \MRTutil@def[\long]\MRTifStringsMatchXXTF#1#2% >>>
237 239
   {%
238 240
     \ifnum\pdf@strcmp{#1}{#2}=0
239
-      \MRTif@fiAa
240
-    \else
241
-      \MRTif@fiBb
241
+      \MRTif@fiBTb
242 242
     \fi
243
+    \@secondoftwo
243 244
   }% <<<
244 245
 \MRTutil@def[\long]\MRTifStringsMatchXXGTF#1#2% >>>
245 246
   {%
@@ -303,10 +304,9 @@
303 304
 \MRTutil@def[\long]\MRTifNumTokenTF#1#2% >>>
304 305
   {%
305 306
     \ifnum\MRTtllength{#2}=#1\relax
306
-      \MRTif@fiAa
307
-    \else
308
-      \MRTif@fiBb
307
+      \MRTif@fiBTb
309 308
     \fi
309
+    \@secondoftwo
310 310
   }% <<<
311 311
 \MRTutil@def[\long]\MRTifNumTokenGTF#1#2% >>>
312 312
   {%
@@ -366,10 +366,9 @@
366 366
     \MRTutil@def[\long]\MRTifLetter@core##1%
367 367
       {%
368 368
         \ifcat\noexpand##1z%
369
-          \MRTif@fiAa
370
-        \else
371
-          \MRTif@fiBb
369
+          \MRTif@fiBTb
372 370
         \fi
371
+        \@secondoftwo
373 372
       }%
374 373
   }
375 374
 \MRTif@zz
@@ -405,10 +404,9 @@
405 404
         \MRTifOneTokenTF{#2}
406 405
           {%
407 406
             \ifx#1#2%
408
-              \MRTif@fiAa
409
-            \else
410
-              \MRTif@fiBb
407
+              \MRTif@fiBTb
411 408
             \fi
409
+            \@secondoftwo
412 410
           }
413 411
           {\@secondoftwo}%
414 412
       }
@@ -638,9 +636,9 @@
638 636
   {%
639 637
     \the\numexpr0\MRTtllength@inner#1\endMRTif@argument
640 638
   }% <<<
641
-\MRTutil@def\MRTtllengthN% >>>
639
+\MRTutil@def[\long]\MRTtllengthN#1% >>>
642 640
   {%
643
-    \expandafter\MRTtllength\expandafter%
641
+    \expandafter\MRTtllength\expandafter{#1}%
644 642
   }% <<<
645 643
 % <<<
646 644
 

Notiek ielāde…
Atcelt
Saglabāt