Browse Source

initial commit

master
Jonathan Spratte 2 years ago
commit
c8e2c7bbb5
5 changed files with 631 additions and 0 deletions
  1. 12
    0
      DSALaTeX.sty
  2. 531
    0
      DSAchar.sty
  3. 39
    0
      DSAproben.sty
  4. 32
    0
      DSAutil.sty
  5. 17
    0
      DSAwurf.sty

+ 12
- 0
DSALaTeX.sty View File

@@ -0,0 +1,12 @@
1
+\NeedsTeXFormat{LaTeX2e}
2
+
3
+\def\DSALaTeX@version{0.1}
4
+\def\DSALaTeX@date{2018-10-15}
5
+
6
+\ProvidesPackage{DSALaTeX}
7
+  [%
8
+    \DSALaTeX@date\space v\DSALaTeX@version\space Macros und Umgebungen zum
9
+    erstellen von Abenteuern%
10
+  ]
11
+
12
+\RequirePackage{DSAutil, DSAwurf, DSAproben, DSAchar}

+ 531
- 0
DSAchar.sty View File

@@ -0,0 +1,531 @@
1
+\NeedsTeXFormat{LaTeX2e}
2
+\RequirePackage{xparse}
3
+\RequirePackage{booktabs}
4
+\RequirePackage{DSAproben,DSAwurf,DSAutil}
5
+
6
+\def\DSAchar@version{0.1}
7
+\def\DSAchar@date{2018-10-15}
8
+
9
+\ProvidesExplPackage
10
+  {DSAchar}          {\DSAchar@date}
11
+  {\DSAchar@version} {DSA Charakterwerte}
12
+
13
+\newcommand\indentedThingy[1][1em]%>>>
14
+  {%
15
+    \hangindent#1\relax
16
+    \noindent
17
+  }%<<<
18
+% Personenbezogen >>>
19
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20
+\newcommand*\NeuerName[3]%>>>
21
+  {%
22
+    \newcommand*#1
23
+      {%
24
+        #2 #3%
25
+        \gdef#1{#2\@ifstar{ #3}{}}%
26
+        \@ifstar{}{}%
27
+      }%
28
+  }%<<<
29
+\ExplSyntaxOn
30
+\cs_generate_variant:Nn \tl_if_eq:nnTF { VnTF }
31
+\cs_generate_variant:Nn \tl_lower_case:n { V }
32
+\msg_new:nnn { DSAchar } { only~bool }%>>>
33
+  { The~`#1`~key~accepts~only~the~boolean~values~`true`~and~`false`. }%<<<
34
+\msg_new:nnn { DSAchar } { unknown~key }%>>>
35
+  { The~`#1`~key~is~unknown. }%<<<
36
+\tl_new:N \l_DSAchar_key_tl
37
+\prop_const_from_keyval:Nn \c_DSAchar_key_type_prop%>>>
38
+  {
39
+    ,mu  = int
40
+    ,kl  = int
41
+    ,in  = int
42
+    ,ch  = int
43
+    ,ff  = int
44
+    ,ge  = int
45
+    ,ko  = int
46
+    ,kk  = int
47
+    ,le  = int
48
+    ,au  = int
49
+    ,mr  = int
50
+    ,ae  = int
51
+    ,ke  = int
52
+    ,ini = int
53
+    ,gs  = int
54
+    ,rs  = int
55
+    ,be  = int
56
+    ,ws  = int
57
+    ,at  = int
58
+    ,pa  = int
59
+    ,fk  = int
60
+    ,waffe = tl
61
+    ,links = tl
62
+    ,rasse = tl
63
+    ,kultur = tl
64
+    ,profession = tl
65
+    ,magier = bool
66
+    ,geweihter = bool
67
+    ,manoever  = clist
68
+    ,zauber    = clist
69
+    ,liturgien = clist
70
+    ,sonderfertigkeiten = clist
71
+  }%<<<
72
+\prg_new_protected_conditional:Npnn \DSAchar_if_key_defined:n #1%>>>
73
+  { T , F , TF }
74
+  {
75
+    \prop_get:NnNF \c_DSAchar_key_type_prop { #1 } \l_DSAchar_key_type_tl
76
+      {
77
+        \msg_error:nnn { DSAchar } { unknown~key } { #1 }
78
+      }
79
+    \DSAchar_if_key_defined:nnTF { \l_DSAchar_key_type_tl } { #1 }
80
+      { \prg_return_true: }
81
+      { \prg_return_false: }
82
+  }%<<<
83
+\prg_new_conditional:Npnn \DSAchar_if_key_defined:nn #1 #2%>>>
84
+  { T , F , TF }
85
+  {
86
+    \cs_if_exist:cTF { l_DSAchar_ \l_DSAchar_key_tl _#2_#1 }
87
+      { \prg_return_true: }
88
+      { \prg_return_false: }
89
+  }%<<<
90
+\cs_new_protected:Npn \DSAchar_set_key:nn #1 #2%>>>
91
+  {
92
+    \prop_get:NnNF \c_DSAchar_key_type_prop { #1 } \l_DSAchar_key_type_tl
93
+      {
94
+        \msg_error:nnn { DSAchar } { unknown~key } { #1 }
95
+      }
96
+    \DSAchar_set_key:nnn \l_DSAchar_key_type_tl { #1 } { #2 }
97
+  }%<<<
98
+\cs_generate_variant:Nn \DSAchar_set_key:nn { on }
99
+\cs_new_protected:Npn \DSAchar_set_key:nnn #1 #2 #3%>>>
100
+  {
101
+    \DSAchar_if_key_defined:nnF { #1 } { #2 }
102
+      {
103
+        \use:c { #1_new:c }
104
+          { l_DSAchar_ \l_DSAchar_key_tl _#2_#1 }
105
+      }
106
+    \tl_if_eq:VnTF \l_DSAchar_key_type_tl { bool }
107
+      {
108
+        \str_case:nnTF { #3 }
109
+          {
110
+            { true }  { \bool_set_true:c }
111
+            { false } { \bool_set_false:c }
112
+          }
113
+          {
114
+            { l_DSAchar_ \l_DSAchar_key_tl _#2_bool }
115
+          }
116
+          {
117
+            \msg_error:nnn { DSAchar } { only~bool } { #2 }
118
+          }
119
+      }
120
+      {
121
+        \use:c { #1_set:cn }
122
+          { l_DSAchar_ \l_DSAchar_key_tl _#2_#1 }
123
+          { #3 }
124
+      }
125
+  }%<<<
126
+\cs_new:Npn \DSAchar_use_key:n #1%>>>
127
+  {
128
+    \prop_get:NnNF \c_DSAchar_key_type_prop { #1 } \l_DSAchar_key_type_tl
129
+      {
130
+        \msg_error:nnn { DSAchar } { unknown~key } { #1 }
131
+      }
132
+    \DSAchar_use_key:nn { \l_DSAchar_key_type_tl } { #1 }
133
+  }%<<<
134
+\cs_generate_variant:Nn \DSAchar_use_key:n { x }
135
+\cs_new:Npn \DSAchar_use_key:nn #1 #2%>>>
136
+  {
137
+    \use:c { #1_use:c } { l_DSAchar_ \l_DSAchar_key_tl _#2_#1 }
138
+  }%<<<
139
+\cs_new:Npn \DSAchar_use_int:n #1%>>>
140
+  {
141
+    \DSAchar_use_key:nn { int } { #1 }
142
+  }%<<<
143
+\prg_new_conditional:Npnn \DSAchar_bool_if:n #1%>>>
144
+  { T , F , TF }
145
+  {
146
+    \DSAchar_bool_if:nnTF { \l_DSAchar_key_tl } { #1 }
147
+      { \prg_return_true: }
148
+      { \prg_return_false: }
149
+  }%<<<
150
+\prg_new_conditional:Npnn \DSAchar_bool_if:nn #1 #2%>>>
151
+  { T , F , TF }
152
+  {
153
+    \bool_if:cTF { l_DSAchar_ #1 _ #2 _bool }
154
+      { \prg_return_true: }
155
+      { \prg_return_false: }
156
+  }%<<<
157
+\cs_new_protected:Npn \DSAchar_def_undefined_key:nnn #1 #2 #3%>>>
158
+  {
159
+    \DSAchar_if_key_defined:nnF { #1 } { #2 }
160
+      { \DSAchar_set_key:nnn { #1 } { #2 } { #3 } }
161
+  }%<<<
162
+\cs_new_protected:Npn \DSAchar_def_undefined_key:nn #1 #2%>>>
163
+  {
164
+    \prop_get:NnNF \c_DSAchar_key_type_prop { #1 } \l_DSAchar_key_type_tl
165
+      {
166
+        \msg_error:nnn { DSAchar } { unknown~key } { #1 }
167
+      }
168
+    \DSAchar_def_undefined_key:nnn { \l_DSAchar_key_type_tl } { #1 } { #2 }
169
+  }%<<<
170
+\cs_new_protected:Npn \DSAchar_typeset_basis_value:n #1%>>>
171
+  {
172
+    \makebox [ 0pt ] [ l ] { \MakeUppercase { #1 } : }
173
+    \phantom { MU : } ~
174
+    \phantom { 88 }
175
+    \llap { \DSAchar_use_int:n { #1 } }
176
+  }%<<<
177
+\cs_new_protected:Npn \DSAchar_set_default_values:%>>>
178
+  {
179
+    \DSAchar_set_key:nn { mu } { 8 }
180
+    \DSAchar_set_key:nn { kl } { 8 }
181
+    \DSAchar_set_key:nn { in } { 8 }
182
+    \DSAchar_set_key:nn { ch } { 8 }
183
+    \DSAchar_set_key:nn { ff } { 8 }
184
+    \DSAchar_set_key:nn { ge } { 8 }
185
+    \DSAchar_set_key:nn { ko } { 8 }
186
+    \DSAchar_set_key:nn { kk } { 8 }
187
+    \DSAchar_set_key:nn { gs } { 8 }
188
+    \DSAchar_set_key:nn { rs } { 0 }
189
+    \DSAchar_set_key:nn { be } { 0 }
190
+    \DSAchar_set_key:nn { magier }     { false }
191
+    \DSAchar_set_key:nn { geweihter }  { false }
192
+    \DSAchar_set_key:nn { rasse }      { Mittelländer }
193
+    \DSAchar_set_key:nn { kultur }     { Mittelländische~Städte }
194
+    \DSAchar_set_key:nn { profession } { Tagelöhner }
195
+    \DSAchar_set_key:nn { waffe }      { \textit{keine} }
196
+  }%<<<
197
+\cs_new:Npn \DSAchar_get_key_expandable:nn #1 #2%>>>
198
+  {
199
+    \DSAchar_get_key_expandable_inner_a:nf { #1 } { \tl_lower_case:n { #2 } }
200
+  }%<<<
201
+\cs_new:Npn \DSAchar_get_key_expandable_inner_a:nn #1 #2%>>>
202
+  {
203
+    \DSAchar_get_key_expandable_inner_b:nnf { #1 } { #2 }
204
+      { \prop_item:Nn \c_DSAchar_key_type_prop { #2 } }
205
+  }%<<<
206
+\cs_new:Npn \DSAchar_get_key_expandable_inner_b:nnn #1 #2 #3%>>>
207
+  {
208
+    \use:c { #3_use:c } { l_DSAchar_#1_#2_#3 }
209
+  }%<<<
210
+\cs_new:Npn \DSAchar_print_clist:nnn #1 #2 #3%>>>
211
+  {
212
+    \clist_use:cn { l_DSAchar_ #1 _ #2 _clist } { #3 }
213
+  }%<<<
214
+\cs_new_protected:Npn \DSAchar_print_clist_labelled:nnnn #1 #2 #3 #4%>>>
215
+  {
216
+    \tl_set:Nn \l_DSAchar_key_tl { #1 }
217
+    #3:~
218
+    \DSAchar_if_key_defined:nTF { #2 }
219
+      {
220
+        \DSAchar_print_clist:nnn { #1 } { #2 } { #4 }
221
+      }
222
+      {
223
+        \textit{keine}
224
+      }
225
+  }%<<<
226
+\cs_generate_variant:Nn \DSAchar_get_key_expandable_inner_a:nn  { nf }
227
+\cs_generate_variant:Nn \DSAchar_get_key_expandable_inner_b:nnn { nnf }
228
+\keys_define:nn { DSAchar }%>>>
229
+  {
230
+    %,mu  .code:n = \DSAchar_set_key:nn { mu }  { #1 }
231
+    %,kl  .code:n = \DSAchar_set_key:nn { kl }  { #1 }
232
+    %,in  .code:n = \DSAchar_set_key:nn { in }  { #1 }
233
+    %,ch  .code:n = \DSAchar_set_key:nn { ch }  { #1 }
234
+    %,ff  .code:n = \DSAchar_set_key:nn { ff }  { #1 }
235
+    %,ge  .code:n = \DSAchar_set_key:nn { ge }  { #1 }
236
+    %,ko  .code:n = \DSAchar_set_key:nn { ko }  { #1 }
237
+    %,kk  .code:n = \DSAchar_set_key:nn { kk }  { #1 }
238
+    %,le  .code:n = \DSAchar_set_key:nn { le }  { #1 }
239
+    %,au  .code:n = \DSAchar_set_key:nn { au }  { #1 }
240
+    %,ws  .code:n = \DSAchar_set_key:nn { ws }  { #1 }
241
+    %,ae  .code:n = \DSAchar_set_key:nn { ae }  { #1 }
242
+    %,ke  .code:n = \DSAchar_set_key:nn { ke }  { #1 }
243
+    %,mr  .code:n = \DSAchar_set_key:nn { mr }  { #1 }
244
+    %,ini .code:n = \DSAchar_set_key:nn { ini } { #1 }
245
+    %,gs  .code:n = \DSAchar_set_key:nn { gs }  { #1 }
246
+    %,rs  .code:n = \DSAchar_set_key:nn { rs }  { #1 }
247
+    %,be  .code:n = \DSAchar_set_key:nn { be }  { #1 }
248
+    %,waffe .code:n = \DSAchar_set_key:nn { waffe } { #1 }
249
+    %,links .code:n = \DSAchar_set_key:nn { links } { #1 }
250
+    %,rasse .code:n = \DSAchar_set_key:nn { rasse } { #1 }
251
+    %,kultur .code:n = \DSAchar_set_key:nn { kultur } { #1 }
252
+    %,profession .code:n = \DSAchar_set_key:nn { profession } { #1 }
253
+    %,magier .code:n = \DSAchar_set_key:nn { magier } { #1 }
254
+    %,geweihter .code:n = \DSAchar_set_key:nn { geweihter } { #1 }
255
+    %
256
+    ,unknown .code:n =
257
+      \tl_set:Nx \l_tmpa_tl { \str_lower_case:f { \l_keys_key_tl } }
258
+      \DSAchar_set_key:on
259
+        {
260
+          \l_tmpa_tl
261
+        } { #1 }
262
+    ,klasse     .meta:n = { profession = { #1 } }
263
+    ,Klasse     .meta:n = { profession = { #1 } }
264
+    ,manöver    .meta:n = { manoever   = { #1 } }
265
+    ,Manöver    .meta:n = { manoever   = { #1 } }
266
+  }%<<<
267
+\NewDocumentCommand \NeuerChar { m m m m }%>>>
268
+  {
269
+    \tl_set:Nn \l_DSAchar_key_tl { #1 }
270
+    \DSAchar_set_default_values:
271
+    \DSAchar_set_key:nnn { tl } { fullname } { #2~#3 }
272
+    \keys_set:nn { DSAchar } { #4 }
273
+    \exp_args:Nc \NeuerName { #1 } { #2 } { #3 }
274
+    \DSAchar_def_undefined_key:nn { le }%>>>
275
+      {
276
+        \DSAchar_use_int:n { ko } +
277
+        \DSAchar_use_int:n { kk } / 2
278
+      }%<<<
279
+    \DSAchar_def_undefined_key:nn { au }%>>>
280
+      {
281
+        (
282
+          \DSAchar_use_int:n { mu } +
283
+          \DSAchar_use_int:n { ko } +
284
+          \DSAchar_use_int:n { ge }
285
+        ) / 2
286
+      }%<<<
287
+    \DSAchar_def_undefined_key:nn { ws }%>>> Wundschwelle
288
+      {
289
+        \DSAchar_use_int:n { ko } / 2
290
+      }%<<<
291
+    \DSAchar_def_undefined_key:nn { ae }%>>>
292
+      {
293
+        (
294
+          \DSAchar_use_int:n { mu } +
295
+          \DSAchar_use_int:n { in } +
296
+          \DSAchar_use_int:n { ch }
297
+        ) / 2
298
+      }%<<<
299
+    \DSAchar_def_undefined_key:nn { at }%>>>
300
+      {
301
+        (
302
+          \DSAchar_use_int:n { mu } +
303
+          \DSAchar_use_int:n { ge } +
304
+          \DSAchar_use_int:n { kk }
305
+        ) / 5
306
+      }%<<<
307
+    \DSAchar_def_undefined_key:nn { pa }%>>>
308
+      {
309
+        (
310
+          \DSAchar_use_int:n { in } +
311
+          \DSAchar_use_int:n { ge } +
312
+          \DSAchar_use_int:n { kk }
313
+        ) / 5
314
+      }%<<<
315
+    \DSAchar_def_undefined_key:nn { fk }%>>> Fernkampf
316
+      {
317
+        (
318
+          \DSAchar_use_int:n { in } +
319
+          \DSAchar_use_int:n { ff } +
320
+          \DSAchar_use_int:n { kk }
321
+        ) / 5
322
+      }%<<<
323
+    \DSAchar_def_undefined_key:nn { ini }%>>>
324
+      {
325
+        (
326
+          2 * \DSAchar_use_int:n { mu } +
327
+          \DSAchar_use_int:n { in } +
328
+          \DSAchar_use_int:n { ge }
329
+        ) / 5
330
+        - \DSAchar_use_int:n { be }
331
+      }%<<<
332
+    \DSAchar_def_undefined_key:nn { mr }%>>>
333
+      {
334
+        (
335
+          \DSAchar_use_int:n { mu } +
336
+          \DSAchar_use_int:n { kl } +
337
+          \DSAchar_use_int:n { ko }
338
+        ) / 5
339
+      }%<<<
340
+  }%<<<
341
+\NewDocumentCommand \CharBasis { m }%>>>
342
+  {
343
+    \tl_set:Nn \l_DSAchar_key_tl { #1 }
344
+    \begin{tabular}[t]{@{}l@{}}
345
+      \textbf { \DSAchar_use_key:nn { tl } { fullname } } \\
346
+      \begin{tabular}{@{}*4l@{}}
347
+        \DSAchar_typeset_basis_value:n { mu }
348
+        & \DSAchar_typeset_basis_value:n { kl }
349
+        & \DSAchar_typeset_basis_value:n { in }
350
+        & \DSAchar_typeset_basis_value:n { ch }
351
+        \\
352
+        \DSAchar_typeset_basis_value:n { ff }
353
+        & \DSAchar_typeset_basis_value:n { ge }
354
+        & \DSAchar_typeset_basis_value:n { ko }
355
+        & \DSAchar_typeset_basis_value:n { kk }
356
+        \\
357
+        \DSAchar_typeset_basis_value:n { le }
358
+        & \DSAchar_typeset_basis_value:n { au }
359
+        & \DSAchar_typeset_basis_value:n { mr }
360
+        \DSAchar_bool_if:nTF { magier }
361
+          { & \DSAchar_typeset_basis_value:n { ae } }
362
+          {}
363
+        \DSAchar_bool_if:nTF { geweihter }
364
+          { & \DSAchar_typeset_basis_value:n { ke } }
365
+          {}
366
+      \end{tabular}
367
+    \end{tabular}
368
+  }%<<<
369
+\NewDocumentCommand \CharEig { m m }%>>>
370
+  {
371
+    \tl_set:Nn \l_DSAchar_key_tl { #1 }
372
+    \DSAchar_use_key:x { \tl_lower_case:n { #2 } }
373
+  }%<<<
374
+\NewExpandableDocumentCommand \CharEigE { m m }%>>>
375
+  {
376
+    \DSAchar_get_key_expandable:nn { #1 } { #2 }
377
+  }%<<<
378
+\NewDocumentCommand \CharKampf { O{\wd0} m }%>>>
379
+  {
380
+    \group_begin:
381
+      \tl_set:Nn \l_DSAchar_key_tl { #2 }
382
+      \setbox0\hbox
383
+        {
384
+          \begin{tabular}[t]{@{}l@{}}
385
+            \CharBasis { #2 }\\
386
+          \end{tabular}
387
+        }
388
+      \cs_set:Npn \width { \wd0 }
389
+      \begin{tabular}[t]{@{}p{#1}@{}}
390
+        \toprule
391
+        \usebox0\\
392
+        \indentedThingy Waffe:~\DSAchar_use_key:n { waffe }\\
393
+        \DSAchar_if_key_defined:nT { links }
394
+          {
395
+            \indentedThingy Linke~Hand:~\DSAchar_use_key:n { links }
396
+            \\
397
+          }
398
+        \DSAchar_typeset_basis_value:n { at }
399
+        \hskip2\tabcolsep
400
+        \DSAchar_typeset_basis_value:n { pa }
401
+        \hskip2\tabcolsep
402
+        \DSAchar_typeset_basis_value:n { fk }
403
+        \hskip2\tabcolsep
404
+        \DSAchar_typeset_basis_value:n { ini }
405
+        \\
406
+        \DSAchar_typeset_basis_value:n { rs }
407
+        \hskip2\tabcolsep
408
+        \DSAchar_typeset_basis_value:n { be }
409
+        \hskip2\tabcolsep
410
+        \DSAchar_typeset_basis_value:n { ws }
411
+        \hskip2\tabcolsep
412
+        \DSAchar_typeset_basis_value:n { gs }
413
+        \\
414
+        \indentedThingy\CharSonderfertigkeiten { #2 }
415
+        \\
416
+        \indentedThingy\CharManoever { #2 }
417
+        \\
418
+        \DSAchar_bool_if:nnT { #2 } { magier }
419
+          { \indentedThingy\CharZauber { #2 } \\ }%
420
+        \DSAchar_bool_if:nnT { #2 } { geweihter }
421
+          { \indentedThingy\CharLiturgien { #2 } \\ }%
422
+        \bottomrule
423
+      \end{tabular}
424
+    \group_end:
425
+  }%<<<
426
+\NewDocumentCommand \CharKampfKurz { O{\wd0} m }%>>>
427
+  {
428
+    \group_begin:
429
+      \tl_set:Nn \l_DSAchar_key_tl { #2 }
430
+      \setbox0\hbox
431
+        {
432
+          \begin{tabular}[t]{@{}*4l@{}}
433
+            \DSAchar_typeset_basis_value:n { le }
434
+            & \DSAchar_typeset_basis_value:n { au }
435
+            & \DSAchar_typeset_basis_value:n { mr }
436
+            \DSAchar_bool_if:nTF { magier }
437
+              { & \DSAchar_typeset_basis_value:n { ae } }
438
+              {}
439
+            \DSAchar_bool_if:nTF { geweihter }
440
+              { & \DSAchar_typeset_basis_value:n { ke } }
441
+              {}
442
+            \\
443
+            \DSAchar_typeset_basis_value:n { at }
444
+            & \DSAchar_typeset_basis_value:n { pa }
445
+            & \DSAchar_typeset_basis_value:n { fk }
446
+            & \DSAchar_typeset_basis_value:n { ini }
447
+          \end{tabular}
448
+        }
449
+      \cs_set:Npn \width { \wd0 }
450
+      \begin{tabular}[t]{@{}p{#1}@{}}
451
+        \toprule
452
+        \textbf { \DSAchar_use_key:nn { tl } { fullname } }
453
+        \\
454
+        \indentedThingy Waffe:~\DSAchar_use_key:n { waffe }
455
+        \\
456
+        \DSAchar_if_key_defined:nT { links }
457
+          {
458
+            \indentedThingy Linke~Hand:~\DSAchar_use_key:n { links }
459
+            \\
460
+          }
461
+        \usebox0
462
+        \\
463
+        \DSAchar_typeset_basis_value:n { rs }
464
+        \hskip2\tabcolsep
465
+        \DSAchar_typeset_basis_value:n { be }
466
+        \hskip2\tabcolsep
467
+        \DSAchar_typeset_basis_value:n { ws }
468
+        \hskip2\tabcolsep
469
+        \DSAchar_typeset_basis_value:n { gs }
470
+        \\
471
+        \DSAchar_if_key_defined:nnT { clist } { sonderfertigkeiten }
472
+          {
473
+            \indentedThingy\CharSonderfertigkeiten { #2 }
474
+            \\
475
+          }
476
+        \DSAchar_if_key_defined:nnT { clist } { manoever }
477
+          {
478
+            \indentedThingy\CharManoever { #2 }
479
+            \\
480
+          }
481
+        \DSAchar_bool_if:nnT { #2 } { magier }
482
+          {
483
+            \DSAchar_if_key_defined:nnT { clist } { zauber }
484
+              {
485
+                \indentedThingy\CharZauber { #2 }
486
+                \\
487
+              }
488
+          }
489
+        \DSAchar_bool_if:nnT { #2 } { geweihter }
490
+          {
491
+            \DSAchar_if_key_defined:nnT { clist } { liturgien }
492
+              {
493
+                \indentedThingy\CharLiturgien { #2 }
494
+                \\
495
+              }
496
+          }
497
+        \bottomrule
498
+      \end{tabular}
499
+    \group_end:
500
+  }%<<<
501
+\NewDocumentCommand \CharManoever { O{,~} m }%>>>
502
+  {
503
+    \DSAchar_print_clist_labelled:nnnn { #2 } { manoever } { Manöver } { #1 }
504
+  }%<<<
505
+\NewDocumentCommand \CharZauber { O{,~} m }%>>>
506
+  {
507
+    \DSAchar_print_clist_labelled:nnnn { #2 } { zauber } { Zauber } { #1 }
508
+  }%<<<
509
+\NewDocumentCommand \CharLiturgien { O{,~} m }%>>>
510
+  {
511
+    \DSAchar_print_clist_labelled:nnnn { #2 } { liturgien } { Liturgien } { #1 }
512
+  }%<<<
513
+\NewDocumentCommand \CharSonderfertigkeiten { O{,~} m }%>>>
514
+  {
515
+    \DSAchar_print_clist_labelled:nnnn
516
+      { #2 } { sonderfertigkeiten } { Sonderfertigkeiten } { #1 }
517
+  }%<<<
518
+\NewDocumentCommand \CharParse { m +m }%>>>
519
+  {
520
+  }%<<<
521
+\NewExpandableDocumentCommand \CharListe { O{,~} m m }%>>>
522
+  {
523
+    \DSAchar_print_clist:nnn { #2 } { #3 } { #1 }
524
+  }%<<<
525
+\NewExpandableDocumentCommand \CharBoolTF { m m }%>>>
526
+  {
527
+    \DSAchar_bool_if:nnTF { #1 } { #2 }
528
+  }%<<<
529
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<<<
530
+
531
+\endinput

+ 39
- 0
DSAproben.sty View File

@@ -0,0 +1,39 @@
1
+\NeedsTeXFormat{LaTeX2e}
2
+\RequirePackage{DSAutil}
3
+
4
+\def\DSAproben@version{0.1}
5
+\def\DSAproben@date{2018-10-15}
6
+
7
+\ProvidesPackage{DSAproben}
8
+  [%
9
+    \DSAproben@date\space v\DSAproben@version\space Macros um Proben zu setzen%
10
+  ]
11
+
12
+% Proben >>>
13
+\newcommand*\probe[2][]%>>>
14
+  {%
15
+    \textsf
16
+      {%
17
+        \MakeUppercase{#2}%
18
+        \DSAifemptyTF{#1}
19
+          {}
20
+          {%
21
+            \DSAifminusTF{#1}{#1}{+#1}%
22
+          }
23
+        Probe%
24
+      }%
25
+  }%<<<
26
+\newcommand\vprobe[2][]%>>>
27
+  {%
28
+    \textsf
29
+      {%
30
+        vergleichende \MakeUppercase{#2}%
31
+        \DSAifemptyTF{#1}
32
+          {}
33
+          {%
34
+            \DSAifminusTF{#1}{#1}{+#1}%
35
+          }
36
+         Probe}%
37
+  }%<<<
38
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<<<
39
+\endinput

+ 32
- 0
DSAutil.sty View File

@@ -0,0 +1,32 @@
1
+\NeedsTeXFormat{LaTeX2e}
2
+
3
+\def\DSAutil@version{0.1}
4
+\def\DSAutil@date{2018-10-15}
5
+
6
+\ProvidesPackage{DSAutil}
7
+  [%
8
+    \DSAutil@date\space v\DSAutil@version\space Hilfsmacros von DSALaTeX%
9
+  ]
10
+
11
+% Utility >>>
12
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13
+\long\def\DSAifminusTF@inner#1-#2\endDSAifminusTF@inner%>>>
14
+  {%
15
+    \DSAifemptyTF{#2}
16
+  }%<<<
17
+\newcommand\DSAifminusTF[1]%>>>
18
+  {%
19
+    \DSAifminusTF@inner#1-\endDSAifminusTF@inner
20
+      \@secondoftwo
21
+      \@firstoftwo
22
+  }%<<<
23
+\newcommand\DSAifemptyTF[1]%>>>
24
+  {%
25
+    \if\relax\detokenize{#1}\relax
26
+      \expandafter\@firstoftwo
27
+    \else
28
+      \expandafter\@secondoftwo
29
+    \fi
30
+  }%<<<
31
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<<<
32
+\endinput

+ 17
- 0
DSAwurf.sty View File

@@ -0,0 +1,17 @@
1
+\NeedsTeXFormat{LaTeX2e}
2
+
3
+\def\DSAwurf@version{0.1}
4
+\def\DSAwurf@date{2018-10-15}
5
+
6
+\ProvidesPackage{DSAwurf}
7
+  [%
8
+    \DSAwurf@date\space v\DSAwurf@version\space Macros um Würfel zu setzen%
9
+  ]
10
+
11
+% Würfel >>>
12
+\newcommand*\w[2][1]%>>>
13
+  {%
14
+    \textsf{#1W#2}%
15
+  }%<<<
16
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<<<
17
+\endinput

Loading…
Cancel
Save