FRAMES   NO FRAMES

MIF Doclet Home Page

MIF Doclet
for Generating FrameMaker and PDF Documents

Version 1.2 Beta 2

Disclaimer - The MIF Doclet is experimental code developed for internal use at Sun and released to the developer community for use as-is. It is not a supported product. Use at your own risk. While we intend and have worked to make it useful, bugs might not be fixed and features might not be added. We reserve the right to release updates with an incompatible implementation or page layout.

Reference Guide

Running Customizing

Reference Guide

What is the MIF Doclet?

The MIF Doclet is an extension to the JavadocTM tool that generates API documentation in MIF (Maker Interchange Format) from declarations and doc comments in source code in the JavaTM programming language. It uses exactly the same set of Javadoc tags (such as @return, @param and @see) that the standard doclet uses. FrameMaker batch processing programs enable these MIF documents to automatically be opened in Adobe FrameMaker and converted to FrameMaker native binary format, PDF or PostScript. Alternatively, you can manually choose "Save As" to save to Microsoft RTF, Microsoft Word or WordPerfect.

The goal has been to create a general, flexible means of conversion from doc comments to MIF that can be easily adapted to your own FrameMaker layout, style definitions and book organization. It tries to replicate much of the content generated by the standard HTML doclet. However, the page layout has been modified from the standard HTML doclet to add more layout options and to reduce vertical space, as page count needs to be conserved in print documentation. To obtain denser content, we put subheadings and data on the same line (rather than on separate lines) where possible, and eliminated repetition, such as by removing the "first sentence" from the index. The features list below covers the myriad options.

Changes in this release see the CHANGES file:

Known Bugs and Feature Requests - For a live list of known bugs and feature requests extracted from our database, see the link on the CHANGES page.

Comments, Questions, Suggestions - We'd like to hear from you.

License - To view the license for the MIF doclet, open LICENSE.html in the top level of the installed directory.


Sample Generated Books

Examples of books generated with the MIF Doclet:

Benefits

The benefits of a MIF Doclet over the standard HTML doclet are:

Features

The MIF Doclet includes the following features. This summary individually mentions (and has a link to) each of the options (over 80 in number) so that you can get a full picture of what the capabilities are.

System Requirements

The MIF Doclet is 100% Java, and so runs on any operating system where Java platform is installed. It has minimum and recommended system requirements:

Minimum requirements - This enables you to generate documentation only as MIF files and not generate FrameMaker or PDF files. This is insufficient for most uses, but can be useful if the source files and FrameMaker are not both available simultaneously. At minimum, you need:

Recommended requirements - This enables you to generate MIF, FrameMaker and PDF files and automate the entire process on Solaris, Windows, or AIX. You will also need:

Testing, Memory and Speed

The following table shows the kind of hardware and memory we have used to test the MIF Doclet, and some typical times to generate PDF.

Small Document - The MIF Doclet takes 35 seconds to convert the test packages (com.package1 and com.package2) included in the download bundle running the minimal batch example, as shown in the table below. You can run this test yourself with the included files -- the required batch files and scripts are included.

Large Document - As a test for handling large documents, we have run the MIF Doclet on the source code for the entire Java 2 Platform, Standard Edition, v 1.3, which is 77 packages. It took about an hour, as shown in the table below. The largest FrameMaker file was javax.swing.fm at 11MB.

No. of Java Packages Machine Memory Java SDK Version FrameMaker Version Time to Generate PDF No. of FrameMaker Files PDF Size
Small Document 2 packages Sun Ultra 1 SPARC workstation 20MB (-J-mx20M) J2SE 1.3.0 Solaris FrameMaker 5.5.6 35 sec. 10 files 1 PDF file
67 pages
450kB
Large Document 77 packages Sun Ultra Enterprise 450, 400MHz, high speed disk array and 2GB of physical memory 2000MB (-J-mx2000M) JDK 1.2.2 Solaris FrameMaker 5.5.6 1 hour 82 files 1 PDF file
12,025 pages
119MB

Testing Across Multiple Operating Systems - Sun has tested the MIF Doclet extensively only with the Solaris version of FrameMaker 5.5 and 6.0. We have tested it only briefly with the Windows version of FrameMaker, and are interested in having it well run on all platforms. Many users are using it successfully on Windows. If you test it with other FrameMaker versions and other operating systems and determine that it does or does not work, please let us know so we can mention and possibly fix it. (One developer has reported that FrameMaker 5.1 generates "Invalid opcode" errors when opening a MIF file, and the page looks okay except for some extra spacing, but the text cannot be exported to RTF.)


Limitations

Here are some known limitations and restrictions of the MIF Doclet:

MIF Doclet Command Syntax

The command syntax is basically the Javadoc syntax with -doclet and -docletpath options and additional MIF doclet options.

javadoc -doclet com.sun.tools.doclets.mif.MIFDoclet \
        -docletpath
path/mifdoclet.jar \
        [options] [packagenames] [sourcefiles] [@files]

