Drawing Circuit Diagrams For Text Books
Drawing Circuit Diagrams For Text Books
Drawing Circuit Diagrams For Text Books
Abstract
The development of a library of pictograms is described. The
pictograms are defined using macros embodied in and
used to create an application to enable high definition circuit
diagrams to be easily included in m d o c u m e n t s .
Proceedings
Drawing Circuit Diagrams for Text Books
It is then used simply as \Rv{x){y) where x,y Initially, the inversion bubble that converts a
are absolute coordinates in the space of the final buffer to an inverter was constructed using \circu-
diagram. lararc, which took a long time to compile and used
Approach B follows the suggestion made in considerable amounts of memory. It was noticed
Section 8.2 of the PICI'EX manual on how to include that a lower case o in courier font is circular. and at
pictures in pictures. Thus \Rv can be defined by lOpt, of a perfect size to be used as \bubble which
\def \RvC\% can be \put immediately!
\putrectangle corners at 0 18 and 6 0
1 b and I are used to make H
\Rv is subsequently placed in the final picture using
Infill of shapes proved to be difficult. The diode
\put {\Rv) [bl] at x y. In this case. approach
triangle is constructed by successively \puting on
B is preferred because it is simpler and use of
a centerline vertical rules of diminishing height and
\put allows for an x,h,ft and/or a y,h,ft so that
offset 0.4pt to each other. The down arrow of the
the resistor can be located at the known end of a
npn transistor is drawn similarly by \plotting a
vertical line and offset 3pt to place the origin. Note
series of lines radiating from the tip of the arrow.
that we found that the inclusion of \beginpicture
Labels of some signals are drawn with a bar
. . \endpicture as suggested in Section 8.2 was over the symbol to indicate that the signals are
found to be unnecessary in the definition.
active low. Given that the symbols are of unknown
An example of logical placement is
length, this was solved by
\label#1#2#3#4{% #l=$x$ #2=$y$
\def\actlow#l~\hbox~#l~
% #3=pin number #4=label $\cdots$
\setboxl=\hbox{#l3\kern-\wd1
used to draw this IC. \raise5.5pt\hbox{%
\vrule height 0.4pt width \wdl
)3
Problems
It must be stressed that problems discussed here
relate to our use of Q m in trying to create an
application for which it was not intended and not
GSD
to QCl&X itself.
\linethickness has no effect on Q w
macros producing curves so that. for exam-
Here, each label is placed as ple, the circular outline used to draw the
transistor could not be changed.
\loop . . . \repeat does not seem to work
within any of our defined macros which involve
use of Q w .
The parameter #4 can contain any text, includ- During development, variable names were cho-
ing symbols, so that the depth of this sub-box is sen which by chance coincided with names used
in Q w . To avoid repetition of the problems
unknown. Since its depth will define the depth of
this caused. all CIRTEX variables now start
\label, logical placement is essential to maintain
alignment. with a c e.g. \cxone
Once these concepts were understood, a library Our initial use of \setbox1 gave very odd
of objects and pictograms was developed. results until the valuable advice to always
use \newbox was remembered (which produced
\box22!).
Tricks Our attempt at object-orientated development
implies deeper and deeper grouping which may
D and o are used to make b contribute to greater use of memory than is
necessary.
Proceedings of m 9 0
M.P.Maclenan and G.M. Burns
Conclusion
The extent of development now allows us to quickly
draw diagrams like these,
_I:-
0
Bibliography
Norris & Oakley. 1988. "Electronic Publishing,"
m 88 Exeter Proceedings.
Rogers, David. 1988. TUGboat 10(1), April.
Proceedings of m 9 0
CA 1
NMI PA7
SYNC
RESET PA3
PA2
PA 1
PA0
35
RS3 (A3)
RS2 (A2)
RS1 (Al)
RSO (AO)
23
CS2
c-
PB2
PBO
I
/
1
/ / / /
/ \ \
K v a .
(Em0 FFFF)
-
6GI Y7 o7 GI Y7 07
g (COO0 OFFFJ
- 9
Y6 0- Y6 C+-
10 ( A m - BFFF)
Y5 * y5 &
11 (8000 - 9FFF)
Y4 e Y4 &
12 (€000 - 7FFF)
\'A Y3 y 3 011-
~ ( 4 0 0 0SFFF)
-
Y2 0- y2 &
14 (2000 JFFF) 14
G2b Y1 0-
(0000- IFFF)