Check: HTML validity, CSS validity, links.

PerlPoint PerlPointCD
Start / Lightning Talks / Jochen Stenzel

PerlPoint macros ready to use

PerlPointCD is a PerlPoint application, which means that it generates PerlPoint on the fly and finally transformes it into HTML. For reasons of convenience, the generated PerlPoint defines and uses various PerlPoint macros.

Speaker bios, talk abstracts and other CD sources are preferably written in PerlPoint as well. Due to the fact that they are made parts of the generated PerlPoint they can access the "internal" macros as well. These macros are available:

macrodescriptionexample
\BU\B<\U<...>> shortcut: format bold and underline\BU<text>
\BX\B<\U<...>> shortcut: format bold and index\BX<text>
\BC\B<\U<...>> shortcut: format bold and as code\BC<text>
\CX\B<\U<...>> shortcut: format as code and index\CX<text>
\BCX\B<\U<...>> shortcut: format bold and as code and index\BCX<text>
\IB\B<\U<...>> shortcut: italize and format bold\IB<text>
\IX\B<\U<...>> shortcut: italize and index\IX<text>
\IBX\B<\U<...>> shortcut: format bold italic and index\IBX<text>
\URLmakes the body a link to the target specified by option a\URL{a="htp://search.cpan.org"}<CPAN search>
\URLTmakes the body a link to the target specified by the body text, adds a http:// prefix unless the address already specifies a link type\URLT<www.perlworkshop.de>
\MAILTOmakes the body a mail link to the address specified by the body\MAILTO<perl@jochen-stenzel.de>
\MAILmakes the body a mail link to the address specified by option addr\MAIL{addr="perl@jochen-stenzel.de"}<PPCD author>
\XO"index only": body is made an index entry and hidden\XO<entry>
\XOM"index only, multiply": body is treated as a list of phrases to be made index entries. (Phrases are delimited by (whitespaces and) "|" unless another delimiter string is specified via option d.) At the current position, the body text remains invisible.\XOM<entry, in context | context entry>
\CENTERcenters the body\CENTER<centered>
\CENTER_ONactivates HTML centering (by inserting a <CENTER> tag)\CENTER_ON
\CENTER_OFFdeactivates HTML centering (by inserting a </CENTER> tag)\CENTER_OFF
\INDENTindents the body\INDENT<indented>
\INDENT_ONopens a new indentation level\INDENT_ON
\INDENT_OFFcloses an indentation level\INDENT_OFF
\SMALLformats the body using the HTML tag <SMALL>\SMALL<small text>
\REDred colorization\RED<colored>
\GREENgreen colorization\GREEN<colored>
\BLUEblue colorization\BLUE<colored>
\CPAN_MODULEThe body is treated as the name of a CPAN module. The body text is made a link to the modules page on search.cpan.org (the address is built generically). Additionally, the reference is registered and used when the module index is built.\CPAN_MODULE<PerlPoint::Package>
\DATEinserts the current date and time\DATE
\COPYRIGHTinserts an HTML copyright character\COPYRIGHT

When asking speakers for their files, a list of these standard macros could be passed to let them know which features are available by default.

In case you want to provide even more predeclared macros, write the definitions to a file, store it in the PerlPointCD directories (preferably under prepare) and integrate it by using the makefile macro INITFILE.


  make INITFILE=prepare/macros.pp

Please note that the tool macros (listed above) are read later then this initfile, which means that the initfile cannot redefine or reset them.

For this demonstration, I defined macros for footnotes and convenient cross references. These macros are available with the distribution as well (see prepare/macros.pp).

macrodescriptionoptionsexample
\FNDefines a footnote. The footnote name should be exclusive.n: name (mandatory)\FN{"footnote example"}<An example footnote.>
\FNRA footnote reference. Multiple references to the same note are possible.n: name (mandatory)\FNR{"footnote example"}
\TSA helper macro to start a footnote text paragraph. Usually, if a text paragraph starts with a tag or macro, PerlPoint delays paragraph type recognition till the tag/macro is closed, which means the tag or macro body needs to be found on the same line. For (possibly long) footnotes, this is not convenient. The \TS macro is a workaround: it closes immediately and produces no contents. This means the paragraph type (text) is recognized very quickly, and a subsequent and possibly long tag or macro can be split up upon lines. \TS\FN{"footnote example"}<An example footnote.>
\OREFAn optional reference. A link is produced only if the target exists, otherwise just the macro body shows up. Non existing targets will cause info messages, but no error.n: target name (mandatory)\OREF{n="A possibly existing chapter"}<chapter>