This Is A Web Page Generated From The Sample HSRC File



Page last updated: 5 December 1998


This page is a sample of how to set up a .hsrc file for producing a .html file via the gen_html.sh script described in the articles. We'll just be playing around with some of the available features here.



Wrappers

These boxed headings are examples of wrapper routines. They can be used to combine features, and provide for easy replication of style elements.

This wrapper looks like this:

head_wrap() {
	begin_table -b 1 -cp 7
	table_data "`begin_font -s +1``bold \"$*\"``end_font`"
	end_table
	do_break
}

And is called with something like:

head_wrap "A Nested List"

A Nested List


A Table with 2 Levels of Nesting

This is the caption of the outer table.
here's some data here's some data here's some data here's some data
here's some data
This an embedded table
embedded data 1 embedded data 2
This an embedded-embedded table
embedded data 1 embedded data 2
embedded data 3
embedded data 4
embedded data 5
here's some data
here's some data here's some data
here's some more data here's some more data here's a
data cell
using the
-br option
here's some more data
here's some more data here's some more data this row is going to end prematurely
here's some more data



Double Quotes

It can be nice to have ``text in double quotes,'' if you know what I mean.


An Anchor

Sometimes we want to have links to other places.


You can create your own wrappers for the routines

This can be useful with long lists, where you want the options and formats to be consistent. You can make the changes in one place.

Orange
  • A round friut
  • Semi-edible rind
Pear
  • A pear-shaped friut
  • Edible rind

If you were going to need this in multiple source files, the way to go would be to put the wrapper routines and any environment variables into a ``style'' file, then use a command like:

./gen_html -s stylefile.sh webpage.hsrc


Send comments to:

Daniel E. Singer
<des@cs.duke.edu>

(That was an ADDRESS block.)




URL: http://www.cs.duke.edu/~des/scripts/sample.html
Copyright © 1999, Daniel E. Singer. All rights reserved.