PIKT

Samples: HTML Text Appearance Macros

PIKT Logo
Home FAQ News Intro Samples Tutorial Reference Software Authors Licensing SiteSearch


The macros in this selected portion of the sample html_macros.cfg configuration file below are used for HTML formatting of text appearance.

///////////////////////////////////////////////////////////////////////////////
//
// html_macros.cfg -- macros for html formatting
//
///////////////////////////////////////////////////////////////////////////////

...

// text appearance

b(T)                    <b>(T)</b>                // bold

i(T)                    <i>(T)</i>                // italicize

u(T)                    <u>(T)</u>                // underline

q(T)                    "(T)"                     // quote

bi(T)                   =b(=i((T)))               // bold italic

bu(T)                   =b(=u((T)))               // bold underline

bq(T)                   =b(=q((T)))               // bold quote

bui(T)                  =b(=u(=i((T))))           // bold underline italic

big(T)                  <big>(T)</big>            // big (+1 font size)

small(T)                <small>(T)</small>        // small (-1 font size)

em(T)                   <em>(T)</em>              // emphasize

strong(T)               <strong>(T)</strong>      // strong

strike(T)               <strike>(T)</strike>      // strike-through

blink(T)                <blink>(T)</blink>        // flashing

sub(T)                  <sub>(T)</sub>            // subscript

sup(T)                  <sup>(T)</sup>            // superscript

tt(T)                   <tt>(T)</tt>              // teletype text

...

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
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 deserves <b>emphasis</b>, this deserves <b><u>even more emphasis</u></b>,
and this deserves <b><u><i>the greatest emphasis</i></u></b>
we would write this:
this deserves =b(emphasis), this deserves =bu(even more emphasis), and this
deserves =bui(the greatest emphasis)
both of which would result in:

this deserves emphasis, this deserves even more emphasis, and this deserves the greatest emphasis

but doing it the second way with PIKT macros is clearer.

Here is some HTML code from the PIKT home page that uses the text appearance macros:
=fn(PIKT) is used primarily for =b(system monitoring), and secondarily for
=b(configuration management), but its flexibility and extendibility evoke many
other uses limited only by your imagination.
=br
=br
One reviewer said of =fn(PIKT), =q(=b(this is by far one of the most interesting
/powerful tools I have seen for Linux administration).)=nbsp Another wrote that
=fn(PIKT) =q(excels at handling a diverse collection of machines, =b(saves time
and eliminates repetition), and gives you a global view of your site.)
=br
=br
=fn(PIKT) has been compared favorably to commercial software costing hundreds
of thousands of dollars.=nbsp Yet =fn(PIKT) is =i(free)!
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.

Computer Books at Amazon.com

Dynamic HTML: The Definitive Reference
Dynamic HTML: The Definitive Reference

HTML 4 for Dummies
HTML 4 for Dummies

HTML & XHTML: The Complete Reference
HTML & XHTML: The Complete Reference

Linux Apache Web Server Administration
Linux Apache Web Server Administration

PHP Cookbook
PHP Cookbook