#$AutoPublisher Table of Contents

General Topics:
Application SynopsisHID_SYNOP
AutoPub DialogHID_AUTO_PUB
Command SetHID_COMMANDS
Getting StartedHID_START
Header InformationHID_HEADER
Log WindowHID_LOG_WIN
Registration FormHID_REGISTER
Reserved Variable NamesHID_RESERVED_NAMES
Sequence of OperationsHID_SEQUENCE
Special Characters/Wild CardsHID_SPECIAL
Uploading To The ServerHID_SERVER

Files:
Rule HID_RULE_FILE
Example Header/Footer TemplatesHID_EXAMPLE_HDRFTR
Example RuleHID_EXAMPLE_RULE
Example TOC TemplateHID_EXAMPLE_TEMPLATE

Rule Editor Tabbed Pages:
Add CommandHID_ADD_CMD
Delete CommandHID_DEL_CMD
Execute SequenceHID_EXECUTE
Extract CommandHID_EXT_CMD
Header InfoHID_BLD_HEADER
Make File CommandHID_MAKE_FILE
Make TOC CommandHID_MAKE_TOC
Replace CommandHID_REP_CMD
Upload InfoHID_UPLOAD_PAGE
Wrap CommandHID_WRP_CMD

Options Pages:
Image FilterHID_IMG_FILTER
Preferences PageHID_PREFERENCES
TOC Defaults PageHID_TOC_INFO

#$K+ Application Synopsis

The AutoPub application was built to provide a productivity tool for html writers who take large existing documents (medical, legal, technical, procedural, etc.), convert them to html, and publish the html version on the world wide web.

In most cases, the html author uses a third party product to convert the original Microsoft Word, WordPerfect, or other word processor document to html format. The author must then polish the output to achieve the desired "touch and feel". If the document is lengthy, it is usually broken up into smaller more manageable files and a Table of Contents (TOC) is created to allow the reader to go immediately to a specific section. This technique alleviates the reader from getting bogged down by lengthy preamble in which they have no interest. AutoPub provides the means to the establish the desired "touch and feel", break the large document into many smaller ones, and generate the TOC much faster than it can be done manually.

What AutoPub Does
AutoPub
reads the rule file you specify containing your defined commands. It then reads the source document into memory and modifies the memory copy of the file based on these pattern commands. You use AutoPub's pattern commands to insert file break point patterns, as a minimum. Typically, you will insert file break point patterns between the major number formatted sections of the big document but that is up to you. For example, you may insert a break point pattern before 1., before 2., before 3. etc., if the document uses as its major number format 1., 2., 3., etc. AutoPub will, for each file break pattern found:
  1. extract the text between the start and end file marker patterns;
  2. create an individual file for that text section;
  3. copy header markups from a header template file to the created file;
  4. copy the extracted text to the file; and
  5. copy footer markups from a footer template file to the created file.
As indicated by items 3 and 5 above, AutoPub sandwiches the extracted section text between header and footer markups when it creates the smaller individual files. You dictate the header and footer markups by creating header and footer template files and directing AutoPub to use them. In the header template file, you define the traditional markups that begin any WWW page, and the markups that customize it to a "touch and feel" style that suits your taste. In the footer template file, you define the markups the customer will need to navigate to the previous or next document section or back to the TOC page. In your footer navigational hyperlink references, you embed the appropriate AutoPub system variables and the correct file names and TOC entry text are substituted for these variables as each file is created. You are not restricted to the style described above. For example, if you choose to put the navigational hyperlinks in the header you are free to do so. Instead of putting the navigational hyperlink references in the footer template you put them in the header template, embed the appropriate AutoPub system variables in the hyperlink references, and AutoPub substitutes the correct file names and TOC entry text for these variables as it copies the header markups to each file created.

If you have directed AutoPub to create a Table of Contents, the WWW reader can scan the resulting TOC page for the document section they wish to view, click on its hyperlink, and go directly to the appropriate information in the small html file. AutoPub will extract TOC entry text between TOC markers you insert in the memory copy of the document to create the Table of Contents page. For this to occur, you must create a TOC template file, direct AutoPub to use it, and define a TOC entry line template within the TOC template file. As AutoPub creates the TOC file, it supplies the appropriate file names and associated TOC entry text for its system variables that you have embedded in your hyperlink references that make up the TOC entry line template. If constructed to do so, the reader could start at the beginning of the document and read it in its entirety by clicking on hyperlinks at the bottom of each web page (document section) to take them to the next or preceding page or back to the Table of Contents.

Does AutoPub do this by you just feeding it the document? Do you write reports, procedures, etc. exactly the same way everyone else in the world does. I'm not trying to be sarcastic but pointing out reality. No application can read your mind to know how you want the finished product to look or interpret the millions of ways documents are formatted. Html authors wouldn't be needed if an application could do that, and the application writer could ask a lot of money for such a product. AutoPub does provide the methodology and the command set to allow you to accomplish this task in a manner that suits your needs and tastes. The command set allows you to modify a memory copy of the original document marking it with unique character patterns that will later be used to extract TOC entry text and allow AutoPub to chop up the memory copy of the document into many smaller files. You dictate the display style and navigation methodology by defining the appropriate markups in the your header, footer, and TOC templates. Using AutoPub, you can publish a manageable document that has the "touch and feel" you dictate in an amazingly short time.

How:
How does AutoPub do this task? Anything accomplished procedurally needs a set of rules to live by. AutoPub is no different. You dictate to AutoPub the rules it will use to break up the big file into smaller files via its character pattern matching command set. You tell AutoPub where to find the source document and what name you want the Table of Contents and individual files to have. You create a header and footer template file that contain the markups that will define the start and end of each created page and tell AutoPub where to find these files. In the header template file, you define the page layout and the "touch and feel" you want every page to have. In the footer template you define the navigational markups and provide any additional information you deem reasonable for each page. You will embed AutoPub's predefined system variables in your markups to generate the navigational hyperlinks. You may create a TOC template markup file that tells AutoPub how to construct the TOC page, and you tell AutoPub where to find this file. You decide how you want to break up the document and using AutoPub's Wrap and Add character pattern matching commands, to encapsulate the text you want in the TOC and to specify the break point markers for files. You will define two unique sets of character pattern definitions, one for TOC text and the other to specify file break points. Since these unique sets of character patterns are at your discretion, you tell AutoPub what they are via the MakeTOC and MakeFile commands. You may also use the command set to delete unwanted text (Delete), replace existing text with new text (Replace), and extract information from the document and assign that information to variables you define (Extract). You can use your variables in any manner you wish in the header, footer, and TOC templates. AutoPub will substitute the extracted text for your variables during WWW file creation when it encounters them while copying the header, footer, and TOC template file markups. You must surround your variables with %% (e.g., if your variable is title it must appear in the referenced files as %%title%%) so AutoPub can distinguish that it is a variable. Additionally, you tell AutoPub in which order you want each command type executed (e.g., all deletes 1
st, all replaces 2nd, all extracts 3rd, all wraps 4th, followed by adds 5th).

Where:
Where is all this information kept? AutoPub uses a rule file to hold the information described above. You can either create this file manually using the text editor of your choice or let AutoPub assist you via its Rule Editor. If you create the rule file manually, your rules must conform to the rule file command syntax. If you use the Rule Editor, your rules are automatically converted to the rule file syntax and are much easier to comprehend. You will create a rule file for each document you convert because no two documents are the same. You can assign the rule file and the header, footer, and template files any name that makes sense to you.

Difficulty:
Doing the first document is the hardest part and may take longer than breaking it up manually because of the learning curve. But after you've done one, you will have header, footer, and TOC template files tailored to your "touch and feel" style that can be copied and altered on the next document you do. You will also have become acquainted with the pattern matching command set that you will use to define the rules to break up the document. To help you get started, an example document and rule files plus header, footer, and TOC template files have been included with the application (see section on Getting Started). It is important to note that the header, footer, and TOC template files reflect the author's style. You may alter these files to suit your own style tastes.

Uploading the Created Files to the WWW Server
If you are a registered customer, you will be allowed to upload the TOC, WWW, and your generated images files at the conclusion of the publishing operation. See Uploading To The Server for details on uploading.

General:
AutoPub
remembers the last directory from which a rule file was selected and will default to the that directory on the next invocation. Additionally, AutoPub will save up to the last 40 path and rule file names and allow you to reuse those file names on subsequent invocations. For those of you who want a constant start position on your desktop, AutoPub remembers its last size and desktop position and will restore itself to that size and position until you change it. If you position it partially or fully off the desktop, it will restore itself fully on the desktop.

Launching Your Editor/Browser:
AutoPub
provides methods for you to launch both your text file editor and your browser with a file you select from its log window. To launch a file, first left click on the display line containing file you want to review. This selects the line (encloses it in the red rectangular box). To launch your text editor with that file, left click again (double click). To launch your browser with that file, right click on the selected line. You define the editor and, if your registered, the browser of your choice in the Options Menu/Preferences Tab.

UNIX vs DOS End-of-Line Formats:
The application automatically supports both the UNIX and DOS end-of-line formats (hard line breaks). The UNIX end-of-line format, however, is displayed by AutoPub and most other Window applications as a solid block since it is NOT interpreted by the edit controls as a hard line break. Additionally, AutoPub provides the
!$ token to allow you to indicate end of the current line in lieu of keying the Enter key. In the Rule Editor, if your pattern ends in a line break, AutoPub will automatically display the !$ when you revisit the command so you are aware that it is the last part of your pattern.

Limitations:
When creating the individual html files, AutoPub will append a number, starting with 000, to the root name defined by WWWFileName: in the &Header section of the rule file. As each successive file is created, the number is incremented by one. This implies that there is a limitation to the number of files (1000) that can be created from a single document without ambiguity.

Acknowledgments
This application was initially suggested by Gary Cronin who is President of Friday Associates of Burlington, Vermont. The author wishes to thank Gary, not only for the suggestion, but for his support while the application was being developed.

#$K+ AutoPub Dialog



The AutoPub starting dialog allows you to build (
Rule Editor), type in, select a previously entered, or browse (Browse) for a rule file. To select a previously entered rule file, select the down arrow button to the right of the Select/Enter Rule File Path and Name: field which will cause a drop down list to appear. Find the appropriate rule file, and select (left mouse click) it. To browse for a rule file, click the Browse button which displays a dialog that lets you search for the file on any drive.

Actions that will result from checking/selecting a box/button are:

Rule Editor:        If you want to build or edit a rule file from within the application, select this button to begin the process. A file dialog is displayed that allows you to navigate to and select an existing file by double clicking the rule file or by selecting the rule file and clicking the Edit Existing button. To create a new rule file, select the dialog's Create New button. In either case, a tabbed dialog is presented that allows you to build/edit the rule file. If you intend to manually create rule files, it is recommended that you first build several rule files using AutoPub and examine the contents of those files (use any text editor) to get a feel for the rule file syntax or review the Command Set. Once you have built/edited the rule file, select the OK button on the tabbed dialog. You get the opportunity to save the rule file under its existing name or as a new file (a handy way to build a new one from an existing rule file).

Match Case:        If you want your rules to be case sensitive check the Match Case control, otherwise, case is ignored.

Start:                Once you have defined a rule file, select the Start button to the begin the publishing operation.
Note:        The
Start button is inactive until you have entered, browsed for, or selected a previous rule file.

#$K+ Command Set

Commands allow you to match character patterns in the html/text document file and, when a match is found, to perform the action dictated by the command. When the word "pattern" is used, you can substitute "character pattern". Internally, AutoPub matches character for character the patterns you define in your commands with those encountered in the memory copy of the source file. When there is a pattern match (all characters match, exclusive of case unless told to match case exactly), that constitutes either the "start of" or the "end of" what is going to get modified. If both "start of" and "end of" patterns are required, AutoPub must find the end pattern after the start pattern is encountered. Required fields are indicated in the Rule Editor by
[R] following the field description.

The following commands make up the command set supported by AutoPub.

Note:         The commands described below are presented in the required rule file syntax. If you use the Rule Editor, you do not need to worry about component delimiters (!, !***!, !…!,etc.), consequently, the commands are much easier to read.

Command Set:

1.
Wrap <...>!***!!ddd!XXX!ddd!CCC!ddd!ccc!ddd!!...!<...> !with start! <...> !end! <...>
2.
Extract <...>!...!<...>!save as!<variable>
3.
Delete <...>!...!<...>::#,A
4.
Add <...>!after!<...>::#,A
5.
Add <...>!before!<...>::#,A
6.
Replace <...>!with!<...>::#,A
7.
MakeTOC <...>!...!<...>
8.
MakeFile <...>!...!<...>

You can define as many of the first 6 commands as you need to cover the tasks that need to be accomplished. The last two commands you may only define a single instance of.


Syntax Definitions:
  •         <...> - a character pattern (e.g., now is the time);
  •         !...! - delimiter between command components and can be generally interpreted as multiple characters exist but don't know/care what they are;
  •         !***! - separator between the prefix and the number format in the wrap command;
  •         <...>!...!<...> - a character pattern having a start character pattern (1st <...>), additional unknown characters following the start pattern (!...!), followed by an end character pattern (2nd <...>);
  •         ::# - instance of number or A - All;

