HTML automatically generated with rman
Table of Contents

Name

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

Synopsis

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

Description

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:
    /*CTEX
     *  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

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

Example

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

Files


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

Author

Peter Teuben

Update History


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


Table of Contents