PPWIZARD Manual
EXAMPLE - TEST.D (source file)
;----------------------------------------------------------------------------
; MODULE NAME: TEST.D
;
; $Author: Dennis $
; $Revision: 1.0 $
; $Date: 14 Dec 2000 19:45:42 $
; $Logfile: C:/DBAREIS/Projects.PVCS/MultiOs/PPWIZARD/test.d.pvcs $
;
; DESCRIPTION: This example shows the creation of 2 sections. If
; generating HTML (all that currently works!) then 2 files
; will be generated. Currently the "root" output file
; does not get any data, in future it will hopefully be
; a contents page.
;
;----------------------------------------------------------------------------
;--- As I user I only support HTML & IPF ------------------------------------
#if '<$DocType>' <> 'HTML' & '<$DocType>' <> 'IPF'
#error 'The document type "<$DocType>" is unsupported.'
#endif
;--- Include document support -----------------------------------------------
;#define OL_DOC_HTML_8_3_NAMES
#define OL_DOC_HTML_BODY <BODY BACKGROUND="bground.jpg" BGCOLOR="#FFFFFF">
#define OL_DOC_HTML_SEARCH <A HREF="pwsearch.htm">[Search]</A>
#define OL_DOC_HEADINGS_DONT_GENERATE_TITLE ;;All my sections already have a title specified
#include "OL_DOC.DH"
;--- Define the start of the document ---------------------------------------
<$DocumentStart Text="Stupid Example Document">
;--- Lets create some macros ourselves --------------------------------------
#define RedBold <$Red Text=<$Bold Text=Û{$Text}Û>> ;;Uses preexisting macros only
#if ['<$DocType>' = 'HTML']
;--- HTML ------------------------------------------------------------
#define MyGreen <FONT COLOR=GREEN>{$Text}</FONT>
#elseif
;--- IPF -------------------------------------------------------------
#define MyGreen :color fc=darkgreen.{$Text}:color fc=default.
#endif
;############################################################################
<$Heading Text="Introduction"> ;;By default ID = TEXT
<$HeadingDown> ;;Sub headings follow
;############################################################################
<$Index1> ;;Same as 'Text="Introduction"'
<$Title>
<$p>This is a example program which will demonstrate and test some of
the features of "OL_DOC.DH", and for this reason
at times what I show may not make good sense in a "real" docuument
(as I do things the "hard" way etc).
<$p>An example which stesses things a bit<$Colon>
<$Example STATE="REMEMBER">
This is line 1.
This is line 2. Note that '&' will get translated as will ';' (you will not notice this in VIEW.EXE of course)!
This is line 4. FONT => <FONT>Some stuff</FONT>
This is line 5. MACRO => <$FRED>
This is line 5. SMACRO => <?x41>
<$eExample>
<$P>This is an
#if ['<$DocType>' = 'IPF']
IPF
#elseif
HTML (probably)
#endif
manual. The following commands are valid<$Colon>
<$OrdListCompact>
<$LI><$LinkTo Text="Text Attributes ">
<$eOrdListCompact>
<$P>This is the second paragraph, the contents of
"c<$Colon>\config.sys" follows<$Colon>
<$ExampleFile INDENT=0 FILE="C:\CONFIG.SYS">
<$p>This will load "Text Attributes " doco at the "target"
<$LinkTo ID="Text Attributes " Text="XXXX" Target="XXXX">!
;############################################################################
<$Heading Text="Text Attributes "> ;;ID = Text Attributes
;############################################################################
<$Index2>
<$Title> ;;Title matches heading (no need to specify)
<$p>The following shows some different colors used as well as demonstrating
an unnumbered list (with space between each entry)<$Colon>
<$UnNumberedList>
<$LI><$Red Text="This is RED.">
<$LI><$Bold Text="This is BOLD.">
<$LI><$MyGreen TEXT='This is "MyGreen".'>
<$br>This starts on a new line.
<$p>This starts a new paragraph.
<$LI><$RedBold Text="This is RED <$Amp> BOLD (my custom macro).">
<$eUnNumberedList>
<$Target Name="XXXX">
<$p>This is the target "XXXX", you can link to here.
<$p>The following shows a compact unnumbered list<$Colon>
<$UnNumberedListCompact>
<$LI>Item 1
<$LI>Item 2
<$LI>Item 3
<$eUnNumberedListCompact>
<P>There should be a hypertext link here "<$LinkTo ID="Text Attributes " Text="LINK" Target="XXXX">".
<P>There should not be a hypertext link here "<$LinkTo ID="Text Attributes " Text="NOLINK">".
;############################################################################
<$HeadingUp>
<$Heading Text="EXAMPLES">
;############################################################################
<$Index1>
<$Title Text="Example #1 - Not from file">
<$Example STATE="REMEMBER">
This is line 1.
This is line 2. Note that '&' will get translated as will ';' (you will not notice this in VIEW.EXE of course)!
<$eExample>
<$Title Text="Example #1 - NO special Tagging">
<$ExampleFile FILE="C:\AUTOEXEC.BAT">
<$Title Text="Example #2 - Convert 'REM' to '***'">
#AutoTagState +
#AutoTag 'REM' '***'
<$ExampleFile FILE="C:\AUTOEXEC.BAT" State='REMEMBER'>
#AutoTagState -
;--- Define some codes ------------------------------------------------------
#RexxVar "QM" =x= "?"
#RexxVar "DOLLAR" =x= "$"
;############################################################################
<$Heading Text="Table Example">
;############################################################################
<$Index1>
<$Title>
;--- A Table ----------------------------------------------------------------
#define+ OL_DOC_HTML_TABLE CELLSPACING=10 CELLPADDING=10 BORDER=5
#define+ OL_DOC_HTML_TD BGCOLOR=OLIVE
#define+ OL_DOC_HTML_TH BGCOLOR=YELLOW
<$Comment "Output a table">
<$HTML "<CENTER>">
<$Table BORDER WIDTHS='30 40'>
<$TR>
<$TH "Main driver is set to<$Colon>">
<$TH "Set MPU-401 driver to<$Colon>">
<$eTR>
<$TR>
<$TC>Shared<$eTC>
<$TC>Shared<$eTC>
<$eTR>
<$TR>
<$TC>Multiplexed<$eTC>
<$TC>Multiplexed<$eTC>
<$eTR>
<$TR>
<$TC>Exclusive<$eTC>
<$TC>None<$eTC>
<$eTR>
<$eTable>
<$HTML "</CENTER><HR>">
;############################################################################
<$Heading Text="Image Example">
;############################################################################
<$Index1>
<$Title>
;--- Stuff gets generated in out dir ----------------------------------------
#define+ OL_DOC_IMAGE_HTML_LOCAL out\
<$DefineImage ALIAS="LISTBOTJ" IMAGE="LISTBOTJ">
;--- Images 1 ---------------------------------------------------------------
<$Comment "This is a comment">
<$p>Here is an image <$Image "LISTBOTJ">,
hopefully it came out OK! Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah
Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah
Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah.
;############################################################################
<$Heading Text="List Examples (Includes graphic bullets)">
;############################################################################
<$Index1>
<$Title Text="List Examples">
;--- Stuff gets generated in out dir ----------------------------------------
#define+ OL_DOC_IMAGE_HTML_LOCAL out\
;--- Define the "bullet" used in list below ---------------------------------
<$DefineImage ALIAS="BLUEBALL" IMAGE="BLUEBALL">
<$Comment "DB$ was here">
<$OrdListCompact>
<$LI>Item 1
<$LI>Item 2
<$LI>Item 3
<$LI>Item 4
<$UnNumberedList>
<$LI>Item 1
<$LI>Item 2
<$LI>Item 3
<$LI>Item 4
<$ImgListCompact "BLUEBALL">
<$LI>Item 1 gdhs gdhag djhasd hasg dhsa ghjd gsahjdg hsaj
asdhj sajk djah djkahsjdhsa dkjas djhsa jdk sajd sadj k
asdhj sajk djah djkahsjdhsa dkjas djhsa jdk sajd sadj k
asdhj sajk djah djkahsjdhsa dkjas djhsa jdk sajd sadj k
asdhj sajk djah djkahsjdhsa dkjas djhsa jdk sajd sadj k
asdhj sajk djah djkahsjdhsa dkjas djhsa jdk sajd sadj k
<$LI>Item 2
<$LI>Item 3
<$LI>Item 4
<$LI>Item 5
<$eImgListCompact>
<$LI>Item 5
<$eUnNumberedList>
<$LI>Item 5
<$eOrdListCompact>
;############################################################################
#debug on
<$Heading Text="Dennis' Test Section">
;############################################################################
<$Index1>
<$Title>
;--- End of source code -----------------------------------------------------
<$DocumentEnd>
PPWIZARD Manual

Tuesday January 02 2001 at 7:37am