Number Format Definitions:
  •         !XXX! - three digits, !XX! - two digits, !X! - one digit of a number format;
  •         !xxx! - three digits (case ignored since it doesn't apply to numbers);
  •         !CCC! - three upper case alpha characters (A-Z), !CC! - two chars, !C!-one char of a number format
  •         !ccc! - three lower case alpha characters (a-z), !cc! - two chars, !c!-one char of a number format;
  •         !RRR! - three upper case Roman Numerals (IVXL), !RR! - two Numerals, !R!-one Numeral of a number format;
  •         !rrr! - three lower case Roman Numerals (ivxl), !rr! - two Numerals, !r!-one Numeral of a number format; and
  •         !ddd! - three delimiters such as a space, comma, period, colon, semicolon, dash, ), (, ], [, }, and {. Each d within the !ddd! must be a delimiter, !dd! - 2 delimiters, !d! - 1 delimiter used as separators in a number format.

Note:        ALL command definitions MUST start on a new line with NO leading white spaces.

Command Definitions and Examples:
1. Wrap
Wrap means to encapsulate number formatted patterns with new character patterns that mark the beginning and ending of existing text for creation of new TOC entries and files. What is a number format? Typically, formal documents have a numbering scheme that allow forward and reverse referencing, TOC generation, and provide a logical structure to the document (i.e., Sections and Paragraphs within Sections). This numbering scheme (e.g., 1., 1.1, 1.1.1, I, II, III, A., A.a, 1.A.a.) is the number format. You use Wrap to encapsulate the areas of the document that you want included in the Table of Contents and broken into files with unique patterns you define (see examples below). You define the same unique patterns in the MakeTOC and MakeFile commands allowing AutoPub to find the text in the document you want included in the TOC and broken into files. If you direct AutoPub to create a TOC, there must be a one to one relationship between the TOC entries defined and the number of files created.

Note:        The main purpose for the Wrap command is to modify the document allowing you to insert character patterns identifying TOC and file information, however, you can also use the Wrap command to encapsulate any repeating patterns with new markups. To do that, you simply don't define a numbered format only the prefix which becomes "start of".

Rule File Syntax:
Wrap <...>!***!!ddd!XXX!ddd!CCC!ddd!ccc!ddd!!...!<...> !with start! <...> !end! <...>

Reading the command from left to right, each component has the following meaning:
<...>        Prefix for the format (e.g., Part, Section, Article, etc.);
!***!         Delimiter between prefix and the numbering format;
!ddd!XXX!ddd!CCC!ddd!ccc!ddd!        Number format (e.g., (1.A.a.));
!...!        Through indicator;
<...>        Ending pattern of the number formatted text to be wrapped (this could be a !$ indicating a hard line break or a character pattern that is unique to all the number format patterns you want wrapped and is a required field);
!with start!        Indicator signaling beginning pattern to be inserted before the number format;
<...>        The new beginning pattern (required field);
!end!        Indicator signaling ending pattern to be inserted following the unique ending of the number format pattern; and
<...>        The new ending pattern (required field).

Note:        You may define either a prefix, a number format, or both but at least one of the two is required. All other fields in the command are required.

[ -Example 1- ]
This example will illustrate encapsulating sections of a document having a repeating number format that has a prefix (the prefix is Section) in front of a number (e.g., Section 123) and the number is followed by a period. The repeating sections might be, for example, Section 250., followed by Section 251., followed by Section 252. etc.

Wrap Section!***!XXX!.!!...!
!$!with start!<!-- EndFile -->!$<!-- StartFile -->!$<!--StartTOCLine-->!$<H3>!end!</H3><!--EndTOCLine -->

{
!$ means hard line break - a carriage return-new line or new line if UNIX}

If a section of the text in the original html source document were:

Section 261. STATE BOARD OF LICENSING AND EXAMINATION
        o
        o
        o
Section 262. COMPENSATION OF MEMBERS
        o
        o
        o

execution of the wrap would result in the number formatted lines being modified to:

<!-- EndFile -->
<!-- StartFile -->
<!-- StartTOCLine -->
<H3>Section 261. STATE BOARD OF LICENSING AND EXAMINATION</H3><!-- EndTOCLine -->
        o
        o
        o
        o
<!-- EndFile -->
<!-- StartFile -->
<!-- StartTOCLine -->
<H3>Section 262. COMPENSATION OF MEMBERS</H3><!-- EndTOCLine -->
        o
        o

Note:        This is the pattern I typically use to signal AutoPub to put the line in the TOC file and put all information in this section up to the next section (e.g., Section 261 up to Section 262.) in its own file. How come "up to the next section"? Remember that Wrap encapsulates every number format having the pattern Section XXX. with my pattern. If Section 261. is the first number formatted section in the document, all text starting with Section 261. up to Section 262. will be marked for extraction, likewise, the text starting at Section 262. is extracted up to Section 263. etc. Why, because the start file marker <!---Start File ---> comes before Section 261., and the end file marker comes just before Section 262. which signals the end of Section 261. Note, also, that my pattern starts with <!--- EndFile --->. Remember that the rules state that the end pattern must come after the start pattern to constitute a match. There will be no <!---Start File ---> (beginning file pattern) prior to Section 261. (unless I add it via another Wrap or Add command), therefore, the first <!--- EndFile ---> is ignored by AutoPub. I will have to add (via the Add command discussed below) a final <!--- EndFile ---> at the end of the document to encapsulate the last section's text.

[ -Example 2- ]
This example will illustrate encapsulating sections of a document having a repeating number format that has a prefix (the prefix is Part) in front of a single digit number format followed by a period (e.g., Part 3.).

Wrap <CENTER>Part !***!X!.!!...!</CENTER>!with start!<!-- EndFile -->!$<!-- StartFile -->!$<!-- StartTOCLine -->!$<H3>!end! </H3><!-- EndTOCLine -->


If a section of text in the original html source document were:

<CENTER>PART 1. GENERAL INFORMATION</center>
        o
        o
        o
<CENTER>PART 2. ACTIONS IN CASE OF EMERGENCY</center>
        o
        o
        o

execution of the wrap would result in the number formatted lines in that section being modified to:

<!-- EndFile -->
<!-- StartFile -->
<!-- StartTOCLine -->
<H3><CENTER>PART 1. GENERAL INFORMATION</center></H3><!--EndTOCLine -->
        o
        o
        o
<!-- EndFile -->
<!-- StartFile -->
<!-- StartTOCLine -->
<H3><<CENTER>PART 2. ACTIONS IN CASE OF EMERGENCY</center></H3><!--EndTOCLine -->
        o
        o
        o

[ -Example 3- ]
This example will illustrate encapsulating sections of a document having a repeating number format that does not have a prefix in front of the number format. The number format is a single digit delimited by a period and another single digit (e.g., 3.2).

Wrap X!.!X!...!!$!with start!<H3>!end!</H3>

If the original text in the html source document were:

1.1 THE BOARD'S PURPOSE

execution of the wrap would result in that line being modified to:

<H3>1.1 THE BOARD'S PURPOSE</H3>

[ -Example 4- ]
This example will illustrate encapsulating sections of a document having a repeating number format that does not have a prefix in front of the number but does have a leading parenthesis delimiter, followed by a single digit, a period delimiter, another digit, and finally a closing parenthesis ( e.g., (3.2) ).

Wrap !(!X!.!X!)!!...!!$!with start!<H3>!end!</H3>


If the original text in the html source document were:

(1.1) THE BOARD'S PURPOSE

execution of the wrap would result in that line being modified to:

<H3>(1.1) THE BOARD'S PURPOSE</H3>

Note:         In the source html/text file there must be at least one white space character between the last number/character/roman numeral/delimiter of each number format wrapped and any succeeding text.

2. Extract
Extract
means to extract text between a unique starting and ending character pattern from the document and assign that extracted text to a variable that you name. That variable can be used in the header, footer, and TOC template files. When AutoPub encounters your variable (surrounded by %%'s) in any of these files, the extracted text will substituted in lieu of the variable. You might, for instance, want to extract the title of the original document and use it as descriptor information on each of the created pages (files).

Rule File Syntax:
Extract <...>!...!<...>!save as!<variable>

Reading the command from left to right, each component has the following meaning:
<...>        Unique "start of" the pattern you want extracted (e.g., <TITLE>) (required field);
!...!        through indicator;
<...>        Unique "end of" the pattern you want extracted (e.g., </TITLE>) (required field);
!save as!        Variable indicator; and
<variable>        Variable name (e.g., title).

[ -Example - ]
This example will illustrate extracting text from the document and saving it as a variable (P1Info).

Extract <P>!$Section 261!...!REGULATIONS, LICENSE!$<P>!save as!P1Info


If text in the original html source document included the following:
<P>
Section 261. STATE BOARD OF LICENSING AND EXAMINATION<BR>
Section 262. COMPENSATION OF MEMBERS; CLERICAL ASSISTANCE AND
INSPECTION<BR>
Section 263. RULES AND REGULATIONS OF BOARD<BR>
Section 264. SCHOOLS; REGULATIONS, LICENSE
<P>

it would all be extracted and saved as variable P1Info. That extracted information will be inserted everywhere %%P1Info%% is encountered in the header, the footer, and TOC template files.

The following variable names are automatically created by the AutoPub and MAY NOT be used as variable names in an Extract command.

Reserved Variable Names:
%%SYSDATE%%
%%SYSTIME%%
%%TOCLine%%
%%TOCFile%%
%%ThisTOCFile%%
%%ThisTOCInfo%%
%%NextTOCFile%%
%%NextTOCInfo%%
%%PrevTOCFile%%
%%PrevTOCInfo%%

See section Reserved Variable Names for a discussion of each.

3. Delete
Delete
allows you to get rid of character patterns you don't want retained in the created files. You need only delete unwanted information if it is within the encapsulated areas of the document ( between the start and end of file markers). Text outside the encapsulated areas is ignored, therefore, need not be deleted.

Rule File Syntax:
Delete <...>!...!<...>::#,A

Reading the command from left to right, each sequence has the following meaning:
<...>        Unique "start of" pattern or the entire pattern you want deleted (required field).
!...!        through indicator
<...>        Unique "end of" pattern you want deleted (optional field)
::#,A        instance number or if you want all instances deleted use A (if not defined, the 1st instance is assumed).

[ -Example - ]
This example will illustrate deleting text from the document.

Delete <P>!$Section 263!...!REGULATIONS, LICENSE!$<P>::1

<P>
Section 261. STATE BOARD OF LICENSING AND EXAMINATION<BR>
Section 262. COMPENSATION OF MEMBERS; CLERICAL ASSISTANCE AND
INSPECTION<BR>
Section 263. RULES AND REGULATIONS OF BOARD<BR>
Section 264. SCHOOLS; REGULATIONS, LICENSE
<P>

If the information above were in the html/text document, the first instance of

Section 263. RULES AND REGULATIONS OF BOARD<BR>
Section 264. SCHOOLS; REGULATIONS, LICENSE
<P>

would be deleted from the memory copy of the file. If you wanted all instances deleted you would use ::A following the last <P>. If you wanted the 3rd instance of it deleted you would have used ::3. If you wanted the 1st and 3rd instances deleted you would do the following:

Delete <P>!$Section 263!...! REGULATIONS, LICENSE!$<P>::1
Delete <P>!$Section 263!...! REGULATIONS, LICENSE!$<P>::3


4. Add
Add
allows you to insert text any place within the memory copy of the html/text document file. You can add before or after an existing character pattern. Add can be used to augment the wrap command or to insert new markups.

Rule File Syntax:
Add <...>!before! or !after!<...>::#,A

Reading the command from left to right, each component has the following meaning:
<...>        The entire character pattern you want added (required field).
!before! or !after!        use only one indicator either !before! or !after!
<...>        The existing character pattern defining where you want the first pattern added,either before or after. (required field).
::#,A        instance number of the existing character pattern or if you want all instances of the first pattern inserted before/after the existing pattern use A (if not defined, the 1st instance is assumed).

[ -Example 1 - ]
Add <!-- StartFile -->!$!before!<CENTER>BOARD OF LICENSING::1

[ -Example 2 - ]

Add <!-- EndFile -->!$!after!</BODY>::1

Example 1 would add <!-- StartFile --> just before the first instance of <CENTER> BOARD OF LICENSING . Example 2 would add <!-- EndFile --> just after the first instance of FEES!$<P>. If you used the first Wrap example above to mark the beginning and ending of the files you wanted created, you would need to add one <!-- EndFile --> at the very end of the document to capture the information in last section which is what is illustrated in Example 2.

5. Replace
Replace
allows you to replace one character pattern with another.

Rule File Syntax:
Replace <...>!with!<...>::#,A

Reading the command from left to right, each component has the following meaning:
<...>        The entire new character pattern that will replace (required field)
!with!        indicator
<...>        the existing character pattern. (required field).
::#,A        instance number of the existing character pattern or if you want all instances of the existing pattern to be replaced by the first pattern use A (if not defined, the 1st instance is assumed).

[ -Example - ]
Replace <FONT SIZE=4 FACE="ARIAL">!with!<FONT SIZE=6 FACE="COURIER">::A

Replace is self explanatory.

Note:        Replace is disabled for non-registered customers.

6. MakeTOC
MakeTOC
defines to AutoPub the unique character patterns that you used in the Wrap and Add commands to encapsulate text in the modified memory copy of the document file that are to be extracted and used as Table of Contents entries. If you have defined a template file, these TOC entries are substituted for the variable %%TOCLine%% (discussed in Header Information). TOC entry information is copied to the TOC file in the order it is extracted from the modified memory copy of the document.

Rule File Syntax:

MakeTOC <...>!...!<...>

Reading the command from left to right, each sequence has the following meaning:
<...>        The entire pattern that defines the start of a TOC line (required field)
!…!        through indicator
<...>        The entire pattern that defines the end of a TOC line. (required field).

[ -Example - ]
MakeTOC <!--AddToTOC-->!...!<!--EndTOCLine -->

7. MakeFile
MakeFile defines to AutoPub the unique character patterns that you used in the Wrap and Add commands to encapsulate text in the modified memory copy of the document file that are to be extracted and made into individual WWW files. The information you mark in this way is sandwiched between header and footer markups (only if you have defined templates for them) that probably contain variables (possibly your own and system variables). If you have not defined a header or footer template file, the extracted information is simply copied as extracted to the newly created file.

Rule File Syntax:
MakeFile <...>!...!<...>

Reading the command from left to right, each sequence has the following meaning:
<...>        The entire pattern that defines the start of text that will be placed in its own file (required field)
!…!        through indicator
<...>        The entire pattern that defines the end of text that will be placed in its own file. (required field).

[ -Example - ]
MakeFile <!-- StartFile -->!...!<!-- EndFile -->

#$K+ Getting Started

Example Document
To help you get started, an example document, header, footer, and TOC template files have been included in the zip file you downloaded. The example document is this help file converted to html. You can run AutoPub and see what results. To run this example file, copy the files:
  •         AutoPub.html;
  •         AutoPub.rul;
  •         header.hdr;
  •         footer.ftr; and
  •         template.html
included in the zip file to a test directory (e.g.; D:\TestDir). Additionally copy all the files having extensions jpg and gif to a subdirectory under your test directory named images (e.g.; D:\TestDir\images).

Run AutoPub and when the starting dialog is visible, select the
Rule Editor button. You will get a browse dialog that allows you to navigate your hard drive. Navigate to your test directory and select AutoPub.rul. Select (left mouse click) the Header Info tab. In each of the fields on that page, change the file paths to your test directory path (e.g.; D:\TestDir). Select the OK button at the bottom of the Rule Editor page and save the modified rule file under its original name. After you have saved it, you will be returned to the starting dialog. In that dialog, select the Start button.

AutoPub
will execute the commands in the rule file, create a TOC file, and create separate files for each section of this help document. The results are displayed in the log window. Fire up your web browser and open the TOC file on your hard drive. Click on any hyperlinked TOC entry and your browser will display the information associated with that TOC line. Look at the source document file and the intermediate file created by AutoPub in your text editor at the same time you are studying the results. Run AutoPub again, use the Rule Editor to re-open the rule file. Look at the rule file in your text editor as you tab among the commands. You will see a one for one relationship between the information in the rule editor dialog pages and the information in the rule file. They will look considerably different in your text editor than they will in the Rule Editor. The differences are the delimiter patterns between your command's character patterns. Studying the various files and using this help file will help you get started on your own documents.

Doing Your Own Documents
You should probably create a directory that is dedicated to the document and WWW files you are going to create. You may make copies of the example header, footer, and TOC template files in that directory and modify them to suit your "touch and feel" tastes. Then do the following:
  1. Run AutoPub and when the starting dialog is visible, select the Rule Editor button. You will get a browse dialog that allows you to navigate your hard drive. On that dialog select the Create New button.
  2. The Rule Editor's Header Info page will be displayed with all its fields empty.
    • With the cursor in the HTML Source Document field, select the Browse button;
    • Navigate to your documents directory and double click on your document file;
    • Put the cursor in Intermediate File field and select the Browse button;
    • Double click on your document file again which will load the Intermediate File field;
    • Modify the document name to a name of your choice giving yourself a clue that it is the intermediate results output file;
    • Put the cursor in TOC File Name field and select the Browse button;
    • Double click on your document file again which will load the TOC File Name field;
    • Modify the document name to a suitable name for your Table of Contents file (e.g., index.html);
    • Put the cursor in TOC File Template field and select the Browse button;
    • Double click on the template.html file you copied to your document's directory;
    • Put the cursor in WWW File Names field and select the Browse button;
    • Double click on your document file again which will load the WWW File Names field;
    • Modify the document name to the name you want the WWW files to have;
    • Put the cursor in Header File field and select the Browse button;
    • Double click on the header.hdr template file you copied to your document's directory;
    • Put the cursor in Footer File field and select the Browse button; and
    • Double click on the footer.ftr template file you copied to your document's directory.
  3. Select the Make TOC Command Tab and define a starting and ending pattern for your TOC entries. I like to use <!--- Start Index ---> and <!--- End Index ---> as my patterns but you can make them whatever suits you.
  4. Select the Make File Command Tab and define a starting and ending pattern to mark the beginning of the text to be placed in a new file and the ending of that text. I like to use <!--- Start File --->and <!--- End File ---> as my patterns but you can make them whatever suits you.
  5. Select the Wrap Command Tab.
    • If your document has a prefix in front of the number formats that you intend to break into files, enter that prefix in the Number Prefix field (e.g., Section, Article, Part);
    • Put the cursor in the Number Format Including Delimiters: field
    • Enter the number format that describes the numbering pattern you want broken into files (e.g., X., X.X, XXX., C., [R]);
    • Alternately, select the Formats button to the right of that field and select a number format from the displayed dialog;
    • Select the Launch button at the bottom of the page, you editor will pop up with your document displayed;
    • If all your number formats end in a fixed pattern (e.g., <BR>, </CENTER>), highlight that pattern and press the Ctrl-C keys which copies the highlighted text to the clipboard;
    • Put the cursor in the End of Number Format Pattern: field and press the Ctrl-V keys to paste that pattern (e.g., <BR>, </CENTER>) into that field;
    • If there is no consistent pattern that terminates the number formatted lines, type !$ in the End of Paragraph Pattern: field and the ending pattern will be where the first hard line break occurs in each of the lines;
    • Move the cursor to the Insert This Prior to Number Format: field;
    • If you used my patterns, type:
              <!--- End File --->
      Ctrl-Enter
              <!--- Start File --->
      Ctrl-Enter
              <!--- Start Index --->
      Ctrl-Enter
    • Move the cursor to the Add This After Number Format Pattern: field; and
    • Again if you used my patterns, type:
              <!--- End Index --->.
  6. Select the Add Command Tab.
    • Go to the end of your document file in your text editor and verify that the </BODY> command ends the html document;
    • Put the cursor in the Add this New text: field
    • If you used my patterns, type:
              <!--- End File --->
    • Select the Before radio button; and
    • Put the cursor in the Document's Text: field; and
    • Type:
              </BODY>.
  7. Define any of the other pattern commands that are suitable.
  8. Select the Execute Order Tab and rearrange the commands in the order you want them executed.
  9. Select the OK button at the bottom of what ever page you are on when you have finished defining commands.
  10. Save the rule file under the file name of your choice.
  11. You will be returned to the start dialog, select the Start button and let AutoPub rip.

If you get unexpected results, examine the intermediate file to see how AutoPub modified your document.

For Novice Pattern Matchers
If you are unsure how to pattern match, you can manually add the TOC and file markers to your document. You still need to do Items 1 through 4 and items 8 through 10 before you start. If you use my patterns, put the marker pattern:
<!--- End File --->
<!--- Start File --->
<!--- Start Index --->
just prior to each item you want in you TOC file. Find the place where you want the TOC entry to end and insert the <!--- End Index ---> marker pattern. Repeat this procedure until you have manually broken the document into as many files as you wish. Insert the <!--- End File ---> marker at the end of document but prior to </BODY>. Fire up AutoPub, select your rule file and let AutoPub rip.

#$K+ Header Information

There are many pieces of information about file names and their locations that AutoPub must know and others that are optional. You supply AutoPub with this file related information in the Header Info tab if you are using the Rule Editor or, if you are manually editing the rule file, by defining it in the &Header: section (see Example Rule File).

Name and Location of the Document to be Converted
You must tell AutoPub where the original document to be converted is located and what its name is. For example, suppose the original document is named TheDoc.html and its located in directory TestDir off the root of the d drive.

Manually Editing Rule File
Add the following line in the &Header: section:
Document: d:\TestDir\TheDoc.html

Using the Rule File Editor
In the HTML Source Document field type in:
d:\TestDir\TheDoc.html
or with the cursor in the source document field, select the
Browse button and navigate your hard drive to the TestDir directory and double click on TheDoc.html.

This is REQUIRED information.

Name and Location of the Intermediate File
AutoPub
reads the document to be converted into memory and then modifies that memory copy by executing the commands you define. After all commands have been executed, AutoPub will begin the creation of the appropriate files. If you want the modified memory file copied to your hard drive before its broken up, you need to define the location where you want it stored and tell AutoPub what name to give it. This is very useful as a debugging aid if you are getting unexpected results. You can open the intermediate file with the editor of your choice and see how your commands have modified the memory copy of the source file.

Manually Editing Rule File
Add the following line in the &Header: section:
IntermediateFile: d:\ TestDir\TheDoc.int

Using the Rule File Editor
In the Intermediate File field type in:
d:\ TestDir\TheDoc.int
or with the cursor in the Intermediate File field, select the
Browse button and navigate your hard drive to the TestDir directory and double click on TheDoc.html then change .html to .int.

Note:        The name you assign to the intermediate file is purely at your discretion. The file extension .int in this example was arbitrarily selected.

This is OPTIONAL information.

Name and Location of the TOC File
If you want AutoPub to create a TOC file, you need to define the location where you want it stored and tell AutoPub what name to give it.

If this information is not defined, no Table of Contents file is created.

If a TOC file is defined but no TOC template, then AutoPub simply lists the extracted TOC text in the order it was extracted without adding any markups to the TOC file.

If a TOC template is defined, AutoPub copies all markup information from the template file to the TOC file up to the line were it finds the keyword %%TOCLine%%. While AutoPub is copying the beginning markup text, it substitutes extracted text for variables (both yours and system). For example, if you define an Extract command and assign the text extracted to the variable title, then AutoPub will substitute the text it extracted in the TOC file every where it sees %%title%% in the template. When AutoPub finds the line containing the keyword %%TOCLine%% (see TOC Template Example), it stops copying the page starting markup information and begins creating the TOC entry lines. AutoPub will use the entire line containing %%TOCLine%% as a guide for the creation of these TOC entries including all markups. After AutoPub has created and copied all the TOC entry text to the TOC file, it will copy the remaining template markup information. Again, extracted information is substituted for any variables encountered while it copies the remaining markups.

What constitutes a Table of Contents line? You must wrap (using the Wrap and/or Add commands) the TOC text in the memory copy of the source file that you want extracted with a unique starting and ending character pattern. For example, the starting and ending character patterns might be defined as <!--- StartTOCLine ---> and <!--- EndTOCLine--->. In this example, the pattern <!--- StartTOCLine ---> is defined to identify the start of the text to be extracted as a TOC entry and the pattern <!--- EndTOCLine ---> to indicate the end of the entry text. Each time AutoPub encounters these patterns, the text between them is extracted and will become a TOC entry. There may be up to 1000 TOC entry lines before ambiguity begins.

Manually Editing Rule File
Add the following line in the &Header: section:
TOCName: d:\ TestDir\TheDocTOC.html

Using the Rule File Editor
In the TOC File Name field type in:
d:\ TestDir\TheDocTOC.html
or with the cursor in the TOC File File field, select the
Browse button and navigate your hard drive to the TestDir directory and double click on TheDoc.html then change .html to TOC.html.

This information is optional.

Name and Location of the TOC Template File
If you want AutoPub to create a TOC file using a template file, you need to define the location and the name of the template file.

How does AutoPub use the template file? First, AutoPub copies markup information from the template file "as is" to the TOC file. If it encounters a variable (%%variablename%%) as it copies the information, the variable's extracted text is substituted in the TOC file at the point where the variable was encountered in the template. Copying continues until a line containing the keyword %%TOCLine%% is encountered which begins the second phase. When AutoPub finds this keyword, it is a signal to stop copying the template information and to generate the TOC entries. This line should contain your touch and feel markups and two of AutoPub's system variables, %%ThisTOCFile%% and %%TOCLine%%, as a minimum. This line, including all its markups, is used as a rubber stamp to generate every TOC entry. As each entry is being generated, the correct file name is substituted for %%ThisTOCFile%% and its associated TOC text for %%TOCLine%% in hyperlink reference. Here is an example of a line containing these system defined variables:

<LI><A HREF="./%%ThisTOCFile%%">%%TOCLine%%</A>

Once the TOC entries have been created, the third creation step occurs. AutoPub will copy the rest of the template file's markups to the TOC file, again substituting extracted text for any variable encountered.

If you do not define a line having the keyword %%TOCLine%% in it, AutoPub will copy all the information in the template file to the TOC file, substituting extracted text for any variables encountered. AutoPub will then append the extracted TOC text, to the end of the TOC file (no markups unless they were part of what was extracted).

Manually Editing Rule File
Add the following line in the &Header: section:
TOCTemplate: d:\ TestDir\YourTemplate.file

Using the Rule File Editor
In the TOC File Template field type in:
d:\ TestDir\YourTemplate.file
or with the cursor in the TOC File Template field, select the
Browse button and navigate your hard drive to the TestDir directory and double click on your template file. You can name your template file anything you wish.

This information is optional.

Name and Location of the WWW Files to be Created
You must define for AutoPub, where the WWW files it will create should be placed and the file name to use while creating them. AutoPub will break your defined file name at the extension, append, starting with 000, three digits to the end of the root file name, and then add back the extension (should be either .htm or .html). It will increment the three digit number by one each time a new file is created. As an example, if you defined the WWW file name to be doc.html and AutoPub creates 21 files, they will be named doc000.html through doc020.html.

What triggers the creation of individual WWW files? You must mark the regions of text in the memory copy of the source file that you want extracted and placed in a WWW file. You do that by inserting unique starting and ending character patterns using the Wrap and/or Add commands. For example, these starting and ending character patterns might be defined as <!--- Start File ---> and <!--- End File --->. In this example, the pattern <!--- Start File ---> is defined to identify the start of the text region to be extracted and the pattern <!--- End File ---> to indicate the end of the region. Each time AutoPub encounters these patterns, the text between them is extracted, a new WWW file is created, and the extracted text placed in that file. There may be up to 1000 WWW files created before ambiguity begins.

Manually Editing Rule File
Add the following line in the &Header: section:
WWWFileName: d:\TestDir\doc.html

Using the Rule File Editor
In the WWW File Names field type in:
d:\TestDir\doc.html
or with the cursor in the WWW File Names field, select the
Browse button and navigate your hard drive to the TestDir directory and double click on TheDoc.html then replace TheDoc with doc.

This is REQUIRED information.

Name and Location of the Header Template File
If you want AutoPub to put touch and feel markup text in the WWW file prior to the information it extracts from the document, you need to create a header template file with these markups (see Example Header/Footer Templates). You must define for AutoPub the name and location of this header file. You do that as follows.

Manually Editing Rule File
Add the following line in the &Header: section:
HeaderName: d:\ TestDir\header.hdr

Using the Rule File Editor
In the Header File field type in:
d:\ TestDir\header.hdr
or with the cursor in the Header File field, select the
Browse button and navigate your hard drive to the TestDir directory and double click on header.hdr if that is your header template file name. The extension hdr is recognized as the default file extension for header files but you are not restricted to that extension.

A copy of the markup information from this header template file is copied to each newly created WWW file prior to inserting the extracted text. AutoPub will substitute extracted variable information for any variable encountered in the header file as it copies it. Once AutoPub has copied the header markup information to the file, it will copy the extracted file information.

This information is optional.

Name and Location of the Footer Template File
If you want AutoPub to put navigational markup text following the information extracted from the document, you need to create a footer template file with these markups (see Example Header/Footer Template). You must define for AutoPub the name and location of this footer file. You do that as follows.

Manually Editing Rule File
Add the following line in the &Header: section:
FooterName: d:\ TestDir\footer.ftr

Using the Rule File Editor
In the Footer File field type in:
d:\ TestDir\footer.ftr
or with the cursor in the Footer File field, select the
Browse button and navigate your hard drive to the TestDir directory and double click on footer.ftr if that is your footer file name. The extension ftr is recognized as the default file extension for footer template files but you are not restricted to that extension.

The WWW reader should be able to start at the front of the document and read a section at a time without having to go back to the TOC. They should also be given the option of going back to the TOC if they choose to from any section they may be in. AutoPub was created with this concept in mind. A footer markup could easily have been automatically inserted but you would not have had the option to customize it to your needs. This problem is readily solved if you provide the custom markups and AutoPub provides file and TOC information for the previous and next document sections while the current one is being created. AutoPub does just that through its system variables.

AutoPub
provides system defined variables expressly for navigational and TOC construction purposes. If you construct each WWW file in the manner described above, you will predominately use the following system variables in the footer file.
  •         %%TOCFile%% in a hyperlink markup to return to the TOC;
  •         %%NextTOCFile%% in a hyperlink markup to go to the next section;
  •         %%NextTOCInfo%% to provide a description of the hyperlink;
  •         %%PrevTOCFile%% in a hyperlink markup to go to the previous section; and
  •         %%PrevTOCInfo%% to provide a description of the hyperlink.
See the Example Header/Footer Template section for an example of how the author uses the above variables in the footer file for navigational purposes. Note in that example that the variables %%SYSDATE%% and %%SYSTIME%% are also used.

This line is optional.

Execution Sequence of the Command Set
Because of the infinite manner it which documents may be formatted and the styles of no two authors is the same, AutoPub allows you to dictate the order it which its commands are executed to give you maximum flexibility when modifying a document for publication. If you want to change the default order in which commands are executed you may do so but only by command type. By default commands are executed in the following order:
  •         Replace
  •         Delete
  •         Extract
  •         Wrap
  •         Add
to change this sequence you must do one of the following.

Manually Editing Rule File
Add the following line in the &Header: section:
ExecuteSequence: 4 3 2 5 1
The five commands are ordered alphabetically:

  •         1 = Add;
  •         2 = Delete;
  •         3 = Extract;
  •         4 = Replace; and
  •         5 = Wrap.

Consequently, the execution sequence defined above would result in the following:

  •         Replace is executed 1st;
  •         Extract is executed 2nd;
  •         Delete is executed 3rd;
  •         Wrap is executed 4th; and
  •         Add is executed 5th.

Using the Rule File Editor
To get the same sequence defined above using the Rule Editor, select the Execution Order Tab and arrange the commands such that::
  •         Replace is 1st;
  •         Extract is 2nd;
  •         Delete is 3rd;
  •         Wrap is 4th; and
  •         Add is last.

Note:
        Replace is disabled for non-registered customers.

If you are a licensed customer and want AutoPub to upload the files it generates and the image files you have probably generated to your WWW server, you may optionally define the information necessary for AutoPub to:
  •         make the server connection (ftp URL, UserID, and Password);
  •         change to the directories on the server where you want the files placed (TOC, WWW, and image); and
  •         locate the image files on your hard drive
in the header section of the rule file or supply this information in the Upload Info tab of the Rule Editor.
Note:        If you do not supply the following information, you are still allowed to upload your files, however, you will not be allowed to upload your image files (.gif, .jpg, etc.) and the TOC file (if created) will be placed in the same directory as the WWW files. When you select the Upload tool bar button, you will have the opportunity to supply most of the information at run time via the Ftp Dialog.

Ftp Server URL
If you want AutoPub to upload the files it generates you may optionally define the ftp URL on your WWW server. It will typically take one of the following two forms; 1) ftp.provider.xxx where xxx is com, net, org, etc. or 2) ftp://ftp.provider.xxx (e.g., ftp.acme.com or ftp://ftp.acme.com). For example, suppose your server's WWW URL is www.megacompany.com:

