.TH C++2LATEX 1 "2 April 1990" "Version 1.0" .SH NAME c++2latex - C/C++ to LaTeX converter .SH SYNOPSIS .B c++2latex .B [-a] [-c] [-h] [-i length] [-o path] [-s size] [-t] [-C font] .B [-H font] [-K font] [-P font] [-S font] [-T wide] [-V] .B [+ansi-c] [+complete-file] [+header] [+indentation length] .B [+output path] [+font-size size] [+pipe] [+comment-font font] .B [+keyword-font font] [+cpp-font font] [+header-font font] .B [+string-font font] [+tabstop wide] [+version] [path] .SH DESCRIPTION .I c++2latex is a tool for generating .I LateX source from ANSI-C or C++ programs. It recogizes all keywords, strings, and comments. These recognized parts can be set in different fonts. .I c++2latex can generate complete \fILaTeX\fR files which can directly passed through latex(1) or parts of .I LaTeX files which can be included in other files (either direct or by the .B \\\\input or .B \\\\include commands). .LP The output filename is searched in various steps. First, if the {-o,+output} flag is given, the output is written to the file pointed to by the value of this flag. If the {-t,+pipe} option is given, the output is written to stdout. (It is an error to specify both options together.) If none of this options but an input pathname is given, the output is written to a file who's name is the last component of the input pathname with the substituted or else added suffix '.tex'. If the input is read from stdin and none of the above options is given, the output is written to '.tex' with being the name of this program. .SH OPTIONS .I c++2latex has the following options: .TP .B {-a,+ansi-c} The input is an ANSI-C program. Default is C++, so \fBdon't\fR give this option for C++ programs and \fBalways\fR give this option for ANSI-C programs. .TP .B {-c,+complete-file} The output is enveloped in commands which produce a complete .I LaTeX source. .TP .B {-h,+header} Each page of output has a header giving the input file name and the date the file was produced. This option implies the {-c,+complete-file} option. .TP .B {-i,+indentation} length Gives the amount of indentation for each leading blank (tabs are converted to blanks). Default is `0.5em'. .TP .B {-o,+output} \fIpath\fR The output is written in the file pointed to by \fIpath\fR. .TP .B {-s,+font-size} \fIsize\fR The LaTeX source is set in \fIsize\fRpt. Default is `11'. .TP .B {-t,+pipe} The output is written to stdout. .TP .B {-C,+comment-font} \fIfont\fR The comments are set in the given font. Default is `it'. .TP .B {-H,+header-font} \fIfont\fR The headers are set in the given font. Default is `sl'. .TP .B {-K,+keyword-font} \fIfont\fR The keywords are set in the given font. Default is `bf'. .TP .B {-P,+cpp-font} \fIfont\fR The preprocessor directives are set in the given font. Default is `tt'. .TP .B {-S,+string-font} \fIfont\fR The string and character constants are set in the given font. Default is `tt'. .TP .B {-T,+tabstop} \fIwide\fR The wide of tabs is \fIwide\fR. Default is `8'. .TP .B {-V,+version} Prints the version number on stderr. .SH OPTION SUMMARY .TP To give no oprion at all is the same as to give the options -i 0.5em -s 11 -C it -H sl -K bf -P tt -S tt -T 8 .SH "SEE ALSO" .LP latex(1). .SH DIAGNOSTICS .TP .I Can't use {-t,+pipe} and {-o,+output} together. At most one of this options may be given. .LP .TP .I Can't open `' for reading The program failed to open for reading. .LP .TP .I Can't open `%s' for writing The program failed to open for writing. All output is written in the current directory if not explicitly changed by {-o,+output}. .LP .TP .I Virtual memory exhausted The program failed to allocate storage. As this is only done for the construction of pathnames, this error will normally indicate a program error. .SH AUTHOR Norbert Kiesel. .LP .SH DEFICIENCIES / BUGS .LP .LP The program should be completly rewitten to understand language descriptions ala tgrind.