Guava

The Guava Tools

Example - test4.htt


Home  Computer Software  Guava Main Page  Guava Examples 

The following source code should be compiled with:
 
$ htt2html -op t4_ test4.htt

 
/* test4.htt */

/* This is the start of the page template. */

#include "colours.inc"

/* _CONTENTS_ is a special macro that will be inserted into the
   contents page to produce the contents table entries.  The _C_LINK
   macro is defined automatically.  The _C_CONTENTS_ENTRY is defined
   in the header data for each page. */

#define _CONTENTS_ <P>Jump to <A HREF=_C_LINK>_C_CONTENTS_ENTRY</A>

<HTML>

<HEAD>
<TITLE> TITLESTRING </TITLE>
</HEAD>

<BODY BGCOLOR = BG_COLOUR
      TEXT    = TX_COLOUR
      VLINK   = VL_COLOUR
      LINK    = LN_COLOUR >

<HTML>

	/* This line inserts a link back to the contents page, on every
	   page except the contents page itself.  The PAGE macro is
	   defined automatically, and is zero for the index page. */
#if (PAGE != 0)
	<P><A HREF="index.html">Back to the contents page.</A>
#endif
	
	<P>This text will appear above the page text on every page.

	<PAGE>
	
	<P>This text will appear below the page text on every page.

</HTML>

/* This is the end of the page template. */


/* This is the page data for the contents page. */

<HDR>
#define TITLESTRING Contents Page
<DATA>
<P> This is the contents list:
<CONTENTS>

/* This is the start of the page data for the other pages. */

/* Only macros whose names begin with the _C_ prefix are available for
   use in the _CONTENTS_ macro and in cross references. */

<HDR>
#define TITLESTRING Page One Title
#define _C_CONTENTS_ENTRY Page One
<DATA>
<P>This is the text for page one.

<HDR>
#define TITLESTRING Page Two Title
#define _C_CONTENTS_ENTRY Page Two
<DATA>
<P>This is the text for page two.

<HDR>
#define TITLESTRING Page Three Title
#define _C_CONTENTS_ENTRY Page Three
<DATA>
<P>This is the text for page three.

	

 
/* colours.inc */

#define BG_COLOUR "#006600"  /* Dark green */
#define TX_COLOUR "#FFFFFF"  /* White */
#define VL_COLOUR "#999999"  /* Grey  */
#define LN_COLOUR "#FFFFFF"  /* White */
	

 

This output will be produced:
 

index.html
<!-- HTML generated at Wed Dec  1 23:00:52 1999.
hss2html by Steve Morphet 1999. -->
<HTML>
<HEAD>
<TITLE> Contents Page </TITLE>
</HEAD>
<BODY BGCOLOR = "#006600"
      TEXT    = "#FFFFFF"
      VLINK   = "#999999"
      LINK    = "#FFFFFF" >
<HTML>
	<P>This text will appear above the page text on every page.
<P> This is the contents list:
<P>Jump to <A HREF=t4_01.html>Page One</A>
<P>Jump to <A HREF=t4_02.html>Page Two</A>
<P>Jump to <A HREF=t4_03.html>Page Three</A>
	<P>This text will appear below the page text on every page.
</HTML>
	

 

t4_01.html
<!-- HTML generated at Wed Dec  1 23:00:52 1999.
hss2html by Steve Morphet 1999. -->
<HTML>
<HEAD>
<TITLE> Page One Title </TITLE>
</HEAD>
<BODY BGCOLOR = "#006600"
      TEXT    = "#FFFFFF"
      VLINK   = "#999999"
      LINK    = "#FFFFFF" >
<HTML>
	<P><A HREF="index.html">Back to the contents page.</A>
	<P>This text will appear above the page text on every page.
<P>This is the text for page one.
	<P>This text will appear below the page text on every page.
</HTML>
	

 

t4_02.html
<!-- HTML generated at Wed Dec  1 23:00:52 1999.
hss2html by Steve Morphet 1999. -->
<HTML>
<HEAD>
<TITLE> Page Two Title </TITLE>
</HEAD>
<BODY BGCOLOR = "#006600"
      TEXT    = "#FFFFFF"
      VLINK   = "#999999"
      LINK    = "#FFFFFF" >
<HTML>
	<P><A HREF="index.html">Back to the contents page.</A>
	<P>This text will appear above the page text on every page.
<P>This is the text for page two.
	<P>This text will appear below the page text on every page.
</HTML>
	

 

t4_03.html
<!-- HTML generated at Wed Dec  1 23:00:52 1999.
hss2html by Steve Morphet 1999. -->
<HTML>
<HEAD>
<TITLE> Page Three Title </TITLE>
</HEAD>
<BODY BGCOLOR = "#006600"
      TEXT    = "#FFFFFF"
      VLINK   = "#999999"
      LINK    = "#FFFFFF" >
<HTML>
	<P><A HREF="index.html">Back to the contents page.</A>
	<P>This text will appear above the page text on every page.
<P>This is the text for page three.
	<P>This text will appear below the page text on every page.
</HTML>
	



Email: