Next: Encapsulated PostScript(EPS) Up: Overview of pad2ps series Previous: Convert to PostScript

Convert to LaTeX

To get LaTeXoutput, you use pad2tex  command.

You can check the result by observing dvi file.

% jlatex foo.tex
% xdvi foo.dvi

When you are converting large C program, however, the output PAD figure is most likely stuck out to right. To get neat output, therefore, you better convert your PAD source to PostScript instead of, LaTeX. Converting large PAD source to LaTeXwill force you to manually insert in appropriate places after creating LaTeXcode, as to adjust your output.

Converting to LaTeXis probably handy when you are to draw fairly small PAD figures that would fit in one page and when you are to put the figures onto your paper or report written in LaTeX. In this case, cut the part that is in between begin{figure}[h] and end{figure} ,or the part that is in between inner padseq{% and } from foo.tex. Finally, insert the part cut onto appropriate places in your paper or report.

This manual is made in that way.

Also, set to load pad.sty  in documentstyle statement. If necessary, copy other commands. For example, interval between PAD figure and its frame will be very narrow if you do not copy fboxsep=10pt.

By the way, when you are creating output in LaTeXformat with pad2tex, you can use LaTeXcommands by setting latex' in parameter texmode . For instance, the following example will create PAD figure in figure 2.

    /* pad2ps: texmode = latex */

Example with \LaTeX commands
{
/* pad2ps: message = Calculate $\sqrt{2}$ */
$x = 1$
while ( $| x^{2} - 2 | > 0.0001$) {
$\displaystyle x = x - \frac{x^{2} - 2}{2 x}$
}
}
`

Figure: Example with LaTeXcommands

Default width of indentation is 4 columns. You can change this setting with -tab option. If you do not want indentation, set the option as -tab 0.