summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/yagusylo/yagusylo.sty
blob: bcef7dad2591d858ef1078ba2d55cfe91055a603 (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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
%%
%% This is file `yagusylo.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% yagusylo.dtx  (with options: `package,en')
%% This is a generated file.
%% 
%% Copyright (C) 2009 Y. Henel alias le TeXnicien de surface
%% <le.texnicien.de.surface@wanadoo.fr>
%% 
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.2 of this license
%% or (at your option) any later version.  The latest version of this
%% license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.2 or later is part of all distributions of LaTeX version
%% 1999/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\def\fileversion{v1.2}
\def\filedate{2009/02/26}
\def\docdate{2009/02/26}
\def\fileinfo{Yet Another Grand Unified Symbols Loader
              par Le TeXnicien de surface}
\ProvidesPackage{yagusylo}
   [\filedate\space\fileversion\space\fileinfo]
\RequirePackage{xifthen}
\RequirePackage{suffix}
\RequirePackage{xargs}
\newcommand*{\Y@GINFO}[2][]{}
\newcommand*{\Y@GWARNING}[3]{}
\define@choicekey*+[Y@G]{yagusylo.sty}{symfam}[\Y@G@SymFamChoice\nr]%
 {marvosym,fourier,wasysym,bbding,dingbat,ark,ifsym,ifsymgeo,%
  ifsymgeonarrow,ifsymgeowide,ifsymclock,ifsymweather,pifont}%
 [pifont]%
 {\Y@GINFO{You choose \Y@G@SymFamChoice}}%
 {\PackageError{yagusylo}%
   {The symbols family ``\Y@G@SymFamChoice'' is not yet known.}
   {I don't know the family you required.\MessageBreak
    If it's not a typo you may consider to contact me
    (TdS)\MessageBreak to obtain support for it.}}
\define@boolkey[Y@G]{yagusylo.sty}[Y@G@]{color}[false]{}
\define@boolkey[Y@G]{yagusylo.sty}[Y@G@]{configfile}[false]{}
\define@choicekey*+[Y@G]{yagusylo.sty}{info}[\Y@G@Info\nr]%
  {mute,normal,verbose}[normal]{}{}
\define@choicekey*+[Y@G]{yagusylo.sty}{onerror}[\Y@G@OnError\nr]%
  {nice,tough}[tough]{}{}
\define@key[Y@G]{yagusylo.sty}{XcolorOptions}[!Y@G!]%
  {\def\Y@GXcolorOptions{#1}}
\ExecuteOptionsX[Y@G]{symfam,color,XcolorOptions,info,onerror,configfile}
\ProcessOptionsX[Y@G]\relax
\let\nr\relax
\ifY@G@color
\ifthenelse{\equal{\Y@GXcolorOptions}{!Y@G!}}
  {\RequirePackage{xcolor}}
  {\RequirePackage[\Y@GXcolorOptions]{xcolor}
    \PackageInfo{yagusylo}{Package xcolor loaded with options:
      \Y@GXcolorOptions}}
\define@key[Y@G]{yagusylo.sty}{symcolor}[red]{\def\Y@GSymColor{#1}}
\setkeys[Y@G]{yagusylo.sty}{symcolor}
\newcommand\Y@G@Couleur[1]{\color{#1}}
\else
\define@key[Y@G]{yagusylo.sty}{symcolor}[]{}
\newcommand\Y@G@Couleur[1]{\relax}
\def\Y@GSymColor{\relax}
\fi
\disable@keys[Y@G]{yagusylo.sty}{color,onerror,info}
\newcommand\setyagusylokeys[1]{%
  \ifthenelse{\equal{#1}{*}}%
  {\setkeys[Y@G]{yagusylo.sty}{%
      symfam,symcolor,%
      leadtype,symplace,sympos,boxwidth,before,after,%
      head,tail}}%
  {\setkeys[Y@G]{yagusylo.sty}{#1}}}
\AtEndOfPackage{%
\PackageInfo{yagusylo}{^^J%
============================================================^^J%
^^J%
****************** YAGUSYLO GLOBAL SETUPS ******************^^J%
^^J%
===================== GENERAL OPTIONS ======================^^J%
^^J%
option ``info'' ......... is ``\Y@G@Info''^^J%
option ``onerror'' ...... is ``\Y@G@OnError''^^J%
option ``color'' ........ is \ifY@G@color``true''\else``false''\fi^^J%
option ``configfile'' ... is \ifY@G@configfile``true''\else``false''\fi^^J%
^^J%
-------------------- CHANGEABLE OPTIONS --------------------^^J%
^^J%
\ifY@G@color
option ``symcolor'' ....... is ``\Y@GSymColor''^^J\fi
option ``symfam'' ......... is ``\Y@G@SymFamChoice''^^J%
option ``leadtype'' ....... is ``\Y@Gyagfillleadtype''^^J%
option ``symplace'' ....... is ``\Y@Gyagfillsymplace''^^J%
option ``sympos'' ......... is ``\Y@Gyagfillsympos''^^J%
option ``boxwidth'' ....... is ``\Y@Gyagfillboxwidth''^^J%
option ``before'' ......... is ``\Y@Gyagfillbefore''^^J%
option ``after'' .......... is ``\Y@Gyagfillafter''^^J%
option ``head'' ........... is ``\the\Y@Glinehead''^^J%
option ``tail'' ........... is ``\the\Y@Glinetail''^^J%
::::::::::::::::: OPTIONS FOR YAGENUMERATE :::::::::::::::::^^J%
option ``firstitemnum'' ... is ``\number\Y@GEnumFirstItemNum''^^J%
option ``enumlength'' ..... is ``\number\Y@GEnumLength''^^J%
\ifY@G@color
option ``symcolor'' ....... is ``\Y@GEnumSymColor''^^J\fi
option ``symfam'' ......... is ``\Y@G@EnumSymFamChoice''^^J%
------------------------------------------------------------^^J%
^^J%
The known patterns for environment ``yagenumerate'' are:^^J%
``piwcr'' (default), ``piwcs'', ``pibcr'', and ``pibcs''.^^J%
^^J%
============================================================%
\@gobbletwo}%
\ifthenelse{\equal{\Y@G@Info}{verbose}}
  {\renewcommand*{\Y@GINFO}[2][0]{\PackageInfo{yagusylo}{#2}}}{}%
\ifthenelse{\equal{\Y@G@Info}{normal}}
  {\renewcommand*{\Y@GINFO}[2][0]{%
      \ifthenelse{#1>0}{\PackageInfo{yagusylo}{#2}}}{}}{}%
  \ifthenelse{\equal{\Y@G@OnError}{tough}}
  {\renewcommand*{\Y@GWARNING}[3]{\PackageError{yagusylo}{#1}{#3}}}{}
  \ifthenelse{\equal{\Y@G@OnError}{normal}}
  {\renewcommand*{\Y@GWARNING}[3]{\PackageError{yagusylo}{#1}{#3}}}{}
  \ifthenelse{\equal{\Y@G@OnError}{nice}}
  {\renewcommand*{\Y@GWARNING}[3]{\PackageWarning{yagusylo}{#1#2}}}{}}
\newcommand\Y@G@U@FamilyDef[1]{\fontencoding{U}\fontfamily{#1}}
\newcommand\Y@Gif[3]{%
  \ifthenelse{\equal{#1}{#2}}{\Y@G@U@FamilyDef{#3}}{}}
\newcommand\Y@GifE[4]{%
  \ifthenelse{\equal{#1}{#2}}{\Y@G@U@FamilyDef{#3}#4}{}}
\newcommand\Y@Gyagding[3]{{%
    \Y@G@GetSymb{#1}\selectfont\Y@G@Couleur{#3}\char#2}}
\newcommandx\yagding[3][1=\Y@G@SymFamChoice,3=\Y@GSymColor]{{%
    \Y@G@GetSymb{#1}\selectfont\Y@G@Couleur{#3}\char#2}}
\newcommand\Y@G@GetSymb[1]{%
  \Y@GifE{#1}{marvosym}{mvs}{\fontseries{m}\fontshape{n}}%
  \Y@Gif{#1}{fourier}{futs}%
  \Y@Gif{#1}{wasysym}{wasy}%
  \Y@Gif{#1}{bbding}{ding}%
  \Y@Gif{#1}{dingbat}{dingbat}%
  \Y@Gif{#1}{ark}{ark}%
  \Y@Gif{#1}{ifsym}{ifsym}%
  \Y@Gif{#1}{ifsymgeo}{ifgeo}%
  \Y@GifE{#1}{ifsymgeonarrow}{ifgeo}{\fontshape{na}}%
  \Y@GifE{#1}{ifsymgeowide}{ifgeo}{\fontshape{w}}%
  \Y@Gif{#1}{ifsymclock}{ifclk}%
  \Y@Gif{#1}{ifsymweather}{ifwea}%
  \Y@Gif{#1}{pifont}{pzd}}
\newcommandx\defdingname[5][1=*,2=local,5=\Y@GSymColor]{%
  \Y@GINFO{You define ``#4'' with symbols family ``#1'' and color
    ``#5''}%
  \ifthenelse{\equal{#1}{*}}
  {\ifthenelse{\equal{#2}{local}}
    {\ifthenelse{\equal{#5}{*}}
      {\expandafter\edef\csname Y@G@@ #4\endcsname
        {\yagding[\Y@G@SymFamChoice]{#3}[\noexpand\Y@GSymColor]}}
      {\expandafter\edef\csname Y@G@@ #4\endcsname
        {\yagding[\Y@G@SymFamChoice]{#3}[#5]}}}%
    {\ifthenelse{\equal{#2}{global}}
      {\ifthenelse{\equal{#5}{*}}
        {\expandafter\xdef\csname Y@G@@ #4\endcsname
          {\yagding[\Y@G@SymFamChoice]{#3}[\noexpand\Y@GSymColor]}}
        {\expandafter\xdef\csname Y@G@@ #4\endcsname
          {\yagding[\Y@G@SymFamChoice]{#3}[#5]}}}%
      {\Y@GWARNING{Value #2 not recognised} {.\MessageBreak The possible
          values are ``local'' (default) and ``global''.\MessageBreak I
          will assume you wanted ``local''} {The possible values are
          ``local'' (default) and ``global''}}}}%
  {\ifthenelse{\equal{#2}{local}}
    {\ifthenelse{\equal{#5}{*}}
      {\expandafter\edef\csname Y@G@@ #4\endcsname
        {\yagding[#1]{#3}[\noexpand\Y@GSymColor]}}
      {\expandafter\edef\csname Y@G@@ #4\endcsname
        {\yagding[#1]{#3}[#5]}}}%
    {\ifthenelse{\equal{#2}{global}}
      {\ifthenelse{\equal{#5}{*}}
        {\expandafter\xdef\csname Y@G@@ #4\endcsname
          {\yagding[#1]{#3}[\noexpand\Y@GSymColor]}}
        {\expandafter\xdef\csname Y@G@@ #4\endcsname
          {\yagding[#1]{#3}[#5]}}}%
      {\Y@GWARNING{Value #2 not recognised} {.\MessageBreak The possible
          values are ``local'' (default) and ``global''.\MessageBreak I
          will assume you wanted ``local''} {The possible values are
          ``local'' (default) and ``global''}}}}}
\WithSuffix\newcommandx\yagding+[6][1=U,6=\Y@GSymColor]{{%
    \fontencoding{#1}\fontfamily{#2}%
    \ifthenelse{\equal{#3}{*}}{}{\fontseries{#3}}%
    \ifthenelse{\equal{#4}{*}}{}{\fontshape{#4}}%
    \selectfont\Y@G@Couleur{#6}\char#5}}
\WithSuffix\newcommand\yagding*[1]{%
  \ifthenelse{\isnamedefined{Y@G@@ #1}}
  {\csname Y@G@@ #1\endcsname}
  {[\string? #1 \string?]%
    \Y@GWARNING{The name #1 is not defined}
    {.\MessageBreak
      Or you forgot to define it\MessageBreak
      or you defined it inside an alien group.\MessageBreak
      In any case you used it}{}}}
\WithSuffix\newcommandx\defdingname+[8] [1=U,2=local,8=\Y@GSymColor]{%
  \ifthenelse{\equal{#2}{local}}%
  {\ifthenelse{\equal{#8}{*}}%
    {\expandafter\edef\csname Y@G@@ #7\endcsname
      {\yagding+[#1]{#3}{#4}{#5}{#6}[\noexpand\Y@GSymColor]}}%
    {\expandafter\edef\csname Y@G@@ #7\endcsname
      {\yagding+[#1]{#3}{#4}{#5}{#6}[#8]}}}%
  {\ifthenelse{\equal{#2}{global}}%
    {\ifthenelse{\equal{#8}{*}}%
      {\expandafter\xdef\csname Y@G@@ #7\endcsname
        {\yagding+[#1]{#3}{#4}{#5}{#6}[\noexpand\Y@GSymColor]}}%
      {\expandafter\xdef\csname Y@G@@ #7\endcsname
        {\yagding+[#1]{#3}{#4}{#5}{#6}[#8]}}}%
    {\Y@GWARNING{Value #2 not recognised} {.\MessageBreak The possible
        values are ``local'' (default) and ``global''.\MessageBreak I
        will assume you wanted ``local''} {The possible values are
        ``local'' (default) and ``global''}}}}
\newcommand{\Y@Gfill}[7]%
{{\leavevmode
  \dimendef\Y@Glongi=255\relax
  \dimendef\Y@GBoxActualWidth=254\relax
  \ifthenelse{\equal{#2}{l}}{\let\Leaders=\leaders}{}%
  \ifthenelse{\equal{#2}{x}}{\let\Leaders=\xleaders}{}%
  \ifthenelse{\equal{#2}{c}}{\let\Leaders=\cleaders}{}%
  \ifthenelse{\equal{#3}{a}}
  {\def\LaBoite{\hbox{\makebox{\hspace{#6}#1\hspace{#7}}}}}
  {%
    \settowidth{\Y@Glongi}{#1}%
    \ifdim#5>\Y@Glongi%
    \setlength{\Y@GBoxActualWidth}{#5}%
    \else
    \setlength{\Y@GBoxActualWidth}{\Y@Glongi}%
    \Y@GINFO{The choosen value for ``boxwidth'' is too short,\MessageBreak
      I will use the natural width of the symbol: \the\Y@GBoxActualWidth}\fi
    \ifthenelse{\equal{#3}{n}}
    {\ifthenelse{\(#4<0\)\or\(#4>1000\)}
      {\Y@GWARNING{I don't understand what you want}
        {.\MessageBreak I assume the default}
        {You should read the documentation [[SECyagfillboxwidth]].}%
        \def\LaBoite{\hbox{\makebox[\Y@GBoxActualWidth][c]{#1}}}}%
      {\setlength{\Y@Glongi}{\Y@GBoxActualWidth-\Y@Glongi}%
        \setlength{\Y@Glongi}{\Y@Glongi/1000*#4}%
        \def\LaBoite{\hbox{\makebox%
            [\Y@GBoxActualWidth][l]{\hspace*{\Y@Glongi}#1\hfill}}}}}%
    {\def\LaBoite{\hbox{\makebox[\Y@GBoxActualWidth][#3]{#1}}}}}%
  \Leaders\LaBoite\hfill\kern\z@}}
\define@choicekey*+[Y@G]{yagusylo.sty}{leadtype}[\Y@Gyagfillleadtype\nr]%
 {l,c,x}[l]%
 {\Y@GINFO{Key ``leadtype'' is ``\Y@Gyagfillleadtype''}}%
 {\PackageError{yagusylo}%
   {Possible choices for key ``leadtype'': l (default), c or x}
   {I don't know the type you required.\MessageBreak
    Read the doc, please}}
\define@choicekey*+[Y@G]{yagusylo.sty}{symplace}[\Y@Gyagfillsymplace\nr]%
 {c,r,l,a,n}[c]%
 {\Y@GINFO{Key ``symplace'' is ``\Y@Gyagfillsymplace''}}%
 {\PackageError{yagusylo}%
   {Possible choices for key ``symplace'': c (default), l, r, a or n}
   {I don't know the place you required.\MessageBreak
    Read the doc, please}}
\define@key[Y@G]{yagusylo.sty}{sympos}[0]{%
  \ifthenelse{\(#1<0\)\or\(#1>1000\)}
  {\PackageError{yagusylo}
    {Your choice ``#1'' for key ``sympos'' is out of bound}
    {You should chose a interger between 0 and 1000.\MessageBreak
      You should read the documentation}}
  {\Y@GINFO{Keys ``sympos'' is ``#1''}%
    \def\Y@Gyagfillsympos{#1}}}
\define@key[Y@G]{yagusylo.sty}{boxwidth}[0.2in]{%
  \ifthenelse{\dimtest{#1}<{0pt} \or \dimtest{#1}={0pt}}
  {\PackageError{yagusylo}
    {Your choice ``#1'' for key ``boxwidth'' is out of bound}
    {You should chose a positive length.\MessageBreak
      You should read the documentation}}
  {\Y@GINFO
    {You've asked for ``#1'' as box width.\MessageBreak
      In any case the box will be at least\MessageBreak
      as large as the symbol itself}}%
  \def\Y@Gyagfillboxwidth{#1}}
\define@key[Y@G]{yagusylo.sty}{before}[0pt]{%
  \ifthenelse{\dimtest{#1}<{0pt}}
  {\PackageError{yagusylo}
    {Your choice ``#1'' for key ``before'' is out of bound}
    {You should chose a non-negative length.\MessageBreak
      You should read the documentation}}
  {\Y@GINFO{Key ``before'' is ``#1''}}%
  \def\Y@Gyagfillbefore{#1}}
\define@key[Y@G]{yagusylo.sty}{after}[!Y@G!]{%
  \ifthenelse{\equal{#1}{!Y@G!}}%
  {\def\Y@Gyagfillafter{\Y@Gyagfillbefore}}%
  {\ifthenelse{\dimtest{#1}<{0pt}}
      {\PackageError{yagusylo}
        {Your choice ``#1'' for key ``after'' is out of bound}
        {You should chose a non-negative length.\MessageBreak
          You should read the documentation}}
      {\Y@GINFO{Key ``after'' is ``#1''}}%
      \def\Y@Gyagfillafter{#1}}}
\setkeys[Y@G]{yagusylo.sty}{leadtype,symplace,sympos,boxwidth,before,after}
\newcommand\yagfill[2][!Y@G!]{%
\begingroup
\ifthenelse{\equal{#1}{!Y@G!}}{}%
  {\setkeys[Y@G]{yagusylo.sty}{#1}}%
  \Y@Gfill{\yagding{#2}}%
  {\Y@Gyagfillleadtype}{\Y@Gyagfillsymplace}%
  {\Y@Gyagfillsympos}{\Y@Gyagfillboxwidth}%
  {\Y@Gyagfillbefore}{\Y@Gyagfillafter}%
\endgroup}
\WithSuffix\newcommand\yagfill*[2][!Y@G!]{%
\begingroup
\ifthenelse{\equal{#1}{!Y@G!}}%
  {}%
  {\setkeys[Y@G]{yagusylo.sty}{#1}}%
\Y@Gfill{\yagding*{#2}}%
        {\Y@Gyagfillleadtype}{\Y@Gyagfillsymplace}%
        {\Y@Gyagfillsympos}{\Y@Gyagfillboxwidth}%
        {\Y@Gyagfillbefore}{\Y@Gyagfillafter}%
\endgroup}
\WithSuffix\newcommand\yagfill+[2][!Y@G!]{%
\begingroup
\ifthenelse{\equal{#1}{!Y@G!}}{}%
  {\setkeys[Y@G]{yagusylo.sty}{#1}}%
\Y@Gfill{#2}%
        {\Y@Gyagfillleadtype}{\Y@Gyagfillsymplace}%
        {\Y@Gyagfillsympos}{\Y@Gyagfillboxwidth}%
        {\Y@Gyagfillbefore}{\Y@Gyagfillafter}%
\endgroup}
\newlength{\Y@Glinehead}
\newlength{\Y@Glinetail}
\define@key[Y@G]{yagusylo.sty}{head}[0.5in]{%
  \setlength{\Y@Glinehead}{#1}}
\define@key[Y@G]{yagusylo.sty}{tail}[0.5in]{%
  \setlength{\Y@Glinetail}{#1}}
\setkeys[Y@G]{yagusylo.sty}{head,tail}
\newcommandx\setyagline[2][2=!Y@G!]{%
  \ifthenelse{\equal{#2}{!Y@G!}}%
  {\setkeys[Y@G]{yagusylo.sty}{head=#1,tail=#1}}%
  {\setkeys[Y@G]{yagusylo.sty}{head=#1,tail=#2}}}
\newcommand{\yagline}[2][!Y@G!]%
{\begingroup
  \ifthenelse{\equal{#1}{!Y@G!}}{}%
  {\setkeys[Y@G]{yagusylo.sty}{#1}}%
  \par\noindent\hspace{\Y@Glinehead}%
  \Y@Gfill{\yagding[\Y@G@SymFamChoice]{#2}}%
     {\Y@Gyagfillleadtype}{\Y@Gyagfillsymplace}%
     {\Y@Gyagfillsympos}{\Y@Gyagfillboxwidth}%
     {\Y@Gyagfillbefore}{\Y@Gyagfillafter}%
  \hspace{\Y@Glinetail}\kern\z@\par
\endgroup}
\WithSuffix\newcommand\yagline*[2][!Y@G!]%
{\begingroup
  \ifthenelse{\equal{#1}{!Y@G!}}{}%
  {\setkeys[Y@G]{yagusylo.sty}{#1}}%
  \par\noindent\hspace{\Y@Glinehead}%
  \Y@Gfill{\yagding*{#2}}%
     {\Y@Gyagfillleadtype}{\Y@Gyagfillsymplace}%
     {\Y@Gyagfillsympos}{\Y@Gyagfillboxwidth}%
     {\Y@Gyagfillbefore}{\Y@Gyagfillafter}%
  \hspace{\Y@Glinetail}\kern\z@\par
\endgroup}
\WithSuffix\newcommand\yagline+[2][!Y@G!]%
{\begingroup
  \ifthenelse{\equal{#1}{!Y@G!}}{}%
  {\setkeys[Y@G]{yagusylo.sty}{#1}}%
  \par\noindent\hspace{\Y@Glinehead}%
  \Y@Gfill{#2}%
     {\Y@Gyagfillleadtype}{\Y@Gyagfillsymplace}%
     {\Y@Gyagfillsympos}{\Y@Gyagfillboxwidth}%
     {\Y@Gyagfillbefore}{\Y@Gyagfillafter}%
  \hspace{\Y@Glinetail}\kern\z@\par
\endgroup}
\newcommand{\Y@GLevelTest}[6]{%
  \ifthenelse%
  {\cnttest{\value{Y@G#1}}<{\value{Y@G#2}}}%
  {\setcounter{Y@G#3}{\value{Y@G#1}}}%
  {\setcounter{Y@G#3}{\value{Y@G#2}}%
    \ifthenelse{\cnttest{\value{Y@G#1}}={\value{Y@G#2}}}
    {\Y@GWARNING{Too deeply nested for your setup}
      {.\MessageBreak
        I keep on using the last symbol.\MessageBreak
        You could have a look at your last\MessageBreak
        ``#4''\MessageBreak First ``#5'' too many}%
      {You could have a look at your last\MessageBreak
        ``#4''\MessageBreak First ``#5'' too many.\MessageBreak
        You should read the documentation [[#6]].}}{}}}
\newcounter{Y@GItemLevel}
\newcounter{Y@GItemMark}
\newcounter{Y@GYagitemizeMaxDepth}
\newenvironmentx{yagitemize}[3][1=\Y@G@SymFamChoice,3=\Y@GSymColor]
{\stepcounter{Y@GItemLevel}%
  \ifthenelse{\equal{#2}{*}}
  {\Y@GLevelTest{ItemLevel}{YagitemizeMaxDepth}{ItemMark}
    {setyagitemize}{yagitemize}{5.1.2}%
    \edef\numero{\roman{Y@GItemMark}}%
    \begin{list}{%
        \yagding%
        [\csname Y@G@symfam@niveau\numero\endcsname]%
        {\csname Y@G@symfam@numero\numero\endcsname}%
        [\csname Y@G@symfam@couleur\numero\endcsname]}{}}
    {\begin{list}{\yagding[#1]{#2}[#3]}{}}}%
    {\end{list}\addtocounter{Y@GItemLevel}{-1}}
\newcommand{\setyagitemize}[1]{%
  \setcounter{Y@GYagitemizeMaxDepth}{0}%
  \Y@Gsetyagitemize #1.Y@G@.\@nil}
\def\Y@Gsetyagitemizeaux #1\fi{%
  \fi \Y@Gsetyagitemize #1}%
\def\Y@Gsetyagitemize #1.#2{%
  \def\Y@Gfairemotif ##1,##2,##3\@Y@Gnil{%
    \edef\Y@Gpremier{##1}\edef\Y@Gdeuxieme{##2}\edef\Y@Gtroisieme{##3}%
  }
  \ifx#2\@nil\relax
  \else
  \Y@Gfairemotif#1\@Y@Gnil
  \stepcounter{Y@GYagitemizeMaxDepth}%
  \edef\numero{\roman{Y@GYagitemizeMaxDepth}}%
  \expandafter\edef\csname Y@G@symfam@niveau\numero\endcsname{\Y@Gpremier}
  \expandafter\edef\csname Y@G@symfam@numero\numero\endcsname{\Y@Gdeuxieme}
  \expandafter\edef\csname Y@G@symfam@couleur\numero\endcsname{\Y@Gtroisieme}
  \Y@Gsetyagitemizeaux #2\fi}
\newcounter{Y@GYagitemizeStarMaxDepth}
\WithSuffix\newcommand\setyagitemize*[1]{%
  \setcounter{Y@GYagitemizeStarMaxDepth}{0}%
  \Y@Gsetyagitemizestar #1.Y@G@.\@nil}
\def\Y@Gsetyagitemizestaraux #1\fi{%
  \fi \Y@Gsetyagitemizestar #1}%
\def\Y@Gsetyagitemizestar #1.#2{%
  \ifx#2\@nil%
    \relax
  \else
    \def\motif{#1}%
    \stepcounter{Y@GYagitemizeStarMaxDepth}%
    \edef\numero{\roman{Y@GYagitemizeStarMaxDepth}}%
    \expandafter\edef%
       \csname Y@Gsymbol@listdepth\numero\endcsname{%
         \yagding*{\motif}}%
       \Y@Gsetyagitemizestaraux #2\fi}
\newcounter{Y@GItemStarLevel}
\newenvironment{yagitemize*}[1][!Y@G!]%
{\stepcounter{Y@GItemStarLevel}
  \ifthenelse{\equal{#1}{!Y@G!}}
  {\Y@GLevelTest{ItemStarLevel}{YagitemizeStarMaxDepth}{ItemMark}
    {setyagitemize*}{yagitemize*}{5.2.2}%
    \edef\Y@GActualSymbol{\csname
      Y@Gsymbol@listdepth\roman{Y@GItemMark}\endcsname}}
  {\edef\Y@GActualSymbol{\yagding*{#1}}}%
  \begin{list}{\Y@GActualSymbol}{}}
{\end{list}\addtocounter{Y@GItemStarLevel}{-1}}
\newcommand\yagnumber[3]{\protect\Y@Gyagding{#1}{\arabic{#2}}{#3}}
\newboolean{Y@GitemRedefined}
\define@choicekey*+[Y@G]{y@genum}{symfam}[\Y@G@EnumSymFamChoice\nr]%
 {marvosym,fourier,wasysym,bbding,dingbat,ark,ifsym,ifsymgeo,%
  ifsymgeonarrow,ifsymgeowide,ifsymclock,ifsymweather,pifont}%
 [pifont]%
 {\Y@GINFO{You choose \Y@G@EnumSymFamChoice}}%
 {\PackageError{yagusylo}%
   {The symbols family ``\Y@G@EnumSymFamChoice'' is not yet known.}
   {I don't know the family you required.\MessageBreak
    If it's not a typo you may consider to contact me
    (TdS)\MessageBreak to obtain support for it.}}
\define@key[Y@G]{y@genum}{symcolor}[blue]{\def\Y@GEnumSymColor{#1}}
\define@key[Y@G]{y@genum}{firstitemnum}['254]{%
  \ifthenelse{\(#1<0\)\or \(#1>255\)}
  {\PackageError{yagusylo}
    {``#1'' is out of bound or not a number}
    {``firstitemnum'' requires a natural number\MessageBreak
    between 0 and 255}}%
  {\def\Y@GEnumFirstItemNum{#1}%
    \Y@GINFO{Key ``firstitemnum'' is
      ``\number\Y@GEnumFirstItemNum''}}}
\define@key[Y@G]{y@genum}{enumlength}[10]{%
  \ifthenelse{\(#1<1\)\or \(#1>255\)}
  {\PackageError{yagusylo}
    {``#1'' is out of bound or not a number}
    {``enumlength'' requires a natural number\MessageBreak
      between 1 and 255}}%
  {\def\Y@GEnumLength{#1}%
    \Y@GINFO{Key ``enumlength'' is ``\number\Y@GEnumLength''}}}
\newcommand*\newenumpattern[2]{%
  \ifthenelse{\isnamedefined{Y@GEnumPattern@#1}}
  {\PackageError{yagusylo}{Pattern ``#1'' already defined}{%
      You should choose another name\MessageBreak
      this version does NOT provide a ``renewenumpattern'' macro}}
  {{\renewcommand*{\Y@GINFO}[1]{}
      \expandafter\gdef\csname Y@GEnumPattern@#1\endcsname{%
        \setkeys[Y@G]{y@genum}{#2}}}
    \Y@GINFO[1]{Pattern ``#1'' defined with\MessageBreak
      symfam=\Y@G@EnumSymFamChoice\MessageBreak
      symcolor=\Y@GEnumSymColor\MessageBreak
      firstitetemnum=\number\Y@GEnumFirstItemNum\MessageBreak
      enumlength=\Y@GEnumLength\MessageBreak}}}
\newenumpattern{piwcr}{symfam=pifont,firstitemnum='254,enumlength=10}
\newenumpattern{piwcs}{symfam=pifont,firstitemnum='300,enumlength=10}
\newenumpattern{pibcr}{symfam=pifont,firstitemnum='266,enumlength=10}
\newenumpattern{pibcs}{symfam=pifont,firstitemnum='312,enumlength=10}
\newcommand{\Y@GSetYagEnumerate}[1]{%
  \ifthenelse{\isnamedefined{Y@GEnumPattern@#1}}%
  {\csname Y@GEnumPattern@#1\endcsname}%
  {\Y@GWARNING{The pattern ``#1'' is not know}
    {.\MessageBreak I select ``piwcr'' instead}
    {You should read the documentation [[SECyagpattern]].}%
    \csname Y@GEnumPattern@piwcr\endcsname}}
\define@key[Y@G]{y@genum}{enumpattern}[piwcr]{%
  \edef\Y@GEnumPatternChoice{#1}%
  \Y@GSetYagEnumerate{#1}}
\setkeys[Y@G]{y@genum}{symfam,symcolor,firstitemnum,enumlength}
\newcommand\setyagenumeratekeys[1]{%
  \ifthenelse{\equal{#1}{*}}%
  {\setkeys[Y@G]{y@genum}
    {symfam,symcolor,firstitemnum,enumlength,enumpattern}}%
  {\setkeys[Y@G]{y@genum}{#1}}}
\newcounter{Y@Gmaxitem}
\newcounter{Y@Gcitem}
\newenvironment{yagenumerate}[1][!Y@G!]
{%
  \ifthenelse{\equal{#1}{!Y@G!}}
  {\setkeys[Y@G]{y@genum}{symfam,symcolor,firstitemnum,enumlength}}
  {\ifthenelse{\equal{#1}{*}}
    {\setkeys[Y@G]{y@genum}{enumpattern=\Y@GEnumPatternChoice}}
    {\setkeys[Y@G]{y@genum}{#1}}}%
  \ifnum\@enumdepth>\thr@@\@toodeep\else
  \advance\@enumdepth \@ne
  \def\STOP{\PackageError{yagusylo}
    {at least one item too many}
    {you can't use more than ``\number\Y@GEnumLength'' items}}%
  \setcounter{Y@Gmaxitem}{\Y@GEnumFirstItemNum}
  \addtocounter{Y@Gmaxitem}{\Y@GEnumLength}
  \setcounter{Y@Gcitem}{\Y@GEnumFirstItemNum}
  \ifthenelse{\boolean{Y@GitemRedefined}}{}
  {\let\Y@Golditem\item
   \def\item{\stepcounter{Y@Gcitem}
     \ifnum\theY@Gcitem>\theY@Gmaxitem\expandafter\STOP
     \else\expandafter\Y@Golditem\fi}
   \setboolean{Y@GitemRedefined}{true}}
  \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
  \expandafter\def\csname p@enum\romannumeral\the\@enumdepth\endcsname{}%
  \expandafter\def\csname labelenum\romannumeral\the\@enumdepth\endcsname{%
    \csname theenum\romannumeral\the\@enumdepth\endcsname}%
  \expandafter\def\csname theenum\romannumeral\the\@enumdepth\endcsname{%
    \yagnumber{\Y@G@EnumSymFamChoice}%
    {enum\romannumeral\the\@enumdepth}{\Y@GEnumSymColor}}%
  \list{\csname label\@enumctr\endcsname}{%
    \@nmbrlisttrue
    \def\@listctr{\@enumctr}%
    \setcounter{\@enumctr}{\Y@GEnumFirstItemNum}%
    \addtocounter{\@enumctr}{-1}%
    \def\makelabel##1{\hss\llap{##1}}}
  \fi}{\endlist}
\newenvironment{notyagenum}
  {\let\item\Y@Golditem
    \setboolean{Y@GitemRedefined}{false}}{}
\AtBeginDocument{%
  \ifY@G@configfile
  \InputIfFileExists{yagusylo.cfg}%
  {\PackageInfo{yagusylo}{Configuration file found and read\@gobble}}%
  {\PackageErrorNoLine{yagusylo}
    {No configuration file found}
    {Or yagusylo.cfg does not exist\MessageBreak
      or it is in some place unknown of TeX.}}%
  \fi}
\endinput
%%
%% End of file `yagusylo.sty'.