summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-10-15 20:23:31 +0000
committerKarl Berry <karl@freefriends.org>2022-10-15 20:23:31 +0000
commit19aeadee8fa32b9cc9192c6daba31bb08644a0d5 (patch)
tree5da7a9df3896d731e11e436d6e949bf80f9eea74 /Master/texmf-dist
parentf80587771c52eb55c27e2bcdc8846d0e6dbc8746 (diff)
circuit_macros (14oct22)
git-svn-id: svn://tug.org/texlive/trunk@64713 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/CHANGES3
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/Copying2
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/README6
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/darrow.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdfbin1023203 -> 1025740 bytes
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/doc/PconnMan.m42
-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.tex136
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex78
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic2
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Contact.m420
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/EVplugs.m4209
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Euro.m41
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile2
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Pconn.m413
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Plate.m48
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Resistors.m44
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdfbin902995 -> 907801 bytes
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex15
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf90
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/shapes.m43
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/EVplugsSVG.m4210
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GeometrySVG.m44
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile2
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ResistorsSVG.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SmithchartSVG.m44
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx19
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/shapesSVG.m43
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig52
-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.m456
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/libgen.m414
-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/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.m418
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/xfig.m42
43 files changed, 747 insertions, 257 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/CHANGES b/Master/texmf-dist/doc/latex/circuit-macros/CHANGES
index 775d3f614d0..49a571e818c 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/CHANGES
+++ b/Master/texmf-dist/doc/latex/circuit-macros/CHANGES
@@ -1,5 +1,8 @@
CHANGES
+Version 10.0: New macros Between_, thyristor_t. Bugfix in inductor(,W).
+ Tweaked diff_, scr, scs, sus, sbs, tline, svg_font, contact.
+ Minor edits of the manual. Electric vehicle charging plug examples.
Version 9.9: Changes to libSLD macros, diode, sfg macros, rs_box,
r_text, svg_rot, examples. Changed SVG color macros for consistency with
other postprocessors.
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/Copying b/Master/texmf-dist/doc/latex/circuit-macros/Copying
index 6ff1081c39c..1f70c824021 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 430bf5e99f9..7f20713e40c 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 *
@@ -187,8 +187,8 @@ EXAMPLES
A set of examples is included in this distribution, showing electric
circuits, block diagrams, flow charts, signal-flow graphs, basic
use of colour and fill, and other applications. Some of the examples
- test the boundaries of the domain of application of dpic with m4 macros.
- Read the manual Circuit_macros.pdf and view the files examples.pdf
+ test the boundaries of the domain of application of dpic with m4
+ macros. Read the manual Circuit_macros.pdf and view examples.pdf
in the examples directory or make and view the html file in the
examples/svg directory. For the curious, There are additional source
files in the examples directory that are not shown in examples.pdf.
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4 b/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4
index e1d60731067..c795ab90f79 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4
@@ -1,7 +1,7 @@
divert(-1)
darrow.m4 Macros for double lines and arrows
-* Circuit_macros Version 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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/doc/Circuit_macros.pdf b/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdf
index 9c67589a6fb..6e109a06de1 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/PconnMan.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/PconnMan.m4
index 0933af6810a..2543048d005 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/doc/PconnMan.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/PconnMan.m4
@@ -43,7 +43,7 @@ P2: [
`"\tt (L,GF)"' at last [].s below
C10: pconnex(,GC) with .w at last [].e + (0.2,0)
`"\tt (,GC)"' ht 11pt__ at last [].s below
- C10: pconnex(,GCF) with .w at last [].e + (0.2,0)
+ C12: pconnex(,GCF) with .w at last [].e + (0.2,0)
`"\tt (,GCF)"' ht 11pt__ at last [].s below
C4: pconnex(,P) with .w at last [].e + (0.2,0)
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 45c581b3af8..c0b5abb2fd6 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 9.9
+Version 10.0
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 b984ec0435a..dc0738769f0 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/doc/body.tex
+++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/body.tex
@@ -613,12 +613,12 @@ circle diameter (last circle.width * 1.2) with .sw at last circle.ne}
The planar objects can be filled with gray or colour.
For example, either
-{\tt box dashed fill\_({\sl number})}\quad or\quad
+{\tt box dashed fill\_({\sl expression})}\quad or\quad
{\tt box dashed outlined "{\sl color}" shaded "{\sl color}"}
\noindent
produces a dashed box. The first case has a gray fill determined by
-{\sl number}, with $0$ corresponding to black and $1$ to white;
+{\sl expression}, with $0$ corresponding to black and $1$ to white;
the second case allows color outline and fill, the color strings depending on
the postprocessor.
Postprocessor-compatible RGB color strings are produced by the macro
@@ -666,10 +666,11 @@ function).
\subsection{Compound objects\label{Compoundobjects:}}
A compound object is a group of statements enclosed in square
-brackets. Such an object is placed by default as if it were a box, but
+brackets. Such an object, often called a {\em block},
+is placed by default as if it were a box, but
it can also be placed by specifying the final position of a defined point.
A defined point is the center or compass corner of the bounding box
-of the compound object or one of its internal objects.
+of the object or one of its internal objects.
Consider the last line of the code fragment shown:
\noindent%
@@ -683,6 +684,7 @@ The two gate macros evaluate to compound objects containing {\tt Out},
{\tt In1}, and other locations. The final positions of all objects
inside the square brackets are determined in the last line by
specifying the position of {\tt In1} of gate {\tt And2}.
+The compound block has been given the name {\tt Ands.}
\subsection{Other language facilities\label{Otherlanguage:}}
@@ -754,8 +756,8 @@ operating-system commands, \pic macros, and external file inclusion.
\xection{Two-terminal circuit elements\label{Basictwo:}}
There is a fundamental difference between the two-terminal elements, each
of which is drawn along an invisible straight-line segment,
-and other elements, which are compound objects mentioned
-in \SR{Compoundobjects:}.
+and other elements, which are generally compound objects
+in {\tt[} {\tt]} blocks as mentioned in \SR{Compoundobjects:}.
% Specifying the straight-line segment requires four numbers, the coordinates
% of the start and end, or equivalent, but default values are used if
% not specified.
@@ -827,11 +829,12 @@ and the remaining source lines of the file are explained below:
be given a name, {\tt R1} in the example, so that positions
{\tt R1.start}, {\tt R1.centre}, and {\tt R1.end} are automatically
defined as shown.
-\item The element body is overlaid by a block, which can be
- used to place labels around the element. The block
- corresponds to an invisible rectangle with horizontal top and bottom lines,
- regardless of the direction in which the element is drawn. A
- dotted box has been drawn in the diagram to show the block boundaries.
+\item The element body is drawn in or overlaid by a block, which can be
+ used to place labels around the body.
+ The block corresponds to an invisible rectangle with horizontal top
+ and bottom lines, regardless of the direction in which the element
+ is drawn. A dotted box has been drawn in the diagram to show the
+ block boundaries.
\item The last sub-element, identical to the first in two-terminal
elements, is an invisible line that can be referenced later to
place labels or other elements.
@@ -1146,9 +1149,9 @@ quote, in which case the argument is copied literally.
The third argument specifies the separation from the element.
\subsection{Labels\label{Labels:}}
- Arbitrary labels
+ Arbitrary text labels
can be positioned by any \pic\ placement method including the
- representative basic examples shown:
+ basic examples shown:
{\tt "}{\sl text}{\tt" at {\sl position}}\NVL
{\tt "}{\sl text}{\tt" at {\sl position} above}\NVL
@@ -1158,20 +1161,22 @@ The third argument specifies the separation from the element.
In addition, special macros for labeling two-terminal elements are available:
\par
{\tt
- llabel(} {\sl arg1,arg2,arg3} {\tt )
+ llabel(} {\sl label,\ label,\ label,\ rel placement,\ block name} {\tt )
\hfill\break\hspace*{\parindent}%
- clabel(} {\sl arg1,arg2,arg3} {\tt )
+ clabel(} {\sl label,\ label,\ label,\ rel placement,\ block name} {\tt )
\hfill\break\hspace*{\parindent}%
- rlabel(} {\sl arg1,arg2,arg3} {\tt )
+ rlabel(} {\sl label,\ label,\ label,\ rel placement,\ block name} {\tt )
\hfill\break\hspace*{\parindent}%
- dlabel(} {\sl long,lat,arg1,arg2,arg3,}{\tt[X][A|B][L|R])}
-
-The first macro places the three arguments, which are treated as math-mode
-strings, on the left side of the element block {\em with respect to the
-current direction:} {\tt up, down, left, right.}
-The second places the arguments along the centre, and the third along the
-right side.
-A simple circuit example with labels is shown in \FR{Loop}.
+ dlabel(} {\sl long,\ lat,\ label,\ label,\ label,\ }{\tt[X][A|B][L|R])}
+
+The first macro places the first three arguments, which are treated
+as math-mode strings, on the left side of the last {\tt []} block (or
+the block named in the fifth argument if present) {\em with respect to
+the current direction:} {\tt up, down, left, right.} The second macro
+places the strings along the centre of the element, and the third along
+the right side. Labels beginning with {\tt sprintf} or a double quote
+are copied literally rather than assumed to be in math mode. A simple
+circuit example with labels is shown in \FR{Loop}.
\begin{figure}[h!t]
\vspace*{-\baselineskip}
\parbox{4in}{\small \verbatiminput{Loop.m4}}%
@@ -1180,6 +1185,10 @@ A simple circuit example with labels is shown in \FR{Loop}.
\caption{A loop containing labeled elements, with its source code.}
\label{Loop}
\end{figure}
+Most commonly, only
+the first three arguments are needed, and blank arguments are ignored.
+The fourth argument can be {\tt above,} {\tt below,} {\tt left,} or {\tt
+right} to supplement the default relative position.
The macro {\tt dlabel} performs these functions for an
obliquely drawn element, placing the three macro arguments at
{\tt vec\_(-long,lat),} {\tt vec\_(0,lat),} and {\tt vec\_(long,lat)}
@@ -1188,9 +1197,6 @@ In the fourth argument, an {\tt X} aligns the labels with respect to the line
joining the two terminals rather than the element body, and
{\tt A, B, L, R} use absolute {\tt above, below, left,} or {\tt right} alignment
respectively for the labels.
-Labels beginning
-with {\tt sprintf} or a double quote are copied literally rather than
-assumed to be in math mode.
\xection{Placing two-terminal elements\label{Placing:}}
The length and position of a two-terminal element
@@ -1517,6 +1523,7 @@ The fifth argument is a string of characters. {\tt P}
adds a power connection, {\tt R} exchanges the second and
third entries, and {\tt T} truncates the opamp point.
+\enlargethispage{\baselineskip}
Typeset text associated with circuit elements is not rotated by default,
as illustrated by the second and third opamps in \FR{Opamp}.
The {\tt opamp} labels can be rotated if necessary by
@@ -1826,9 +1833,13 @@ and {\sl E} is shown in \FR{ujt}.
\label{ujt}
\end{figure}
-A thyristor macro with predefined internal locations
+The 3 or 4-terminal thyristor macro with predefined internal locations
{\sl G} and {\sl T1,} {\sl T2,} or
- {\sl A,} {\sl K} is in \FR{thyristor}.
+ {\sl A,} {\sl K,} {\sl G,} and {\sl Ga}
+ as appropriate is in \FR{thyristor}.
+Except for the {\sl G} and {\sl Ga} terminals,
+a thyristor (the {\tt IEC} variant excluded)
+is much like a two-terminal element.
\begin{figure}[H]
\input thyristorMan
\vspace*{-1ex}
@@ -1840,10 +1851,9 @@ A thyristor macro with predefined internal locations
to the second argument to draw open arrowheads.}
\label{thyristor}
\end{figure}
-Except for the {\sl G} terminal, a thyristor (the {\tt IEC} variant excluded)
-is much like a two-terminal element. The wrapper macro
-{\tt scr({\sl linespec, chars, label})} and similar macros
-{\tt scs, sus,} and {\tt sbs}
+The wrapper macro
+{\tt thyristor\_t({\sl linespec, chars, label})} and similar macros
+{\tt scr, scs, sus,} and {\tt sbs}
place thyristors using {\sl linespec} as for a two-terminal element,
but require a third argument for the label for the compound block; thus,
@@ -3327,25 +3337,28 @@ distribution. The \latex drawing commands alone or with {\tt eepic}
or {\tt pict2e} extensions are suitable only for simple diagrams.
\xection{Developer's notes\label{Developersnotes:}}
-Years ago in the course of writing a book, I took a few days off to
-write a \pic-like interpreter (\dpic) to eliminate the tedious coordinate
-calculations required when drawing with \latex picture objects.
-The macros in this distribution and the interpreter are the result of that
-effort, drawings I have had to produce since, and suggestions received
-from others. The interpreter has been upgraded over time to generate
-\mfpic, \MetaPost~\cite{metapost}, raw \Postscript, \Postscript with {\tt
-psfrag} tags, raw PDF, \PSTricks, and Ti{\it k}Z PGF output, the latter
-two my preference because of their quality and flexibility, including
-facilities for colour and rotations, together with simple font selection.
-\Xfig{}-compatible output was introduced early on to allow the creation of
-diagrams both by programming and by interactive graphics. \SVG output
-was added relatively recently, and seems suitable for producing web
-diagrams directly and for further editing by the Inkscape interactive
-graphics editor. The latest addition is raw PDF output, which has very
-basic text capability and is most suitable for creating diagrams without
-labels, but on which sophisticated text can be overlaid if necessary.
-\Dpic can write the coordinates of selected locations to an external
-file to be used in overlaying text or other items on the diagram.
+In the course of writing a book in the late 1980s when there was little
+available for creating line diagrams in \latex, I wished to eliminate
+the tedious coordinate calculations required by the \latex
+picture objects that I was then using. The \pic\ language seemed to be a
+good fit for this purpose, and I took a few days off to write a \pic-like
+interpreter (\dpic). The macros in this distribution and the interpreter
+are the result of that effort, drawings I have had to produce since,
+and suggestions received from others. The interpreter has been upgraded
+over time to generate \mfpic, \MetaPost~\cite{metapost}, raw \Postscript,
+\Postscript with {\tt psfrag} tags, raw PDF, \PSTricks, and Ti{\it k}Z
+PGF output, the latter two my preference because of their quality and
+flexibility, including facilities for colour and rotations, together
+with simple font selection. \Xfig{}-compatible output was introduced
+early on to allow the creation of diagrams both by programming and by
+interactive graphics. \SVG output was added relatively recently, and
+seems suitable for producing web diagrams directly and for further editing
+by the Inkscape interactive graphics editor. The latest addition is raw
+PDF output, which has very basic text capability and is most suitable for
+creating diagrams without labels, but on which sophisticated text can
+be overlaid if necessary. \Dpic can write the coordinates of selected
+locations to an external file to be used in overlaying text or other
+items on the diagram.
The simple \pic\ language is but one of many available tools for creating
line graphics. Consequently, the main value of this distribution is
@@ -3363,21 +3376,22 @@ can be worth the effort.
Instead of using \pic macros, I preferred the equally simple but more
powerful \Mfour macro processor, and therefore \Mfour is required here,
-although \dpic now supports \pic-like macros. Free versions of \Mfour
+although \dpic now supports \pic macros. Free versions of \Mfour
are available for Unix and its descendents, Windows, and other operating
systems. Additionally, the simplicity of \Mfour and \pic enables the
writing of custom macros, which are mentioned from time to time in this
manual and included in some of the examples.
If starting over today would I not just use one of the other drawing
-packages available these days? It would depend on the context, but \pic
-remains a good choice for line drawings because it is easy to learn
-and read but powerful enough for coding the geometrical calculations
-required for precise component sizing and placement. It would be nice
-if arbitrary rotations and scaling were simpler and if a general path
-element with clipping were available as in \Postscript. However,
-all the power of \Postscript or \TPGF, for example, remains available,
-as arbitrary postprocessor code can be included with \pic code.
+packages available these days? It would depend on the context, but
+\pic remains a good choice for line drawings because it is easy to learn
+and read but powerful enough (that is, Turing-complete) for coding the
+geometrical calculations required for precise component sizing and
+placement. It would be nice if arbitrary rotations and scaling were
+simpler and if a general path element with clipping were available
+as in \Postscript. However, all the power of \Postscript or \TPGF,
+for example, remains available, as arbitrary postprocessor code can be
+included with \pic code.
The \dpic interpreter has several output-format options that may be
useful. The {\tt eepicemu} and {\tt pict2e} extensions of the
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 dfcee2f91d6..7ac3cbaed42 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex
+++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex
@@ -251,6 +251,10 @@
\macrodef{below\_}{below_}{}
{gen}
{string position relative to current direction}
+\macrodef{Between\_}{Between_}{({\sl Pos1, Pos2,distance,}[R])}
+ {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
@@ -370,17 +374,18 @@
{gen}
{Upper (lower if arg5={\tt R}) intersection of circles at
{\sl Pos1} and {\sl Pos2}, radius {\sl rad1} and {\sl rad2}}
-\macrodef{clabel}{clabel}{({\sl label},{\sl label},{\sl label},{\sl arg4},%
- {\sl arg5})}
- {cct}
- {Triple label along the drawing axis of an element in the current
- direction \seesect{Labels:}. Labels are placed at the beginning,
- centre, or end of the last {\tt []} block (or a named {\tt []}
- block). The labels are treated as math, but copied literally if
- in double quotes or defined by sprintf. {\sl Arg4} can be {\tt
- above,} {\tt below,} {\tt left,} or {\tt right} to supplement the
- default position. {\sl Arg5} is the optional name of a {\tt []}
- block to be labelled and is {\tt last []} by default}
+\macrodef{clabel}{clabel}{({\sl label},{\sl label},{\sl label},[{\sl arg4}],%
+ [{\sl block name}])}
+ {cct}
+ {Triple label along the draing axis of the body of an element in the
+ current direction \seesect{Labels:}. Labels are placed at the
+ beginning, centre, and end of the last {\tt []} block (or a named
+ {\tt []} block). Each label is treated as math by default, but is
+ copied literally if it is in double quotes or defined by sprintf.
+ {\sl Arg4} can be {\tt above,} {\tt below,} {\tt left,} or {\tt
+ right} to supplement the default relative position. The fifth
+ argument is the optional name of the {\tt []} block to be labelled,
+ which is {\tt last []} by default}
\macrodef{cm\_\_}{cm__}{}
{gen}
{absolute centiimetres}
@@ -1158,17 +1163,18 @@ n|e|s|w,{\sl length})}
\macrodef{ljust\_}{ljust_}{}
{gen}
{ljust with respect to current direction}
-\macrodef{llabel}{llabel}{({\sl label},{\sl label},{\sl label},{\sl arg4},%
- {\sl arg5})}
- {cct}
- {Triple label on the left of an element with respect to the current
- direction \seesect{Labels:}. Labels are placed at the beginning,
- centre, or end of the last {\tt []} block (or a named {\tt []}
- block). The labels are treated as math, but copied literally if
- in double quotes or defined by sprintf. {\sl Arg4} can be {\tt
- above,} {\tt below,} {\tt left,} or {\tt right} to supplement the
- default position. {\sl Arg5} is the optional name of a {\tt []}
- block to be labelled and is {\tt last []} by default}
+\macrodef{llabel}{llabel}{({\sl label},{\sl label},{\sl label},[{\sl arg4}],%
+ [{\sl block name}])}
+ {cct}
+ {Triple label on the left of the body of an element with respect to the
+ current direction \seesect{Labels:}. Labels are placed at the
+ beginning, centre, and end of the last {\tt []} block (or a named
+ {\tt []} block). Each label is treated as math by default, but is
+ copied literally if it is in double quotes or defined by sprintf.
+ {\sl Arg4} can be {\tt above,} {\tt below,} {\tt left,} or {\tt
+ right} to supplement the default relative position. The fifth
+ argument is the optional name of the {\tt []} block to be labelled,
+ which is {\tt last []} by default}
\macrodef{loc\_}{loc_}{({\sl x}, {\sl y})}
{gen}
{location adjusted for current direction}
@@ -1640,17 +1646,18 @@ degrees})}
\macrodef{rjust\_}{rjust_}{}
{gen}
{right justify with respect to current direction}
-\macrodef{rlabel}{rlabel}{({\sl label},{\sl label},{\sl label},{\sl arg4},%
- {\sl arg5})}
- {cct}
- {Triple label on the right of an element with respect to the current
- direction \seesect{Labels:}. Labels are placed at the beginning,
- centre, or end of the last {\tt []} block (or a named {\tt []}
- block). The labels are treated as math, but copied literally if
- in double quotes or defined by sprintf. {\sl Arg4} can be {\tt
- above,} {\tt below,} {\tt left,} or {\tt right} to supplement the
- default position. {\sl Arg5} is the optional name of a {\tt []}
- block to be labelled and is {\tt last []} by default}
+\macrodef{rlabel}{rlabel}{({\sl label},{\sl label},{\sl label},[{\sl arg4}],%
+ [{\sl block name}])}
+ {cct}
+ {Triple label on the right of the body of an element with respect to the
+ current direction \seesect{Labels:}. Labels are placed at the
+ beginning, centre, and end of the last {\tt []} block (or a named
+ {\tt []} block). Each label is treated as math by default, but is
+ copied literally if it is in double quotes or defined by sprintf.
+ {\sl Arg4} can be {\tt above,} {\tt below,} {\tt left,} or {\tt
+ right} to supplement the default relative position. The fifth
+ argument is the optional name of the {\tt []} block to be labelled,
+ which is {\tt last []} by default}
\macrodef{rot3Dx}{rot3Dx}{({\sl radians,x,y,z})}
{3D} {rotates x,y,z about x axis}
\macrodef{rot3Dy}{rot3Dy}{({\sl radians,x,y,z})}
@@ -2414,6 +2421,11 @@ justification})}
centre,
R=right orientation, E=envelope
\seesect{Semiconductors:}}
+\macrodef{thyristor\_t}{thyristor_t}{({\sl linespec, chars, label})}
+ {cct}
+ {Wrapper to place a thyristor as a two-terminal element with
+ {\tt [ ]} block label given by the third argument
+ \seesect{Semiconductors:}}
\macrodef{tikznode}{tikznode}{({\sl \Tikz node name, position}) }
{pgf}
{insert \Tikz code to define a zero-size \Tikz node at {\sl location}
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic b/Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic
index 66453a30e4e..f3936bb0db2 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 9.9, copyright (c) 2022 J. D. Aplevich under #
+# Circuit_macros Version 10.0, copyright (c) 2022 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/Contact.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Contact.m4
index 26f8d5a9822..e4e7a5a176b 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Contact.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Contact.m4
@@ -9,16 +9,16 @@ movw = 0.45
"\sl P" rjust at last [].P.w
"\sl O" ljust at last [].O
"\sl C" ljust at last [].C }
- move right_ movw; contact(R)
- {`"\tt (R)"' at (last [].s,S)
+ move right_ movw; contact(RX)
+ {`"\tt (RX)"' at (last [].s,S)
"\sl P" rjust at last [].P.w
"\sl O" ljust at last [].O
"\sl C" ljust at last [].C }
- move right_ movw; contact(O); {`"\tt (O)"' at (last [],S)}
- move right_ movw; contact(C); {`"\tt (C)"' at (last [],S)}
+ move right_ movw; contact(OX); {`"\tt (OX)"' at (last [],S)}
+ move right_ movw; contact(CX); {`"\tt (CX)"' at (last [],S)}
- move right_ movw; contact(P)
- {S: `"\tt (P)"' at last [].s+(0,-0.15)
+ move right_ movw; contact(X)
+ {S: `"\tt (X)"' at last [].s+(0,-0.15)
"\sl P" rjust at last [].P.w
"\sl O" ljust at last [].O
"\sl C" ljust at last [].C }
@@ -30,7 +30,7 @@ movw = 0.45
move right_ movw; contact(PO); {`"\tt (PO)"' at (last [],S)}
{"\sl O" ljust at last [].O
"\sl C" ljust at last [].C }
- move right_ movw; contact(PC); {`"\tt (PC)"' at (last [],S)}
+ move right_ movw; contact(PCX); {`"\tt (PCX)"' at (last [],S)}
}
move down 0.75; right_ ; {
@@ -50,7 +50,11 @@ move down 0.75; right_ ; {
{"\sl O" ljust at last [].O.e
"\sl C" ljust at last [].C.e }
move right_ movw; contact(PIO); {`"\tt (PIO)"' at (last [],S) }
- move right_ movw; contact(PIC); {`"\tt (PIC)"' at (last [],S) }
+ {"\sl C" ljust at last [].C.e}
+ {"\sl O" ljust at last [].O.e}
+ move right_ movw; contact(PICX); {`"\tt (PICX)"' at (last [],S) }
+ {"\sl C" ljust at last [].C.e}
+ {"\sl O" ljust at last [].O.e}
}
movewid = movw
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/EVplugs.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/EVplugs.m4
new file mode 100644
index 00000000000..5631482bf9a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/EVplugs.m4
@@ -0,0 +1,209 @@
+.PS
+# EV_lugs.m4
+# https://en.wikipedia.org/wiki/CHAdeMO
+gen_init
+divert(-1)
+
+ `EV_J1772(keys)
+ EV charging plug in a [] block
+ keys: wdth=expr; # plug width
+ diamLNP=expr; # diam of L1, N, PE
+ twdth=expr; # tab width
+ thgt=expr; # tab hght
+ thick=expr; # outer line thickness (pt)
+ inthick=expr; # inner line thickness (pt)
+ BG=attributes; # shaded gray etc
+ L1=attributes; # L1 attributes ...
+ N=attributes;
+ PE=attributes;
+ PP=attributes;
+ CP=attributes; '
+define(`pEVskale',25.4) dnl default plug size (20 mm)
+define(`EV_J1772',`[ pushkeys_(`$1', `wdth:20/pEVskale;
+ twdth:3.5/20*m4wdth; thgt:1.5/20*m4wdth; diamLNP:6/20*m4wdth;
+ thick:2; inthick:1.5; BG::N; L1::N; N::N; PE::N; PP::N; CP::N; ')
+ tang = atan2(m4twdth/2,m4wdth/2)*rtod_
+ TS: (Rect_(m4wdth/2,-90-tang)); TE: (Rect_(m4wdth/2,-90+tang))
+ Tab: line thick m4thick from TS down_ m4thgt \
+ then to TE-(0,m4thgt) then to TE m4BG
+ Arc: arc thick m4thick to TS with .c at (0,0) m4BG
+ round(at TS,last arc.thick); round(at TE,last arc.thick)
+ L1: circle diam m4diamLNP thick m4inthick at (Rect_(m4wdth/4,150)) m4L1
+ N: circle diam m4diamLNP thick m4inthick at (Rect_(m4wdth/4, 30)) m4N
+ PE: circle diam m4diamLNP thick m4inthick at (0,-m4wdth/4) m4PE
+ PP: circle diam m4diamLNP*0.55 thick m4inthick at (Rect_(m4wdth/3,210)) m4PP
+ CP: circle diam m4diamLNP*0.55 thick m4inthick at (Rect_(m4wdth/3,-30)) m4CP
+ `$2' popdef(`m4CP',`m4PP',`m4PE',`m4N',`m4L1',`m4BG',
+ `m4wdth',`m4diamLNP',`m4twdth',`m4thgt',`m4thick',`m4inthick') ]')
+
+ `EV_J3068(keys,shade)
+ EV charging plug in a [] block
+ keys: wdth=expr; # plug width
+ diamLNP=expr; # diam of L1, N, PE
+ twdth=expr; # tab width
+ thgt=expr; # tab hght
+ thick=expr; # outer line thickness (pt)
+ inthick=expr; # inner line thickness (pt)
+ BG=attributes; # shaded gray etc
+ L1|L2|L3=attributes; # pin attributes ...
+ N=attributes;
+ PE=attributes;
+ PP=attributes;
+ CP=attributes;
+ arg2= R:G:B background fill color '
+define(`EV_J3068',`[ pushkeys_(`$1',
+ `wdth:25/pEVskale; diamLNP:m4wdth*0.25; thick:2; inthick:1.5;
+ BG::N; L1::N; L2::N; L3::N; N::N; PE::N; PP::N; CP::N; ')
+ C: Here
+ NE: C+(Rect_(m4wdth/2,45)); NW: C+(Rect_(m4wdth/2,135))
+ Ac: NE-(1,1)/sqrt(2)*m4diamLNP/2
+ Arc: arc thick m4thick from NW to NE with .c at C m4BG ifelse(`$2',,,
+ `shaded rgbstring(patsubst(`$2',:,`,'))
+ line invis from NE to Ac+(0,m4diamLNP/2) \
+ then to Ac+(0,m4diamLNP/2) \
+ then to NW+(1,-1)/sqrt(2)*m4diamLNP/2 + (0,m4diamLNP/2) \
+ then to NW then to NE shaded rgbstring(patsubst(`$2',:,`,'))')
+ arc thick m4thick to Ac+(0,m4diamLNP/2) with .c at Ac m4BG
+ Top: line thick m4thick to (NW+NE-Ac, Here) m4BG
+ arc thick m4thick to NW with .c at Here+(0,-m4diamLNP/2) m4BG
+ PE: circle diam m4diamLNP thick m4inthick at C m4PE
+ PP: circle diam m4diamLNP*0.55 thick m4inthick at C+(Rect_(m4wdth/3,45)) m4PP
+ CP: circle diam m4diamLNP*0.55 thick m4inthick at C+(Rect_(m4wdth/3,135)) m4CP
+ L1: circle diam m4diamLNP thick m4inthick at C+(m4wdth*.3,0) m4L1
+ L2: circle diam m4diamLNP thick m4inthick at C+(Rect_(m4wdth*.3,-60)) m4L2
+ L3: circle diam m4diamLNP thick m4inthick at C+(Rect_(m4wdth*.3,-120)) m4L3
+ N: circle diam m4diamLNP thick m4inthick at C-(m4wdth*.3,0) m4N
+ `$3' popdef(`m4wdth',`m4diamLNP',`m4thick',`m4inthick',
+ `m4BG',`m4L1',`m4L2',`m4L3',`m4N',`m4PE',`m4PP',`m4CP') ]')
+
+ `EV_CCS1(J1772 keys,DC keys)
+ DC keys: wdth=expr; # DC socket width
+ hght=expr; # DC socket height
+ diamPM=expr; # diam of DC+, DC- circles
+ sep=expr; # separation of Jack and DC
+ thick=expr; # outer line thickness (pt)
+ inthick=expr; # inner line thickness (pt)
+ BG=attributes; # shaded gray etc
+ DCplus=attributes;
+ DCminus=attributes; '
+define(`EV_CCS1',`[
+ J: EV_J1772(`$1')
+ pushkeys_(`$2',`wdth:J.wid:23.5/20; hght:J.wid*11/20; diamPM:m4hght*7/11;
+ sep:J.wid*3/30; thick:J.Arc.thick; inthick:J.PE.thick;
+ BG::N; DCplus::N; DCminus::N;')
+ DC: [ Box: box thick m4thick wid m4wdth ht m4hght rad m4hght/2 m4BG
+ DCplus: circle thick m4inthick diam m4diamPM at Box.w+(m4hght/2,0) m4DCplus
+ DCminus:circle thick m4inthick diam m4diamPM at Box.e-(m4hght/2,0) m4DCminus
+ ] with .n at J.s+(0,-m4sep)
+ popdef(`m4wdth',`m4hght',`m4diamPM',`m4sep',`m4thick',`m4inthick',`m4BG',
+ `m4DCplus',`m4DCminus')
+ ]')
+
+ `EV_CCS2(J3068 keys,shade,DC keys)
+ DC keys: wdth=expr; # DC socket width
+ hght=expr; # DC socket height
+ diamPM=expr; # diam of DC+, DC- circles
+ sep=expr; # separation of Jack and DC
+ thick=expr; # outer line thickness (pt)
+ inthick=expr; # inner line thickness (pt)
+ BG=attributes; # shaded gray etc
+ DCplus=attributes;
+ DCminus=attributes;
+ arg2= R:G:B background fill color '
+define(`EV_CCS2',`[
+ J: EV_J3068(`$1',`$2')
+ pushkeys_(`$3',`wdth:J.wid:23.5/20; hght:J.wid*11/20; diamPM:m4hght*7/11;
+ sep:J.wid*3/30; thick:J.Arc.thick; inthick:J.PE.thick;
+ BG::N; DCplus::N; DCminus::N;')
+ DC: [ Box: box thick m4thick wid m4wdth ht m4hght rad m4hght/2 dnl
+ m4BG ifelse(`$2',,,`shaded rgbstring(patsubst(`$2',:,`,'))')
+ DCplus: circle thick m4inthick diam m4diamPM at Box.w+(m4hght/2,0) m4DCplus
+ DCminus:circle thick m4inthick diam m4diamPM at Box.e-(m4hght/2,0) m4DCminus
+ ] with .n at J.s+(0,-m4sep)
+ popdef(`m4wdth',`m4hght',`m4diamPM',`m4sep',`m4thick',`m4inthick',`m4BG',
+ `m4DCplus',`m4DCminus')
+ ]')
+
+ `EV_CHAdeMO(keys,shade)
+ EV charging plug in a [] block
+ keys: wdth=expr; # plug width
+ thick=expr; # outer line thickness (pt)
+ inthick=expr; # inner line thickness (pt)
+ BG=attributes; # background shaded gray etc
+ DCplus=|DCminusNS=|FG=|NC=|SS1=|DCP=|PP=|
+ CL=|CH=|SS2=attributes # pin attributes ...'
+define(`EV_CHAdeMO',`[ pushdef(`m4sk',33/140/pEVskale) pushkeys_(`$1',
+ `wdth:140*m4sk; thick:m4wdth*9/140/(1bp__); inthick:m4thick*1.5/9;
+ BG::N; DCplus::N; DCminus::N;N::N;S::N;
+ FG::N; NC::N; SS1::N; DCP::N; PP::N; CL::N; CH::N; SS2::N')
+ C: circle thick m4thick diam m4wdth-m4thick bp__ m4BG
+ line thick m4thick*0.6 from C+(Rect_(C.rad+m4thick bp__*3/4,42)) \
+ to C+(Rect_(C.rad+m4thick bp__*3/4,50)) then left m4thick bp__ m4BG
+ line thick m4thick*0.6 from C+(Rect_(C.rad+m4thick bp__*3/4,138)) \
+ to C+(Rect_(C.rad+m4thick bp__*3/4,130)) then right m4thick bp__ m4BG
+ idiam = (m4wdth-m4thick bp__*2)*47/(27+47*2)
+ N: circle diam idiam thick m4inthick with .n at C.n-(0,m4thick bp__/2) m4N
+ S: circle diam idiam thick m4inthick with .s at C.s+(0,m4thick bp__/2) m4S
+ E: circle diam idiam thick m4inthick at Cintersect(N,N.diam,S,S.diam) m4DCminus
+ W: circle diam idiam thick m4inthick at Cintersect(S,S.diam,N,N.diam) m4DCplus
+ Loopover_(`Z',
+ `line thick m4inthick up Z.diam*0.6 right Z.diam*0.6 with .c at Z
+ line thick m4inthick up Z.diam*0.6 left Z.diam*0.6 with .c at Z',N,S)
+ Loopover_(`L',`L: circle diam idiam/4 thick linethick/2 \
+ at N+(Rect_(idiam/4,90*m4Lx)) m4xpand(m4`'L)',FG,NC,DCP,SS1)
+ Loopover_(`L',`L: circle diam idiam/4 thick linethick/2 \
+ at S+(Rect_(idiam/4,90*m4Lx)) m4xpand(m4`'L)',PP,CL,SS2,CH)
+ `$3' popdef(`m4sk',`m4wdth',`m4thick',`m4inthick',`m4BG',
+ `m4DCplus',`m4DCminus',`m4N',`m4S',
+ `m4FG',`m4NC',`m4SS1',`m4DCP',`m4PP',`m4CL',`m4CH',`m4SS2') ]')
+
+divert(0)dnl
+
+ ifsvg(svg_font(sans-serif,6bp__))
+ iflatex(command "{\sf\scriptsize")
+ define(`EVsmall',`ifsvg(svg_small(`$1'),{\tiny `$1'})')
+ define(`EVtxt',`ifsvg(``$1'',`{patsubst(`$1',_,\\_)}')')
+ define(`EVk',`ifsvg(+(0,0.75bp__))')
+
+[
+P1: EV_J1772(BG=fill_(0.75); PE=fill_(1) "PE";L1=fill_(1) "L1";N=fill_(1) "N";
+ PP=fill_(1); CP=fill_(1);)
+ "EVsmall(PP)" at P1.PP EVk
+ "EVsmall(CP)" at P1.CP EVk
+
+P2: EV_J3068(PE=shaded "green" "PE";\
+ L1=shaded "yellow" "L1";L2=shaded "yellow" "L2";L3=shaded "yellow" "L3";
+ N=fill_(1) "N";",
+ 0.85:0.85:0.85) at P1+(15bp__,0) \
+ with .w at P1.e+(P1.wid/5,0)
+ "EVsmall(PP)" at P2.PP EVk
+ "EVsmall(CP)" at P2.CP EVk
+
+P3: EV_CCS1(L1="L1";N="N";PE="PE",
+ DCplus="DC+";DCminus="DC-") with .w at P2.e+(P1.wid/5,0)
+ "EVsmall(PP)" at P3.J.PP EVk
+ "EVsmall(CP)" at P3.J.CP EVk
+
+P4: EV_CCS2(L1="L1";L2="L2";L3="L3";N="N";PE="PE",0.85:0.85:0.85,
+ DCplus="DC+";DCminus="DC-") with .w at P3.e+(P1.wid/5,0)
+ "EVsmall(PP)" at P4.J.PP EVk
+ "EVsmall(CP)" at P4.J.CP EVk
+P5: EV_CHAdeMO( BG=outlined "blue" fill_(0.8);
+ DCplus=shaded "red" "DC+";
+ DCminus=shaded "red" "DC-";
+ Loopover_(`L',`L=fill_(1);',N,S)
+ FG=shaded "green";
+ Loopover_(`L',`L=shaded "orange";',SS1,DCP,NC,PP,CH,SS2,CL)) \
+ with .w at P4.e+(P4.w.x-P3.e.x,0)
+ Loopover_(`L',`"EVsmall(L)" at P5.L EVk',FG,NC,DCP,SS1,PP,CL,CH,SS2)
+#
+ "EVtxt(`EV_CCS2')" at P4.s+(0,-10bp__)
+ "EVtxt(`EV_CCS1')" at (P3,last "")
+ "EVtxt(`EV_J3068')" at (P2,last "")
+ "EVtxt(`EV_J1772')" at (P1,last "")
+ "EVtxt(`EV_CHAdeMO')" at (P5,last "")
+ ] # with .nw at last [].sw+(0,-0.2)
+
+ iflatex(command "}%")
+ ifsvg(command "</g>")
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Euro.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Euro.m4
index 5186cb2f5c1..26230facbe7 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Euro.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Euro.m4
@@ -1,6 +1,5 @@
.PS
#Euro.m4
-include(pstricks.m4)
gen_init
divert(-1)
`euro_simple([height])
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile
index 55cf147dcc2..c582c0b35c4 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile
@@ -61,7 +61,7 @@ PICS = \
Contacts.tex Contact.tex control.tex Crossbar.tex Crow.tex \
csc.tex Csource.tex Decoder.tex \
Demultiplexer.tex diamond.tex Dini.tex Diodes.tex Drive.tex \
- EEP.tex Emarrows.tex Escher.tex \
+ EEP.tex Emarrows.tex Escher.tex EVplugs.tex \
ex00.tex ex01.tex ex02.tex ex03.tex ex04.tex ex05.tex ex06.tex ex08.tex \
ex09.tex ex10.tex ex11.tex ex12.tex ex15.tex ex16.tex ex17.tex ex18.tex \
ex21.tex exp.tex fet.tex Flow.tex Fuses.tex GrayCode.tex graysurf.tex \
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Pconn.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Pconn.m4
index cb8afd0875e..2543048d005 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Pconn.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Pconn.m4
@@ -45,13 +45,18 @@ P2: [
`"\tt (,GC)"' ht 11pt__ at last [].s below
C12: pconnex(,GCF) with .w at last [].e + (0.2,0)
`"\tt (,GCF)"' ht 11pt__ at last [].s below
-] with .nw at P1.C1.sw + (0,-0.35)
-P3: [
- C4: pconnex(,P)
+ C4: pconnex(,P) with .w at last [].e + (0.2,0)
`"\tt (,P)"' at last [].s below
C11: pconnex(,PF) with .w at last [].e+(0.2,0)
`"\tt (,PF)"' at (C11,last "") below
-] with .nw at P2.C9.sw + (0,-0.35)
+] with .nw at P1.C1.sw + (0,-0.35)
+
+#P3: [
+# C4: pconnex(,P)
+# `"\tt (,P)"' at last [].s below
+# C11: pconnex(,PF) with .w at last [].e+(0.2,0)
+# `"\tt (,PF)"' at (C11,last "") below
+#] with .nw at P2.C9.sw + (0,-0.35)
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Plate.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Plate.m4
index 0700f072a02..3937543d2a1 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Plate.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Plate.m4
@@ -5,10 +5,10 @@
# See the ASME Y14.5 standard, Figure 6-30.
scale = 100/3
cct_init
-include(ASME_Y14-5.m4)
+ifdef(`ASME_Y14-5_',,`include(ASME_Y14-5.m4)')
ifsvg(`svg_font(sans-serif,10bp__)',
`textht = 10bp__*2/3
- iflatex(`command "{\sf"')')
+ iflatex(`command "{\sf\small"')')
# ASME Y14.5 specs:
arrowht = textht*0.8
arrowwid = textht*0.6
@@ -157,11 +157,11 @@ thinlines_
for_(0,315,45,`ctrarcr(C,d6/2,(m4x-22.5)*dtor_,(m4x+22.5)*dtor_)
ctrline(from C+(Rect_(d6-d7/2,m4x)) to C+(Rect_(d7/2,m4x))) ')
arcdimension_(from C+(0,d7/2) to C+(Rect_(d7/2,135)) with .c at C,
- 8,"8X 45`'iflatex($^\circ$)" wid textht*3.5,15,1)
+ 8,"8 X 45`'iflatex($^\circ$)" wid textht*3.5,15,1)
ifsvg("svg_deg" wid textht*2/3 with .w at last "".e)
move to C+(0,d6/2)
arrow <- from Here+(Rect_(8/2,75)) to Here+(Rect_(25,75)) then right_ 3
- "8X" wid 2*textht ljust
+ "8 X" wid 3*textht ljust
linethick_(1); [Y14_dia_] with .w at last "".e+(1,0)
"7.9 - 8.1" wid 8*textht ljust
Y14_frame(Y14_pos_,Y14_dia_;"0.14" wid 3*textht;"(M)","A","C") \
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Resistors.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Resistors.m4
index 659f75ff65b..960897afc03 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Resistors.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Resistors.m4
@@ -29,8 +29,8 @@ vm = 0.28
move down vm; right_
{ {ebox(,,,0.9) ; move ;"`{\tt ebox(,{,},0.9)}'" ljust}
move right_ hm
- {ebox(,,,,shaded "green") ; move
- "`{\tt ebox(,{,},{,}shaded \"green\")}'" ljust}
+ {ebox(,,,,shaded "yellow") ; move
+ "`{\tt ebox(,{,},{,}shaded \"yellow\")}'" ljust}
}
move down vm; right_
{ {ebox(,wdth=0.2;box=dashed shaded "green";text="X") ; move
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 dafab3e6a7b..184aa8a4006 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/files.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex
index 5fbcf50af86..22c3a5c5fdf 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex
@@ -60,6 +60,7 @@
\caption{Macros {\tt fuse} and {\tt cbreaker}
\src{Fuses.m4}.}
}
+
\bfig{
\centerline{\getpic{MoreTable}}
\caption{Additional two-terminal elements
@@ -152,6 +153,13 @@
}
\bfig{
+ \centerline{\getpic{EVplugs}}
+ \caption{Electric vehicle charging plug patterns make extensive
+ use of {\sl key=value} pairs to set options
+ \src{EVplugs.m4}.}
+ }
+
+\bfig{
\centerline{\getpic{Headers}}
\caption{The {\tt Header} macro
\src{Headers.m4}.}
@@ -183,7 +191,8 @@
\bfig{
\centerline{\getpic{thyristor}}
- \caption{Thyristor examples
+ \caption{Thyristor examples. The thyristor is a 3- or 4-terminal
+ composite element
\src{thyristor.m4}.}
}
@@ -589,7 +598,9 @@
\bfig{
\centerline{\getpic{random}}
- \caption{Testing random number generation
+ \caption{Testing random number generation using
+ dpic macro {\tt randn(}{\sl array name, n, mean, std dev}{\tt)}
+ which calls pic built-in {\tt rand()}
\src{random.m4}.}
}
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 10b713bb508..6e6fa4f73e1 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 2022/07/27 at 16:40
+% from TeX source "font" on 2022/10/13 at 18:50
numeric mfpicversion; mfpicversion := 110;
if unknown mode: mode := localfont; fi
if unknown mag: mag := 1000/1000; fi
@@ -81,68 +81,68 @@ store (curpath)
drawn
polyline (false)
((0,0),
-(0.020249,0));
+(0.024933,0));
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.020249,0),0.002767);
+circle ((0.024933,0),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.065564,0.021131),-155,-410,0.05);
+arcplr ((0.070249,0.021131),-155,-410,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.097703,-0.017171),0.002767);
+circle ((0.102388,-0.017171),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.129843,0.021131),-130,-410,0.05);
+arcplr ((0.134527,0.021131),-130,-410,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.161982,-0.017171),0.002767);
+circle ((0.166667,-0.017171),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.194121,0.021131),-130,-410,0.05);
+arcplr ((0.198806,0.021131),-130,-410,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.226261,-0.017171),0.002767);
+circle ((0.230945,-0.017171),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.2584,0.021131),-130,-385,0.05);
+arcplr ((0.263085,0.021131),-130,-385,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.303716,0),0.002767);
+circle ((0.3084,0),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
polyline (false)
-((0.313085,0),
+((0.3084,0),
(0.333333,0));
endmfpic; % (3) line 59 in the TeX source.
@@ -163,68 +163,68 @@ store (curpath)
drawn
polyline (false)
((0,0),
-(0,-0.020249));
+(0,-0.024933));
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0,-0.020249),0.002767);
+circle ((0,-0.024933),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.021131,-0.065564),115,-140,0.05);
+arcplr ((0.021131,-0.070249),115,-140,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.017171,-0.097703),0.002767);
+circle ((-0.017171,-0.102388),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.021131,-0.129843),140,-140,0.05);
+arcplr ((0.021131,-0.134527),140,-140,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.017171,-0.161982),0.002767);
+circle ((-0.017171,-0.166667),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.021131,-0.194121),140,-140,0.05);
+arcplr ((0.021131,-0.198806),140,-140,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.017171,-0.226261),0.002767);
+circle ((-0.017171,-0.230945),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.021131,-0.2584),140,-115,0.05);
+arcplr ((0.021131,-0.263085),140,-115,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0,-0.303716),0.002767);
+circle ((0,-0.3084),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
polyline (false)
-((0,-0.313085),
+((0,-0.3084),
(0,-0.333333));
endmfpic; % (4) line 77 in the TeX source.
@@ -245,68 +245,68 @@ store (curpath)
drawn
polyline (false)
((0,0),
-(-0.020249,0));
+(-0.024933,0));
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.020249,0),0.002767);
+circle ((-0.024933,0),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.065564,-0.021131),25,-230,0.05);
+arcplr ((-0.070249,-0.021131),25,-230,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.097703,0.017171),0.002767);
+circle ((-0.102388,0.017171),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.129843,-0.021131),50,-230,0.05);
+arcplr ((-0.134527,-0.021131),50,-230,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.161982,0.017171),0.002767);
+circle ((-0.166667,0.017171),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.194121,-0.021131),50,-230,0.05);
+arcplr ((-0.198806,-0.021131),50,-230,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.226261,0.017171),0.002767);
+circle ((-0.230945,0.017171),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.2584,-0.021131),50,-205,0.05);
+arcplr ((-0.263085,-0.021131),50,-205,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.303716,-0),0.002767);
+circle ((-0.3084,-0),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
polyline (false)
-((-0.313085,0),
+((-0.3084,0),
(-0.333333,0));
endmfpic; % (5) line 95 in the TeX source.
@@ -327,68 +327,68 @@ store (curpath)
drawn
polyline (false)
((0,0),
-(0,0.020249));
+(0,0.024933));
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0,0.020249),0.002767);
+circle ((0,0.024933),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.021131,0.065564),-65,-320,0.05);
+arcplr ((-0.021131,0.070249),-65,-320,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.017171,0.097703),0.002767);
+circle ((0.017171,0.102388),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.021131,0.129843),-40,-320,0.05);
+arcplr ((-0.021131,0.134527),-40,-320,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.017171,0.161982),0.002767);
+circle ((0.017171,0.166667),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.021131,0.194121),-40,-320,0.05);
+arcplr ((-0.021131,0.198806),-40,-320,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.017171,0.226261),0.002767);
+circle ((0.017171,0.230945),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.021131,0.2584),-40,-295,0.05);
+arcplr ((-0.021131,0.263085),-40,-295,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0,0.303716),0.002767);
+circle ((-0,0.3084),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
polyline (false)
-((0,0.313085),
+((0,0.3084),
(0,0.333333));
endmfpic; % (6) line 113 in the TeX source.
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/shapes.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/shapes.m4
index 749e09896d4..f50b0292309 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/shapes.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/shapes.m4
@@ -6,7 +6,6 @@ divert(-1)
# shapes.m4
# 3D structures with complex surfaces and hidden lines are the domain of more
# sophisticated software packages, but basic shapes can be drawn with pic.
-#threeD_init
#####################################################
@@ -14,9 +13,9 @@ divert(-1)
[colored "color"])'
define(`cylinder3D',`[ Start: (0,0)
xdispl = `$1'; ydispl = `$2'; zdispl = `$3'
- diamc = ifelse(`$4',,(lenc/2),`$4') ; radc = diamc/2
define(`M4CL',`xdispl,ydispl,zdispl')dnl
lenc = length3D(M4CL)
+ diamc = ifelse(`$4',,(lenc/2),`$4') ; radc = diamc/2
cs = dot3D(View3D,M4CL)/lenc
End: (Project(M4CL))
az = atan2(ydispl,xdispl)
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/EVplugsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/EVplugsSVG.m4
new file mode 100644
index 00000000000..54530a1bfad
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/EVplugsSVG.m4
@@ -0,0 +1,210 @@
+.PS
+# EV_lugs.m4
+# https://en.wikipedia.org/wiki/CHAdeMO
+gen_init
+divert(-1)
+
+ `EV_J1772(keys)
+ EV charging plug in a [] block
+ keys: wdth=expr; # plug width
+ diamLNP=expr; # diam of L1, N, PE
+ twdth=expr; # tab width
+ thgt=expr; # tab hght
+ thick=expr; # outer line thickness (pt)
+ inthick=expr; # inner line thickness (pt)
+ BG=attributes; # shaded gray etc
+ L1=attributes; # L1 attributes ...
+ N=attributes;
+ PE=attributes;
+ PP=attributes;
+ CP=attributes; '
+define(`pEVskale',25.4) dnl default plug size (20 mm)
+define(`EV_J1772',`[ pushkeys_(`$1', `wdth:20/pEVskale;
+ twdth:3.5/20*m4wdth; thgt:1.5/20*m4wdth; diamLNP:6/20*m4wdth;
+ thick:2; inthick:1.5; BG::N; L1::N; N::N; PE::N; PP::N; CP::N; ')
+ tang = atan2(m4twdth/2,m4wdth/2)*rtod_
+ TS: (Rect_(m4wdth/2,-90-tang)); TE: (Rect_(m4wdth/2,-90+tang))
+ Tab: line thick m4thick from TS down_ m4thgt \
+ then to TE-(0,m4thgt) then to TE m4BG
+ Arc: arc thick m4thick to TS with .c at (0,0) m4BG
+ round(at TS,last arc.thick); round(at TE,last arc.thick)
+ L1: circle diam m4diamLNP thick m4inthick at (Rect_(m4wdth/4,150)) m4L1
+ N: circle diam m4diamLNP thick m4inthick at (Rect_(m4wdth/4, 30)) m4N
+ PE: circle diam m4diamLNP thick m4inthick at (0,-m4wdth/4) m4PE
+ PP: circle diam m4diamLNP*0.55 thick m4inthick at (Rect_(m4wdth/3,210)) m4PP
+ CP: circle diam m4diamLNP*0.55 thick m4inthick at (Rect_(m4wdth/3,-30)) m4CP
+ `$2' popdef(`m4CP',`m4PP',`m4PE',`m4N',`m4L1',`m4BG',
+ `m4wdth',`m4diamLNP',`m4twdth',`m4thgt',`m4thick',`m4inthick') ]')
+
+ `EV_J3068(keys,shade)
+ EV charging plug in a [] block
+ keys: wdth=expr; # plug width
+ diamLNP=expr; # diam of L1, N, PE
+ twdth=expr; # tab width
+ thgt=expr; # tab hght
+ thick=expr; # outer line thickness (pt)
+ inthick=expr; # inner line thickness (pt)
+ BG=attributes; # shaded gray etc
+ L1|L2|L3=attributes; # pin attributes ...
+ N=attributes;
+ PE=attributes;
+ PP=attributes;
+ CP=attributes;
+ arg2= R:G:B background fill color '
+define(`EV_J3068',`[ pushkeys_(`$1',
+ `wdth:25/pEVskale; diamLNP:m4wdth*0.25; thick:2; inthick:1.5;
+ BG::N; L1::N; L2::N; L3::N; N::N; PE::N; PP::N; CP::N; ')
+ C: Here
+ NE: C+(Rect_(m4wdth/2,45)); NW: C+(Rect_(m4wdth/2,135))
+ Ac: NE-(1,1)/sqrt(2)*m4diamLNP/2
+ Arc: arc thick m4thick from NW to NE with .c at C m4BG ifelse(`$2',,,
+ `shaded rgbstring(patsubst(`$2',:,`,'))
+ line invis from NE to Ac+(0,m4diamLNP/2) \
+ then to Ac+(0,m4diamLNP/2) \
+ then to NW+(1,-1)/sqrt(2)*m4diamLNP/2 + (0,m4diamLNP/2) \
+ then to NW then to NE shaded rgbstring(patsubst(`$2',:,`,'))')
+ arc thick m4thick to Ac+(0,m4diamLNP/2) with .c at Ac m4BG
+ Top: line thick m4thick to (NW+NE-Ac, Here) m4BG
+ arc thick m4thick to NW with .c at Here+(0,-m4diamLNP/2) m4BG
+ PE: circle diam m4diamLNP thick m4inthick at C m4PE
+ PP: circle diam m4diamLNP*0.55 thick m4inthick at C+(Rect_(m4wdth/3,45)) m4PP
+ CP: circle diam m4diamLNP*0.55 thick m4inthick at C+(Rect_(m4wdth/3,135)) m4CP
+ L1: circle diam m4diamLNP thick m4inthick at C+(m4wdth*.3,0) m4L1
+ L2: circle diam m4diamLNP thick m4inthick at C+(Rect_(m4wdth*.3,-60)) m4L2
+ L3: circle diam m4diamLNP thick m4inthick at C+(Rect_(m4wdth*.3,-120)) m4L3
+ N: circle diam m4diamLNP thick m4inthick at C-(m4wdth*.3,0) m4N
+ `$3' popdef(`m4wdth',`m4diamLNP',`m4thick',`m4inthick',
+ `m4BG',`m4L1',`m4L2',`m4L3',`m4N',`m4PE',`m4PP',`m4CP') ]')
+
+ `EV_CCS1(J1772 keys,DC keys)
+ DC keys: wdth=expr; # DC socket width
+ hght=expr; # DC socket height
+ diamPM=expr; # diam of DC+, DC- circles
+ sep=expr; # separation of Jack and DC
+ thick=expr; # outer line thickness (pt)
+ inthick=expr; # inner line thickness (pt)
+ BG=attributes; # shaded gray etc
+ DCplus=attributes;
+ DCminus=attributes; '
+define(`EV_CCS1',`[
+ J: EV_J1772(`$1')
+ pushkeys_(`$2',`wdth:J.wid:23.5/20; hght:J.wid*11/20; diamPM:m4hght*7/11;
+ sep:J.wid*3/30; thick:J.Arc.thick; inthick:J.PE.thick;
+ BG::N; DCplus::N; DCminus::N;')
+ DC: [ Box: box thick m4thick wid m4wdth ht m4hght rad m4hght/2 m4BG
+ DCplus: circle thick m4inthick diam m4diamPM at Box.w+(m4hght/2,0) m4DCplus
+ DCminus:circle thick m4inthick diam m4diamPM at Box.e-(m4hght/2,0) m4DCminus
+ ] with .n at J.s+(0,-m4sep)
+ popdef(`m4wdth',`m4hght',`m4diamPM',`m4sep',`m4thick',`m4inthick',`m4BG',
+ `m4DCplus',`m4DCminus')
+ ]')
+
+ `EV_CCS2(J3068 keys,shade,DC keys)
+ DC keys: wdth=expr; # DC socket width
+ hght=expr; # DC socket height
+ diamPM=expr; # diam of DC+, DC- circles
+ sep=expr; # separation of Jack and DC
+ thick=expr; # outer line thickness (pt)
+ inthick=expr; # inner line thickness (pt)
+ BG=attributes; # shaded gray etc
+ DCplus=attributes;
+ DCminus=attributes;
+ arg2= R:G:B background fill color '
+define(`EV_CCS2',`[
+ J: EV_J3068(`$1',`$2')
+ pushkeys_(`$3',`wdth:J.wid:23.5/20; hght:J.wid*11/20; diamPM:m4hght*7/11;
+ sep:J.wid*3/30; thick:J.Arc.thick; inthick:J.PE.thick;
+ BG::N; DCplus::N; DCminus::N;')
+ DC: [ Box: box thick m4thick wid m4wdth ht m4hght rad m4hght/2 dnl
+ m4BG ifelse(`$2',,,`shaded rgbstring(patsubst(`$2',:,`,'))')
+ DCplus: circle thick m4inthick diam m4diamPM at Box.w+(m4hght/2,0) m4DCplus
+ DCminus:circle thick m4inthick diam m4diamPM at Box.e-(m4hght/2,0) m4DCminus
+ ] with .n at J.s+(0,-m4sep)
+ popdef(`m4wdth',`m4hght',`m4diamPM',`m4sep',`m4thick',`m4inthick',`m4BG',
+ `m4DCplus',`m4DCminus')
+ ]')
+
+ `EV_CHAdeMO(keys,shade)
+ EV charging plug in a [] block
+ keys: wdth=expr; # plug width
+ thick=expr; # outer line thickness (pt)
+ inthick=expr; # inner line thickness (pt)
+ BG=attributes; # background shaded gray etc
+ DCplus=|DCminusNS=|FG=|NC=|SS1=|DCP=|PP=|
+ CL=|CH=|SS2=attributes # pin attributes ...'
+define(`EV_CHAdeMO',`[ pushdef(`m4sk',33/140/pEVskale) pushkeys_(`$1',
+ `wdth:140*m4sk; thick:m4wdth*9/140/(1bp__); inthick:m4thick*1.5/9;
+ BG::N; DCplus::N; DCminus::N;N::N;S::N;
+ FG::N; NC::N; SS1::N; DCP::N; PP::N; CL::N; CH::N; SS2::N')
+ C: circle thick m4thick diam m4wdth-m4thick bp__ m4BG
+ line thick m4thick*0.6 from C+(Rect_(C.rad+m4thick bp__*3/4,42)) \
+ to C+(Rect_(C.rad+m4thick bp__*3/4,50)) then left m4thick bp__ m4BG
+ line thick m4thick*0.6 from C+(Rect_(C.rad+m4thick bp__*3/4,138)) \
+ to C+(Rect_(C.rad+m4thick bp__*3/4,130)) then right m4thick bp__ m4BG
+ idiam = (m4wdth-m4thick bp__*2)*47/(27+47*2)
+ N: circle diam idiam thick m4inthick with .n at C.n-(0,m4thick bp__/2) m4N
+ S: circle diam idiam thick m4inthick with .s at C.s+(0,m4thick bp__/2) m4S
+ E: circle diam idiam thick m4inthick at Cintersect(N,N.diam,S,S.diam) m4DCminus
+ W: circle diam idiam thick m4inthick at Cintersect(S,S.diam,N,N.diam) m4DCplus
+ Loopover_(`Z',
+ `line thick m4inthick up Z.diam*0.6 right Z.diam*0.6 with .c at Z
+ line thick m4inthick up Z.diam*0.6 left Z.diam*0.6 with .c at Z',N,S)
+ Loopover_(`L',`L: circle diam idiam/4 thick linethick/2 \
+ at N+(Rect_(idiam/4,90*m4Lx)) m4xpand(m4`'L)',FG,NC,DCP,SS1)
+ Loopover_(`L',`L: circle diam idiam/4 thick linethick/2 \
+ at S+(Rect_(idiam/4,90*m4Lx)) m4xpand(m4`'L)',PP,CL,SS2,CH)
+ `$3' popdef(`m4sk',`m4wdth',`m4thick',`m4inthick',`m4BG',
+ `m4DCplus',`m4DCminus',`m4N',`m4S',
+ `m4FG',`m4NC',`m4SS1',`m4DCP',`m4PP',`m4CL',`m4CH',`m4SS2') ]')
+
+divert(0)dnl
+
+ ifsvg(svg_font(sans-serif,6bp__))
+ iflatex(command "{\sf\scriptsize")
+ define(`EVsmall',`ifsvg(svg_small(`$1'),{\tiny `$1'})')
+ define(`EVtxt',`ifsvg(``$1'',`{patsubst(`$1',_,\\_)}')')
+ define(`EVk',`ifsvg(+(0,0.75bp__))')
+
+[
+P1: EV_J1772(BG=fill_(0.75); PE=fill_(1) "PE";L1=fill_(1) "L1";N=fill_(1) "N";
+ PP=fill_(1); CP=fill_(1);)
+ "EVsmall(PP)" at P1.PP EVk
+ "EVsmall(CP)" at P1.CP EVk
+
+P2: EV_J3068(PE=shaded "green" "PE";\
+ L1=shaded "yellow" "L1";L2=shaded "yellow" "L2";L3=shaded "yellow" "L3";
+ N=fill_(1) "N";",
+ 0.85:0.85:0.85) at P1+(15bp__,0) \
+ with .w at P1.e+(P1.wid/5,0)
+ "EVsmall(PP)" at P2.PP EVk
+ "EVsmall(CP)" at P2.CP EVk
+
+P3: EV_CCS1(L1="L1";N="N";PE="PE",
+ DCplus="DC+";DCminus="DC-") with .w at P2.e+(P1.wid/5,0)
+ "EVsmall(PP)" at P3.J.PP EVk
+ "EVsmall(CP)" at P3.J.CP EVk
+
+P4: EV_CCS2(L1="L1";L2="L2";L3="L3";N="N";PE="PE",0.85:0.85:0.85,
+ DCplus="DC+";DCminus="DC-") with .w at P3.e+(P1.wid/5,0)
+ "EVsmall(PP)" at P4.J.PP EVk
+ "EVsmall(CP)" at P4.J.CP EVk
+P5: EV_CHAdeMO( BG=outlined "blue" fill_(0.8);
+ DCplus=shaded "red" "DC+";
+ DCminus=shaded "red" "DC-";
+ Loopover_(`L',`L=fill_(1);',N,S)
+ FG=shaded "green";
+ Loopover_(`L',`L=shaded "orange";',SS1,DCP,NC,PP,CH,SS2,CL)) \
+ with .w at P4.e+(P4.w.x-P3.e.x,0)
+ Loopover_(`L',`"EVsmall(L)" at P5.L EVk',FG,NC,DCP,SS1,PP,CL,CH,SS2)
+#
+ ifsvg(move from P5.e right 0.2)
+ "EVtxt(`EV_CCS2')" at P4.s+(0,-10bp__)
+ "EVtxt(`EV_CCS1')" at (P3,last "")
+ "EVtxt(`EV_J3068')" at (P2,last "")
+ "EVtxt(`EV_J1772')" at (P1,last "")
+ "EVtxt(`EV_CHAdeMO')" at (P5,last "")
+ ] # with .nw at last [].sw+(0,-0.2)
+
+ iflatex(command "}%")
+ ifsvg(command "</g>")
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GeometrySVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GeometrySVG.m4
index 576315d285a..38e748d7e3b 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GeometrySVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GeometrySVG.m4
@@ -107,7 +107,7 @@ Fig3: [ ls = 3/4 # local scale
ArcAngle(N,P,Q,0.4); "svg_beta" at last arc.ne above ljust
ArcAngle(O,P,N,0.5); "svg_alpha" at last arc.start+(5bp__,8bp__)
ArcAngle(R,Q,N,0.5); "svg_alpha" at last arc.start+(8bp__,-5bp__)
- ] with .sw at Fig2.e+(-0.4,-0.7)
+ ] with .sw at Fig2.e+(-0.2,-0.7)
Fig4: [ ls = 2/3 # local scale
A: Here; "A" at A above
@@ -149,6 +149,6 @@ Fig4: [ ls = 2/3 # local scale
line dashed from X to Y chop -linewid/2
RightAngle(A,Z,Y)
- ] with .w at Fig3.e+(-0.4,0.8)
+ ] with .sw at (Fig3.e,Fig2.s)
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile
index c3144811dce..0d68dcac3b8 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile
@@ -56,7 +56,7 @@ CCTSVG = \
ContactSVG.svg ContactsSVG.svg \
CrowSVG.svg CsourceSVG.svg \
DecoderSVG.svg DemultiplexerSVG.svg DiniSVG.svg DiodesSVG.svg DriveSVG.svg \
- EEPSVG.svg EmarrowsSVG.svg EscherSVG.svg \
+ EEPSVG.svg EmarrowsSVG.svg EscherSVG.svg EVplugsSVG.svg \
FlowSVG.svg FontsSVG.svg FusesSVG.svg \
GeometrySVG.svg GrayCodeSVG.svg GroundsSVG.svg \
HeadersSVG.svg HeathkitSVG.svg \
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ResistorsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ResistorsSVG.m4
index 4da2b4f3446..fe88a79ad3e 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ResistorsSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ResistorsSVG.m4
@@ -36,7 +36,7 @@ vm = 0.28
{
{ebox(,,,0.6) ; move ; "`ebox(,,,0.6) '" ljust}
move right_ hm
- {ebox(,,,,shaded "green") ; move ;"`ebox(,,,,shaded \"green\") '" ljust}
+ {ebox(,,,,shaded "yellow") ; move ;"`ebox(,,,,shaded \"yellow\") '" ljust}
}
move down vm; right_
{
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SmithchartSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SmithchartSVG.m4
index eb47e6585ed..7d80e3e01e2 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SmithchartSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SmithchartSVG.m4
@@ -215,8 +215,8 @@ Loopover_(`rca',
iflatex(command "}%",
ifsvg(command "</g>"))
-] at (0,0)')
+] ')
-Smithchart
+Smithchart at (0,0)
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx
index f2ea0d8bc5d..af8a15f8402 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx
@@ -84,9 +84,7 @@ produced, followed by an additional processing step to convert to svg.
Two possibilities for the latter are
<A HREF="https://www.ctan.org/pkg/dvisvgm">dvisvgm</A>
and
- <A HREF="https://github.com/dawbarton/pdf2svg">pdf2svg</A> although
-there may be font-related issues for some diagrams.
-<br>
+ <A HREF="https://github.com/dawbarton/pdf2svg">pdf2svg</A>.
Many circuit and similar diagrams intended for the web do not
require sophisticated labels, however; the examples shown below might
be representative.
@@ -96,7 +94,7 @@ be representative.
</p>
<hr>
<p>
-There are a number of other issues:
+There are other issues:
<ul>
<li> Embedding .svg files in html documents with the &lt;embed&gt; or
&lt;object&gt; tag seems to be a perennial issue.
@@ -381,6 +379,10 @@ cfig(ConnSVG,
cfig(PconnSVG,
The m4tt`'pconnex</g> macro)
+cfig(EVplugsSVG,
+ Electric vehicle charging plug patterns make extensive
+ use of key=value pairs to set options)
+
cfig(HeadersSVG,
The m4tt`'Header</g> macro)
@@ -398,7 +400,8 @@ cfig(ujtSVG,
UJT examples)
cfig(thyristorSVG,
- Thyristor examples)
+ Thyristor examples. The thyristor is a 3- or 4-terminal
+ composite element)
cfig(BipSVG,
Bipolar transistors (drawing direction: up))
@@ -632,7 +635,11 @@ cfig(GeometrySVG,
Plane geometry examples)
cfig(randomSVG,
- Testing random numbers)
+ Testing random number generation
+ using dpic macro
+ m4tt`'randn(</g><g
+ style="font-family:italic">array name`,' mean`,' std dev</g>m4tt`')</g>
+ which calls dpic built-in m4tt`'rand()</g>)
cfig(expSVG,
Test of m4tt`'project</g> and other m4tt`'lib3D</g>
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/shapesSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/shapesSVG.m4
index b0b66fa0bb6..3deae68c607 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/shapesSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/shapesSVG.m4
@@ -6,7 +6,6 @@ divert(-1)
# shapes.m4
# 3D structures with complex surfaces and hidden lines are the domain of more
# sophisticated software packages, but basic shapes can be drawn with pic.
-#threeD_init
#####################################################
@@ -14,9 +13,9 @@ divert(-1)
[colored "color"])'
define(`cylinder3D',`[ Start: (0,0)
xdispl = `$1'; ydispl = `$2'; zdispl = `$3'
- diamc = ifelse(`$4',,(lenc/2),`$4') ; radc = diamc/2
define(`M4CL',`xdispl,ydispl,zdispl')dnl
lenc = length3D(M4CL)
+ diamc = ifelse(`$4',,(lenc/2),`$4') ; radc = diamc/2
cs = dot3D(View3D,M4CL)/lenc
End: Project(M4CL)
az = atan2(ydispl,xdispl)
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig b/Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig
index c9c51e70972..06a50cdd6d7 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig
@@ -17,41 +17,41 @@ Single
-6
6 375 75 600 675
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
- 525 675 525 551
-6 440 205 549 556
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 525 551 3 3 528 551 528 551
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 496 525 551 441 483 546 458
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 546 458 3 3 549 458 549 458
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 419 546 458 440 419 546 381
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 546 381 3 3 549 381 549 381
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 342 546 381 440 342 546 303
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 546 303 3 3 549 303 549 303
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 265 546 303 441 278 525 211
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 525 211 3 3 528 211 528 211
+ 525 675 525 545
+6 440 199 549 551
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 525 545 3 3 528 545 528 545
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 491 525 545 441 478 546 452
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 546 452 3 3 549 452 549 452
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 414 546 452 440 414 546 375
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 546 375 3 3 549 375 549 375
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 336 546 375 440 336 546 298
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 546 298 3 3 549 298 549 298
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 259 546 298 441 272 525 205
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 525 205 3 3 528 205 528 205
-6
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
- 525 199 525 75
+ 525 205 525 75
-6
6 750 75 975 675
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
- 900 675 900 551
-6 815 205 924 556
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 900 551 3 3 903 551 903 551
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 496 900 551 816 483 921 458
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 921 458 3 3 924 458 924 458
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 419 921 458 815 419 921 381
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 921 381 3 3 924 381 924 381
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 342 921 381 815 342 921 303
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 921 303 3 3 924 303 924 303
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 265 921 303 816 278 900 211
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 900 211 3 3 903 211 903 211
+ 900 675 900 545
+6 815 199 924 551
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 900 545 3 3 903 545 903 545
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 491 900 545 816 478 921 452
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 921 452 3 3 924 452 924 452
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 414 921 452 815 414 921 375
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 921 375 3 3 924 375 924 375
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 336 921 375 815 336 921 298
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 921 298 3 3 924 298 924 298
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 259 921 298 816 272 900 205
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 900 205 3 3 903 205 903 205
-6
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
- 790 551 790 199
+ 790 545 790 205
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
- 752 551 752 199
+ 752 545 752 205
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
- 900 199 900 75
+ 900 205 900 75
-6
6 1125 75 1200 675
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4 b/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4
index 78c643dc5b5..66905f7308c 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 8413b335ea4..7d813f6e272 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 3ad627c4cfb..75ca43cdce0 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 16ae9ba91eb..5ce00640ace 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 *
@@ -450,6 +450,7 @@ define(`rarrow',`define(`m4h',`min(lin_leng(last line),linewid)/2')dnl
`inductor( linespec, W|L, cycles, M|P|K[n],
loop wid )
W=wide arcs (default narrow); L=looped arcs
+ arg3= integer (number of loops)
arg4= M[n]=metal core
P[n]=(ferrite) powder core (dashed lines)
K[n]=long-dashed core lines
@@ -459,7 +460,7 @@ define(`rarrow',`define(`m4h',`min(lin_leng(last line),linewid)/2')dnl
define(`inductor',`eleminit_(`$1')
define(`m4hlw',`ifelse(`$5',,`dimen_/10',`($5)/2')')dnl half loop wid
define(`m4n',`ifelse(`$3',,4,`$3')')dnl
- ifelse(`$2',W, `define(`m4wd',((2*m4n-2)*m4c2t+2)*m4hlw)',
+ ifelse(`$2',W, `define(`m4wd',((2*m4n-2)*m4c2t+2*m4ct)*m4hlw)',
`$2',L, `define(`m4wd',(m4n+1)*m4hlw)',
`define(`m4ht',`ifelse(`$5',,`dimen_/16',(`$5')/2)')dnl half other loop wid
define(`m4wd',m4n*m4ht*2)')dnl
@@ -2010,6 +2011,7 @@ define(`m4_rad_arr',`{{`$1': line invis to rrot_(m4_len,0,ang)}
`thyristor(linespec,
[SCR|SCS|SUS|SBS|IEC][chars])
Composite element in [ ] block
+ (To place as two-terminal, see thyristor_t()).
SCR: silicon controlled rectifier (default)
SCS: silicon controlled switch
SUS: silicon unilateral switch
@@ -2064,22 +2066,30 @@ define(`thyristor',
`m4gen_d( LG'xtract(m4thx,G)`uA`'m4thAc`'HdQ`'m4thAc`'R,m4thf)')')
ifinstr(m4thf,E,`Env: circle diam m4thyd with .c at rvec_(rp_len/2,0)')
`$3']')')')
+ `thyristor_t(linespec, thyristor chars], label)
+ A wrapper to place thyristor(linespec,...)
+ as a two-terminal element with arg3
+ as label of the [] block (see also scr())'
+define(`thyristor_t',`eleminit_(`$1')
+ M4_thyS: last line.start; M4_thyE: last line.end
+ ifelse(`$3',,,`$3:') thyristor(from M4_thyS to M4_thyE,`$2',`$4') \
+ with .A at M4_thyS; line invis from M4_thyS to M4_thyE')
`scr(linespec, [R][E], label) and similar
Place thyristor as a two-term element with
arg 3 as label of the [] block'
define(`scr',`eleminit_(`$1'); M4_scrS: last line.start; M4_scrE: last line.end
ifelse(`$3',,,`$3:') thyristor(from M4_scrS to M4_scrE,SCR`'`$2',`$4') \
- with .A at M4_scrS')
-define(`scs',`eleminit_(`$1'); M4_scrS: last line.start; M4_scrE: last line.end
- ifelse(`$3',,,`$3:') thyristor(from M4_scrS to M4_scrE,SCS`'`$2'`',`$4') \
- with .A at M4_scrS')
-define(`sus',`eleminit_(`$1'); M4_scrS: last line.start; M4_scrE: last line.end
- ifelse(`$3',,,`$3:') thyristor(from M4_scrS to M4_scrE,SUS`'`$2'`',`$4') \
- with .A at M4_scrS')
-define(`sbs',`eleminit_(`$1'); M4_scrS: last line.start; M4_scrE: last line.end
- ifelse(`$3',,,`$3:') thyristor(from M4_scrS to M4_scrE,SBS`'`$2'`',`$4') \
- with .A at M4_scrS')
+ with .A at M4_scrS; line invis from M4_scrS to M4_scrE')
+define(`scs',`eleminit_(`$1'); M4_scsS: last line.start; M4_scsE: last line.end
+ ifelse(`$3',,,`$3:') thyristor(from M4_scsS to M4_scsE,SCS`'`$2',`$4') \
+ with .A at M4_scsS; line invis from M4_scsS to M4_scsE')
+define(`sus',`eleminit_(`$1'); M4_susS: last line.start; M4_susE: last line.end
+ ifelse(`$3',,,`$3:') thyristor(from M4_susS to M4_susE,SUS`'`$2',`$4') \
+ with .A at M4_susS; line invis from M4_susS to M4_susE')
+define(`sbs',`eleminit_(`$1'); M4_sbsS: last line.start; M4_sbsE: last line.end
+ ifelse(`$3',,,`$3:') thyristor(from M4_sbsS to M4_sbsE,SBS`'`$2',`$4') \
+ with .A at M4_sbsS; line invis from M4_sbsS to M4_sbsE')
`tgate( linespec, [B][R|L] ) Transmission gate
B= box form
@@ -2131,11 +2141,10 @@ define(`ptrans',`[ eleminit_(`$1') define(`m4ptm',ifinstr(`$2',L,-))
define(`tline',`eleminit_(`$1')
define(`m4v',`ifelse(`$2',,`dimen_/6',`($2)')')dnl
define(`m4h',`ifelse(`$3',,`dimen_*2/3',min(rp_len-m4v/2,`$3'))')dnl
- {[box invis ht_ m4v wid_ m4h+m4v/2] at last line.c}
{line from last line.c+vec_(m4h/2+m4v/4,0) \
to last line.end}
{line to 2nd last line.c+vec_(-m4h/2,0); round
- ifdpic(
+ [ifdpic(
`line from rvec_(0,-m4v/2) \
to rvec_(m4h,-m4v/2)
spline 0.5523 to rvec_(m4v/4,0) \
@@ -2159,8 +2168,8 @@ define(`tline',`eleminit_(`$1')
then to Here \
then to rvec_(-m4v/2,0) \
then to rvec_(-m4v/2,-m4v)\
- then to rvec_(0,-m4v)') }
- line to 5th last line.end invis ')
+ then to rvec_(0,-m4v)')] with .c at rvec_(m4h/2,0) }
+ line to 3rd last line.end invis ')
define(`m4_U',`dimen_/10') `Semiconductor grid size'
define(`m4_Aht',`m4_U*10/6') `Semiconductor arrowhead ht and wd'
@@ -2935,7 +2944,8 @@ define(`contacts',`[
Arg 2 deprecated, kept for compatibility
chars:
O|C= normally open, normally closed (default)
- I= open circles for contacts
+ I= open dots for contacts
+ X= filled dots
P= three position
R= right orientation (default left)
T= T contacts
@@ -2943,12 +2953,13 @@ define(`contacts',`[
define(`contact',`[ dnl
define(`m4pm',`ifelse(ifinstr(`$1',R,R,`$2',R,R),R,-)')dnl
define(`m4dr',`dotrad_')define(`m4TL',dimen_/12)dnl
- P: dot(,m4dr,1)
+ define(`m4fll',`ifinstr(`$1',X,,1)')dnl
+ P: dot(,m4dr,m4fll)
T: P+vec_(dimen_/2-dimen_/12,0)
ifinstr(`$1',P,`ifinstr(
`$1',I,
- `{C: dot(at T+vec_(0,m4pm`'(dimen_/8+m4dr*2+lthick/2)),m4dr,1)}
- {O: dot(at T-vec_(0,m4pm`'(dimen_/8+m4dr*2+lthick/2)),m4dr,1)}
+ `{C: dot(at T+vec_(0,m4pm`'(dimen_/8+m4dr*2+lthick/2)),m4dr,m4fll)}
+ {O: dot(at T-vec_(0,m4pm`'(dimen_/8+m4dr*2+lthick/2)),m4dr,m4fll)}
A: line from P to ifinstr(
`$1',O,`(LCtangent(P,O,dotrad_+lthick/2)) chop m4dr chop -m4dr',
`$1',C,`(LCtangent(P,C,dotrad_+lthick/2,R)) chop m4dr chop -m4dr',
@@ -2990,7 +3001,7 @@ define(`contact',`[ dnl
`move to T
ifinstr(
`$1',I,
- `{ C: dot(at rvec_(0,m4pm`'(m4dr+lthick/2)),m4dr,1) }
+ `{ C: dot(at rvec_(0,m4pm`'(m4dr+lthick/2)),m4dr,m4fll) }
ifinstr(m4CO,O,,`O: Here')',
`$1',U,
`{C: T+vec_(m4TL*2,m4pm`'(dimen_/6))
@@ -3009,7 +3020,7 @@ define(`contact',`[ dnl
`move to T+vec_(0,-(m4pm`'dimen_/8))
ifinstr(
`$1',I,
- `{O: dot(at rvec_(0,m4pm`'(-m4dr*2)),m4dr,1) }
+ `{O: dot(at rvec_(0,m4pm`'(-m4dr*2)),m4dr,m4fll) }
ifinstr(m4CO,C,,`C: T ')',
`$1',U,
`{O: T+vec_(m4TL*2,m4pm`'(-dimen_/6))
@@ -3027,7 +3038,6 @@ define(`contact',`[ dnl
')
`$3'] ')
-
`relaycoil( chars, wid, ht, U|D|L|R|degrees )
chars: (see IEC 60617 S00305 - S00319)
X or default: external lines from A2 and B2
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4 b/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4
index 9fe00c721cf..c066b7527ba 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 *
@@ -184,7 +184,7 @@ define(`SIdefaults',
define(`latexcommand',`command "ifmpost(verbatimtex) `$1' ifmpost(etex)"')
define(`m4announceprocessor',`dnl Do not change the format of the next line:
-`#' `$1' Version 9.9: ifelse(m4picprocessor,gpic,`Gpic',
+`#' `$1' Version 10.0: ifelse(m4picprocessor,gpic,`Gpic',
m4postprocessor,pstricks,`PSTricks',
m4postprocessor,pgf,`TikZ PGF',
m4postprocessor,mfpic,`Mfpic',
@@ -614,10 +614,10 @@ define(`up__',`ifelse(m4_dir_,right,up,m4_dir_,left,down,m4_dir_,up,left,right)'
Binary operations giving simplified readable
expressions for obvious cases.
define(`prod_',`ifelse($1,0,0,$1,-0,0,$2,0,0,$2,-0,0,$1,1,`$2',$2,1,`$1',
- $1,-1,`-($2)',$2,-1,`-($1)',`($1)*($2)')')
+ $1,-1,`(-($2))',$2,-1,`(-($1))',`(($1)*($2))')')
define(`sum_',`ifelse($1,0,`$2',$1,-0,`$2',$2,0,`$1',$2,-0,`$1',
index($2,-),0,`$1$2',`($1+$2)')')
-define(`diff_',`ifelse($2,0,`$1',$2,-0,`$1',$1,0,`-($2)',$1,-0,`-($2)',
+define(`diff_',`ifelse($2,0,`$1',$2,-0,`$1',$1,0,`(-($2))',$1,-0,`(-($2))',
`($1-($2))')')
Like prod_ but parentheses are *not* added
to the first argument, which is assumed to be
@@ -1625,6 +1625,12 @@ define(`along_',`between `$1'.start and `$1'.end')
define(`Along_',`(ifelse(`$2',,1,`(`$2')/lin_leng(`$1')') between \
`$1'.ifelse(`$3',R,end,start) and `$1'.ifelse(`$3',R,start,end))')
+ `Between_(Pos1,Pos2,distance,[R])
+ position distance from Pos1 toward Pos2
+ arg4=R: from Pos2 to Pos1'
+define(`Between_',`ifelse(`$4',R,`1-')(`$3')/distance(`$1',`$2') between \
+ `$1' and `$2'')
+
`showbox_(planar object,boxspec,P)
Convenience to draw the bounding box of an obj
(default last []),
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4 b/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4
index f89e39b4869..560ec993a2b 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 1670be9104f..000e1429621 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 8e3acae6ec5..d812116b637 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 73dc439b94b..0739b80694c 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 3b724e380a5..19f0a0dbed4 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 78b117ac40f..d69f34564e6 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 822bd94c83a..fd7ba7fbd4d 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 73f144594fd..5eb5bebfc67 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 *
@@ -48,13 +48,15 @@ divert(-1)
text)
Note: nominal ht = text height in drawing units,
e.g. 12bp__ for 12pt text
-   actual height = nominal ht * dptextratio '
-define(`svg_font',`ifinstr(`$2',:,
+ actual height = nominal ht * dptextratio '
+define(`svg_font',`m4thtmp=textht; ifinstr(`$2',:,
`stacksplit_(`m4svgf',`$2',:)
- ifelse(m4svgf,,,dptextratio = m4svgf; )popdef(`m4svgf')dnl
- ifelse(m4svgf,,,`textht=(m4svgf)*dptextratio; ')undefine(`m4svgf')',
- `dptextratio=svgfontratio(`$1'); dnl
- ifelse(`$2',,,textht=(`$2')*dptextratio; )')dnl
+ ifelse(m4svgf,,,`ifelse(`$4',,,`m4trtmp=dptextratio;') dnl
+ dptextratio = m4svgf;')popdef(`m4svgf')dnl
+ ifelse(m4svgf,,,`ifelse(`$4',,,`m4thtmp=textht;') dnl
+ textht=(m4svgf)*dptextratio; ')undefine(`m4svgf')',
+ `ifelse(`$4',,,`m4trtmp=dptextratio;') dptextratio=svgfontratio(`$1'); dnl
+ ifelse(`$2',,,m4thtmp=textht; textht=(`$2')*dptextratio; )')dnl
ifelse(`$3',,,`textoffset=`$3'; ')
command "<g patsubst(ifelse(`$1',,,
index(`$1',font),0,`$1',
@@ -62,7 +64,7 @@ index(`$1',style),0,`$1',
style="font-family:`$1'")
,",\\")>"
`$4'
- ifelse(`$4',,,`command "</g>"')')
+ ifelse(`$4',,,`command "</g>"; textht=m4thtmp; dptextratio=m4trtmp;')')
`e.g. svg_font(Times)
svg_font(Times,12bp__:0.66)
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4 b/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4
index 40fef9bbbe3..222058db9a0 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 9.9, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.0, copyright (c) 2022 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 *