Manually Editing Rule File
Add the following line in the &Header: section:
FtpURL: ftp.megacompany.com or alternately FtpURL: ftp://ftp.megacompany.com

Using the Upload Info tab of Rule File Editor
In the Ftp URL: field enter:
ftp.megacompany.com or alternately ftp://ftp.megacompany.com

This is OPTIONAL information.

Account's User ID
If you defined a URL, you should (but are not required to) define your account's authentication User ID. For example, if your account's User ID is floersch:

Manually Editing Rule File
Add the following line in the &Header: section:
UserID: floersch

Using the Upload Info tab of Rule File Editor
In the User ID: field enter:
floersch

This is OPTIONAL information.

Account's Password
If you defined a User ID, you should (but are not required to) define your account's authentication password. For example, if your account's password is x7rtB4:

Manually Editing Rule File
Add the following line in the &Header: section:
UserPW: x7rtB4

Note:
The password does not have to be encrypted to be read correctly by AutoPub. If for security reasons you need it encrypted, open the rule file in the Rule Editor, select
OK, and save it under its original name. When the rule file is written back, the password WILL be encrypted.

Using the Upload Info tab of Rule File Editor
In the Password: field enter:
x7rtB4

Note:
As you enter each character of the password, an * will appear in the Password field.

This is OPTIONAL information.

