-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaamacropreview.html
670 lines (574 loc) · 20 KB
/
aamacropreview.html
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
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
<!DOCTYPE html>
<HTML lang="en">
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META name="description" content="aa_macro previewer / syntax display">
<META name="keywords" content="HTML,CSS,JavaScript,aa_macro,wtfm">
<style>
.cchk {
display: inline-block;
white-space: nowrap;
border-radius: 5px;
height: 1em;
width: 1em;
border: .1em solid #000000;
border-color: #000000;
background: #FFFFFF;
text-align: center;
color: #000000;
}
cbak {
display: inline-block;
white-space: nowrap;
background: #eeeeee;
padding-left: .5em;
padding-right: .5em;
margin-top: 1px;
margin-bottom: 1px;
color: #000000;
}
</style>
<SCRIPT>
var verbiage=' Buttons Focus Text Entry';
var ccm = '✓';
var checked = '<span class="cchk" style="background: #4444cc; color: #ffffff;">[iamacheck]</span> '+verbiage;
var unchecked = '<span class="cbak"><span class="cchk" style="background: #ffffff; color: #ffffff;">[iamacheck]</span></span> '+verbiage;
var dindex = -1;
var ddl = '<form action="">' +
'<font color="#000000"><b>Choose Example, then click Test</b></font>' +
'<fieldset style="border: 0; margin: 0; padding: 0;">' +
'<select id="selTest" onchange="dodemosel()">' +
'[ITEMS]' +
'</select>' +
'</fieldset>' +
'</form>'
var demos = [
'Comments:\n\nSome text[comment This is a comment]',
'An italics style:\n\n[style italics <i>[b]</i>] \n' +
'{italics slanty text}',
'A more concise italics style:\n\n[style i <i>[b]</i>] \n' +
'{i slanty text}',
'An italics style for markdown:\n\n[style i _[b]_] \n' +
'{i slanty text}',
'A variable italics style for plaintext, HMTL, and markdown:\n\n' +
'[style i [if [v mode] bare [b]][if [v mode] mark _[b]_][if [v mode] html <i>[b]</i>]] \n' +
'[global mode mark]{i testing}\n' +
'[global mode html]{i testing}\n' +
'[global mode bare]{i testing}',
'A bold text style:\n\n[style b <b>[b]</b>] \n' +
'{b bold text}',
'Nesting styles:\n\n[style b <b>[b]</b>] \n' +
'[style i <i>[b]</i>] \n' +
'{b {i bold, italic text}}',
'A CSS style:\n\n[style x <span style="color: #0000ff; font-family: Courier;">[b]</span>] \n' +
'{x Fixed font in blue}',
'URLs:\n\n[url http://ourtimelines.com/|Timelines!]\n' +
'[url tgt=_blank,http://ourtimelines.com/|Timelines!]\n' +
'[url css=text-decoration: none;,http://ourtimelines.com/|Timelines!]\n' +
'[url nam=localName]',
'URL Encode:\n\n[style google Google search for [url tgt=_blank,https://www.google.com/search?q=[urlencode [b]]|[b]]] \n[br][br]\n{google Olives, and capers?}',
'Unparameterized replacement:\n\n[style otl [url http://ourtimelines.com/|Timelines!]] \n' +
'{otl}',
'Structured paragraph:\n\n[style p <p>[nl][b][nl]</p>] \n' +
'{p This is a paragraph}',
'Stack operations:\n\n[push bar]foo[pop]',
'HTML list (UL or OL):\n\n[ul sep=|,foo|bar|bip]',
'Data list:\n\n[list mylist,apple,pomegranate,cherry] \n' +
'[asort mylist] \n' +
'[style show Data list element: <i>[b]</i><br>[nl]] \n' +
'[dlist mylist]<br>\n' +
'[dlist style=show,mylist]',
'Data dictionaries:\n\n[dict mystuff,foo:bar,this:that,widget:wodget,she:he] \n' +
'[d mystuff,widget]',
'Variables:\n\n[local test 1][global ing 2] \n' +
'[v test][v ing]',
'Math:\n\n[local num 2] \n[add [v num] 3]\n[int 23.4]\n[abs -17]\n[mul 3 [v num]]',
'Random number:\n\n[br][br][br [random]][br [random seed=foobar]]\n'+
'[style rrange [int [mul mode=float,[b] [random seed=none]]]] \n'+
'[br {rrange 10}]\n'+
'[br {rrange 50}]\n'+
'[br {rrange 100}]\n',
'Sum up a list:\n\n[style sumlistlow [b][local list_sum [add [b] [v list_sum]]]] \n' +
'[style sumlist [local list_sum 0][dlist inter= + ,style=sumlistlow,[b]] = [v list_sum]] \n' +
' \n[list mylist,15,27,31] \n' +
'{sumlist mylist}',
'Numeric suffixes:\n\n[style sfx [b][th [b]]] \n{sfx 1}\n{sfx 2}\n{sfx 3}\n{sfx 4}',
'Comma-separation:\n\n[fcsep 1024]\n[fcsep 9764343.002]\n[csep 2048]\n[csep 1]',
'Roman numerals:\n\n'+
'<br>[roman 27]<br>\n'+
'[style rom [roman [b]] ] \n' +
'[for rom,1,31,1]',
'Slicing:\n\n[slice 3:6,foobarbip]',
'Multiple parameters:\n\n[style section [split |,[b]]<h2>[parm 0]</h2>[nl]<p>[nl][parm 1][nl]</p>] \n' +
'{section Title|Content}',
'Variable Number of Parameters:\n\n' +
'[style multiparm [parm [b]] ] \n' +
'[split |,grapes|oranges|cherries|passionfruit|tomatoes|raspberries] \n' +
'[for multiparm,0,[v loc_splitcount],1]',
'Base conversion:\n\n[htodec 11]',
'Soundex:\n\n[soundex Knuth]',
'Word Counting:\n\n[local foo so is this] \n[wc this is a test]\n[wc [v foo]]',
'Character conversion:\n\n[chr 65]\n[ord A]',
'String replacement:\n\n[replace x,q,wxyz]',
'Casing:\n\n[upper caps locked]\n[lower NO Caps for YOU]\n[capt case a title]\n[capw word casing]\n[caps sentence casing.]',
'Encryption:\n\n' +
'[local x [encrypt breakat=8,seed=19,icount=5,salt=flaming furball,this is a test]] \n' +
'[v x]\n' +
'[decrypt seed=19,icount=5,salt=flaming furball,[v x]]',
'Date and time:\n\n'+
'[br][br][br [date] [time] [datetime]]\n' +
'[local dt [datetime]] \n'+
'[local year [slice 0:4,[v dt]]] \n'+
'[local month [month mode=long,[int [slice 4:6,[v dt]]]]] \n'+
'[local day [int [slice 6:8,[v dt]]]][local day [v day][th [v day]]] \n'+
'[local hour [int [slice 8:10,[v dt]]]] \n'+
'[local minute [slice 10:12,[v dt]]] \n'+
'[br [v month] [v day], [v year] [twelve [v hour]]:[v minute] [ampm [v hour]] MST]\n' +
'[br [time mode=12,sfx=auto]]\n' +
'[br [time sfx= o\'clock]]\n' +
'[time mode=12,asfx= ante meridiem,psfx= post meridiem]\n',
'Escapes:\n\nBrackets: [lb][rb] Squigglies: [ls][rs] Vertical Bar: [vb] Comma: [co]',
'Forward references:\n\n[fref overhere]\n' +
'...intervening content...\n' +
'[resolve overhere,arrived later] \n' +
'and then a little more content.',
'For iteration:\n\n[style show [b] ] \n' +
'[for show,0,10,1]\n' +
'[for show,10,0,-1]',
'Switch / case:\n\n' +
'[style foo f:[b] ][style bar b:[b]]' +
'[style huh ?:[b]] \n' +
'[switch default=huh,myswitch x|foo,y|bar] \n' +
'[case myswitch x,with-foo]\n' +
'[case myswitch y,with-bar]\n' +
'[case myswitch z,with-nothing]',
'C Highlighting:\n\n<div style="white-space: pre-wrap;">[raw ccode \n#define TRUE 0\nvoid main()\n{\n printf("Hello, Whirled"); // Whirled Peas!\n}] \n' +
'[getc high=c,var=ccode]</div>',
'Tables:\n\n[table border=1 bgcolor="#0000cc",\n[row ,[header align="right",stuff][header more stuff]]\n[row ,[cell align="right",foo][cell ,bar]]\n]',
'Smart itemization:<br>\n\n'+
'[style numit [v loc_splashnum]:[b]] \n' +
'[style enumerate [splash post=<br>,style=numit,inter=[nl],[b]]] \n' +
'[style itemize [splash inter=[co] ,ntl= and ,[b]]] \n' +
'{enumerate bolt,nut,screw,nail}\n' +
'{itemize bear,fox,puma,rabbit,skunk}',
'Images:\n\n[lipath /safebox/]'+
'[wepath /hpics/] \n' +
'<br>[limg HMSVictory.jpg]<br>\n' +
'[limg title=HMS Victory,HMSVictory.jpg]<br>\n' +
'[limg target=http://ourtimelines.com,HMSVictory.jpg]'];
window.onload = function()
{
var hitme = document.getElementById("buttray")
var cdhk = document.getElementById("checkers");
var arrayLength = demos.length;
var dex = 0;
var str = '';
var strb = '';
var options = '<option value="-1">None...</option>\n'; // <option value = "#FFFFFF">White</option>
cdhk.innerHTML = ccm;
ccm = cdhk.innerHTML;
checked = checked.replace('[iamacheck]',ccm);
unchecked = unchecked.replace('[iamacheck]',ccm);
cdhk.innerHTML = unchecked;
// demos
for (var i = 0; i < arrayLength; i++) // >
{
dex = demos[i].indexOf("\n\n");
str = demos[i].slice(0,dex-1);
strb = '<option value="'+i.toString()+'">'+str+'</option>';
options = options + strb;
}
ddl = ddl.replace('[ITEMS]',options);
// console.log(ddl);
hitme.innerHTML = hitme.innerHTML + ddl;
};
function dodemo(picked)
{
var src = document.getElementById("dpagecontentx");
var pp = '';
pp = demos[picked];
clearem();
src.innerText = pp;
onpCharInput('foo');
if (checkcheck() == true) { src.focus(); }
}
function dodemosel()
{
var src = document.getElementById("selTest");
var picked = src.value.toString();
picked = parseInt(picked);
if (picked != -1)
{
dodemo(picked);
}
else
{
clearem();
}
}
function showem() // next demo
{
var src = document.getElementById("dpagecontentx");
var pp = '';
var dlen = demos.length;
dindex += 1;
if (dindex >= dlen) { dindex = 0; }
pp = demos[dindex];
clearem();
src.innerText = pp;
onpCharInput('foo');
if (checkcheck() == true) { src.focus(); }
};
function showemback() // prev demo
{
var src = document.getElementById("dpagecontentx");
var pp = '';
var dlen = demos.length;
dindex -= 1;
if (dindex < 0) { dindex = dlen - 1; } // >
pp = demos[dindex];
clearem();
src.innerText = pp;
onpCharInput('foo');
if (checkcheck() == true) { src.focus(); }
};
function checkcheck()
{
var cchk = document.getElementById("checkers");
if (cchk.innerHTML.toString() == checked) { return true; }
return false;
}
function tcheck()
{
var chk = document.getElementById("checkers");
if (chk.innerHTML == unchecked)
{
chk.innerHTML = checked;
}
else
{
chk.innerHTML = unchecked;
}
}
// this is synchronous - result returns only when called script provides it
// ------------------------------------------------------------------------
function syncCallAjax(spdq_myData)
{
var remote = '__Unset__';
var request = new XMLHttpRequest();
var remote_url;
remote_url = '/cgi-bin/fakeaamacro.py?myData=' + encodeURIComponent(spdq_myData);
request.open('GET', remote_url, false); // false makes the request synchronous
request.send(null);
if (request.status === 200)
{
remote = request.responseText;
}
return(remote);
}
function test()
{
var srx = document.getElementById("dpagecontentx");
var drx = document.getElementById("aaresult");
var aee = document.getElementById("aaexec");
var txx = srx.innerText;
var rez = '';
txx = txx.replace(/virtual/gi,'!--');
txx = txx.replace(/include/gi,'!--');
txx = txx.replace(/script/gi,'!--');
txx = txx.replace(/exec/gi,'!--');
txx = txx.replace(/cgi\-bin/gi,'!--');
rval = syncCallAjax(JSON.stringify(txx.substring(0,8192)));
rez = JSON.parse(rval);
drx.innerText = rez;
aee.innerHTML = rez;
if (checkcheck() == true) { srx.focus(); }
}
function clearem()
{
var clr = document.getElementById("pretty");
var aee = document.getElementById("aaexec");
aee.innerText = '';
clr.innerText = '';
clr = document.getElementById("dpagecontentx");
if (checkcheck() == true) { clr.focus(); }
clr.innerText = '';
clr = document.getElementById("aaresult");
clr.innerText = '';
clr = document.getElementById("pccount");
clr.innerText = '0';
};
function onpCharInput(e)
{
var brco = "ffff00";
var brtco = "888888";
var brtag = "008800";
var sqco = "ff0000";
var sqtco = "ff8800";
var sqtag = "ff00ff";
var anco = "884444";
var antco = "5599FF";
var quco = "00ffff";
var qutco = "ffffff";
var squco = "ff00ff";
var squtco = "4488FF";
var msg = document.getElementById("mesg");
var src = document.getElementById("dpagecontentx");
var dig = document.getElementById("pretty");
var cpco = src.innerText;
// console.log(JSON.stringify(cpco))
var cpc = cpco;
var cpct = cpc.length.toString();
var cpcr = '';
var insq = 0;
var inbr = 0;
var inq = 0;
var ins = 0;
var pushed = '';
var bc = 0;
var sc = 0;
var sqb = 0;
var dqb = 0;
for (var i = 0; i < cpco.length; i++) // >
{
var c = cpco[i];
if (c == '[') { bc = bc + 1; inbr += 1; pushed = '<font color="#'+brtco+'">'; c = '<font color="#'+brco+'">' + c + '<\/font><font color="#'+brtag+'">'; }
else if (c == ']') { bc = bc - 1; inbr -= 1; pushed=''; c = '<\/font><font color="#'+brco+'">' + c + '<\/font>'; }
else if (c == '{') { sc = sc + 1; insq += 1; pushed = '<font color="#'+sqtco+'">'; c = '<font color="#'+sqco+'">' + c + '<\/font><font color="#'+sqtag+'">'; }
else if (c == '}') { sc = sc - 1; insq -= 1; pushed='';c = '<\/font><font color="#'+sqco+'">' + c + '<\/font>'; }
else if (c == '<') { insq += 1; c = '<font color="#'+anco+'">' + '<' + '<\/font><font color="#'+antco+'">'; }
else if (c == '>') { insq -= 1; c = '<\/font><font color="#'+anco+'">' + '>' + '<\/font>'; }
else if (c == ' ')
{
if (pushed != '') { c = '<\/font>' + c + pushed; pushed = ''; }
}
else if (c == '"')
{
if (dqb == 1) { dqb = 0; } else { dqb = 1; }
if (inq == 1) { inq=0; } else { inq=1;}
if (inq == 1)
{
c = '<font color="#'+quco+'">' + c + '<\/font>';
c = c + '<font color="#'+qutco+'">';
}
else // leaving quote
{
c = '<\/font><font color="#'+quco+'">' + c + '<\/font>';
}
}
else if (c == "'")
{
c = '<font color="#'+squco+'">' + c + '<\/font>';
}
else if (0) // (c == "'")
{
if (sqb == 1) { sqb = 0; } else { sqb = 1; }
if (ins == 1) { ins=0; } else { ins=1;}
if (ins == 1)
{
c = '<font color="#'+squco+'">' + c + '<\/font>';
c = c + '<font color="#'+squtco+'">';
}
else // leaving quote
{
c = '<\/font><font color="#'+squco+'">' + c + '<\/font>';
}
}
cpcr = cpcr + c;
}
dig.innerHTML = cpcr;
var tgt = document.getElementById("pccount");
tgt.innerHTML = cpct;
var hi = '';
var ho = ''
var hsi = '';
var hso = ''
var dqi = 'ok';
var sqi = 'ok';
if (bc != 0) { hi = '<b><font color="#ff0000">'; ho = '<\/font><\/b>';}
if (sc != 0) { hsi = '<b><font color="#ff0000">'; hso = '<\/font><\/b>';}
if (sqb != 0) { sqi = '<b><font color="#ff0000">unbalanced<\/font>'; }
if (dqb != 0) { dqi = '<b><font color="#ff0000">unbalanced<\/font>'; }
msg.innerHTML = 'Balance: []='+hi+bc.toString()+ho+' / {}='+hsi+sc.toString()+hso+ ' / "='+dqi; //+"; // '="+sqi;
};
</SCRIPT>
<title>aa_macro syntax / display</title>
</HEAD>
<BODY>
<div style="text-align: center;">
<div style="width: 90%; margin-left: auto; margin-right: auto; text-align: left;">
<h3>Previewer for aa_macro and wtfm</h3>
</div>
<div style="padding: .5em;
overflow-y: auto;
overflow-x: auto;
white-space: pre-wrap;
margin-left: auto; margin-right: auto;
color: #00ff00;
text-align: left;
font-weight: bold;
width: 90%;
height: 8em;
background-color: #000000;
font-family: Courier;"
id="pretty"></div>
<div id="mesg"
style="width: 90%;
margin-left: auto; margin-right: auto;
text-align:
left;">Balance: </div>
<br>
<div style="padding: .5em;
overflow-y: auto;
overflow-x: auto;
white-space: pre-wrap;
margin-left: auto; margin-right: auto;
color: #00ff00;
text-align: left;
font-weight: bold;
width: 90%;
height: 8em;
background-color: #000000;
font-family: Courier;"
id="aaresult"></div>
<br>
<div style="padding: .5em;
overflow-y: auto;
overflow-x: auto;
white-space: normal;
margin-left: auto; margin-right: auto;
color: #00ff00;
text-align: left;
font-weight: normal;
width: 90%;
height: 8em;
background-color: #000000;
font-family: Courier;"
id="aaexec"></div>
<br>
<div onkeyup="onpCharInput(event)"
class="foo"
id="dpagecontentx"
contenteditable="true"
style="padding: .5em;
overflow-y: auto;
overflow-x: auto;
white-space: pre-wrap;
margin-left: auto; margin-right: auto;
font-family: Courier;
padding: .5em;
text-align: left;
border-color: #000000;
border-width: 1px;
border-style: solid;
width: 90%;
height: 8em;"></div>
<div style="margin-top: .5em; width: 90%; margin-left: auto; margin-right: auto; text-align: left;">
Content Size: <span class="bar" id="pccount">0</span>
</div>
<br>
<div style="padding: .5em;
margin-left: auto; margin-right: auto;
margin-bottom: .5em;
padding-bottom: 0px;
white-space: normal;
color: #00ff00;
text-align: center;
font-weight: normal;
width: 90%;
font-family: Courier;"
id="buttray"></div>
<div style="margin-top: 0px; padding-top: 0px; margin-left: auto; margin-right: auto; width: 90%;">
<!-- button onclick=showemback() style="background-color: #dddddd;">Prev Demo</button -->
<!-- button onclick=showem() style="background-color: #dddddd;">Next Demo</button -->
<button onclick=test() style="background-color: #dddddd;">Test</button>
<button onclick=clearem() style="background-color: #dddddd;">Clear</button>
<span onclick=tcheck() id="checkers" style="cursor: default; user-select: none;">-</span>
</div>
<br>
<div style="width: 90%; margin-left: auto; margin-right: auto; text-align: left;">
<h3>How to Use This Page</h3>
<P>
The <b>Choose Example</b> drop-down menu will load various
forms of aa_macro usage. You can execute the macros using the
<b>Test</b> button. You can also edit the examples, or clear the text
entry area (fourth box down) entirely and try your own hand at aa_macro
construction. Check them out, and feel free to peruse the
<a href="http://ourtimelines.com/aamacrodoc/tocpage.html">aa_macro documentation</a>.
</p>
<h3>Reference Material:</h3>
<ul>
<li><a target="_blank" href="http://ourtimelines.com/aamacrodoc/tocpage.html"><b>aa_macro</b> manual</a></li>
<li><a target="_blank" href="https://github.com/fyngyrz/aa_macro"><b>aa_macro</b> project at Github</a></li>
<li><a target="_blank" href="http://ourtimelines.com/wtfm/tocpage.html"><b>wtfm</b> manual</a></li>
<li><a target="_blank" href="https://github.com/fyngyrz/wtfm"><b>wtfm</b> project at Github</a></li>
</ul>
<P>
<h3>Ultra-basic Guide</h3>
<P>
<b>wtfm</b> is a documentation system based on <b>aa_macro</b>.
</p>
<P>
<b>aa_macro</b> is a markup and macro language. It uses two types of tags:
</p>
<ol>
<li>Built-ins, designated by one of <a target="_blank" href="http://ourtimelines.com/aamacrodoc/builtinref.html">170+ <b>pre</b>-defined keywords</a> inside <i>square</i> brackets: <span style="font-family: Courier; font-weight: bold;">[keyword]</span></li>
<li>Styles, designated by <b>user</b>-defined keywords inside <i>squiggly</i> brackets: <span style="font-family: Courier; font-weight: bold;">{keyword}</span></li>
</ol>
<P>
You can pass parameters to styles; the built-in <span style="font-family: Courier; font-weight: bold;">[b]</span> represents content
past a style's keyword:
</p>
<div style="padding-left: 2em;">
<table>
<tr><td><span style="font-family: Courier; font-weight: bold;">[style italics <i>[b]</i>]</span></td><td><span style="color: #008800;">← the style definition</span></td></tr>
</table>
</div>
<blockquote>
</blockquote>
<P>
When that style is used, the content, in this case, "<span style="font-family: Courier; font-weight: bold;">slanty text</span>", is passed
to the style and placed where the <span style="font-family: Courier; font-weight: bold;">[b]</span> tag is located:
</p>
<div style="padding-left: 2em;">
<table>
<tr><td><span style="font-family: Courier; font-weight: bold;">{italics slanty text}</span></td><td><span style="color: #008800;">← the style invocation</span></td></tr>
<tr><td><span style="font-family: Courier; font-weight: bold;"><i>slanty text</i></span></td><td><span style="color: #008800;">← the result</span></td></tr>
</table>
</div>
<P>
You can nest styles and built-ins. Here's how that can look:
</P>
<div style="padding-left: 2em;">
<table>
<tr><td><span style="font-family: Courier; font-weight: bold;">[style italics <i>[b]</i>]</span></td><td><span style="color: #008800;">← style definition</span></td></tr>
<tr><td><span style="font-family: Courier; font-weight: bold;">[style bold <b>[b]</b>]</span></td><td><span style="color: #008800;">← style definition</span></td></tr>
<tr><td><span style="font-family: Courier; font-weight: bold;">{italics {bold fat, slanty text}}</span></td><td><span style="color: #008800;">← invocation</span></td></tr>
<tr><td><span style="font-family: Courier; font-weight: bold;"><i><b>fat, slanty text</b></i></span></td><td><span style="color: #008800;">← the result</span></td></tr>
</table>
</div>
<P>
Ending a line with two spaces "eats" the following newline.
</p>
<P>
This is just the tip of the proverbial iceberg. <b>aa_macro's</b> broad
selection of built-in keywords provides the tools to process text in
many ways; <b>aa_macro</b> styles can do almost anything to, and with, the
content passed to them.
</p>
<p>
<b>Note:</b> In the context of this test page, a number of limits have
been applied to macro processing for security purposes. None of them will
affect the demos as provided here, but you may run into them if you
increase looping counts, etc. The macro processor itself does not impose
such limits by default.
</p>
</div>
<P>
<a href="http://validator.w3.org/check?uri=referer">
<b>Validated HTML 5</b>
</a>
</p>
</div>
</BODY>
</HTML>