| 1 |
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> |
| 2 |
<HTML> |
| 3 |
<HEAD> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| 5 |
<meta http-equiv="Content-Style-Type" content="text/css"> |
| 6 |
<!--meta http-equiv="Content-Script-Type" content="text/javascript"--> |
| 7 |
<TITLE>SVG Examples: Circuit_macros Version XXX</TITLE> |
| 8 |
<meta name="keywords" content="HTML" |
| 9 |
`content="Circuit elements, basic circuits, logic circuits, diagrams, |
| 10 |
electric circuits, resistor, capacitor, inductor, diode, source, amplifier, |
| 11 |
integrator, fuse, switch, antenna, opamp, transformer, relay, contact, jack, |
| 12 |
plug, FET, UJT, thyristor, bipolar transistor, nport, windings, timer, |
| 13 |
optical isolator, rectifier, bistable, oscillator, CMOS, MOSFET, power supply, |
| 14 |
NAND gate, controlled source, synchronous machine, digital circuit, signal-flow |
| 15 |
graph, latch, decoder, flipflop, full adder, logic diagram, crossbar switch, |
| 16 |
dimensioning, control system, graph, RGB colors, recursion, binary tree, |
| 17 |
flowcharts, picture overlay, ASME Y14.5"'> |
| 18 |
|
| 19 |
<style type="text/css"> |
| 20 |
</style> |
| 21 |
<link rel="shortcut icon" href="../Circuit_macros.ico" type="image/x-icon" /> |
| 22 |
</HEAD> |
| 23 |
|
| 24 |
`<!-- Google tag (gtag.js) --> |
| 25 |
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HRS8TQGRE8"></script> |
| 26 |
<script> |
| 27 |
window.dataLayer = window.dataLayer || []; |
| 28 |
function gtag(){dataLayer.push(arguments);} |
| 29 |
gtag('js', new Date()); |
| 30 |
|
| 31 |
gtag('config', 'G-HRS8TQGRE8'); |
| 32 |
</script>' |
| 33 |
|
| 34 |
<!-- m4 macros: ------------------------------------------------------------ |
| 35 |
define(`ifinstr',`ifelse(`$2',,`$1',index(`$1',`$2'),-1, |
| 36 |
`ifinstr(shift(shift(shift($@))))',`$3')') |
| 37 |
define(`m4inx',`define(`m4x',ifdef(`m4x',`incr(m4x)',1))m4x') |
| 38 |
|
| 39 |
define(`m4tt',`<g style="font-family:monospace">') |
| 40 |
|
| 41 |
dnl cfig( svg filename, [textfile], [y], [OBJECT] ) |
| 42 |
define(`cfig',` |
| 43 |
<p> |
| 44 |
dnl The object type is needed for the overlay |
| 45 |
dnl example |
| 46 |
ifelse(`$4',OBJECT, |
| 47 |
`<object data="$1.svg" type="image/svg+xml" class="img"></object>', |
| 48 |
`<IMG SRC="$1.svg">') |
| 49 |
dnl |
| 50 |
ifelse(`$2',,,`<br><br> |
| 51 |
Fig. m4inx (<a |
| 52 |
href="$1.txt" TYPE="text/plain" TARGET="_blank" alt="$1">$1.m4</a>): |
| 53 |
`$2' changecom(,)&`#'8194;changecom(`#')') |
| 54 |
</p> |
| 55 |
ifinstr(`$3',y,,`<hr>')') |
| 56 |
|
| 57 |
--------------------------------------------------------------------- --> |
| 58 |
|
| 59 |
<BODY> |
| 60 |
<table cellpadding="0" cellspacing="0" |
| 61 |
width="700px" border="0" align="center" ><tr><td> |
| 62 |
|
| 63 |
<H2>SVG Circuit_macros examples, Version XXX</H2> |
| 64 |
|
| 65 |
<A HREF="../../index.html">Home</A> |
| 66 |
> |
| 67 |
<A HREF="examples.html">Examples</A> |
| 68 |
> |
| 69 |
<A HREF="examplesDPV.html">dpv</A> |
| 70 |
|
| 71 |
<hr> |
| 72 |
|
| 73 |
<p> |
| 74 |
This file shows diagrams in .svg format produced |
| 75 |
without the use of LaTeX or equivalent. |
| 76 |
The diagrams have been selected and adapted from the Circuit_macros |
| 77 |
examples in order to test the svg output of dpic. |
| 78 |
</p> |
| 79 |
<p> |
| 80 |
Generating svg line |
| 81 |
art is straightforward but formatting text is not because TeX, LaTeX, |
| 82 |
and related word processors do not produce svg directly. Either |
| 83 |
less-sophisticated text formatting must be employed for svg or an |
| 84 |
<A HREF="https://en.wikibooks.org/wiki/LaTeX/Export_To_Other_Formats"> |
| 85 |
intermediate format</A> |
| 86 |
such as pdf can be |
| 87 |
produced, followed by an additional processing step to convert to svg. |
| 88 |
Two possibilities for the latter are |
| 89 |
<A HREF="https://www.ctan.org/pkg/dvisvgm">dvisvgm</A> |
| 90 |
and |
| 91 |
<A HREF="https://github.com/dawbarton/pdf2svg">pdf2svg</A>. |
| 92 |
However, many circuit and similar diagrams intended for the web do not |
| 93 |
require sophisticated labels; the examples shown below might |
| 94 |
be representative. |
| 95 |
</p> |
| 96 |
<p> |
| 97 |
Click on the link to view the source of each diagram. |
| 98 |
</p> |
| 99 |
<hr> |
| 100 |
<p> |
| 101 |
There are other issues: |
| 102 |
<ul> |
| 103 |
<li> The default font face is not specified in all of these diagrams but is |
| 104 |
inherited from the enclosing document, so the appearance of labels can |
| 105 |
differ depending on the browser. Some of these diagrams set the font at |
| 106 |
the beginning of the diagram source. |
| 107 |
<!-- <li> The <svg tag may require modification |
| 108 |
from the default used for this test. --> |
| 109 |
<!-- Dpic might be modified to |
| 110 |
allow the generation of custom headers but that has not been done. --> |
| 111 |
<li> Diagrams such as these contain text labels |
| 112 |
that have to be treated differently from the LaTeX-compatible versions; |
| 113 |
for example, |
| 114 |
apparently there is no direct way to know the bounding box of arbitrary svg |
| 115 |
text. |
| 116 |
<!-- text, as discussed |
| 117 |
<a href="http://www.aditus.nu/jpgraph/jpg_svg.php" TARGET="_blank">here,</a> |
| 118 |
for example. --> |
| 119 |
Consequently, text placement is approximate and may require |
| 120 |
manual adjustment. |
| 121 |
<li> Rather than patch the original source files for svg production, |
| 122 |
edited copies have been used. The configuration file svg.m4 read by |
| 123 |
m4 prior to libcct.m4 contains the following macros defined for svg. |
| 124 |
Others could be defined to exercise some of the media capabilties |
| 125 |
of svg. They are subject to change: |
| 126 |
<ul> |
| 127 |
<li> |
| 128 |
m4tt`'svg_font(</g>font-face,nominal size[:dptextratio],textoffset, |
| 129 |
dpic commands`'m4tt)</g>: |
| 130 |
Change font face and dpic m4tt`'textht</g>, m4tt`'dptextratio</g>, |
| 131 |
and m4tt`'textoffset</g> parameters. |
| 132 |
If arg4 is blank, the font is changed and |
| 133 |
requires m4tt`'command "</g>"</g> at the end |
| 134 |
to cancel the font change. |
| 135 |
<br> |
| 136 |
Note: |
| 137 |
Nominal height = text height in drawing units; actual height = |
| 138 |
nominal ht x m4tt`'dptextratio</g>. |
| 139 |
<br> |
| 140 |
Examples: <br> |
| 141 |
m4tt`'svg_font(Times)</g><br> |
| 142 |
m4tt`'svg_font(Times,14bp__)</g><br> |
| 143 |
m4tt`'svg_font(sans-serif,14bp__:0.71)</g><br> |
| 144 |
m4tt`'svg_font(Times,11bp__,1bp__,"text" at A)</g><br> |
| 145 |
m4tt`'svg_font(font-family="Times")</g><br> |
| 146 |
m4tt`'svg_font(font-family="Times" font-style="italic")</g><br> |
| 147 |
m4tt`'svg_font(style="font-family:Times; font-style:italic")</g> |
| 148 |
<li>m4tt svgfontratio(</g>font name`'m4tt)</g>; |
| 149 |
Reasonable m4tt`'dptextratio</g> value for common fonts, used |
| 150 |
by m4tt`'svg_font</g>. |
| 151 |
<li>m4tt svg_tspan(</g>text attributes, text`'m4tt)</g>; |
| 152 |
e.g. m4tt`'svg_tspan(font-style="italic" font-size="75%",XYZ)</g> |
| 153 |
<li>m4tt svg_it(</g>text`'m4tt)</g>: for italics |
| 154 |
<li>m4tt svg_tt(</g>text`'m4tt)</g>: for monospace (courier) |
| 155 |
<li>m4tt svg_sf(</g>text`'m4tt)</g>: sans-serif (Helvetica) |
| 156 |
<li>m4tt svg_norm(</g>text`'m4tt)</g>: for normal text |
| 157 |
<li>m4tt svg_bf(</g>text`'m4tt)</g>: for bold face |
| 158 |
<li>m4tt svg_small(</g>text, percent`'m4tt)</g>: |
| 159 |
to set a smaller text size, default 66 |
| 160 |
<li>m4tt svg_fsize(</g>text, percent`'m4tt)</g>: |
| 161 |
for setting larger or smaller text size, default 100 |
| 162 |
<li>m4tt svg_sub(</g>text, size percent, y displ, x displ`'m4tt)</g>: |
| 163 |
subscript |
| 164 |
<li>m4tt svg_ul(</g>text`'m4tt)</g>: underlined text |
| 165 |
<li>m4tt svg_ol(</g>text`'m4tt)</g>: overlined text |
| 166 |
<li>m4tt svg_sup(</g>text, size percent, y displ, x displ`'m4tt)</g>: |
| 167 |
superscript |
| 168 |
<li>m4tt svg_hat(</g>character`'m4tt)</g>: circumflex-accented character |
| 169 |
<li>m4tt svg_frac(</g>numerator[:wid], denominator[:wid]`'m4tt)</g>: |
| 170 |
basic fraction, wid in drawing units |
| 171 |
<li>m4tt svg_rot(</g>degrees, "text" [at position]`'m4tt)</g>: |
| 172 |
Rotate text degrees (default 90) ccw. |
| 173 |
Requires m4tt`'svg_rot_init(</g>filename`'m4tt)</g> and the source |
| 174 |
must be processed twice. |
| 175 |
<li>m4tt svg_rot_init(</g>filename`'m4tt)</g>: |
| 176 |
filename is the basename of the output of |
| 177 |
m4tt`'dpic -v filename.pic > filename.svg`'m4tt |
| 178 |
<li>m4tt svg_symbol(</g>text`'m4tt)</g>: allow quoted pound sign in text, |
| 179 |
e.g., m4tt`'svg_symbol(10&`#'176;)</g> produces 10° |
| 180 |
<li>m4tt svgLink(</g>URL, drawing object, m4tt[B])</g>: |
| 181 |
link to external file using |
| 182 |
<a xlink:href=...>...</a> (default is |
| 183 |
m4tt`'target="_blank"</g> unless |
| 184 |
arg 3 = B) |
| 185 |
<li>m4tt svgLinkString</g> as above but for strings attached to objects |
| 186 |
<li> Greek and other symbols (typically of the form &#nnn; so care is |
| 187 |
required when used in a macro argument): |
| 188 |
|
| 189 |
<!-- |
| 190 |
Reference: |
| 191 |
https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references |
| 192 |
and |
| 193 |
https://www.toptal.com/designers/htmlarrows/math/ |
| 194 |
--> |
| 195 |
<table cellpadding="2" cellspacing="0" width="75%" > |
| 196 |
<tr> |
| 197 |
<td width="10%"> m4tt svg_alpha</g> <td align="left"> changecom(,)&`#'945;changecom(`#') |
| 198 |
<td width="10%"> m4tt svg_beta</g> <td align="left"> changecom(,)&`#'946;changecom(`#') |
| 199 |
<td width="10%"> m4tt svg_Gamma</g> <td align="left"> changecom(,)&`#'915;changecom(`#') |
| 200 |
<td width="10%"> m4tt svg_gamma</g> <td align="left"> changecom(,)&`#'947;changecom(`#') |
| 201 |
<td width="10%"> m4tt svg_Delta</g> <td align="left"> changecom(,)&`#'916;changecom(`#') |
| 202 |
<td width="10%"> m4tt svg_delta</g> <td align="left"> changecom(,)&`#'948;changecom(`#') |
| 203 |
<td width="10%"> m4tt svg_epsilon</g> <td align="left"> changecom(,)&`#'949;changecom(`#') |
| 204 |
<td width="10%"> m4tt svg_zeta</g> <td align="left"> changecom(,)&`#'950;changecom(`#') |
| 205 |
</tr> |
| 206 |
<tr> |
| 207 |
<td width="10%"> m4tt svg_eta</g> <td align="left"> changecom(,)&`#'951;changecom(`#') |
| 208 |
<td width="10%"> m4tt svg_Theta</g> <td align="left"> changecom(,)&`#'920;changecom(`#') |
| 209 |
<td width="10%"> m4tt svg_theta</g> <td align="left"> changecom(,)&`#'952;changecom(`#') |
| 210 |
<td width="10%"> m4tt svg_iota</g> <td align="left"> changecom(,)&`#'953;changecom(`#') |
| 211 |
<td width="10%"> m4tt svg_kappa</g> <td align="left"> changecom(,)&`#'954;changecom(`#') |
| 212 |
<td width="10%"> m4tt svg_Lambda</g> <td align="left"> changecom(,)&`#'923;changecom(`#') |
| 213 |
<td width="10%"> m4tt svg_lambda</g> <td align="left"> changecom(,)&`#'955;changecom(`#') |
| 214 |
<td width="10%"> m4tt svg_mu</g> <td align="left"> changecom(,)&`#'956;changecom(`#') |
| 215 |
</tr> |
| 216 |
<tr> |
| 217 |
<td width="10%"> m4tt svg_nu</g> <td align="left"> changecom(,)&`#'957;changecom(`#') |
| 218 |
<td width="10%"> m4tt svg_Xi</g> <td align="left"> changecom(,)&`#'926;changecom(`#') |
| 219 |
<td width="10%"> m4tt svg_xi</g> <td align="left"> changecom(,)&`#'958;changecom(`#') |
| 220 |
<td width="10%"> m4tt svg_Pi</g> <td align="left"> changecom(,)&`#'928;changecom(`#') |
| 221 |
<td width="10%"> m4tt svg_pi</g> <td align="left"> changecom(,)&`#'960;changecom(`#') |
| 222 |
<td width="10%"> m4tt svg_rho</g> <td align="left"> changecom(,)&`#'961;changecom(`#') |
| 223 |
<td width="10%"> m4tt svg_Sigma</g> <td align="left"> changecom(,)&`#'931;changecom(`#') |
| 224 |
<td width="10%"> m4tt svg_sigma</g> <td align="left"> changecom(,)&`#'963;changecom(`#') |
| 225 |
</tr> |
| 226 |
<tr> |
| 227 |
<td width="10%"> m4tt svg_tau</g> <td align="left"> changecom(,)&`#'964;changecom(`#') |
| 228 |
<td width="10%"> m4tt svg_upsilon</g> <td align="left"> changecom(,)&`#'965;changecom(`#') |
| 229 |
<td width="10%"> m4tt svg_Phi</g> <td align="left"> changecom(,)&`#'934;changecom(`#') |
| 230 |
<td width="10%"> m4tt svg_phi</g> <td align="left"> changecom(,)&`#'966;changecom(`#') |
| 231 |
<td width="10%"> m4tt svg_chi</g> <td align="left"> changecom(,)&`#'967;changecom(`#') |
| 232 |
<td width="10%"> m4tt svg_Psi</g> <td align="left"> changecom(,)&`#'936;changecom(`#') |
| 233 |
<td width="10%"> m4tt svg_psi</g> <td align="left"> changecom(,)&`#'968;changecom(`#') |
| 234 |
<td width="10%"> m4tt svg_Omega</g> <td align="left"> changecom(,)&`#'937;changecom(`#') |
| 235 |
</tr> |
| 236 |
<tr> |
| 237 |
<td width="10%"> m4tt svg_omega</g> <td align="left"> changecom(,)&`#'969;changecom(`#') |
| 238 |
<td width="10%"> m4tt svg_micro</g> <td align="left"> changecom(,)&`#'956;changecom(`#') |
| 239 |
<td width="10%"> m4tt svg_ohm</g> <td align="left"> changecom(,)&`#'937;changecom(`#') |
| 240 |
<td width="10%"> m4tt svg_lt</g> <td align="left"> changecom(,)&`#'60;changecom(`#') |
| 241 |
<td width="10%"> m4tt svg_gt</g> <td align="left"> changecom(,)&`#'62;changecom(`#') |
| 242 |
<td width="10%"> m4tt svg_leq</g> <td align="left"> changecom(,)&`#'8804;changecom(`#') |
| 243 |
<td width="10%"> m4tt svg_geq</g> <td align="left"> changecom(,)&`#'8805;changecom(`#') |
| 244 |
<td width="10%"> m4tt svg_prime</g> <td align="left"> changecom(,)&`#'8242;changecom(`#') |
| 245 |
</tr> |
| 246 |
<tr> |
| 247 |
<td width="10%"> m4tt svg_backsl</g> <td align="left"> changecom(,)&`#'92;changecom(`#') |
| 248 |
<td width="10%"> m4tt svg_pound</g> <td align="left"> changecom(,)&`#'35;changecom(`#') |
| 249 |
<td width="10%"> m4tt svg_comma</g> <td align="left"> changecom(,)&`#'44;changecom(`#') |
| 250 |
<td width="10%"> m4tt svg_lparen</g> <td align="left"> changecom(,)&`#'40;changecom(`#') |
| 251 |
<td width="10%"> m4tt svg_rparen</g> <td align="left"> changecom(,)&`#'41;changecom(`#') |
| 252 |
<td width="10%"> m4tt svg_circ</g> <td align="left"> changecom(,)&`#'710;changecom(`#') |
| 253 |
<td width="10%"> m4tt svg_deg</g> <td align="left"> changecom(,)&`#'176;changecom(`#') |
| 254 |
<td width="10%"> m4tt svg_grave</g> <td align="left"> changecom(,)&`#'96;changecom(`#') |
| 255 |
</tr> |
| 256 |
</table> |
| 257 |
<table cellpadding="2" cellspacing="0" width="75%" > |
| 258 |
<tr> |
| 259 |
<td width="10%"> m4tt svg_amp</g> <td width="25px"> changecom(,)&`#'38;changecom(`#') |
| 260 |
<td width="8%"> m4tt svg_emsp</g> <td width="50px" align="left"> |changecom(,)&`#'8195;changecom(`#')| |
| 261 |
<td width="8%"> m4tt svg_ensp</g> <td width="50px" align="left"> |changecom(,)&`#'8194;changecom(`#')| |
| 262 |
<td width="8%"> m4tt svg_thinsp</g> <td width="50px" align="left"> |changecom(,)&`#'8201;changecom(`#')| |
| 263 |
</tr> |
| 264 |
</table> |
| 265 |
|
| 266 |
</ul> |
| 267 |
<li> Inkscape: It may be efficient to define elements by macro and to |
| 268 |
place them using a wysiwyg graphics editor. A draft page intended |
| 269 |
for Inkscape is included. A reasonable variety of elements is defined |
| 270 |
but many more could be added and they should be customized for |
| 271 |
particular applications. Adjustments may also have to be made to |
| 272 |
obtain the proper snap-to actions. |
| 273 |
<!-- |
| 274 |
<li> Link experiments: Click on the resistor or source of quickDPV |
| 275 |
to go to external |
| 276 |
files in new windows. Click on "n-port" in NportDPV to replace the diagram |
| 277 |
and then "back" to return. |
| 278 |
--> |
| 279 |
<li> Some of the assumptions used to create this draft may be |
| 280 |
na&`#'239;ve. |
| 281 |
Comments are welcome. |
| 282 |
</ul> |
| 283 |
|
| 284 |
<!-- |
| 285 |
<embed pluginspage="http://www.adobe.com/svg/viewer/install/" /> |
| 286 |
--> |
| 287 |
|
| 288 |
<hr> |
| 289 |
|
| 290 |
<!-- Comparison removed because many installations |
| 291 |
do not have dvipdfm or pdf2svg --> |
| 292 |
ifelse(0,1,` |
| 293 |
<table> |
| 294 |
<tr> |
| 295 |
<td width="50%"> |
| 296 |
<p> |
| 297 |
<IMG SRC="quickDPV.svg"> |
| 298 |
<br><br> |
| 299 |
Fig. m4inx (<a href="quickDPV.txt" TYPE="text/plain" TARGET="_blank" |
| 300 |
alt="quickDPV">quickDPV.m4</a>): |
| 301 |
SVG produced by dpic changecom(,)&`#'8194;changecom(`#') |
| 302 |
</p> |
| 303 |
</td> |
| 304 |
<td> |
| 305 |
<p> |
| 306 |
<IMG SRC="quick.svg"> |
| 307 |
<br><br> |
| 308 |
(<a href="quick.txt" TYPE="text/plain" TARGET="_blank" |
| 309 |
alt="quick">quick.m4</a>): |
| 310 |
SVG produced from quick.pdf by dvisvgm or pdf2svg |
| 311 |
changecom(,)&`#'8194;changecom(`#') |
| 312 |
</p> |
| 313 |
</td> |
| 314 |
</table> |
| 315 |
',`cfig(quickDPV, |
| 316 |
The quick.m4 example from the manual) |
| 317 |
') |
| 318 |
|
| 319 |
<!-- |
| 320 |
<hr> |
| 321 |
--> |
| 322 |
|
| 323 |
cfig(ResistorsDPV, |
| 324 |
Resistors`,' showing some variations and the ebox) |
| 325 |
|
| 326 |
cfig(CapacitorsDPV, |
| 327 |
Capacitors) |
| 328 |
|
| 329 |
cfig(InductorsDPV, |
| 330 |
Inductors) |
| 331 |
|
| 332 |
cfig(DiodesDPV, |
| 333 |
Diodes: appending a m4tt`'K</g> to the second argument draws an open |
| 334 |
arrowhead) |
| 335 |
|
| 336 |
cfig(EmarrowsDPV, |
| 337 |
Radiation arrows) |
| 338 |
|
| 339 |
cfig(VariableDPV, |
| 340 |
Arrows and marks for showing variability) |
| 341 |
|
| 342 |
cfig(SourcesDPV, |
| 343 |
Sources and source-like elements) |
| 344 |
|
| 345 |
cfig(AmpTableDPV, |
| 346 |
Macros m4tt`'amp`,' delay</g>`,' and m4tt`'integrator</g>) |
| 347 |
|
| 348 |
cfig(FusesDPV, |
| 349 |
Macros m4tt`'fuse</g>`,' m4tt`'cbreaker</g>`,' and m4tt`'breaker</g>) |
| 350 |
|
| 351 |
cfig(ArrestersDPV, |
| 352 |
The m4tt`'arrester</g> macro) |
| 353 |
|
| 354 |
cfig(MoreTableDPV, |
| 355 |
Additional two-terminal elements) |
| 356 |
|
| 357 |
cfig(GroundsDPV, |
| 358 |
Ground symbols) |
| 359 |
|
| 360 |
cfig(SwitchesDPV, |
| 361 |
The switch macros; m4tt`'switch(`,'`,'`,'L|B|D,attribs)</g> |
| 362 |
is a wrapper for m4tt`'lswitch</g>`,' m4tt`'bswitch</g>`,' |
| 363 |
and m4tt`'dswitch</g>) |
| 364 |
|
| 365 |
cfig(AntennasDPV, |
| 366 |
Antenna symbols and the microstrip radial stub) |
| 367 |
|
| 368 |
cfig(OpampDPV, |
| 369 |
The opamp) |
| 370 |
|
| 371 |
cfig(AudioDPV, |
| 372 |
Audio elements) |
| 373 |
|
| 374 |
cfig(XformDPV, |
| 375 |
Some variations of the transformer element`,' drawing direction down) |
| 376 |
|
| 377 |
cfig(NPDTDPV, |
| 378 |
Double throw with the m4tt`'NPDT</g> macro) |
| 379 |
|
| 380 |
cfig(ContactDPV, |
| 381 |
A non-exhaustive sampling of m4tt`'contact</g> macro variations) |
| 382 |
|
| 383 |
cfig(ContactsDPV, |
| 384 |
The m4tt`'contacts</g> macro) |
| 385 |
|
| 386 |
cfig(relaycoilDPV, |
| 387 |
The m4tt`'relaycoil</g> macro) |
| 388 |
|
| 389 |
cfig(RelayDPV, |
| 390 |
Some variants of m4tt`'relay</g>) |
| 391 |
|
| 392 |
cfig(JackDPV, |
| 393 |
The m4tt`'jack</g> and m4tt`'plug</g> macros) |
| 394 |
|
| 395 |
cfig(TstripDPV, |
| 396 |
The m4tt`'tstrip`,' ccoax`,'</g> and m4tt`'tbox</g> macros) |
| 397 |
|
| 398 |
cfig(ConnDPV, |
| 399 |
The tconn</g> and m4tt`'Pconn</g> macros) |
| 400 |
|
| 401 |
cfig(PconnDPV, |
| 402 |
The m4tt`'pconnex</g> macro) |
| 403 |
|
| 404 |
cfig(cbresistorDPV, |
| 405 |
Color-coded through-hole resistors) |
| 406 |
|
| 407 |
cfig(EVplugsDPV, |
| 408 |
Electric vehicle charging plug patterns make extensive |
| 409 |
use of key=value pairs to set options) |
| 410 |
|
| 411 |
cfig(HeadersDPV, |
| 412 |
The m4tt`'Header</g> macro) |
| 413 |
|
| 414 |
cfig(SocketsDPV, |
| 415 |
Some connectors with simple geometry and lists of labels) |
| 416 |
|
| 417 |
cfig(ChipsDPV, |
| 418 |
IC outlines) |
| 419 |
|
| 420 |
cfig(fetDPV, |
| 421 |
FETs`,' showing programmable components and example customizations) |
| 422 |
|
| 423 |
cfig(ujtDPV, |
| 424 |
UJT examples) |
| 425 |
|
| 426 |
cfig(ThyristorDPV, |
| 427 |
Thyristor examples. The thyristor is a 3- or 4-terminal |
| 428 |
composite element) |
| 429 |
|
| 430 |
cfig(BipDPV, |
| 431 |
Bipolar transistors (drawing direction: up)) |
| 432 |
|
| 433 |
cfig(TgateDPV, |
| 434 |
The m4tt`'tgate</g> and m4tt`'ptrans</g> elements) |
| 435 |
|
| 436 |
cfig(NportDPV, |
| 437 |
The m4tt`'nport</g> and m4tt`'nterm</g> macros) |
| 438 |
|
| 439 |
cfig(NLGDPV, |
| 440 |
Some customizations of m4tt`'nport</g>) |
| 441 |
|
| 442 |
cfig(WindingsDPV, |
| 443 |
The macros |
| 444 |
m4tt`'winding(L|R`,'diam`,'pitch`,'turns`,'core wid`,'"core color")</g> |
| 445 |
and |
| 446 |
m4tt`'arcwinding(diam`,'pitch`,'turns`,'core centre rad`,'core wid`,'"core color")</g>) |
| 447 |
|
| 448 |
cfig(Spec555DPV, |
| 449 |
A 555 timer example) |
| 450 |
|
| 451 |
cfig(ex01DPV, |
| 452 |
Two simple labeled circuits) |
| 453 |
|
| 454 |
cfig(ex02DPV, |
| 455 |
Elements at obtuse angles) |
| 456 |
|
| 457 |
cfig(OptoisoDPV, |
| 458 |
Optical isolator: a circuit with right or left orientation) |
| 459 |
|
| 460 |
cfig(MixerDPV, |
| 461 |
A balanced mixer`,' using m4tt`'mosfet</g> and a custom transformer) |
| 462 |
|
| 463 |
cfig(PushPullDPV, |
| 464 |
A push-pull mixer`,' showing FETs with multiple gates) |
| 465 |
|
| 466 |
cfig(QuantumDPV, |
| 467 |
Quantum circuits) |
| 468 |
|
| 469 |
cfig(SixpoleDPV, |
| 470 |
A six-pole filter) |
| 471 |
|
| 472 |
cfig(ex18DPV, |
| 473 |
Precision half-wave rectifier and a tunnel diode circuit |
| 474 |
(illustrating m4tt`'opamp`,' diode`,' resistor`,' ground`,'</g> |
| 475 |
and labels)) |
| 476 |
|
| 477 |
cfig(ex10DPV, |
| 478 |
Non-planar graph and bistable circuit |
| 479 |
(illustrating the m4tt`'crossover</g> macro and colored elements)) |
| 480 |
|
| 481 |
cfig(ThreeDPV, |
| 482 |
Three-phase oscillator) |
| 483 |
|
| 484 |
cfig(MCDPV, |
| 485 |
A three-phase switched AC-AC converter and a DC-DC converter) |
| 486 |
|
| 487 |
cfig(ex12DPV, |
| 488 |
A CMOS NAND gate`,' a test circuit`,' and an XMOSFET example) |
| 489 |
|
| 490 |
cfig(pwrsupplyDPV, |
| 491 |
An unregulated power supply) |
| 492 |
|
| 493 |
cfig(Reg723DPV, |
| 494 |
A 723 regulator circuit) |
| 495 |
|
| 496 |
cfig(TTLnandDPV, |
| 497 |
TTL NAND gate illustrating a transistor with multiple emitters) |
| 498 |
|
| 499 |
cfig(I2LDPV, |
| 500 |
Gate circuit and equivalent embedded components |
| 501 |
illustrating multiple collectors) |
| 502 |
|
| 503 |
cfig(SchottkyDPV, |
| 504 |
A 4-input NAND circuit illustrating the m4tt`'S</g> (Schottky) |
| 505 |
option of m4tt`'bi_trans</g>) |
| 506 |
|
| 507 |
cfig(ex11DPV, |
| 508 |
Transistor radio audio chain) |
| 509 |
|
| 510 |
cfig(ex04DPV, |
| 511 |
Labels on non-manhattan elements) |
| 512 |
|
| 513 |
cfig(CsourceDPV, |
| 514 |
Realization of a controlled source |
| 515 |
(illustrating stacked element labels)) |
| 516 |
|
| 517 |
cfig(AudioAmpDPV, |
| 518 |
A 50 W audio amplifier) |
| 519 |
|
| 520 |
cfig(DriveDPV, |
| 521 |
Synchronous machine driven by variable-speed drive and rectifier) |
| 522 |
|
| 523 |
cfig(ex16DPV, |
| 524 |
A rate 1/2 binary convolutional coder and its state diagram) |
| 525 |
|
| 526 |
cfig(ex03DPV, |
| 527 |
Digital filter) |
| 528 |
|
| 529 |
cfig(LadderDPV, |
| 530 |
Ladder-logic elements) |
| 531 |
|
| 532 |
cfig(MotorControlDPV, |
| 533 |
Motor control connections) |
| 534 |
|
| 535 |
cfig(RectifiersDPV, |
| 536 |
Rectifier circuits and waveforms) |
| 537 |
|
| 538 |
cfig(HeathkitDPV, |
| 539 |
The power supply of a Heathkit AR-15 (Now`,' <i>that</i> |
| 540 |
was a receiver!) with custom transformer and other elements`,' |
| 541 |
drawn on a grid (partially shown) to aid in placement) |
| 542 |
|
| 543 |
cfig(lcctDPV, |
| 544 |
A digital circuit of moderate size`,' |
| 545 |
redrawn from M. P. Maclenan and G. M. Burns`,' |
| 546 |
"An Approach to Drawing Circuit Diagrams for Text Books`,'" |
| 547 |
Tugboat (12)1`,' March 1991`,' pp. 66-69) |
| 548 |
|
| 549 |
cfig(TubediagsDPV, |
| 550 |
Electron-tube diagrams: a few bottom-view base diagrams`,' |
| 551 |
a generic triode test circuit`,' and a 25-watt audio amplifier adapted |
| 552 |
from F. Langford-Smith`,' <i>Radiotron Designers Handbook</i>`,' fourth |
| 553 |
edition`,' Harrison`,' NJ: Radio Corporation of America`,' 1952) |
| 554 |
|
| 555 |
cfig(LT3757DPV, |
| 556 |
LT3757 controller) |
| 557 |
|
| 558 |
cfig(UNODPV, |
| 559 |
An Arduino UNO circuit adapted and redrawn) |
| 560 |
|
| 561 |
cfig(ColdControlDPV, |
| 562 |
Cold room control with custom sensors) |
| 563 |
|
| 564 |
cfig(sfgDPV, |
| 565 |
Signal-flow graphs) |
| 566 |
|
| 567 |
cfig(LogicDPV, |
| 568 |
Basic logic gates) |
| 569 |
|
| 570 |
cfig(ex08DPV, |
| 571 |
General-purpose latch: a small logic circuit) |
| 572 |
|
| 573 |
cfig(DecoderDPV, |
| 574 |
Decoder logic`,' constructed using the m4tt`'for_</g> macro) |
| 575 |
|
| 576 |
cfig(ex21DPV, |
| 577 |
Some flip-flops) |
| 578 |
|
| 579 |
cfig(MultiplexerDPV, |
| 580 |
Multiplexer) |
| 581 |
|
| 582 |
cfig(DemultiplexerDPV, |
| 583 |
Demultiplexer) |
| 584 |
|
| 585 |
cfig(ShiftRDPV, |
| 586 |
A 5-bit shift register drawn using a custom flip-flop) |
| 587 |
|
| 588 |
cfig(AdderDPV, |
| 589 |
A full adder and a cascade of n-bit adders) |
| 590 |
|
| 591 |
cfig(CanLogicDPV, |
| 592 |
A way of automatically drawing two-layer logic diagrams) |
| 593 |
|
| 594 |
cfig(AlogixDPV, |
| 595 |
The m4tt`'Autologix(`'<i>Boolean expression</i>; |
| 596 |
<i>Boolean expression</i>... `,' <i>options</i>)</g> |
| 597 |
macro automatically draws Boolean expressions in function notation. |
| 598 |
The function tree is drawn`,' then a row or column of inputs`,' then |
| 599 |
the connections. The default result is on the left`,' |
| 600 |
a custom element at the top`,' and a tree of gates only is shown |
| 601 |
on the right.) |
| 602 |
|
| 603 |
cfig(ABlogixDPV, |
| 604 |
The m4tt`'Autologix</g> macro can draw inputs on the left but |
| 605 |
the added drawing complexity may require hand tuning with |
| 606 |
second-argument options: m4tt`'L</g> puts the inputs on the left`,' |
| 607 |
m4tt`'R</g> reverses their order`,' m4tt`'V</g> scans the input arguments |
| 608 |
in reverse order`,' and m4tt`'offset=</g>`'<i>value</i> displaces |
| 609 |
the array of inputs) |
| 610 |
|
| 611 |
cfig(XORDPV, |
| 612 |
Realizations of the XOR function using m4tt`'Autologix</g>) |
| 613 |
|
| 614 |
cfig(EEPDPV, |
| 615 |
Part of a single-line diagram of a power distribution system |
| 616 |
using draft elements) |
| 617 |
|
| 618 |
cfig(ex05DPV, |
| 619 |
Use of m4tt`'darrow</g> and m4tt`'Darc</g>) |
| 620 |
|
| 621 |
cfig(GrayCodeDPV, |
| 622 |
Gray code 10-bit encoder disk pattern`,' |
| 623 |
and a crossbar switch) |
| 624 |
|
| 625 |
cfig(controlDPV, |
| 626 |
Control-system block diagrams) |
| 627 |
|
| 628 |
cfig(SevensegmentDPV, |
| 629 |
A customizable seven-segment display showing the numbered segments with |
| 630 |
a custom shape and the numerals from 0 to 9) |
| 631 |
|
| 632 |
cfig(ByteDPV, |
| 633 |
Elementary splines) |
| 634 |
|
| 635 |
cfig(RotboxDPV, |
| 636 |
The macro |
| 637 |
m4tt`'rotbox(<i>wid,ht,type,</i>[r|t=<i>val</i>])</g> |
| 638 |
draws a box in the current direction) |
| 639 |
|
| 640 |
cfig(ex06DPV, |
| 641 |
Crosshatching) |
| 642 |
|
| 643 |
cfig(GeometryDPV, |
| 644 |
Plane geometry examples) |
| 645 |
|
| 646 |
cfig(LoglogDPV, |
| 647 |
Graphs drawn using the pic language) |
| 648 |
|
| 649 |
cfig(SmithchartDPV, |
| 650 |
A Smith chart) |
| 651 |
|
| 652 |
cfig(ex09DPV, |
| 653 |
Illustrating the macro |
| 654 |
m4tt`'dimension_(<i>linespec`,' offset`,' label`,' </i> |
| 655 |
H|W|D|<i>blank width</i>`,' <i>tic offset</i>`,' <-|->)</g>. |
| 656 |
A negative second argument implies an offset to the right of the |
| 657 |
<i>linespec</i> direction. A <i>label</i> starting with |
| 658 |
m4tt`'"</g> or |
| 659 |
m4tt`'sprintf</g> is copied literally. If <i>label</i> is an |
| 660 |
m4tt`'s_box(...)</g> then setting argument 4 to m4tt`'H</g>`,' |
| 661 |
m4tt`'W</g>`,' |
| 662 |
or m4tt`'D</g> tailors the blank width to the m4tt`'s_box</g> height`,' |
| 663 |
width`,' or diagonal respectively; i.e.`,' m4tt`'W</g> is equivalent to |
| 664 |
m4tt`'s_wd+textoffset*2</g>. |
| 665 |
The macro m4tt`'arcdimension_</g> is similar but the first argument |
| 666 |
specifies the arc to be dimensioned and the second argument is |
| 667 |
the outward radial offset of the dimension arrow arc.) |
| 668 |
|
| 669 |
cfig(PlateDPV, |
| 670 |
Dimensioning with tolerances according to ASME Y14.5) |
| 671 |
Use of m4tt`'darrow</g> and m4tt`'Darc</g>) |
| 672 |
|
| 673 |
cfig(randomDPV, |
| 674 |
Testing random number generation |
| 675 |
using dpic macro |
| 676 |
m4tt`'randn(</g><g |
| 677 |
style="font-family:italic">array name`,' mean`,' std dev</g>m4tt`')</g> |
| 678 |
which calls dpic built-in m4tt`'rand()</g>) |
| 679 |
|
| 680 |
cfig(expDPV, |
| 681 |
Test of m4tt`'project</g> and other m4tt`'lib3D</g> |
| 682 |
macros`,' showing the projection of a solid onto |
| 683 |
the <i>y1`,'z1</i> plane by sighting along the x1 axis.) |
| 684 |
|
| 685 |
cfig(graysurfDPV, |
| 686 |
Plotting surfaces using gray scales) |
| 687 |
|
| 688 |
cfig(shapesDPV, |
| 689 |
Basic shapes) |
| 690 |
|
| 691 |
cfig(cscDPV, |
| 692 |
Conestoga Sailing Club (illustrating the filling of arbitrary shapes)`,' |
| 693 |
and an antique clock face with shading and rotated text) |
| 694 |
|
| 695 |
cfig(roseDPV, |
| 696 |
A window redrawn from a detail of the set design for the musical |
| 697 |
<i>Dracula</i>`,' used for testing m4tt`'dpic</g>`,' |
| 698 |
and an experimental halftone. This diagram |
| 699 |
consumes much LaTeX main memory but can be produced |
| 700 |
directly as pdf using m4tt`'dpic -d</g>`,' |
| 701 |
as svg using m4tt`'dpic -v</g>`,' |
| 702 |
or as postscript using m4tt`'dpic -r</g> |
| 703 |
since no text formatting is required) |
| 704 |
|
| 705 |
cfig(diamondDPV, |
| 706 |
Variations on M. Goossens`,' S. Rahtz`,' and F. Mittelbach`,' |
| 707 |
<i>The LaTeX Graphics Companion</i>`,' Addison-Wesley 1997`,' pp. 57-58) |
| 708 |
|
| 709 |
cfig(wormDPV, |
| 710 |
An exercise in calculating RGB colours) |
| 711 |
|
| 712 |
cfig(ButtonsDPV, |
| 713 |
Shading in color) |
| 714 |
|
| 715 |
cfig(keyboardDPV, |
| 716 |
More objects drawn in relief) |
| 717 |
|
| 718 |
cfig(DiniDPV, |
| 719 |
Dini surface`,' an icosahedron`,' and a sphere with inscribed cylinder) |
| 720 |
|
| 721 |
cfig(SierpinskiDPV, |
| 722 |
The Sierpinski triangle and a Cayley graph: |
| 723 |
tests of pic macro recursion) |
| 724 |
|
| 725 |
cfig(EscherDPV, |
| 726 |
Penrose stairs and an Escher-like object) |
| 727 |
|
| 728 |
cfig(MapleLeafDPV, |
| 729 |
A parametric curve) |
| 730 |
|
| 731 |
cfig(recycleDPV, |
| 732 |
Modest repetition and partial fill) |
| 733 |
|
| 734 |
cfig(ex15DPV, |
| 735 |
Simple diagrams that are easily drawn by looping) |
| 736 |
|
| 737 |
<!-- |
| 738 |
#fig(CountingDPV, |
| 739 |
# An example of enumeration) |
| 740 |
--> |
| 741 |
|
| 742 |
cfig(CrowDPV, |
| 743 |
Illustrating m4tt`'shadebox</g> and a custom crowfoot line |
| 744 |
termination) |
| 745 |
|
| 746 |
cfig(FlowDPV, |
| 747 |
A flowchart sampler) |
| 748 |
<!-- <p> |
| 749 |
More flow-chart examples? Try |
| 750 |
<a href="https://buraphakit.sourceforge.io/EFI/EFI_2019_S2_W13.shtml" |
| 751 |
TARGET="_blank">here.</a> |
| 752 |
</p> --> |
| 753 |
|
| 754 |
cfig(BtreeDPV, |
| 755 |
Trees) |
| 756 |
|
| 757 |
cfig(InclepsDPV, |
| 758 |
Overlaying a figure with line graphics,,OBJECT) |
| 759 |
|
| 760 |
cfig(paletteDPV, |
| 761 |
A draft palette of a few elements for Inkscape using |
| 762 |
a 1 mm grid) |
| 763 |
|
| 764 |
cfig(FontsDPV) |
| 765 |
|
| 766 |
</td> |
| 767 |
</tr> |
| 768 |
</table> |
| 769 |
</BODY> |
| 770 |
</HTML> |