Directory on the Server where you want the TOC File Placed
If you have instructed AutoPub to create a Table of Contents file and have provided the information above, you must define the directory on the server where you want it stored. If you do not define the storage location, the TOC file will NOT be placed on the server. For example, if you want the TOC file stored in subdirectory WWW/apub:

Manually Editing Rule File
Add the following line in the &Header: section:
TOCServerDir: WWW/apub

Using the Upload Info tab of Rule File Editor
In the TOC Dir on Server: field enter:
WWW/apub

Note:        The leading forward slash is optional. AutoPub will figure out whether a leading forward slash is necessary based on the root directory information supplied by the server. If one is not necessary and you have supplied it, AutoPub will remove it. If one is necessary and you have not supplied it, AutoPub will add it. This same concept holds for all server directory fields in the &Header section.

This is OPTIONAL information.

Directory on the Server where you want the WWW Files Placed
If you have provided the information above, you should define the directory on the server where you want the WWW files stored. If you do not, the WWW files will be placed in the root directory where the base account lives. For example, if you want the WWW files stored in subdirectory WWW/apub/meddoc:

Manually Editing Rule File
Add the following line in the &Header: section:
WWWServerDir: .WWW/apub/meddoc

Using the Upload Info tab of Rule File Editor
In the WWW File Dir on Server: field enter:
WWW/apub/meddoc

This is OPTIONAL information.

Local Directory where your Image Files are Stored
If you have image files (generated by you) that you want uploaded you must tell AutoPub where they are on your hard drive. For example, if the images files associated with your document are stored in local subdirectory d:\www_documents\apub\meddoc\images:

Manually Editing Rule File
Add the following line in the &Header: section:
ImagesLocalDir: d:\www_documents\apub\meddoc\images


Using the Upload Info tab of Rule File Editor
In the Images Dir Locally: field enter:
d:\www_documents\apub\meddoc\images
or with the cursor in the Images Dir Locally: field, select the
Browse button and navigate your hard drive to the images directory and double click on images.

Server Directory where your want the Image Files Placed
If you defined the ImagesLocalDir directory above, you must tell AutoPub where you want them stored on the server. If you do not, the image files will be placed in the root directory where the base account lives. For example, if you want the image files stored in subdirectory WWW/apub/meddoc/images:

Manually Editing Rule File
Add the following line in the &Header: section:
ImagesServerDir: WWW/apub/meddoc/images

Using the Upload Info tab of Rule File Editor
In the Images Dir on Server: field enter:
WWW/apub/meddoc/images

Note:        How does AutoPub know what file extensions your image files have? It doesn't, you must tell AutoPub what your image file extensions are via an Image File Filter which is defined in the Tools Menu / Options selection / Image Filter tab. AutoPub supplies a default set of extensions that you may augment.

This is OPTIONAL information.

#$K+ Log Window



The log window illustrated above is composed of an outer main window and inner scroll windows. The results of the Publishing operation are logged in the inner scroll windows. Use the scroll bar or Page Up/Down, Cursor Up/Down, Home, or End keys to view the results. One log window will appear for each new document you publish within a session. The menu selections and tool bar buttons on the outer window apply to the log window that is on top (has focus). If you don't like the location of the tool bar, move it to any window edge or drag it anywhere on your desktop.

At the bottom of the outer window is a status area with three panes. These panes will display pertinent information, during and after, the publication operation.

AutoPub provides methods for you to launch both your text file editor and your browser with a file you select from its log window. To launch a file, first left click on the display line containing the file you want to review. This selects the line (encloses it in the red rectangular box as illustrated above). To launch your text editor with that file, left click again (double click). To launch your browser with that file, right click on the selected line. You define the editor and, if your registered, the browser of your choice in the Options Menu/Preferences Tab.

#$K+ Registration Form


Your Name: _____________________________________________

Note:        Type/print your name and company below EXACTLY as it appears in the Registration
        dialog in the Help Menu of the Application.

Registration Dialog Name: _____________________________________________

Registration Dialog Company:__________________________________________

Please type or print clearly the following information:

Address: __________________________________________________________

City: _________________________________ State: _____ Zip: __________

E-Mail Address: _______________________________

Check the programs you wish to Register.

AutoPub:                                                 _____ $75.00
HTML Merge:                                         _____ $35.00
MergeEm:                                               _____ $25.00
Search/Replace String:                             _____ $15.00
Both Search/Replace and MergeEm:        _____ $35.00
Both Search/Replace & HTML Merge:    _____ $45.00
Both AutoPub & HTML Merge:              _____ $100.00

I have enclosed a
___ Check        ___Money Order                ___ Cash        (Check One)

Preferred Registration Code delivery:
___ Mail        ___ E-mail        (Check One)

Platform:
___ Win95        ___ WinNT

Please include a self addressed envelope for mail delivery to speed up the response.
__________________________________________________________________________
Please make checks payable to Richard Floersch.
Mail this form and your cash, check, or money order to:

Richard Floersch
7307 W 89th Terr
Overland Park, Ks        66212
__________________________________________________________________________

#$K+ Reserved Variable Names

The following variable names are created by AutoPub and MAY NOT be used as variable names in an Extract command. Reserved variable names can be used where appropriate in the TOC, header, and footer template files.

Reserved Variable Names are as follows:
  •         %%SYSDATE%%
  •         %%SYSTIME%%
  •         %%TOCLine%%
  •         %%TOCFile%%
  •         %%ThisTOCFile%%
  •         %%ThisTOCInfo%%
  •         %%NextTOCFile%%
  •         %%NextTOCInfo%%
  •         %%PrevTOCFile%%
  •         %%PrevTOCInfo%%

%%SYSDATE%%
If you want to date stamp the files with the creation date you can use %%SYSDATE%% which will be replaced with your computer's current date. The system date supplied will have one of the following two formats.
  •         MM/DD/YY (U.S.) or
  •         Mon. DD, YYYY (European).

