Adding an option to deactivate the table of content of each package

This commit is contained in:
Cedric Priscal
2015-03-18 14:08:22 -07:00
parent cac3b0ee1d
commit a4864eb012
2 changed files with 23 additions and 14 deletions

View File

@@ -61,6 +61,8 @@ public class HelpOutput {
System.err.println("-version Includes version-tags.");
System.err
.println("-hr Prints horizontal rows in the output (to get a better? view).");
System.err
.println("-nopackagetoc Do not include a table of content for each package");
System.err
.println("-include Creates output in two separated latex documents: one for the preamble part and another for the actual java documentation content.");
System.err

View File

@@ -239,6 +239,7 @@ public class TeXDoclet extends Doclet {
static boolean useFieldSummary = true;
static boolean useConstructorSummary = true;
static boolean useHr = false;
static boolean usePackageToc = true;
static boolean shortInheritance = false;
/**
* print writer for extra LaTeX preamble file
@@ -366,6 +367,8 @@ public class TeXDoclet extends Doclet {
return 2;
} else if (option.equals("-hr")) {
return 1;
} else if (option.equals("-nopackagetoc")) {
return 1;
} else if (option.equals("-shortinherited")) {
return 1;
} else if (option.equals("-help")) {
@@ -472,6 +475,8 @@ public class TeXDoclet extends Doclet {
sectionLevelMax = args[i][1];
} else if (args[i][0].equals("-hr")) {
useHr = true;
} else if (args[i][0].equals("-nopackagetoc")) {
usePackageToc = false;
} else if (args[i][0].equals("-shortinherited")) {
shortInheritance = true;
} else if (args[i][0].equals("-help")) {
@@ -645,6 +650,7 @@ public class TeXDoclet extends Doclet {
// "\\markboth{\\protect\\packagename \\hspace{.02in} -- \\protect\\classname}{\\protect\\packagename \\hspace{.02in} -- \\protect\\classname}"
// );
if (usePackageToc) {
if (ITALIC.indexOf("textit") != -1) {
os.println("\\hskip -.05in");
}
@@ -660,6 +666,7 @@ public class TeXDoclet extends Doclet {
os.println("\\rule{\\hsize}{.7mm}");
}
os.println("\\vskip .1in");
}
// The path relative to which <IMG> will be resolved.
packageDir = findPackageDir(pkg.pkg, root);