See an example of the MIF doclet command.

Arguments can be in any order.

-doclet com.sun.tools.doclets.mif.MIFDoclet
Specifies the fully-qualified name of the doclet class that contains the start method. In this case, this is the MIFDoclet class.
-docletpath path/mifdoclet.jar
Specifies the path and filename of the MIF doclet jar file. The path separator is "/" on Solaris and "\" on Windows. (If the class files are not in a jar file, this must specify the path of the directory containing the class file specified in the -doclet option.)
options
Command-line options, as specified in this document.
packagenames
A space-separated list of names of packages that you want to document, such as com.package1 com.package1. You must explicitly specify each package you want to document. Javadoc uses -sourcepath to find these packages. Wildcards such as asterisks (*) are not allowed -- the MIF doclet cannot recursively traverse subpackages.
sourcefiles
(Not implemented)
@files
One or more files that contain any of the previous arguments in any order.

MIF Doclet Options

You can access MIF Doclet options as command line options or as XML Book File elements. When both are present, XML elements override their command line option equivalents. Below are the lists of the options (by name and by subject), followed by the alphabetic detailed listing of all options and elements.
NOTE - You can also view lists of options in a separate HTML frame along the left margin of this web page by choosing FRAMES at the top of this document. This makes it quite easy to move quickly from option to option.

Command Line Options
- In the list below, this symbol denotes the command line options for the MIF Doclet. All command line option names are case-insensitive, though a few arguments, where noted, are case-sensitive.

NOTE - The following command line options have no equivalent as XML book options because they are implemented in the javadoc tool and not in doclets: -bootclasspath, -classpath, -doclet, -docletpath, -encoding, -extdirs, -help, -J, -locale, -package, -private, -protected, -public, and -sourcepath. These command line options have no equivalent, as explained in their detailed description: -noalmanac, -nopackagepage.
XML Book File Elements
- In the list below, this symbol denotes the command line options for the MIF Doclet. Using XML book file elements provides more capability beyond command line options: You can add non-Javadoc chapters, add appendixes, add sections to the front and back matter, and sort the packages and classes as desired (command line options allow only alphabetic sorting). For more details, see XML Book File. All element names are case-insensitive, though a few arguments, where noted, are case-sensitive.

Options - Listed by Name

A quicker way of accessing these options is to display the list in the left-hand frame.

almanacfile
author
backmatter
batch
batchfilepaths
batchmapfile
book
bookauthor
bookcopyright
bookdedication
bookfilename
bookpublisher
booksubtitle
booktitle
bookversion
bootclasspath
chapter
chapternumbering
chapters
chapterstring
class
classpath
columnwidth
combineoverloads
constantsfile
constantvaluespage
contentsfile
d
declarationhead
descriptionhead
destination
doclet
docletpath
encoding
excludeclasses
extdirs
frontmatter
group
help
hrefdocroot
imageresolution
importformats
includebook
indexfile
indexonecolumn
indexstyle
insertapidoc
J
link
linkoffline
locale
memberhead
membersummary
noalmanac
noclassprehead
noclasssummary
noclasstree
nodeprecated
noexecutebatch
noinheritedsummary
nooverview
nopackagepage
nopackageprehead
nopackagesummary
noqualifier
nosince
noxrefpagenumber
overviewfile
overviewtitle
overviewtree
package
package
print
private
protected
public
replacetitlestr
sectionfile
setuservariable
sortmembers
sourcepath
split
stylemapfile
summarytablefirstcolumn
titlefile
verbose
version

Options shown in italic are the Javadoc core options, which are provided by the front end of the Javadoc tool (and are available to all doclets). The MIF doclet itself provides the non-italic options.

Options - Listed by Subject

A quicker way of accessing these options is to display the list in the left-hand frame.

Basic Execution
doclet
docletpath
sourcepath
classpath
d
destination
J
verbose
help

Special Execution
bootclasspath
extdirs
locale
encoding

Batch & Print
batch
print
batchfilepaths
batchmapfile
noexecutebatch

Inclusion/Exclusion
public
package
private
protected
excludeclasses
nodeprecated

XML Book File
book
includebook

FM Book File
bookfilename
split

Parts
frontmatter
chapters
backmatter

Title Pages
titlefile
booktitle
booksubtitle
bookversion
bookauthor
bookpublisher
bookcopyright
bookdedication
replacetitlestr

Table of Contents Pages
contentsfile

Chapter & Section Pages
chapter
sectionfile
chapternumbering
chapterstring

Overview Pages
overviewfile
overviewtitle
overviewtree
group
nopackagesummary
nooverview

Package & Class Pages
insertapidoc

package
nopackagepage
nopackageprehead

class
author
combineoverloads
memberhead
membersummary
sortmembers
version
noclassprehead
noclasssummary
noclasstree
noinheritedsummary

Constant Values Page
constantsfile
constantvaluespage

Almanac Pages
almanacfile
noalmanac