You dictate which format is used in the Preferences Tab of the Options Menu.

%%SYSTIME%%
If you want to time stamp the files with the creation time you can use %%SYSTIME%% which will be replaced with your computer's current time. The system time supplied will have one of the following two formats.
  •         HH:MM AM/PM (U.S.) or
  •         HH:MM (24 hour European).

You dictate which format is used in the Preferences Tab of the Options Menu.

%%TOCLine%%
Before AutoPub creates any files, it scans the modified memory copy of the document looking for Table of Contents and file marker patterns. When AutoPub encounters TOC markers, it not only extracts the text but also creates a file name to associate with that text so that hyperlinks to the file can be created. When the %%TOCLine%% variable is encountered in the template file, AutoPub knows it must create the TOC entries. AutoPub stops copying the markup information from the template file at that point and begins the creation of the TOC entries using the entire line as the rubber stamp. AutoPub creates all of the TOC entries from first to last at this point. As it does so, AutoPub substitutes the current TOC text information for the variable %%TOCLine%% and the file name of the associated file containing that information for the variable %%ThisTOCFile%%. You may use any variable (defined by you or a system variable) in the %%TOCLine%% line and it will get expanded as each line is constructed. The %%TOCLine%% variable is required in the TOC template file if you want AutoPub to format your TOC lines. If you define multiple lines containing the key %%TOCLine%% variable, only the first is valid, all others will simply appear in your TOC file exactly as you defined them in the template.

Note:        %%TOCLine%% is used only in the template file, in the header and footer template files use %%ThisTOCInfo%%.

%%TOCFile%%
AutoPub
will substitute the Table of Contents file name (minus path) for this variable when it is encountered in the header, footer, or TOC template files.

%%ThisTOCFile%%, %%ThisTOCInfo%%, %% NextTOCFile %%, %%NextTOCInfo%%,%% PrevTOCFile %%, and %%PrevTOCInfo%%,
Before any files are created, AutoPub extracts the TOC entry information you have wrapped with a unique character pattern (you tell AutoPub what that pattern is via the MakeTOC command). When the TOC entry information is extracted, an associated file name is also created both of which are kept in coupled lists. When AutoPub starts creating the TOC file or extracting the text and creating files, it assigns the variables %%ThisTOCInfo%% and %%ThisTOCFile%% the TOC information and associated file name of the file or TOC entry currently being created. At the same time, AutoPub also assigns to %%PrevTOCInfo%% and %%PrevTOCFile%% and %%NextTOCInfo%% and %%NextTOCFile%% the previous and next TOC information and associated file name.

If you do not create an TOC file, then no coupled lists are created. However, you can still use %%ThisTOCFile%%, %%PrevTOCFile%%, and %%NextTOCFile%%. When AutoPub starts creating the WWW files, it creates the first and second file names. Then, as each new file is created, AutoPub creates the file name for the next file since it already knows the name for the current file. It does this even though the next file may never exist. As a result, AutoPub knows the previous, current, and next file names, therefore, all three variables are valid. If you used %%NextTOCFile%% in the footer, YOU must go to the last file created and repair that hyperlink (possibly by referencing the first file instead of the non-existent one) since it will contain a non-existent file name.

Note:        AutoPub will substitute default text for %%ThisTOCInfo%%, %%PrevTOCInfo%%, and %%NextTOCInfo%% variables if you use them without defining an TOC file. You may define this default text in the Options Menu under the TOC Defaults Page.

Inappropriate Reserved Variable Usage
It is inappropriate to use the following variables in the TOC template file
  •         %%ThisTOCInfo%%
  •         %%NextTOCFile%%
  •         %%NextTOCInfo%%
  •         %%PrevTOCFile%%
  •         %%PrevTOCInfo%%

If you use them, they will NOT be expanded and WILL show up in the final TOC file. For example if you defined the following in the TOC template:

<A HREF="./%%PrevTOCFile%%">%%PrevTOCInfo%%</A>

%%PrevTOCInfo%% will be literally displayed and it will reference %%PrevTOCFile%% which doesn't exist.

#$K+ Sequence of Operation

Operation:
The following represents the sequence in which AutoPub performs tasks:
1
st        The rule file is read and parsed.
2
nd        The html/text source document is read into the computer's memory.
3
rd        Multiple passes of the memory file are made. On each, the actions dictated by the commands executed in the order defined by the Execution Sequence are carried out. The result is that the original markup file is modified in memory. You can see these intermediate changes if you define an intermediate file.

If no TOC file has been defined
4
th        The modified memory file is scanned for the start and end patterns defined by the MakeFile command. As the patterns are found, the text between them is extracted and individual files are created. If a header template file is defined, the header markups are copied to each file before the extracted information is inserted. If a footer template file is defined, the footer markups are copied to the file after the extracted information is inserted. Extracted and system variable information is substituted for variables encountered in the header and footer. If system variables %%PrevTOCInfo%%, %%ThisTOCInfo%%, or %%NextTOCInfo%% are encountered, the default text defined by the TOC Defaults Tab of the Options Menu is substituted since no TOC information was extracted.

If a TOC file has been defined
4
th        The modified memory file is sequentially scanned for the start and end patterns defined by the MakeTOC command, the TOC text is extracted, and a file name associated with that text is created for each pattern match found. Both the TOC information and file name are placed on a coupled list and appropriately assigned to the variables %%PrevTOCInfo%%, %%ThisTOCInfo%%, %%NextTOCInfo%%, %%PrevTOCFile%%, %%ThisTOCFile%%, %%NextTOCFile%%, and %%TOCLine%%.
5
th        The TOC file is created. If a template file has been defined, it is used as the guide to construct the TOC file. If the %%TOCLine%% variable is included, the TOC entries are created using the extracted TOC information. If %%ThisTOCFile%% is defined in a hyperlink reference in the %%TOCLine%% line, the current file name (minus path) is substituted to generate the correct hyperlink. Once the TOC entries have been created, the remainder of the markups in the template are copied to the TOC file.
6
th        The modified memory file is scanned for the start and end patterns defined by the MakeFile command. As the patterns are found, the text between them is extracted and individual files are created. If a header template file is defined, the header markups are copied to each file before the extracted information is inserted. If a footer template file is defined, the footer markups are copied to the file after the extracted information has been inserted. Extracted and system variable information is substituted for variables encountered in the header and footer as they are copied to the file.

TOC File Construction
If no TOCName: is defined in the rule file, then no TOC file is created.

If a TOCName: is defined but no TOCTemplate:, the extracted TOC information is listed in the order it was extracted and placed in the file defined by the TOCName.

If both a TOCName: and a TOCTemplate: are defined then:
a)        The information prior to the line containing %%TOCLine%% is copied to the file defined by the TOCName: with variable information inserted for each %%variable%% encountered. (Some system variables are excluded (see list below) from this section.)
b)        TOC lines are created for each TOC entry you have keyed AutoPub to extract, using the line containing the key variable %%TOCLine%% as a rubber stamp, and all variable information is inserted for each %%variable%% encountered. You should use the variable %%ThisTOCFile%% to generate the hyperlink to the TOC text that is substituted for %% TOCLine%%. See the Example TOC Template section for an example of TOC template construction.
c)        The remainder of the template file is copied to the file defined by the TOCName: with variable information inserted each place %%variable%% is encountered. (Some system variables are excluded (see list below) from this section.)

System variables that are mentioned above as being excluded are: %%PrevTOCInfo%%, %%ThisTOCInfo%%, %%NextTOCInfo%%, %%PrevTOCFile%%, %%ThisTOCFile%%, %%NextTOCFile%%, and %%TOCLine%%. If you use these inappropriately, no error will occur but these variables will show up in the template without being expanded.

WWW File Construction
Individual WWW files are created with the information you instructed AutoPub to extract as follows:
a)        The header markup information is copied to the WWW file if a header template file is defined.
b)        The extracted information is inserted into the file.
c)        The footer information is copied to the WWW file if a footer template file is defined.
As the header and footer markups are copied, extracted variable information is inserted into the WWW file in lieu of each variable you defined and for system variables.

#$K+ Special Characters/Wild Cards

!$
In several places in this help file you have seen references to
!$ and it being referred to as a substitute symbol for a hard line break (line break and hard line break are used synonymously in this help file). What is a hard line break? Anytime you press the Enter key you are inserting characters into the file that the software recognizes as a signal to start a new line. These characters constitute a hard line break and are not displayed but are saved with the file. They have to be, otherwise, every time you opened a file, the displayed line lengths and paragraph breaks would be inconsistent. They are a part of the ASCII character set which is the adopted standard for most computer operating systems. In the DOS world, these characters are referred to as carriage return (13 or 0dh) and new line (10 or 0ah). In the UNIX world, a single character is inserted to signal start a new line (10 or 0ah). This difference between operating systems (OS) can cause confusion. If you always work on a single OS, then you never have to worry about the difference. A majority of the WWW servers, however, are UNIX based and a fair number of people who develop web pages do so on a PC and upload their markups to the UNIX machine. Well, UNIX ignores the carriage return so that doesn't cause a problem if the traffic is all from DOS to UNIX. If you wrote your code on a UNIX machine and downloaded it to your DOS machine, the reverse is NOT true. DOS requires the carriage return in front of the new line, hence, many editors/word processors are not going to display the text in the same manner as it would be displayed on a UNIX machine. In most text editors, the whole file is displayed as a single loooooong line with a funny looking symbol (  ) where you would expect a line break. If you open the html UNIX file in notepad, the file will be wrapped but you will still see the funny looki ng symbol and the line breaks will be solely based on the width of the notepad window. If you load the file in your browser, it will look like you expect because the markups (e.g., <P> , <BR>) dictate where the line breaks occur and not the embedded hard line breaks.

If you are using the hard line break in your beginning or ending pattern (by selecting the
Ctrl-Enter key in the Rule Editor) and AutoPub didn't automatically make the conversions between DOS and UNIX, then you would fail to match the hard line break if your document was created on UNIX machine, therefore, your command would fail. AutoPub internally converts all hard line breaks to the !$ symbol in your commands when it reads the rule file. When AutoPub reads the source file, its type is determined (UNIX or DOS) and the commands are expanded substituting the appropriate hard line break character(s) for the !$ symbol. This eliminates your need to know the type of the document file you are converting and ensures that your command's hard line breaks match those in the source file.

In all Rule Editor command fields, a hard line break is invisible unless there is preceding and succeeding text. If the only pattern is a hard line break, it can be confusing because the field will look empty when indeed it is not. As a result, the Rule Editor will convert the hard line break characters in any command that ends with a hard line break to the
!$ symbol. By doing so, you will know the field has additional characters where it would not otherwise be visually obvious. This also eliminates the "empty field" confusion factor.

You may also use the
!$ symbol anywhere a hard line break would occur in lieu of selecting the Ctrl-Enter key.

$$$ Wild Card
The $$$ wild card may be used in either the starting or ending pattern to signify multiple characters exist between the start and end of that start or end pattern but don't care what those characters are. In a start pattern for example, the following might be defined:

Now is the$$$country


in lieu of typing in the whole pattern which might be:

Now is the time for all good men to come to the aid of their country


In this example, the $$$ represents the characters "time for all good men to come to the aid of their". Care must be exercised when using the $$$ wild card that the resulting pattern is not ambiguous. For example, if the following text were also in the file:

Now is the time when General Arnold entered that part of the country

it would also match the example start pattern.

!# Wild Card
The !# wild card can be used within a start or end pattern to signify a digit !#=>0-9, !##=>10-99 etc. For example, in a start or end pattern I might define the following:

<H!#>

if I want to match all the text heading markups < H1 through H6>. In this example, the !# represents the digits 1 through 6.

Some syntax rules that are important to remember when combining !# and $$$are:
  •         !# must come immediately before the $$$ definition (e.g., ABC!## $$$XYZ).
  •         If any intervening characters are placed after the !# and before the $$$, they are IGNORED.
  •         !# and $$$ are not allowed in Wrap, MakeTOC, and MakeFile commands.

#$K+ Uploading To The Server
AutoPub will upload the files it creates and image files you have created to your WWW server via ftp if you are a registered customer.

Warning:        This application uses the ftp put operation to transfer files, consequently, if a file already exists in the destination directory having the same file name as one you are uploading, the existing file in the destination directory will be overwritten and you will have no opportunity to cancel the overwrite. Overwriting is the desired mode in most cases especially if you are updating an existing document.

After you have run the application and created the WWW files, the upload button will become active as will the Tools menu/Upload selection. To start the upload process, select either. You are presented with the following Upload Files dialog shown below in its pre-connection state.

Pre-connection State

If you filled in the information in the Rule Editor's Upload Info tab or manually entered it in the rule file, the information in the all the dialog fields will be pre-filled with that information when initially displayed. If the fields shown above are empty, you must enter the following information :

Ftp URL:        The base ftp URL address of the server where the files will be stored. Typically it will be ftp.xxx.xxx (e.g., ftp.megacompany.com). Alternately, you enter it in the ftp://ftp.xxx.xxx format (e.g., ftp://ftp.megacompany.com).

WWW Dir:        The full path from the directory you logged into on the server to where the WWW files will be stored (e.g., WWW/mydir/mydoc). You may include or exclude the leading /. If you don't include it, the application will add it if necessary.

User ID:                Your user ID.

Password:        Your password (it will be encrypted for security).

Alternately, you may select the
Prev URL's button to use a URL you have previously used to upload files to a server. If you select the Prev URL's button, you get the following dialog:



