summaryrefslogtreecommitdiffstats
path: root/cli/options.cli
diff options
context:
space:
mode:
authorMatthew Krupcale <mkrupcale@matthewkrupcale.com>2019-03-09 21:23:02 -0500
committerMatthew Krupcale <mkrupcale@matthewkrupcale.com>2019-03-14 14:53:02 -0400
commiteb6df5fd19436dfff69c433befca47c47067b909 (patch)
treea73aa7d20e118678c913d2d08f0c21d2bcbea3ae /cli/options.cli
parent7d02451df7a97a03ed010cd324178a666f9ccd7a (diff)
downloadcli-eb6df5fd19436dfff69c433befca47c47067b909.tar.gz
cli-eb6df5fd19436dfff69c433befca47c47067b909.tar.xz
cli-eb6df5fd19436dfff69c433befca47c47067b909.zip
Add support for LaTeX output.generate-latex
* cli/content.cxx: Handle LaTeX generation in format_line and format for escaped and un-escaped CLI translated input. * cli/context.hxx: Add ot_latex to output_type enum. * cli/generator.cxx: Include LaTeX output if gen_latex is specified. * cli/latex.{cxx,hxx}: LaTeX output generation: LaTeX escapes, line-wrapping, and doc, option, class_ traversal * cli/options.{cli,cxx,hxx,ixx}: Add LaTeX generation options
Diffstat (limited to 'cli/options.cli')
-rw-r--r--cli/options.cli67
1 files changed, 60 insertions, 7 deletions
diff --git a/cli/options.cli b/cli/options.cli
index 8781bc6..ace48d0 100644
--- a/cli/options.cli
+++ b/cli/options.cli
@@ -159,7 +159,8 @@ class options
bool --generate-cxx
{
"Generate C++ code. If neither \cb{--generate-man}, \cb{--generate-html},
- nor \cb{--generate-txt} is specified, this mode is assumed by default."
+ \cb{--generate-latex} nor \cb{--generate-txt} is specified, this mode is
+ assumed by default."
};
bool --generate-man
@@ -172,6 +173,11 @@ class options
"Generate documentation in the HTML format."
};
+ bool --generate-latex
+ {
+ "Generate documentation in the LaTeX format."
+ };
+
bool --generate-txt
{
"Generate documentation in the plain text format, similar to usage."
@@ -270,20 +276,20 @@ class options
example, \cb{app::options}. The <kind> value can be \cb{short},
\cb{long}, \cb{exclude}, or \cb{exclude-base}. If the value is
\cb{exclude}, then the class documentation is excluded from usage and
- man/HTML/text output. If it is \cb{exclude-base}, then it is only
+ man/HTML/LaTeX/text output. If it is \cb{exclude-base}, then it is only
excluded when used as a base. For usage, the \cb{short} and \cb{long}
values determine which usage function will be called when the class is
used as base or as part of the page usage (see \cb{--page-usage}). For
- man/HTML/text, these values determine which documentation strings are
- used in the output."
+ man/HTML/LaTeX/text, these values determine which documentation strings
+ are used in the output."
};
std::vector<std::string> --class
{
"<name>",
- "Generate the man page, HTML, or text documentation only for the options
- class <name>. The <name> value should be a fully-qualified options class
- name, for example, \cb{app::options}. To generate documentation for
+ "Generate the man page, HTML, LaTeX, or text documentation only for the
+ options class <name>. The <name> value should be a fully-qualified options
+ class name, for example, \cb{app::options}. To generate documentation for
multiple classes, repeat this option and the documentation will be
produced in the order specified. This functionality is useful if you need
to assemble documentation from multiple classes in a specific order or to
@@ -332,6 +338,14 @@ class options
'\cb{h2}', etc)."
};
+ std::map<char, std::string> --latex-section-map
+ {
+ "<c>=<h>",
+ "Map CLI heading <c> (valid values: '\cb{H}', '\cb{0}', '\cb{1}',
+ '\cb{h}', and '\cb{2}') to LaTeX section <h> (for example, '\cb{part}',
+ '\cb{chapter}', etc)."
+ };
+
bool --omit-link-check
{
"Don't check that local fragment link references (\\l{#ref ...}) resolve
@@ -370,6 +384,12 @@ class options
"Insert <text> at the beginning of the generated HTML file."
};
+ std::vector<std::string> --latex-prologue
+ {
+ "<text>",
+ "Insert <text> at the beginning of the generated LaTeX file."
+ };
+
std::vector<std::string> --txt-prologue
{
"<text>",
@@ -408,6 +428,12 @@ class options
"Insert <text> at the end of the generated HTML file."
};
+ std::vector<std::string> --latex-epilogue
+ {
+ "<text>",
+ "Insert <text> at the end of the generated LaTeX file."
+ };
+
std::vector<std::string> --txt-epilogue
{
"<text>",
@@ -451,6 +477,13 @@ class options
file."
};
+ std::string --latex-prologue-file
+ {
+ "<file>",
+ "Insert the content of <file> at the beginning of the generated LaTeX
+ file."
+ };
+
std::string --txt-prologue-file
{
"<file>",
@@ -493,6 +526,12 @@ class options
"Insert the content of <file> at the end of the generated HTML file."
};
+ std::string --latex-epilogue-file
+ {
+ "<file>",
+ "Insert the content of <file> at the end of the generated LaTeX file."
+ };
+
std::string --txt-epilogue-file
{
"<file>",
@@ -550,6 +589,20 @@ class options
of the generated HTML file."
};
+ std::string --latex-suffix = ".tex"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default \cb{.tex} to construct the name
+ of the generated LaTeX file."
+ };
+
+ std::string --latex-output-suffix = ".pdf"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default \cb{.pdf} to construct the name
+ of the processed output file of the generated LaTeX file."
+ };
+
std::string --txt-suffix = ".txt"
{
"<suffix>",