| FRAMES NO FRAMES |
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. Running Customizing
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,@paramand@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.
- To send email directly to the MIF Doclet team at Sun, use
.
- To send email to the community of MIF Doclet users, use the MIF Doclet interest group.
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:
- Sample Packages book (PDF, 759KB) - The source and generated files for this book are included in the
testdirectory of this release.- The Real-Time Specification for Java (PDF, 2.7MB),
- Wireless Messaging API (PDF, 770KB)
- Java Card API Specification (PDF, part of download bundle, 2.9MB)
Benefits
The benefits of a MIF Doclet over the standard HTML doclet are:
- Easily printable API documents - PostScript and PDF can be generated from MIF using FrameMaker. With batch processors
fmbatchordzbatcher, you can fully automate this process, printing a set of packages with a single command.- Easily publishable API books - The MIF Doclet can generate headers, footers, a table of contents and an index, with chapter and page numbering, for a complete book. This makes it possible to nearly automate the production of API books.
- Inclusion of API docs into documents written in FrameMaker - MIF-generated API docs can be combined with manually-written FrameMaker documents to make a complete document for distribution. This tightly binds the API and non-API sections for easier download, review and tracking.
- Conversion to other formats - Can manually convert to RTF, Word and WordPerfect using FrameMaker's "Save As" menu option (though this is untested).
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.
- FrameMaker, PS and PDF - Fully automated generation of publication-quality FrameMaker files, PostScript and PDF from doc comments (in
.javafiles) and HTML files. The doc comments produce API documentation and the HTML files produce supplemental sections, such as example code, introductions or design descriptions.
- Batch processing - Can use a batch processing program (
fmbatchordzbatcher) to automate the conversion of the MIF files to FrameMaker native binary files, and generate/update the page break, page numbers, cross-references, table of contents and index. For generating MIF on one machine and converting to FrameMaker on another, you can change paths of filenames from absolute to relative in the generated batch file.
- Javadoc tags - Compatible with doc comments written for the standard doclet. Uses the same set of Javadoc tags (such as
@return,@paramand@see) that the standard doclet uses. Also see Javadoc Tags for a few differences and constraints.- Java and HTML source files - The MIF Doclet supports the same source files as the standard doclet, and in addition it can import and convert HTML files into MIF, resulting in their inclusion in FrameMaker and PDF documents. HTML files can be imported and converted only when using an XML Book File, not when using the command line alone. An HTML file can be included in the front matter, chapters or back matter of a book.
- Many Options - The MIF Doclet has about 80 options. See the typical batch example for the most common command line options. For more complex books, you may need to use the XML book file describe below.
- FrameMaker book file - Includes generation of a FrameMaker book file, making it easy to do book operations (rearrange files, add chapters, print book). Can arrange files in the book split by class or package. Can rename the book file.
- XML book file - To build a complex book, an XML book file is available. This is the XML equivalent of the FrameMaker book file, specifying the WYSIWYG order that files appear in the book. This file enables you to do several things you cannot do with command line options alone: add sections generated from HTML files, specify the order of packages and classes in the API documentation (ordered rather than alphabetically). It lets you specify files in the front matter, chapters and back matter. You can also specify the equivalent of command line options, thus reducing the number of options actually used on the command line to as few as five. See the XML book file example.
- XML master/subbook files - A book file (subbook) can include and override another book file (master book), enabling you to build a hierarchy of book files. The master book file might provide the default options, while the subbook provides the front matter, chapters, back matter, and might override some options. See the XML master/subbook example.
- Table of contents and index - Generates a table of contents and index of the API with page numbers and links into the body of text. Index entries automatically include package, class and members.
- No need to manually open FrameMaker - You can generate an entire book, complete with title page, contents, and index, without ever manually opening a FrameMaker file, even going directly to PDF or a printer. This means you can fully automate book production by modifying only options. For example, the options for booktitle, booksubtitle, bookversion, bookauthor, bookpublisher, bookcopyright, and bookdedication enable you to pass these in as strings.
- Almanac - Generates a concise listing of the API, known as the almanac, with layout similar to The Java Developers Almanac by Patrick Chan.
- Include/exclude classes - If you don't want to document entire packages, you can either include only the classes you specify by listing them in the XML book file, or pass in package names and exclude classes from the generated book. As with the standard doclet, you can also include or exclude classes based on access modifiers (public, protected, package, or private). It can also exclude deprecated classes and members.
- Cross-reference links - Automatically generates internal cross-reference links pointing to package, class and member specifications, which convert to links in PDF output. These are links to superclasses, subclasses, superinterfaces, subinterfaces, implementing classes, inherited members, overridden methods and so forth. (An ability to link to external API documents does not yet work.) An option exists for omitting package name prefixes from class names. The "Link" character style definition is set by default to blue, no underline. You can modify it to any style in a copy of
template.mifthat you import.As with the standard doclet, these auto-generated, internal links appear in many places:
- "See Also" sections generated from
@seetags- In-line text generated from
{@link}tags- Exception names generated from
@throwstags- "Specified by" links to members in interfaces and "Overrides" links to members in classes
- Summary tables listing packages, classes and members
- Package and class inheritance trees
- The table of contents and index
Subscript page numbers appear after each internal cross-reference, which is useful for printed documentation where links are not possible. You can easily turn off the subscript page numbers
- Inherit Comments - Operates the same as the standard doclet for automatic re-use of documentation comments
- HTML tags - Enables HTML tags to be used in source and HTML files to generate the kind of formatting you want. Converts the most common HTML tags to MIF, including images, tables, lists, headings, character styles and entities. The titles in overview, package and class sections can be customized.
- HTML hyperlink anchor tags - For HTML anchor tags (
<A HREF="ref">), rather than creating a live link, the reference appears as text within parentheses following the label. An option exists for supplying a base URL for converting relative links to absolute links.
- GIF images - Copies GIF images in
<IMG>tags from their source location (inside or outside ofdoc-filesdirectory) to the destinationfm/doc-filesdirectory and imports them by reference. Any files in subdirectories of the originaldoc-filesare all moved directly into the destinationdoc-filesrather than into subdirectories. The image resolution is settable.
- Formatting - Has options for formatting the auto-generated content for different pages:
- Title page - Enables creating a title page and substituting for placeholders for the book's title, subtitle, version, author, publisher, copyright, and dedication. You can even replace your own placeholders.
- Chapter pages - Can organize the book by chapters, defining each chapter and Section. Can number chapters and substitute the word "Chapter" with any other string.
- Overview page - Can create an overview page that contains a hierarchical class tree, showing the inheritance relationship of the classes. Can group packages together logically on the overview page. Can substitute for the heading "Overview". Can suppress generation of the overview page. Can suppress the generation of the table of packages that would otherwise be located on the overview page.
- Package pages - Can arrange packages alphabetically or logically. Can omit the Class Summary tables from the package pages. Can omit all package pages.
- Class pages - Can arrange classes alphabetically or logicallly. Allows full, compact or no member summary tables. Can choose to include the author and version of the class. Can omit class hierarchy trees. Can omit the word "package" from the title at the top of each package page. Can omit the package name (such as
java.lang) from the class name heading -- this reduces redundancy and conserves vertical space if you also modify ClassHead to start "Anywhere" (so classes are not forced to start at the top of a page).- Members (on class pages)- Can sort the members by name or group, alphabetically or in source order. Can specify member headings to have arguments, no arguments, or be the full declarations. Can combine overloaded methods under the common method name heading. Can omit inherited API. Provides a means for specifying the column widths of text for pages of different sizes, and for adjusting the width of the first column in summary tables.
- Constant Values - Generates a list of values for all static constant fields.
- Almanac - Generates a concise almanac listing of the API. Can suppress this from the command line.
- Index - Specifies the alphabetic index, with various index styles: hierarchical, flat, or brief. While this index is two columns by default, you can specify that it be one column.
- Custom FrameMaker templates - Enables you to modify the FrameMaker template we provide, and import formats from the custom template into the book. You can also provide your own template, subject to some restrictions. The latter is useful for generating documents in your own format. You can easily rename the FrameMaker styles that the MIF doclet generates, by way of a style mapping properties file.
- Headings - Enables the inclusion or omission of the word "Description" as a heading for description text in overview, package, class and member sections. Enables the inclusion or omission of the word "Declaration" as a heading ahead of the declaration statement in class and member sections.
- Nested classes - As with the standard doclet, when documenting a nested class, the MIF doclet exposes static nested classes the same as any top-level classes. That is, it includes only static nested classes in the "Class Summary" on the package page. Non-static nested classes do not appear in this list, but are available as members in their enclosing class (as are all nested classes). In the almanac, both static and non-static nested classes appear as major headings.
- Since version - The "since" version number derived from the
@sincetag is included in the generated package, class and member documentation by default. You can suppress this.
- Set user variables - You can define FrameMaker variables and define values for them. User variables can be used in body pages or master pages, such as in running headers or footers.
- Diagnostic aids - The MIF doclet generates a batch script file that instructs
fmbatchordzbatchershow to execute. You can prevent this script from running so you can modify it and run it manually.
- Adapting to batch processor changes - In the unlikely event that the batchfile commands might change, a command is included that loads a file that maps the MIF doclet's batch processor commands to those used by fmbatch and dzbatcher. (Very rarely used.)
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:
- Java 2 SDK, Standard Edition, v1.2.2 to 1.4.x. The
javadoctool is installed as part of this SDK.
- FrameMaker 5.5.x or 6.0.x (MIF Doclet has not been tested on earlier or later versions). It runs faster with 6.0 than 5.5. Developers have told us it runs on FrameMaker+SGML as well
- Either
fmbatch(Solaris) ordzbatcher(Windows 2000, NT4.0, Solaris 2.6 or AIX) program as described at Install the batch program- Zapf Dingbats font - Needed only for special characters in the Almanac (symbols for abstract, final, static, protected, constructor and field, and the arrow in the class tree). This font is included with FrameMaker for Solaris and Acrobat for Win32. On Windows, this font is supplied but is not installed. To install it, point Adobe Type Manager to the Acrobat/resource/font/pfm directory and add the fonts found there.
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.package1andcom.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.fmat 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
450kBLarge 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
119MBTesting 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:
- Documents Only Packages - You can pass in only package names and not source filenames (
.java) on the command line. To soften this restriction, the excludeclasses option enables you to exclude classes from the package.
- HTML Limitations - As you probably know, doc comments are written in HTML, not plain text. The MIF Doclet must convert this HTML to MIF. The current MIF Doclet uses a relatively primitive HTML parser for this, which slightly limits the HTML that can be converted to MIF. See Using HTML Tags for more details.
- Cannot Link to External API Documents - The
-linkand-linkofflineoptions are quite limited in this release. This may be fixed in a later release.
- Link Limitations - Anchor tags (
<A HREF="ref">label</A>) lose their live link when converted to MIF, FM or PDF, and the reference is printed instead. The reference appears as text within parentheses. For more information, see HTML Hypertext reference anchor tags.
- Last Paragraph Style Limitation - The MIF Doclet operates on one paragraph at a time, and does not look ahead. Therefore, it currently cannot apply a unique style to the last paragraph in a series (unless it is in a table). Therefore, it cannot apply extra space after the last bulleted or numbered paragraph in a series.
- Two Blank Pages Precede Almanac Legend - The file
almanaclegend.fmcontains two pages: a blank left-hand page followed by the almanac legend on a right-hand page. The styleAlmanacLegendHeadis assigned to start at "Top of Left Page", so it will face the Almanac chapter-opening page. The limitation is that if the previous file ends with a blank left page, you end up with two blank pages in a row. Workaround: Either copy the legend page into the the previous file, or manually adjust the pagination to remove the extra two pages (set Format > Document > Numbering to "Delete Empty Pages").
- Pages Not Generated - By design, the MIF Doclet does not generate all the pages that the standard HTML doclet generates: it does not generate "package use" pages, "class use" pages, "tree" pages, "deprecated API" pages, serialized form pages, or a help page.
The command syntax is basically the Javadoc syntax with-docletand-docletpathoptions and additional MIF doclet options.
javadoc -doclet com.sun.tools.doclets.mif.MIFDoclet \path/
-docletpathmifdoclet.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
startmethod. In this case, this is theMIFDocletclass.-docletpathpath/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-docletoption.)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-sourcepathto 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.
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:XML Book File Elements-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.
- 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.
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.
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-importformatsand
- almanacfile
-almanacfilemiffile | 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.miforalmanac.fmcauses 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:
Specify a different filename only if you want to supply your own almanac.<AlmanacFile>almanac.mif</AlmanacFile>
- 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
-almanacfileoption altogether or by specifying-almanacfile almanac.mif. Use-noalmanacto suppress the almanac. Use a different filename if you want to supply your own almanac.You can substitute
almanac.fmin any of the places above wherealmanac.mifis used.The almanac tables are mostly hard-coded into the MIF doclet. They do not use the table definitions of
AlmanacTableorAlmanacTableheadin the template. However, because the almanac tables are designed to fill the column widths, you can adjust their widths with the-columnwidthoption.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
@authortag. You can have one or more@authortags. Example:Author: DougThis 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
-batchpath/fmbatch |path/dzbatcher(Command line)
<Batch>path/fmbatch |path/dzbatcher </Batch>(XML book file) NOTE - This option requires the programCreates the batch filefmbatchordzbatcher.mif-to-fm.batch, then usesfmbatchordzbatcher, 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 fmbatchIf 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/fmbatchFor more information about the batch commands inmif-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
-batchoption but also the-bookfileoption (now-bookfilename. Omitting-bookfilewould prevent the FrameMaker files from being generated. This dependency has been removed in this version -- if-batchis 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) orrelative. 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 isabsolutebecause we have encountered a bug, when usingrelative, with getting the MIF doclet to properly call dzbatcher on Windows NT.- batchmapfile
-batchmapfilefile.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
fmbatchordzbatcher. The MIF doclet contains built-in versions of this file for these two batch processors:fmbatch.mapanddzbatcher.map(located in thecom/sun/tools/doclets/mif/resourcesdirectory 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.mapThis 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.mapSupply a different file with the
-batchmapfileoption only in the unlikely event that the mappings change or you are using a third batch processor.To illustrate the need for mapping,
fmbatchanddzbatcheraccept different syntax for printing to a printer;fmbatchtakes:whiledzbatchertakes:These commands are abstracted inPrint -psettingsfile filefmbatch.mapas:and inPrintGeneric=Print $gen $settingsdzbatcher.mapas:PrintGeneric=Print -p $settings $gen- book
-bookxmlfile(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.xmlFor a full example, see XML book file example.For information on master book and subbook files, see includebook.
- bookauthor
-bookauthorauthorstring(Command line)
<BookAuthor>authorstring</BookAuthor>(XML book file) - Searches for all instances (normally one) of the string "
[BookAuthor]" in the title filetitlepage.fmand 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 usingreplacetitlestr.- bookcopyright
-bookcopyrightcopyrightstring(Command line)
<BookCopyright>copyrightstring</BookCopyright>(XML book file) - Searches for all instances (normally one) of the string "
[BookCopyright]" in the title filetitlepage.fmand 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 usingreplacetitlestr.- bookdedication
-bookdedicationdedicationstring(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 otherThis option searches for all instances (normally one) of the string "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 thetitlefileoptions). You would normally put the dedication on a new page.[BookDedication]" in the title filetitlepage.fmand 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 usingreplacetitlestr.- bookfilename
-bookfilenamefilename.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.bookormyapibook(with no extension). However, the common convention is to use the.bookextension. If you omit this option, the Framemaker book file is namedapi.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
.bookextension to(Was named
-bookfilein version C.)- bookpublisher
-bookpublisherpublisherstring(Command line)
<BookPublisher>publisherstring</BookPublisher>(XML book file) - Searches for all instances (normally one) of the string "
[BookPublisher]" in the title filetitlepage.fmand 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 usingreplacetitlestr.- booksubtitle
-booksubtitlesubtitlestring(Command line)
<BookSubTitle>subtitlestring</BookSubTitle>(XML book file) - Searches for all instances (normally one) of the string "
[BookSubTitle]" in the title filetitlepage.fmand 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 usingreplacetitlestr.- booktitle
-booktitletitlestring(Command line)
<BookTitle>titlestring</BookTitle>(XML book file) - Searches for all instances (normally one) of the string "
[BookTitle]" in the title filetitlepage.fmand 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 usingreplacetitlestr.- bookversion
-bookversionversionstring(Command line)
<BookVersion>versionstring</BookVersion>(XML book file) - Searches for all instances (normally one) of the string "
[BookVersion]" in the title filetitlepage.fmand 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 usingreplacetitlestr.- bootclasspath
-bootclasspathpathlist(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
ChapterNumberto that paragraph. TheChapterNumberstyle definition provides the chapter number. Whenenabledis setfalse, the paragraph is not generated (and chapter string and number are thereby ignored).When using the
-chapternumberingcommand 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
-chapterstringstring(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\rinsert 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\sinserts 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
-classpathpathlist(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
-columnwidthwidth|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
defaultis 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.5inIn 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%xwidth. 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".
Also see -summarytablefirstcolumn.
width Meaning 328
328pt
328point
328points328 points 4.5i
4.5in
4.5inch
4.5inches4.5 inches 27pi
27pc
27pica
27picas27 picas 11.43c
11.43cm11.43 centimeters 114.3m
114.3mm114.3 millimeters - 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
memberheadtonoargs, since that is the appropriate heading. For example, the overloaded methodsgetImage(URL)andgetImage(URL, String)injava.applet.Appletwould 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
Imageobject that can then be painted on the screen. Theurlthat 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
Imageobject that can then be painted on the screen. Theurlargument must specify an absolute URL. Thenameargument is a specifier that is relative to theurlargument.
- Parameters:
url- an absolute URL giving the base location of the image.name- the location of the image, relative to theurlargument.- 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
-constantsvaluespageoption 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.miforconstants.fm:Results: In this case, the doclet copies the resource file<ConstantsFile> constant-values.mif </ConstantsFile>constant-values.miffrommifdoclet.jarto the mif (or fm) destination directory and imports formats fromtemplate.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:
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> myconstant-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<ConstantsFile> ./constant-values.mif </ConstantsFile>.fmfile. (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-importformatsis specified. This enables you to modify that custom file without regard to the styles in the imported template.- contentsfile
-contentsfilemiffile | 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.miforcontents.fm:Results: In this case, the doclet copies the resource file<ContentsFile> contents.mif </ContentsFile>contents.miffrommifdoclet.jarto the mif (or fm) destination directory and imports formats fromtemplate-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:
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> mycontents.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<ContentsFile> ./contents.mif </ContentsFile>.fmfile. (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-importformatsis 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 IndexHeadSetting 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
-ddirectory(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 namedmif,fmand- 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
classormember, any combination of the letterscm, or the wordall(which means generate both class and member headings), ornone(which means generate no headings). The default argument isclass. 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, andmember, any combination of the lettersopcm, or the wordall(which means generate all four headings), ornone(which means generate no headings). The default isoverview package class.
ooroverviewOverview page porpackagePackage page corclassClass page mormemberMember 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
-docletclass(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.MIFDocletThis option is identical to the -doclet option in the Javadoc core options.- docletpath
-docletpathpath/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
-docletpathis 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:
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-docletpathdocletpathlist-docletoption. 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
-encodingname(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
-excludeclassesclass1: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.AudioClipThis 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
-extdirsdirlist(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
-groupgroupheading 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
-groupoption 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-groupin the XML book file example.The following example groups all
java.lang*packages (which includesjava.langandjava.lang.reflect) with thejava.utilpackage under the heading "Core Packages". (Notice that the period must be omitted following "lang" in "java.lang*" because "java.lang.*" would not match on thejava.langpackage.)-group "Core Packages" "java.lang*:java.util" -group "Applet Packages" "java.applet"This example is equivalent to the previous one. The packagesjava.langandjava.lang.reflectmust 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
-hrefdocrootextdocURL(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-hrefdocrootoption, 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 theoverview.htmlpage, it would prepend the-hrefdocrootargument 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 forcom.package1.Class1, it would generate as as:This is a label (http://java.sun.com/api/com/package1/../dir1/com.test) to display.- imageresolution
-imageresolutionvalue%(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
widthandheightparameters. It has no effect on images that are missing those parameters. The default value is100%Example:
-imageresolution 60%This reduces the size of images to 30% of their size determined bywidthandheightparameters. 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
-importformatsmiffile | 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:Results: The doclet extracts-importformats template.miftemplate.miffrommifdoclet.jarand 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.mifis in the current directory, use:If the template is in a directory-importformats ./mytemplate.miftemplatedirbelow the current directory and is saved as a FrameMaker file tomytemplate.fm, use:If you want to use the default name-importformats ./templatedir/mytemplate.fmtemplate.miffor your custom template and keep it in the current directory, you must prefix it with the current direc