summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-09-13 20:35:42 +0000
committerKarl Berry <karl@freefriends.org>2023-09-13 20:35:42 +0000
commite261648faff137468efda86027da0838f3a8efe9 (patch)
treeb1a33d20c21ba3fb1f5810757c69112517962b75
parentea73677774e333cbf72d7db857d88f1c03b81d4b (diff)
circuit_macros (13sep23)
git-svn-id: svn://tug.org/texlive/trunk@68264 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/CHANGES1
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/Copying2
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/README2
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/darrow.m4394
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdfbin1055738 -> 1059727 bytes
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/doc/SourcesMan.m41
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/doc/Version.tex2
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/doc/body.tex3
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex792
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic2
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Alogix.m418
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Smithchart.m428
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Sources.m44
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/SourcesDPV.m46
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/ex05.m47
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdfbin1902473 -> 1902836 bytes
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Koch.m45
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Makefile4
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/extras/README_extras14
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/extras/TR_fill.m441
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Views.m44
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf2
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/gpic.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/lib3D.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/libSLD.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/libcct.m413
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/libgen.m491
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/liblog.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/mfpic.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/mpost.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/pdf.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/pgf.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/postscript.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/psfrag.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/pstricks.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/svg.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/xfig.m42
37 files changed, 860 insertions, 602 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/CHANGES b/Master/texmf-dist/doc/latex/circuit-macros/CHANGES
index 466b2d8e44f..647e124d6bb 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/CHANGES
+++ b/Master/texmf-dist/doc/latex/circuit-macros/CHANGES
@@ -1,5 +1,6 @@
CHANGES
+Version 10.4: New options for source, sarrow, darrow routines.
Version 10.3: Tweaked sfg_init and NeedDpicTools functionality;
macro lin_ang, langle, ACsymbol, DCsymbol, Ysymbol, Deltasymbol,
Autologix. New macro polygon.
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/Copying b/Master/texmf-dist/doc/latex/circuit-macros/Copying
index 6ab5c358956..7368181b7f4 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/Copying
+++ b/Master/texmf-dist/doc/latex/circuit-macros/Copying
@@ -1,4 +1,4 @@
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/README b/Master/texmf-dist/doc/latex/circuit-macros/README
index 43c6a847b31..2598327896e 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/README
+++ b/Master/texmf-dist/doc/latex/circuit-macros/README
@@ -1,5 +1,5 @@
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4 b/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4
index 4b29a48560d..c563a189dc2 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4
@@ -1,40 +1,42 @@
divert(-1)
darrow.m4 Macros for double lines and arrows
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
* marked to distinguish them from this distribution. There is no warranty *
* whatsoever for these files. *
+` Some of these macros have uncomfortably many arguments for specifying
+ options, so wrappers beginning with upper-case letters (Dline,
+ Darrow, Darc) are provided and implement key=val;key=val... option
+ specifications. Sometimes however, cleaner code results from using
+ the original macros. Could these be written in a more straightforward
+ fashion? Probably, but the current versions have evolved from macros
+ written very early on and backward compatibility has been kept, with
+ only a few exceptions.
-`Notes: these macros have been reworked (Jan 2013) so that dlthick is the
- total outside width, consistent with solid lines and arrows, and to add
- the !- and -! half-linethick line caps to simplify butting to boxes.
-
- Some of these macros have uncomfortably many arguments for specifying
- options, so wrappers beginning with upper-case letters (Dline, Darrow, Darc)
- are provided and implement key=val;key=val... option specifications.
+ The drawn elements are
+ darc darrow dend dleft dline dright dtee dturn
+ and there are wrappers
+ Darc Darrow Dline
'
-
-=============================================================================
define(`darrow_')
ifdef(`libgen_',,`include(libgen.m4)divert(-1)')
+=============================================================================
+# Style defaults:
Default width (thickness) of double lines
define(`dlthick',`(0.08*scale+lthick)')
-#efine(`dlinewid',`dlthick') Obsolete, keep for a while for compatibility.
`ELement fill color (default white)
- e.g. define(`dfillcolor',`1,0.84,0')
- Obsolete:
- command "\definecolor{gold}{rgb}{1,0.84,0}"
- define(`dfillcolor',gold)'
-define(`dfillcolor',`1,1,1')
+ e.g. define(`dfillcolor',`1,0.84,0')'
+define(`dfillcolor',`1,1,1') `=white'
define(`dfillgrey',1) `fill shade for gpic'
define(`darcrad',`dlthick*2') `default darc radius'
+define(`dfillext',0.25bp__) `extended length of dtee, dleft, dright fill'
`Default length:'
ifdef(`elen_',,`define(`elen_',linewid*3/2)')
@@ -53,103 +55,119 @@ define(`dbelow',`below ifelse(`$1',,`at Here',`$1')-(0,dlthick/2)')
define(`dljust',`ljust ifelse(`$1',,`at Here',`$1')+(dlthick/2,0)')
define(`drjust',`rjust ifelse(`$1',,`at Here',`$1')-(dlthick/2,0)')
- `dline(linespec,start truncation,end truncation,dlthick, ends )
+ `dline(linespec,start truncation,end truncation,dlthick, ends,
+ outline attributes, inner attributes )
ends= blank, x-x, -x, x-, where x means ! or |'
define(`dline',`deleminit_(`$1',,`$4')
- M4DL: line from last line.start to last line.end \
+ M4DL: line invis from last line.start to last line.end \
chop ifelse(`$2',,0,m4dlthk/2) chop ifelse(`$3',,0,m4dlthk/2)
- ifelse(rgbstring(1,1,1),"",,
- `{line thick m4dlthk/(1bp__) from M4DL.start to M4DL.end }
- {line thick m4dlthk/(1bp__)-2*linethick outlined rgbstring(dfillcolor) \
- from M4DL.start \
- ifinstr(`$5',|-,`+vec_(lthick,0)',`$5',!-,`+vec_(lthick/2,0)') \
+ {line thick m4dlthk/(1bp__) `$6' from M4DL.start to M4DL.end }
+ ifelse(rgbstring(dfillcolor),"",,
+ `{line thick m4dlthk/(1bp__)-2*linethick \
+ ifelse(`$7',,`outlined rgbstring(dfillcolor)',`$7') \
+ from M4DL.start \
+ ifinstr(`$5',|-,`+vec_(lthick,0)',`$5',!-,`+vec_(lthick/2,0)') \
to M4DL.end \
- ifinstr(`$5',-|,`-vec_(lthick,0)',`$5',-!,`-vec_(lthick/2,0)') }')
+ ifinstr(`$5',-|,`-vec_(lthick,0)',`$5',-!,`-vec_(lthick/2,0)') }')
ifgpic(`M4dV: vec_(0,m4dlthk/2-lthick/2); shade(dfillgrey,
{line from M4DL.start+(M4dV.x,M4dV.y) to M4DL.end+(M4dV.x,M4dV.y)}
{line from M4DL.start-(M4dV.x,M4dV.y) to M4DL.end-(M4dV.x,M4dV.y)})')
line invis from M4DL.start to M4DL.end')
- `Dline(linespec,params)
- params is a semicolon-separated list of items:
- S truncate at start by dline thickness/2
- E truncate at end by dline thickness/2
- thick=val (total thicknes, ie width)
- ends= x-x or -x or x- where x is ! or |
- |- closed end with full-width line
- !- closed end with half-width line
- eg Dline(from A to B,E;ends=|-)'
-define(`Dline',
- `pushkey_(`$2',thick,dlthick)
- pushkey_(`$2',ends)pushdef(`m4ends',substr(m4ends,1,eval(len(m4ends)-2)))
- dline(`$1',ifinstr(`$2',S,t),ifinstr(`$2',E,t),m4thick,m4ends)
- popdef(`m4ends')popdef(`m4ends')popdef(`m4thick')
- ')
-
- `dleft(at position,dlthick) Turn left,
- leaving current location at exit of corner'
+ `dleft(at position,dlthick,attribs)
+ Turn left, leaving current location
+ at exit of corner.
+ attribs=
+ innershade=(r,g,b)|"color";
+ outline=(r,g,b)|"color";'
define(`dleft',`deleminit_(,ifelse(`$2',,dlthick,`$2'),`$2')
+ pushkeys_(`$3',innershade::N;outline::N;) dnl
ifelse(`$1',,,`move to substr(`$1',eval(index(`$1',t)+1))-vec_(m4dlthk/2,0)')
{ line thick m4dlthk/(1bp__) to rvec_(m4dlthk,0) }
- ifelse(rgbstring(1,1,1),"",,
- `line thick m4dlthk/(1bp__)-2*linethick outlined rgbstring(dfillcolor) \
- to rvec_(m4dlthk/2,0) then to rvec_(m4dlthk/2,m4dlthk/2)')
+ ifelse(rgbstring(dfillcolor),"",,
+ `{line thick m4dlthk/(1bp__)-2*linethick \
+ m4osh(m4innershade,outlined,`dfillcolor') \
+ to rvec_(m4dlthk/2,0) then to rvec_(m4dlthk/2,m4dlthk/2+dfillext)}
+ move to rvec_(m4dlthk/2,0) then to rvec_(m4dlthk/2,m4dlthk/2) ')
ifgpic(`{line from rvec_(0,m4dlthk/2-lthick/2) to rvec_(0,m4dlthk/2-lthick/2)}
{line from rvec_(m4dlthk-lthick/2,m4dlthk/2) \
to rvec_(m4dlthk-lthick/2,-m4dlthk/2+lthick/2) then \
to rvec_(0,-m4dlthk/2+lthick/2)}
- move to rvec_(m4dlthk/2,m4dlthk/2)')
+ move to rvec_(m4dlthk/2,m4dlthk/2)') popdef(`m4innershade',`m4outline')
rp_ang = rp_ang+pi__/2')
- `dright(at position,dlthick) Turn right,
- leaving current location at exit of corner'
+ `dright(at position,dlthick,attribs)
+ Turn right, leaving current location
+ at exit of corner.
+ attribs=
+ innershade=(r,g,b)|"color";
+ outline=(r,g,b)|"color";'
define(`dright',`deleminit_(,ifelse(`$2',,dlthick,`$2'),`$2')
+ pushkeys_(`$3',innershade::N;outline::N;) dnl
ifelse(`$1',,,`move to substr(`$1',eval(index(`$1',t)+1))-vec_(m4dlthk/2,0)')
{ line thick m4dlthk/(1bp__) to rvec_(m4dlthk,0) }
- ifelse(rgbstring(1,1,1),"",,
- `line thick m4dlthk/(1bp__)-2*linethick outlined rgbstring(dfillcolor) \
- to rvec_(m4dlthk/2,0) then to rvec_(m4dlthk/2,-m4dlthk/2)')
+ ifelse(rgbstring(dfillcolor),"",,
+ `{line thick m4dlthk/(1bp__)-2*linethick \
+ m4osh(m4innershade,outlined,`dfillcolor') \
+ to rvec_(m4dlthk/2,0) then to rvec_(m4dlthk/2,-m4dlthk/2-dfillext)}
+ move to rvec_(m4dlthk/2,0) then to rvec_(m4dlthk/2,-m4dlthk/2) ')
ifgpic(`{line from rvec_(0,-m4dlthk/2+lthick/2) \
to rvec_(0,-m4dlthk/2+lthick/2)}
{line from rvec_(m4dlthk-lthick/2,-m4dlthk/2) \
to rvec_(m4dlthk-lthick/2,m4dlthk/2-lthick/2) then \
to rvec_(0,m4dlthk/2-lthick/2)}
- move to rvec_(m4dlthk/2,-m4dlthk/2)')
+ move to rvec_(m4dlthk/2,-m4dlthk/2)') popdef(`m4innershade',`m4outline')
rp_ang = rp_ang-pi__/2')
- `dturn(arg,dlthick)
- Turn arg relative degrees ccw'
+
+ define(`m4osh',`ifelse(`$1',,`ifelse(`$3',,,``$2' rgbstring($3)')',
+ index(`$1',`"'),0,``$2' `$1'' ,
+ ``$2' rgbstring(m4ctrunc(`$1'))')')dnl
+
+ `dturn(arg,dlthick,attribs)
+ Turn arg relative degrees ccw
+ attribs=
+ innershade=(r,g,b)|"color";
+ outline=(r,g,b)|"color";'
define(`dturn',`deleminit_(,ifelse(`$2',,dlthick,`$2'),`$2')
-[S: Here
+[S: Here pushkeys_(`$3',innershade::N;outline::N;)
deg = ifelse(`$1',,0,`$1')
c = cosd(deg); s = sind(deg); sgn = sign(deg); r = (dlthick-lthick)/2
+ G: S+vec_(lthick/2*abs(s),sgn*dlthick/2)
A: S+vec_(lthick/2*abs(s),sgn*r)
B: A+vec_(vscal_(lthick/2*abs(s),c,s))
+ H: G+vec_(vscal_(lthick/2*abs(s),c,s))
C: S+vec_(0, sgn*r)
+ J: S+vec_(0, sgn*dlthick/2)
if deg==0 then {t = 0} else { t = (1-c)/s } # t = tan(deg/2)
D: A+vec_(vscal_(r*2,sgn*t,-sgn))
E: B+vec_(vscal_(r*2,sgn*s,-sgn*c))
F: S+vec_(0,-sgn*r)
- T: 0.5 between A and D
X: 0.5 between B and E
- ifelse(rgbstring(1,1,1),"",,
- `line thick r*2/(1bp__) outlined rgbstring(dfillcolor) \
- from S to T then to X')
+ ifelse(rgbstring(dfillcolor),`""',,`line thick 0 \
+ m4osh(m4innershade,outlined,`dfillcolor') \
+ m4osh(m4innershade,shaded,`dfillcolor') \
+ from S to F then to D then to E then to H then to G then to J then to S')
ifgpic(`m4tmpth = linethick; linethick=0
shade(dfillgrey,`line from C to A then to B; line from E to D then to F')
linethick = m4tmpth')
- line from C to A then to B
- line from E to D then to F
-#{"A" at A;"B" at B;"C" at C;"D" at D;"E" at E; "F" at F;"T" at T;"X" at X}
- `$3'] with .S at Here
+ line thick lthick/(1bp__) m4osh(m4outline,outlined) from C to A then to B
+ line thick lthick/(1bp__) m4osh(m4outline,outlined) from E to D then to F
+# Loopover_(`Px',`"Px" at Px above;', A,B,C,D,E,F,S,X)
+# Loopover_(`Px',`"Px" at Px above;', G,H,J)
+ `$4' popdef(`m4innershade',`m4outline')] with .S at Here
move to last [].X
ifelse(`$1',,,`Point_(`$1'+rp_ang*rtod_)') ')
`darrow(linespec, start truncation, end truncation, dlthick,
- arrow wid, arrow ht, terminals)
+ arrowhd wid, arrowhd ht, terminals,color attribs)
terminals is blank or x-, ->, x->, <-, <-x, <-> where x is
! for closed end with half-width line or
| for closed end with full-width line'
+ `e.g.,
+ linethick=5; rgbdraw(1,0,0,darrow(down_ 2,,,0.5,0.75,0.75,|)'
+
define(`darrow',`deleminit_(`$1',,`$4')
+ arrow invis from last line.start to last line.end
ifelse(ifinstr(`$7',<->,,`$7',<-,T),T,
`define(`m4dx',`ifinstr(`$7',|,|,`$7',!,!)'->)dnl
M4DA: line invis from last line.end to last line.start \
@@ -170,7 +188,7 @@ define(`darrow',`deleminit_(`$1',,`$4')
W: vec_(lthick/2,0)
X: ifinstr(`$7',<->,C,m4dx,!,S,m4dx,|,S+(W.x,W.y),S)
ifgpic(`shade(dfillgrey,') line dnl
- ifelse(rgbstring(1,1,1),"",,`shaded rgbstring(dfillcolor)') from dnl
+ ifelse(rgbstring(dfillcolor),"",,`shaded rgbstring(dfillcolor)') `$8' from dnl
ifinstr(m4dx,|,`X to X+(V.x,V.y) then',`X+(V.x,V.y)') to \
E-(T.x,T.y)+(V.x,V.y) then to E-(T.x,T.y)+(Vt.x,Vt.y) \
then to E-(P.x,P.y) \
@@ -195,109 +213,187 @@ define(`darrow',`deleminit_(`$1',,`$4')
`arrow invis from M4DA.start to M4DA.end')
')
- `Darrow(linespec,params)
- params is a semicolon-separated list of items:
- S truncate at start by dline thickness/2
- E truncate at end by dline thickness/2
- thick=val (total thicknes, ie width)
- wid=val (arrowhead width)
- ht=val (arrowhead height)
- ends= -> or x-> or <- or <-x or <-> where x is | or !
- |- closed end with full-width line
- !- closed end with half-width line
- eg Darrow(from A to B,E;ends=<-|)'
-define(`Darrow',
- `pushkey_(`$2',thick,dlthick)
- pushkey_(`$2',wid,dlthick*3/2)
- pushkey_(`$2',ht,dlthick)
- pushkey_(`$2',ends)pushdef(`m4ends',substr(m4ends,1,eval(len(m4ends)-2)))
- darrow(`$1',ifinstr(`$2',S,t),ifinstr(`$2',E,t),m4thick,m4wid,m4ht,m4ends)dnl
- popdef(`m4ends')popdef(`m4ends')popdef(`m4ht',`m4wid',`m4thick')')
-
- `dtee([L|R],dlthick) Construct tee with tail right,
- left, or back along current direction, leaving
- current location at tee centre; eg
+ `dtee([L|R],dlthick|attribs)
+ Construct tee with tail to back (default), left,
+ or right of current direction, leaving current
+ location at tee centre; eg
dline(right_,,t); dtee(R);
- { darrow(down_,t) }; darrow(right_,t)'
-define(`dtee',`deleminit_(,ifelse(`$2',,dlthick,`$2'),`$2')
+ { darrow(down_,t) }; darrow(right_,t)
+ attribs:
+ thick=expr; (line thickness in drawing units)
+ innershade=(r,g,b)|"color";
+ outline=(r,g,b)|"color";'
+define(`dtee',`pushkeys_(`$2',thick:m4nil;innershade::N;outline::N;)dnl
+ deleminit_(,ifelse(m4thick,(m4nil),dlthick,m4thick))
move to last line.c
- ifelse(`$1',L,`rp_ang = rp_ang-pi_/2',`$1',R,`rp_ang = rp_ang+pi_/2')
- ifelse(rgbstring(1,1,1),"",,
- `{line thick dlthick/(1bp__) from rvec_(-m4dlthk/2,0) to rvec_(m4dlthk/2,0)}
- {line thick dlthick/(1bp__)-2*linethick outlined rgbstring(dfillcolor) \
- to rvec_(-m4dlthk/2,0) }
- {line thick dlthick/(1bp__)-2*linethick outlined rgbstring(dfillcolor) \
- from rvec_(0,-m4dlthk/2) to rvec_(0,m4dlthk/2) } ')
+ ifelse(`$1',L,`rp_ang = rp_ang-pi_/2', `$1',R,`rp_ang = rp_ang+pi_/2')
+ ifelse(m4innershade,,,`pushdef(`dfillcolor',`m4ctrunc(m4innershade)')') dnl
+ {line thick m4dlthk/(1bp__) dnl
+ ifelse(m4outline,,,index(m4outline,`"'),0,`outlined m4outline',
+ `outlined rgbstring(m4ctrunc(m4outline))') dnl
+ from rvec_(-m4dlthk/2,0) to rvec_(m4dlthk/2,0)}
+ pushdef(`m4dll',(m4dlthk/2+dfillext))dnl
+ pushdef(`m4df',`rgbstring(dfillcolor)')dnl
+ ifelse(m4df,"",,
+ `{line thick m4dlthk/(1bp__)-2*linethick outlined m4df to rvec_(-m4dll,0) }
+ {line thick m4dlthk/(1bp__)-2*linethick outlined m4df \
+ from rvec_(0,-m4dll) to rvec_(0,m4dll) } ')
ifgpic(`m4tmpth = linethick; linethick=0; shade(dfillgrey,
{line from rvec_(-m4dlthk/2, m4dlthk/2) to rvec_( m4dlthk/2, m4dlthk/2)}
{line from rvec_( m4dlthk/2,-m4dlthk/2) to rvec_(-m4dlthk/2,-m4dlthk/2)})
- linethick = m4tmpth') ')
+ linethick = m4tmpth')
+ ifelse(m4innershade,,,`popdef(`dfillcolor')')dnl
+ popdef(`m4thick',`m4innershade',`m4outline',`m4dll',`m4df')')
- Close off line end: `dend([at position])'
-define(`dend',`deleminit_(,lthick)
- ifelse(`$1',,,`move to substr(`$1',eval(index(`$1',at)+2))')
- {line from rvec_(0,-dlthick/2) to rvec_(0,dlthick/2)}
- move to rvec_(lthick/2,0) ')
+ `dend([at position],dlthick|attribs)
+ Close off line end
+ attribs:
+ thick=expr; (line thickness in drawing units)
+ outline=(r,g,b)|"color";'
+define(`dend',`pushkeys_(`$2',thick:m4nil;outline::N;)dnl
+ pushdef(`m4thk',`ifelse(m4thick,(m4nil),dlthick,m4thick)')dnl
+ ifelse(`$1',,,`move to patsubst(`$1',`^ *at *')')
+ {line ifelse(m4outline,,,`outlined m4outline') ifinstr(`$2',=,,`$2') dnl
+ from rvec_(0,-m4thk/2) to rvec_(0,m4thk/2) }
+ move to rvec_(last line.thick pt__/2,0)dnl
+ popdef(`m4thick',`m4outline',`m4thk')')
`darc(center pos, radius, start radians, end radians, dlthick,
- arrow wid, arrow ht, symbols ) draw CCW arc
+ arrow wid, arrow ht, symbols,
+ outline attributes, inner attributes )
+ draw CCW arc in a [ ] block
symbols= x-, -x, x-x, ->, x->, <-, <-x, <->
where x is | or ! ; arrowheads for dpic only '
-define(`darc',`[ C: (0,0)
- dlth=ifelse(`$5',,dlthick,`$5')
- w = ifelse(`$6',,dlth*1.75,(`$6'))
- h = ifelse(`$7',,dlth,(`$7'))
- r = ifelse(`$2',,darcrad,`($2)')
- p = sqrt((w/2)^2+h^2)/(w/2)*lthick
- as = ifelse(`$3',,rp_ang-pi__/2,`$3')
- tas = as ifinstr(`$8',<-,`+ p/r')
- ae = ifelse(`$4',,as+pi__/2,`$4')
- tae = ae ifinstr(`$8',<-,`- p/r')
- S: (rect_(r,as)); TS: (rect_(r,tas))
- E: (rect_(r,ae)); TE: (rect_(r,tae))
- arc thick dlth/(1bp__) wid w ht h dnl
- ifinstr(`$8',<-,<-`'ifinstr(`$8',->,>),`$8',->,->) from S to E with .c at C
- ifelse(rgbstring(1,1,1),"",,
- `arc thick dlth/(1bp__)-linethick*2 wid (h-p-lthick)/h*w ht h-p-lthick \
- colored rgbstring(dfillcolor) \
+pushdef(`darc',`pushdef(`m4r',`(ifelse(`$2',,darcrad,`($2)'))') dnl
+ pushdef(`m4C',`ifelse(`$1',,rvec_(0,m4r),`$1')') dnl
+ pushdef(`m4as',`(ifelse(`$3',,rp_ang-pi__/2,`$3'))') dnl
+ pushdef(`m4ae',`(ifelse(`$4',,m4as+pi__/2,`$4'))') dnl
+ arc invis from m4C+(rect_(m4r,m4as)) to m4C+(rect_(m4r,m4ae)) with .c at m4C
+ C_darc: last arc.c; Start_darc: last arc.start; End_darc: Here
+ r_darc = m4r; as_darc = m4as; ae_darc = m4ae popdef(`m4r',`m4C',`m4as',`m4ae')
+ dlth_darc=ifelse(`$5',,dlthick,(`$5'))
+ w_darc = ifelse(`$6',,dlth_darc*1.75,(`$6'))
+ h_darc = ifelse(`$7',,dlth_darc,(`$7'))
+ p_darc = sqrt((w_darc/2)^2+h_darc^2)/(w_darc/2)*lthick
+ tas_darc = as_darc ifinstr(`$8',<-,`+ p_darc/r_darc')
+ tae_darc = ae_darc ifinstr(`$8',->,`- p_darc/r_darc')
+ TS: C_darc+(rect_(r_darc,tas_darc))
+ TE: C_darc+(rect_(r_darc,tae_darc))
+ { arc thick dlth_darc/(1bp__) wid w_darc ht h_darc dnl
+ ifinstr(`$8',<-,<-`'ifinstr(`$8',->,>),`$8',->,->) dnl
+ `$9' from Start_darc to End_darc with .c at C_darc }
+ pushdef(`m4inn',`ifelse(`$10',,`ifelse(rgbstring(dfillcolor),"",,
+ ifdef(`dfillcolor',T),T,`outlined rgbstring(dfillcolor)')',`$10')') dnl
+ ifelse(m4inn,,,
+ `arc thick dlth_darc/(1bp__)-linethick*2 \
+ wid (h_darc-p_darc-lthick)/h_darc*w_darc ht h_darc-p_darc-lthick \
ifinstr(`$8',<-,<-`'ifinstr(`$8',->,>),`$8',->,->) \
- from TS to TE rad r with .c at C')
- ifinstr(`$8',|-,`X: (vscal_(lthick/2,-sin(as),cos(as)))
- line from C+(rect_(r+dlthick/2-lthick/2,as))+(X.x,X.y) to \
- C+(rect_(r-dlthick/2+lthick/2,as))+(X.x,X.y)',
- `$8',!-,`X: (vscal_(lthick/4,-sin(as),cos(as)))
- line thick linethick/2 \
- from C+(rect_(r+dlthick/2-lthick/4,as))+(X.x,X.y) to \
- C+(rect_(r-dlthick/2+lthick/4,as))+(X.x,X.y)')
- ifinstr(`$8',-|,`X: (vscal_(lthick/2,-sin(ae),cos(ae)))
- line from C+(rect_(r+dlthick/2-lthick/2,ae))-(X.x,X.y) to \
- C+(rect_(r-dlthick/2+lthick/2,ae))-(X.x,X.y)',
- `$8',!-,`X: (vscal_(lthick/4,-sin(ae),cos(ae)))
- line thick linethick/2 \
- from C+(rect_(r+dlthick/2-lthick/4,ae))-(X.x,X.y) to \
- C+(rect_(r-dlthick/2+lthick/4,ae))-(X.x,X.y)')
- rp_ang := ae+pi__/2
- ] with ifelse(`$1',,.S at Here,.C at `$1')
- move to last [].E
- ')
+ m4inn from TS to TE with .c at C_darc') popdef(`m4inn')
+ ifinstr(`$8',|-,`X: (vscal_(lthick/2,-sin(as_darc),cos(as_darc)))
+ line `$9' \
+ from C_darc+(rect_(r_darc+dlth_darc/2-lthick/2,as_darc))+X to \
+ C_darc+(rect_(r_darc-dlth_darc/2+lthick/2,as_darc))+X',
+ `$8',!-,`X: (vscal_(lthick/4,-sin(as_darc),cos(as_darc)))
+ line `$9' thick linethick/2 \
+ from C_darc+(rect_(r_darc+dlth_darc/2-lthick/4,as_darc))+X to \
+ C_darc+(rect_(r_darc-dlth_darc/2+lthick/4,as_darc))+X')
+ ifinstr(`$8',-|,`X: (vscal_(lthick/2,-sin(ae_darc),cos(ae_darc)))
+ line `$9' from C_darc+(rect_(r_darc+dlth_darc/2-lthick/2,ae_darc))-X to \
+ C_darc+(rect_(r_darc-dlth_darc/2+lthick/2,ae_darc))-X',
+ `$8',-!,`X: (vscal_(lthick/4,-sin(ae_darc),cos(ae_darc)))
+ line `$9' thick linethick/2 \
+ from C_darc+(rect_(r_darc+dlth_darc/2-lthick/4,ae_darc))-X to \
+ C_darc+(rect_(r_darc-dlth_darc/2+lthick/4,ae_darc))-X')
+ rp_ang := ae_darc+pi__/2 ')
`Darc(center pos, radius, start radians, end radians, params)
+ or
+ Darc(,params)
draw CCW arc
- params is a semicolon-separated list of items:
- thick=val (total thicknes, ie width)
- wid=val (arrowhead width)
- ht=val (arrowhead height)
+ params is a semicolon-separated list:
+ thick=val; (total thicknes, ie width)
+ wid=val; (arrowhead width)
+ ht=val; (arrowhead height)
+ outline=color; (e.g. "red" or (1,0,0) )
+ innershade=color; (e.g. (0,1,1) or "cyan")
ends= x-, -x, x-x, ->, x->, <-, <-x, <-> where x is ! or |
< and > work for dpic only
|- closed end with full-width line
!- closed end with half-width line
+ If arg1 is null then the additional list items are accepted:
+ centre=Position;
+ rad=expr;
+ startdeg=degrees; NOTE: degrees
+ enddeg=degrees; NOTE: degrees
eg Darc(C,r,ang1,ang2,ends=<-|)'
define(`Darc',
- `pushkey_(`$5',thick,dlthick)
- pushkey_(`$5',wid,dlthick*1.75)
- pushkey_(`$5',ht,dlthick)
- pushkey_(`$5',ends)pushdef(`m4ends',substr(m4ends,1,eval(len(m4ends)-2)))
- darc(`$1',`$2',`$3',`$4',m4thick,m4wid,m4ht,m4ends)dnl
- popdef(`m4ends')popdef(`m4ends')popdef(`m4ht',`m4wid',`m4thick')')
+ `pushkeys_(ifelse(`$1',,`$2',`$5'),thick:dlthick;wid:dlthick*1.75;ht:dlthick;
+ outline::N;innershade::N;ends::N;centre:Here:N;rad:darcrad;
+ startdeg::;enddeg::;)dnl
+ pushdef(`m4ou',`m4osh(m4outline,outlined)')dnl
+ pushdef(`m4sh',`m4osh(m4innershade,outlined,`dfillcolor')')dnl
+ ifelse(`$1',,
+ `darc(m4centre,m4rad,m4startdeg*dtor_,m4enddeg*dtor_,
+ m4thick,m4wid,m4ht,m4ends,m4ou,m4sh)',
+ `darc(`$1',`$2',ifelse(m4startdeg,,`$3',m4startdeg*dtor_),
+ ifelse(m4enddeg,,`$4',m4enddeg*dtor_),
+ m4thick,m4wid,m4ht,m4ends,m4ou,m4sh)') dnl
+ popdef(`m4thick',`m4wid',`m4ht',`m4outline',`m4innershade',`m4ends',
+ `m4centre',`m4rad',`m4startdeg',`m4enddeg',`m4ou',`m4sh')')')
+
+ `darrow(linespec,params)
+ params is a semicolon-separated list of items:
+ s; truncate at start by dline thickness/2
+ e; truncate at end by dline thickness/2
+ thick=expr; (total thicknes, ie width)
+ wid=expr; (arrowhead width)
+ ht=expr; (arrowhead height)
+ outline=color; (e.g. "red" or (1,0,0) )
+ innershade=color; (e.g. (0,1,1) or "cyan")
+ name=name; (name of underlying invis line)
+ ends= -> or x-> or <- or <-x or <-> where x is | or !
+ |- closed end with full-width line
+ !- closed end with half-width line
+ eg Darrow(from A to B,E;ends=<-|)'
+define(`Darrow',
+ `pushkeys_(`$2',thick:dlthick;wid:dlthick*3/2;ht:dlthick;
+ outline::N;innershade::N;name::N;ends::N;)dnl
+ ifelse(m4innershade,,,`pushdef(`dfillcolor',`m4ctrunc(m4innershade)')')dnl
+ pushdef(`m4nm',ifelse(m4name,,,m4name:))dnl
+ ifelse(m4outline,,
+ `m4nm darrow(`$1',ifinstr(`$2',S,t),ifinstr(`$2',E,t),
+ m4thick,m4wid,m4ht,m4ends)',
+ index(m4outline,`"'),0,
+ `m4nm darrow(`$1',ifinstr(`$2',S,t),ifinstr(`$2',E,t),
+ m4thick,m4wid,m4ht,m4ends,outlined m4outline)',
+ `rgbdraw(m4ctrunc(m4outline),
+ m4nm darrow(`$1',ifinstr(`$2',S,t),ifinstr(`$2',E,t),
+ m4thick,m4wid,m4ht,m4ends))')
+ ifelse(m4innershade,,,`popdef(`dfillcolor')')dnl
+ popdef(`m4ends',`m4thick',`m4wid',`m4ht',`m4outline',`m4innershade',`m4name',
+ `m4nm')')
+
+ `Dline(linespec,params)
+ params is a semicolon-separated list of items:
+ S; truncate at start by dline thickness/2
+ E; truncate at end by dline thickness/2
+ thick=val; (total thicknes, ie width)
+ outline=color; (e.g. "red" or (1,0,0) )
+ innershade=color; (e.g. (0,1,1) or "cyan")
+ name=Name;
+ ends= x-x; or -x; or x-; where x is ! or |
+ |- closed end with full-width line
+ !- closed end with half-width line
+ eg Dline(from A to B,E;ends=|-)'
+define(`Dline',
+ `pushkeys_(`$2',thick:dlthick;outline::N;innershade::N;ends::N;name::N;)dnl
+ ifelse(m4name,,,m4name:) dline(`$1',ifinstr(`$2',S;,t),ifinstr(`$2',E;,t),
+ m4thick,m4ends,m4osh(m4outline,outlined),
+ m4osh(m4innershade,outlined,`dfillcolor'))
+ popdef(`m4thick',`m4outline',`m4innershade',`m4ends',`m4name') ')
+
+define(`m4ctrunc',`substr(`$1',1,eval(len(`$1')-2))')
+#efine(`mark',`{dot(at `$1'); "`$1'" at last [].s below}')
+#efine(`pure',`patsubst(`$1',`"',`\\"')')
divert(0)dnl
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdf b/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdf
index e9b0b671bf0..dcc3027e97e 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdf
+++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/SourcesMan.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/SourcesMan.m4
index 8e82b3f8324..9f39d1e0445 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/doc/SourcesMan.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/SourcesMan.m4
@@ -14,6 +14,7 @@ define(`NL',`; move down $1; right_')
{source ; move ; "`source'" ljust} NL
{source(,I) ; move ; "`source(,I)'" ljust} NL
{source(,i) ; move ; "`source(,i)'" ljust} NL
+ {source(,ii) ; move ; "`source(,ii)'" ljust} NL
{source(,V) ; move ; "`source(,V)'" ljust} NL
{source(,v) ; move ; "`source(,v)'" ljust} NL
{source(,S) ; move ; "`source(,S)'" ljust} NL
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Version.tex b/Master/texmf-dist/doc/latex/circuit-macros/doc/Version.tex
index 73fb7dd5770..1f7ee14733e 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/doc/Version.tex
+++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Version.tex
@@ -1 +1 @@
-Version 10.3
+Version 10.4
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/body.tex b/Master/texmf-dist/doc/latex/circuit-macros/doc/body.tex
index e229888d914..296ba4e2953 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/doc/body.tex
+++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/body.tex
@@ -946,6 +946,7 @@ and for power-system diagrams, macros
and
{\tt Ysymbol(at {\sl position, keys,} U|D|L|R|{\sl degrees})},
+\enlargethispage{\baselineskip}
Diodes are shown in \FR{Diodes}.
\begin{figure}[H]
\input DiodesMan
@@ -2481,7 +2482,7 @@ For the slash symbol, the {\tt sl\_slash} keys are valid.
The fourth argument is like the third but controls a breaker or slash
symbol in the output
-lead. The example, {\tt sl\_transformer(right\_ elen\_ from A,,C,C)}
+lead. The example, {\tt sl\_transformer(right\_ elen\_ from A,{},C,C)}
draws a transformer with closed breakers in the input and output leads.
Exception are the {\tt sl\_drawout()} element which does not have breakers
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex b/Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex
index cf87a5b02f1..7f3ceea1b31 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex
+++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex
@@ -187,14 +187,14 @@
{cct}
{line (dotted, dashed permissible) with centred arrowhead
\seesect{Twoterminal:}}
+\macrodef{assign3}{assign3}{({\sl var name,var name,var name,arg4,arg5,arg6})}
+ {gen}
+ {Assigns \$1 = arg4 if \$1 is nonblank; similarly \$2 = arg5 and \$3 = arg6}
\macrodef{AutoGate}{AutoGate}{}
{log}
{Draw the tree for a gate as in the {\tt Autologix} macro. No inputs
or external connections are drawn. The names of the internal gate
inputs are stacked in {\tt `AutoInNames'}}
-\macrodef{assign3}{assign3}{({\sl var name,var name,var name,arg4,arg5,arg6})}
- {gen}
- {Assigns \$1 = arg4 if \$1 is nonblank; similarly \$2 = arg5 and \$3 = arg6}
\macrodef{Autologix}{Autologix}%
{({\sl Boolean function sequence},%
[N[oconnect]][L[eftinputs]][R][V][M][;offset={\sl value}])}
@@ -239,14 +239,6 @@
{\tt Autologix(Xor([PN],And(x,y),And(x,y)),LRV)}}
\Letter{B}%
-\macrodef{b\_}{b_}{}
- {gen}
- {blue color value}
-\macrodef{b\_current}{b_current}{({\sl label},{\sl pos},In|Out,Start|End,{\sl
- frac})}
- {cct}
- {labelled branch-current arrow to {\sl frac} between branch end and body
- \seesect{Branchcurrent:}}
\macrodef{basename\_}{basename_}{({\sl string sequence, separator})}
{gen}
{Extract the rightmost name from a sequence of names separated by arg2
@@ -255,6 +247,14 @@
{cct}
{n-cell battery: default 1 cell,
R=reversed polarity\seesect{Twoterminal:}}
+\macrodef{b\_}{b_}{}
+ {gen}
+ {blue color value}
+\macrodef{b\_current}{b_current}{({\sl label},{\sl pos},In|Out,Start|End,{\sl
+ frac})}
+ {cct}
+ {labelled branch-current arrow to {\sl frac} between branch end and body
+ \seesect{Branchcurrent:}}
\macrodef{beginshade}{beginshade}{({\sl gray value})}
{gen}
{begin gray shading, see {\tt shade}
@@ -270,10 +270,10 @@
{gen}
{Position {\sl distance} from {\sl Pos1} toward {\sl Pos2}. If
the fourth arg is {\tt R} then from {\sl Pos2} toward {\sl Pos1}.}
-\macrodef{bi\_tr}{bi_tr}{(\linespec,L|R,P,E)}
- {cct}
- {left or right, N- or P-type bipolar transistor, without or with envelope
- \seesect{Semiconductors:}}
+\macrodef{binary\_}{binary_}{($n$, [$m$])}
+ {gen}
+ {binary representation of $n,$ left padded to $m$ digits if the second
+ argument is nonblank}
\macrodef{bi\_trans}{bi_trans}{(\linespec,L|R,{\sl chars},E)}
{cct}
{ bipolar transistor, core left or right; chars:
@@ -291,15 +291,10 @@
{\tt [u]T}=thyristor trigger line;
arg 4 = E: envelope
\seesect{Semiconductors:}}
-\macrodef{binary\_}{binary_}{($n$, [$m$])}
- {gen}
- {binary representation of $n,$ left padded to $m$ digits if the second
- argument is nonblank}
-\macrodef{BOX\_gate}{BOX_gate}{({\sl inputs,output,swid,sht,label})}
- {log}
- {output=[{\tt P|N}], inputs=[{\tt P|N}]$\ldots$, sizes swid and sht
- in {\tt L\_unit}s (default {\tt AND\_wd} = 7)
- \seesect{Logicgates:}}
+\macrodef{bi\_tr}{bi_tr}{(\linespec,L|R,P,E)}
+ {cct}
+ {left or right, N- or P-type bipolar transistor, without or with envelope
+ \seesect{Semiconductors:}}
\macrodef{boxcoord}{boxcoord}{({\sl planar obj},{\sl x fraction},{\sl y
fraction})}
{gen}
@@ -309,6 +304,11 @@
{evaluate, e.g.\ {\sl name}{\tt \_w} if defined, else {\sl default\/}
if given, else 0 {\tt v} gives sum of {\tt d} and {\tt h} values
\seesect{Interaction:}}
+\macrodef{BOX\_gate}{BOX_gate}{({\sl inputs,output,swid,sht,label})}
+ {log}
+ {output=[{\tt P|N}], inputs=[{\tt P|N}]$\ldots$, sizes swid and sht
+ in {\tt L\_unit}s (default {\tt AND\_wd} = 7)
+ \seesect{Logicgates:}}
\macrodef{bp\_\_}{bp__}{}
{gen}
{big-point-size factor, in scaled inches, ({\tt *scale/72})}
@@ -316,12 +316,6 @@
{cct}
{pushbutton switch R=right orientation (default L=left);
chars: O= normally open, C=normally closed }
-\macrodef{BUF\_ht}{BUF_ht}{}
- {log}
- {basic buffer gate height in {\tt L\_unit}s}
-\macrodef{BUF\_wd}{BUF_wd}{}
- {log}
- {basic buffer gate width in {\tt L\_unit}s}
\macrodef{BUFFER\_gate}{BUFFER_gate}{(\linespec, [N|B],
{\sl wid, ht,} [N|P]\char42, [N|P]\char42, [N|P]\char42)}
{log}
@@ -339,14 +333,17 @@
Args 4-6 allow alternative
definitions of respective {\tt In, NE,}
and {\tt SE} argument sequences }
+\macrodef{BUF\_ht}{BUF_ht}{}
+ {log}
+ {basic buffer gate height in {\tt L\_unit}s}
+\macrodef{BUF\_wd}{BUF_wd}{}
+ {log}
+ {basic buffer gate width in {\tt L\_unit}s}
\macrodef{buzzer}{buzzer}{( U|D|L|R|{\sl degrees, size,}[C])}
{cct}
{buzzer, {\sl In1} to {\sl In3} defined, C=curved
\seesect{Composite:}}
\Letter{C}%
-\macrodef{c\_fet}{c_fet}{(\linespec,R,P)}
- {cct}
- {left or right, plain or negated pin simplified MOSFET}
\macrodef{capacitor}{capacitor}{(\linespec,{\sl chars},R,
{\sl height}, {\sl wid})}
{cct}
@@ -385,6 +382,9 @@
minimum long dash len, short dash len, gap len}}
{gen}
{Technical drawing centerline}
+\macrodef{c\_fet}{c_fet}{(\linespec,R,P)}
+ {cct}
+ {left or right, plain or negated pin simplified MOSFET}
\macrodef{Cintersect}{Cintersect}{({\sl Pos1, Pos2, rad1, rad2,} [R])}
{gen}
{Upper (lower if arg5={\tt R}) intersection of circles at
@@ -457,14 +457,14 @@
{\sl phase} )}
{gen}
{function $a\times\cos(\omega t + \phi)$ }
+\macrodef{cross3D}{cross3D}{({\sl x1,y1,z1,x2,y2,z2})}
+ {3D}
+ {cross product of two triples}
\macrodef{cross}{cross}{(at {\sl location, size}|{\sl keys})}
{gen}
{Plots a small cross. The possible key-value pairs are:
{\tt size={\sl expr};},
{\tt line={\sl attributes};} }
-\macrodef{cross3D}{cross3D}{({\sl x1,y1,z1,x2,y2,z2})}
- {3D}
- {cross product of two triples}
\macrodef{crossover}{crossover}{(\linespec, [L|R][:{\sl line attributes}],
Line1, Line2, .{.}.)}
{cct}
@@ -476,10 +476,6 @@
{cct}
{controlled-source width}
\Letter{D}%
-\macrodef{d\_fet}{d_fet}{(\linespec,R,P,E|S)}
- {cct}
- {left or right, N or P depletion MOSFET, envelope or simplified
- \seesect{Semiconductors:}}
\macrodef{dabove}{dabove}{(at {\sl location})}
{darrow}
{above (displaced dlinewid/2)}
@@ -488,18 +484,6 @@
{DAC with defined width, height, and number of inputs {\tt In$i$},
top terminals {\tt N$i$}, ouputs {\tt Out$i$},
and bottom terminals~{\tt S$i$} \seesect{Logicgates:}}
-\macrodef{darc}{darc}{({\sl center position},
- {\sl radius}, {\sl start radians}, {\sl end radians}, {\sl dline thickness},
- {\sl arrowhead wid}, {\sl arrowhead ht},
- {\sl terminals})}
- {darrow}
- {See also {\tt Darc}.
- CCW arc in {\tt dline} style, with closed ends or (dpic only) arrowheads.
- Permissible {\sl terminals}:
- {\sl x}{\tt -},
- {\tt -}{\sl x}, {\sl x}{\tt -}{\sl x}, {\tt ->}, {\sl x}{\tt ->},
- {\tt <-}, {\tt <-}{\sl x}, {\tt <->}
- where {\sl x} means {\tt |} or (half-thickness line) {\tt !}.}
\macrodef{Darc}{Darc}{({\sl center position},
{\sl radius}, {\sl start radians}, {\sl end radians},
{\sl parameters})}
@@ -512,6 +496,20 @@
{\tt -}{\sl x}, {\sl x}{\tt -}{\sl x}, {\tt ->}, {\sl x}{\tt ->},
{\tt <-}, {\tt <-}{\sl x}, {\tt <->}
where {\sl x} means {\tt |} or (half-thickness line) {\tt !}.}
+\macrodef{darc}{darc}{({\sl center position},
+ {\sl radius}, {\sl start radians}, {\sl end radians}, {\sl dline thickness},
+ {\sl arrowhead wid}, {\sl arrowhead ht},
+ {\sl end symbols}, {\sl outline attributes}, {\sl inner attributes})}
+ {darrow}
+ {See also {\tt Darc}.
+ CCW arc in {\tt dline} style, with closed ends or (dpic only) arrowheads.
+ Permissible {\sl end symbols}:
+ {\sl x}{\tt -},
+ {\tt -}{\sl x}, {\sl x}{\tt -}{\sl x}, {\tt ->}, {\sl x}{\tt ->},
+ {\tt <-}, {\tt <-}{\sl x}, {\tt <->}
+ where {\sl x} means {\tt |} or (half-thickness line) {\tt !}.
+ An inner arc is drawn overlaying the outer arc.
+ Example: {\tt darc(,{,},{,},{,},{,}outlined "red",outlined "yellow")}.}
\macrodef{Darlington}{Darlington}{(L|R,{\sl chars})}
{cct}
{Composite Darlington pair Q1 and Q2 with internal locations E, B, C;
@@ -524,33 +522,44 @@
R2= Q2 bias resistor; E1= ebox,
Z= zener bias diode
\seesect{Semiconductors:}}
-\macrodef{darrow\_init}{darrow_init}{}
+\macrodef{darrow}{darrow}{(\linespec,
+ t,t,{\sl width},{\sl arrowhd wd},{\sl arrowhd ht},{\sl parameters},
+ {\sl color attributes})}
{darrow}
- {initialize darrow drawing parameters (reads {\tt darrow.m4})}
+ {See also {\tt Darrow}.
+ Double arrow, truncated at beginning (arg2={\tt t}) or
+ end (arg3={\tt t}), specified sizes,
+ with arrowhead and optional closed stem. The parameters (arg7) are
+ {\tt {\sl x}-} or {\tt ->} or {\tt {\sl x}->} or {\tt <-} or {\tt <-{\sl x}}
+ or {\tt <->} where {\sl x} is {\tt |} or {\tt !}.
+ The {\tt !-} or {\tt -!} parameters close
+ the stem with half-thickness lines to simplify butting to other objects.
+ The color attributes are, e.g.,
+ {\tt outlined "{\sl color}" shaded "{\sl color}"}.
+ Example:
+ {\tt linethick=5; darrow(down\_\ 2,{,},0.5,0.75,0.75,|,outlined "red")}. }
\macrodef{Darrow}{Darrow}{(\linespec, {\sl parameters})}
{darrow}
{Wrapper for {\tt darrow}.
Semicolon-separated {\sl parameters}:
- {\tt S}, {\tt E} truncate at start or end by dline thickness/2;
- {\tt thick=}{\sl val} (total thicknes, ie width);
- {\tt wid=}{\sl val} (arrowhead width);
- {\tt ht=}{\sl val} (arrowhead height);
+ {\tt S;}, {\tt E;} truncate at start or end by dline thickness/2;
+ {\tt thick=}{\sl val}; (total thicknes, ie width);
+ {\tt wid=}{\sl val}; (arrowhead width);
+ {\tt ht=}{\sl val}; (arrowhead height);
{\tt ends=}
{\sl x}{\tt -}{\sl x} or
{\tt -}{\sl x} or
{\sl x}{\tt -} where {\sl x} is {\tt !} (half-width line)
- or {\tt |} (full-width line).}
-\macrodef{darrow}{darrow}{(\linespec,
- t,t,{\sl width},{\sl arrowhd wd},{\sl arrowhd ht},{\sl parameters})}
+ or {\tt |} (full-width line).
+ Examples:
+ {\tt define(`dfillcolor',`1,0.85,0') linethick=5;
+ rgbdraw(1,0,0,Darrow(down\_\ 2,thick=0.5; wid=0.75; ht=0.75; ends=|->))},
+ which is equivalent to
+ {\tt Darrow(down\_\ 2,thick=0.5; wid=0.75; ht=0.75; \
+ ends=|->; outline="red")}. }
+\macrodef{darrow\_init}{darrow_init}{}
{darrow}
- {See also {\tt Darrow}.
- double arrow, truncated at beginning or end, specified sizes,
- with arrowhead or closed stem.
- {\sl parameters=}
- {\tt {\sl x}-} or {\tt ->} or {\tt {\sl x}->} or {\tt <-} or {\tt <-{\sl x}}
- or {\tt <->} where {\sl x} is {\tt |} or {\tt !}.
- The {\tt !-} or {\tt -!} parameters close
- the stem with half-thickness lines to simplify butting to other objects. }
+ {Initialize darrow drawing parameters (reads library file {\tt darrow.m4})}
\macrodef{dashline}{dashline}{(\linespec,{\sl thickness}|{\sl color}|<->,
{\sl dash len, gap len},G)}
{gen}
@@ -567,14 +576,14 @@
{A DC symbol (a dashed line below a solid line).
The current drawing direction is default, otherwise Up, Down,
Left, Right, or at {\sl degrees} slant; e.g.,
- {\tt source(up\_ dimen\_); $\lbrace$ DCsymbol(at last [],,,R) $\rbrace$}
+ {\tt source(up\_ dimen\_); $\lbrace$ DCsymbol(at last [],{},{},R) $\rbrace$}
\seesect{Twoterminal:} }
-\macrodef{delay\_rad\_}{delay_rad_}{}
- {cct}
- {delay radius}
\macrodef{delay}{delay}{(\linespec,{\sl size})}
{cct}
{delay element\seesect{Twoterminal:}}
+\macrodef{delay\_rad\_}{delay_rad_}{}
+ {cct}
+ {delay radius}
\macrodef{deleminit\_}{deleminit_}{}
{darrow}
{sets drawing direction for dlines}
@@ -599,18 +608,26 @@
{\tt S[{\sl n}]} puts the Sel inputs at the bottom (default)
{\tt OE} ({\tt N=}negated) {\tt OE} pin
\seesect{Logicgates:}}
-\macrodef{dend}{dend}{(at {\sl location})}
+\macrodef{dend}{dend}{(at {\sl location},
+ {\sl line thickness}{\tt |}{\sl attributes})}
{darrow}
- {close (or start) double line}
+ {Close (or start) double line (Note specifying {\tt dends=} for {\tt Dline}
+ is a similar function. Arg2 is dline thickness or atributes:
+ {\tt thick={\sl expression};} (dline thickness in drawing units)
+ {\tt outline=({\sl r,g,b})|"{\sl color}";}}
+\macrodef{d\_fet}{d_fet}{(\linespec,R,P,E|S)}
+ {cct}
+ {left or right, N or P depletion MOSFET, envelope or simplified
+ \seesect{Semiconductors:}}
\macrodef{dfillcolor}{dfillcolor}{}
{darrow}
{dline fill color (default white)}
-\macrodef{diff\_}{diff_}{({\sl a},{\sl b})}
- {gen}
- {difference function}
\macrodef{diff3D}{diff3D}{({\sl x1,y1,z1,x2,y2,z2})}
{3D}
{difference of two triples}
+\macrodef{diff\_}{diff_}{({\sl a},{\sl b})}
+ {gen}
+ {difference function}
\macrodef{dimen\_}{dimen_}{}
{cct}
{size parameter for scaling circuit element bodies \seesect{Circuitscaling:}}
@@ -671,20 +688,27 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
line rather than the centre of the last {\tt [ ]};
L,R,A,B align labels ljust, rjust, above,
or below (absolute) respectively \seesect{Labels:}}
-\macrodef{dleft}{dleft}{}
+\macrodef{dleft}{dleft}{({\tt at} {\sl position}, {\sl line thickness},
+ {\sl attributes})}
{darrow}
- {double line left turn}
+ {Double line left turn 90 degrees. Attributes can be
+ {\tt outline=({\sl r, g, b})|"{\sl color}";}
+ {\tt innershade=({\sl r, g, b})|"{\sl color}";}
+ where rgb values in parentheses or a defined color is specified.}
\macrodef{Dline}{Dline}{(\linespec, {\sl parameters})}
{darrow}
{Wrapper for {\tt dline}.
- Semicolon-separated {\sl parameters}:
- {\tt S}, {\tt E} truncate at start or end by dline thickness/2;
- {\tt thick=}{\sl val} (total thicknes, ie width);
+ The semicolon-separated {\sl parameters} are:
+ {\tt S;}, {\tt E;} truncate at start or end by dline thickness/2;
+ {\tt thick={\sl val};} (total thicknes, ie width);
+ {\tt outline={\sl color};} (e.g., {\tt "red"} or {\tt (1,0,0)}),
+ {\tt innershade={\sl color};} (e.g., {\tt (0,1,1)} or {\tt "cyan"}),
+ {\tt name={\sl Name};},
{\tt ends=}
{\sl x}{\tt -}{\sl x} or
{\tt -}{\sl x} or
{\sl x}{\tt -} where {\sl x} is {\tt !} (half-width line)
- or {\tt |} (full-width line).}
+ or {\tt |;} (full-width line).}
\macrodef{dline}{dline}{(\linespec,t,t,{\sl width},{\sl parameters})}
{darrow}
{See also {\tt Dline}.
@@ -701,33 +725,37 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
\macrodef{dljust}{dljust}{(at {\sl location})}
{darrow}
{ljust (displaced dlinewid/2)}
-\macrodef{dn\_}{dnx}{}
- {gen}
- {down with respect to current direction}
\macrodef{dna\_}{dna_}{}
{cct}
{internal character sequence that specifies which subcomponents are drawn}
+\macrodef{dn\_}{dnx}{}
+ {gen}
+ {down with respect to current direction}
%\macrodef{dnm\_}{dnm_}{}
% {cct}
% {similar to dna\_}
+\macrodef{dot3D}{dot3D}{({\sl x1,y1,z1,x2,y2,z2})}
+ {3D}
+ {dot product of two triples}
\macrodef{dot}{dot}{(at {\sl location},{\sl radius}|{\sl keys},{\sl fill})}
{gen}
{Filled circle (third arg= gray value: 0=black, 1=white). The possible
key-value pairs are:
{\tt rad={\sl expr};} and
{\tt circle={\sl attributes};} }
-\macrodef{dot3D}{dot3D}{({\sl x1,y1,z1,x2,y2,z2})}
- {3D}
- {dot product of two triples}
\macrodef{dotrad\_}{dotrad_}{}
{gen}
{dot radius}
\macrodef{down\_}{down_}{}
{gen}
{sets current direction to down \seesect{Placing:}}
-\macrodef{dright}{dright}{}
+\macrodef{dright}{dright}{({\tt at} {\sl position}, {\sl line thickness},
+ {\sl attributes})}
{darrow}
- {double arrow right turn}
+ {Double line right turn 90 degrees. Attributes can be
+ {\tt outline=({\sl r, g, b})|"{\sl color}";}
+ {\tt innershade=({\sl r, g, b})|"{\sl color}";}
+ where rgb values in parentheses or a defined color is specified.}
\macrodef{drjust}{drjust}{(at {\sl location})}
{darrow}
{rjust (displaced dlinewid/2)}
@@ -763,28 +791,30 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
Y = pull switch,
Z = turn switch
\seesect{Twoterminal:}}
-\macrodef{dtee}{dtee}{([L|R])}
+\macrodef{dtee}{dtee}{([L|R], {\sl line thickness}, {\sl attributes})}
{darrow}
- {double arrow tee junction with tail to left,
- right, or (default) back along current direction }
+ {Double arrow tee junction with tail to left,
+ right, or (default) back along current direction, leaving the current
+ location at the tee centre; e.g.,
+ {\tt dline(right\_,{,}t); dtee(R);
+ \{ darrow(down\_,t) \}; darrow(right\_,t)}.
+ The attributes are
+ {\tt thick={\sl expr};} (line thickness in drawing units),
+ {\tt innershade=({\sl r,g,b})|"{\sl color}";}
+ {\tt outline=({\sl r,g,b})|"{\sl color}";}. }
\macrodef{dtor\_}{dtor_}{}
{gen}
{degrees to radians conversion constant}
-\macrodef{dturn}{dturn}{({\sl degrees ccw})}
+\macrodef{dturn}{dturn}{({\sl degrees ccw},{\sl line thickness},
+ {\sl attributes})}
{darrow}
- {turn dline arg1 degrees left (ccw)}
+ {Tturn dline arg1 degrees left (ccw).
+ Attributes can be
+ {\tt outline=({\sl r, g, b})|"{\sl color}";}
+ {\tt innershade=({\sl r, g, b})|"{\sl color}";}
+ where rgb values in parentheses or a defined color is specified.}
+%
\Letter{E}%
-\macrodef{E\_\_}{E__}{}
- {gen}
- {the constant $e$}
-\macrodef{e\_}{e_}{}
- {gen}
- {.e relative to current direction}
-\macrodef{e\_fet}{e_fet}{(\linespec,R,P,E|S)}
- {cct}
- {left or right, N or P enhancement MOSFET, normal
- or simplified, without or with envelope
- \seesect{Semiconductors:}}
\macrodef{earphone}{earphone}{( U|D|L|R|{\sl degrees, size})}
{cct}
{earphone, {\sl In1} to {\sl In3} defined
@@ -800,6 +830,17 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
terms. The possible keys are {\tt lgth, wdth, text, box},
e.g., {\tt lgth=0.2; text=\char34{}XX\char34;
box=shaded \char34{}green\char34}\seesect{Twoterminal:}}
+\macrodef{E\_\_}{E__}{}
+ {gen}
+ {the constant $e$}
+\macrodef{e\_}{e_}{}
+ {gen}
+ {.e relative to current direction}
+\macrodef{e\_fet}{e_fet}{(\linespec,R,P,E|S)}
+ {cct}
+ {left or right, N or P enhancement MOSFET, normal
+ or simplified, without or with envelope
+ \seesect{Semiconductors:}}
\macrodef{elchop}{elchop}{({\sl Name1,Name2})}
{gen}
{{\tt chop} for ellipses: evaluates to {\tt chop} $r$ where $r$ is
@@ -812,6 +853,13 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
\macrodef{elen\_}{elen_}{}
{cct}
{default element length}
+\macrodef{ellipsearc}{ellipsearc}{({\sl width, height, startangle, endangle,
+ rotangle, {\tt cw|ccw}, line attributes})}
+ {gen}
+ {Arc of a rotated ellipse in a {\tt [ ]} block. Angles are in radians.
+ Arg5 is the angle of the width axis;
+ e.g., {\tt ellipsearc(2,1,0,pi\_,pi\_/4,{},dashed ->)}. Internal locations
+ are {\tt Start, End, C} (for centre). }
\macrodef{em\_arrows}{em_arrows}{({\sl type}|{\sl keys,angle,length})}
{cct}
{ Radiation arrows: {\sl type} {\tt N|I|E [D|T]}
@@ -832,6 +880,7 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
\macrodef{expe}{expe}{}
{gen}
{exponential, base $e$}
+%
\Letter{F}%
\macrodef{f\_box}{f_box}{({\sl boxspecs},{\sl text},{\sl expr1},$\cdots$)}
{gen}
@@ -860,11 +909,6 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
\macrodef{fitcurve}{fitcurve}{(V,n,[e.g. dotted],m (default 0))}
{gen}
{Draw a spline through positions V[m], $ldots$ V[n]: Works only with dpic.}
-\macrodef{FlipFlop}{FlipFlop}{(D|T|RS|JK,{\sl label},{\sl boxspec},%
- {\sl pinlength})}
- {log}
- {flip-flops,
- {\sl boxspec}=e.g.\ ht x wid y \seesect{Logicgates:}}
\macrodef{FlipFlop6}{FlipFlop6}{({\sl label},{\sl spec},{\sl boxspec})}
{log}
{{\em This macro (6-input flip-flops)
@@ -873,6 +917,11 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
{\sl spec}={\tt [[n]NQ][[n]Q][[n]CK][[n]PR][lb]}
{\tt [[n]CLR][[n]S][[n].|D|T|R]} to include and negate pins,
{\tt lb} to print labels }
+\macrodef{FlipFlop}{FlipFlop}{(D|T|RS|JK,{\sl label},{\sl boxspec},%
+ {\sl pinlength})}
+ {log}
+ {flip-flops,
+ {\sl boxspec}=e.g.\ ht x wid y \seesect{Logicgates:}}
\macrodef{FlipFlopJK}{FlipFlopJK}{({\sl label}, {\sl spec},{\sl boxspec})}
{log}
{{\em This macro (JK flip-flop)
@@ -903,9 +952,6 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
{\tt L}=active low out; {\tt M}=active low in;
{\tt E}=edge trigger \seesect{Logicgates:}. Optional arg 7 is the length
of pins}
-\macrodef{for\_}{for_}{({\sl start},{\sl end},{\sl increment},`{\sl actions}')}
- {gen}
- {integer for loop with index variable {\tt m4x} \seesect{Looping:}}
\macrodef{foreach\_}{foreach_}{(`{\sl variable}',{\sl actions},{\sl
value1, value2, $\ldots$})}
{gen}
@@ -913,6 +959,9 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
Repeat {\sl actions} with {\sl variable} set successively to
{\sl value1, value2, $\ldots$}, setting macro {\tt m4Lx} to 1, 2,
$\ldots$, terminating if {\sl variable} is nul}
+\macrodef{for\_}{for_}{({\sl start},{\sl end},{\sl increment},`{\sl actions}')}
+ {gen}
+ {integer for loop with index variable {\tt m4x} \seesect{Looping:}}
\macrodef{FTcap}{FTcap}{({\sl chars})}
{cct}
{Feed-through capacitor; example of a composite element derived from
@@ -923,17 +972,8 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
{cct}
{fuse symbol, type$=$
{\tt A|B|C|D|S|HB|HC|SB} or {\tt dA=D}\seesect{Twoterminal:}}
+%
\Letter{G}%
-\macrodef{g\_}{g_}{}
- {gen}
- {green color value}
-\macrodef{G\_hht}{G_hht}{}
- {log}
- {gate half-height in {\tt L\_unit}s}
-\macrodef{g\_fet}{g_fet}{(\linespec,R,P,{\sl shade spec})}
- {cct}
- {left or right, N or P graphene FET, without or with shading
- \seesect{Semiconductors:}}
\macrodef{gap}{gap}{(\linespec,{\sl fill},A)}
{cct}
{gap with (filled) dots, A=chopped arrow between dots\seesect{Twoterminal:}}
@@ -941,6 +981,16 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
{gen}
{initialize environment for general diagrams
(customizable, reads {\tt libgen.m4})}
+\macrodef{g\_fet}{g_fet}{(\linespec,R,P,{\sl shade spec})}
+ {cct}
+ {left or right, N or P graphene FET, without or with shading
+ \seesect{Semiconductors:}}
+\macrodef{g\_}{g_}{}
+ {gen}
+ {green color value}
+\macrodef{G\_hht}{G_hht}{}
+ {log}
+ {gate half-height in {\tt L\_unit}s}
\macrodef{glabel\_}{glabel_}{}
{cct}
{internal general labeller}
@@ -978,10 +1028,12 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
{Gyrator two-port wrapper for {\tt nport}, {\tt N} omits pin dots; {\tt V}
gives a vertical orientation
\seesect{Composite:}}
+%
\Letter{H}%
-\macrodef{H\_ht}{H_ht}{}
- {log}
- {hysteresis symbol dimension in {\tt L\_unit}s}
+\macrodef{hatchbox}{hatchbox}{({\sl boxspec,hashsep,hatchspec})}
+ {gen}
+ {Manhattan box with 45 degree hatching, e.g.,
+ {\tt hatchbox(outlined "blue",{},dashed outlined "green" thick 0.4)}}
\macrodef{Header}{Header}{(1|2,{\sl rows,wid,ht,box attributes})}
{log}
{Header block with 1 or 2 columns and square Pin 1:
@@ -995,17 +1047,6 @@ n|e|s|w,{\sl length})}
{log}
{General pin for {\tt Header} macro; arg 4 specifies pin direction
with respect to the current drawing direction)}
-\macrodef{hatchbox}{hatchbox}{({\sl boxspec,hashsep,hatchspec})}
- {gen}
- {Manhattan box with 45 degree hatching, e.g.,
- {\tt hatchbox(outlined "blue",,dashed outlined "green" thick 0.4)}}
-\macrodef{heater}{heater}{({\sl linespec, ndivisions|keys, wid, ht,
- boxspec}|[E[R][T]])}
- {cct}
- {Heater element\seesect{Twoterminal:}. If arg 5 contains {\tt E,}
- draws an {\tt heatere({\sl linespec, keys,} [R][T]),}
- otherwise a
- {\tt heatert({\sl linespec, nparts, wid, ht, boxspec})}}
\macrodef{heatere}{heatere}{({\sl linespec, keys,} [R][T])}
{cct}
{Heater element with curved sides\seesect{Twoterminal:}.
@@ -1016,6 +1057,13 @@ n|e|s|w,{\sl length})}
{\tt wdth={\sl expr};} (default {\tt lgth*2/5});
{\tt cycles={\sl expr};}
{\tt line={\sl attributes};} (e.g., {\tt dotted, dashed, outlined})}
+\macrodef{heater}{heater}{({\sl linespec, ndivisions|keys, wid, ht,
+ boxspec}|[E[R][T]])}
+ {cct}
+ {Heater element\seesect{Twoterminal:}. If arg 5 contains {\tt E,}
+ draws an {\tt heatere({\sl linespec, keys,} [R][T]),}
+ otherwise a
+ {\tt heatert({\sl linespec, nparts, wid, ht, boxspec})}}
\macrodef{heatert}{heatert}{({\sl linespec, nparts|keys, wid, ht, boxspec})}
{cct}
{Two-terminal rectangular heater element\seesect{Twoterminal:}.
@@ -1026,13 +1074,16 @@ n|e|s|w,{\sl length})}
{\tt box={\sl body attributes};}
(e.g., {\tt dotted, dashed, outlined, shaded}).
Args 3--5 are unused if any key is given}
-\macrodef{hex\_digit}{hex_digit}{($n$)}
- {gen}
- {hexadecimal digit for $0 \leq n < 16$}
\macrodef{hexadecimal\_}{hexadecimal_}{($n$, [$m$])}
{gen}
{hexadecimal representation of $n,$ left padded to $m$ digits if the second
argument is nonblank}
+\macrodef{hex\_digit}{hex_digit}{($n$)}
+ {gen}
+ {hexadecimal digit for $0 \leq n < 16$}
+\macrodef{H\_ht}{H_ht}{}
+ {log}
+ {hysteresis symbol dimension in {\tt L\_unit}s}
\macrodef{hlth}{hlth}{}
{gen}
{current line half thickness in drawing units}
@@ -1042,6 +1093,7 @@ n|e|s|w,{\sl length})}
\macrodef{ht\_}{ht_}{}
{gen}
{height relative to current direction}
+%
\Letter{I}%
\macrodef{ifdpic}{ifdpic}{({\sl if true},{\sl if false})}
{gen}
@@ -1086,9 +1138,6 @@ n|e|s|w,{\sl length})}
{cct}
{left or right IGBT, L=alternate gate type, D=parallel diode,
dD=dotted connections }
-\macrodef{in\_\_}{in__}{}
- {gen}
- {absolute inches}
\macrodef{inductor}{inductor}{(\linespec, W|L, {\sl cycles}, M[n]|P[n]|K[n],
{\sl loop wid})}
{cct}
@@ -1099,12 +1148,12 @@ n|e|s|w,{\sl length})}
{\sl M4Core1, M4Core2,} $\ldots$;
arg5: loop width (default L,W: {\tt dimen\_}/5; other: {\tt dimen\_}/8)
\seesect{Twoterminal:}}
+\macrodef{in\_\_}{in__}{}
+ {gen}
+ {absolute inches}
\macrodef{inner\_prod}{inner_prod}{({\sl linear obj},{\sl linear obj})}
{gen}
{inner product of (x,y) dimensions of two linear objects}
-\macrodef{Int\_}{Int_}{}
- {gen}
- {corrected (old) gpic $int()$ function}
\macrodef{integrator}{integrator}{(\linespec,{\sl size})}
{cct}
{integrating amplifier\seesect{Twoterminal:}}
@@ -1115,23 +1164,27 @@ n|e|s|w,{\sl length})}
\macrodef{Intersect\_}{Intersect_}{({\sl Name1},{\sl Name2})}
{gen}
{intersection of two named lines}
+\macrodef{Int\_}{Int_}{}
+ {gen}
+ {corrected (old) gpic $int()$ function}
\macrodef{IOdefs}{IOdefs}{(\linespec,{\sl label},[P|N]*,L|R) }
{log}
{Define locations {\sl label}{\tt 1}, $\ldots$ {\sl label}{\tt n}
along the line; {\tt P}= label only;
{\tt N}=with {\tt NOT\_circle};
{\tt R}=circle to right of current direction }
+%
\Letter{J}%
-\macrodef{j\_fet}{j_fet}{(\linespec,L|R,P,E)}
- {cct}
- {left or right, N or P JFET, without or with envelope
- \seesect{Semiconductors:}}
\macrodef{jack}{jack}{(U|D|L|R|{\sl degrees},{\sl chars})}
{cct}
{arg1: drawing direction; string arg2: {\tt R}=right orientation,
one or more {\tt L[M][B]} for L and auxiliary contacts with make or break
points; {\tt S[M][B]} for S and auxiliary contacts
\seesect{Composite:}}
+\macrodef{j\_fet}{j_fet}{(\linespec,L|R,P,E)}
+ {cct}
+ {left or right, N or P JFET, without or with envelope
+ \seesect{Semiconductors:}}
\macrodef{jumper}{jumper}{({\sl linespec, chars}|{\sl keys})}
{cct}
{ Two-terminal solder jumper with named body parts.
@@ -1147,19 +1200,22 @@ n|e|s|w,{\sl length})}
{\tt wdth=}{\sl expr};
{\tt name=}{\sl chars} (the body name)%
\seesect{Twoterminal:}}
+%
\Letter{K}%
\macrodef{KelvinR}{KelvinR}{({\sl cycles},[R],{\sl cycle wid})}
{cct}
{IEEE resistor in a {\tt [ ]} block with Kelvin taps {\sl T1} and {\sl T2}
\seesect{Composite:}}
+%
\Letter{L}%
-\macrodef{L\_unit}{L_unit}{}
- {log}
- {logic-element grid size}
\macrodef{lamp}{lamp}{(\linespec, [R][T])}
{cct}
{Two-terminal incandescent lamp. {\tt T} truncates leads to the body width.
\seesect{Twoterminal:}}
+\macrodef{langle}{langle}{({\sl Start, End})}
+ {gen}
+ {Angle in radians from horizontal of the line from {\sl Start}
+ to {\sl End}.}
\macrodef{larrow}{larrow}{({\sl label},{\tt ->|<-},{\sl dist})}
{cct}
{arrow {\sl dist} to left of last-drawn 2-terminal element
@@ -1177,13 +1233,13 @@ n|e|s|w,{\sl length})}
\macrodef{left\_}{left_}{}
{gen}
{left with respect to current direction \seesect{Placing:}}
-\macrodef{length3D}{length3D}{(x,y,z)}
- {3D}
- {Euclidean length of triple x,y,z}
\macrodef{LEintersect}{LEintersect}{({\sl line name, Centre, ellipse wid,
ellipse ht}, [R])}
{gen}
{ First (second if arg5 is R) intersection of a line with an ellipse}
+\macrodef{length3D}{length3D}{(x,y,z)}
+ {3D}
+ {Euclidean length of triple x,y,z}
\macrodef{LEtangent}{LEtangent}{({\sl Pos1, Centre, ellips wid, ellipse ht}
[R])}
{gen}
@@ -1218,13 +1274,13 @@ n|e|s|w,{\sl length})}
{gen}
{the angle of a line or move from {\tt .start} to {\tt .end} of a linear
object (in degrees if arg2={\tt d})}
+\macrodef{linethick\_}{linethick_}{({\sl number})}
+ {gen}
+ {set line thickness in points}
\macrodef{lin\_leng}{lin_leng}{({\sl line-reference})}
{gen}
{length of a line, equivalent to {\sl line-reference}{\tt .len}
with dpic}
-\macrodef{linethick\_}{linethick_}{({\sl number})}
- {gen}
- {set line thickness in points}
\macrodef{ljust\_}{ljust_}{}
{gen}
{ljust with respect to current direction}
@@ -1243,44 +1299,48 @@ n|e|s|w,{\sl length})}
\macrodef{loc\_}{loc_}{({\sl x}, {\sl y})}
{gen}
{location adjusted for current direction}
-\macrodef{log\_init}{log_init}{}
- {log}
- {initialize environment for logic diagrams
- (customizable, reads {\tt liblog.m4})}
\macrodef{log10E\_}{log10E_}{}
{gen}
{constant $\log_{10}(e)$}
\macrodef{loge}{loge}{}
{gen}
{logarithm, base $e$}
+\macrodef{log\_init}{log_init}{}
+ {log}
+ {initialize environment for logic diagrams
+ (customizable, reads {\tt liblog.m4})}
\macrodef{Loopover\_}{Loopover_}{(`{\sl variable}',{\sl actions},{\sl
value1, value2, $\ldots$})}
{gen}
{Repeat {\sl actions} with {\sl variable} set successively to
{\sl value1, value2, $\ldots$}, setting macro {\tt m4Lx} to 1, 2,
$\ldots$, terminating if {\sl variable} is nul}
-\macrodef{lp\_xy}{lp_xy}{}
- {log}
- {coordinates used by {\tt lg\_pin}}
\macrodef{lpop}{lpop}{({\sl xcoord}, {\sl ycoord}, {\sl radius},
{\sl fill},
{\sl zero ht})} {gen}
{for lollipop graphs: filled circle with stem to
(xcoord,zeroht)}
+\macrodef{lp\_xy}{lp_xy}{}
+ {log}
+ {coordinates used by {\tt lg\_pin}}
\macrodef{lswitch}{lswitch}{( \linespec, L|R, {\sl chars} )}
{cct}
{knife switch R=right orientation (default L=left);
{\sl chars}=[O{\tt|}C][D][K][A] O=opening arrow; C=closing arrow;
D=dots; K=closed switch; A=blade arrowhead \seesect{Twoterminal:}}
+\macrodef{lthick}{lthick}{}
+ {gen}
+ {current line thickness in drawing units}
\macrodef{lt\_}{lt_}{}
{gen}
{left with respect to current direction}
\macrodef{LT\_symbol}{LT_symbol}{(U|D|L|R|{\sl degrees})}
{log}
{logic-gate triangle symbol}
-\macrodef{lthick}{lthick}{}
- {gen}
- {current line thickness in drawing units}
+\macrodef{L\_unit}{L_unit}{}
+ {log}
+ {logic-element grid size}
+%
\Letter{M}%
\macrodef{m4\_arrow}{m4_arrow}{(\linespec,{\sl ht},{\sl wid})}
{gen}
@@ -1360,9 +1420,6 @@ n|e|s|w,{\sl length})}
\macrodef{Mux\_ht}{Mux_ht}{}
{cct}
{Mux height parameter in {\tt L\_unit}s}
-\macrodef{Mux\_wid}{Mux_wid}{}
- {cct}
- {Mux width parameter in {\tt L\_unit}s}
\macrodef{Mux}{Mux}{({\sl n},{\sl label},
{\tt [L][B|H|X][N[{\sl n}]|S[{\sl n}]][[N]OE], {\sl wid},{\sl ht}})}
{log}
@@ -1373,28 +1430,23 @@ n|e|s|w,{\sl length})}
at the top (i.e., to the left of the drawing direction), {\tt
S[{\sl n}]} puts the Sel inputs at the bottom (default) {\tt OE}
({\tt N=}negated) {\tt OE} pin \seesect{Logicgates:}}
+\macrodef{Mux\_wid}{Mux_wid}{}
+ {cct}
+ {Mux width parameter in {\tt L\_unit}s}
\macrodef{Mx\_pins}{Mx_pins}{}
{log}
{max number of gate inputs without wings}
+%
\Letter{N}%
-\macrodef{n\_}{n_}{}
- {gen}
- {.n with respect to current direction}
-\macrodef{N\_diam}{N_diam}{}
- {log}
- {diameter of `not' circles in {\tt L\_unit}s}
-\macrodef{N\_rad}{N_rad}{}
- {log}
- {radius of `not' circles in {\tt L\_unit}s}
\macrodef{NAND\_gate}{NAND_gate}{({\sl n},N)}
{log}
{`nand' gate, 2 or {\sl n\/} inputs; N=negated input.
Otherwise, arg1 can be a sequence of letters {\tt P|N} to define
normal or negated inputs.
\seesect{Logicgates:}}
-\macrodef{ne\_}{ne_}{}
- {gen}
- {.ne with respect to current direction}
+\macrodef{N\_diam}{N_diam}{}
+ {log}
+ {diameter of `not' circles in {\tt L\_unit}s}
\macrodef{NeedDpicTools}{NeedDpicTools}{}
{gen}
{executes {\tt copy "HOMELIB\_/dpictools.pic"} if the file has
@@ -1402,15 +1454,21 @@ n|e|s|w,{\sl length})}
\macrodef{neg\_}{neg_}{}
{gen}
{unary negation}
+\macrodef{ne\_}{ne_}{}
+ {gen}
+ {.ne with respect to current direction}
+\macrodef{n\_}{n_}{}
+ {gen}
+ {.n with respect to current direction}
+\macrodef{norator}{norator}{(\linespec,{\sl width},{\sl ht})}
+ {cct}
+ { norator two-terminal element \seesect{Twoterminal:}}
\macrodef{NOR\_gate}{NOR_gate}{({\sl n},N)}
{log}
{`nor' gate, 2 or {\sl n\/} inputs; N=negated input.
Otherwise, arg1 can be a sequence of letters {\tt P|N} to define
normal or negated inputs.
\seesect{Logicgates:}}
-\macrodef{norator}{norator}{(\linespec,{\sl width},{\sl ht})}
- {cct}
- { norator two-terminal element \seesect{Twoterminal:}}
\macrodef{NOT\_circle}{NOT_circle}{}
{log}
{`not' circle}
@@ -1441,6 +1499,9 @@ nw,nn,ne,ns,space ratio,pin lgth,style, other commands})}
(default 2), and arg 7 is the pin length. Set arg 8 to N to omit
the dots on the port pins. Arguments 1 and 9 allow customizations
\seesect{Composite:}}
+\macrodef{N\_rad}{N_rad}{}
+ {log}
+ {radius of `not' circles in {\tt L\_unit}s}
\macrodef{nterm}{nterm}{({\sl box spec{\tt ;}other commands,
nw,nn,ne,ns,pin lgth,style, other commands})}
{cct}
@@ -1463,6 +1524,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})}
Otherwise, arg1 can be a sequence of letters {\tt P|N} to define
normal or negated inputs.
\seesect{Logicgates:}}
+%
\Letter{O}%
\macrodef{opamp}{opamp}{(\linespec,{\sl label},{\sl
label},{\sl size},{\sl
@@ -1495,9 +1557,9 @@ label},{\sl size},{\sl
\macrodef{OR\_rad}{OR_rad}{}
{log}
{radius of OR input face in {\tt L\_unit}s}
+%
\Letter{P}%
-\macrodef{parallel\_}{parallel_}{(\char96{\sl
-elementspec}\char39,%
+\macrodef{parallel\_}{parallel_}{(\char96{\sl elementspec}\char39,%
\char96{\sl elementspec}\char39 $\ldots$)}
{cct}
{ Parallel combination of two-terminal elements in a {\tt [
@@ -1512,20 +1574,6 @@ elementspec}\char39,%
element Sep={\sl val}; applies only to that branch. An element may
have normal arguments but should not change the drawing direction.
\seesect{Seriesandparallel:}}
-%\macrodef{par\_}{par_}{({\sl element},{\sl element},{\sl separation})}
-% {cct} % {two same-direction, same-length elements in parallel}
-\macrodef{proximity}{proximity}{(\sl linespec)}
- {cct}
- {proximity detector (= {\tt consource(,P)})}
-\macrodef{pc\_\_}{pc__}{}
- {gen}
- {absolute points}
-\macrodef{pvcell}{pvcell}{({\sl linespec, width, height})}
- {cct}
- {PV cell}
-\macrodef{px\_\_}{px__}{}
- {gen}
- {absolute SVG screen pixels}
\macrodef{pconnex}{pconnex}{(R|L|U|D|{\sl degrees},{\sl chars})}
{cct}
{power connectors, arg 1: drawing direction; {\sl chars:}
@@ -1533,6 +1581,19 @@ elementspec}\char39,%
3 prong, B=box, C=circle, {\tt P}= PC connector, {\tt D}= 2-pin
connector, {\tt G|GC}= GB 3-pin, {\tt J}= 110V 2-pin
\seesect{Composite:}}
+\macrodef{pc\_\_}{pc__}{}
+ {gen}
+ {absolute points}
+\macrodef{perpto}{perpto}{({\sl Pos1, Line, Point})}
+ {gen}
+ {{\sl Point} is the label for the point on {\sl Line} of the
+ perpendicular
+ from {\sl Point} to {\sl Line}.}
+\macrodef{PerpTo}{PerpTo}{({\sl Pos1, Pos2, Pos3})}
+ {gen}
+ {The point between Pos2 and Pos3 of intersection of the perpendicular
+ to Pos1, i.e., the perpendicular projection of Pos1 onto the line
+ from Pos2 to Pos3.}
\macrodef{pi\_}{pi_}{}
{gen}
{$\pi$}
@@ -1546,26 +1607,12 @@ elementspec}\char39,%
\macrodef{point\_}{point_}{({\sl angle})}
{gen}
{(radians) set direction cosines}
-\macrodef{perpto}{perpto}{({\sl Pos1, Line, Point})}
- {gen}
- {{\sl Point} is the label for the point on {\sl Line} of the
- perpendicular
- from {\sl Point} to {\sl Line}.}
-\macrodef{PerpTo}{PerpTo}{({\sl Pos1, Pos2, Pos3})}
- {gen}
- {The point between Pos2 and Pos3 of intersection of the perpendicular
- to Pos1, i.e., the perpendicular projection of Pos1 onto the line
- from Pos2 to Pos3.}
\macrodef{Point\_}{Point_}{({\sl integer})}
{gen}
{sets direction cosines in degrees \seesect{Placing:}}
\macrodef{polar\_}{polar_}{({\sl x},{\sl y})}
{gen}
{rectangular-to polar conversion}
-\macrodef{langle}{langle}{({\sl Start, End})}
- {gen}
- {Angle in radians from horizontal of the line from {\sl Start}
- to {\sl End}.}
\macrodef{potentiometer}{potentiometer}{(\linespec,%
{\sl cycles},{\sl fractional pos},{\sl length},$\cdots$)} {cct}
{resistor with taps T1, T2, $\ldots$
@@ -1580,17 +1627,20 @@ elementspec}\char39,%
{3D} {3D to 2D projection onto the plane perpendicular to the view
vector with
angles defined by {\tt setview({\sl azim, elev})}}
+\macrodef{proximity}{proximity}{(\sl linespec)}
+ {cct}
+ {proximity detector (= {\tt consource(,P)})}
\macrodef{psset\_}{psset_}{({\sl PSTricks settings})}
{gen}
{set PSTricks parameters}
-\macrodef{pt\_\_}{pt__}{}
- {gen}
- {\TeX\ point-size factor, in scaled inches, ({\tt *scale/72.27})}
\macrodef{PtoL}{PtoL}{({\sl position}, U|D|L|R|{\sl degrees}, {\sl length}) }
{gen}
{Evaluates to {\tt from {\sl position} to
{\sl position} + Rect\_({\sl length, angle}) }
from the polar-coordinate data in the arguments }
+\macrodef{pt\_\_}{pt__}{}
+ {gen}
+ {\TeX\ point-size factor, in scaled inches, ({\tt *scale/72.27})}
\macrodef{ptrans}{ptrans}{(\linespec, [R|L])}
{cct}
{pass transistor; {\tt L=} left orientation
@@ -1613,10 +1663,14 @@ elementspec}\char39,%
which must contain no semicolons and the default values contain no colons.
Macro {\tt pushkey\_} is applied to each of the terms in order.
\seesect{Macroarguments:}}
-\Letter{R}%
-\macrodef{r\_}{r_}{}
+\macrodef{pvcell}{pvcell}{({\sl linespec, width, height})}
+ {cct}
+ {PV cell}
+\macrodef{px\_\_}{px__}{}
{gen}
- {red color value}
+ {absolute SVG screen pixels}
+%
+\Letter{R}%
\macrodef{rarrow}{rarrow}{({\sl label,{\tt ->|<-},{\sl dist}})}
{cct}
{arrow {\sl dist} to right of last-drawn 2-terminal element
@@ -1633,14 +1687,6 @@ elementspec}\char39,%
{Enclosed reed two-terminal contact;
{\tt R}=right orientation; {\tt C}=closed contact; e.g., {\tt
reed(,,dimen\_/5,shaded "lightgreen"} \seesect{Composite:}}
-\macrodef{relay}{relay}{({\sl number of poles, chars})}
- {cct}
- {relay: n poles (default 1), {\sl chars:} {\tt O}=normally open,
- {\tt C}=normally closed, {\tt P}=three position, default double
- throw, {\tt L}=drawn left (default), {\tt R}=drawn right, {\tt
- Th}=thermal. Argument 3={\tt [L|R]} is deprecated but works for
- backward compatibility
- \seesect{Composite:}}
\macrodef{relaycoil}{relaycoil}{({\sl chars, wid, ht,} R|L|U|D|{\sl
degrees})}
{cct}
@@ -1654,6 +1700,14 @@ degrees})}
PO}=polarized; {\tt RM}=remanent; {\tt RH}=remanent; {\tt TH}=thermal;
{\tt EL}=electronic
\seesect{Composite:}}
+\macrodef{relay}{relay}{({\sl number of poles, chars})}
+ {cct}
+ {relay: n poles (default 1), {\sl chars:} {\tt O}=normally open,
+ {\tt C}=normally closed, {\tt P}=three position, default double
+ throw, {\tt L}=drawn left (default), {\tt R}=drawn right, {\tt
+ Th}=thermal. Argument 3={\tt [L|R]} is deprecated but works for
+ backward compatibility
+ \seesect{Composite:}}
\macrodef{resetdir\_}{resetdir_)}{}
{gen}
{resets direction set by {\tt setdir\_}}
@@ -1699,21 +1753,14 @@ degrees})}
rgbstring(0.1,0.2,0.7) shaded rgbstring(0.75,0.5,0.25)}. For those
postprocessors that allow it, there can be one argument which is the
name of a defined color}
-\macrodef{right\_}{right_}{}
- {gen}
- {set current direction right \seesect{Placing:}}
\macrodef{RightAngle}{RightAngle}{({\sl Pos1, Pos2, Pos3, line len,
attributes})} {gen}
{Draw a right-angle symbol at {\sl Pos2}, of size
given by arg4. Arg5 =
line attributes, e.g., {\tt outlined "gray"}}
-\macrodef{r\_text}{r_text}{({\sl degrees},{\sl text},at {\sl position})}
+\macrodef{right\_}{right_}{}
{gen}
- {Rotate text by arg1 degrees (provides a single command for
- PSTricks, PGF, or SVG only) placed at position in arg3.
- The first argument is a decimal constant (not an expression) and
- the text is a simple string without quotes.
- \seesect{Interaction:}, \seesect{Pstricks:}}
+ {set current direction right \seesect{Placing:}}
\macrodef{rjust\_}{rjust_}{}
{gen}
{right justify with respect to current direction}
@@ -1735,12 +1782,6 @@ degrees})}
{3D} {rotates x,y,z about y axis}
\macrodef{rot3Dz}{rot3Dz}{({\sl radians,x,y,z})}
{3D} {rotates x,y,z about z axis}
-\macrodef{Rot\_}{Rot_}{({\sl position, degrees})}
- {gen}
- {rotate position by degrees}
-\macrodef{rot\_}{rot_}{({\sl x, y, angle})}
- {gen}
- {rotate {\sl x,y} by theta radians}
\macrodef{rotbox}{rotbox}{({\sl wid,ht,type},[r|t={\sl val}])}
{gen}
{box oriented in current direction in {\tt [ ]} block;
@@ -1754,6 +1795,12 @@ degrees})}
{ellipse oriented in current direction in {\tt [ ]} block;
e.g. {\tt Point\_(45); rotellipse(,{},dotted fill\_(0.9)).} Defined
internal locations: N, S, E, W.}
+\macrodef{Rot\_}{Rot_}{({\sl position, degrees})}
+ {gen}
+ {rotate position by degrees}
+\macrodef{rot\_}{rot_}{({\sl x, y, angle})}
+ {gen}
+ {rotate {\sl x,y} by theta radians}
\macrodef{round}{round}{(at {\sl location,line thickness,attributes})}
{gen}
{filled circle for rounded corners; attributes={\tt colored
@@ -1766,6 +1813,9 @@ degrees})}
\macrodef{rpos\_}{rpos_}{({\sl position})}
{gen}
{Here + {\sl position}}
+\macrodef{r\_}{r_}{}
+ {gen}
+ {red color value}
\macrodef{rrot\_}{rrot_}{({\sl x, y, angle})}
{gen}
{\tt Here + vrot\_({\sl x, y, cos(angle), sin(angle))}}
@@ -1785,63 +1835,49 @@ degrees})}
\macrodef{rsvec\_}{rsvec_}{({\sl position})}
{gen}
{Here + {\sl position}}
-\macrodef{rt\_}{rt_}{}
+\macrodef{r\_text}{r_text}{({\sl degrees},{\sl text},at {\sl position})}
{gen}
- {right with respect to current direction}
+ {Rotate text by arg1 degrees (provides a single command for
+ PSTricks, PGF, or SVG only) placed at position in arg3.
+ The first argument is a decimal constant (not an expression) and
+ the text is a simple string without quotes.
+ \seesect{Interaction:}, \seesect{Pstricks:}}
\macrodef{rtod\_\_}{rtod__}{}
{gen}
{constant, degrees/radian}
\macrodef{rtod\_}{rtod_}{}
{gen}
{constant, degrees/radian}
+\macrodef{rt\_}{rt_}{}
+ {gen}
+ {right with respect to current direction}
\macrodef{rvec\_}{rvec_}{({\sl x},{\sl y})}
{gen}
{location relative to current direction}
+%
\Letter{S}%
-\macrodef{s\_}{s_}{}
- {gen}
- {.s with respect to current direction}
-\macrodef{s\_box}{s_box}{({\sl text},{\sl expr1},$\cdots$)}
- {gen}
- {generate dimensioned text string using {\tt\char92{}boxdims} from
- {\tt boxdims.sty}. Two or more args are passed to {\tt sprintf()}
- (default 90) degrees \seesect{Interaction:}}
-\macrodef{s\_dp}{s_dp}{({\sl name},{\sl default})}
- {gen}
- {depth of the most recent (or named) {\tt s\_box}
- \seesect{Interaction:}}
-\macrodef{s\_ht}{s_ht}{({\sl name},{\sl default})}
- {gen}
- {height of the most recent (or named) {\tt s\_box}
- \seesect{Interaction:}}
-\macrodef{s\_init}{s_init}{({\sl name})}
- {gen}
- {initialize {\tt s\_box} string label to {\sl name} which should
- be unique
- \seesect{Interaction:}}
-\macrodef{s\_name}{s_name}{}
- {gen}
- {the value of the last {\tt s\_init} argument
- \seesect{Interaction:}}
-\macrodef{s\_wd}{s_wd}{({\sl name},{\sl default})}
- {gen}
- {width of the most recent (or named) {\tt s\_box}
- \seesect{Interaction:}}
\macrodef{sarrow}{sarrow}{(\linespec,{\sl keys})}
{gen}
{Single-segment, single-headed special arrows.
The {\sl keys} are
{\tt type=}{\tt O[pen]} (default)
- | {\tt D[iamond]} | {\tt C[rowfoot]} | {\tt P[lain]}{\tt ;}
+ | {\tt D[iamond]} | {\tt C[rowfoot]} | {\tt P[lain]}
+ | {\tt R[ight]} | {\tt L[eft]} {\tt ;}
{\tt wdth=}{\tt expression}{\tt ;} (default {\tt arrowwid})
{\tt lgth=}{\tt expression}{\tt ;} (default {\tt arrowht})
{\tt shaft=}{\sl shaft attributes} (e.g., {\tt dashed}){\tt ;}
{\tt head=}{\sl head attributes} (e.g., {\tt shaded}){\tt ;}
+ {\tt name=}{\sl Name}{\tt ;} (default {\sl Sarrow\_})
\seesect{Macroarguments:}}
\macrodef{savem4dir}{savem4dir}{([`{\sl stack name}'])}
{gen}
{Stack m4 direction parameters in the named stack
(default {\tt `savm4dir\_'})}
+\macrodef{s\_box}{s_box}{({\sl text},{\sl expr1},$\cdots$)}
+ {gen}
+ {generate dimensioned text string using {\tt\char92{}boxdims} from
+ {\tt boxdims.sty}. Two or more args are passed to {\tt sprintf()}
+ (default 90) degrees \seesect{Interaction:}}
\macrodef{sbs}{sbs}{({\sl linespec, chars, label})}
{cct}
{Wrapper to place an SBS thyristor as a two-terminal element with
@@ -1860,9 +1896,10 @@ degrees})}
{Wrapper to place an SCS thyristor as a two-terminal element with
{\tt [ ]} block label given by the third argument
\seesect{Semiconductors:}}
-\macrodef{se\_}{se_}{}
+\macrodef{s\_dp}{s_dp}{({\sl name},{\sl default})}
{gen}
- {.se with respect to current direction}
+ {depth of the most recent (or named) {\tt s\_box}
+ \seesect{Interaction:}}
\macrodef{series\_}{series_}{({\sl elementspec}, {\sl elementspec},
$\ldots$)}
{cct}
@@ -1873,6 +1910,9 @@ $\ldots$)}
[rlabel($\ldots$);] [b\_current($\ldots$);]}. Internal points {\tt
Start}, {\tt End}, and {\tt C} are defined
\seesect{Seriesandparallel:} }
+\macrodef{se\_}{se_}{}
+ {gen}
+ {.se with respect to current direction}
\macrodef{setdir\_}{setdir_}{(R|L|U|D|{\sl degrees}, {\sl default}
U|D|R|L|{\sl degrees})}
{gen}
@@ -1881,11 +1921,6 @@ $\ldots$)}
resetdir\_}). The directions may be spelled out, i.e., Right,
Left, $\ldots$
\seesect{Seriesandparallel:}}
-\macrodef{setrgb}{setrgb}{({\sl red value, green value, blue value},[{\sl
- name}])}
- {gen}
- {define colour for lines and text, optionally named (default
- {\tt lcspec}); \seesect{Semiconductors:}}
\macrodef{setkey\_}{setkey_}{({\sl string, key, default,}[N])}
{gen}
{Key-value definition, like {\tt pushkey\_()} but the resulting
@@ -1896,14 +1931,14 @@ $\ldots$)}
{Multiple key-value definition using {\tt define()} rather than
{\tt pushdef().} See macro {\tt pushkeys\_}.
\seesect{Macroarguments:}}
+\macrodef{setrgb}{setrgb}{({\sl red value, green value, blue value},[{\sl
+ name}])}
+ {gen}
+ {define colour for lines and text, optionally named (default
+ {\tt lcspec}); \seesect{Semiconductors:}}
\macrodef{setview}{setview}{({\sl azimuth degrees},{\sl elevation
degrees})}
{3D} {set projection viewpoint}
-\macrodef{sfg\_init}{sfg_init}{({\sl default line len, node rad,
-arrowhd len,
- arrowhd wid}), (reads {\tt libcct.m4})} {cct}
- {initialization of signal
- flow graph macros}
\macrodef{sfgabove}{sfgabove}{}
{cct}
{like above but with extra space}
@@ -1916,6 +1951,11 @@ justification},cw|ccw,
\macrodef{sfgbelow}{sfgbelow}{}
{cct}
{like below but with extra space}
+\macrodef{sfg\_init}{sfg_init}{({\sl default line len, node rad,
+arrowhd len,
+ arrowhd wid}), (reads {\tt libcct.m4})} {cct}
+ {initialization of signal
+ flow graph macros}
\macrodef{sfgline}{sfgline}{(\linespec,{\sl text},{\sl text
justification})}
{cct}
@@ -1932,11 +1972,6 @@ justification})}
{cct}
{self-loop drawn at angle {\sl angle} from a node,
with text label and a size-adjustment parameter }
-\macrodef{shade}{shade}{({\sl gray value},{\sl closed line specs})}
- {gen}
- {Fill arbitrary closed curve. Note: when producing pdf via pdflatex, line
- thickness changes within this macro must be made via the {\tt linethick}
- environment variable rather than by the {\tt thickness} line attribute}
\macrodef{shadebox}{shadebox}{(box {\sl attributes, shade width})}
{gen}
{Box with edge shading. Arg2 is in points. See also {\tt shaded} }
@@ -1950,6 +1985,11 @@ justification})}
the form 0, r0,g0,b0, {\sl frac1},r1,g1,b1, {\sl frac2},r2,g2,b2,
\ldots 1,rn,gn,bn with $0 < \hbox{\sl frac1} < \hbox{\sl frac2}
\ldots 1$ }
+\macrodef{shade}{shade}{({\sl gray value},{\sl closed line specs})}
+ {gen}
+ {Fill arbitrary closed curve. Note: when producing pdf via pdflatex, line
+ thickness changes within this macro must be made via the {\tt linethick}
+ environment variable rather than by the {\tt thickness} line attribute}
\macrodef{shadowed}{shadowed}{(box|circle|ellipse|line,
{\sl position spec, keys})}
{gen}
@@ -1969,6 +2009,10 @@ justification})}
(default) to enclose the element body; L for the left side with
respect to drawing direction, R for right. Internal points {\tt
.Start, .End,} and {\tt .C} are defined}
+\macrodef{s\_ht}{s_ht}{({\sl name},{\sl default})}
+ {gen}
+ {height of the most recent (or named) {\tt s\_box}
+ \seesect{Interaction:}}
\macrodef{SIdefaults}{SIdefaults}{}
{gen}
{Sets {\tt scale = 25.4} for drawing units in mm, and sets
@@ -1979,15 +2023,20 @@ justification})}
\macrodef{sign\_}{sign_}{({\sl number})}
{gen}
{sign function}
-\macrodef{Sin}{Sin}{({\sl integer})}
- {gen}
- {sine function, {\sl integer\/} degrees}
\macrodef{sinc}{sinc}{({\sl number})}
{gen}
{the $\hbox{sinc}(x)$ function}
\macrodef{sind}{sind}{({\sl arg})}
{gen}
{sine of an expression in degrees}
+\macrodef{s\_init}{s_init}{({\sl name})}
+ {gen}
+ {initialize {\tt s\_box} string label to {\sl name} which should
+ be unique
+ \seesect{Interaction:}}
+\macrodef{Sin}{Sin}{({\sl integer})}
+ {gen}
+ {sine function, {\sl integer\/} degrees}
\macrodef{sinusoid}{sinusoid}{({\sl amplitude, frequency, phase, tmin,
tmax, linetype})}
{gen}
@@ -2234,6 +2283,36 @@ justification})}
{\tt size=}{\sl expr} (default {\tt ht dimen\_/3}).
\seesect{SingleLine:}}
%
+\macrodef{sl\_transformer3}{sl_transformer3}{({\sl linespec, keys,
+ breaker keys, symbol keys})}
+ {SLD}
+ {Composite (block) SLD element: argument 1 is a \linespec\ that can be used
+ to set the direction and distance between primary terminals but not
+ position.
+
+ Argument 2 contains semicolon (;)-separated key-value body attributes:
+ {\tt name={\sl{}Name}} (default {\sl Body});
+ {\tt type=S|C} (default {\tt S});
+ {\tt scale={\sl expr}} (body size factor, default 1.0);
+ {\tt direct=L|R} (default {\tt L}) direction of the tertiary
+ circle and terminal relative to the drawing direction;
+ {\tt body={\sl circle attributes}}.
+
+ Argument 3 is colon (:)-separated sequence of up to three breaker
+ attribute specifications for the input, output, and teriary breaker
+ in order. A null or blank means no breaker, {\tt tt\_breaker}
+ specifications otherwise. Default breaker names are {\sl BrI}
+ and {\sl BrO} as for
+ {\tt sl\_transformer,} and {\sl Br} for the third breaker.
+
+ Argument 4 is colon (:)-separated sequence of up to three symbol
+ specifications for the input, output, and teriary circle
+ in order. A null or blank means no symbol;
+ {\tt Y} for a Y-symbol;
+ {\tt Delta} for a $\Delta$ symbol;
+ otherwise, other customization commands expanded in a {\tt \lbr\rbr} pair.
+ \seesect{SingleLine:}}
+%
\macrodef{sl\_transformer}{sl_transformer}{({\sl linespec, keys,
input breaker keys, output breaker keys,
input circle inner object, output circle inner object})}
@@ -2273,35 +2352,6 @@ justification})}
otherwise, other customization commands expanded in a {\tt \lbr\rbr} pair.
\seesect{SingleLine:}}
%
-\macrodef{sl\_transformer3}{sl_transformer3}{({\sl linespec, keys,
- breaker keys, symbol keys})}
- {SLD}
- {Composite (block) SLD element: argument 1 is a \linespec\ that can be used
- to set the direction and distance between primary terminals but not
- position.
-
- Argument 2 contains semicolon (;)-separated key-value body attributes:
- {\tt name={\sl{}Name}} (default {\sl Body});
- {\tt type=S|C} (default {\tt S});
- {\tt scale={\sl expr}} (body size factor, default 1.0);
- {\tt direct=L|R} (default {\tt L}) direction of the tertiary
- circle and terminal relative to the drawing direction;
- {\tt body={\sl circle attributes}}.
-
- Argument 3 is colon (:)-separated sequence of up to three breaker
- attribute specifications for the input, output, and teriary breaker
- in order. A null or blank means no breaker, {\tt tt\_breaker}
- specifications otherwise. Default breaker names are {\sl BrI}
- and {\sl BrO} as for
- {\tt sl\_transformer,} and {\sl Br} for the third breaker.
-
- Argument 4 is colon (:)-separated sequence of up to three symbol
- specifications for the input, output, and teriary circle
- in order. A null or blank means no symbol;
- {\tt Y} for a Y-symbol;
- {\tt Delta} for a $\Delta$ symbol;
- otherwise, other customization commands expanded in a {\tt \lbr\rbr} pair.
- \seesect{SingleLine:}}
\macrodef{sl\_ttbox}{sl_ttbox}{({\sl linespec, keys, input breaker keys,
output breaker keys})}
{SLD}
@@ -2326,34 +2376,38 @@ justification})}
except that the default breaker name is {\sl BrO}.
\label{sl_ttbox}%
\seesect{SingleLine:}}
+\macrodef{s\_name}{s_name}{}
+ {gen}
+ {the value of the last {\tt s\_init} argument
+ \seesect{Interaction:}}
+\macrodef{sourcerad\_}{sourcerad_}{}
+ {cct}
+ {default source radius}
\macrodef{source}{source}{(\linespec,
- V|v|I|i|AC|B|F|G|H|J|Q|L|N|P|S[C[r]]|E[r]]|T|X|U|{\sl other}, {\sl
+ V|v|I|i|ii|AC|B|F|G|H|J|Q|L|N|P|S[C[r]]|E[r]]|T|X|U|{\sl other}, {\sl
diameter},R)}
{cct}
{source, blank or:
- V = voltage source; v = alternate voltage source; I =
- current source; i = alternate current source; AC =
- AC source; B = bulb; F = fluorescent; G = generator;
- H = step function; L = lamp; N = neon; P = pulse;
- Q = charge; R = ramp; r = right orientation; S =
- sinusoid; SC = quarter arc; SE = arc; T = triangle;
- U = square-wave; X = interior X; other = custom
- interior label or waveform; arg 4: R = reversed
- polarity; arg 5 modifies the circle with e.g.,
- color or fill
+ V = voltage source; v = alternate voltage source;
+ I = current source; i = alternate current source;
+ ii = double arrow current source; AC = AC source;
+ B = bulb; F = fluorescent; G = generator; H = step
+ function; L = lamp; N = neon; P = pulse; Q = charge;
+ R = ramp; r = right orientation; S = sinusoid;
+ SC = quarter arc; SE = arc; T = triangle; U =
+ square-wave; X = interior X; other = custom interior
+ label or waveform; arg 4: R = reversed polarity;
+ arg 5 modifies the circle with e.g., color or fill
\seesect{Twoterminal:}}
-\macrodef{sourcerad\_}{sourcerad_}{}
- {cct}
- {default source radius}
-\macrodef{sp\_}{sp_}{}
- {gen}
- {evaluates to medium space for gpic strings}
\macrodef{speaker}{speaker}{( U|D|L|R|{\sl degrees},{\sl size},H)}
{cct}
{speaker, {\sl In1} to {\sl In7} defined; {\tt H}=horn
\seesect{Composite:}}
\macrodef{sprod3D}{sprod3D}{(a,x,y,z)}
{3D} {scalar product of triple x,y,z by a}
+\macrodef{sp\_}{sp_}{}
+ {gen}
+ {evaluates to medium space for gpic strings}
\macrodef{sqrta}{sqrta}{({\sl arg})}
{gen}
{square root of the absolute value of {\sl arg}; i.e.,
@@ -2364,6 +2418,9 @@ justification})}
with {\sl }n junctions labeled {\tt J1, ... J}{\sl n} placed around
a circle with initial angle -90 deg (by default) with respect to the
current drawing direction. The default diameter is {\tt dimen\_} }
+\macrodef{s\_}{s_}{}
+ {gen}
+ {.s with respect to current direction}
\macrodef{stackargs\_}{stackargs}{(`{\sl stackname}',{\sl args})}
{gen}
{Stack arg 2, arg 3, ... onto the named stack up to a blank arg}
@@ -2398,11 +2455,11 @@ justification})}
by nonblank
{\sl separator} (default .). White space preceding the fields
is ignored.}
+\macrodef{sum3D}{sum3D}{({\sl x1,y1,z1,x2,y2,z2})}
+ {3D} {sum of two triples}
\macrodef{sum\_}{sum_}{({\sl a},{\sl b})}
{gen}
{binary sum}
-\macrodef{sum3D}{sum3D}{({\sl x1,y1,z1,x2,y2,z2})}
- {3D} {sum of two triples}
\macrodef{sus}{sus}{({\sl linespec, chars, label})}
{cct}
{Wrapper to place an SUS thyristor as a two-terminal element with
@@ -2411,9 +2468,10 @@ justification})}
\macrodef{svec\_}{svec_}{({\sl x},{\sl y})}
{log}
{scaled and rotated grid coordinate vector}
-\macrodef{sw\_}{sw_}{}
+\macrodef{s\_wd}{s_wd}{({\sl name},{\sl default})}
{gen}
- {.sw with respect to current direction}
+ {width of the most recent (or named) {\tt s\_box}
+ \seesect{Interaction:}}
\macrodef{switch}{switch}{(\linespec,L|R,[C|O][D],[B|D])}
{cct}
{SPST switch (wrapper for bswitch, lswitch, and dswitch),
@@ -2423,10 +2481,11 @@ justification})}
if arg4=B (button switch): arg3 = O{\tt|}C
O=normally open, C=normally closed,
if arg4=D: arg3 = same as for dswitch \seesect{Twoterminal:}}
+\macrodef{sw\_}{sw_}{}
+ {gen}
+ {.sw with respect to current direction}
+%
\Letter{T}%
-\macrodef{ta\_xy}{ta_xy}{({\sl x, y})}
- {cct}
- {macro-internal coordinates adjusted for {\tt L|R}}
\macrodef{tapped}{tapped}{(`{\sl two-terminal element}',
[{\sl arrowhd} | type={\sl arrowhd};name={\sl Name}],
{\sl fraction, length, fraction, length,} $\cdots$)}
@@ -2440,6 +2499,9 @@ justification})}
or Name1, Name2, $\cdots$ if specified. Internal block names are
{\tt .Start, .End,} and {.C} corresponding to the drawn element,
and the tap names \seesect{Composite:} }
+\macrodef{ta\_xy}{ta_xy}{({\sl x, y})}
+ {cct}
+ {macro-internal coordinates adjusted for {\tt L|R}}
\macrodef{tbox}{tbox}{({\sl text,wid,ht},<|>|<>,{\sl type})}
{cct}
{Pointed terminal box. The {\sl text} is placed at the rectangular
@@ -2520,12 +2582,6 @@ justification})}
{gen}
{Evaluates to {\tt from {\sl position} - Rect\_({\sl length, angle}) to
{\sl position}} from the polar-coordinate data in the arguments }
-\macrodef{tr\_xy\_init}{tr_xy_init}{({\sl origin, unit size, sign })}
- {cct}
- {initialize {\tt tr\_xy}}
-\macrodef{tr\_xy}{tr_xy}{({\sl x, y})}
- {cct}
- {relative macro internal coordinates adjusted for {\tt L|R}}
\macrodef{transformer}{transformer}{(\linespec,L|R,{\sl np},%
[A|P][W|L][D1|D2|D12|D21],{\sl ns})}
{cct}
@@ -2536,6 +2592,12 @@ justification})}
L = looped windings, D1: phase dots at P1 and S1 end; D2 at P2 and
S2 end; D12 at P1 and S2 end; D21 at P2 and S1 end
\seesect{Composite:}}
+\macrodef{tr\_xy\_init}{tr_xy_init}{({\sl origin, unit size, sign })}
+ {cct}
+ {initialize {\tt tr\_xy}}
+\macrodef{tr\_xy}{tr_xy}{({\sl x, y})}
+ {cct}
+ {relative macro internal coordinates adjusted for {\tt L|R}}
\macrodef{tstrip}{tstrip}{(R|L|U|D|{\sl degrees, nterms, chars})}
{cct}
{terminal strip, chars:
@@ -2550,6 +2612,7 @@ brushht})}
\macrodef{twopi\_}{twopi_}{}
{gen}
{$2\pi$}
+%
\Letter{U}%
\macrodef{ujt}{ujt}{(\linespec,R,P,E)}
{cct}
@@ -2563,6 +2626,7 @@ brushht})}
\macrodef{up\_}{up_}{}
{gen}
{set current direction up \seesect{Placing:}}
+%
\Letter{V}%
\macrodef{variable}{variable}{(`{\sl element}',
{\tt [A|P|L|[u]N|[u]NN][C|S]}, [+|-]{\sl angle},
@@ -2616,10 +2680,8 @@ brushht})}
{{\tt Vsum\_(A,B)} evaluates to {\tt A+B} with dpic, {\tt
A+(B.x,B.y)}
with gpic}
+%
\Letter{W}%
-\macrodef{w\_}{w_}{}
- {gen}
- {.w with respect to current direction}
\macrodef{while\_}{while_}{(`{\sl test}',`{\sl actions}')}
{gen}
{Integer m4 while loop}
@@ -2631,6 +2693,9 @@ brushht})}
{cct}
{core winding drawn in the current direction; {\tt R}=right-handed
\seesect{Composite:}}
+\macrodef{w\_}{w_}{}
+ {gen}
+ {.w with respect to current direction}
\macrodef{XOR\_gate}{XOR_gate}{({\sl n},N)}
{log}
{`xor' gate, 2 or {\sl n\/} inputs; N=negated input.
@@ -2640,6 +2705,7 @@ brushht})}
\macrodef{XOR\_off}{XOR_off}{}
{log}
{XOR and NXOR offset of input face}
+%
\Letter{X}%
\macrodef{xtal}{xtal}{(\linespec,{\sl keys})}
{cct}
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic b/Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic
index c89f13d2939..8d3c81776c1 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic
+++ b/Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic
@@ -3,7 +3,7 @@
# m4 macro NeedDpicTools or the pic statement copy "HOMELIB_/dpictools.pic"
# when HOMELIB_ is defined or, generically, copy "<path>dpictools.pic"
-# Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under #
+# Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under #
# the LaTeX Project Public Licence in file Licence.txt. The files of #
# this distribution may be redistributed or modified provided that this #
# copyright notice is included and provided that modifications are clearly #
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Alogix.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Alogix.m4
index fd586869b7c..4e5abd837c3 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Alogix.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Alogix.m4
@@ -9,7 +9,7 @@ A: Autologix(
move left 10bp__ from A.InCk
"\sl Out1" at A.Out1 ljust
"\sl Out2" at A.Out2 ljust
- Loopover_(`v_', `"$v_$" at A.In`'v_ above ', A,B,C,Ck)
+ foreach_(`v_', `"$v_$" at A.In`'v_ above ', A,B,C,Ck)
`"\shortstack[l]{
\tt Autologix( \\ \tt \quad
Nand(And(Or(A,C),Or(B,\~{}C),Or(\~{}A,B,C)),Ck);\\ \tt \quad
@@ -67,7 +67,7 @@ undefine(`extras')
ifdef(`extras',`
Q1: Autologix(Nor(Nor(A,And(B,C)),Nand(Not(B),D))) \
with .nw at A.sw+(0,-61bp__)
- Loopover_(`x',`"\sf x" at last [].In`'x above',A,B,C,D)
+ foreach_(`x',`"\sf x" at last [].In`'x above',A,B,C,D)
`"\shortstack[l]{%
\tt Q1: Autologix(Nor(Nor(A,And(B,C)),Nand(Not(B),D)),<options>)\\
@@ -76,37 +76,37 @@ ifdef(`extras',`
Q2: Autologix(Nor(Nor(A,And(B,~C)),Nand(Not(B),D)),V) \
with .nw at last "".sw+(0,-14bp__)
- Loopover_(`x',`"\sf x" at last [].In`'x above',A,B,C,D)
+ foreach_(`x',`"\sf x" at last [].In`'x above',A,B,C,D)
"\sf V" at last [].se above rjust
Q3: Autologix(Nor(Nor(A,And(B,C)),Nand(Not(B),D)),R) \
with .nw at last [].sw+(0,-0.2)
- Loopover_(`x',`"\sf x" at last [].In`'x above',A,B,C,D)
+ foreach_(`x',`"\sf x" at last [].In`'x above',A,B,C,D)
"\sf R" at last [].se above rjust
Q4: Autologix(Nor(Nor(A,And(B,C)),Nand(Not(B),D)),RV) \
with .nw at last [].sw+(0,-0.2)
- Loopover_(`x',`"\sf x" at last [].In`'x above',A,B,C,D)
+ foreach_(`x',`"\sf x" at last [].In`'x above',A,B,C,D)
"\sf RV" at last [].se above rjust
Autologix(Nor(Nor(A,And(B,C)),Nand(Not(B),D)),LRV) \
with .Out at Q4.Out+(3.5,0)
- Loopover_(`x',`"\sf x" at last [].In`'x rjust',A,B,C,D)
+ foreach_(`x',`"\sf x" at last [].In`'x rjust',A,B,C,D)
"\sf LRV" at last [].se above rjust
Autologix(Nor(Nor(A,And(B,C)),Nand(Not(B),D)),LR;offset=-L_unit*1.5) \
with .Out at Q3.Out+(3.5,0)
- Loopover_(`x',`"\sf x" at last [].In`'x rjust',A,B,C,D)
+ foreach_(`x',`"\sf x" at last [].In`'x rjust',A,B,C,D)
"\sf LR" at last [].se above rjust
Autologix(Nor(Nor(A,And(B,~C)),Nand(Not(B),D)),LV;offset=L_unit*2) \
with .Out at Q2.Out+(3.5,0)
- Loopover_(`x',`"\sf x" at last [].In`'x rjust',A,B,C,D)
+ foreach_(`x',`"\sf x" at last [].In`'x rjust',A,B,C,D)
"\sf LV" at last [].se above rjust
Autologix(Nor(Nor(A,And(B,C)),Nand(Not(B),D)),L) \
with .Out at Q1.Out+(3.5,0)
- Loopover_(`x',`"\sf x" at last [].In`'x rjust',A,B,C,D)
+ foreach_(`x',`"\sf x" at last [].In`'x rjust',A,B,C,D)
"\sf L" at last [].se above rjust
')
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Smithchart.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Smithchart.m4
index fc6b5590db1..8607339a7b0 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Smithchart.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Smithchart.m4
@@ -56,7 +56,7 @@ C: circle thick thk rad rar(0) at (0,0)
line thick thk grayline(thkg) from C.w to C.e
Rc(50): circle thick thk grayline(thkg) rad rar(50) at Rac(50)
-Loopover_(`term',`RaArc1(patsubst(term,:,`,'))',
+foreach_(`term',`RaArc1(patsubst(term,:,`,'))',
20:thn:50,
30 to 40 by 10:thn:50,
20:thk:20,
@@ -86,7 +86,7 @@ Loopover_(`term',`RaArc1(patsubst(term,:,`,'))',
0.01 to 0.191 by 0.01:thn:0.2,
0.05 to 0.151 by 0.1:thk:0.2)
-Loopover_(`term',`RaArc2(patsubst(term,:,`,'))',
+foreach_(`term',`RaArc2(patsubst(term,:,`,'))',
0.05 to 0.451 by 0.1:thn:1:0.5,
0.02 to 0.181 by 0.02:thn:0.5:0.1)
@@ -95,7 +95,7 @@ Xc(50): arct(thk) cw grayline(thkg) from C.e \
Xc(-50): arct(thk) grayline(thkg) from C.e \
to SGamma(0,-50) with .c at Xac(-50)
-Loopover_(`term',`XaArc2(patsubst(term,:,`,'))',
+foreach_(`term',`XaArc2(patsubst(term,:,`,'))',
10 to 20 by 10:thn:0:50,
7 to 9 by 2:thn:0:10,
2 to 18 by 2:thn:0:20,
@@ -112,7 +112,7 @@ Loopover_(`term',`XaArc2(patsubst(term,:,`,'))',
0.2 to 0.81 by 0.2:thk:0:2,
0.1 to 0.91 by 0.2:thk:0:1)
-Loopover_(`term',`XaArc2(patsubst(term,:,`,'))',
+foreach_(`term',`XaArc2(patsubst(term,:,`,'))',
0.05 to 0.451 by 0.1:thn:0.5:1,
0.02 to 0.181 by 0.02:thn:0:0.5,
0.02 to 0.191 by 0.01:thn:0:0.2, dnl 0.02 should be 0.01
@@ -125,12 +125,12 @@ dnl these avoid TeX arithmetic overflow:
dnl Internal labels start here
textht = C.wid/120
# Horizontal axis
-Loopover_(`t',`box wid textht ht textht*1.5 colored "white" \
+foreach_(`t',`box wid textht ht textht*1.5 colored "white" \
with .se at Rc(t).w+(-2bp__,2bp__)
r_text(90,"t",at Rc(t).w+(-textht/3,textht*1.5))',
0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9, 1,1.2,1.4,1.6,1.8, 2,3,4,5,10,20,50)
# Xc=1 labels
-Loopover_(`tt',
+foreach_(`tt',
`define(`m4ta',patsubst(tt,:.*))define(`m4vl',patsubst(tt,.*:))dnl
X: SGamma(m4vl,1)
M: move from Rc(m4vl) to X; ax = lin_ang(M)*rtod_-90 #; print ax
@@ -139,7 +139,7 @@ Loopover_(`tt',
r_text(-m4ta,m4vl,at X+(Rect_(textht*1.7,-(ax+30)))) ',
10:0.2, 19:0.4, 26:0.6, 32:0.8, 37:1)
# right-side circumference
-Loopover_(`tt',
+foreach_(`tt',
`define(`m4ta',patsubst(tt,:.*))define(`m4vl',patsubst(tt,.*:))dnl
X: Xc(m4vl).start; ax = atan2(X.y,X.x)*rtod_ ; # print round_(ax)
r_text(m4ta,m4vl,at X+(Rect_(textht*2,ax-120)))
@@ -148,13 +148,13 @@ Loopover_(`tt',
else { r_text(-m4ta,m4vl,at (X.x,-X.y)+(Rect_(textht*2,-ax+150))) } ',
6:20, 11:10, 23:5, 28:4, 37:3, 53:2, 58:1.8, 64:1.6, 71:1.4, 80:1.2, 90:1)
# left-side circumference
-Loopover_(`tt',
+foreach_(`tt',
`X: Xc(m4Lx*0.1).start; # print round_(atan2(X.y,X.x)*rtod_-180)
r_text(-patsubst(tt,:,`,'),at X+(Rect_(textht*1.7,-m4Lx*11+40)))
r_text( patsubst(tt,:,`,'),at (X.x,-X.y)+(Rect_(textht*2.1,m4Lx*11-30))) ',
11:0.1, 23:0.2, 33:0.3, 44:0.4, 53:0.5, 62:0.6, 70:0.7, 77:0.8, 84:0.9)
# Ra=1 labels
-Loopover_(`tt',`X: SGamma(1,m4Lx*0.2)
+foreach_(`tt',`X: SGamma(1,m4Lx*0.2)
M: move from Rac(1) to X; # print round_(lin_ang(M)*rtod_-180)
r_text(-eval(m4Lx*11),ifelse(m4Lx,5,1,0.eval(m4Lx*2)),
at X+(Rect_(textht*1.5,-m4Lx*11+40)))
@@ -188,7 +188,7 @@ for_(20,170,10,
r_text(eval( 90-m4x),-m4x,at A+(Rect_(A.rad+textht*1.2,-m4x)))
')
r_text(90,180,at A-(A.rad+textht/2,0))
-Loopover_(`rca',
+foreach_(`rca',
`r_text(eval(90-(180-rca/10)),eval(m4Lx*5+5),
at A+(Rect_(A.rad-textht*0.7,rca/10)))
r_text(eval(-90+(180-rca/10)),eval(-m4Lx*5-5),
@@ -199,16 +199,16 @@ Loopover_(`rca',
# Internal labels
setrgb(thng,thng,thkg)
"RESISTANCE R/Zo OR CONDUCTANCE G/Yo" at C+SGamma(0.5,0)-(0,C.rad/40)
- Loopover_(`Lttr',`ifelse(Lttr,*,,`r_text(eval(87-m4Lx*86/100),Lttr,
+ foreach_(`Lttr',`ifelse(Lttr,*,,`r_text(eval(87-m4Lx*86/100),Lttr,
at W+(Rect_(W.rad+wltic/2+textht*0.5, 177-m4Lx*0.86))) ')',
W,A,V,E,L,E,N,G,T,H,S,*,T,O,W,A,R,D,*,G,E,N,E,R,A,T,O,R)
- Loopover_(`Lttr',`ifelse(Lttr,*,,`r_text(eval(115-m4Lx*86/100),Lttr,
+ foreach_(`Lttr',`ifelse(Lttr,*,,`r_text(eval(115-m4Lx*86/100),Lttr,
at W+(Rect_(W.rad-wltic/2-textht*1.0, 204-m4Lx*0.86))) ')',
W,A,V,E,L,E,N,G,T,H,S,*,T,O,W,A,R,D,*,L,O,A,D)
- Loopover_(`Lttr',`ifelse(Lttr,*,,`define(`xa','13-m4Lx*86/100`)
+ foreach_(`Lttr',`ifelse(Lttr,*,,`define(`xa','13-m4Lx*86/100`)
r_text(eval(xa-90),Lttr,at A+(Rect_(A.rad+textht*0.7, xa))) ')',
R,E,F,L,E,C,T,I,O,N,*,C,O,E,F,F,I,C,I,E,N,T,*,A,N,G,L,E)
- Loopover_(`Lttr',`ifelse(Lttr,*,,`define(`xa','14-m4Lx*86/100`)
+ foreach_(`Lttr',`ifelse(Lttr,*,,`define(`xa','14-m4Lx*86/100`)
r_text(eval(xa-90),Lttr,at A+(Rect_(A.rad-textht*0.7, xa))) ')',
T,R,A,N,S,M,I,S,S,I,O,N,*,C,O,E,F,F,I,C,I,E,N,T,*,A,N,G,L,E)
resetrgb
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Sources.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Sources.m4
index 8a4bab9bc64..53c732b75d0 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Sources.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Sources.m4
@@ -14,6 +14,7 @@ define(`NL',`; move down $1; right_')
{source ; move ; "`source'" ljust} NL
{source(,I) ; move ; "`source(,I)'" ljust} NL
{source(,i) ; move ; "`source(,i)'" ljust} NL
+ {source(,ii) ; move ; "`source(,ii)'" ljust} NL
{source(,V) ; move ; "`source(,V)'" ljust} NL
{source(,v) ; move ; "`source(,v)'" ljust} NL
{source(,SC) ; move ; "`source(,SC)'" ljust} NL
@@ -51,7 +52,8 @@ define(`NL',`; move down $1; right_')
{consource(,V) ; move ; "`consource(,V)'" ljust} NL(0.32)
{consource(,v) ; move ; "`consource(,v)'" ljust} NL(0.3)
{battery ; move ; "`battery'" ljust} NL(0.3)
- {battery(,3,R) ; move ; "`battery(,3,R)'" ljust}
+ {battery(,3,R) ; move ; "`battery(,3,R)'" ljust} NL(0.35)
+ {ttmotor(,G) ; move ; "`ttmotor(,G)'" ljust}
iflatex(`ifpsfrag(,`latexcommand(})')')
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/SourcesDPV.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/SourcesDPV.m4
index 91e2edeba64..6c090301831 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/SourcesDPV.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/SourcesDPV.m4
@@ -9,6 +9,7 @@ define(`NL',`; move down $1; right_')
{source ; move ; "`source'" ljust} NL
{source(,I) ; move ; "`source(,I)'" ljust} NL
{source(,i) ; move ; "`source(,i)'" ljust} NL
+ {source(,i) ; move ; "`source(,ii)'" ljust} NL
{source(,V) ; move ; "`source(,V)'" ljust} NL
{source(,v) ; move ; "`source(,v)'" ljust} NL
{source(,AC); move ; "`source(,AC)'" ljust} NL
@@ -41,8 +42,9 @@ define(`NL',`; move down $1; right_')
{consource(,i) ; move ; "`consource(,i)'" ljust} NL(0.32)
{consource(,V) ; move ; "`consource(,V)'" ljust} NL(0.32)
{consource(,v) ; move ; "`consource(,v)'" ljust} NL(0.3)
- {battery ; move ; "`battery'" ljust} NL
- {battery(,3,R) ; move ; "`battery(,3,R)'" ljust}
+ {battery ; move ; "`battery'" ljust} NL(0.3)
+ {battery(,3,R) ; move ; "`battery(,3,R)'" ljust} NL(0.35)
+ {ttmotor(,G) ; move ; "`ttmotor(,G)'" ljust}
command "</g>" # end font
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ex05.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ex05.m4
index 748a48ebe93..07a5c27fa98 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/ex05.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/ex05.m4
@@ -5,6 +5,7 @@ ifelse(ifpstricks(T)`'ifpgf(T)`'ifsvg(T)`'ifmpost(T),T,`
Kalman: [
fillval = 0.8 # environmental variable
+ linethick = 1 # slightly thicker for better screen pdf
dx = boxht/5 # diagram parameters wrt scaled env variables
circlerad = boxht*3/8
@@ -96,8 +97,10 @@ Coxeter: [
define(`customarc',
`pushdef(`dfillcolor',`0.7,0.7,0.7') linethick_(0.4); dnl
- Darc(`$1',linewid, (`$2')*dtor_, (`$3')*dtor_,
- thick=linewid/6; wid=linewid*0.3; ht=linewid/6; ends=<->)dnl
+# Darc(`$1',linewid, (`$2')*dtor_, (`$3')*dtor_,
+# thick=linewid/6; wid=linewid*0.3; ht=linewid/6; ends=<->)dnl
+ Darc(,centre=`$1';rad=linewid;startdeg= (`$2');enddeg=(`$3');
+ thick=linewid/6; wid=linewid*0.3; ht=linewid/6; ends=<->)
linethick_(customlinethick); popdef(`dfillcolor')')
customarc((linewid,-linewid/3), 25,155)
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf
index 1ca1e0ca2d9..1b001ac9ad4 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Koch.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Koch.m4
index faa46dfff8e..cb122c10b64 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Koch.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Koch.m4
@@ -25,8 +25,9 @@ gen_init
line from X to X
for i=1 to nsides do {
a += rot[i]
- X: X+(Rect_(leng,a))
- continue to X
+# X: X+(Rect_(leng,a))
+# continue to X
+ continue by (Rect_(leng,a))
}
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Makefile
index 5fba20547c6..efc8a2b23ed 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Makefile
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Makefile
@@ -165,7 +165,7 @@ $(DOC).pdf:
file=`basename $$fl .m4` ; \
echo $$file.m4 ; \
$(M4) pgf.m4 extras.dim $$file.m4 | $(PIC) -g > $$file.tex ; \
- printf "\n\n|parbox{|textwidth}{\n" | $(BS) >> extras.tex ; \
+ printf "\n\n|noindent|parbox{|textwidth}{\n" | $(BS) >> extras.tex ; \
printf "|input{$$file.tex}\n" | $(BS) >> extras.tex ; \
printf "\n $$file.m4\n}\n|vspace{|baselineskip}" \
| sed -e 's/_/|_/g' | $(BS) >> extras.tex ; \
@@ -208,4 +208,4 @@ tst1:
dvips $(DVIPSOPTS) tst -o tst.ps
clean:
- rm -f *.ps *.pdf *.tex *.dim *.pic *.log *.dms *.aux
+ rm -f *.ps *.pdf *.tex *.dim *.pic *.log *.dms *.aux *.svg
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/README_extras b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/README_extras
index 1c18266a6a6..45074a49b2f 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/README_extras
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/README_extras
@@ -1,11 +1,11 @@
-THIS DIRECTORY contains a Makefile and m4 sources for diagrams not
-included in the examples files. Many of these correspond to questions
-asked on stackexchange, of the form "How do I draw ... with tikz?"
-Producing drawings like these can be satisfying, as shown by the alacrity
-with which knowledgable people assist when questions are asked. Often,
-the question has more to do with geometry than drawing language, and
-the examples here using m4 with dpic merely confirm that the coding can
+THIS DIRECTORY contains a Makefile and m4 sources for some diagrams
+not included in the main examples files. Many of these correspond to
+questions asked on stackexchange, of the form "How do I draw ... with
+tikz?" Producing drawings like these can be satisfying, as shown by the
+alacrity with which knowledgable people assist when questions are asked.
+The questions often have more to do with geometry than drawing language,
+and the examples here using m4 with dpic confirm that the coding can
often be done reasonably in several possible languages.
This directory is assumed to be a subdirectory of the examples directory
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/TR_fill.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/TR_fill.m4
index bf3fae888c0..9a93dbe5519 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/TR_fill.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/TR_fill.m4
@@ -1,8 +1,8 @@
.PS
+gen_init
+[
# TR_fill.m4
# https://tex.stackexchange.com/questions/654117/fill-parts-of-a-shape
-gen_init
-
B: (0,0); "B" at B below
C: (5,0); "C" at C below
A: Cintersect(B,4,C,3); "A" at A above
@@ -13,5 +13,42 @@ gen_init
arc from A to B rad 2
arc cw to C rad 2.5
arc to A rad 1.5 )
+ ]
+[
+# Fillbetween
+# https://tex.stackexchange.com/questions/688273/polar-curve-shading-error-with-fillbetween
+NeedDpicTools
+
+ sc = 0.5
+ define coord {(($1,$2)*sc)}
+ define X1 {coord(Rect_(6*sind($1),$1))}
+ define X2 {coord(Rect_(2+2*sind($1),$1))}
+ define interp {$1+($2-($1))*($3)}
+ define axes {
+ arrow from coord(-6,0) to coord(6,0)
+ "$x$" rjust above
+ for x=-5 to 5 do {line up_ 0.1 at coord(x,0)}
+ "${-}5$" at coord(-5,-0.05/sc) below
+ "${}5$" at coord(5,-0.05/sc) below
+ arrow from coord(0,-2) to coord(0,7)
+ "$y$" at Here+(8bp__,-10bp__)
+ for y=-1 to 5 do {line right 0.1 at coord(0,y)}
+ "${}5$" at coord(-0.05/sc,5) rjust
+ }
+
+ n = 36
+ for i=0 to n do { t = interp(30,150,i/n); C3[i]: X1(t) }
+ for i=0 to n do { t = interp(150,150-360,i/n); C4[i]: X2(t) }
+ for i=0 to n do { t = interp(150,210,i/n); C5[i]: X1(t) }
+ rgbfill(0.9,0.9,0.9,
+ fitcurve(C3,n)
+ fitcurve(C4,n)
+ fitcurve(C5,n) )
+ fitcurve(C3,n,outlined "orange" )
+ fitcurve(C4,n,outlined "red" )
+ fitcurve(C5,n,outlined "orange" )
+
+ axes
+ ] with .nw at last [].sw+(0,-0.2)
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Views.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Views.m4
index c02c9a48172..e33c6566826 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Views.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Views.m4
@@ -43,9 +43,9 @@ define(`textwidth',5.5)
define vec4 { $4[1] = $1; $4[2] = $2; $4[3] = $3; $4[4] = 1 }
# copy4( vector, vector )
define copy4 { $2[1] = $1[1]; $2[2] = $1[2]; $2[3] = $1[3]; $2[4] = $1[4] }
-# pr4( vector, label )
+# pr4( vector, label ) # projected vector (see pr below)
define pr4 { if $1[4]==0 then { print "Divide by zero" } \
- else { $2: pr($1[1]/$1[4],$1[2]/$1[4],$1[3]/$1[4]) }}
+ else { $2: pr($1[1]/$1[4],$1[2]/$1[4],$1[3]/$1[4]) }}
define print4 { print sprintf("%g,%g,%g,%g",$1[1],$1[2],$1[3],$1[4]) }
'
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf b/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf
index 776d8f4183e..a511d1f0d9e 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf
@@ -1,5 +1,5 @@
% cct.mf, generated by Mfpic, v1.10 2012/12/03,
-% from TeX source "font" on 2023/05/31 at 20:45
+% from TeX source "font" on 2023/09/11 at 22:43
numeric mfpicversion; mfpicversion := 110;
if unknown mode: mode := localfont; fi
if unknown mag: mag := 1000/1000; fi
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4 b/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4
index 6ac550379da..5752faa7a68 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4
@@ -1,7 +1,7 @@
divert(-1)
gpic.m4 Initialization for gpic.
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/lib3D.m4 b/Master/texmf-dist/doc/latex/circuit-macros/lib3D.m4
index b5a2f87aafc..7fd9901dd3a 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/lib3D.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/lib3D.m4
@@ -3,7 +3,7 @@ lib3D.m4 Macros for rotation, projection, and other
operations on argument triples representing
3D vectors or colors.
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/libSLD.m4 b/Master/texmf-dist/doc/latex/circuit-macros/libSLD.m4
index 59729e8f86d..e4438b73aea 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/libSLD.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/libSLD.m4
@@ -2,7 +2,7 @@ divert(-1)
libSLD.m4 Draft macros for single-line diagram elements
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 b/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4
index fd31a76c803..4f8d12c0c2f 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4
@@ -1,7 +1,7 @@
divert(-1)
libcct.m4
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
@@ -617,10 +617,11 @@ define(`xtal',`eleminit_(`$1') pushkey_(`$2',type,N,N)
line to rvec_(rp_len,0) invis ')
`source( linespec,
- V|v|I|i|AC|B|F|G|H|Q|L|N|P|R|S[C[r]|E[r]]]|T|X|U|other,
+ V|v|I|i|ii|AC|B|F|G|H|Q|L|N|P|R|S[C[r]|E[r]]]|T|X|U|other,
diameter, R, attributes,body name)
V = voltage source; v = alternate voltage source;
I = current source; i = alternate current source;
+ ii = double arrowhead current source;
AC = AC source; B = bulb; F = fluorescent; G =
generator; H = step function; L = lamp;
N = neon; P = pulse; Q = charge; R = ramp; r = right
@@ -651,6 +652,14 @@ define(`source',`ifelse(`$4',R,
to rvec_(m4h/2,0)}',
`$2',I,`{arrow from rvec_(-m4h*3/4,0) \
to rvec_(m4h*3/4,0)}',
+ `$2',ii,`{line from rvec_(-m4h,0) \
+ to rvec_(m4h,0)}
+ {line thick 1.2*linethick from rvec_(m4h/12,-m4h*0.45) \
+ to rvec_(m4h*5/6,0) \
+ then to rvec_(m4h/12,m4h*0.45)}
+ {line thick 1.2*linethick from rvec_(-m4h*3/4,-m4h*0.45) \
+ to Here \
+ then to rvec_(-m4h*3/4,m4h*0.45)}',
`$2',i,`{line from rvec_(0,-m4h) \
to rvec_(0,m4h)}',
`$2',B,`{line from rvec_(-m4h,0) \
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4 b/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4
index 324196e6ecd..d69385b63ae 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4
@@ -2,7 +2,7 @@ divert(-1)
libgen.m4 Base macros for dpic and gpic diagrams
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
@@ -199,7 +199,7 @@ define(`latexcommand',
`$2')')
define(`m4announceprocessor',`dnl Do not change the format of the next line:
-`#' `$1' Version 10.3: ifelse(m4picprocessor,gpic,`Gpic',
+`#' `$1' Version 10.4: ifelse(m4picprocessor,gpic,`Gpic',
m4postprocessor,pstricks,`PSTricks',
m4postprocessor,pgf,`TikZ PGF',
m4postprocessor,mfpic,`Mfpic',
@@ -334,7 +334,7 @@ define(`quadrant_',`(int(pmod(`$1',360)/90)+1)')
define(`drawdir_',`define(`m4sectang',`ifelse(`$2',,90,(`$2'))')dnl
(int(pmod(`$1'+m4sectang/2,360)/m4sectang)*m4sectang)')
- `arcr( position, radius,
+ `arcr( centre, radius,
start radians, end radians,
modifiers, ht)
Unique ccw arc. If arg 5 contains -> or <-
@@ -362,7 +362,7 @@ define(`arcr',`define(`M4arcrC',`M4Pos(ifelse(`$1',,Here,`$1'))')dnl
arc patsubst(patsubst(`$5',->,),<-,) \
from M4aStart to M4aEnd rad m4arad with .c at M4aCtr ')
- `arcd( position, radius,
+ `arcd( centre, radius,
start degrees, end degrees,
attributes, ht)
Like arcr but with angles in degrees:
@@ -518,8 +518,6 @@ define(`dashline',`rpoint_(`$1')define(`m4opts',`$2')
ifelse(`$5',G,,
`if m4ti < dashline_n then {')move to rvec_(m4gap,0)ifelse(`$5',G,,})
} ')
-
- `round(at location,line thickness,attributes)
filled circle for rounded corners'
define(`round',`{ circle thick ifelse(`$2',,`linethick/2',(`$2')/2) \
diameter ifelse(`$2',,`linethick',`($2)')/2 pt__ \
@@ -1443,32 +1441,73 @@ m4postprocessor,svg,
D[iamond]
C[rowfoot]
P[lain]
+ R[ight]
+ L[eft]
wdth=expr (default arrowwid)
lgth=expr (default arrowht)
shaft= attributes (dashed etc)
- head= attributes (shaded etc)'
-define(`sarrow',`arrow invis `$1' ; M4_E: Here
- pushkeys_(`$2',type:O:N;head::N;shaft::N;wdth:arrowwid;lgth:arrowht)
- line from last arrow.start to last arrow.end chop 0 chop m4lgth m4shaft
- M4_X: Here; M4_P: Vperp(M4_E,M4_X,m4wdth/2)
+ head= attributes (shaded etc)
+ name=Name (default Sarrow_)'
+define(`sarrow',
+ `pushkeys_(`$2',
+ type:O:N;head::N;shaft:m4head:N;wdth:arrowwid;lgth:arrowht;name:Sarrow_:N)dnl
+ arrow `$1' m4head invis
+ m4_dx = last arrow.end.x-last arrow.start.x
+ m4_dy = last arrow.end.y-last arrow.start.y
+ m4_t = last arrow.thick bp__
+m4name: [
+ ifelse(ifelse(m4type,L,L,m4type,R,R),,,`poppushdef(`m4wdth',(m4wdth*2))')
+ Point: Here; Shaft: Point-(m4_dx,m4_dy)
+ C: (Shaft-Point)/distance(Shaft,Point)
+ X: m4affine(m4lgth,0,Point,C)
+ if m4wdth == 0.0 then { po = 0.0 } \
+ else { po = min((m4_t/m4wdth)*sqrt((m4lgth)^2+(m4wdth)^2/4),m4lgth) }
+ P: m4affine(po,0,Point,C)
+ h = m4lgth-m4_t/2;
+ x = h - po;
+ if m4lgth == 0.0 then { v = 0.0 } else { v = ((m4wdth/2)/m4lgth)*x }
+ R: m4affine(h, v,Point,C);
+ L: m4affine(h,-v,Point,C);
+ if x == 0.0 then { t = 1 } else { t = m4lgth/x }
+ if m4lgth==0 then { y = 0 } else { y = m4lgth-po+m4_t*m4wdth/m4lgth/4 }
+ Ly: (P*(x-y)+L*y)/x
+ Ry: (P*(x-y)+R*y)/x
ifinstr(m4type,O,
- `line from M4_E to M4_X+(M4_P.x,M4_P.y) then to M4_X-(M4_P.x,M4_P.y) \
- then to M4_E ifelse(m4head,,fill_(1),m4head)',
+ `line from Shaft to (L+R)/2 m4shaft
+ line to L then to P then to R then to Here m4head',
m4type,D,
- `line from M4_X to (0.5 between M4_E and M4_X)+(M4_P.x,M4_P.y) \
- then to M4_E then to (0.5 between M4_E and M4_X)-(M4_P.x,M4_P.y) \
- then to M4_X ifelse(m4head,,fill_(1),m4head)',
+ `poppushdef(`m4lgth',(m4lgth+m4_t))dnl
+ s = sqrt(m4lgth^2+m4wdth^2)/2
+ if m4wdth==0 then { pd = 0 } else { pd = m4_t*s/m4wdth }
+ PD: m4affine(pd,0,Point,C)
+ line from Shaft to X m4shaft
+ if m4lgth==0 then { pb = 0 } else { pb = m4_t*s/m4lgth }
+ PL: m4affine(m4lgth/2, m4wdth/2-pb,Point,C)
+ PR: m4affine(m4lgth/2,-m4wdth/2+pb,Point,C)
+ line to PL then to PD then to PR then to X \
+ ifelse(m4head,,fill_(1),m4head)',
m4type,P,
- `line to M4_E m4head
- line from M4_X+(M4_P.x,M4_P.y) to M4_E then to M4_X-(M4_P.x,M4_P.y) m4head',
+ `line from Shaft to P m4shaft
+ line from Ly to P then to Ry m4head',
m4type,C,
- `line to M4_E m4head
- ifdpic(`spline 0.4 from M4_E+M4_P to M4_X+M4_P then to M4_X-M4_P \
- then to M4_E-M4_P',
- `spline from M4_E+(M4_P.x,M4_P.y) to M4_X+(M4_P.x,M4_P.y) \
- then to M4_X-(M4_P.x,M4_P.y) then to M4_E-(M4_P.x,M4_P.y)') m4head')
- popdef(`m4type',`m4head',`m4shaft',`m4wdth',`m4lgth')dnl
- move to M4_E')
+ `line from Shaft to Point m4head
+ Q: (-C.y,C.x)*((m4wdth-m4_t)/2)
+ Y: m4affine(m4lgth-m4_t/2,0,Point,C)
+ ifdpic(`spline 0.4 from Point+Q to Y+Q then to Y-Q then to Point-Q',
+ `spline from Point+(Q.x,Q.y) to Y+(Q.x,Q.y) \
+ then to Y-(Q.x,Q.y) then to Point-(Q.x,Q.y)') m4head',
+ m4type,R,
+ `line from Shaft to P m4shaft
+ circle diam m4_t/2 at Here m4shaft thick last line.thick/2
+ line from 1bp__/distance(Ly,P) between P and Ly to P then to Ry m4shaft',
+ m4type,L,
+ `line from Shaft to P m4shaft
+ circle diam m4_t/2 at Here m4shaft thick last line.thick/2
+ line from 1bp__/distance(Ry,P) between P and Ry to P then to Ly m4shaft')
+ popdef(`m4type',`m4head',`m4shaft',`m4wdth',`m4lgth',`m4name')dnl
+ ] with .Point at Here')
+define(`m4affine',
+ ``$3' + (`$4'.x*(`$1')-`$4'.y*(`$2'),`$4'.y*(`$1')+`$4'.x*(`$2'))')
`open_arrow(linespec, ht, wid, head attribs)
arrow with outlined head, like sarrow(,type=O)'
@@ -1828,7 +1867,7 @@ define(`graystring',`rgbstring(`$1',`$1',`$1')')
`outlined string' or `shaded string'
(mpost,PSTricks,pdf,tikz-pgf,postscript,svg
only)
- The 1: after rgb is a divisor for the values
+ The "1:" after rgb is a divisor for the values
(xcolor manual p 16)'
ifelse(
m4postprocessor,pstricks,`define(`rgbstring',`ifelse(`$2',,`"$1"',
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4 b/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4
index 67b9a78773d..5f4693cd673 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4
@@ -1,7 +1,7 @@
divert(-1)
liblog.m4 Logic gates
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/mfpic.m4 b/Master/texmf-dist/doc/latex/circuit-macros/mfpic.m4
index d82cb5ffcea..6fde5de5284 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/mfpic.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/mfpic.m4
@@ -1,7 +1,7 @@
divert(-1)
mfpic.m4 Initialization for mfpic.
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/mpost.m4 b/Master/texmf-dist/doc/latex/circuit-macros/mpost.m4
index 9cc15dc8979..21fb7c01c9c 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/mpost.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/mpost.m4
@@ -1,7 +1,7 @@
divert(-1)
mpost.m4 Initialization for metapost.
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/pdf.m4 b/Master/texmf-dist/doc/latex/circuit-macros/pdf.m4
index 30c88f407d4..685dc5e93d1 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/pdf.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/pdf.m4
@@ -1,7 +1,7 @@
divert(-1)
pdf.m4 Initialization for pdf output.
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/pgf.m4 b/Master/texmf-dist/doc/latex/circuit-macros/pgf.m4
index 72f109832ff..2bdbef15500 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/pgf.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/pgf.m4
@@ -1,7 +1,7 @@
divert(-1)
pgf.m4 Initialization for Tikz-pgf.
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/postscript.m4 b/Master/texmf-dist/doc/latex/circuit-macros/postscript.m4
index da7e16ba341..42d546fb0c7 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/postscript.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/postscript.m4
@@ -1,7 +1,7 @@
divert(-1)
postscript.m4 Initialization for Postscript output.
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/psfrag.m4 b/Master/texmf-dist/doc/latex/circuit-macros/psfrag.m4
index 172ed5ce6dd..e05909a3275 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/psfrag.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/psfrag.m4
@@ -2,7 +2,7 @@ divert(-1)
psfrag.m4 Initialization for dpic -f processing:
Postscript with psfrag strings
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/pstricks.m4 b/Master/texmf-dist/doc/latex/circuit-macros/pstricks.m4
index f172c6cde3c..1da2497e567 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/pstricks.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/pstricks.m4
@@ -1,7 +1,7 @@
divert(-1)
pstricks.m4 Initialization for PSTricks.
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/svg.m4 b/Master/texmf-dist/doc/latex/circuit-macros/svg.m4
index f08764fd131..f545debb233 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/svg.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/svg.m4
@@ -1,7 +1,7 @@
divert(-1)
svg.m4 Initialization for svg output.
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4 b/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4
index 40a94e454c4..8a00a9368ee 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4
@@ -1,7 +1,7 @@
divert(-1)
xfig.m4 Initialization for xfig.
-* Circuit_macros Version 10.3, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *