Should the analysis fail, you can attempt to correct it via the
Contents lists policies.

Adding Headers and Footers to your output

AscToHTM can be made to add HTML headers and footers to each page of HTML
generated. Although there are policies that allow you to specify special header and
footer files, in later versions of the software we recommend the use of
HTML fragments

Using a HTML Fragments file, you can define the reserved fragment names
HTML_HEADER and HTML_FOOTER and these will be copied into the output. You
can even embed HTML fragment tags into these definitions, to allow for
some customisation. Other reserved names allow you to customize the headers
and footers when converting files into a set of frames.

defines a fragment that will add a line at the end of the page and then
a copyright notice and a line of text showing the version number of the
conversion program used, a link to the original text source file (assumed
to be a local link) and the date the conversion was performed.

Customising the HTML by using 'HTML fragments'

From version 4 onwards the program allows you to define "HTML fragments", that is
fragments of HTML that can be used by the software to override the standard HTML
that it produces. This allows you to customise the headers, footers, horizontal rules,
contents list and more.

Splitting large files into a linked set of smaller files

By default AscToHTM creates a single HTML file. However it is possible to get the
software to split large files into smaller files, all linked together. For this to be
possible the program has to first detect headings in the file. Once this is done, you
can choose at what level of heading you want to split the file into pages.

How file splitting works

The program can only split into files at headings it recognises (see
"Detecting Headings"). Before splitting the file you first need to
check that the program is correctly determining where the headings are, and
what type they are.

Headings can be numbered, capitalised or underlined. To tell if the
program is correctly detecting the headings

Look at the HTML to see if <H1>, <H2> etc. tags are being added
to the correct text.

Hopefully this will give you some pointers, but if you still can't get it to
work, please mail a copy of the source file (and any policy file you're
using) to info<at>jafsoft.com and I'll see what I can advise.

Generating a set of Frames

You can use the Conversion Type to select the option of placing your document into a
set of HTML frames. This will consist of a master document containing the
necessary <FRAMESET> tags to define the frames, and then a number of supporting
documents. The main conversion files will be created as before, and will be
displayed in the main frame.

Frames Overview

The program has the ability to generate a set of frames from your source
file. The program works to a model set of frames as shown below, but
you have a great degree of control over how the frames are laid out,
and what their contents are.

The master <FRAMESET> document

Frames are implemented under HTML by having a document that describes
the frame layout by using one or more nested <FRAMESET> tags.
These tags group together <FRAME> tags that identify other HTML files
that describe the contents of the individual frames or panes. The
HTML page containing the <FRAMESET> doesn't normally contain any visible
content. The source of this HTML page looks something like this :-

This example produces a layout similar to that shown in the diagram
in the Frames Overview. There are four frames as follows :-

"header" at the top of the screen with content taken from the
HTML page header.html

"footer" at the bottom of the screen with content taken from the
HTML page footer.html

the two frames "contents" and "main" side by side in the middle
of the screen, between the "header" and "footer" frames. The
"contents" frame is on the left, the "main" frame on the right.
The contents of these frames are held in the html files
"contents.html" and "main.html".

The <NOFRAMES> tag describes the content to be displayed if the browser
doesn't support frames. This is less common now, but is still important
as many search engines don't understand frames, and will only index
the pages linked to in the <NOFRAMES> tag.

In HTML the frame names and source file names can be whatever you like.
AscToHTM uses the frame names "header", "footer", "contents" and
"main", but will vary the source file names according to the name of
your input filename.

Depending on the details of your conversion, not all of the above
frames are generated, in which case the <FRAMESET> tags will look
slightly different.

You don't need to worry about any of this as AscToHTM will determine
what layout is required and will generate the necessary HTML <FRAMESET>
code.

By default if you convert a file called "myfile.txt" the files created
are named as follows:-

myfile_frame.html

- Master <FRAMESET> file

myfile_header_frame.html

- "header" source file.

myfile_contents_frame.html

- "contents" source file.

myfile_footer_frame.html

- "footer" source file.

myfile.html

- "main" source file.

The "main" frame

The "main" frame will contain the conversion of your source file.
If you elect to split a document into many pages, then this will
show the start page (which will have links to any next/previous page).

The "contents" frame

If your document has recognised headings, then the program is
able to generate a contents list (see 5.6.2). In such cases a
"contents" frame is generated and the contents list is
placed in a file called "myfile_contents_frame.html".

If no contents list can be generated, then no contents frame is
created unless you supply a CONTENTS_FRAME HTML fragment to be
used as the contents of the "contents" frame.

The "header" and "footer" frames

The software cannot "detect" headers and footers in your source text,
so you will only get a header or footer frame if you supply the HTML
yourself. Header and footer frames can be useful as they provide you
with the opportunity to supply titles, navigation links or copyright
notices that are always visible.

Prior to version 4 the software already had the ability to add HTML
headers and footers to each page generated using HTML supplied in
separate files identified by policy values. From version 4 onwards
HTML fragments may also be used.

NOTE:

We recommend that, where possible, you use HTML fragments
to define any header and footer HTML

It's expected that you may want to convert the same source into both
frames and non-frames forms, using the same policy file. Given this
the program has the ability to "promote" the HTML headers and footers
used in non-frames production into their own always-visible frames.
Equally there may be times when this behaviour is not wanted.

The relationships between headers and footers used in non-frames
conversion and those used in frames-based conversion are quite complex.
In the following sections we describe how headers (footers) are
calculated. The logic is described for headers, but applies equally
well to footers if you make the necessary name changes.

If the fragment HEADER_FRAME is defined, then that is used as the contents
of a "header" frame.

If the fragment HEADER_FRAME is not defined, and there is no "standard"
header, then no "header" frame is created.

If the fragment HEADER_FRAME is not defined, and the policy is not set,
then no "header" frame is created.

If the fragment HEADER_FRAME is not defined, and the policy is set, then
the "standard" header is used as the contents of the "header" frame.
In other words "standard" header is promoted from the "main" frame into
its own "header" frame.

NOFRAMES tag and NOFRAMES link

There are several reasons why providing a non-frames alternative to your
pages is a good idea. These include

Not all browsers support frames. This is rarer these days, but there
are still people who use text-based or non-visual browsers that can
get confused by frames.

Not all people like frames. This is understating it, as many people
loathe frames. This is because frames pages are hard to bookmark
and the navigation can confuse some people.

Many search engines won't access the HTML pages used inside frames.
This means your pages will go un-indexed, making it hard for people
to find them.

To help with these problems the software supplies a <NOFRAMES> tag
in the main <FRAMESET> document, and a visible "NOFRAMES" hyperlink
in the contents frame.

The "NOFRAMES" hyperlink

The program can place a hyperlink in the contents frame. This link
is labelled "NOFRAMES" and will link to the first main page. This
will allow users who don't like frames to view your pages in a non-frames
window. You can control this link to a limited extent using policies.

The <NOFRAMES> tag

HTML provides a tag whose contents is displayed to any browser
that doesn't support the <FRAMESET> tag. The program will automatically
generate a <NOFRAMES> tag that displays a message saying the page
requires frames, and offering a link to the first main page. This
will allow users with non-frames browsers, and search engines to access
your main pages.

Generating frames and non-frames versions

You should consider whether or not your pages are suitable for both
frames and non-frames viewing. If they are, then you can use the first
page displayed in the main frame as your NOFRAMES hyperlink target. This
is, in fact, the default behaviour.

There are a number of reasons that you might want to maintain two sets
of pages :-

You don't want to have the non-frames version split into as many small
pages as the frames version (different Split level
policy values)

You want to place different headers and footers on the two versions
to allow for different methods of navigation.

If you do want two sets of files, simply convert the file twice with
and without frames generation selected. You can either move the files
into different directories, or change the output filename for one of
the sets. Other than these changes you should be able to use the
same policy file.

If you create two sets of files, make sure you set the NOFRAMES link URL
policy to point to the first non-frames HTML page.

Outputting HTML to the clipboard

You can use the Conversion Type to select the option of placing the generated HTML
onto the Windows clipboard, ready for use in other Windows applications.

In this case the HTML generated will omit the <HTML>, <HEAD> and
<BODY> tags
as these are not suitable when pasting into an existing HTML document.

Using AscToHTM in this way can be a very powerful technique which allows you to
merge converted HTML with more traditionally authored content.

This approach becomes even more powerful if you use a Clipboard extender like
ClipMate to remember and organise everything to the clipboard. You could convert
a few files, and then use Clipmate to recall the pasted HTML at your leisure for
insertion into your other HTML.