This HTML automatically generated with rman for NEMO
Table of Contents


ctex - extract tex comments from C/C++ source code


ctex [-tex|-latex|-raw] file(s)...


ctex is a very simple awk-based filter that extracts tex(t) comments from C/C++ source code. The comments must currently be structured in the following way:
     *  text can start here,
     *  as long as there is a space after the first * on
     *  the line, everything is output verbatim
     *  The ’*’ followed by ’/’ will terminate the text
     *  section, i.e. this line is the last CTEX output line
Output mode mode can be selected. In (la) tex mode a small header and footer are added, as to be able to directly use the output of ctex by (la) tex.

Each /*CTEX section generates a new TeX paragraph, but you can always add your own tex command, such as \bigskip.

Command Line Switches

Output in latex mode.
Output in tex mode, which is the default.
Output in raw mode. No (la) tex headers and footers added to the output stream.
Each new file causes a section{file} command, should be used in latex mode only
Each new file causes a subsection{file} command, should be used in latex mode only
Each new file causes a centerline{file} command, can be used in tex and latex mode.
No (la) tex header before all files are processed.
No (la) tex footer after all files have been processed.
Add latex index{potential, file} commands.


The following example extracts all potential formalae, and formats them in tex:
    % ctex -tex $NEMO/orbit/potential/data/*.c > pot.tex
    % tex pot
    % dvips pot


ctex          c-shell script, wrapper for ctex.awk
ctex.awk    simple awk script needed to parse the file


Peter Teuben

Update History

30-oct-93    created for mkop.c     PJT
14-nov-93    added many more options    PJT

Table of Contents