Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

35 Producing deliverable results > 35.4 Clearing out old files before converting > 35.4.3 Understanding when not to delete .ref and .htm files


35.4.3 Understanding when not to delete .ref and .htm files

If the files you are converting have no interfile links, you do not need.ref files. However, if there are interfile links, .ref files are essential to make any links to split parts point to the correct split file (see §18.2 Splitting files).

If you are converting to any HTML output type, in the following situations you must provide an explicit setting for EmptyOutputFiles that does not include *.ref:

EmptyOutputDir=Book, and you are converting a book that has interbook links

EmptyOutputDir=File, and you are converting a file that has interfile links.

External links require keeping .ref files

By default, Mif2Go deletes *.ref when EmptyOutputDir is in play (see §35.4.1 Specifying when to delete old files from the project directory) and there is no explicit setting for EmptyOutputFiles (see §35.4.2 Specifying which files to delete from the project directory). When reference files are removed, you lose the information added from other books or files that were already converted. If you are running a series of such conversions, you can delete *.ref files before the first conversion, but not thereafter.

On the other hand, a .ref file might actually be inaccurate if it covers a version of a file that has different page breaks; and .ref files clutter the project directory. It is best to remove them when you are about to reconvert an entire book.

External links might require keeping .htm files

When you are converting a single file with external links (such as a chapter of a book), for links from the file being converted, the .refs for the files referenced are needed. For links to a file being converted, the .ref for that file is needed by the other files. The other .htm files are needed too, because the file being converted might patch other .htm files when references shift to a different split part. Therefore, removing .htm files is hazardous when there are interfile references of any sort; broken links can result.

On the other hand, obsolete and orphaned .htm files can end up in a deliverable if they remain in the project directory, so it is best to remove them when you are about to reconvert an entire book.

See also:

§35.4.1 Specifying when to delete old files from the project directory

§35.4.2 Specifying which files to delete from the project directory

§C.5 Working with reference files for HTML or XML



35 Producing deliverable results > 35.4 Clearing out old files before converting > 35.4.3 Understanding when not to delete .ref and .htm files