The ChemBasic function "Create HTML Document".
You can use this function to create an HTML document
for a whole ChemSketch Document
for selected page(s) in the ChemSketch Document.
You will need to use a template file such as the one p 15315d39p rovided, "template.htm".
This template file contains special text that the Goodie will insert in the HTML code to provide the information about the style of your HTML document. A template does not affect the appearance of the document in a browser.
The following key sentences contain the key words and the tags that you want to be inserted in an HTML document:
[PageBlock] <body bgcolor="#0000FF"> - the beginning of a template.
[/PageBlock] - the end of a template.
[PageImage] <img src = [ImageSrc]> - to insert an image.
[PrevPage] <a href= [PrevLink]>Prev</a> - if you want define a link to the page before.
[NextPage] <a href=[NextLink]>Next</a> - if you want define a link to the following page.
All of these key words, plus the start <!-- and the end --> tags are required. Do not forget a space after the comment characters, like this: <!--(space). The text between two key sentences will be printed.
For example, you could put the following lines of text in your template file:
<html>
<head>
<title>Demo Page</title>
</head>
<body>
<p align="center"><b><font face="Arial, Helvetica, sans-serif" size="4" color="#0000FF"><i>
Welcome to the test web page of a ChemBasic function!</i></font></b></p>
< font face="Arial, Helvetica, sans-serif" size="2" color="#0000FF >You can browse any of your Web Pages created through this Goodie by clicking on: </font>
<!-- [PageBlock]<body bgcolor="#0000FF"> -->
<p>
<!-- [PrevPage]<a href=[PrevLink]><font face="Arial, Helvetica, sans-serif" size="2" color="#FFF000"><b>Prev</b></font></a>-->
<!-- [NextPage]<a href=[NextLink]><font face="Arial, Helvetica, sans-serif" size="2" color="#FFF000"><b>Next</b></font></a>-->
</p>
<p>
<!-- [PageImage]<img src = [ImageSrc] align="center" border="1">-->
</p>
<p>
<!-- [PrevPage]<a href=[PrevLink]><font face="Arial, Helvetica, sans-serif" size="2" color="#FFF000"><b>Prev</b></font></a> -->
<!-- [NextPage]<a href=[NextLink]><font face="Arial, Helvetica, sans-serif" size="2" color="#FFF000"><b>Next</b></font></a> -->
</p>
<!-- [/PageBlock] -->
</body>
</html>
To run the "Create HTML Document" function:
1. First, you must have ChemSketch 4.01 and ChemBasic 1.0 or higher installed to the same directory.
2. Click on the Create HTML Document button in the ChemSketch Window.
3. In the ChemSketch dialog box that appears, enter a sequence of ChemSketch pages or select a whole document.
4. In the ChemSketch dialog box, enter an output directory. This must already exist, otherwise a run-time error will occur.
5. In the next ChemSketch dialog box, enter the name of file that contains your lines of template. This template file must already exist, otherwise a runtime error occurs. (Please see above for a sample set of lines of template.)
6. In the last ChemSketch dialog box, you can quit once you have output all the pages to HTML that you want.
|