NAME
pp2html - simple slide generator
VERSION
This manual describes version 1.09.
SYNOPSIS
pp2html --help
pp2html [@options_file] [options] slide_text
DESCRIPTION
pp2html
creates a set of HTML files for a foilset based on a simple textfile slide_text. Due to its formatting features and the capability of creating navigation, contents and index pages, pp2html
is also a suitable tool for writing online documentation.
A slide is normally made up by a header and a number of bullet items:
Example of a Slide
* Contains a head line ("Example of a Slide")
* Should have some bullet items
* May have footer and/or header section with company logo and navigation links
The intention of pp2html
is to simply write down your headers and bullet items just like above in an ASCII file and then automatically create a set of HTML files ready for presentation.
The main features of pp2html
are:
Simple ASCII input file for your text
Optional templates for header and footer of the slides (e.g. for company logo, hyperlinks for navigation, copyright note etc.)
Rudimentary formatting capabilities
Creation of a contents page with links to all slides
Creation of an index page with links to all keywords which have been indexed
Optional layout as HTML frameset (header frame, contents frame, footer frame and eventually index frame). The footer frame has always the same position on the screen.
The index frame may use the TreeApplet which provides convenient access to all pages
For more information see: http://www.mcsoftware.com.au/java/TreeControl/treeControl.html
The following documentation describes in detail the syntax of a pp2html input file and all options of pp2html
.
SYNTAX of pp2html Files
The format for the pp2html
input files is called PerlPoint
-Format (perl point format). There are the following main components of an input file for pp2html
:
Comments
Headers
Bullet Items
Numbered Lists
Definition Lists
Paragraphs
Blocks
Verbatim Blocks
Comments
Lines which start with a double slash //
are treated as comments. They are not included in the slides.
Headers
Headers are lines which start with a =
sign. The number of =
signs determines the level of the header:
=This is a level 1 header
==This is a level 2 header
It is necessary to put a blank line after the header. If you use headers of different levels then you get a structured document with chapter numbering e.g.
1 First chapter
1.1 Subsection 1
1.2 Subsection 2
2 Second chapter
The chapter numbers depend on the position of the page and the level of its header.
Bullet Items and Numbered Lists
A bullet item is indicated by an asterisk *
in the first column.
* Item one is very long
and continued on the next line
* Item 2
* Item Three
If you use hash signs #
instead of asterisks, the list will autmatically be a numbered list:
# First
# Second
Note: It is important to put a blank line after each bullet item, otherwise the text on the following line belongs to the same bullet.
Paragraphs
Text which is not indented is treated as a normal paragraph. In HTML terminology this is a <P> ... </P> container.
Blocks
Text which is indented by one ore more blanks will be put in a colored box. The text will be treated as pre formatted. Special formatting tags (see below) are still applied.
The HTML representation is a <TABLE> with colored background and the text itself is put into a <PRE> ... </PRE> container.
Verbatim Blocks
Verbatim Blocks are copied as is into the HTML page. Special formatting tags (see below) are not applied. (Only HTML meta characters are escaped, for example the "<" or ">" sign.) This means that Verbatim Blocks are suitable for code examples: Just cut and paste your piece of code into the pp2html
input file and put the verbatim box markers around:
<< END_OF_BOX
sub verbatim_text
{
for example some piece of code;
}
END_OF_BOX
The block begins with `<<MARK' and ends with the text MARK
on a separate line. This is like a here document
in perl or in a C-shell.
Special Formatting Tags
Some rudimentary formatting is also supported by pp2html
. It is similar syntax as in POD:
\C<this is code>
\B<bold face>
\I<italic>
\E<lt> \E<gt>
\E<uml>
\U<underline>
\SUP<superscript>
\SUB<subscript>
Note that the tags are preceeded by a backslash. This is necessary because the PerlPoint
format knows several tags that are longer than one character. The general form of PerlPoint
tags is
\TAGNAME{param1=value1 param2=value2 ...}<tag body>
The parameter list is optional and enclosed in curly braces.
It is possible to switch the box color from case to case with the following tags:
\BOXCOLOR<yellow>
\BOXTEXT<blue>
Color and text size
There is a special tag
\F{color=value size=value}<text>
which allows to set color and size for a text. This is translated to the HTML <FONT> tag.
Using Hyperlinks
In order to use internal hyperlinks there must be targets for those links. A link target or anchor
is defined by the following tag:
\A{name="target_name"}
An internal link to this target is written in the form:
\PAGEREF{name=target_name}
\SECTIONREF{name=target_name}
The first link is replaced with the page number of the page which contains the target. The second link is replaced with the page header of the corresponding page.
NOTE: Each page automatically gets an anchor with the page header as target name. For this reason it is possible to use SECTIONREF tags with the name=page_title parameter to get inernal links to each page.
External hyperlinks have the form:
\L{url=http://wwwpixel.de}<http//www.pixel.de>
Index and Cross References
A cross reference to an internal target has the form:
\XREF{name=target_name}<text of cross ref>
Index entries are defined by
\X<word>
\X{mode=index_only}<text, special>
The latter form creates an index entry which appears only in the index. The "word" from the the first form appears in the current text and in the index.
Note: The index_only form is useful for example, if you want to have a word from a heading included in the index. The index tag is not allowed inside of a heading.
OPTIONS
- --bgcolor=color
-
Set the background color for all HTML pages
- --bottom_template=filename
- --top_template=filename
- --bottom_idx_template=filename
- --top_idx_template=filename
- --bottom_toc_template=filename
- --top_toc_template=filename
-
Filename for bottom template file (in HTML format) which is appended to each slide. Can be used to create footers with navigation, copyright note etc. The top template is inserted at the top of each slide.
The _idx_ templates are used for the index slide and the _toc_ templates are used for the table of contents slide.
The following keywords are substituted with corresponding values when the templates are included:
TITLE text specified by --title option URL_NEXT hyperlink to next page TXT_NEXT header of next page URL_PREV hyperlink to previous page TXT_PREV header of previous page URL_FIRST hyperlink to first page TXT_FIRST header of first page URL_LAST hyperlink to last page TXT_LAST header of last page URL_UP hyperlink to upper page TXT_UP header of upper page URL_DOWN hyperlink to subsection page TXT_DOWN header of subsection page URL_CONTENTS hyperlink to contents page TXT_CONTENTS text specified by --contents_header URL_INDEX hyperlink to index page TXT_INDEX text specified by --index_header PAGE_CNT number of pages PAGE page or chapter number
- --boxtext_bold=ON
- --boxtext_bold=OFF
-
Text in colored textboxes will be printed bold or normal.
- --box_color=color
- --boxtext_color=color
-
Set background and forground colors for block paragraphs
- --bullet=filename
-
Filename of a GIF or JPEG image which is used for the bullets in bullet lists.
- --block_indent=m
-
Indent each block by m levels (i. e. put m <UL> </UL> containers around the block This can be used to shift the block boxes to the right. Looks better if a block paragraph occurs within a bullet list.
- --center_headers
-
Page Headers are centered. Default is no centering.
- --contents_header=text
-
Heading for contents page. Deafult is Contents
- --frame_set=filename
-
filename for frame set template. This activates the frame set generation.
- --frame_start=filename
-
filename of the startfile for the frame set. The frame_set template is copied to this file in the slide_dir directory.
- --index_bot=n
- --index_dat=n
- --index_top=n
-
Indices of the bottom, top and index frames within the frameset. Used for java script navigation procedure.
- --index_header=text
-
Heading for index page. Default is Index
- --no_index
-
Do not create an index
-
value=1: on, value=0: off. If java_script_navigation is on and frame sets are generated then for each page a separate top and bottom page is created which is used in the top and bottom frames of the frame set. If java_script_navigation is off, then only one top template and one bottom template will be used for all pages. (In this case there should be no place holders for PAGE etc. in theses templates ...)
- --linear_mode
-
This option influences the behaviour of PREV and NEXT links. In linear mode all pages form a linear sequence which can be traversed by means of the PREV and NEXT links. When this option is not set then the PREV and NEXT links work only on the same level. For example is it possible to traverse the sequence 2.1.1, 2.1.2, 2.1.3, 2.1.4 with PREV and NEXT links but the first section has no PREV link and the last one has no NEXT link. In such a constellation the UP and DOWN links may be used to change the level and go the the next higher section or step down to a subsection.
- --num_headers
-
All page headers are preceeded by the chapter number (e.g. 2.2.3) which is determined by the position of the page and the level of its header.
-
Filename for a navigation template file which will be inlcuded at the top and bottom of each slide. This is useful for frame sets which use the TreeApplet because in this case the java script navigation should be disabled because the TreeApplet does not support this kind of URLs. Hence it might be a good idea to include navigation links at the top and bottom of each page.
- --slide_dir=directory
-
Directory in which the HTML files are to be created.
- --slide_prefix=text
-
Prefix for all HTML files. Default is "Slide".
- --slide_suffix=text
-
Suffix for all HTML files. Default is "htm".
- --title=text
-
Text which is substituted for the TITLE keyword in template files.
- --tree_applet
-
Activate usage of TreeApplet
- --tree_app_width=m
- --tree_app_height=m
-
Width and height of the tree applet area.
- --tree_base
-
Codebase option for the tree applet. Default is ./
- --safe_opcodes
-
Specify opcodes for the
Safe
environment (see the Opcodes module documentation). Default is ":default" For the examples use in ppdoc.pp you should use--safe_opcodes=":filesys_open :still_to_be_decided :browse"
- --help
-
Print this manual page
- --version
-
Print version inforamtion and exit
FILES
Template files for header and footer section.
Configuration file $HOME/.pp2html
ENVIRONMENT
NOTES
The PerlPoint format was initially designed by Tom Christiansen. Tom used a simple syntax which was inspired by POD and a simple script which created HTML files from an ASCII file.
SEE ALSO
pp2latex
AUTHOR
Jochen Stenzel (perl@jochen-stenzel.de), Lorenz Domke (lorenz.domke@gmx.de), 2000. All rights reserved.