The macros in this selected portion of the sample html_macros.cfg configuration file below are used for HTML formatting of font colors.
///////////////////////////////////////////////////////////////////////////////
//
// html_macros.cfg -- macros for html formatting
//
///////////////////////////////////////////////////////////////////////////////
...
// colors, and font colors
white #FFFFFF
offwhite #F8F8F8
black #000000
fontblack(T) <font color="=black">(T)</font>
fblk(T) =fontblack((T))
blue #0000FF
fontblue(T) <font color="=blue">(T)</font>
fbl(T) =fontblue((T))
brown #996633
fontbrown(T) <font color="=brown">(T)</font>
fb(T) =fontbrown((T))
lightbrown #CCBBAA
green #008000
fontgreen(T) <font color="=green">(T)</font>
fg(T) =fontgreen((T))
maroon #800000
fontmaroon(T) <font color="=maroon">(T)</font>
fm(T) =fontmaroon((T))
purple #800080
fontpurple(T) <font color="=purple">(T)</font>
fp(T) =fontpurple((T))
navy #000099 // #000080
fontnavy(T) <font color="=navy">(T)</font>
fn(T) =fontnavy((T))
bluegray #336699
gray #808080
fontgray(T) <font color="=gray">(T)</font>
fgry(T) =fontgray((T))
red #FF0000
fontred(T) <font color="=red">(T)</font>
fr(T) =fontred((T))
...
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
Using macros such as these, we can dispense for the most part with ugly, error-prone HTML tags and instead use the much shorter and more readable PIKT macro equivalents.
So, for example, instead of writing this:
this is <font color="#FF0000">red</font>, this is <font color="#00FF00">green</font>,
and this is <font color="#0000FF">blue</font>
we would write this:
this is =fr(red), this is =fg(green), and this is =fbl(blue)
both of which would result in:
this is red, this is green, and this is blue
but doing it the second way with PIKT macros is clearer.
Here is some HTML code from the PIKT FAQ page that uses the font color macros:
=nm(who uses pikt, =b(Who uses =fn(PIKT)?))
=br
Judging by =q(repeat customers) (sites downloading different versions of
=fn(PIKT) more than once), =fn(PIKT) has been used at thousands of sites
worldwide, ...
With similar HTML preprocessing, the principal PIKT Maintainer manages more than 650 web pages (at last count) over several different Web sites (including pikt.org, as you might expect).
[For more examples, see Samples.]
Home |
FAQ |
News |
Intro |
Samples |
Tutorial |
Reference |
Software |
Authors |
Licensing |
SiteSearch
Links |
SiteIndex |
Pikt-Users |
Pikt-Workers |
Contribute |
ContactUs |
Top of Page
Page best viewed at 1024x768.
Page last updated 2005-06-22.
This site is
PIKT®
powered.
PIKT® is a registered trademark of the University of Chicago.
Copyright © 1998-2005 Robert Osterlund. All rights reserved.
|