C++2LATEX(1) Version 1.0 C++2LATEX(1) NAME c++2latex - C/C++ to LaTeX converter SYNOPSIS c++2latex [-a] [-c] [-h] [-i length] [-o path] [-s size] [-t] [-C font] [-H font] [-K font] [-P font] [-S font] [-T wide] [-V] [+ansi-c] [+complete-file] [+header] [+indentation length] [+output path] [+font-size size] [+pipe] [+comment-font font] [+keyword-font font] [+cpp-font font] [+header-font font] [+string-font font] [+tabstop wide] [+version] [path] DESCRIPTION c++2latex is a tool for generating LaTeX source from ANSI-C or C++ programs. It recogizes all keywords, strings, and comments. These recognized parts can be set in different fonts. c++2latex can generate complete LaTeX files which can directly passed through latex(1) or parts of LaTeX files which can be included in other files (either direct or by the \input or \include commands). 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. OPTIONS c++2latex has the following options: {-a,+ansi-c} The input is an ANSI-C program. Default is C++, so don't give this option for C++ programs and always give this option for ANSI-C programs. {-c,+complete-file} The output is enveloped in commands which produce a complete LaTeX source. {-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. {-i,+indentation} length Gives the amount of indentation for each leading blank (tabs are converted to blanks). Default is `0.5em'. {-o,+output} path The output is written in the file pointed to by path. {-s,+font-size} size The LaTeX source is set in size pt. Default is `11'. {-t,+pipe} The output is written to stdout. {-C,+comment-font} font The comments are set in the given font. Default is `it'. {-H,+header-font} font The headers are set in the given font. Default is `sl'. {-K,+keyword-font} font The keywords are set in the given font. Default is `bf'. {-P,+cpp-font} font The preprocessor directives are set in the given font. Default is `tt'. {-S,+string-font} font The string and character constants are set in the given font. Default is `tt'. {-T,+tabstop} wide The wide of tabs is wide. Default is `8'. {-V,+version} Prints the version number on stderr. OPTION SUMMARY 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 SEE ALSO latex(1) DIAGNOSTICS Can't use {-t,+pipe} and {-o,+output} together. At most one of this options may be given. Can't open `' for reading The program failed to open for reading. 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}. 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. AUTHOR Norbert Kiesel DEFICIENCIES / BUGS The program should be completly rewitten to understand language descriptions ala tgrind.