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.
The texdraw
package uses the printer driver interface provided by
the standard LaTeX2e graphics
package. Any options to the
texdraw
package are passed to the graphics
package.
Specifically, the name of the PostScript driver to be used can be
specified as an option to the texdraw
package. With no explicit
printer driver option, the default printer driver associated with the
graphics
package is used.
The texdraw
package can be used with any of the printer drivers
supported by the graphics
package that allow for the importation
of PostScript graphics files, viz., dvips
, xdvi
,
dvi2ps
, dvialw
, dvilaser
, dvipsone
,
dviwindo
, dvitops
, oztex
, psprint
,
textures
, pctexps
, and pctexwin
. Not all of these
drivers support the text rotation needed for the TeXdraw commands
\vtext
and \rtext
. Of the drivers listed above, only the
following support support text rotation: dvips
, xdvi
,
dvi2ps
, dvitops
, textures
, and pctexps
.
Go to the first, previous, next, last section, table of contents.