Softany Txt2Htm2Chm Reference
1. Welcome
This documentation is generated with Softany Txt2Htm2Chm.
To get other formats (CHM, Online, DOC and PDF), please visit:
http://www.softany.com/document.htm
Copyright ® 2004 Softany Software All Rights Reserved.
2. Introduction
Softany Txt2Htm2Chm is an up-to-date Generator that produces Html help(CHM) files, Website Help systems, E-books with a left navigation, Normal e-books, FAQ Pages and Single Html files(can be converted to Word documents by Microsoft Word and PDF files by Adobe Acrobat or third-party software) only with Text File(s).
It's not only a txt2html, txt2chm tool but also an html help creator, a website help system creator, an e-book creator, a FAQ page creator and an assistant tool to create Microsoft Word documents and Adobe PDF files.
You needn't learn how to use complicated Windows Html Help tools and Web Page Creators. You can work easily as long as you can type and know how to use Notepad.
3. Feature
- One source many output formats (HTML Help, Website Help...).
- Template-based output engine. You need not to consider HTML production.
- Supply up to 49 templates to satisfy your most needs.
- Powerful template system. Support complex templates containing images, css sheet, flash files, etc.
- Visual CHM Designer. The easiest way to design CHM style.
- multi-mode reading of text files.
- Powerful Text Analysis engine. Add formats to common document elements automatically.
- Extension Tags. Easy to implement complex effects.
4. What can Txt2Htm2Chm do?
Source |
Txt2Htm2Chm format |
Output format |
Application |
Description |
| Texts |
CHM |
CHM |
Standard HTML Help System |
|
| Website |
HTMLs |
Website Help System |
|
| CHM |
"Icon-changeable" CHM |
|
| EXE |
E-book with TOC |
Need third-part software |
| E-book |
HTMLs |
Online e-book |
|
| CHM |
CHM e-book |
|
| EXE |
E-book |
Need third-part software |
| FAQ |
HTML |
FAQ on web |
|
| CHM |
Mini help system |
|
| Single HTML |
HTML |
Printable HTML |
|
| DOC |
Microsoft Word Document |
Need Microsoft Word to convert. |
| PDF |
Adobe PDF |
Need Adobe Acrobat or third-part software to convert. |
Microsoft HTML Help system (CHM)
At present Microsoft HTML Help system is the most popular help system in the world. This help system you are reading is just a Microsoft HTML Help system. Strictly speaking, it is not only a help system that has a table of contents, but also a container and browser for a group of html files. However, here "Microsoft HTML Help system" means the standard format that has a toolbar, a navigation pane with a table of contents. Some formats below may need CHM format to be container.
To create this system, create the project to "CHM" format.
Website Help system
Website Help system looks like a CHM, but it is a group of html files that has one index file. The index file has a navigation frame with the table of contents implemented through JavaScript technology. Because all the files are html files and their associated files(.css, .js and image files, etc), they can be shown in browser such as Internet Explorer or Netscape.
If you want to construct a web help for your client, you should use this format.
To create this system, create the project to "Website" format.
E-Book
E-Books are the short form of "electronic books". It is a digital book storing texts, graphics, sound and video inside a computer file. User can easily read e-book by using computer instead of a hard copy.
At present, most for-reading e-books base on HTML files. Generally, at first you must create a group of html files using web page creator such as Microsoft FrontPage or Macromedia Dreamweaver. Nowadays, using Softany Txt2Htm2Chm, only needing text files, you can create a functional set of html files that has contents, previous page and next page hyperlinks.
You can use "CHM" format to create standard CHM e-books.
You can use "E-Book" format to create a traditional set of html files and then they can be contained in a CHM file by Softany Txt2Htm2Chm or an EXE file by a third-party software.
You can use "Website" format to create a set of html files that can be contained in a CHM file by Softany Txt2Htm2Chm or an EXE file by a third-party software.
FAQ web page
FAQ (Frequently Asked Questions) is a single html that has a hyperlink list of questions on top and following the list there are all answers. When click on a link of the list, the page scroll to its answer. You can click a "TOP" link to return to the question list. The "TOP" link may have another text or an image.
You can use "FAQ" format to create a FAQ for your website or pack it into CHM file to compose a mini help system.
Printable HTML (All contents in one HTML file)
Neither CHM format nor Website format can print easily for they have many pages in them. If all contents in a HTML file, printing will be easy.
You can use "Single HTML" format to create a single html file that contains all contents. Moreover, a numbered list will be added to each title ahead.
This format can be converted to Microsoft Word Document and Adobe PDF easily.
"Icon-changeable" CHM
For Microsoft HTML Help system, the icons in the table of contents have a limited selection. If you want to use other icons, here is a trick for you.
You can use "Website" format to create a website help system. Because this is a HTML system, we can replace the icon files with others. The icons position in the folder "icons", you can use 16*16 icons instead of the normal icons.
Then compile the HHP file to pack all files in a CHM file. The output file looks like a standard Microsoft HTML Help system that the icons are replaced, but it is just a website help system packed in a CHM file.
EXE E-books (or help system)
Some software can compile a group of html files and their associated files into an EXE file that serves as a container and a browser. Softany Txt2Htm2Chm cannot create EXE E-book directly, but it is helpful for creating functional html files. These files can easily be used for their perfect organization.
Moreover, many EXE e-books compilers do not supply a navigation pane with a table of contents. Through "Website" format containing a JavaScript table of contents, you can get the similar function.
Microsoft Word Document
Microsoft Word Document (.doc) is a very popular format on Windows platform. Softany Txt2Htm2Chm cannot create this format directly, but "Single Html" format can easily be converted to DOC format.
Refer to How to get Microsoft Word Documents?.
Adobe PDF (Portable Document Format)
PDF is a widely used across-platform format which will display and print a document almost exactly as originally formatted. Softany Txt2Htm2Chm cannot create this format directly, but "Single Html" format can easily be converted to PDF. You can use Adobe acrobat or third-party software to convert the file.
Refer to How to get Adobe PDF files?.
5. Preparing text files
Softany Txt2Htm2Chm use text files as his input source. Why do not use Html format? Can the text implement the effects we need? Through researching many help systems of some big corporations such as Microsoft, Macromedia and Symantec, we found out that only several effects are frequently used in the content parts of the help systems. HTML is a powerful language, but in content parts we only need little of all his functions. In order to use the little functions, we have to learn how to use powerful and complicated web page creators and have to use them.
5.1 The format of text files
Softany Txt2Htm2Chm can recognize the following formats:
One file is one topic
One text file includes just one topic. The first non-blank line will be regarded as the title and the other lines below it is the content of the topic. You can set the file name as the title; in this case, the whole file is the content.
One or more topic per file
There may be more than one topic in a file. So the program needs some sign to separate them.
- Separating texts
Separated by blank lines
At least number of consecutive blank lines will be regarded as a sign that means a topic ends and another topic starts.
Ensure in each topic there are no consecutive blank lines that its numbers equal or exceed the "At Least" number.
Sample text:
In this sample text, the "At Least" number is set as 1. The one consecutive blank line between topic 1 and topic 2 and the two consecutive blank lines between topic 2 and topic 3 will both be regarded as separating signs.
This is Title 1
Here is the content of the topic 1.
Here is the content of the topic 1.
Here is the content of the topic 1.
Here is the content of the topic 1.
This is Title 2
Here is the content of the topic 2.
Here is the content of the topic 2.
Here is the content of the topic 2.
Here is the content of the topic 2.
This is Title 3
Here is the content of the topic 3.
Here is the content of the topic 3.
Here is the content of the topic 3.
Here is the content of the topic 3.
Separated by tags occupying whole line
You can use a customized string to separate the texts into topics. This string must occupy a whole line when it appears in the texts.
Ensure there is no string the same as the tag string appearing in a whole line of the text of each topic.
Note: the tag string is case sensitive.
Sample text:
In this sample text, the string "{separator}" is set as the separator. The blank lines above it and below it are not necessary.
This is Title 1
Here is the content of the topic 1.
Here is the content of the topic 1.
Here is the content of the topic 1.
Here is the content of the topic 1.
{separator}
This is Title 2
Here is the content of the topic 2.
Here is the content of the topic 2.
Here is the content of the topic 2.
Here is the content of the topic 2.
Separated by tags in front of the titles
You can set a string that if it appears in front of the text, the text will be regarded as a title. In the other words, it means the previous topic ends and another topic begins.
Note: the tag string is case sensitive.
Sample text:
In this sample text, the string "@" is set as the tag.
@This is Title 1
Here is the content of the topic 1.
Here is the content of the topic 1.
Here is the content of the topic 1.
Here is the content of the topic 1.
@This is Title 2
Here is the content of the topic 2.
Here is the content of the topic 2.
Here is the content of the topic 2.
Here is the content of the topic 2.
5.2 Arranging a hierarchy
In order to use hierarchy, we need to tell the program how to arrange.
By the number of the tags in front of the title lines
The level of a topic is determined with the number of the title tags. In this case, you must set separating texts into topics by tags in front of the titles.
Sample text 1:
In this sample text, title tag string is set as "@".
@This is Title 1
Here is the content of the topic 1.
Here is the content of the topic 1.
@@This is Title 2
Here is the content of the topic 2.
Here is the content of the topic 2.
@@This is Title 3
Here is the content of the topic 3.
Here is the content of the topic 3.
@This is Title 4
Here is the content of the topic 4.
Here is the content of the topic 4.
The output hierarchy:
By level tags each that occupies a whole line
Softany Txt2Htm2Chm uses three customizable tags to indicate the level. They are "Adding a level" tag, "Reducing a level" tag and "Backing to the root" tag. Each tag must occupy a whole line.
Sample text 1:
In this sample text, "Adding a level" tag is set as "{>}" and "Reducing a level" tag is set as "{<}". Text separator is set as at least one blank line.
This is Title 1
Here is the content of the topic 1.
Here is the content of the topic 1.
{>}
This is Title 2
Here is the content of the topic 2.
Here is the content of the topic 2.
This is Title 3
Here is the content of the topic 3.
Here is the content of the topic 3.
{<}
This is Title 4
Here is the content of the topic 4.
Here is the content of the topic 4.
The output hierarchy:
Sample text 2:
In this sample text, "Adding a level" tag is set as "{>}" and "Reducing a level" tag is set as "{<}". Text separator is set as at least one blank line.
This is Title 1
Here is the content of the topic 1.
Here is the content of the topic 1.
{>}
This is Title 2
Here is the content of the topic 2.
Here is the content of the topic 2.
This is Title 3
Here is the content of the topic 3.
Here is the content of the topic 3.
{>}
This is Title 4
Here is the content of the topic 4.
Here is the content of the topic 4.
This is Title 5
Here is the content of the topic 5.
Here is the content of the topic 3.
{<}
{<}
This is Title 6
Here is the content of the topic 6.
Here is the content of the topic 6.
The output hierarchy:
Sample text 3:
In this sample text, "Adding a level" tag is set as "{>}", "Reducing a level" tag is set as "{<}" and "Backing to the root" tag is set as "{|<}". Text separator is set as at least one blank line.
This is Title 1
Here is the content of the topic 1.
Here is the content of the topic 1.
{>}
This is Title 2
Here is the content of the topic 2.
Here is the content of the topic 2.
This is Title 3
Here is the content of the topic 3.
Here is the content of the topic 3.
{>}
This is Title 4
Here is the content of the topic 4.
Here is the content of the topic 4.
This is Title 5
Here is the content of the topic 5.
Here is the content of the topic 3.
{|<}
This is Title 6
Here is the content of the topic 6.
Here is the content of the topic 6.
The output hierarchy:
5.3 Title Tags
Softany Txt2Htm2Chm uses some Title Tags to indicate some properties of topics. These tags are only used in titles.
[DEFAULT]
If a title contains "[DEFAULT]", the topic that this title belongs to is the default topic in CHM format and Website format. When the CHM file or the web system is opened, this topic is shown initially.
If there is no this tag in any title, the first topic will be set default.
[ICONn]
Set the icon of topics. N is an numeral.
If there is no this tag in a title, the title will use default icon.
Icons and their number:
| Icon | No. | Icon | No. | Icon | No. | Icon | No. | Icon | No. | Icon | No. |
|---|
 | 1 |  | 2 |  | 3 |  | 4 |  | 5 |  | 6 |
 | 7 |  | 8 |  | 9 |  | 10 |  | 11 |  | 12 |
 | 13 |  | 14 |  | 15 |  | 16 |  | 17 |  | 18 |
 | 19 |  | 20 |  | 21 |  | 22 |  | 23 |  | 24 |
 | 25 |  | 26 |  | 27 |  | 28 |  | 29 |  | 30 |
 | 31 |  | 32 |  | 33 |  | 34 |  | 35 |  | 36 |
 | 37 |  | 38 |  | 39 |  | 40 |  | 41 |  | 42 |
Note: Title Tags are case sensitive.
For example:
[ICON17][DEFAULT]This is a default title with an exclamatory mark icon
5.4 No-content Topics
If a topic has no content (Blank lines and blank spaces will be omitted) as well as subtopics, this topic will only be a folder not linking to any page.
For example:
This text makes Title 1 a No-content topic.
This is Title 1
{>}
This is Title 2
Here is the content of the topic 2.
Here is the content of the topic 2.
This is Title 3
Here is the content of the topic 3.
Here is the content of the topic 3.
{<}
This is Title 4
Here is the content of the topic 4.
Here is the content of the topic 4.
Description:
For CHM and Website format, output effect looks no difference from common topics, but if you click Title 1, there is no page to be shown.
For E-book and FAQ format, Title 1 has no link.
6. Text Analysis
In documents, there are often some elements used frequently. Softany Txt2Htm2Chm can identify four kinds of element without any extra tags. In the other words, only need normally typed text, the program can set the format of these elements automatically.
6.1 Rules of Analysis
Through the features of texts in themselves, Softany Txt2Htm2Chm can set formats automatically.
Notes:
- If you do not want to use Text Analysis in a line, you can add a "`"(the key on the left of Key 1 under the key Esc) in the front of the line. For example, the following sentence cannot be recognized as a subheading:
`Subheading
We can also use "`" in a bulleted list and a numbering list to forbid Text Analysis of their items. For Example:
#`Term: we explain it here.
- Subheadings, Illustrative Sentences, Terms and Reminders have different PRI's - Subheadings>Illustrative Sentences>Reminders>Terms. If a line can be regarded as one that has a higher PRI, it cannot be regarded as the others.
6.1.1 Horizontal lines
If the more than three same characters make up of a whole line, the program will regard it as a Horizontal line and replace them with "<HR>" in HTML when output.
Example
Source Text:
---
Effect:
6.1.2 Expandable Blocks
This effect consists of a hyperlink and a block that can be shown and hidden. When click the link, the hidden block below it is shown. When click the link again, the block is hidden. If the block contains more than one line, you should enclose them into [ BLOCK] and [/BLOCK].
Example
Source text 1:
+ show/hide block
These words can be hidden.
Effect:
Source text 2:
+ show/hide block
[BLOCK]
These words can be hidden.
These words can be hidden.
[/BLOCK]
Effect:
6.1.3 Bullets
If a line begins with * (It can be customized), it will be regarded as an item of a bulleted list. One or more consecutive items will be regarded as a bulleted list. The item that has two or more lines should be enclosed into [BLOCK] and [/BLOCK].
Example
Source text:
* Here is line 1.
* Here is line 2.
* [BLOCK]Here is line 3.
Here is line 3.
Here is line 3.
[/BLOCK]
Effect:
- Here is line 1.
- Here is line 2.
- Here is line 3.
Here is line 3.
Here is line 3.
6.1.4 Numbering
If a line begins with # (It can be customized), it will be regarded as an item of a numbered list. One or more consecutive items will be regarded as a numbered list. The item that has two or more lines should be enclosed into and
.
Example
Source text:
# Here is line 1.
# Here is line 2.
# [BLOCK]Here is line 3.
Here is line 3.
Here is line 3.
[/BLOCK]
Effect:
- Here is line 1.
- Here is line 2.
- Here is line 3.
Here is line 3.
Here is line 3.
6.1.5 Subheadings
In the content of a topic there are often some short sentences that do not end with some kinds of interpunction (can be customized).
Starting with a lowercase and containing one of these letters - "<>*/=+|;{}^" will make it impossible to recognize the sentence as a subheading.
The style of this element is defined with ".Subheading" in CSS.
Example
Source text:
This is a subheading
Effect:
This is a subheading
6.1.6 Illustrative Sentences
If a short sentence ends with colon(:)(can be customized), we can regard it as an illustrative sentence.
The style of this element is defined with ".IllustrativeTitle" in CSS.
Example
Source text:
This is an illustrative sentence:
Effect:
This is an illustrative sentence:
6.1.7 Terms
A short string followed with its explanation. This rule is also effective in items of bulleted lists and numbering lists.
The style of this element is defined with ".Term" in CSS.
Example
Source text 1:
Terms: Explain it here.
Effect:
Terms: Explain it here.
Source text 2:
#Terms: Explain it here.
#Terms: Explain it here.
Effect:
- Terms: Explain it here.
- Terms: Explain it here.
6.1.8 Reminders
Some reminder words such as "Notes", "Warning" or "Tips" frequently appear in documents.
The style of this element is defined with ".Reminder" in CSS.
Example
Source text:
Note: Here is important information.
Effect:
Note: Here is important information.
6.2 Extension Tags
The following topics list the set of elements defined in Softany Txt2Htm2Chm. The links take you to the element definitions.
Note: If you want to show texts the same as Extension Tags in your document, add a "^" after "[". For example, to show "[B]" you can type "[^B]" in texts.
6.2.1 B
Syntax
[B]Text[/B]
Description
This pair of tags makes the text between them bold.
Example
Source text:
[B]These words are bold![/B]
Effect:
These words are bold!
6.2.2 U
Syntax
[U]Text[/U]
Description
This pair of tags makes the text between them underlined.
Example
Source text:
[U]The words are underlined![/U]
Effect:
The words are underlined!
6.2.3 I
Syntax
[I]Text[/I]
Description
This pair of tags makes the text between them italic.
Example
Source text:
[I]These words are italic![/I]
Effect:
These words are italic!
6.2.4 FONT
Syntax
[FONT=name|color|size]...[/FONT]
Description
Set the name, color and size of the text between this pair of tags.
Name, color and size are optional and have no fixed order.
"Name" is the name of font.
"Color" is a string starting with "#". (e.g. #FF0000).
"size" is Floating-point number followed by an units designator (cm, mm, in, pt, pc, px, em or ex).
Example
Source text:
[FONT=sans-serif|#FF0000|12pt]TEXT[/FONT]
[FONT=14pt]TEXT[/FONT]
[FONT=#00FF00]TEXT[/FONT]
Effect:
TEXT
TEXT
TEXT
6.2.5 BR
Syntax
[BR]
Description
Inserts a line break.
Example
Source text:
This is line 1.[BR]This is line 2.
Effect:
This is line 1.
This is line 2.
6.2.6 ANCHOR
Syntax
[ANCHOR]anchorname[/ANCHOR]
Description
Insert an anchor.
Example
Source text:
[ANCHOR]anchor1[/ANCHOR]
Effect:
6.2.7 LINK
Syntax
[LINK]href[/LINK]
[LINK]href|text[/LINK]
Description
This pair of tags makes a hyperlink.
Example
Source text 1:
[LINK]http://www.softany.com[/LINK]
Effect:
http://www.softany.com
Source text 2:
[LINK]http://www.softany.com|Softany Software[/LINK]
Effect:
Softany Software
6.2.8 LINKN
Syntax
[LINKN]href[/LINKN]
[LINKN]href|text[/LINKN]
Description
This pair of tags makes a new window hyperlink.
Example
Source text 1:
[LINKN]http://www.softany.com[/LINKN]
Effect:
http://www.softany.com
Source text 2:
[LINKN]http://www.softany.com|Softany Software[/LINKN]
Effect:
Softany Software
6.2.9 EMAIL
Syntax
[EMAIL]email[/EMAIL]
[EMAIL]email|text[/EMAIL]
Description
This pair of tags makes a Email hyperlink.
Example
Source text 1:
[EMAIL]support@softany.com[/EMAIL]
Effect:
support@softany.com
Source text 2:
[EMAIL]support@softany.com|Support Email[/EMAIL]
Effect:
Support Email
6.2.10 TOPIC
Syntax
[TOPIC]title[/TOPIC]
[TOPIC]title|text[/TOPIC]
[TOPIC]title|text|anchor[/TOPIC]
Description
This pair of tags makes a hyperlink that links to a topic page.
Example
Source text 1:
[TOPIC]Introduction[/TOPIC]
Effect:
Introduction
Source text 2:
[TOPIC]Introduction|See welcome page[/TOPIC]
Effect:
See welcome page
6.2.11 IMG
Syntax
[IMG]filename[/IMG]
[IMG]filename|align[/IMG]
Description
To insert an image, use this pair of tags. The image file is stored in the Resource Folder. Only file name is needed and a path with it will cause an error.
Align: Specifies the alignment for the image. It can be "CENTER","DLEFT","DRIGHT","ABSBOTTOM", "ABSMIDDLE", "BASELINE", "BOTTOM", "LEFT", "MIDDLE", "RIGHT", "TEXTTOP", "TOP".
When align is set as "CENTER","DLEFT" or "DRIGHT", the tags have the same effect as the HTML <div align="align"><img src="filename"></div>.
When align is set as the other values, the tags have the same effect as the HTML <img src="filename" align="align">.
Example
Source text 1:
[IMG]flower.gif[/IMG]
Effect:
Source text 2:
[IMG]flower.gif|center[/IMG]
Effect:
6.2.12 SIMG
Syntax
[SIMG]filename[/SIMG]
Description
To insert a small image into texts. This element has the same effect as using <img src="filename" align="absbottom"> in HTML.
Example
Source text:
Click[SIMG]save.gif[/SIMG]to save the file.
Effect:
Click
to save the file.
6.2.13 TIMG
Syntax
[TIMG]filename|description[/TIMG]
Description
To insert an image with a caption under it, use this pair of tags. The image file is stored in the Resource Folder. Only file name is needed and a path with it will cause an error.
Example
Source text:
[TIMG]flower.gif|A flower[/TIMG]
Effect:
 |
| A flower |
6.2.14 TABLE
Syntax
[TABLE]...[/TABLE]
Description
Make a simple table.
Example
Source text:
[TABLE]
col1 | col2 | col3
001 | test1 | testa
002 | test2 | testb
[/TABLE]
Effect:
| col1 | col2 | col3 |
|---|
| 001 | test1 | testa |
| 002 | test2 | testb |
6.2.15 CENTER
Syntax
[CENTER]...[/CENTER]
Description
Causes the content between This pair of tags to be centered.
Example
Source Text:
[CENTER]
This sentence is centered.
[/CENTER]
Effect:
This sentence is centered.
6.2.16 HTML
Syntax
[HTML]text[/HTML]
Description
Insert HTML into document. The text between This pair of tags will not be encoded.
Example
Source text:
[HTML]
<table width="100" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td rowspan="2" bgcolor="#00CC66"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td rowspan="2" bgcolor="#FF0000"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
[/HTML]
Effect:
6.2.17 TEXT
Syntax
[TEXT]text[/TEXT]
Description
Renders text in fixed-width type. This element has the same effect as using the element <PRE>...</PRE> in HTML.
Example
Source text:
[TEXT]
function Hello{
document.write("Hello World!");
}
[/TEXT]
Effect:
function Hello{
document.write("Hello World!");
}
6.2.18 BLOCK
Syntax
[BLOCK]...[/BLOCK]
Description
Causes the content between This pair of tags to be a logical block that is like a big string in a line.
This is the only pair of tags that supports nesting in Softany Txt2Htm2Chm .
Example
Source text 1:
* Here is line 1.
* Here is line 2.
* [BLOCK]Here is line 3.
Here is line 3.
Here is line 3.
[/BLOCK]
Effect:
- Here is line 1.
- Here is line 2.
- Here is line 3.
Here is line 3.
Here is line 3.
Source code 2:
+ Show/Hide
[BLOCK]
* Here is line 1.
* Here is line 2.
* [BLOCK]Here is line 3.
Here is line 3.
Here is line 3.
[/BLOCK]
[/BLOCK]
Effect:
Show/Hide
- Here is line 1.
- Here is line 2.
- Here is line 3.
Here is line 3.
Here is line 3.
6.2.19 BACK
Syntax
[BACK]...[/BACK]
Description
Causes the content between This pair of tags to have a color background.
The style of this element is defined with ".BackBlock" in CSS.
Example
Source Text:
[BACK]
These texts have a background.
These texts have a background.
These texts have a background.
[/BACK]
Effect:
These texts have a background.
These texts have a background.
These texts have a background.
6.2.20 INC
Syntax
[INC]filename[/INC]
Description
Include a text file. Softany Txt2Htm2Chm supports importing texts from text files. We often use these tags to import the html source of a complicated table from a text file.
Example
Assuming table1.txt have stored in Included Files Folder.
table1.txt
<table width="100" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td rowspan="2" bgcolor="#00CC66"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td rowspan="2" bgcolor="#FF0000"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
Source text:
[INC]table1.txt[/INC]
Effect:
6.2.21 FLASH
Syntax
[FLASH]filename[/FLASH]
Description
Insert a FLASH file into documents. The FLASH file must be stored in Resource Folder.
Example
Source text:
[FLASH]a.swf[/FLASH]
6.3 About using tables
Table is a kind of common element in documents. There are two ways to insert tables into document.
Simple tables
To insert a simple table (each row has the same number of columns and each column has the same number of rows; each cell do not contain too much text; using standard style defined in CSS) into the document, you can use Extension tags [TABLE]...[/TABLE].
Complex tables
To insert a complex table into the document, you can:
- Create the table in a web page creation tool such as Microsoft FrontPage or Macromedia Dreamweaver.
- Pick up the source code between <table> and </table>(include <table> and </table>) to save them into a text file positioned in Included Files folder.
- Use Extension tags [INC]...[/INC] to include the text file that contains the HTML source code of the table into the document.
Tip: If you have experiences with HTML and web page creation tools, it is better to save the table source code as .htm file, because .htm file can be opened and saved by web page creation tools directly, you can open, edit and save it just like opening, editing and saving a picture with a picture processor.
But this .htm file not containing html, head and body tags is not a standard HTML file. This maybe puzzles someone who's not familiar with HTML and web page creation tools. Moreover, some web page creation tools cannot correctly process these non-standard html files. You'd better use Microsoft FrontPage 2000 or later version or Macromedia Dreamweaver to do this and test them for the first use.
7. Template and Templates Group
Making templates is advance knowledge in Softany Txt2Htm2Chm. If existing templates can satisfy your needs, you need not to learn this chapter.
Softany Txt2Htm2Chm uses Templates Group to organize templates. A Template Group may contain several templates.
A template may consist of a ContentTemplate, some OtherTemplates and some CopyFiles.
ContentTemplate: Use this template to create all the Topic html files each that contains the Title and the Content. This template will be used to create many html files.
OtherTemplates: These files that contain tags in them are parts of the template. When output the files are read, the tags are replaced with their values and then they are outputted to the output folder. The filename may be changed when output. For example, in Website format the Index file and the Navigation file are OtherTemplates.
CopyFiles: These files have no any tag in it. They will be simply copied to the output folder. The file names may be changed when copying. For example, image files used in the template are CopyFiles.
7.1 Making Templates
The normal procedure to make templates and group several templates into a templates group:
1. Make the html file and store it and its associated files in an empty folder.
2. Insert tags into the position where you would like to show the values.
3. Make a file named as templates.ini. Several similar templates can be grouped into a templates group. Refer to Templates.ini
You can use website creation tools such as Microsoft Frontpage, Macromedia Dreamweaver to make html files or hand make them.
Each kinds of template have some difference from others:
Tip: We have prepared some templates' template for you. They are stored in (installation folder)\tst\. Using these templates' template you can create your own templates easilier and quicklier.
7.1.1 CHM Templates
Generally, a CHM format template only need an html file(ContentTemplate) and its associated files such as .css, .js, image files, etc.
To get a template's template, copy from (installation folder)\tst\chm\.
Legal tags in CHM format:
| Tag | Description |
|---|
| ($PROJECTTITLE$) | Project Title. |
| ($CHARSET$) | Charset. |
| ($TITLE$) | The title of the topic. |
| ($CONTENT$) | The content of the topic. |
| ($PREVIOUSPAGE$) | The file name of the previous page. |
| ($NEXTPAGE$) | The file name of the next page. |
| ($DEFAULTPAGE$) | The file name of the default page. |
Example
A ContentTemplate in a CHM template:
<html>
<head>
<title>($TITLE$)</title>
<meta http-equiv="Content-Type" content="text/html; charset=($CHARSET$)">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<span class="title">
($TITLE$)
</span><br>
<br>
<div class="content">
($CONTENT$)
<br>
<br>
</div>
</body>
</html>
7.1.2 Website Templates
A typical Website template contains an index file, a navigation frame and a content frame.
Please insert ($WEBSITEJS$) into the position where the hyperlink "Show Navigation Frame" shows in ContentTemplate. If a content page is individually opened in a browser window, the "Show Navigation Frame" hyperlink will appear; Clicking this hyperlink can show the navigation frame. This tag is a must in Website format templates.
Tag ($WEBSITEJS$) in CHM templates will be replace as nothing when output so that ContentTemplate can be used in common by CHM template and Website template.
To get a template's template, copy from (installation folder)\tst\website\.
Legal tags in Website format:
| Tag | Description |
|---|
| ($PROJECTTITLE$) | Project Title. |
| ($CHARSET$) | Charset. |
| ($TITLE$) | The title of the topic. |
| ($CONTENT$) | The content of the topic. |
| ($PREVIOUSPAGE$) | The file name of the previous page. |
| ($NEXTPAGE$) | The file name of the next page. |
| ($DEFAULTPAGE$) | The file name of the default page. |
| ($WEBSITEJS$) | Insert "Show Navigation Frame" link script. |
| ($NAVIGATION$) | The table of contents in Website format. |
| ($THISFILENAME$) | The current content page's filename. |
| ($SEQUENCE$) | The current content page's number. |
Example
A ContentTemplate in a Website template:
<html>
<head>
<title>($TITLE$)</title>
<meta http-equiv="Content-Type" content="text/html; charset=($CHARSET$)">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
($WEBSITEJS$)
<span class="title">
($TITLE$)
</span><br>
<br>
<div class="content">
($CONTENT$)
<br>
<br>
</div>
</body>
</html>
7.1.3 E-Book Templates
A typical E-book template contains a contents file and a ContentTemplate.
To get a template's template, copy from (installation folder)\tst\ebook\.
Legal tags in E-Book format:
| Tag | Description |
|---|
| ($PROJECTTITLE$) | Project Title. |
| ($CHARSET$) | Charset. |
| ($TITLE$) | The title of the topic. |
| ($CONTENT$) | The content of the topic. |
| ($PREVIOUSPAGE$) | The file name of the previous page. |
| ($NEXTPAGE$) | The file name of the next page. |
| ($DEFAULTPAGE$) | The file name of the default page. |
| ($TITLELIST$) | The contents with hyperlinks in E-book format. |
| ($INDEXPAGE$) | The filename of the page having the contents. |
| ($JUMPMENULIST$) | A list box that has all the titles. |
Example
A ContentTemplate in an E-book template:
<html>
<head>
<title>($TITLE$)</title>
<meta http-equiv="Content-Type" content="text/html; charset=($CHARSET$)">
<link href="style.css" rel="stylesheet" type="text/css">
<link href="appearance.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#0080C0" class="BodyBack">
<table width="95%" border="0" align="center" cellpadding="10" cellspacing="1" bgcolor="#999999">
<tr>
<td bgcolor="#CCEEFF" class="navbarback"><div align="center"><nobr>[<a href="($INDEXPAGE$)">Contents</a>]
[<!--HideWhenFirst--><a href="($PREVIOUSPAGE$)"><!--/HideWhenFirst-->Previous<!--HideWhenFirst--></a><!--/HideWhenFirst-->]
($JUMPMENULIST$)
[<!--HideWhenEnd--><a href="($NEXTPAGE$)"><!--/HideWhenEnd-->Next<!--HideWhenEnd--></a><!--/HideWhenEnd-->] </nobr></div></td></tr>
<tr>
<td height="33" bgcolor="#FFFFFF" class="TitleAreaBack"><div align="center"><font class="title"><strong>($TITLE$)</strong></font></div></td></tr>
<tr>
<td height="332" valign="top" bgcolor="#FFFFFF" class="ContentAreaBack"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed;">
<tr>
<td>
($CONTENT$)
</td>
</tr>
</table>
</td></tr>
<tr>
<td bgcolor="#CCEEFF" class="NavBarBack"></td></tr>
</table>
</body>
</html>
7.1.4 FAQ Templates
FAQ format is a special format because all topics are in one file. Its ContentTemplate has different meaning from the other formats. The program picks the texts between "<!--TopicTemplateBegin-->" and "<!--TopicTemplateEnd-->" as template to make all topics and then insert them into the position originally occupied by the two tags and their texts.
To get a template's template, copy from (installation folder)\tst\faq\.
Legal tags in FAQ format:
| Tag | Description |
|---|
| ($PROJECTTITLE$) | Project Title. |
| ($CHARSET$) | Charset. |
| ($FAQLINKLIST$) | The contents with hyperlinks in FAQ format. |
| ($FAQTITLE$) | The title of the topic in FAQ Format. |
| ($FAQCONTENT$) | The content of the topic in FAQ Format. |
Example
A ContentTemplate in a FAQ template:
<html>
<head>
<title>($PROJECTTITLE$)</title>
<meta http-equiv="Content-Type" content="text/html; charset=($CHARSET$)">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<p><a name="TOP"></a><font class="ProjectTitle">($PROJECTTITLE$)</font></p>
<p>
($FAQLINKLIST$)
</p>
<!--TopicTemplateBegin-->
<p><font class="title">($FAQTITLE$)</font></p>
<p>
($FAQCONTENT$)
</p>
<p align="right">[<a href="#TOP">TOP</a>]</p>
<!--TopicTemplateEnd-->
<p> </p></body>
</html>
7.2 Templates.ini
This file is an important file in a Templates Group, for it tells the program all about the templates such as the templates' name, what kind of templates they are, what file to be used to make Content Files, what files will be synchronously copied when output, etc.
A Typical Templates.ini:
[GENERAL]
TemplatesNumber=6
GroupName=MSDN Style
Author=Softany Software
Email=softany@hotmail.com
Website=www.softany.com
[COMMON]
Name=
ContentTemplates=
OtherTemplates=
CopyFiles=style.css
Default=
SampleImage=
Type=
[Template1]
Name=MSDN
ContentTemplates=Template1.htm
OtherTemplates=
CopyFiles=images\*.*;otherimg\37.gif:images\
Default=
SampleImage=1.bmp
Type=0
[Template2]
Name=MSDN
ContentTemplates=Template1.htm
OtherTemplates=index.htm;left.htm
CopyFiles=images\*.*;otherimg\37.gif:images\
Default=index.htm
SampleImage=2.bmp
Type=1
[Template3]
Name=Win98a
ContentTemplates=Template2.htm
OtherTemplates=
CopyFiles=images\*.*;otherimg\wvleft.jpg:images\
Default=
SampleImage=3.bmp
Type=0
[Template4]
Name=Win98a
ContentTemplates=Template2.htm
OtherTemplates=index.htm;left.htm
CopyFiles=images\*.*;otherimg\wvleft.jpg:images\
Default=index.htm
SampleImage=4.bmp
Type=1
[Template5]
Name=Win98b
ContentTemplates=Template3.htm
OtherTemplates=
CopyFiles=images\*.*;otherimg\win98ii.gif:images\
Default=
SampleImage=5.bmp
Type=0
[Template6]
Name=Win98b
ContentTemplates=Template3.htm
OtherTemplates=index.htm;left.htm
CopyFiles=images\*.*;otherimg\win98ii.gif:images\
Default=index.htm
SampleImage=6.bmp
Type=1
Sections:
| Section | Description |
|---|
| GENERAL | Basic information about the Templates Group. |
| COMMON | The common settings of all templates in this group. |
| Template1..n | The settings of each templates. |
Key:
| Key | Description |
|---|
| TemplatesNumber | The number of the templates in the Templates Group. |
| GroupName | The Templates Group's name. |
| Author | The Templates Group's author. |
| Email | The author's email. |
| Website | The author's website. |
| Name | Template's name |
| ContentTemplates | The file that will be used to make Content Files. |
| OtherTemplates | Other Files list. |
| CopyFiles | Copy Files list. |
| Default | Default page. In different format it has different meaning. |
| SampleImage | A BMP image(200*160) |
| Type | Template's type. 0:CHM 1:Website 2:E-Book 3:FAQ |
Common settings
Through setting in COMMON section, can simplify the settings in TemplateX section.
For key OtherTemplates and CopyFiles the Common value will be added to the value of each template. For example: assuming the value of key CopyFiles in Common section is "mystyle.css" and in Template1 section is "style.css", when output using template 1 the file mystyle.css and style.css will both be copied to the output folder.
For the other keys, the non-empty value of each template will replace the Common value. For example: assuming the value of key Name in section COMMON is A and in section Template1 is B, so the name of the template 1 is B. If the value of key Name in section Template1 is empty , the name of the template 1 is A.
About the value of key OtherTemplates and CopyFiles
The value is a string separated into items by semicolons(;). Each item is a file or a group of files indicated by wildcards(only CopyFiles) and you can use format "Source:Destination" to indicate the destination file or path. "Source" and "Destination" use relative path. "Source" is relative to the Templates Group folder. "Destination" is relative to the Output Folder.
For example:
1. Read file "index.htm" and "left.htm" from Template Group folder, after replace tags in them, output them to Output Folder. The file name will not be changed.
OtherTemplates=index.htm;left.htm
2. Read file "index1.htm" and "left.htm" from Template Group folder, after replaces tags in them, output them to Output Folder. Output "index1.htm" as "index.htm".
OtherTemplates=index1.htm:index.htm;left.htm
3. From Template Group folder copy all the files including subfolders in folder "images1" to folder "images" in the Output Folder.
CopyFiles=images1\*.*:images\
7.3 About Previous page and Next page
In a template we may use text or image hyperlinks to go back to previous page or go forth to next page. For example:
Text hyperlink:
<a href="($PREVIOUSPAGE$)">Previous</a>
Image hyperlink:
<a href="($PREVIOUSPAGE$)"><img src="prev.gif" alt="Previous Page" border="0"></a>
It is easy for you to do, but there is a problem: the previous page does not exist for the first page and the next page does not exist for the last page. If click the Previous hyperlink in the first page or click the Next hyperlink in the last page, what will occur? There is nothing! Because Softany Txt2Htm2Chm uses "#" as the href, it will keep on the current page.
Although there will be no error, this way is not perfect. How can I do to disable or disappear the Previous hyperlink in the first page and disable or disappear the Next hyperlink in the last page?
We need a special group of tags.
| Begin Tags | End Tags | Description |
|---|
| <!--ShowWhenFirst--> | <!--/ShowWhenFirst--> | Show the content between them in the first page. |
| <!--HideWhenFirst--> | <!--/HideWhenFirst--> | Hide the content between them in the first page. |
| <!--ShowWhenEnd--> | <!--/ShowWhenEnd--> | Show the content between them in the last page. |
| <!--HideWhenEnd--> | <!--/HideWhenEnd--> | Hide the content between them in the last page. |
Note: The tags are case sensitive.
Use these tags, we can make perfect Previous hyperlinks and Next hyperlinks.
For Example:
1. The Previous hyperlink will disappear in the first page.
<!--HideWhenFirst-->
<a href="($PREVIOUSPAGE$)">Previous</a>
<!--/HideWhenFirst-->
2. The Previous hyperlink will be disabled in the first page.
<!--HideWhenFirst-->
<a href="($PREVIOUSPAGE$)">
<!--/HideWhenFirst-->
Previous
<!--HideWhenFirst-->
</a>
<!--/HideWhenFirst-->
3. In the first page show another grayed image without hyperlink.
<!--ShowWhenFirst-->
<img src="prev_gray.gif" border="0">
<!--/ShowWhenFirst-->
<!--HideWhenFirst-->
<a href="($PREVIOUSPAGE$)"><img src="prev.gif" alt="Previous Page" border="0"></a>
<!--/HideWhenFirst-->
Note: For easy reading, the code above is separated into several lines. In fact, you can organize them into one line.
8. Project Settings
8.1 General
In this step, you are going to set the general settings in a Softany Txt2Htm2Chm project.
- Project Title : A string that will appear on the top of the CHM window and the places that have been defined by tag "($PROJECTTITLE$) in the templates files.
- Source path : The folder that stores Resource files. In documents, we may use some images, flash files and/or other files that must be copied to the output folder when HTML files have been made.
- Destination folder name : A subfolder in the output folder that the files in the Source path will be copied to.
The Destination folder will be created if it does not exist.
For example: if Source path is "d:\source", Destination folder name is "images" and the Output folder is 'd:\output', all the files in the folder "d:\source" will be copied into the folder 'd:\output\images' when Softany Txt2Htm2Chm make the output files.
- Included Files Path : The folder that includes the files that the tag [INC] refer to.
8.2 Text Files
In this step, you are going to select text files that you have created using any text editor. These text files should be formatted suitable for Softany Txt2Htm2Chm to process.
Adding Files
There are two ways to add text files:
- Add text files directly
Click Add Files... button. The Add Files dialog box is displayed.
In this dialog box, select files and then click Open button to complete this operation or click Cancel button to abandon it.
Two ways to Multi-select files:
- Hold down left mouse button and drag your mouse.
- Hold down the Ctrl key and click the file names listed in the dialog box.
- Add files by folder
Click Add Files by Folder button. The Add Files by Folder dialog box is displayed.
Select a folder in the folder tree on the left of the dialog box. The folder name will appear in the Folder text box. Set Filter to tell Softany Txt2Htm2Chm what type files you want to select. If Include Subfolders is checked, Softany Txt2Htm2Chm will search the subfolders. if Sort by Name is checked, the selected files will be sorted by their names.
Click OK button to complete this operation or click Cancel button to abandon it.
If Remove Duplicates is checked, the List of Files cannot accept the file names that have existed in it. Otherwise, the List of Files allows the same file names.
Modifying The List of Files
if you want to delete the file names from the list or move them, please at first select the items you want to operate.
To select items in the list, you can:
- Hold down left mouse button and drag your mouse.
- Hold down the Ctrl key and click the items.
- Click Select All button to select all the items in the list box.
- Press Ctrl-A to complete the same function as 3.
then
- Click Sort Items button to sort the list by file names (include the path).
- Click Delete button to delete the selected file names from the list.
To modify the order of the file names:
- Click
to move the selected items to the top.
- Click
to move the selected items up a level.
- Click
to move the selected items down a level.
- Click
to move the selected items to the bottom.
8.3 Separating
In this step, you are going to set how to separate the text in the text files into topics. Softany Txt2Htm2Chm allows Multi-file reading and multi-topic per file.
How to arrange in a hierarchy
if the document is a hierarchy, there are two ways to tell the program how to arrange.
- By the number of the tags in front of the title lines
If you select "By tag in front of title lines", the number of tags can tell the program how many level the topic is on.
- By level tags each that occupies a whole line
You can use a group of tags to tell the program the topic is a subtopic of pervious one, the same level as parent topic or a root-level topic.
Add a level: This string means the topic under it is one level more than the previous topic.
Reduce a level: This string means the topic under it is one level less than the previous topic.
Back to the root: This string means the topic under it is a root-level topic.
Separating text into topics
- One file is one topic
if this is selected, Softany Txt2Htm2Chm considers one file in the Text Files list includes only one topic. The topic title is the first non-blank line in the text and the other lines following the title line make up the topic content.
if Use file name as Title is checked, the file names will be regarded as topic titles and the whole text make up the topic content.
- One or more topics per file
if this is checked, Softany Txt2Htm2Chm considers one file in the Text Files list may include multiple topics. You must set how to split the text into topics.
There are some options:
- By blank line(s)
This is the simplest way to split texts. At least number of consecutive blank lines will be regarded as a sign that means a topic ends and another topic starts. You can use the spin edit following By blank line(s) radio box to set at least which consecutive blank lines will be recognized.
Note: if there are some characters such as blank spaces and tabs in a line, they will be omitted.
For example: if you set the number is 2, all two and more than two consecutive blank lines in the text will be regarded as splitting signs.
- By tag in a line
You can customize a string to be the splitting sign. This string must occupy a whole line.
- By tag in front of title lines
You can customize a string that appears in front of the titles you want.
Preview Structure
When you have selected Text Files, have set how to arrange in a hierarchy and how to separate texts into topics, you can click Preview Structure to preview the document structure(ONLY the structure NOT the output files).
Refer to
Preparing text files
8.4 Text Analysis
In this step, you are going to set how to process the texts when creating HTML files. Text Analysis is one of the most important functions in Softany Txt2Htm2Chm . This function make format setting easier and simpler.
HTML Encode
if this is checked, some special characters (e.g. "<",">","&",etc) will be encoded when output so that these characters can be regarded as text rather than parts of HTML source.
Note: You cannot straight use more than one lines of HTML source in text even if the HTML Encode checkbox is checked, because Newline Characters will be encoded at all time. If you want to use real HTML source, please use tag [HTML]...[/HTML].
Enable Text Analysis
Allow Text Analysis and Extension Tags.
Join lines
Join more than one lines into a logical block.
Example:
These two section of source text have the same effect. Assuming Join lins sign is "&".
# Here is line 1.
# Here is line 2.
# Here is line 3.
&Here is line 3.
&Here is line 3.
# Here is line 1.
# Here is line 2.
# [BLOCK]Here is line 3.
Here is line 3.
Here is line 3.
[/BLOCK]
To add a string into a list:
Click Add button. The "Add a string" dialog box is displayed.
Enter a string and click OK button.
if there are some blank spaces on the head or the tail of the string, replace them with string " ".
To delete a string from a list:
Select a string in the list and click Delete button.
Refer to
Rules of Analysis
Extension Tags
8.5 HTML files
In this step, you are going to set properties of output HTML files.
Output File names
Set how to name the HTML files including each topic.
Extension : Extension of output files.
Begin with : A static string in front of the file name.
The counter starts with : A numeral that the counter starts with.
Min length : Fill zero to proper length when a value of the counter is shorter than the number that Min length specified.
if a value of the counter is longer that Min length, keeps its length.
For example : Assuming set "Extension" as ".html", "Begin with" as "test", "The counter start with" as "1" and "Min length" as "3", the output file names will be "test001.html","test002.html"..."test999.html","test1000.html"...
HTML properties
Encoding : This property is corresponding with ($CHARSET$) tags in templates.
8.6 CHM Common
In this step, you are going to set common properties of CHM files.
8.7 Output Settings
In this step, you are going to set what kinds of output format will be created and their settings and where is the output folder.
Check/uncheck the check box in front of the format name to allow/forbid the format to create. When a check box is checked, the button following the format name is enabled. Click these buttons to set the options of the format.
To set output folder:
Click folder icon to show the Browse for Folder dialog box and select a folder in the folder tree. Then click OK to complete. The full folder name including the drive will appear in the Output Folder text box.
if you want to set a non-exist folder, you can directly type the full folder name including the drive in the Output Folder text box. The folder will be created when creating output files.
8.7.1 CHM
In this dialog box, you can set the properties of CHM format.
Select a template
Click Select a template... button to open the Select a template dialog box.
Refer to Selecting a template
Set the CHM window
Click Visual CHM Designer... button to open the Visual CHM designer window.
Refer to Visual CHM Designer
CHM File Name : The name of future CHM file.
Compile CHM Project : Whether to compile CHM project.
8.7.2 Website
In this dialog box, you can set the properties of Website format.
Select a template
Click Select a template... button to open the Select a template dialog box.
Refer to Selecting a template
Set the CHM window
Click Visual CHM Designer... button to open the Visual CHM designer window.
Refer to Visual CHM Designer
Note: Because for this format the CHM is only a container to show HTML files, you cannot set the CHM has a Content tab or an Index tab.
TOC (Table of Contents)
Set the properties of the table of contents. Being differ from a TOC in CHM format, in Website format the TOC is a HTML file with JavaScript normally located on the left of the window. Although they are so similar, but they are different essentially.
- Start line from the root: Specifies whether lines connecting top-level nodes are displayed.
- Draw lines between items: Specifies whether to display the lines that link child nodes to their corresponding parent nodes.
- Only expend a single heading: Specifies whether the nodes in the TOC tree automatically expand and collapse depending on the selection.
- Use folders instead of books: Specifies whether to use folder icons instead of book icons in the TOC tree.
CHM Project
- Output CHM Project : Whether to create CHM project of HTML files.
- CHM File Name : The name of future CHM file.
- Compile CHM Project : Whether to compile CHM project.
8.7.3 E-Book
In this dialog box, you can set the properties of E-Book format.
Select a template
Click Select a template... button to open the Select a template dialog box.
Refer to Selecting a template
Set the CHM window
Click Visual CHM Designer... button to open the Visual CHM designer window.
Refer to Visual CHM Designer
Note: Because for this format the CHM is only a container to show HTML files, you cannot set the CHM has a Content tab or an Index tab.
Title list style
- Bullet : Each title begins with a Bullet.
- Numbering : Each title begins with a string such as "1.","1.1","1.2.1".
- Apply to Jump Menus : Whether to apply Title list style to the Jump Menus.
CHM Project
- Output CHM Project : Whether to create CHM project of HTML files.
- CHM File Name : The name of future CHM file.
- Compile CHM Project : Whether to compile CHM project.
8.7.4 FAQ
In this dialog box, you can set the properties of FAQ format.
Select a template
Click Select a template... button to open the Select a template dialog box.
Refer to Selecting a template
Set the CHM window
Click Visual CHM Designer... button to open the Visual CHM designer window.
Refer to Visual CHM Designer
Note: Because for this format the CHM is only a container to show HTML files, you cannot set the CHM has a Content tab or an Index tab.
Title list style
- Bullet : Each title begins with a Bullet.
- Numbering : Each title begins with a string such as "1.","1.1","1.2.1".
CHM Project
- Output CHM Project : Whether to create CHM project of HTML files.
- CHM File Name : The name of future CHM file.
- Compile CHM Project : Whether to compile CHM project.
8.7.5 Single HTML
In this dialog box, you can set the properties of Single HTML format.
- HTML file name : The file name of Single HTML.
- Initially expanded : If you use some Expandable Blocks in your document and want to convert the Single HTML to Doc or PDF, there is a problem that the blocks of Plus/minus elements are hidden, so the converted document cannot show the text in these blocks.
You can set Initially expanded check box is checked to force the Expandable Blocks to show.
8.8 Create
This is the last step. In this step, you are going to create the files.
Click Create button. The program starts to create the files.
9. Tools in Softany Txt2Htm2Chm
9.1 Selecting a template
Open the Select a template dialog box.
To select a template, follow this procedure:
- Select a templates group. The sample image of each template in the templates group will appear in the Preview window.
- Select a template in the Preview window. If a template is selected, a red arrow will appear on the left of the sample image.
- Click OK button to finish the selection or click Cancel button to abandon the selection.
9.2 Visual CHM Designer
Visual CHM Designer is an easy-to-use tool that can help you to visually set the CHM window style, position and size. After start Visual CHM Designer, you can see a window just like a CHM window, but the window has an Options panel at the right bottom corner of it.
Use the Options panel to set the properties of the CHM windowĄŁThe other elements in the interface (e.g. Menus, Toolbar) have no real functions. They only show you the window style visually. But there are some exceptions:
1. Move and resize this window to set the window's default position and size.
2. Drag the splitter to set the width of the navigation pane on the left of the window.
Click OK button to save the settings and close this designer.
Click NO button to close this designer without any changes.
OK button and NO button position at the right top of the Options Panel.
Note: In the Options Panel, asterisks(*) mean the properties cannot be shown visually.
9.3 Templates Group Manager
In order to use new templates in Softany Txt2Htm2Chm , you must at first add the Templates Group into Template Group Manager.
To open Templates Group Manager:
Click menu Template>Template Group Manager to open Templates Group Manager.
To add a new templates group:
- Click Add button on toolbar to open Browse for folder.
- Select a Templates Group folder and click OK.
- Enter a name as the Templates Group name or use default name directly.
To delete a templates group from Template Group Manager:
- Select a Template Group in Template Group Manager.
- Click Delete button on toolbar to delete it.
Note: The templates Groups installed with this software cannot be deleted.
9.4 Templates.ini Editor
With this tools you can create and edit Template Group Configuration file templates.ini more easily and conveniently.
To create a new templates.ini:
- Click New templates.ini button to open Browser a folder dialog box.
- Select a Template Group folder and click OK button. The application will create a new templates.ini in the Template Group folder.
To modify an existent templates.ini:
- Click Open button to open Browser a folder dialog box.
- Select a Template Group folder and click OK button. The file templates.ini in the folder will be read in.
Refer to: Templates.ini
9.5 CHM Project Compiler
Sometimes you may need to compile CHM project(.hhp) individually. For example, after re-editing the files(html files, css files, etc) created by Softany Txt2Htm2Chm , you can use CHM Project Compiler to compile the chm project.
If you want to compile an .HHP file, use this procedure:
- Use menu Tools > Compile CHM Project to open Compile CHM Project dialog box.
- Click Browser... button to select the .HHP file you want to compile.
- Click Compile button to compile the project. The compiling information will be shown in the text area.
- Click View button to open the output folder.
10. Getting Word Document and PDF
10.1 How to get Microsoft Word Documents?
Softany Txt2Htm2Chm cannot output Microsoft Word documents directly, but he can create Single Html format that can be converted to Microsoft Word documents by Microsoft Word. Don't worry about the effect of the conversions, because converting HTML format to Word document format is ripe technology. The only disadvantage is that you must have installed Microsoft Word(or Microsoft Office).
To get Word document:
- Create a single html file using Single Html format.
- Open the html file using Microsoft Word. You can use menu File>Open in Microsoft Word to open the single html file that you have created.
- Use menu Edit> Links... to open Links dialog box.
- Select all links listed in dialog box. You can click the first link and then hold down Shift key and click the last link.
- Check "Save picture in document" check box and click OK.
- Save the file as .DOC file to convert it to Word Document format.
The cover and the table of contents
The Single Html format contains a big title that can be used as the cover. We can also add a table of contents to the document using the relative function of Microsoft Word.
To do these, use this procedure:
- After step 2 above, use menu View > Print Layout to set Word to Print layout.
- Position the point in the front of the first title. Use menu Insert > Break to open Break dialog box, select Page break and click OK.
- Repeat step 2 to insert the second page break. At the moment, the big title occupies a single page alone. The page is the cover. Between the cover and the straight matter there is a blank page.
- Position the point on top of blank page. Use menu Insert > Reference > Index and Tables to open Index and Tables dialog box. Select Table of Contents tab and set the properties if you want.
- Click OK to insert a table of contents to the document.
Note: The conversion operations are all in Microsoft Word.
10.2 How to get Adobe PDF files?
Softany Txt2Htm2Chm cannot output Adobe PDF directly, but he can create Single Html format that can be converted to Adobe PDF by Adobe Acrobat or third-part software(such as PDF factory).
There are two kinds of mode to create PDF: Conversion mode and Virtual Print mode. Use Conversion mode you can create full-function PDF that its hyperlinks are usable, but you must use Adobe Acrobat to do this. If you only need PDF for easily print, you can use Virtual Print mode. There are many virtual printers can be selected. You can select an inexpensive third-part virtual printer(e.g. PDF factory) not expensive Adobe Acrobat.
Use Conversion mode to create PDF:
- Create a single html file using Single Html format.
- Start Adobe Acrobat.
- Use menu File > Create PDF > From Web Page to open Create PDF from Web Page dialog box. Click Browse... button to select the html file you have created in step 1. Then click Create button to start the conversion.
- Use menu File > Save to save the file as .PDF file when the conversion complete.
Use Virtual Print mode to create PDF:
- Create a single html file using Single Html format.
- Open the html file using Internet Explorer.
Tools>Internet Options>Advanced>Printing>Print background colors and images should be set as checked.
- Use menu File > Print... to open Print dialog box.
- Select a Virtual Printer, then click Print button.
- Following the prompt to finish the output.
Virtual Print mode has another advantage: you can use any program that has print function to create PDF files.
Tip: It is a better way to create PDF that convert Single HTML to Microsoft Word Document at first, then we can add Table of contents, header and footer to the document, in the end print the document to a PDF file using Virtual Printer.