This dialog contains up to the last 40 unique URL's where you have previously uploaded files. Included with the URL information, although hidden in the dialog, are the User ID and Password you used when you previously uploaded to that server and server directory. When you select a previous URL, the selected information will fill all four fields.
Note1: If you didn't pre-define this information in the Upload Info tab, the TOC and all WWW files will be uploaded to the WWW Directory you define in this dialog. No image files are uploaded.
Note2: If you are logging in anonymously, you do not need to fill in the password field, however, some servers may not allow you access unless an e-mail address is supplied as the password.

Once the above information has been entered/loaded, select the
Connect button to connect to the server you specified. When you do, the edit fields will no longer be accessible (grayed) and the application will attempt to connect to the server you specified (illustrated below).

Connected

Progress is reported in the Message Center field. After AutoPub has connected to the server, it will automatically attempt to change to the WWW directory you specified. You will know whether or not it was successful by examining the Explorer like display below the
Prev URL's button. The Explorer like display lets you navigate directories on the server. If you were not successful or decide to change the defined WWW directory, highlight the directory where you wish to put the files or select the Cancel button. When you are satisfied with the destination directory on the server, select the Upload button. AutoPub will begin uploading the WWW files and the TOC file, if one was generated. If you defined the upload information via the Upload Info tab and have defined a local and server directory, your image files will also be uploaded and the TOC may be placed in a server directory other than the WWW directory. Progress is reported via the Upload progress bar and also in the Message Center field. When uploading is complete, the dialog will have the following appearance.

Uploaded

#$K+ The Rule File

As discussed in the synopsis, the rule file is where all the salient information that AutoPub uses is kept. It is made up of two sections, the Header Section which must come first followed by the Command Section. The Header Section is where file names and locations are defined and, optionally, the execution order for commands. The Header Section begins with &Header: which is the Header Section identifier and terminates at the first blank line. The Command Section is where the pattern matching commands used to modify the source document file are kept. The Command Section begins with &Commands: which is the Command Section identifier.

To get more detailed information on the Header Section and Command Section click on the links above. Visit Example Rule File to see example rule files.

Syntax Rules:
  •         Each command must be typed in its entirety (e.g. Extract not ext).
  •         Case of commands is not important.
  •         Each command MUST start a line (no spaces prior to command).
  •         Exclamation marks (!) are required around keywords (e.g. !save as!), otherwise, AutoPub can't distinguish them from normal text.
  •         Both exclamation marks are required.
  •         Delimiters may be multiple characters but all must be in the valid delimiter set.
  •         For alpha number format characters, C means upper case character and c means lower case character.
  •         For numeric number format characters, X and x both mean a single digit since digits don't have case.
  •         For Roman Numeral number format characters, R means upper case numeral and r means lower case numeral. The only characters recognized as Roman Numerals are I, V, X, and L and their lower case counterparts.
  •         $$$ is a wild card that can be used within a start or end pattern to signify multiple characters exist between the start and end of that pattern but don't care what they are (e.g., Now is the$$$country - is equivalent to - Now is the time for all good men to come to the aid of their country - in a start or end pattern).
  •         !# is a wild card that can be used within a start or end pattern to signify a digit !#=>0-9, !##=>10-99 etc.
  •         If the !# wild card is used in combination with $$$, !# must come immediately before the $$$ definition (e.g., ABC!## $$$XYZ). If any intervening letters are placed after the !# and before the $$$, they are IGNORED.
  •         !# and $$$ are not allowed in Wrap, MakeTOC, and MakeFile commands.
  •         !$ may be substituted for a hard line break (carriage return new line in DOS, new line in UNIX), file type detection is automatic (you will never need to know what the file type it is).
  •         There is a 1000 file limit to the number of WWW files you may create before ambiguity starts.
  •         If you define a TOC file, there must be a one for one relationship between the TOC entries and the files created.
#$K+ Example Header/Footer Template File

Header Template File:
If you want AutoPub to put touch and feel markup text in the WWW file prior to the information it extracts from the document, you need to create a header template file with these markups. A copy of the markup information from this header file is copied to each newly created WWW file prior to the extracted text being inserted. AutoPub will substitute extracted variable information in lieu of any variable (AutoPub's or yours) encountered in the header file as it is copied.

The following is an example of a possible header file.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!---header.hdr--->
<HTML>
<HEAD>
<TITLE>%%title%%</TITLE>
<META NAME="GENERATOR" CONTENT=        " AutoPub
                                        A product of Floersch Enterprises
See http://www.sky.net/~floersch/win32.html">
</Head>

<BODY TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000" BACKGROUND="./images/sand.jpg"><B>

<A NAME="top"></a>

<H2><IMG SRC="./images/floersch.jpg" HEIGHT=64 WIDTH=64> Floersch Enterprises <CENTER><HR> Example Publication using AutoPublisher</CENTER><HR></H2>

<CENTER><P><B><FONT SIZE=+1><I>AutoPub's Application Help</I><BR></FONT>
<FONT SIZE=-1>| <A HREF="%%TOCFile%%">AutoPub TOC</A> | <a href="mailto:floersch@sky.net">Mail</A> | <A HREF="http://www.sky.net/~floersch/">Home Page</A> |</CENTER></FONT>
<BR>
<CENTER><B><FONT SIZE=+2>%%ThisTOCInfo%%</FONT></CENTER>
<HR>
<BR>

Footer Template File:
If you want AutoPub to put navigational markup text following the information extracted from the document, you need to create a footer template file with these markups. The WWW reader should be able to start at the front of the document and read a section at a time without having to go back to the TOC. They should also be given the option of going back to the TOC if they choose to from any section they may be in. AutoPub was created with this concept in mind. A footer markup could easily have been automatically inserted by AutoPub but you would not have had the option to customize it to your needs. This problem is readily solved if you provide the custom markups and AutoPub provides file and TOC information for the previous and next document sections while the current one is being created. AutoPub does just that through its system variables.

AutoPub
provides many system defined variables expressly for navigational and TOC construction purposes. The example footer below subscribes to the navigational concept above. To achieve the desired results, the following system variables are used.
  •         %%TOCFile%% in a hyperlink markup to return to the TOC;
  •         %%NextTOCFile%% in a hyperlink markup to go to the next section;
  •         %%NextTOCInfo%% to provide a description of the hyperlink;
  •         %%PrevTOCFile%% in a hyperlink markup to go to the previous section; and
  •         %%PrevTOCInfo%% to provide a description of the hyperlink.

In addition to the above variables, several others are also used one of which was defined in an Extract command (%%title%%). Here is the example footer markup.

<!---footer.ftr--->
<Table border Cellspacing=5> <TR VALIGN=Top>

<TD><B><Table Cellpadding=0><TR VALIGN=Top><TD><B><A HREF="%%PrevTOCFile%%"><img src="./images/nav05lt.gif"></A></B></TD><TD><B><A HREF="%%PrevTOCFile%%"> Back to <I>%%PrevTOCInfo%%</I></A></B></TD></TR></Table></B></TD>

<TD Width=8%><Table Cellpadding=0><TR VALIGN=Top><TD><B><A HREF="%%TOCFile%%"><img src="./images/nav05up.gif"></A></B></TD><TD><B><A HREF="%%TOCFile%%"> Go to <br><I>%%title%%</I></A></B></TD></TR></Table></B></TD>

<TD><B><Table Cellpadding=0><TR VALIGN=Top><TD><B><A HREF="%%NextTOCFile%%"><img src="./images/nav05rt.gif"></A></B></TD><TD><B><A HREF="%%NextTOCFile%%"> Ahead to <I>%%NextTOCInfo%%</I></A></B></TD></TR></Table></B></TD>
</TR></TABLE>

<BR><center><B><FONT SIZE=-1>Return to <A HREF="#top">top of this page</A>
<BR>Please E-mail questions and comments to<BR>Richard Floersch <a href="mailto:floersch@sky.net">(floersch@sky.net)</A>
</FONT></B></center></b>
<BR>File created on %%SYSDATE%% at %%SYSTIME%%.
</BODY>
</HTML>

#$K+ Example Rule File

The following example rule files were actually used to create either real www file sets or as test cases while AutoPub was under development.

--------------------------------------------------------------------------------------------------------

Example 1
This rule file was actually used to create a real www file set for the state of Colorado. It is the rule file depicted in most of the help file example windows for the Rule Editor.

&Header:
Document: D:\CMedBoard\Rulesone-wp-arach.html
IntermediateFile: D:\CMedBoard\RulesoneInt.html
TOCName: D:\CMedBoard\RulesoneIdx.html
TOCTemplate: D:\CMedBoard\template.html
WWWFileName: D:\CMedBoard\Rulesone.html
HeaderName: D:\CMedBoard\header.hdr
FooterName: D:\CMedBoard\footer.ftr
ExecuteSequence: 2 4 5 1 3

&Commands:
Wrap <!-->!***!!...!</CENTER>!with start!<!--- End File --->
<!--- Make File --->
<!--- Make TOC --->
!end!
<!--- End TOC --->
Add <!--- End File --->!after!<BR><CENTER><FONT SIZE=2 FACE="ARIAL">Return to: [ <A HREF="#top">Top of this Page::1
Replace <B><CENTER>COLORADO STATE BOARD OF MEDICAL EXAMINERS<BR>!with!<B><CENTER>COLORADO STATE BOARD OF MEDICAL EXAMINERS<BR><!-->::A
MakeTOC <!--- Make TOC --->!...!<!--- End TOC --->
MakeFile <!--- Make File --->!...!<!--- End File --->

--------------------------------------------------------------------------------------------------------

Example 2
This rule file was actually used while the application was being created.

&Header:
Document: d:\win32_projects\autopub\barber\barberOrg.htm
IntermediateFile: d:\win32_projects\autopub\barber\testMod.htm
TOCName: d:\win32_projects\autopub\barber\bartoc.htm
TOCTemplate: d:\win32_projects\autopub\barber\template.htm
WWWFileName: d:\win32_projects\autopub\barber\barber.html
HeaderName: d:\win32_projects\autopub\barber\header.hdr
FooterName: d:\win32_projects\autopub\barber\footer.ftr
ExecuteSequence: 4 3 2 5 1

&Commands:
Wrap PART!***!X!.!!...!</CENTER>
<P>
!with start!<!---End File--->
<!---Make This an TOC Variable--->
<!---Make This a File--->
!end!<!---End TOC--->
Wrap Section!***!XXX!.!!...!
<P>!with start!<!---End File--->
<!---Make This an TOC Variable--->
<!---Make This a File--->
!end!
<!---End TOC--->
Wrap X!.!X! !!...!
<P>!with start!<!---End File--->
<!---Make This an TOC Variable--->
<!---Make This a File--->
!end!
<!---End TOC--->
Extract </FONT>
<P>
<HR>
<CENTER>!...!<P>!save as!Title
Delete <!---End File--->::1
Delete </FONT>
<P>!...!<CENTER>LAWS</CENTER><P>
Add <!---Hi DipShit --->!before!1.1
Add <!---End File--->!after!Initial school license - $100.<BR>
Annual renewal fee - $50.
<P>
Replace <FONT SIZE=!# FACE="ARIAL">!with!<FONT SIZE=6 FACE="ARIAL">::A
Replace PART 1. GENERAL INFORMATION<!---End TOC---></center>
<P>
<!---End File--->
<!---Make This an TOC Variable--->
<!---Make This a File--->
!with!<P>PART 1. GENERAL INFORMATION</center>
Replace PART 2. INFORMATION FOR APPLICANTS<!---End TOC---></CENTER>
<P>
<!---End File--->
<!---Make This an TOC Variable--->
<!---Make This a File--->
!with!<P>PART 2. INFORMATION FOR APPLICANTS</CENTER>
Replace PART 3. INFORMATION FOR LICENSED BARBERS AND
APPRENTICES<!---End TOC---></CENTER>
<P>
<!---End File--->
<!---Make This an TOC Variable--->
<!---Make This a File--->
!with!<P>PART 3. INFORMATION FOR LICENSED BARBERS AND
APPRENTICES</CENTER>
Replace PART 4. ADDITIONAL REQUIREMENTS FOR BARBER SCHOOLS<!---End TOC---></center>
<P>
<!---End File--->
<!---Make This an TOC Variable--->
<!---Make This a File--->
!with!<P>PART 4. ADDITIONAL REQUIREMENTS FOR BARBER SCHOOLS</center>
MakeTOC <!---Make This an TOC Variable--->!...!<!---End TOC--->
MakeFile <!---Make This a File--->!...!<!---End File--->

--------------------------------------------------------------------------------------------------------

Example 3
This rule file was another used while this application was being created.

&Header:
Document: d:\win32_projects\autopub\MedBoard\medprtc.htm
IntermediateFile: d:\win32_projects\autopub\MedBoard\MedMod.html
TOCName: d:\win32_projects\autopub\MedBoard\MedToc.html
TOCTemplate: d:\win32_projects\autopub\MedBoard\template.htm
WWWFileName: d:\win32_projects\autopub\MedBoard\medprtc.html
HeaderName: d:\win32_projects\autopub\MedBoard\header.hdr
FooterName: d:\win32_projects\autopub\MedBoard\footer.ftr
ExecuteSequence: 4 3 2 5 1

&Commands:
Wrap §!***!XX!-!X!.!!...!!$!with start!<!---End File--->
<!---Make This an TOC Variable--->
<!---Make This a File--->
!end!<!---End TOC--->
Wrap §!***!XX!-!XX!.!!...!!$!with start!<!---End File--->
<!---Make This an TOC Variable--->
<!---Make This a File--->
!end!<!---End TOC--->
Extract <TITLE>!...!</TITLE>!save as!Title
Delete <!---End!...! File--->::1
Add <!---End File--->

!before!<HR><CENTER><A HREF="#TOP">top of this page</A>
MakeTOC <!---Make This an TOC Variable--->!...!<!---End TOC--->
MakeFile <!---Make This a File--->!...!<!---End File--->

--------------------------------------------------------------------------------------------------------

#$K+ Example TOC Template File

How does AutoPub use the template file? First, AutoPub copies markup information from the template file "as is" to the TOC file. If it encounters a variable (%%variablename%%) as it copies the information, the variable's extracted text is substituted at the point where the variable was encountered. Copying continues until a line containing the keyword %%TOCLine%% is encountered which begins the second phase. When AutoPub finds this keyword, it is a signal to stop copying the template information and to generate the TOC entries. This line should contain your touch and feel markups and two of AutoPub's system variables, %%ThisTOCFile%% and %%TOCLine%%, as a minimum. This line, including all its markups, is used as a rubber stamp to generate every TOC entry. As each entry is being generated, the correct hyperlink to the associated file is substituted for %%ThisTOCFile%% and its associated TOC text for %%TOCLine%%. The example template file below illustrates the use of a line containing these system defined variables:

Once the TOC entries have been created, the third creation step occurs. AutoPub will copy the rest of the template file's markups to the TOC file, again substituting extracted text for any variable encountered.

If you do not define a line having the keyword %%TOCLine%% in it, AutoPub will copy all the information in the template file to the TOC file, substituting extracted text for any variables encountered. AutoPub will then append the extracted TOC text, to the end of the TOC file (no markups unless they were part of what was extracted).

Here is an example template file:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>%%title%%</TITLE>

<META NAME="GENERATOR" CONTENT=" AutoPub
A product of Floersch Enterprises
See http://www.sky.net/~floersch/win32.html ">

</Head>

<BODY TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000" BACKGROUND="./images/sand.jpg"><B>

<A NAME="top"></a>

<H2><IMG SRC="./images/floersch.jpg" HEIGHT=64 WIDTH=64> Floersch Enterprises<CENTER><HR> Example Publication using AutoPublisher</CENTER></H2><HR>

<CENTER><P><B><FONT SIZE=+1><I>AutoPub's Application Help</I><BR></FONT>
<FONT SIZE=-1>| <A HREF="%%TOCFile%%">AutoPub TOC</A> | <a href="mailto:floersch@sky.net">Mail</A> | <A HREF="http://www.sky.net/~floersch/">Home Page</A> |</Center></FONT><BR>
<BR>
<CENTER><B><FONT SIZE=+2>Table of Contents<BR></FONT></CENTER>
<HR>
<BR>

<UL>
<LI><A HREF="./%%ThisTOCFile%%"> %%TOCLine%%</A><P>
</UL>

<P>
<HR>
<BR><center><B><FONT SIZE=-1>Return to <A HREF="#top">top of this page</A>
<BR>Please E-mail questions and comments to<BR>Richard Floersch <a href="mailto:floersch@sky.net">(floersch@sky.net)</A>
</FONT></B></center></b>
<BR>File created on %%SYSDATE%% at %%SYSTIME%%.
</BODY>
</HTML>

#$K+ Add Command Page



The Add command lets you add text to the memory copy of the document. In the window above, the New text <!--- End File ---> is being added After the 1
st instance of the Document's Text <HR><CENTER><A HREF=#TOP … You can add new information to the memory copy of the document anywhere it makes sense to do so. In this example, the author was adding the final end of file marker to the document. See the Command Set section for examples.

Navigating Commands
The Select buttons in the upper right corner of the window allows you to navigate among the Add commands you have defined. The left number indicates the currently displayed command of the total commands (right number). To add a new command, select the down arrow while on the last command. You will be asked if you want to add a new command and if you do select
Yes.

Line Breaks in Fields
If you want to embed line breaks, you may do so in one of two ways:
1)        Hold down the
Ctrl key and press Enter or
2)        Type
!$.
Note:        The
!$ is highlighted in blue for consistency elsewhere in this document. You do NOT have to change the font color from your text color to blue.

