Tgif Home
----
About Tgif
Current Release & Download
FAQ
Copyright Info
A Screendump of Tgif
Release History
Tools That Tgif Uses
Tools That Work with Tgif
Author of Tgif
Miscellaneous Info
----
 
Return to Tgif's Home Page
William Chia-Wei Cheng
(bill.cheng@usc.edu)
 

Tgif FAQ - Exporting HTML Files

 
When I export in HTML format, all I get is client-side imagemap. Can I make it look more intersting?
In tgif-4.x, you can specify an HTML tempalte file to be used when generating HTML files. This is done through the Set HTML Export Template menu item in the File Menu. This is very handy if you want to put a multipage presentation on the web. The template file will determine the look of the page, and variables in the template will be replaced by corresponding information. These variables have the syntax of an HTML character entity. They all starts with "&tgv" and ends with ";". They are:

&tgvfilename;
This variable will be replaced by the name of the file (without file extension).
&tgvcurnum;
This variable will be replaced by current page number.
&tgvfirstnum;
This variable will be replaced by the first page number (usually 1).
&tgvlastnum;
This variable will be replaced by last page number.
&tgvprevnum;
This variable will be replaced by the previous page number (with wrap around).
&tgvprevnumnowrap;
This variable will be replaced by the previous page number (with no wrap around).
&tgvnextnum;
This variable will be replaced by the next page number (with wrap around).
&tgvnextnumnowrap;
This variable will be replaced by the next page number (with no wrap around).
&tgvtitle;
This variable will be replaced by the title the page or of the file.
&tgvmapobjs;
This variable will be replaced by the objects (specified as tabs) in a client-side image map.

Please try the following example:

  1. The file template.html is used by slides.obj as the HTML template. Please download these 2 files and save them in the same directory. Examine the HTML template file using an editor and see where the variables are.

  2. Open slides.obj in tgif. Note that the page number object on the lower right corner of each page has something like !(STACKED_PAGE_NUM) there instead of the actual page number. This is used because you only want the actual page number when you print/export (and that you don't need to go around and modify the page numbers every time you add a page). Press <Cntrl><Alt>8 or select Slide Show from the Slide Show Submenu of the Layout Menu to go into the slideshow mode, this will number these pages properly. This will also make the file unsavable, which is okay in this case.

  3. Press <ESC> to get out the slideshow mode.

  4. If you print directly into HTML now, the images will be too large. (The current magnification/reduction of the file is set at 142%, which is what I always use for slides.) Select Precise Scale Everything from the Transformation Submenu of the Edit Menu and enter 0.6666. Now tgif will shrink everything by 2/3 (and the final magnification/reduction of the file will be changed to 213.021%). This will take a few seconds.

  5. Select the HTML export format from the Print/Export Format Submenu of the File Menu. Then select Print One File Per Page from the File Menu to generate 3 HTML files (plus 3 GIF files for the bitmap rendering of the slides). This should take a bit longer than the previous step.

  6. Open slides-1.html with your web browser. The navigation arrows at the bottom on the page should work (because the variables have been replaced with the right information).

  7. Please note that the pink text in the slides are valid hyperlinks! If you got back and look at the obj file, you will see that these objects have an HREF attribute attached to them.