Index Pages
indexfile
indexstyle
indexonecolumn

All Pages
columnwidth
declarationhead
descriptionhead
hrefdocroot
imageresolution
link
linkoffline
noqualifier
nosince
noxrefpagenumber
setuservariable
summarytablefirstcolumn

Custom Files
importformats
stylemapfile

Options shown in italic are the Javadoc core options, which are provided by the front end of the Javadoc tool (and are available to all doclets). The MIF doclet itself provides the non-italic options.

Option Details

The following section lists all MIF Doclet options alphabetically and describes them in detail. Both the command line options and XML book file options are described.

We've tried to stick to some guidelines when naming options. A useful one is:

All options that take a filename as an argument have names that end with "file".
These include -almanacfile, -batchmapfile, -contentsfile, -indexfile, -overviewfile, -stylemapfile, -titlefile, and <SectionFile>. Exception include -importformats and -print.

almanacfile
-almanacfile miffile | fmfile   (Command line)
<AlmanacFile> miffile | fmfile </AlmanacFile>   (XML book file)
The almanac is a concise listing of the API, with layout similar to The Java Developers Almanac by Patrick Chan. Each class and interface is listed with a class hierarchy diagram and a list of each member's declaration. The <AlmanacFile> tag can be positioned either as a chapter or as a section in the back matter.

This option generates an almanac-formatted chapter or section, inserting the file specified by miffile. Supplying the default filename of almanac.mif or almanac.fm causes the default, auto-generated almanac to be generated. Supplying any other filename allows you to supply your own almanac.

There are some differences depending on whether you supply an XML book file when executing the MIF doclet:

  • If you supply an XML book file, the default, auto-generated almanac is generated only if you specify:
       <AlmanacFile> almanac.mif </AlmanacFile>
    
    Specify a different filename only if you want to supply your own almanac.

  • If you use only command line options and do not supply an XML book file, you can auto-generate the default almanac by either omitting the -almanacfile option altogether or by specifying -almanacfile almanac.mif. Use -noalmanac to suppress the almanac. Use a different filename if you want to supply your own almanac.

You can substitute almanac.fm in any of the places above where almanac.mif is used.

The almanac tables are mostly hard-coded into the MIF doclet. They do not use the table definitions of AlmanacTable or AlmanacTablehead in the template. However, because the almanac tables are designed to fill the column widths, you can adjust their widths with the -columnwidth option.

Limitations - The current version has no option for either changing the almanac chapter title or for adding text ahead of the API. You can insert these by hand. Also note that, by design, the list of members does not include nested classes (either static or nonstatic). Also, while Patrick Chan's almanac includes inherited members, this one does not.

Almanac Legend - The almanac contains some Zapf Dingbat symbols that represent abstract, final, static, protected, constructor and field. The almanac legend (almanaclegend.mif) displays and describes these symbols. This legend also identifies the class name, package name, class hierarchy, inheritance chain, implemented interfaces, @since comment, and return type. This legend file is automatically copied from the resources directory of mifdoclet.jar whenever the almanac is created.

author
-author   (Command line)
<Author enabled="true"|"false" />   (XML book file)
Creates an "Author" subhead at the end of the class description, followed by the text from the @author tag. You can have one or more @author tags. Example:
Author: Doug
This option is the same as the -author option in the Javadoc core options.

backmatter
(No equivalent for command line)  
<BackMatter> ... </BackMatter>   (XML book file)
Defines the back part of the book -- from the end of the last chapter to the end of the book. There is no action associated with this tag. Page number continues in arabic style from the chapters part of the book. This element is actually not necessary and can be omitted, as it performs no action. This element is included to make the XML book file more human-readable. This option has no command line equivalent.

batch
-batch path/fmbatch | path/dzbatcher   (Command line)
<Batch> path/fmbatch | path/dzbatcher </Batch>   (XML book file)
NOTE - This option requires the program fmbatch or dzbatcher.
Creates the batch file mif-to-fm.batch, then uses fmbatch or dzbatcher, as specified, to run it. This option converts the MIF files to FrameMaker files, updates the page numbers and cross-references, and generates the table of contents and index. If this option is omitted, complete MIF files are generated, but no batch file is created, and therefore the MIF files are not converted to FrameMaker files, and none of the other operations just described are performed; the table of contents and index files are created but are empty.

If its path is in your system's PATH setting, you can supply just the batch program name without its path, such as:

     -batch fmbatch
If the batch program cannot be found, you get an error like "File not found." Or you can supply the full path with the argument. Use the path separator appropriate to your operating system: backslash (\) for Windows and forward slash (/) for Solaris:
     -batch /usr/local/frame5.5.6/bin/fmbatch
For more information about the batch commands in mif-to-fm.batch, see Install the batch program under setup.