Add Command Fields and Buttons
Add this NEW text: [R] Field
This is the field where you define the character pattern that you are going to add to the memory copy of the document. This is a required field.

After/Before Button
If you want your new text added after the document's text that you defined in the Document's Text field then select After otherwise Before.

Document's Text: [R] Field
You can type in, or copy and paste from the source document, the existing character pattern where you are going to add your new character pattern. If you want to copy and paste, select the
Launch button to launch your defined (Preferences) text editor with the source document (see Launch Button below). This is a required field.

Instance: Field
If the character pattern in the Document's Text: [R] field is not unique, you must define the instance of that pattern within the document where you want the new character pattern added. If there are multiple instances and you want to do say the 3
rd and 5th instances, you must define two Add commands with identical information except for the instance number which you will define as 3 in one and 5 in the other. If you want to add the new pattern before/after all instances of the document's pattern, enter an A in the Instance field.

Delete Button
Selecting the
Delete button will cause the currently displayed Add command to be deleted.

Launch Button
If you want to copy and paste text from the source document to one of the fields of this command, select the
Launch button to launch your defined (Preferences) text editor with the source document. Find the text in the source document, copy it by highlighting the text and selecting Ctrl-C or select Copy from the Edit Menu of your editor, put the cursor back in AutoPub's field where you want the copied text placed, and select Ctrl-V. In most cases, copying and pasting is the preferred method to establish the document's character pattern.

#$K+ Delete Command Page



The Delete command lets you delete text from the memory copy of the document. In the window above, the first instance of text beginning with <!---End, potentially having intermediate characters, and ending with File---> is being deleted. You can delete information from the memory copy of the document anywhere it makes sense to do so. There is no need to delete text outside the areas you are going to encapsulate because that text is ignored by AutoPub. See the Command Set section for examples.

Navigating Commands
The Select buttons in the upper right corner of the window allows you to navigate among the Delete commands you have defined. The left number indicates the currently displayed command of the total commands (right number). To add a new command, select the down arrow while on the last command. You will be asked if you want to add a new command and if you do select
Yes.

Line Breaks in Fields
If you want to embed line breaks you may do so in one of two ways:
1)        Hold down the
Ctrl key and press Enter or
2)        Type
!$.
Note:        The
!$ is highlighted in blue for consistency elsewhere in this document. You do NOT have to change the font color from your text color to blue.

Delete Command Fields and Buttons
Delete start pattern: [R] Field
This is the field where you define the starting portion or entire character pattern you are going to delete from the memory copy of the document. This is a required field.

Delete end pattern: [O] Field
This is the field where you define ending portion of the existing character pattern you are going to delete. If you enter information in this field, all characters between the starting pattern and ending pattern are deleted. This is an optional field.

Instance: Field
If the character pattern you defined is not unique, you must define the instance of that pattern within the document you want to delete. If there are multiple instances and you want to do the 3
rd and 5th instances, you must define two Delete commands with identical information except for the instance number which you will define as 3 and 5. If you want to delete all instances of the document's pattern, enter an A in the Instance field.

Delete Button
Selecting the
Delete button will cause the currently displayed Delete command to be deleted.

Launch Button
If you want to copy and paste text from the source document to one of the fields of this command, select the
Launch button to launch your defined (Preferences) text editor with the source document. Find the text in the source document, copy it by highlighting the text and selecting Ctrl-C or select Copy from the Edit Menu of your editor, put the cursor back in AutoPub's field where you want the copied text placed, and select Ctrl-V. In most cases, copying and pasting is the preferred method to establish the document's character pattern.

#$K+ Execution Sequence Page



The execution sequence page lets you tell AutoPub in which order the command types should be executed when the memory copy of the document is being modified. In the window above, the Replace commands will be executed 1
st, the Extract commands 2nd, the Wrap commands 3rd, Add the commands 4th, and the Delete commands 5th. You may change the order in which AutoPub executes these commands to suit your needs for the current document. To do so, you simply select the command you want to move (highlights it) and then click the Up or Down buttons to move it to the desired location.

By default, AutoPub will execute the Replace commands 1
st, followed by Delete, Extract, Add and Wrap.
Note:        If you have not licensed the application, you are prohibited from using the Replace command, therefore, Replace is not shown.
#$K+ Extract Command Page



The Extract command lets you extract text from the memory copy of the document and assign that information to a variable. In the window above, the information between <TITLE> and </TITLE> is being extracted and assigned to the variable title. The start and end extract patterns must be unique. If not, the information will be extracted from the first instance encountered in the memory copy of the document. You must define that variable between %%'s (e.g., %%title%%) within the header, footer, and TOC template markups and AutoPub will substitute the extracted information for the variable as it creates the TOC and WWW files. See the Command Set section for examples.

Navigating Commands
The Select buttons in the upper right corner of the window allows you to navigate among the Extract commands you have defined. The left number indicates the currently displayed command of the total commands (right number). To add a new command, select the down arrow while on the last command. You will be asked if you want to add a new command and if you do select
Yes.

Line Breaks in Fields
If you want to embed line breaks you may do so in one of two ways:
1)        Hold down the
Ctrl key and press Enter or
2)        Type
!$.
Note:        The
!$ is highlighted in blue for consistency elsewhere in this document. You do NOT have to change the font color from your text color to blue.

Extract Command Fields and Buttons
Start Extract pattern: [R] Field
This is the field where you define the starting character pattern you are going to extract information from the memory copy of the document. This is a required field.

End Extract pattern: [R] Field
This is the field where you define ending portion of the extract pattern. The information between the starting and ending patterns is extracted and assigned to the variable. The extract start and end patterns are NOT assigned to the variable. This is an required field.

Variable Name: [R] Field
This is the field where you define the variable you are going to use in the header, footer, or TOC template. When you use the variable in any of these files, remember to enclose the variable between %%'s.

Delete Button
Selecting the
Delete button will cause the currently displayed Extract command to be deleted.

Launch Button
If you want to copy and paste text from the source document to one of the fields of this command, select the
Launch button to launch your defined (Preferences) text editor with the source document. Find the text in the source document, copy it by highlighting the text and selecting Ctrl-C or select Copy from the Edit Menu of your editor, put the cursor back in AutoPub's field where you want the copied text placed, and select Ctrl-V. In most cases, copying and pasting is the preferred method to establish the document's character pattern.

#$K+ Header Page



In the Header Info Page, you tell AutoPub where to find the files you or others have created and the names and locations you want AutoPub to give to the TOC and WWW files it will create. The
Browse button on the right side of the page applies to the field currently in focus (has the <= to the right of it). You may use the browse capability to locate files on your machine. See the Header Information section for additional details.

Header Info Fields

HTML Source Document:
This field tells AutoPub where the source document is located and its name.

Intermediate File:
AutoPub reads the document to be converted into memory and then modifies that memory copy but executing you commands. After all commands have been executed, AutoPub will begin the creation of the appropriate files. If you want the modified memory file copied to your hard drive before its broken up, then you need to define the location where you want it and give it a name. This is very useful as a debugging aid if you getting unexpected results.

TOC File Name:
If you want AutoPub to create an TOC file, you need to define the location where you want it created and give it a name. If this information is not defined, then no TOC file is created. If this information is defined but no TOC template is defined, then AutoPub simply copies the TOC information extracted in the order it was extracted to the TOC file without adding any markups.

TOC File Template:
If you want AutoPub to create a TOC file using a template file, you need to define the location and the name of the template file. (see Header Information for more details).

WWW File Names:
You must define for AutoPub where the WWW files it will create should be stored and the file name to use while creating them. AutoPub will break your defined file name at the extension, append, starting with 000, three digits to the end of the root file name ,and then add back the extension (should be either .htm or .html). It will increment the three digit number by one each time a new file is created.

Header File:
If you want AutoPub to put touch and feel markups prior to the extracted file information from the document, you need to define the location and the name of the header file that you constructed with that information. AutoPub will, for each new WWW file created, copy that markup information from this header file to the new file it is creating prior to inserting the extracted text. AutoPub will substitute extracted variable information for any variables encountered in the header file as it creates the files. Once AutoPub has copied the header markup information, it will copy the extracted file information.

Footer File:
If you want AutoPub to put navigational markup text following the file information extracted from the document, you need to define the location and the name of the footer file that you constructed with that information. AutoPub will copy the information from the footer file to the new file after copying the extracted text from the document. AutoPub will substitute, extracted variable information for any variable encountered in the footer file as the files are being created.

#$K+ Make File Command Page



The MakeFile command lets you tell AutoPub what character pattern constitutes the beginning and ending of the information in the memory copy of the document that you want extracted and made into a WWW file. In the window above, <!--- Make File ---> is the designated start pattern and <!--- End File ---> is the designated end pattern. Each time AutoPub finds these two patterns, it will extract the text between them and create a new WWW file. There can only be one pattern set to designate text to be extracted and added to WWW files, consequently, you may define only one MakeFile command.

Line Breaks in Fields
If you want to embed line breaks you may do so in one of two ways:
1)        Hold down the
Ctrl key and press Enter or
2)        Type
!$.
Note:        The
!$ is highlighted in blue for consistency elsewhere in this document. You do NOT have to change the font color from your text color to blue.

