(texdraw)Using TeXdraw with LaTeX


Next: More Details Prev: Drawing Segments and Scaling Up: Top
Enter node , (file) or (file)node

4 Using TeXdraw with LaTeX
**************************

The LaTeX typesetting system uses a structured approach to declaring
typesetting environments.  For LaTeX2e, the 'texdraw' package defines
the 'texdraw' environment.  The TeXdraw environment is started with a
'\begin{texdraw}' command and terminated with an '\end{texdraw}'
command.  All of the basic TeXdraw commands can be used within the
'texdraw' environment.

   As an example, a LaTeX2e variant of an earlier example can be
constructed as follows.
     \documentclass{article}
     \usepackage{texdraw}
      ...
     \begin{document}
      ...
     \newcommand{\tbox}[1]{%
        \bsegment
          \lvec (0 +0.25)    \lvec (0.75 +0.25)
          \lvec (0.75 -0.25) \lvec (0 -0.25) \lvec (0 0)
          \textref h:C v:C \htext (0.375 0){#1}
          \savepos (0.75 0)(*ex *ey)
        \esegment
        \move (*ex *ey)}
     \begin{center}
     \begin{texdraw}
       \ravec (1 0) \tbox{$H(z)$} \ravec (1 0)
     \end{texdraw}
     \end{center}
      ...
     \end{document}

   This example illustrates the use of the LaTeX command '\newcommand'
as an alternative to the plain TeX command '\def'.  Instead of the basic
TeXdraw command '\centertexdraw', a nested combination of the LaTeX
centering environment and the TeXdraw environment is used.

PostScript printer drivers

automatically generated by info2www version 1.2.2.9