NOTE - In version C, if you wanted to run the batch files, you had to supply not only the -batch option but also the -bookfile option (now -bookfilename. Omitting -bookfile would prevent the FrameMaker files from being generated. This dependency has been removed in this version -- if -batch is supplied without -bookfilename, it will create a FrameMaker book file and generate the FrameMaker files.

Also see related option -noexecutebatch.

batchfilepaths
-batchfilepaths absolute | relative   (Command line)
<BatchFilePaths> absolute | relative <BatchFilePaths>   (XML book file)
Sets the paths of files in the generated batch file to absolute (default) or relative. Relative is useful when generating the MIF files (which do not require the batch processor) on one machine and then converting from MIF to FM on another machine. The default is absolute because we have encountered a bug, when using relative, with getting the MIF doclet to properly call dzbatcher on Windows NT.

batchmapfile
-batchmapfile file.map   (Command line)
<BatchmapFile> file.map <BatchmapFile>   (XML book file)
(Very rarely used.) Specifies a file for mapping batch commands for use with a MIF batch processor such as fmbatch or dzbatcher. The MIF doclet contains built-in versions of this file for these two batch processors: fmbatch.map and dzbatcher.map (located in the com/sun/tools/doclets/mif/resources directory of the jar file). If you omit this option, the MIF Doclet uses the built-in versions. You can also specify the built-in versions by specifying the built-in filename with no path, such as:
   -batchmapfile fmbatch.map
This option looks in the current directory from where the doclet was started for a file of that name before using the default version.

If you copy the build-in file to the current directory, renamed it myfmbatch.map, and modified it, you would call it as follows:

   -batchmapfile ./myfmbatch.map

Supply a different file with the -batchmapfile option only in the unlikely event that the mappings change or you are using a third batch processor.

To illustrate the need for mapping, fmbatch and dzbatcher accept different syntax for printing to a printer; fmbatch takes:

Print file  settingsfile
while dzbatcher takes:
Print -p settingsfile  file
These commands are abstracted in fmbatch.map as:
PrintGeneric=Print $gen $settings
and in dzbatcher.map as:
PrintGeneric=Print -p $settings $gen
book
-book xmlfile   (Command line)
(No equivalent for XML book file)   (XML book file)
Names the XML book file (or subbook) to use. This file contains XML elements that substitute for most of the command line options. It also can specify the order of files to be generated. See also XML Book File. Example:
       -book book.xml
For a full example, see XML book file example.

For information on master book and subbook files, see includebook.

bookauthor
-bookauthor authorstring   (Command line)
<BookAuthor> authorstring </BookAuthor>   (XML book file)
Searches for all instances (normally one) of the string "[BookAuthor]" in the title file titlepage.fm and replaces each one with authorstring. Used for specifying the name of the author or authors of the book being generated. The authorstring can contain any of the FrameMaker special characters. This option is a shortcut for using replacetitlestr.

bookcopyright
-bookcopyright copyrightstring   (Command line)
<BookCopyright> copyrightstring </BookCopyright>   (XML book file)
Searches for all instances (normally one) of the string "[BookCopyright]" in the title file titlepage.fm and replaces each one with copyrightstring. Used for specifying the copyright statement for the book being generated. The copyrightstring can contain any of the FrameMaker special characters. This option is a shortcut for using replacetitlestr.

bookdedication
-bookdedication dedicationstring   (Command line)
<BookDedication> dedicationstring </BookDedication>   (XML book file)
NOTE - Because most API documents do not normally contain a dedication, this option is different from all the other book* options that replace strings in the title file: The string "[BookDedication]" does not appear in the default title file. To make this option work, you must add this string to the title file (and use the titlefile options). You would normally put the dedication on a new page.
This option searches for all instances (normally one) of the string "[BookDedication]" in the title file titlepage.fm and replaces each one with dedicationstring. Used for specifying the names of those who the book is to be dedicated to. The dedicationstring can contain any of the FrameMaker special characters. This option is a shortcut for using replacetitlestr.

bookfilename
-bookfilename filename.book   (Command line)
<BookFilename> filename.book </BookFilename>   (XML book file)
Names the MIF book file with filename. (Also names the PDF file, as described below.) It will not alter or add an extension to the filename you supply. For example, you can name it myapi.book or myapibook (with no extension). However, the common convention is to use the .book extension. If you omit this option, the Framemaker book file is named api.book. This book file is a type of FrameMaker file that contains the filenames of all the files in the book, including the title page, contents page, overview page, package pages (if any), class pages, and index page.

Because the PDF filename is derived from by changing the .book extension to .pdf, this option also renames the PDF file.

(Was named -bookfile in version C.)

bookpublisher
-bookpublisher publisherstring   (Command line)
<BookPublisher> publisherstring </BookPublisher>   (XML book file)
Searches for all instances (normally one) of the string "[BookPublisher]" in the title file titlepage.fm and replaces each one with publisherstring. Used for specifying the name of the publisher of the book being generated. The publisherstring can contain any of the FrameMaker special characters. This option is a shortcut for using replacetitlestr.

booksubtitle
-booksubtitle subtitlestring   (Command line)
<BookSubTitle> subtitlestring </BookSubTitle>   (XML book file)
Searches for all instances (normally one) of the string "[BookSubTitle]" in the title file titlepage.fm and replaces each one with subtitlestring. Used for specifying the name of the subtitle of the book being generated. The subtitlestring can contain any of the FrameMaker special characters. This option is a shortcut for using replacetitlestr.

booktitle
-booktitle titlestring   (Command line)
<BookTitle> titlestring </BookTitle>   (XML book file)
Searches for all instances (normally one) of the string "[BookTitle]" in the title file titlepage.fm and replaces each one with titlestring. Used for specifying the name of the title of the book being generated. The titlestring can contain any of the FrameMaker special characters. This option is a shortcut for using replacetitlestr.

bookversion
-bookversion versionstring   (Command line)
<BookVersion> versionstring </BookVersion>   (XML book file)
Searches for all instances (normally one) of the string "[BookVersion]" in the title file titlepage.fm and replaces each one with versionstring. Used for specifying the name of the version of the API or book being generated. The versionstring can contain any of the FrameMaker special characters. This option is a shortcut for using replacetitlestr.

bootclasspath
-bootclasspath pathlist   (Command line)
(No equivalent for XML book file)  
Overrides location of class files loaded by the bootstrap class loader. This option is identical to the -bootclasspath option in the Javadoc core options.

chapter
(No equivalent for command line)  
<Chapter> ... </Chapter>   (XML book file)
Defines a chapter. The first chapter resets the page numbers to page 1, Arabic style. Chapters also can have chapter numbers, as defined by <ChapterNumbering>. This option has no command line equivalent.

chapternumbering
-chapternumbering   (Command line)
<ChapterNumbering enabled="true"|"false" />   (XML book file)
Turns chapter numbering on by generating a paragraph containing the chapter string, and applying the FrameMaker style ChapterNumber to that paragraph. The ChapterNumber style definition provides the chapter number. When enabled is set false, the paragraph is not generated (and chapter string and number are thereby ignored).

When using the -chapternumbering command line option, each new package starts a new chapter. (This is similar to using an XML book file and specifying a new chapter with the <Chapter> tag.)

chapters
(No equivalent for command line)  
<Chapters> ... </Chapters>   (XML book file)
Defines the part of the book where the chapters are included. The only action is that the page numbers are reset to page 1, Arabic style, at the start of this section. These tags are actually not necessary -- if omitted, the first <Chapter> element is interpreted as the end of the front matter and start of the first chapter. This element is included primarily to make the XML book file more human-readable. This option has no command line equivalent.

chapterstring
-chapterstring string   (Command line)
<ChapterString> string </ChapterString>   (XML book file)
Inserts string ahead of the chapter number at the top of a chapter file. A typical use (in English) is:
   -chapterstring "\r\rCHAPTER\s"
The special characters \r\r insert two new lines above the string as part of the same paragraph. This moves this paragraph (and subsequent paragraphs) vertically down the page, to provide some blank space at the top of the first page of each chapter. This blank space is needed to make room for the chapter number in the default template, which is much taller than the string "CHAPTER". The \s inserts a space after the string, before the page number.

class
(No equivalent for command line)  
<Class> classname </Class>   (XML book file)
Generates and inserts the class page for the specified classname. This option has no command line equivalent. Example:
     <Class> java.lang.Object </Class>

classpath
-classpath pathlist   (Command line)
(No equivalent for XML book file)  
Specifies where to find user class files. This option is identical to the -classpath option in the Javadoc core options.

columnwidth
-columnwidth width | default   (Command line)
<ColumnWidth> width | default </ColumnWidth>   (XML book file)
This option is used to set the width of MIF tables that are generated from HTML tables whose width is expressed as a percentage of the browser window's width. An HTML table of width 100% converts to a MIF table whose width is width. Specify for width the width of the text column in your template using any of the dimensions shown in the table below. If this option is omitted, or if a value of default is used, the column width is 470 points, which is designed for the default 8.5 x 11" template.mif.

This applies not only to doc comment tables that are supplied by the user, but also to summary tables for packages, classes and members that are synthesized by the doclet. It does not apply to HTML tables whose width is specified as a fixed dimension rather than a percentage. You'll notice if you create a custom template that changes the width of the text column from the default of 470pt, you will need to use this option to correspondingly change the width of the tables.

For example, if an HTML table has a width specified as follows; notice percentages must be used in both the TABLE and TD tags:

    <TABLE WIDTH="100%">
        <TR>
            <TD WIDTH="40%">
                First column.
            </TD>
            <TD WIDTH="60%">
                Second column.
            </TD>
        </TR>
    </TABLE>
the following option would cause the corresponding MIF table to have an overall width of 4.5 inches:
    -columnwidth 4.5in
In the future we might require a percentage appear only in the TABLE tag and not in the TD tags.

A proportionally larger or smaller percentage would set the table wider or narrower. Specifically, an HTML table set to <TABLE WIDTH=n%> would have its width in the MIF document set to n% x width. For example, with <TABLE WIDTH=80%> and -columnwidth 4.5in, the MIF table width would be set to 80% x 4.5 inches = 3.6 inches.

This option is named "columnwidth" because a value of 100% corresponds to the width of the text column. Notice that the FrameMaker template's master pages define the actual width of the text column -- this option does not set the width of the master page column.

In the future, this option may also apply to images and horizontal rules with widths specified as percentages, when those features are supported by the MIF doclet.

Table width dimensions - Acceptable units for width are points, inches, picas, centimeters, and millimeters, which can be entered shown in the following table. All the values shown below are approximately equivalent -- that is, 328 points = 4.5 inches = 27 picas = 11.43 centimeters = 114.3 millimeters. The dimensions can be entered in uppercase, lowercase or mixed case. You can put a space between the value and dimension, but then must enclose them both in quotes, such as "328 points".

width Meaning
328
328pt
328point
328points
328 points
4.5i
4.5in
4.5inch
4.5inches
4.5 inches
27pi
27pc
27pica
27picas
27 picas
11.43c
11.43cm
11.43 centimeters
114.3m
114.3mm
114.3 millimeters
Also see -summarytablefirstcolumn.

combineoverloads
-combineoverloads   (Command line)
<CombineOverloads enabled="true"|"false" />   (XML book file)
Combines declarations and documentation for method overloads under a single heading. The declarations and documentation for each overload is appended under the heading. Also sets memberhead to noargs, since that is the appropriate heading. For example, the overloaded methods getImage(URL) and getImage(URL, String) in java.applet.Applet would appear as shown in the following example. Notice there may be redundancy. You may want to re-write doc comments to eliminate redundancy.

getImage
public java.awt.Image getImage(java.net.URL url)

Returns an Image object that can then be painted on the screen. The url that is passed as an argument must specify an absolute URL.

Parameters:
url - an absolute URL giving the location of the image.
Returns:
the image at the specified URL.
See Also:
Image

public java.awt.Image getImage(java.net.URL url,                                java.lang.String name)
Returns an Image object that can then be painted on the screen. The url argument must specify an absolute URL. The name argument is a specifier that is relative to the url argument.

Parameters:
url - an absolute URL giving the base location of the image.
name - the location of the image, relative to the url argument.
Returns:
the image at the specified URL.
See Also:
Image

constantvaluespage
constantsfile
-constantvaluespage   (Command line)
<ConstantsFile> constant-values.mif </ConstantsFile>   (XML book file)
Generates a section with a list of values for the static constant fields in the classes and interfaces being documented. It also inserts a link at the detailed description of each static constant field, so someone reading the field description can follow the link to the field's value in this list.

For an example of <ConstantsFile>, see XML Book File example.

Notice the command line option and xml book file options have different names and arguments. In both cases, the option must be included for the constants page to appear. The -constantsvaluespage option will disappear in a later version of the MIF Doclet, when the constants page will be generated by default from the command line.

Default Constants File - To generate the default constants page, pass in constant-values.mif or constants.fm:

<ConstantsFile> constant-values.mif </ConstantsFile>
Results: In this case, the doclet copies the resource file constant-values.mif from mifdoclet.jar to the mif (or fm) destination directory and imports formats from template.mif.

Custom Constants File - You can modify the main heading, formatting and layout of the table of constants. The file should be empty except for any static text you want to appear in the finished file. It should have whatever style definitions the table of constants needs, as the doclet will not import a template into this file. To supply this file, you pass in its path and filename, for example:

<ConstantsFile> myconstant-values.mif </ConstantsFile>
You can precede the specified file by a path that is absolute, or is relative to the current directory from where the MIF doclet is started. If you want to use the default name and keep it in the current directory, you can do so by prefixing it with the current directory:
<ConstantsFile> ./constant-values.mif </ConstantsFile>
Results: When specifying a custom constants file, the doclet copies the specified constants page file to the mif (or fm) destination directory and includes it in the generated FrameMaker book file as a .fm file. (If the file is not found, the MIF Doclet prints a warning and continues.) The doclet does not import formats into that file, even if -importformats is specified. This enables you to modify that custom file without regard to the styles in the imported template.

contentsfile
-contentsfile miffile | fmfile   (Command line)
<ContentsFile> miffile | fmfile </ContentsFile>   (XML book file)
Use this option to specify the file used for the table of contents page.

Default Contents File - To generate the default contents page, pass in contents.mif or contents.fm:

<ContentsFile> contents.mif </ContentsFile>
Results: In this case, the doclet copies the resource file contents.mif from mifdoclet.jar to the mif (or fm) destination directory and imports formats from template-roman.mif.

Custom Contents File - You can modify the main heading, formatting and layout of the table of contents. The file should be empty except for any static text you want to appear in the finished file. It should have whatever style definitions the table of contents needs, as the doclet will not import a template into this file. To supply this file, you pass in its path and filename, for example:

<ContentsFile> mycontents.mif </ContentsFile>
You can precede the specified file by a path that is absolute, or is relative to the current directory from where the MIF doclet is started. If you want to use the default name and keep it in the current directory, you can do so by prefixing it with the current directory:
<ContentsFile> ./contents.mif </ContentsFile>
Results: When specifying a custom contents file, the doclet copies the specified contents page file to the mif (or fm) destination directory and includes it in the generated FrameMaker book file as a .fm file. (If the file is not found, the MIF Doclet prints a warning and continues.) The doclet does not import formats into that file, even if -importformats is specified. This enables you to modify that custom file without regard to the styles in the imported template.

Contents styles - This option builds the contents from the following paragraph styles that are currently hard-coded into the MIF doclet:

    SectionHead
    OverviewHead
    PackageHead
    ClassHead
    ChapterHead
    AlmanacHead
    IndexHead

Setting up the custom contents file - Apply the master page on the first page of this custom contents file as you would like the first page to end up (the name of this first master page can be any name you want). Set up the master pages named "Left" and "Right" to have the layout you want for the subsequent contents pages. Set the page number style to arabic (1, 2, ...) or roman numeral (i, ii, ...). If this is the first file in the book, this style will determine how the page number style of the front matter.

Command line note - If you are running the MIF doclet strictly from a command on the command line to (and not calling an XML book file), the contents page file is generated by default even when this option is omitted from the command line.

d
-d directory   (Command line)
<D> directory </D>   (XML book file)
The elements <D> and <Destination> are synonyms. This option sets the destination directory for the generated files. If the argument is not an absolute path, it is relative to the current directory from where the doclet is started. The argument directory can contain spaces except if using dzbatcher, which contains a bug that does not allow spaces. The fmbatch program does support spaces in filenames. The MIF Doclet creates directory if it doesn't exist. It also creates subdirectories named mif, fm and pdf to hold the MIF, FrameMaker and PDF files, respectively.

declarationhead
-declarationhead  "class member" | cm | all | none   (Command line)
<DeclarationHead>  "class member" | cm | all | none </DeclarationHead>   (XML book file)
Generates the word "Declaration" as a heading before the declaration statement in the specified sections. Note that this option takes only a single argument, which can be a string with any combination of the words class or member, any combination of the letters cm, or the word all (which means generate both class and member headings), or none (which means generate no headings). The default argument is class. These options are a subset of those shown above in -descriptionhead.

descriptionhead
-descriptionhead "overview package class member" | opcm | all | none   (Command line)
<DescriptionHead> "overview package class member" | opcm | all | none </DescriptionHead>   (XML book file)
Generates the word "Description" as a heading before the description text in the specified sections. Note that this option takes only a single argument, which can be a string with any combination of the words overview, package, class, and member, any combination of the letters opcm, or the word all (which means generate all four headings), or none (which means generate no headings). The default is overview package class.

o  or  overview Overview page
p  or  package Package page
c  or  class Class page
m  or  member Member section

For example, using "-descriptionhead class" for the java.applet package would cause the heading "Description" to appear before its class description, like this:

Description
Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.

destination
(No equivalent for command line)  
<Destination> directory </Destination>   (XML book file)
Synonym for <D>, listed above.

doclet
-doclet class   (Command line)
(No equivalent for XML book file)  
Specifies the starting class for the doclet, using the fully-qualified name. For the MIF doclet, use:
    -doclet com.sun.tools.doclets.mif.MIFDoclet
This option is identical to the -doclet option in the Javadoc core options.

docletpath
-docletpath path/mifdoclet.jar   (Command line)
(No equivalent for XML book file)  
Specifies the path and filename of the MIF doclet jar file. The path can be either absolute or relative to the current directory from where the doclet is run. The path separator is "/" on Solaris and "\" on Windows.

An example of -docletpath is shown in the minimal example.

This is all you need to know for the standard implementation of the MIF Doclet. If you are modifying the MIF doclet to rely on other jar files, you might need the more general form:

-docletpath docletpathlist
where docletpathlist specifies the path and filename of the doclet jar file plus any jar files it depends on. If the class files are not in a jar file, instead specify the path of the directory containing the class file specified in the -doclet option. If docletpathlist contains multiple paths, they should be separated with a colon (:) on Solaris and a semicolon (;) on Windows.

This option is identical to the -docletpath option in the Javadoc core options.

encoding
-encoding name   (Command line)
(No equivalent for XML book file)  
Specifies encoding name of the source files. This option is identical to the -encoding option in the Javadoc core options.

excludeclasses
-excludeclasses class1:class2:...   (Command line)
<ExcludeClasses> class1:class2:... </ExcludeClasses>   (XML book file)
Specifies the classes to be excluded from the documentation, where class1:class2... are fully-qualified class names. For example:
-excludeclasses java.applet.AppletStub:java.applet.AudioClip
This causes the corresponding class pages to be omitted from the documentation, and these class names to be omitted from the Class Summary for their packages.

extdirs
-extdirs dirlist   (Command line)
(No equivalent for XML book file)  
Overrides location of installed extensions. This option is identical to the -extdirs option in the Javadoc core options.

frontmatter
(No equivalent for command line)  
<FrontMatter> ... </FrontMatter>   (XML book file)
Defines the front part of the book -- from the title page up to where the first chapter begins. The action is that the page numbers start with page 1, Roman numeral style, starting at the first page in the book (normally the title page). This element is actually not necessary -- if omitted, any elements ahead of the first <Chapter> element are interpreted as the front matter. This element is included to make the XML book file more human-readable. This option has no command line equivalent.

group
-group groupheading  pkgpattern1:pkgpattern2... (Command line)
<Group> groupheading  pkg1:pkg2... </Group>   (XML book file)
Groups packages together in a table on the overview page as described in the standard doclet. You can supply a different group option for each set of packages you want to group. If you omit this option, all packages appear in a single group named "Package Summary".

Important Restriction - Notice in the syntax above that that the -group option takes a wildcard pattern while the <Group> option does not. In other words, the former can take the wildcard '*' character, while the latter takes only an explicit list of package names. (If you supply a wildcard with <Group>, it is treated as an illegal package name and none of the packages will match -- they will instead appear under the heading "Other Packages".) For this reason, we use -group in the XML book file example.

The following example groups all java.lang* packages (which includes java.lang and java.lang.reflect) with the java.util package under the heading "Core Packages". (Notice that the period must be omitted following "lang" in "java.lang*" because "java.lang.*" would not match on the java.lang package.)

   -group "Core Packages" "java.lang*:java.util"
   -group "Applet Packages" "java.applet"
This example is equivalent to the previous one. The packages java.lang and java.lang.reflect must both be explicitly called out here.
<Group> "Core Packages" "java.lang:java.lang.reflect:java.util" </Group>
<Group> "Applet Packages" "java.applet" </Group>

help
-help   (Command line)
(No equivalent for XML book file)  
Displays these command line options.

hrefdocroot
-hrefdocroot extdocURL (Command line)
<HRefDocRoot> extdocURL </HRefDocRoot>   (XML book file)
Specifies the URL to prepend to relative hypertext links in <A HREF="URL"> . The argument extdocURL must be an absolute URL. If this option is omitted, then don't display the references for relative links.

Use this option when specifying a relative <A HREF> link in a doc comment, such as:

  /**
   * This is a <a href="../dir1/com.test">label</a> to display.
   */
If you omit the -hrefdocroot option, the following is generated:
   This is a label to display.
If you use this option with the following argument:
  -hrefdocroot "http://java.sun.com/api"
Then when the MIF doclet encounters the above doc comment on the overview.html page, it would prepend the -hrefdocroot argument to the <A HREF> argument as follows:
   This is a label (http://java.sun.com/api/../dir1/com.test) to display.
This option automatically includes the path necessary to reach classes. For example, if the exact same doc comment appeared in the source file for com.package1.Class1, it would generate as as:
   This is a label (http://java.sun.com/api/com/package1/../dir1/com.test) to display.

imageresolution
-imageresolution value% (Command line)
<ImageResolution> value% </ImageResolution>   (XML book file)
Specifies the amount (in percent) to scale explicitly-sized images. An image has an explicit size if it is defined by an <IMG> tag with width and height parameters. It has no effect on images that are missing those parameters. The default value is 100%

Example:

    -imageresolution 60%
This reduces the size of images to 30% of their size determined by width and height parameters. For example, it reduces the size of this image:
    <IMG src ="myimage.gif" width=100 height=50>
to a width of 60 and height of 30 pixels.

importformats
-importformats miffile | fmfile (Command line)
<ImportFormats> miffile | fmfile </ImportFormats>   (XML book file)
Imports formats from the specified miffile or fmfile template into all files generated by the MIF doclet (with the following noted exceptions). If omitted, the doclet imports formats from the default template template.mif. The exceptions include any custom title page (-titlefile), custom table of contents (-contentsfile), and custom index (-indexfile). (The content of these custom files is updated by the MIF Doclet, but they are not formatted by it.)

Default template - To use the default template page, either omit this option altogether, or pass in the string template.mif:

-importformats template.mif
Results: The doclet extracts template.mif from mifdoclet.jar and copies it to the mif (or fm) destination directory and imports formats from it.

Custom template - To supply a custom template, pass in its path and filename, where the path either is absolute, or is relative to the directory from where the MIF Doclet is started. For example, if mytemplate.mif is in the current directory, use:

-importformats ./mytemplate.mif
If the template is in a directory templatedir below the current directory and is saved as a FrameMaker file to mytemplate.fm, use:
-importformats ./templatedir/mytemplate.fm
If you want to use the default name template.mif for your custom template and keep it in the current directory, you must prefix it with the current direc