aa_macro syntax 
 aa_macro source 
 HTML source 
 HTML render 
Key

4.63 - [hmap] Built-In

Mnemonic aid: hmap for Hex MAP

See also:  [aisort] ,  [append] ,  [asort] ,  [clearl] ,  [cmap] ,  [dlist] ,  [e] ,  [isort] ,  [lcc] ,  [lcopy] ,  [lhsort] ,  [list] ,  [ljoin] ,  [llen] ,  [lpop] ,  [lset] ,  [lslice] ,  [lsplit] ,  [lsub] ,  [ltol]  and  [translate] 

This built-in creates a 256-entry list of all the possible 8-bit characters mapped directly their hexadecimal values. This allows re-mapping of any of the characters on one string to a hexidecimal representation using  [translate] .

Tip: One very handy use for this is fixed, legal label generation from any character string. For instance, you can create known, fixed links to glossary entries based upon the word in the glossary, even before the glossary is generated. So a forward link to a glossary entry for "Area 51" would end up the same as in the glossary, where you would generate the entry using the same technique. Then, when the reader clicks on the word in context, it takes them directly to the glossary entry:

[hmap listName]

[hmap list1]
<a href="glossary.html#[translate list1,Area 51]">Area 51</a> links forward to glossary
Then, on glossary.html page:
<a name="[translate list1,Area 51]"></a>Area 51 is a...

<a href="glossary.html#41726561203531">Area 51</a> links forward to glossary
Then, on glossary.html page:
<a name="41726561203531"></a>Area 51 is a...
Area 51 links forward to glossary Then, on glossary.html page: Area 51 is a...

Other built-ins used here:  [e] ,  [lset]  and  [translate] 

Keyboard Navigation
, Previous Page . Next Page t TOC i Index

Valid HTML 4.01 Loose
 

This manual was generated with wtfm
wtfm uses aa_macro and SqLite
aa_macro uses python 2.7