diff options
author | Karl Berry <karl@freefriends.org> | 2019-05-06 22:06:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-05-06 22:06:13 +0000 |
commit | 8a185390c6e2c38df4c6fef045bd079b218353e1 (patch) | |
tree | ce50f56a94b9e1a8feb0b42c27876b655fd60123 /Master/texmf-dist/doc | |
parent | 926e35dfc63afa701f76cdefd4d6a3aad4883df7 (diff) |
texdraw (6may19)
git-svn-id: svn://tug.org/texlive/trunk@51030 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/info/texdraw.info | 107 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/texdraw/ChangeLog | 17 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/texdraw/Makefile (renamed from Master/texmf-dist/doc/support/texdraw/Makefile.manual) | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/texdraw/README | 75 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/texdraw/examples/txdexamp.latex | 514 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/texdraw/examples/txdexamp.tex | 485 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/texdraw/test/ttexdraw.tex | 204 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/texdraw/texdraw.pdf | bin | 237380 -> 237149 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/support/texdraw/texdraw.texi | 42 |
9 files changed, 1307 insertions, 146 deletions
diff --git a/Master/texmf-dist/doc/info/texdraw.info b/Master/texmf-dist/doc/info/texdraw.info index 68f6e64096e..1bdcf3fb163 100644 --- a/Master/texmf-dist/doc/info/texdraw.info +++ b/Master/texmf-dist/doc/info/texdraw.info @@ -1,7 +1,7 @@ This is texdraw.info, produced by makeinfo version 6.6 from texdraw.texi. -This manual (edition 2.0a) documents TeXdraw, a system for producing +This manual (edition 2.3) documents TeXdraw, a system for producing PostScript drawings from TeX. Copyright (C) 1993-2019 Peter Kabal @@ -24,9 +24,7 @@ TeXdraw TeXdraw is a collection of macros that allow drawings to be created from _within_ TeX. - This is edition 2.0a of the TeXdraw documentation. The only -substantive change from edition 2.0 is the license, which is now CC-BY -(any version). + This is edition 2.3 of the TeXdraw documentation. * Menu: @@ -208,7 +206,7 @@ the file 'texdraw.tex'. For use with LaTeX version 2.09, the user reads in the TeXdraw macros from the file 'texdraw.tex' and optionally defines the '\begin{texdraw}' / '\end{texdraw}' environment. - \documentstyle[11pt]{article} % Article style with 11pt size option + \documentstyle[11pt]{article} % Article style at 11pt size ... \input texdraw % Read in the TeXdraw macros \newenvironment{texdraw}{\leavevmode\btexdraw}{\etexdraw} @@ -224,7 +222,7 @@ from the file 'texdraw.tex' and optionally defines the '\begin{texdraw}' '\end{texdraw}' environment, brings in the standard 'graphics' package and reads in the file 'texdraw.tex' containing the definitions of the TeXdraw macros. - \documentclass[11pt]{article} % Article class with the 11pt size option + \documentclass[11pt]{article} % Article class at 11pt size \usepackage{texdraw} % TeXdraw commands \begin{document} @@ -1699,7 +1697,8 @@ shared between the commands used to draw these blocks. \arrowheadtype t:F \arrowheadsize l:0.08 w:0.04 \def\pl {$\scriptscriptstyle +$} \def\mn {$\scriptscriptstyle -$} - \move (0 +0.63) \move (0 -0.60) \move (0 0) % compensate for text size + \move (0 +0.63) \move (0 -0.60) % compensate for the text size + \move (0 0) % Input to the first stage \bsegment @@ -2105,12 +2104,6 @@ Appendix D Alphabetic listing of commands factor is the product of the unit scale factor and the segment scale factor. -'\texdrawbox { ... }' - Create a TeXdraw box. The argument contains TeXdraw commands. - This macro returns a TeX box with height equal to the height of the - drawing and width equal to the width of the drawing. The depth of - the box is zero. - '\textref h:H-REF v:V-REF' Set the text reference point for subsequent text commands. The horizontal reference point H-REF is one of 'L', 'C' or 'R' (left, @@ -2382,49 +2375,49 @@ Concept Index Tag Table: -Node: Top587 -Node: Introduction2093 -Node: Distribution4097 -Node: TeXdraw Commands4353 -Node: Accessing TeXdraw4969 -Ref: Accessing TeXdraw-Footnote-19721 -Node: Command syntax9885 -Node: TeXdraw coordinates11086 -Node: Coordinate specification12461 -Node: Line vectors13665 -Node: TeX text19436 -Node: Circles and arcs23769 -Node: Bezier curves27778 -Node: Fill commands29767 -Node: Drawing Segments and Scaling32308 -Node: Drawing segments32742 -Node: Drawing paths33842 -Node: Saving positions35472 -Node: Scaling coordinates38380 -Node: Drawing size41369 -Node: Initial current position43189 -Node: Using TeXdraw with LaTeX43987 -Node: PostScript printer drivers45465 -Node: More Details46601 -Node: Errors while using TeXdraw47103 -Node: Extending TeXdraw49427 -Node: Scaling50999 -Node: Resolution51945 -Node: Text placement53651 -Node: Intermediate PostScript file54727 -Node: How TeXdraw merges graphics and text56488 -Ref: How TeXdraw merges graphics and text-Footnote-157871 -Node: PostScript Commands57929 -Node: TeXdraw Toolbox62920 -Node: Coordinate parsing63486 -Node: Real arithmetic65649 -Node: Arrow curve66457 -Node: Examples70510 -Node: Block diagram70782 -Node: Filter response graph77535 -Node: Geometric construction79220 -Node: Command Listing81496 -Node: Command Index92966 -Node: Concept Index98002 +Node: Top586 +Node: Introduction1995 +Node: Distribution3999 +Node: TeXdraw Commands4255 +Node: Accessing TeXdraw4871 +Ref: Accessing TeXdraw-Footnote-19601 +Node: Command syntax9765 +Node: TeXdraw coordinates10966 +Node: Coordinate specification12341 +Node: Line vectors13545 +Node: TeX text19316 +Node: Circles and arcs23649 +Node: Bezier curves27658 +Node: Fill commands29647 +Node: Drawing Segments and Scaling32188 +Node: Drawing segments32622 +Node: Drawing paths33722 +Node: Saving positions35352 +Node: Scaling coordinates38260 +Node: Drawing size41249 +Node: Initial current position43069 +Node: Using TeXdraw with LaTeX43867 +Node: PostScript printer drivers45345 +Node: More Details46481 +Node: Errors while using TeXdraw46983 +Node: Extending TeXdraw49307 +Node: Scaling50879 +Node: Resolution51825 +Node: Text placement53531 +Node: Intermediate PostScript file54607 +Node: How TeXdraw merges graphics and text56368 +Ref: How TeXdraw merges graphics and text-Footnote-157751 +Node: PostScript Commands57809 +Node: TeXdraw Toolbox62800 +Node: Coordinate parsing63366 +Node: Real arithmetic65529 +Node: Arrow curve66337 +Node: Examples70390 +Node: Block diagram70662 +Node: Filter response graph77424 +Node: Geometric construction79109 +Node: Command Listing81385 +Node: Command Index92597 +Node: Concept Index97633 End Tag Table diff --git a/Master/texmf-dist/doc/support/texdraw/ChangeLog b/Master/texmf-dist/doc/support/texdraw/ChangeLog index d4339f49e7b..21bfad19bd1 100644 --- a/Master/texmf-dist/doc/support/texdraw/ChangeLog +++ b/Master/texmf-dist/doc/support/texdraw/ChangeLog @@ -1,7 +1,18 @@ -$Id: ChangeLog,v 2.0a 2019/03/28 texdraw-V2R0a $ +$Id: ChangeLog 2.4 2019/04/18 TeXdraw-v2r3 $ -V2R0a 2019/03/28 - - Change license to CC-BY (any version). +v2r3 2019-04-18 + - Repackaged with Creative Commons license + +v2r2 2000/05/04 + - Internal modifications for compatibility with eplain, no changes to the + user interface + +v2r1 1999/11/15 + - Internal modifications for better compatibility with amsmath, no changes + to the user interface + +v2r0a 1998/12/11 + - Changed packaging - no changes to the TeX files V2R0 1995/12/17 - Interface to standard LaTeX2e graphics package diff --git a/Master/texmf-dist/doc/support/texdraw/Makefile.manual b/Master/texmf-dist/doc/support/texdraw/Makefile index 49edf40c3f2..589b302bf32 100644 --- a/Master/texmf-dist/doc/support/texdraw/Makefile.manual +++ b/Master/texmf-dist/doc/support/texdraw/Makefile @@ -1,4 +1,6 @@ -# This trivial Makefile is public domain. +# Makefile for texdraw.texi + +# $Id: Makefile 2.2 2019/04/18 TeXdraw-v2r3 $ doc = texdraw @@ -11,5 +13,10 @@ ps $(doc).ps: $(doc).texi Makefile info $(doc).info: $(doc).texi makeinfo $(doc).texi +mostlyclean: + rm -f $(doc).ps? $(doc).p1? + rm -f $(doc).cp $(doc).cps $(doc).fn $(doc).fns + rm -f $(doc).aux $(doc).log $(doc).toc $(doc).dvi + clean: rm -f $(doc).?? $(doc).??? diff --git a/Master/texmf-dist/doc/support/texdraw/README b/Master/texmf-dist/doc/support/texdraw/README index 370b91dea05..67403b05bbf 100644 --- a/Master/texmf-dist/doc/support/texdraw/README +++ b/Master/texmf-dist/doc/support/texdraw/README @@ -1,6 +1,6 @@ -This file describes the contents of the distribution for TeXdraw. +TeXdraw distribution -$Id: README,v 2.0a 2019/03/28 texdraw-V2R0a $ +$Id: README 2.8 2019/04/18 TeXdraw-v2r3 $ The TeXdraw package consists of a set of macro definitions for the TeX typesetting program. These macros allow the user to produce PostScript @@ -11,7 +11,7 @@ from <within> TeX, using TeX fonts for labelling the drawing. Basic drawing features include: (1) moves, lines and arrow vectors - - selectable gray level, line width pattern, arrowhead size and type + - selectable gray level, line width, pattern, arrowhead size and type (2) circles, ellipses, arcs, and Bezier curves (3) general fill command to fill a region defined by lines and Bezier curves (selectable gray level) @@ -30,25 +30,18 @@ The extensibility features include, (2) local segment scaling (3) saving and restoring positions using symbolic positions -Version 2.0a was rleased in March 2019; the only substantive -modification was to change the license to CC-BY (any version). -Also, an Info direntry is created by texdraw.texi, and -minor changes were made to this README and other documentation files. -For the distribution: -- A PDF version of the manual was added. -- the Texinfo source files (texindex.c, texi2dvi, etc.) were removed, as -they are readily available elsewhere and cannot be kept up to date here. +The distribution as a compressed tar file is available from: + http://www-mmsp.ECE.McGill.CA/MMSP/Documents/Software ===== -Peter Kabal peter dot kabal at mcgill dot ca -Department of Electrical Engineering +Peter Kabal peter.kabal@McGill.CA +Department of Electrical & Computer Engineering McGill University Montreal, Quebec - ===== The distribution consists of the TeXdraw macros themselves, files with -auxiliary macros, and the TeXdraw manual (Texinfo format). +auxiliary macros, and the TeXdraw manual (PosScript/PDF). Distribution Contents: ---------------------- @@ -63,64 +56,26 @@ TeXdraw macros (main directory): txdtools.tex - TeXdraw toolbox for extending TeXdraw txdps.tex - TeXdraw macros for accessing PostScript macros blockdiagram.tex - Block diagram macros for TeXdraw + +TeXdraw examples (directory examples/): txdexamp.tex - plain TeX code for the examples in the manual txdexamp.latex - LaTeX2e code for the examples in the manual TeXdraw documentation (directory manual/): - texdraw.pdf - PDF version of the manual texdraw.ps - PostScript version of the manual + texdraw.pdf - PDF version of the manual texdraw.texi - Texinfo source file for the TeXdraw manual =============================================== -The following notes on setup are for Unix systems. - Initial Tests: -(1) Print the PostScript version of the manual ("texdraw.ps") to see the - capabilities of TeXdraw. (Or PDF.) +(1) View the PostScript or pdf version of the manual ("texdraw.ps" or + "texdraw.pdf") to see the capabilities of TeXdraw. (2) Try TeX'ing the examples file. Assuming plain TeX is invoked with the command "tex" and LaTeX2e is invoked with the command "latex" % tex txdexamp ... or ... % latex texdexamp.latex -(3) Printing the examples using the appropriate printer driver program (only - dvips can be used with the plain TeX version of the examples), +(3) Printing the examples using the appropriate printer driver program + (only dvips can be used with the plain TeX version of the examples), % dvips txdexamp - -===== -Permanent Setup: - -(1) Private copy of TeXdraw. - Move the TeXdraw sources files ("texdraw.sty", texdraw.tex", - "txdtools.tex" and "txdps.tex") to an appropriate directory. If you are - keeping private versions of the files, consider using the directory - ~mylogin/tex . With many versions of TeX, including this directory in - the TeX input path variable (the environment variable TEXINPUTS) allows - you to refer to the files in TeX without specifying the full pathname. - With the C shell, a line in the ".login" file sets the environment - variable TEXINPUTS - % setenv TEXINPUTS ".:$HOME/tex:". - The last part of the path string should terminate with a colon to have - the default directory of TeX files available. -(2) Public copy of TeXdraw. - Move the TeXdraw source files ("texdraw.sty", "texdraw.tex", - "txdtools.tex" and "txdps.tex") to a directory that TeX searches by - default. If installed from a distribution, this should be - handled by the package manager. - -===== -Creating a TeXdraw manual from the sources: -(1) Make sure "texdraw.tex", "txdtools.tex" and "texinfo.tex" will be found - by TeX. -(2) To create the manual, you have to TeX the manual twice - the second - time to access the sorted indices and the cross-references. The - program "texindex" sorts the indices. (The distribution includes pre- - sorted indices that can be used). Or the three steps can be replaced by - an invocation of the script "texi2dvi". - % tex texdraw.texinfo - % texindex texdraw - % tex texdraw.texinfo -(3) If you have the printer driver program dvips, a PostScript version of the - manual is created as follows. - % dvips texdraw -o texdraw.ps -(4) The targets in manual/Makefile handle this. diff --git a/Master/texmf-dist/doc/support/texdraw/examples/txdexamp.latex b/Master/texmf-dist/doc/support/texdraw/examples/txdexamp.latex new file mode 100644 index 00000000000..c6477e617c6 --- /dev/null +++ b/Master/texmf-dist/doc/support/texdraw/examples/txdexamp.latex @@ -0,0 +1,514 @@ +% TeXdraw examples for latex + +% $Id: txdexamp.latex 2.1 1999/11/15 TeXdraw-v2r3 $ + +% These examples are taken from the TeXdraw manual. + +% Peter Kabal +% Department of Electrical & Computer Engineering +% McGill University +% 3480 University +% Montreal, Quebec +% Canada H3A 2A7 + +% kabal@ECE.McGill.CA + +\documentclass [11pt]{article} +\usepackage {texdraw} + +\input txdtools +\let\et=\etexdraw +\def\etexdraw{\drawbb\et} + +\begin{document} + +\noindent +TeXdraw examples using LaTeX. + +\bigskip +\begin{center} +\begin{texdraw} + \avec (0 0.8) \textref h:C v:B \htext (0 0.9){\sl y} + \move (0 0) \avec (0.8 0) \textref h:L v:C \htext(0.9 0){\sl x} + \move (0 1.0) +\end{texdraw} +\end{center} + +\bigskip +\begin{center} +\begin{texdraw} + \drawdim{cm} \linewd 0.02 + \move(2 2) \lvec(3 3) \lvec(2 4) \lvec(1 3) \lvec(2 2) + \textref h:C v:C \htext(2 3){$\sum \rho_n$} +\end{texdraw} +\end{center} + +\bigskip +\begin{center} +\begin{texdraw} + \drawdim in + \linewd 0.03 \setgray 0.6 \arrowheadtype t:F \avec(0.5 0.5) + \linewd 0.01 \setgray 0 \arrowheadtype t:V \avec(1.0 0.5) + \linewd 0.015 \lpatt(0.067 0.1) \lvec (1.5 0) + \linewd 0.02 \lpatt() \arrowheadtype t:T \avec(2.0 0.5) + \arrowheadtype t:H \avec(2.5 0.5) + \setgray 0.4 \arrowheadtype t:W \avec(3.0 0) + \textref h:R v:T \htext (0.35 0.50){\tt t:F} + \textref h:R v:T \htext (1.0 0.43){\tt t:V} + \textref h:R v:T \htext (1.82 0.50){\tt t:T} + \textref h:R v:T \htext (2.5 0.43){\tt t:H} + \textref h:R v:B \htext (2.8 0){\tt t:W} +\end{texdraw} +\end{center} + +\bigskip +\begin{center} +\begin{texdraw} + \newcommand{\bdot}{\bsegment + \fcir f:0 r:0.02 + \esegment} + \newcommand{\Ttext}[1]{\bsegment + \textref h:C v:B \htext (0 +0.06){#1} + \esegment} + \newcommand{\Btext}[1]{\bsegment + \textref h:C v:T \htext (0 -0.06){#1} + \esegment} + \newcommand{\Ltext}[1]{\bsegment + \textref h:R v:C \htext (-0.08 0){#1} + \esegment} + \newcommand{\Rtext}[1]{\bsegment + \textref h:L v:C \htext (+0.08 0){#1} + \esegment} + \move (-1.5 0) + \bsegment + \move (+1.55 +0.45) \move (-1.55 -0.45) \move (0 0) + \Ttext{Horizontal Text} + \bdot \Btext{\tt h:C v:C} + \move (-0.9 0) \bdot \Ltext{\tt h:L v:C} + \move (+0.9 0) \bdot \Rtext{\tt h:R v:C} + \move (0 +0.3) \bdot \Ttext{\tt h:C v:T} + \move (0 -0.3) \bdot \Btext{\tt h:C v:B} + \move (-0.9 -0.3) \bdot \Ltext{\tt h:L v:B} + \lvec (-0.9 +0.3) \bdot \Ltext{\tt h:L v:T} + \lvec (+0.9 +0.3) \bdot \Rtext{\tt h:R v:T} + \lvec (+0.9 -0.3) \bdot \Rtext{\tt h:R v:B} + \lvec (-0.9 -0.3) + \esegment + \newcommand{\atext}{\rtext td:45 } + \newcommand{\ATtext}[1]{\bsegment + \setsegscale 0.707 + \textref h:C v:B \atext (-0.06 +0.06){#1} + \esegment} + \newcommand{\ABtext}[1]{\bsegment + \setsegscale 0.707 + \textref h:C v:T \atext (+0.060 -0.06){#1} + \esegment} + \newcommand{\ALtext}[1]{\bsegment + \setsegscale 0.707 + \textref h:R v:C \atext (-0.08 -0.08){#1} + \esegment} + \newcommand{\ARtext}[1]{\bsegment + \setsegscale 0.707 + \textref h:L v:C \atext (+0.08 +0.08){#1} + \esegment} + \move (+1.5 0) + \bsegment + \move (+1.33 +1.33) \move (-1.33 -1.33) \move (0 0) + \setsegscale 0.707 + \ATtext{Rotated Text} + \bdot \ABtext{\tt h:C v:C} + \move (-0.9 -0.9) \bdot \ALtext{\tt h:L v:C} + \move (+0.9 +0.9) \bdot \ARtext{\tt h:R v:C} + \move (-0.3 +0.3) \bdot \ATtext{\tt h:C v:T} + \move (+0.3 -0.3) \bdot \ABtext{\tt h:C v:B} + \move (-0.6 -1.2) \bdot \ALtext{\tt h:L v:B} + \lvec (-1.2 -0.6) \bdot \ALtext{\tt h:L v:T} + \lvec (+0.6 +1.2) \bdot \ARtext{\tt h:R v:T} + \lvec (+1.2 +0.6) \bdot \ARtext{\tt h:R v:B} + \lvec (-0.6 -1.2) + \esegment +\end{texdraw} +\end{center} + +\vfill +\newpage + + +\bigskip +\begin{center} +\begin{texdraw} + \move(-0.75 -0.25) \lvec (-0.75 +0.5) \lvec (+0.75 +0.5) + \lvec(+0.75 -0.25) \ifill f:0.9 % fill the region + \move(0 0) + \avec(-0.75 -0.25) \textref h:R v:C \htext{H-text} + \move(0 0) \avec(-0.75 +0.25) \textref h:R v:B \htext{H-text} + \move(0 0) \avec(0 +0.5) \textref h:L v:T \vtext{V-text} + \move(0 0) \avec(+0.75 +0.25) \textref h:L v:B \htext{H-text} + \move(0 0) \avec(+0.75 -0.25) \textref h:L v:C \htext{H-text} + \move (-1.15 -0.3) \move (+1.15 +0.92) % increase the size of the drawing +\end{texdraw} +\end{center} + +\bigskip +\begin{center} +\begin{texdraw} + \linewd 0.02 + \fcir f:0.7 r:1 + \larc r:1 sd:45 ed:135 + \lvec ( 0.707 0.707) \move (0 0) \lvec (-0.707 +0.707) +\end{texdraw} +\end{center} + +\bigskip +\begin{center} +\begin{texdraw} + \newcommand{\Ltext}[1]{\bsegment + \textref h:R v:C \htext (-0.08 0){#1} + \esegment} + \newcommand{\Rtext}[1]{\bsegment + \textref h:L v:C \htext (+0.08 0){#1} + \esegment} + \newcommand{\bdot}{\fcir f:0 r:0.02 } + \newcommand{\Ldot}[1]{\bdot \Ltext{#1}} + \newcommand{\Rdot}[1]{\bdot \Rtext{#1}} + \move (-2 0) + \bsegment + \lpatt (0.033) + \move (0 0) \Ldot{0} \lvec (0 1) \Ldot{1} + \lvec (1 1) \Rdot{2} \lvec (1 0) \Rdot{3} + \lpatt () + \move (0 0) \clvec (0 1)(1 1)(1 0) + \esegment + \move (0 0) + \bsegment + \lpatt (0.033) + \move (0 0) \Ldot{0} \lvec (0.5 0.8) \Ldot{1} + \lvec (1.5 0.8) \Rdot{2} \lvec (1 0) \Rdot{3} + \lpatt () + \move (0 0) \clvec (0.5 1)(1.5 1)(1 0) + \esegment + \move ( 2 0) + \bsegment + \lpatt (0.033) + \move (0 0) \Ldot{0} \lvec (0 1) \Ldot{1} + \lvec (1 0) \Rdot{2} \lvec (1 1) \Rdot{3} + \lpatt () + \move (0 0) \clvec (0 1)(1 0)(1 1) + \esegment +\end{texdraw} +\end{center} + +\bigskip +\begin{center} +\begin{texdraw} +\move (0.5 0) +\lvec (0 0.5) \clvec (0.5 0.85)(1 0.65)(1.5 1) +\lvec (2 0.5) \clvec (1.5 0.15)(1 0.35)(0.5 0) +\lfill f:0.8 +\end{texdraw} +\end{center} + +\vfill +\newpage + + +\bigskip +\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} + +\bigskip +\def\cavec (#1 #2)(#3 #4)(#5 #6){ + \clvec (#1 #2)(#3 #4)(#5 #6) + \cossin (#3 #4)(#5 #6)\cosa\sina + \rmove (0 0) % stroke the Bezier curve + \bsegment + \drawdim in \setsegscale 0.05 + \move ({-\cosa} -\sina) \avec (0 0) + \esegment} + +\def\caw (#1 #2){ + \currentpos \xa\ya + \cossin ({\xa} \ya)(#1 #2)\cosa\sina + +% The nominal wiggly curve is (0 0) (1+dx dy) (-dx -dy) (1 0) +% Find the rotated offset (dx dy) -> (du dv) + \rotatecoord (0.4 0.1)\cosa\sina \du\dv + +% calculate the length of the vector + \vectlen ({\xa} \ya)(#1 #2)\len + +% draw the curve in normalized units + \bsegment + \setsegscale {\len} + \realadd \cosa \du \tmpa \realadd \sina \dv \tmpb + \cavec ({\tmpa} \tmpb)({-\du} -\dv)({\cosa} \sina) + \esegment + + \move (#1 #2)} + +% rotate a coordinate (x y) +% arguments: (x y) cosa sina x' y' +% x' = cosa * x - sina * y; y' = sina * x + cosa * y +\def\rotatecoord (#1 #2)#3#4#5#6{ + \getpos (#1 #2)\xarg\yarg + \realmult \xarg {#3} \tmpa \realmult \yarg {#4} \tmpb + \realadd \tmpa {-\tmpb} #5 + \realmult \xarg {#4} \tmpa \realmult \yarg {#3} \tmpb + \realadd \tmpa \tmpb #6} + +\begin{center} +\begin{texdraw} + \arrowheadtype t:W + \move (0 0) + \cavec (1.4 0.1)(-0.4 -0.1)(1 0) + \move (1 0) \caw (1 1) \htext{tip at \tt (1 1)} + \move (1 0) \caw (2 1) \htext{tip at \tt (2 1)} + \move (1 0) \caw (2 0) \htext{tip at \tt (2 0)} + \move (0 1.13) \move (0 -0.04) +\end{texdraw} +\end{center} + +\vfill +\newpage + + +\bigskip +\def\delay {\bsegment + \setsegscale 0.3 + \lvec (0 +0.5) \lvec (1 +0.5) \lvec (1 -0.5) + \lvec (0 -0.5) \lvec (0 0) + \textref h:C v:C \htext (0.5 0){$z^{-1}$} + \savepos (1 0)(*ex *ey) + \esegment + \move (*ex *ey)} +\def\bdot {\fcir f:0 r:0.02 } +\def\Ttext #1{\bsegment + \textref h:C v:B \htext (0 +0.06){#1} + \esegment} +\def\Btext #1{\bsegment + \textref h:C v:T \htext (0 -0.06){#1} + \esegment} +\def\Ltext #1{\bsegment + \textref h:R v:C \htext (-0.06 0){#1} + \esegment} +\def\Rtext #1{\bsegment + \textref h:L v:C \htext (+0.06 0){#1} + \esegment} +\def\cradius {0.08} +\def\pluss {\bsegment + \setsegscale {\cradius} + \move (-0.5 0) \lvec (+0.5 0) + \move (0 -0.5) \lvec (0 +0.5) + \esegment} +\def\pcir {\lcir r:{\cradius} \pluss} +\def\puttext (#1 #2)#3{\bsegment + \setsegscale {\cradius} + \textref h:C v:C \htext (#1 #2){#3} + \esegment} +\def\putwnw #1{\puttext (-1.7 +1.2){#1}} +\def\putwsw #1{\puttext (-1.7 -1.2){#1}} +\def\putn #1{\puttext ( 0 +2 ){#1}} +\def\puts #1{\puttext ( 0 -2 ){#1}} +\def\avectoc (#1 #2){\currentpos \xa\ya + \cossin ({\xa} \ya)(#1 #2)\cosa\sina + \savepos (#1 #2)(*tx *ty) + \bsegment + \move (*tx *ty) + \setsegscale {\cradius} + \rmove ({-\cosa} -\sina) + \savecurrpos (*ex *ey) + \esegment + \avec (*ex *ey) + \move (#1 #2)} +\def\avecfrc (#1 #2){\currentpos \xa\ya + \cossin ({\xa} \ya)(#1 #2)\cosa\sina + \bsegment + \setsegscale {\cradius} + \move ({\cosa} \sina) + \savecurrpos (*ex *ey) + \esegment + \move (*ex *ey) + \avec (#1 #2)} + +\begin{center} +\begin{texdraw} +\drawdim in +\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04 +\def\pl {$\scriptscriptstyle +$} \def\mn {$\scriptscriptstyle -$} + +\move (0 +0.63) \move (0 -0.60) \move (0 0) % compensate for the text size + +% Input to the first stage +\bsegment + \Ltext{$x(n)$} + \lvec (0.3 0) \bdot \lvec (0.3 +0.4) + \move (0.3 0) \lvec (0.3 -0.4) + \savepos (0.3 0)(*ex *ey) +\esegment +\move (*ex *ey) + +% first lattice stage +\bsegment + \move (0 +0.4) \avectoc (1.7 +0.4) + \pcir \putwnw{\pl} \puts{\mn} + \avecfrc (2.1 +0.4) + \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4) + \pcir \putwsw{\pl} \putn{\mn} + \avecfrc (2.1 -0.4) + \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4) + \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4) + \move (0.1 +0.42) \Ttext {$f_0(n)$} + \move (2.0 +0.42) \Ttext {$f_1(n)$} + \move (0.1 -0.4) \Btext {$b_0(n)$} + \move (2.0 -0.4) \Btext {$b_1(n)$} + \textref h:L v:B \htext (1.15 +0.2){$K_1$} + \textref h:L v:T \htext (1.15 -0.2){$K_1$} + \savepos (2.1 0)(*ex *ey) +\esegment +\move (*ex *ey) + +% center section +\bsegment + \textref h:C v:C + \htext (0.3 +0.4){$\cdots$} + \htext (0.3 -0.4){$\cdots$} + \savepos (0.6 0)(*ex *ey) +\esegment +\move (*ex *ey) + +% last lattice stage +\bsegment + \move (0 +0.4) \avectoc (1.7 +0.4) + \pcir \putwnw{\pl} \puts{\mn} + \avecfrc (2.3 +0.4) \Rtext{$e(n)$} + \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4) + \pcir \putwsw{\pl} \putn{\mn} + \avecfrc (2.1 -0.4) + \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4) + \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4) + \move (0.1 +0.42) \Ttext {$f_{P-1}(n)$} + \move (2.0 +0.42) \Ttext {$f_P(n)$} + \move (0.1 -0.4) \Btext {$b_{P-1}(n)$} + \move (2.0 -0.4) \Btext {$b_P(n)$} + \textref h:L v:B \htext (1.15 +0.2){$K_P$} + \textref h:L v:T \htext (1.15 -0.2){$K_P$} +\esegment +\end{texdraw} +\end{center} + +\bigskip +\begin{center} +\begin{texdraw} +\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04 +\def\ds {\displaystyle} +\def\ticklab (#1 #2)#3{\move(#1 #2) + \bsegment + \lvec (0 0.05) + \textref h:C v:T \htext (0 -0.05){#3} + \esegment} +\def\Rtext #1{\bsegment + \textref h:L v:C \htext ( 0.08 0){#1} + \esegment} + +\move (2.4 -0.32) % move to set the size + +\move (0 0) +% Axes +\avec (0 1.4) +\move (0 0) \avec (2.2 0) \Rtext{$\omega$} +\ticklab (0 0) {0} +\ticklab (0.8 0) {$\ds {\pi \over 2N} $} +\ticklab (1.2 0) {$\omega_s$} +\ticklab (1.6 0) {$\ds {\pi \over N} $} + +\linewd 0.025 +\move (0 1) +\lvec (0.4 1) +\lvec (0.44 0.998) +\lvec (0.48 0.988) +\lvec (0.52 0.973) +\lvec (0.56 0.951) +\lvec (0.60 0.923) +\lvec (0.64 0.891) +\lvec (0.68 0.852) +\lvec (0.72 0.809) +\lvec (0.76 0.760) +\lvec (0.80 0.707) +\lvec (0.84 0.649) +\lvec (0.88 0.587) +\lvec (0.92 0.522) +\lvec (0.96 0.454) +\lvec (1.00 0.382) +\lvec (1.04 0.309) +\lvec (1.08 0.233) +\lvec (1.12 0.156) +\lvec (1.16 0.078) +\lvec (1.20 0) +\lvec (1.9 0) +\end{texdraw} +\end{center} + +\bigskip +\begin{center} +\begin{texdraw} +\arrowheadtype t:V \arrowheadsize l:0.08 w:0.04 +\linewd 0.01 +\setunitscale 1.5 % circle will have radius 1.5 inches + +\def\Btext #1{\bsegment + \textref h:C v:T \htext (0 -0.04){#1} + \esegment} +\def\Ttext #1{\bsegment + \textref h:C v:B \htext (0 0.04){#1} + \esegment} +\def\Ltext #1{\bsegment + \textref h:R v:C \htext (-0.04 0){#1} + \esegment} +\def\bdot {\fcir f:0 r:0.0133 } +\def\vtick {\bsegment + \move (0 -0.05) \lvec (0 0.05) + \esegment} +\def\htick {\bsegment + \move (-0.05 0) \lvec ( 0.05 0) + \esegment} +\def\Hlen #1#2{\bsegment + \vtick \avec ({#1} 0) \vtick \avec (0 0) + \relsegscale 0.5 + \move ({#1} 0) \Ttext {#2} + \esegment} +\def\Vlen #1#2{\bsegment + \htick \avec (0 {#1}) \htick \avec (0 0) + \relsegscale 0.5 + \move (0 {#1}) \Ltext {#2} + \esegment} + +\lcir r:1 % circle +\move (-1.05 0) \lvec ( 1.05 0) % axes +\move (0 -1.05) \lvec (0 1.05) + +\move (0 0) \lvec (0.707 0.707) \bdot +\rmove (0.02 0.02) \textref h:L v:B \htext {X} +\move (0.707 -0.707) \bdot +\textref h:R v:T \htext(-0.02 -0.02){O} + +\move (0.5 0) % center of ellipse +\bsegment + \lellip rx:0.435 ry:0.804 + \bdot \Btext {$\beta_2$} + \move (0 0.15) \Hlen {0.435}{$|\beta_1{+}\beta_3|$} + \move (-0.7 0) \Vlen {0.804}{$|\beta_1{-}\beta_3|$} +\esegment +\end{texdraw} +\end{center} + +\end{document} diff --git a/Master/texmf-dist/doc/support/texdraw/examples/txdexamp.tex b/Master/texmf-dist/doc/support/texdraw/examples/txdexamp.tex new file mode 100644 index 00000000000..19d2eba14be --- /dev/null +++ b/Master/texmf-dist/doc/support/texdraw/examples/txdexamp.tex @@ -0,0 +1,485 @@ +% TeXdraw examples + +% $Id: txdexamp.tex 2.1 1999/11/15 TeXdraw-v2r3 $ + +% These examples are taken from the TeXdraw manual. Note that the fonts +% for text will be different from those in the manual -- here we use the +% plain TeX defaults. + +% Peter Kabal +% Department of Electrical & Computer Engineering +% McGill University +% 3480 University +% Montreal, Quebec +% Canada H3A 2A7 + +% kabal@ECE.McGill.CA + +\input texdraw +\input txdtools +\let\et=\etexdraw +\def\etexdraw{\drawbb\et} + +\noindent +TeXdraw examples using plain TeX. + +\bigskip +\centertexdraw{ + \avec (0 0.8) \textref h:C v:B \htext (0 0.9){\sl y} + \move (0 0) \avec (0.8 0) \textref h:L v:C \htext(0.9 0){\sl x} + \move (0 1.0)} + +\bigskip +\centertexdraw{ + \drawdim{cm} \linewd 0.02 + \move(2 2) \lvec(3 3) \lvec(2 4) \lvec(1 3) \lvec(2 2) + \textref h:C v:C \htext(2 3){$\sum \rho_n$} +} + +\bigskip +\centertexdraw{ + \drawdim in + \linewd 0.03 \setgray 0.6 \arrowheadtype t:F \avec(0.5 0.5) + \linewd 0.01 \setgray 0 \arrowheadtype t:V \avec(1.0 0.5) + \linewd 0.015 \lpatt(0.067 0.1) \lvec (1.5 0) + \linewd 0.02 \lpatt() \arrowheadtype t:T \avec(2.0 0.5) + \arrowheadtype t:H \avec(2.5 0.5) + \setgray 0.4 \arrowheadtype t:W \avec(3.0 0) + \textref h:R v:T \htext (0.35 0.50){\tt t:F} + \textref h:R v:T \htext (1.0 0.43){\tt t:V} + \textref h:R v:T \htext (1.82 0.50){\tt t:T} + \textref h:R v:T \htext (2.5 0.43){\tt t:H} + \textref h:R v:B \htext (2.8 0){\tt t:W} +} + +\bigskip +\centertexdraw{ + \def\bdot {\bsegment + \fcir f:0 r:0.02 + \esegment} + \def\Ttext #1{\bsegment + \textref h:C v:B \htext (0 +0.06){#1} + \esegment} + \def\Btext #1{\bsegment + \textref h:C v:T \htext (0 -0.06){#1} + \esegment} + \def\Ltext #1{\bsegment + \textref h:R v:C \htext (-0.08 0){#1} + \esegment} + \def\Rtext #1{\bsegment + \textref h:L v:C \htext (+0.08 0){#1} + \esegment} + \move (-1.5 0) + \bsegment + \move (+1.55 +0.45) \move (-1.55 -0.45) \move (0 0) + \Ttext{Horizontal Text} + \bdot \Btext{\tt h:C v:C} + \move (-0.9 0) \bdot \Ltext{\tt h:L v:C} + \move (+0.9 0) \bdot \Rtext{\tt h:R v:C} + \move (0 +0.3) \bdot \Ttext{\tt h:C v:T} + \move (0 -0.3) \bdot \Btext{\tt h:C v:B} + \move (-0.9 -0.3) \bdot \Ltext{\tt h:L v:B} + \lvec (-0.9 +0.3) \bdot \Ltext{\tt h:L v:T} + \lvec (+0.9 +0.3) \bdot \Rtext{\tt h:R v:T} + \lvec (+0.9 -0.3) \bdot \Rtext{\tt h:R v:B} + \lvec (-0.9 -0.3) + \esegment + \def\atext {\rtext td:45 } + \def\ATtext #1{\bsegment + \setsegscale 0.707 + \textref h:C v:B \atext (-0.06 +0.06){#1} + \esegment} + \def\ABtext #1{\bsegment + \setsegscale 0.707 + \textref h:C v:T \atext (+0.060 -0.06){#1} + \esegment} + \def\ALtext #1{\bsegment + \setsegscale 0.707 + \textref h:R v:C \atext (-0.08 -0.08){#1} + \esegment} + \def\ARtext #1{\bsegment + \setsegscale 0.707 + \textref h:L v:C \atext (+0.08 +0.08){#1} + \esegment} + \move (+1.5 0) + \bsegment + \move (+1.33 +1.33) \move (-1.33 -1.33) \move (0 0) + \setsegscale 0.707 + \ATtext{Rotated Text} + \bdot \ABtext{\tt h:C v:C} + \move (-0.9 -0.9) \bdot \ALtext{\tt h:L v:C} + \move (+0.9 +0.9) \bdot \ARtext{\tt h:R v:C} + \move (-0.3 +0.3) \bdot \ATtext{\tt h:C v:T} + \move (+0.3 -0.3) \bdot \ABtext{\tt h:C v:B} + \move (-0.6 -1.2) \bdot \ALtext{\tt h:L v:B} + \lvec (-1.2 -0.6) \bdot \ALtext{\tt h:L v:T} + \lvec (+0.6 +1.2) \bdot \ARtext{\tt h:R v:T} + \lvec (+1.2 +0.6) \bdot \ARtext{\tt h:R v:B} + \lvec (-0.6 -1.2) + \esegment +} + +\vfill +\eject + + +\bigskip +\centertexdraw{ + \move(-0.75 -0.25) \lvec (-0.75 +0.5) \lvec (+0.75 +0.5) + \lvec(+0.75 -0.25) \ifill f:0.9 % fill the region + \move(0 0) + \avec(-0.75 -0.25) \textref h:R v:C \htext{H-text} + \move(0 0) \avec(-0.75 +0.25) \textref h:R v:B \htext{H-text} + \move(0 0) \avec(0 +0.5) \textref h:L v:T \vtext{V-text} + \move(0 0) \avec(+0.75 +0.25) \textref h:L v:B \htext{H-text} + \move(0 0) \avec(+0.75 -0.25) \textref h:L v:C \htext{H-text} + \move (-1.15 -0.3) \move (+1.15 +0.92) % increase the size of the drawing +} + +\bigskip +\centertexdraw{ + \linewd 0.02 + \fcir f:0.7 r:1 + \larc r:1 sd:45 ed:135 + \lvec ( 0.707 0.707) \move (0 0) \lvec (-0.707 +0.707) +} + +\bigskip +\centertexdraw{ + \def\Ltext #1{\bsegment + \textref h:R v:C \htext (-0.08 0){#1} + \esegment} + \def\Rtext #1{\bsegment + \textref h:L v:C \htext (+0.08 0){#1} + \esegment} + \def\bdot {\fcir f:0 r:0.02 } + \def\Ldot #1{\bdot \Ltext{#1}} + \def\Rdot #1{\bdot \Rtext{#1}} + \move (-2 0) + \bsegment + \lpatt (0.033) + \move (0 0) \Ldot{0} \lvec (0 1) \Ldot{1} + \lvec (1 1) \Rdot{2} \lvec (1 0) \Rdot{3} + \lpatt () + \move (0 0) \clvec (0 1)(1 1)(1 0) + \esegment + \move (0 0) + \bsegment + \lpatt (0.033) + \move (0 0) \Ldot{0} \lvec (0.5 0.8) \Ldot{1} + \lvec (1.5 0.8) \Rdot{2} \lvec (1 0) \Rdot{3} + \lpatt () + \move (0 0) \clvec (0.5 1)(1.5 1)(1 0) + \esegment + \move ( 2 0) + \bsegment + \lpatt (0.033) + \move (0 0) \Ldot{0} \lvec (0 1) \Ldot{1} + \lvec (1 0) \Rdot{2} \lvec (1 1) \Rdot{3} + \lpatt () + \move (0 0) \clvec (0 1)(1 0)(1 1) + \esegment +} + +\bigskip +\centertexdraw{ +\move (0.5 0) +\lvec (0 0.5) \clvec (0.5 0.85)(1 0.65)(1.5 1) +\lvec (2 0.5) \clvec (1.5 0.15)(1 0.35)(0.5 0) +\lfill f:0.8 +} + +\vfill +\eject + + +\bigskip +\def\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)} +\centertexdraw{ + \ravec (1 0) \tbox{$H(z)$} \ravec (1 0) +} + +\bigskip +\def\cavec (#1 #2)(#3 #4)(#5 #6){ + \clvec (#1 #2)(#3 #4)(#5 #6) + \cossin (#3 #4)(#5 #6)\cosa\sina + \rmove (0 0) % stroke the Bezier curve + \bsegment + \drawdim in \setsegscale 0.05 + \move ({-\cosa} -\sina) \avec (0 0) + \esegment} + +\def\caw (#1 #2){ + \currentpos \xa\ya + \cossin ({\xa} \ya)(#1 #2)\cosa\sina + +% The nominal wiggly curve is (0 0) (1+dx dy) (-dx -dy) (1 0) +% Find the rotated offset (dx dy) -> (du dv) + \rotatecoord (0.4 0.1)\cosa\sina \du\dv + +% calculate the length of the vector + \vectlen ({\xa} \ya)(#1 #2)\len + +% draw the curve in normalized units + \bsegment + \setsegscale {\len} + \realadd \cosa \du \tmpa \realadd \sina \dv \tmpb + \cavec ({\tmpa} \tmpb)({-\du} -\dv)({\cosa} \sina) + \esegment + + \move (#1 #2)} + +% rotate a coordinate (x y) +% arguments: (x y) cosa sina x' y' +% x' = cosa * x - sina * y; y' = sina * x + cosa * y +\def\rotatecoord (#1 #2)#3#4#5#6{ + \getpos (#1 #2)\xarg\yarg + \realmult \xarg {#3} \tmpa \realmult \yarg {#4} \tmpb + \realadd \tmpa {-\tmpb} #5 + \realmult \xarg {#4} \tmpa \realmult \yarg {#3} \tmpb + \realadd \tmpa \tmpb #6} + +\centertexdraw{ + \arrowheadtype t:W + \move (0 0) + \cavec (1.4 0.1)(-0.4 -0.1)(1 0) + \move (1 0) \caw (1 1) \htext{tip at \tt (1 1)} + \move (1 0) \caw (2 1) \htext{tip at \tt (2 1)} + \move (1 0) \caw (2 0) \htext{tip at \tt (2 0)} + \move (0 1.13) \move (0 -0.04) +} + +\vfill +\eject + + +\bigskip +\def\delay {\bsegment + \setsegscale 0.3 + \lvec (0 +0.5) \lvec (1 +0.5) \lvec (1 -0.5) + \lvec (0 -0.5) \lvec (0 0) + \textref h:C v:C \htext (0.5 0){$z^{-1}$} + \savepos (1 0)(*ex *ey) + \esegment + \move (*ex *ey)} +\def\bdot {\fcir f:0 r:0.02 } +\def\Ttext #1{\bsegment + \textref h:C v:B \htext (0 +0.06){#1} + \esegment} +\def\Btext #1{\bsegment + \textref h:C v:T \htext (0 -0.06){#1} + \esegment} +\def\Ltext #1{\bsegment + \textref h:R v:C \htext (-0.06 0){#1} + \esegment} +\def\Rtext #1{\bsegment + \textref h:L v:C \htext (+0.06 0){#1} + \esegment} +\def\cradius {0.08} +\def\pluss {\bsegment + \setsegscale {\cradius} + \move (-0.5 0) \lvec (+0.5 0) + \move (0 -0.5) \lvec (0 +0.5) + \esegment} +\def\pcir {\lcir r:{\cradius} \pluss} +\def\puttext (#1 #2)#3{\bsegment + \setsegscale {\cradius} + \textref h:C v:C \htext (#1 #2){#3} + \esegment} +\def\putwnw #1{\puttext (-1.7 +1.2){#1}} +\def\putwsw #1{\puttext (-1.7 -1.2){#1}} +\def\putn #1{\puttext ( 0 +2 ){#1}} +\def\puts #1{\puttext ( 0 -2 ){#1}} +\def\avectoc (#1 #2){\currentpos \xa\ya + \cossin ({\xa} \ya)(#1 #2)\cosa\sina + \savepos (#1 #2)(*tx *ty) + \bsegment + \move (*tx *ty) + \setsegscale {\cradius} + \rmove ({-\cosa} -\sina) + \savecurrpos (*ex *ey) + \esegment + \avec (*ex *ey) + \move (#1 #2)} +\def\avecfrc (#1 #2){\currentpos \xa\ya + \cossin ({\xa} \ya)(#1 #2)\cosa\sina + \bsegment + \setsegscale {\cradius} + \move ({\cosa} \sina) + \savecurrpos (*ex *ey) + \esegment + \move (*ex *ey) + \avec (#1 #2)} + +\centertexdraw{ +\drawdim in +\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04 +\def\pl {$\scriptscriptstyle +$} \def\mn {$\scriptscriptstyle -$} + +\move (0 +0.63) \move (0 -0.60) \move (0 0) % compensate for the text size + +% Input to the first stage +\bsegment + \Ltext{$x(n)$} + \lvec (0.3 0) \bdot \lvec (0.3 +0.4) + \move (0.3 0) \lvec (0.3 -0.4) + \savepos (0.3 0)(*ex *ey) +\esegment +\move (*ex *ey) + +% first lattice stage +\bsegment + \move (0 +0.4) \avectoc (1.7 +0.4) + \pcir \putwnw{\pl} \puts{\mn} + \avecfrc (2.1 +0.4) + \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4) + \pcir \putwsw{\pl} \putn{\mn} + \avecfrc (2.1 -0.4) + \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4) + \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4) + \move (0.1 +0.42) \Ttext {$f_0(n)$} + \move (2.0 +0.42) \Ttext {$f_1(n)$} + \move (0.1 -0.4) \Btext {$b_0(n)$} + \move (2.0 -0.4) \Btext {$b_1(n)$} + \textref h:L v:B \htext (1.15 +0.2){$K_1$} + \textref h:L v:T \htext (1.15 -0.2){$K_1$} + \savepos (2.1 0)(*ex *ey) +\esegment +\move (*ex *ey) + +% center section +\bsegment + \textref h:C v:C + \htext (0.3 +0.4){$\cdots$} + \htext (0.3 -0.4){$\cdots$} + \savepos (0.6 0)(*ex *ey) +\esegment +\move (*ex *ey) + +% last lattice stage +\bsegment + \move (0 +0.4) \avectoc (1.7 +0.4) + \pcir \putwnw{\pl} \puts{\mn} + \avecfrc (2.3 +0.4) \Rtext{$e(n)$} + \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4) + \pcir \putwsw{\pl} \putn{\mn} + \avecfrc (2.1 -0.4) + \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4) + \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4) + \move (0.1 +0.42) \Ttext {$f_{P-1}(n)$} + \move (2.0 +0.42) \Ttext {$f_P(n)$} + \move (0.1 -0.4) \Btext {$b_{P-1}(n)$} + \move (2.0 -0.4) \Btext {$b_P(n)$} + \textref h:L v:B \htext (1.15 +0.2){$K_P$} + \textref h:L v:T \htext (1.15 -0.2){$K_P$} +\esegment +} + +\bigskip +\centertexdraw{ +\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04 +\def\ds {\displaystyle} +\def\ticklab (#1 #2)#3{\move(#1 #2) + \bsegment + \lvec (0 0.05) + \textref h:C v:T \htext (0 -0.05){#3} + \esegment} +\def\Rtext #1{\bsegment + \textref h:L v:C \htext ( 0.08 0){#1} + \esegment} + +\move (2.4 -0.32) % move to set the size + +\move (0 0) +% Axes +\avec (0 1.4) +\move (0 0) \avec (2.2 0) \Rtext{$\omega$} +\ticklab (0 0) {0} +\ticklab (0.8 0) {$\ds {\pi \over 2N} $} +\ticklab (1.2 0) {$\omega_s$} +\ticklab (1.6 0) {$\ds {\pi \over N} $} + +\linewd 0.025 +\move (0 1) +\lvec (0.4 1) +\lvec (0.44 0.998) +\lvec (0.48 0.988) +\lvec (0.52 0.973) +\lvec (0.56 0.951) +\lvec (0.60 0.923) +\lvec (0.64 0.891) +\lvec (0.68 0.852) +\lvec (0.72 0.809) +\lvec (0.76 0.760) +\lvec (0.80 0.707) +\lvec (0.84 0.649) +\lvec (0.88 0.587) +\lvec (0.92 0.522) +\lvec (0.96 0.454) +\lvec (1.00 0.382) +\lvec (1.04 0.309) +\lvec (1.08 0.233) +\lvec (1.12 0.156) +\lvec (1.16 0.078) +\lvec (1.20 0) +\lvec (1.9 0) +} + +\bigskip +\centertexdraw{ +\arrowheadtype t:V \arrowheadsize l:0.08 w:0.04 +\linewd 0.01 +\setunitscale 1.5 % circle will have radius 1.5 inches + +\def\Btext #1{\bsegment + \textref h:C v:T \htext (0 -0.04){#1} + \esegment} +\def\Ttext #1{\bsegment + \textref h:C v:B \htext (0 0.04){#1} + \esegment} +\def\Ltext #1{\bsegment + \textref h:R v:C \htext (-0.04 0){#1} + \esegment} +\def\bdot {\fcir f:0 r:0.0133 } +\def\vtick {\bsegment + \move (0 -0.05) \lvec (0 0.05) + \esegment} +\def\htick {\bsegment + \move (-0.05 0) \lvec ( 0.05 0) + \esegment} +\def\Hlen #1#2{\bsegment + \vtick \avec ({#1} 0) \vtick \avec (0 0) + \relsegscale 0.5 + \move ({#1} 0) \Ttext {#2} + \esegment} +\def\Vlen #1#2{\bsegment + \htick \avec (0 {#1}) \htick \avec (0 0) + \relsegscale 0.5 + \move (0 {#1}) \Ltext {#2} + \esegment} + +\lcir r:1 % circle +\move (-1.05 0) \lvec ( 1.05 0) % axes +\move (0 -1.05) \lvec (0 1.05) + +\move (0 0) \lvec (0.707 0.707) \bdot +\rmove (0.02 0.02) \textref h:L v:B \htext {X} +\move (0.707 -0.707) \bdot +\textref h:R v:T \htext(-0.02 -0.02){O} + +\move (0.5 0) % center of ellipse +\bsegment + \lellip rx:0.435 ry:0.804 + \bdot \Btext {$\beta_2$} + \move (0 0.15) \Hlen {0.435}{$|\beta_1{+}\beta_3|$} + \move (-0.7 0) \Vlen {0.804}{$|\beta_1{-}\beta_3|$} +\esegment +} + +\bye diff --git a/Master/texmf-dist/doc/support/texdraw/test/ttexdraw.tex b/Master/texmf-dist/doc/support/texdraw/test/ttexdraw.tex new file mode 100644 index 00000000000..0d48972952c --- /dev/null +++ b/Master/texmf-dist/doc/support/texdraw/test/ttexdraw.tex @@ -0,0 +1,204 @@ +\documentclass{article} +\usepackage{texdraw} +\usepacakge{amsmath} + +\begin{document} + +% Test TeXdraw macros - unusual cases + +% $Id: ttexdraw.tex 1.8 1999/11/15 TeXdraw-v2r3 $ + +% check for extraneous characters in texdraw.tex +\setbox0=\vbox{\input texdraw } +\message {texdraw.tex box size: + height: \the\ht0, width: \the\wd0, depth: \the\dp0} + +\bigskip +\bigskip + +% check for a zero sized box for a zero sized TeXdraw +\setbox0=\hbox{\begin{texdraw} + \lvec (0 0) + \end{texdraw}} +\message {TeXdraw box size: + height: \the\ht0, width: \the\wd0, depth: \the\dp0} + +\bigskip +\bigskip + +\begin{texdraw} +% text only, should be no PostScript file + \rtext td:-45 (2 2){Test Text} +\end{texdraw} + +\bigskip +\bigskip + +\let\et=\etexdraw +\def\etexdraw{\drawbb\et} + +\begin{texdraw} +% blank lines OK? +% box should be 2in by 2in +% arc should go from inside to outside the box + +% \larc if no initial point defined +\larc r:1 sd:45 ed:135 + +% \ifill if path is empty +\move (2 2) +\ifill f:0.5 + +\lvec (1 1) + +\end{texdraw} + +\bigskip +\bigskip + +% Testing restoration of position after segments +\begin{texdraw} + \lvec (1 1) + \bsegment + \linewd 0.03 + \lvec (1 0) + \esegment + \bsegment + \lvec (0 -1) + \esegment +\end{texdraw} + +\bigskip +\bigskip + +% Check t:W arrows, should wipe out the line under the rightmost arrow head +\begin{texdraw} + \arrowheadtype t:W + \arrowheadsize l:0.9 w:0.6 + \linewd 0.05 + \bsegment + \move (0 1) + \lvec (3 3) + \bsegment + \move (-3 -3) + \avec (0 0) + \esegment + \lvec (3 2) + \esegment + \move (3 0) + \bsegment + \move (0 1) + \lvec (3 3) + \rmove (0 0) + \bsegment + \move (-3 -3) + \avec (0 0) + \esegment + \lvec (3 2) + \esegment +\end{texdraw} + +\bigskip +\bigskip + +% Check that paths continue under filled circles +\begin{texdraw} + \bsegment + \lvec (1 1) + \bsegment + \move (-0.25 -0.25) + \fcir f:0.8 r:0.5 + \esegment + \lvec (1 0) + \esegment + \move (3 0) + \bsegment + \lvec (1 1) + \rmove (0 0) + \bsegment + \move (-0.25 -0.25) + \fcir f:0.8 r:0.5 + \esegment + \lvec (1 0) + \esegment +\end{texdraw} + +\bigskip +\bigskip + +% Check that positions are restored correctly when the move pending and path +% in progress flags are set + +\begin{texdraw} + \linewd 0.045 + \lvec (1 0) + \bsegment + \move (0 -1) + \bsegment + \esegment + \lvec (0 0) + \esegment + \lvec (2 0) +\end{texdraw} + +\bigskip +\bigskip + +% Check \everytexdraw and \fellip +\everytexdraw={\fellip f:0.8 rx:2.5 ry:1.0 } +\begin{texdraw} + \lvec (0 0.75) +\end{texdraw} +\everytexdraw={} + +\bigskip +\bigskip + +\def\ptext#1{\writeps{ gsave /Times-Roman findfont 41.6667 +scalefont setfont (#1) dup stringwidth exch neg 2 div exch neg 2 div rmoveto +show grestore }} + +\begin{texdraw} + \move( 0 0) + \move(-1 -1) \rlvec( 2 0) \rlvec( 0 2) \rlvec( -2 0) \rlvec( 0 -2) + \lfill f:.8 + \move( 0 .2) + \textref h:C v:C + \htext{This is a very long sentence to illustrate my point} + \move( 0 -.2) + \ptext{This is a very long sentence to illustrate my point} + \move( 0 0) + \move(-.5 -.5) \rlvec( 1 0) \rlvec( 0 1) \rlvec( -1 0) \rlvec( 0 -1) + \lfill f:.9 +\etexdraw + +\bigskip +\bigskip + +% This example, with texdraw invoked from \text from within an equation, +% ends up invoking texdraw 8 times (\gather together with \mathchoice). +% A hook was built in to texdraw to detect half of these cases. Now only +% 4 identical copies of the PS file are generated. +% Note: To avoid generating the extra PS files, use a \savebox to create the +% drawing and then place the box where desired. +\begin{equation} +\text{ + \begin{texdraw} + \move(0 0)\lcir r:0.1 + \end{texdraw} + } +\end{equation} + +\bigskip +\bigskip + +% extraneous data: generate an error message +\message{ <<<<< Expect an error message: type return >>>>>} +\btexdraw + \move (2 2) + \move (3 3) +% Put in a spurious character +a +\end{texdraw} + +\end{document} diff --git a/Master/texmf-dist/doc/support/texdraw/texdraw.pdf b/Master/texmf-dist/doc/support/texdraw/texdraw.pdf Binary files differindex bf6fce7b513..8d038256c0c 100644 --- a/Master/texmf-dist/doc/support/texdraw/texdraw.pdf +++ b/Master/texmf-dist/doc/support/texdraw/texdraw.pdf diff --git a/Master/texmf-dist/doc/support/texdraw/texdraw.texi b/Master/texmf-dist/doc/support/texdraw/texdraw.texi index 800fa6ee26b..9cacbc73500 100644 --- a/Master/texmf-dist/doc/support/texdraw/texdraw.texi +++ b/Master/texmf-dist/doc/support/texdraw/texdraw.texi @@ -1,9 +1,9 @@ % -*-texinfo-*- -% $Id: texdraw.texi,v 2.6 2019/03/28 texdraw-V2R0a $ +% $Id: texdraw.texi 2.11 2019/04/18 TeXdraw-v2r3 $ % To produce a TeX version of this manual, you must have the following -% files accessible by TeX. +% files accessible to TeX. % texdraw.texi - this file, the TeXdraw manual, part of the TeXdraw % distribution % texdraw.tex - the TeXdraw macros, part of the TeXdraw distribution @@ -15,7 +15,7 @@ % texinfo.tex is available by anonymous ftp as % pub/gnu/texinfo-3.6.tar.Z on prep.ai.mit.edu. % -\input texdraw % bring in TeXdraw before texinfo changes escape from \ to @ +\input texdraw % bring in TeXdraw before texinfo changes "\" to "@" \input txdtools \input texinfo @c -*-texinfo-*- @@ -25,7 +25,7 @@ @comment %**end of header @copying -This manual (edition 2.0a) documents @TeX{}draw, a system for +This manual (edition 2.3) documents @TeX{}draw, a system for producing PostScript drawings from @TeX{}. Copyright @copyright{} 1993--2019 Peter Kabal @@ -45,8 +45,8 @@ Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. @titlepage @title @TeX{}draw @subtitle PostScript Drawings from @TeX{} -@subtitle Edition 2.0a -@subtitle March 2019 +@subtitle Edition 2.3 +@subtitle April 2019 @author Peter Kabal @page @@ -54,12 +54,11 @@ Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. @insertcopying Peter Kabal @* -Department of Electrical Engineering @* +Department of Electrical @& Computer Engineering @* McGill University @* -3480 University @* -Montreal, Quebec @* -Canada @w{} H3A@dmn{}2A7 @* -@code{peter dot kabal at mcgill dot ca} + +@code{peter dot kabal at mcgill dot ca} @* +@code{http://www-mmsp.ece.mcgill.ca/MMSP/Documents/Software/} @end titlepage @contents @@ -71,10 +70,7 @@ Canada @w{} H3A@dmn{}2A7 @* @TeX{}draw is a collection of macros that allow drawings to be created from @emph{within} @TeX{}. -This is edition 2.0a of the @TeX{}draw documentation. The only -substantive change from edition 2.0 is the license, which is now -CC-BY (any version). - +This is edition 2.3 of the @TeX{}draw documentation. @end ifnottex @menu @@ -265,7 +261,7 @@ macros from the file @file{texdraw.tex} and optionally defines the @code{\begin@{texdraw@}} / @code{\end@{texdraw@}} environment. @example @group -\documentstyle[11pt]@{article@} % Article style with 11pt size option +\documentstyle[11pt]@{article@} % Article style at 11pt size ... \input texdraw % Read in the TeXdraw macros \newenvironment@{texdraw@}@{\leavevmode\btexdraw@}@{\etexdraw@} @@ -287,7 +283,7 @@ the standard @code{graphics} package and reads in the file @file{texdraw.tex} containing the definitions of the @TeX{}draw macros. @example @group -\documentclass[11pt]@{article@} % Article class with the 11pt size option +\documentclass[11pt]@{article@} % Article class at 11pt size \usepackage@{texdraw@} % TeXdraw commands \begin@{document@} @@ -2213,7 +2209,8 @@ commands built from the basic @TeX{}draw commands. \arrowheadtype t:F \arrowheadsize l:0.08 w:0.04 \def\pl {$\scriptscriptstyle +$} \def\mn {$\scriptscriptstyle -$} -\move (0 +0.63) \move (0 -0.60) \move (0 0) % compensate for text size +\move (0 +0.63) \move (0 -0.60) % compensate for the text size +\move (0 0) % Input to the first stage \bsegment @@ -2371,7 +2368,8 @@ shared between the commands used to draw these blocks. \arrowheadtype t:F \arrowheadsize l:0.08 w:0.04 \def\pl @{$\scriptscriptstyle +$@} \def\mn @{$\scriptscriptstyle -$@} -\move (0 +0.63) \move (0 -0.60) \move (0 0) % compensate for text size +\move (0 +0.63) \move (0 -0.60) % compensate for the text size +\move (0 0) % Input to the first stage \bsegment @@ -2890,12 +2888,6 @@ number which is used to scale coordinate values. The overall scaling factor is the product of the unit scale factor and the segment scale factor. -@item \texdrawbox @{ ... @} -Create a @TeX{}draw box. The argument contains @TeX{}draw commands. -This macro returns a @TeX{} box with height equal to the height of the -drawing and width equal to the width of the drawing. The depth of the -box is zero. - @item \textref h:@var{h-ref} v:@var{v-ref} Set the text reference point for subsequent text commands. The horizontal reference point @var{h-ref} is one of @code{L}, @code{C} or |