MakeFile Command Fields and Buttons
Start Pattern Designating Make Into File: [R] Field
This is the field where you define the starting character pattern that will designate the beginning of the text you want extracted and placed in a WWW file. This is a required field.

End Pattern Designating Make Into File: [R] Field
This is the field where you define the ending character pattern that will designate the end of the text you want extracted and placed in a WWW file. This is a required field.

#$K+ Make TOC Command Page



The MakeTOC command lets you tell AutoPub what character pattern constitutes the beginning and ending of the text in the memory copy of the document that you want to make into a TOC entry associated with a WWW file. In the window above, <!---Make This a TOC Entry---> is the designated start pattern and <!--- End TOC ---> is the designated end pattern between which all text is extracted to become TOC entries. There can only be one pattern set to designate text to be extracted as TOC entries, consequently, you may define only one MakeTOC command.

Line Breaks in Fields
If you want to embed line breaks you may do so in one of two ways:
1)        Hold down the
Ctrl key and press Enter or
2)        Type
!$.
Note:        The
!$ is highlighted in blue for consistency elsewhere in this document. You do NOT have to change the font color from your text color to blue.

MakeTOC Command Fields and Buttons
TOC Entry Identifier Start Pattern: [R] Field
This is the field where you define the starting character pattern that will designate the beginning of the text you want extracted to become TOC entries associated with WWW files. This is a required field.

TOC Entry Identifier End Pattern: [R] Field
This is the field where you define the ending character pattern that will designate the end of the text you want extracted to become TOC entries associated with WWW files. This is a required field.

#$K+ Replace Command Page



The Replace command lets you modify existing text in the memory copy of the document with different text. In the window above, all instances of the text <B><SUP></FONT><FONT FACE="Arial">#$K</SUP></FONT><FONT SIZE="4"> are being replaced with text <FONT SIZE="4"><!-->. This essentially inserts a unique character pattern <!--> every place in the document where the existing pattern is found. You can replace information in the memory copy of the document anywhere it makes sense to do so.

Navigating Commands
The Select buttons in the upper right corner of the window allows you to navigate among the Replace commands you have defined. The left number indicates the currently displayed command of the total commands (right number). To add a new command, select the down arrow while on the last command. You will be asked if you want to add a new command and if you do select
Yes.

Line Breaks in Fields
If you want to embed line breaks you may do so in one of two ways:
1)        Hold down the
Ctrl key and press Enter or
2)        Type
!$.
Note:        The
!$ is highlighted in blue for consistency elsewhere in this document. You do NOT have to change the font color from your text color to blue.

Replace Command Fields and Buttons
Replace existing text: [R] Field
This is the field where you define the entire character pattern you are going to replace with new text in the memory copy of the document. This is a required field.

With this text: [R] Field
This is the field where you define the entire new character pattern that will replace the existing text in the memory copy of the document. This is a required field.

Instance: Field
If the character pattern you defined is not unique, you must define the instance of that pattern within the document you want to replace. If there are multiple instances and you want to do the 3
rd and 5th instances, you must define two Replace commands with identical information except for the instance number which you will define as 3 and 5. If you want to replace all instances of the document's pattern, enter an A in the Instance field.

Delete Button
Selecting the
Delete button will cause the currently displayed Replace command to be deleted.

Launch Button
If you want to copy and paste text from the source document to one of the fields of this command, select the
Launch button to launch your defined (Preferences) text editor with the source document. Find the text in the source document, copy it by highlighting the text and selecting Ctrl-C or select Copy from the Edit Menu of your editor, put the cursor back in AutoPub's field where you want the copied text placed, and select Ctrl-V. In most cases, copying and pasting is the preferred method to establish the document's character pattern.

Note:
        Replace is disabled for non-registered customers.

#$K+ Upload Info Page



If you are a licensed customer and want AutoPub to upload the files it generates and the image files you have probably generated to your WWW server, you may optionally pre-define the information necessary for AutoPub to:
  •         make the server connection (ftp URL, UserID, and Password);
  •         change to the directories on the server where you want the files placed (TOC, WWW, and image); and
  •         locate the image files on your hard drive
in this tab.

Note:        If you do not supply the following information, you are still allowed to upload your files, however, you will not be allowed to upload your image files (.gif, .jpg, etc.) and the TOC file (if created) will be placed in the same directory as the WWW files. When you select the Upload tool bar button, you will have the opportunity to supply most of the information at run time via the Ftp Dialog.

You enter the following information in the fields:

Ftp URL:                        If you want AutoPub to upload the files it generates, in this field you may optionally define the ftp URL on your WWW server. It will typically take one of the following two forms; 1) ftp.provider.xxx where xxx is com, net, org, etc. or 2) ftp://ftp.provider.xxx (e.g., ftp.acme.com or ftp://ftp.acme.com).

User ID:                                If you defined a URL, in this field you should (but are not required to) define your account's authentication User ID.

Password:                        If you defined a User ID, you should (but are not required to) define your account's authentication password in this field.

Note: As you enter each character of the password, an * will appear in the field.

TOC Dir on Server:                If you have instructed AutoPub to create a Table of Contents file and have provided the information above, you define in this field the directory on the server where you want it stored. If you do not define the storage location, the TOC file will NOT be placed on the server.

WWW File Dir on Server:        If you have provided the information above, in this field you should define the directory on the server where you want the WWW files stored. If you do not, the WWW files will be placed in the root directory where the base account lives.

Images Dir Locally:                If your document uses image files (generated by you) that you want uploaded, you must tell AutoPub in this field where they are on your local hard drive. You may select the Browse button and, using the dialog below, navigate your hard drive to the images directory then double click on images folder.



Images Dir on Server:                If you defined the Images Dir Locally directory above, must tell AutoPub in this field where you want them stored on the server. If you do not, the image files will be placed in the root directory where the base account lives.

Images Note:        How does AutoPub know what file extensions your image files have? It doesn't, you must tell AutoPub what your image file extensions are via an Image File Filter which is defined in the Tools Menu / Options selection / Image Filter tab. AutoPub supplies a default set of extensions that you may augment.

General Note:        The leading forward slash is optional in the fields where directories are defined on the server. AutoPub will figure out whether a leading forward slash is necessary based on the root directory information supplied by the server. If one is not necessary and you have supplied the forward slash, AutoPub will remove it. If one is necessary and you have not supplied it, AutoPub will add the forward slash.

#$K+ Wrap Command Page



The Wrap command is the heart of the AutoPub command set. It lets you encapsulate large amounts of potentially number formatted text in the memory copy of the document with character patterns you want to make into TOC entries and WWW files. What is a number format? Typically, formal documents have a numbering scheme that allow forward and reverse referencing, TOC generation, and provide a logical structure to the document (i.e., Sections and Paragraphs within Sections). This numbering scheme (e.g., 1., 1.1, 1.1.1, I, II, III, A., A.a, 1.A.a.) is the number format. You use Wrap to encapsulate the areas of the document that you want included in the TOC and broken into files with unique patterns you define in this command. You define the same unique patterns in the MakeTOC and MakeFile commands allowing AutoPub to find the text in the document you want included in the TOC and broken into files. If you direct AutoPub to create a TOC, there must be a one to one relationship between the TOC lines defined and the number of files created. In the window above, any number formatted pattern having a prefix of § and a number format consisting of two digits a dash and one more digit and a period through the end of the line where that pattern is encountered (
!$) will have the pattern:
<!--- End File --->
<!--- Make This an TOC Variable --->
<!--- Make This a File --->
inserted before the § and the pattern:
<!--- End TOC --->
inserted at the beginning of the next line. For this example, you would define <!--- Make This a File ---> and <!--- End File ---> to be the beginning and ending file designator patterns in the MakeFile command and you would define <!--- Make This an TOC Variable ---> and <!--- End TOC ---> to be the beginning and ending Table of Contents entry designator patterns in the MakeTOC command. See the Command Set section for examples.

Navigating Commands
The Select buttons in the upper right corner of the window allows you to navigate among the Wrap commands you have defined. The left number indicates the currently displayed command of the total commands (right number). To add a new command, select the down arrow while on the last command. You will be asked if you want to add a new command and if you do select
Yes.

Line Breaks in Fields
If you want to embed line breaks you may do so in one of two ways:
1)        Hold down the
Ctrl key and press Enter or
2)        Type
!$.
Note:        The
!$ is highlighted in blue for consistency elsewhere in this document. You do NOT have to change the font color from your text color to blue.

Wrap Command Fields and Buttons
Number Prefix: Field
In this field you will define any prefix information prior to the number (e.g., Section, Part, Appendix, Addendum, Article, etc.). Either this field or the Number Format field is required, however, both may be defined.

Number Format Including Delimiters:
In this field you define the numbering scheme. You do that by using an X to signify a digit, a C or c to signify an upper or lower case alpha character (A-Z or a-z), and R or r to signify a Roman Numeral. Only the Roman Numerals I, V, X, and L and their lower case counter parts are supported. You must specify multiples of these characters if the number, letter, or numeral has multiple characters (e.g., X for 1 thru 9, XX for 10 thru 99, XXX for 100 thru 999, etc.). If delimiters separate or enclose the number format, they must be included at their delimiting location (e.g., X.X for 1.0 thru 9.9, X.X.X. for 1.0.0. thru 9.9.9., XX.XX for 10.00 thru 99.99, {C.} for {A.} thru {Z.}, etc.). Delimiters supported by AutoPub are: space, comma, period, colon, semicolon, dash, ), (, ], [, }, and {. Either this field or the Number Prefix field is required, however, both may be defined.
Note:        See the Command Set Section of this help file for more information and examples of prefix and number format definitions.

Formats Button
Several number formats have been predefined. Clicking the
Formats button presents you with the following dialog:



You may double click on a format in this dialog and it will automatically load it in the Number Format Including Delimiters field.

End of Number Format Pattern: [R]
This is the field where you define the ending pattern of the number formatted text to be wrapped in the memory copy of the document. This is a required field.

Note:        Quite often in documents the information you want wrapped as file breaks and TOC entries may not have a unique ending. For example, lets say the documents number format is X.X. The first instance of this may be 1.0 Introduction while the second is 1.1 History. There is no unique ending for these except for the line break that follows Introduction and History. For these cases you have two choices, either specify line break (
!$) as the end pattern or modify the file with some unique character pattern (e.g., <!-->) that can be used as the end paragraph pattern.

Insert This Prior to the Number Format: [R] Field
This is the field where you define the beginning pattern to distinguish text as being either the start of TOC entries or file breaks or both. In the example in the window above, a file end marker, a TOC entry start marker, and file start marker are defined. Why both a file end and start marker? If the text between major sections is being extracted such as 1.0 thru 2.0, 2.0 thru 3.0, etc., then you need an end file marker prior to 2.0 to capture all of section 1.0 and an end file marker prior 3.0 to capture all of section 2.0 etc. You also need as start file marker prior to 1.0, 2.0, 3.0 etc. By specifying the end marker prior to the start marker in this field that goal was accomplished except for the very last section. The Add command can be used to insert the last file end marker.

This is an required field.

Add This After Number Format Pattern: [R] Field
This is the field where you define the ending pattern to distinguish text as being either the end of TOC entry markers or file break markers or both. Generally, it will only be the end of TOC entry marker as is the case in the example in the window above.

Delete Button
Selecting the
Delete button will cause the currently displayed Wrap command to be deleted.

Launch Button
If you want to copy and paste text from the source document to one of the fields of this command, select the
Launch button to launch your defined (Preferences) text editor with the source document. Find the text in the source document, copy it by highlighting the text and selecting Ctrl-C or select Copy from the Edit Menu of your editor, put the cursor back in AutoPub's field where you want the copied text placed, and select Ctrl-V. In most cases, copying and pasting is the preferred method to establish the document's character pattern.

#$K+ Image Filter Page



How does AutoPub know what file extensions your image files have? It doesn't, you must tell AutoPub what your image file extensions are by defining an image file filter. You do that on this page. AutoPub supplies a default set of extensions that you may augment. To augment the default set, type a semicolon (
;) after the last character in the existing filter, followed by an asterisk period (*.) and the image file's extension and optionally another asterisk (*). You may do this as many times as you have image files types not already listed.

#$K+ Preferences Page



Editor Application:
Double clicking on a displayed file line in the log window causes AutoPub to launch an editor and open the displayed file. By default the editor is notepad. You may change the editor to the one of your choice by:
  •         typing in the full path and file name to the editor or
  •         click the browse button, find the editor on your hard drive, and select that editor.

Web Browser:
Single left clicking on a displayed file line in the log window causes AutoPub to highlight that line. Right mouse clicking on the highlighted line will launch your web browse and with the highlighted line's file. You define your web browser by:
  •         typing in its the full path and file name or
  •         click the browse button, find the it on your hard drive, and select it as your browser.

Note:        This is disabled for non-registered customers.

Display U.S. Date/Time for %%SYSDATE%% / %%SYSTIME%%
Check this box if you want US date/time format. Unchecked yields European date/time format.

Match Case Everywhere
Check this box if you want Match Case as the default in the start up dialog window.

Display Error Messages during Build
Check this box if you want to see Error Message Dialogs while AutoPub is building the WWW files. If unchecked, error messages are only displayed in the log window after AutoPub has concluded publishing.

#$K+ TOC Defaults Page



This page allows you to define the messages that will be used for the %%ThisTOCInfo%%, %%NextTOCInfo%%, and %%PrevTOCInfo%% variables when no Table of Contents is specified. These variables are typically used for customer navigation aids in the footer file.