From 1c0d5e0721918b8ee790c9f1c11f1543e0403322 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 14 Oct 2022 03:01:58 +0000 Subject: CTAN sync 202210140301 --- graphics/circuit_macros/CHANGES | 3 + graphics/circuit_macros/Copying | 2 +- graphics/circuit_macros/README | 6 +- graphics/circuit_macros/darrow.m4 | 2 +- graphics/circuit_macros/doc/Circuit_macros.pdf | Bin 1023203 -> 1025740 bytes graphics/circuit_macros/doc/PconnMan.m4 | 2 +- graphics/circuit_macros/doc/Version.tex | 2 +- graphics/circuit_macros/doc/body.tex | 136 +++++++------ graphics/circuit_macros/doc/defines.tex | 78 ++++---- graphics/circuit_macros/dpictools.pic | 2 +- graphics/circuit_macros/examples/Contact.m4 | 20 +- graphics/circuit_macros/examples/EVplugs.m4 | 209 ++++++++++++++++++++ graphics/circuit_macros/examples/Euro.m4 | 1 - graphics/circuit_macros/examples/Makefile | 2 +- graphics/circuit_macros/examples/Pconn.m4 | 13 +- graphics/circuit_macros/examples/Plate.m4 | 8 +- graphics/circuit_macros/examples/Resistors.m4 | 4 +- graphics/circuit_macros/examples/examples.pdf | Bin 902995 -> 907801 bytes graphics/circuit_macros/examples/files.tex | 15 +- graphics/circuit_macros/examples/mf/cct.mf | 90 ++++----- graphics/circuit_macros/examples/shapes.m4 | 3 +- graphics/circuit_macros/examples/svg/EVplugsSVG.m4 | 210 +++++++++++++++++++++ .../circuit_macros/examples/svg/GeometrySVG.m4 | 4 +- graphics/circuit_macros/examples/svg/Makefile | 2 +- .../circuit_macros/examples/svg/ResistorsSVG.m4 | 2 +- .../circuit_macros/examples/svg/SmithchartSVG.m4 | 4 +- .../circuit_macros/examples/svg/examplesSVG.htmx | 19 +- graphics/circuit_macros/examples/svg/shapesSVG.m4 | 3 +- graphics/circuit_macros/examples/xfig/xfiglib.fig | 52 ++--- graphics/circuit_macros/gpic.m4 | 2 +- graphics/circuit_macros/lib3D.m4 | 2 +- graphics/circuit_macros/libSLD.m4 | 2 +- graphics/circuit_macros/libcct.m4 | 56 +++--- graphics/circuit_macros/libgen.m4 | 14 +- graphics/circuit_macros/liblog.m4 | 2 +- graphics/circuit_macros/mfpic.m4 | 2 +- graphics/circuit_macros/mpost.m4 | 2 +- graphics/circuit_macros/pgf.m4 | 2 +- graphics/circuit_macros/postscript.m4 | 2 +- graphics/circuit_macros/psfrag.m4 | 2 +- graphics/circuit_macros/pstricks.m4 | 2 +- graphics/circuit_macros/svg.m4 | 18 +- graphics/circuit_macros/xfig.m4 | 2 +- graphics/pstricks/contrib/pst-fractal/Changes | 2 + .../contrib/pst-fractal/doc/pst-fractal-doc.pdf | Bin 31953724 -> 32019437 bytes .../contrib/pst-fractal/doc/pst-fractal-doc.tex | 25 ++- .../contrib/pst-fractal/dvips/pst-fractal.pro | 27 ++- .../contrib/pst-fractal/tex/pst-fractal.tex | 59 ++++-- 48 files changed, 840 insertions(+), 277 deletions(-) create mode 100644 graphics/circuit_macros/examples/EVplugs.m4 create mode 100644 graphics/circuit_macros/examples/svg/EVplugsSVG.m4 (limited to 'graphics') diff --git a/graphics/circuit_macros/CHANGES b/graphics/circuit_macros/CHANGES index 775d3f614d..49a571e818 100644 --- a/graphics/circuit_macros/CHANGES +++ b/graphics/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/graphics/circuit_macros/Copying b/graphics/circuit_macros/Copying index 6ff1081c39..1f70c82402 100644 --- a/graphics/circuit_macros/Copying +++ b/graphics/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/graphics/circuit_macros/README b/graphics/circuit_macros/README index 430bf5e99f..7f20713e40 100644 --- a/graphics/circuit_macros/README +++ b/graphics/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/graphics/circuit_macros/darrow.m4 b/graphics/circuit_macros/darrow.m4 index e1d6073106..c795ab90f7 100644 --- a/graphics/circuit_macros/darrow.m4 +++ b/graphics/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/graphics/circuit_macros/doc/Circuit_macros.pdf b/graphics/circuit_macros/doc/Circuit_macros.pdf index 9c67589a6f..6e109a06de 100644 Binary files a/graphics/circuit_macros/doc/Circuit_macros.pdf and b/graphics/circuit_macros/doc/Circuit_macros.pdf differ diff --git a/graphics/circuit_macros/doc/PconnMan.m4 b/graphics/circuit_macros/doc/PconnMan.m4 index 0933af6810..2543048d00 100644 --- a/graphics/circuit_macros/doc/PconnMan.m4 +++ b/graphics/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/graphics/circuit_macros/doc/Version.tex b/graphics/circuit_macros/doc/Version.tex index 45c581b3af..c0b5abb2fd 100644 --- a/graphics/circuit_macros/doc/Version.tex +++ b/graphics/circuit_macros/doc/Version.tex @@ -1 +1 @@ -Version 9.9 +Version 10.0 diff --git a/graphics/circuit_macros/doc/body.tex b/graphics/circuit_macros/doc/body.tex index b984ec0435..dc0738769f 100644 --- a/graphics/circuit_macros/doc/body.tex +++ b/graphics/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/graphics/circuit_macros/doc/defines.tex b/graphics/circuit_macros/doc/defines.tex index dfcee2f91d..7ac3cbaed4 100644 --- a/graphics/circuit_macros/doc/defines.tex +++ b/graphics/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/graphics/circuit_macros/dpictools.pic b/graphics/circuit_macros/dpictools.pic index 66453a30e4..f3936bb0db 100644 --- a/graphics/circuit_macros/dpictools.pic +++ b/graphics/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 "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/graphics/circuit_macros/examples/Contact.m4 b/graphics/circuit_macros/examples/Contact.m4 index 26f8d5a982..e4e7a5a176 100644 --- a/graphics/circuit_macros/examples/Contact.m4 +++ b/graphics/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/graphics/circuit_macros/examples/EVplugs.m4 b/graphics/circuit_macros/examples/EVplugs.m4 new file mode 100644 index 0000000000..5631482bf9 --- /dev/null +++ b/graphics/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 "") +.PE diff --git a/graphics/circuit_macros/examples/Euro.m4 b/graphics/circuit_macros/examples/Euro.m4 index 5186cb2f5c..26230facbe 100644 --- a/graphics/circuit_macros/examples/Euro.m4 +++ b/graphics/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/graphics/circuit_macros/examples/Makefile b/graphics/circuit_macros/examples/Makefile index 55cf147dcc..c582c0b35c 100644 --- a/graphics/circuit_macros/examples/Makefile +++ b/graphics/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/graphics/circuit_macros/examples/Pconn.m4 b/graphics/circuit_macros/examples/Pconn.m4 index cb8afd0875..2543048d00 100644 --- a/graphics/circuit_macros/examples/Pconn.m4 +++ b/graphics/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/graphics/circuit_macros/examples/Plate.m4 b/graphics/circuit_macros/examples/Plate.m4 index 0700f072a0..3937543d2a 100644 --- a/graphics/circuit_macros/examples/Plate.m4 +++ b/graphics/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/graphics/circuit_macros/examples/Resistors.m4 b/graphics/circuit_macros/examples/Resistors.m4 index 659f75ff65..960897afc0 100644 --- a/graphics/circuit_macros/examples/Resistors.m4 +++ b/graphics/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/graphics/circuit_macros/examples/examples.pdf b/graphics/circuit_macros/examples/examples.pdf index dafab3e6a7..184aa8a400 100644 Binary files a/graphics/circuit_macros/examples/examples.pdf and b/graphics/circuit_macros/examples/examples.pdf differ diff --git a/graphics/circuit_macros/examples/files.tex b/graphics/circuit_macros/examples/files.tex index 5fbcf50af8..22c3a5c5fd 100644 --- a/graphics/circuit_macros/examples/files.tex +++ b/graphics/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 @@ -151,6 +152,13 @@ \src{Pconn.m4}.} } +\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 @@ -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/graphics/circuit_macros/examples/mf/cct.mf b/graphics/circuit_macros/examples/mf/cct.mf index 10b713bb50..6e6fa4f73e 100644 --- a/graphics/circuit_macros/examples/mf/cct.mf +++ b/graphics/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/graphics/circuit_macros/examples/shapes.m4 b/graphics/circuit_macros/examples/shapes.m4 index 749e09896d..f50b029230 100644 --- a/graphics/circuit_macros/examples/shapes.m4 +++ b/graphics/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/graphics/circuit_macros/examples/svg/EVplugsSVG.m4 b/graphics/circuit_macros/examples/svg/EVplugsSVG.m4 new file mode 100644 index 0000000000..54530a1bfa --- /dev/null +++ b/graphics/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 "") +.PE diff --git a/graphics/circuit_macros/examples/svg/GeometrySVG.m4 b/graphics/circuit_macros/examples/svg/GeometrySVG.m4 index 576315d285..38e748d7e3 100644 --- a/graphics/circuit_macros/examples/svg/GeometrySVG.m4 +++ b/graphics/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/graphics/circuit_macros/examples/svg/Makefile b/graphics/circuit_macros/examples/svg/Makefile index c3144811dc..0d68dcac3b 100644 --- a/graphics/circuit_macros/examples/svg/Makefile +++ b/graphics/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/graphics/circuit_macros/examples/svg/ResistorsSVG.m4 b/graphics/circuit_macros/examples/svg/ResistorsSVG.m4 index 4da2b4f344..fe88a79ad3 100644 --- a/graphics/circuit_macros/examples/svg/ResistorsSVG.m4 +++ b/graphics/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/graphics/circuit_macros/examples/svg/SmithchartSVG.m4 b/graphics/circuit_macros/examples/svg/SmithchartSVG.m4 index eb47e6585e..7d80e3e01e 100644 --- a/graphics/circuit_macros/examples/svg/SmithchartSVG.m4 +++ b/graphics/circuit_macros/examples/svg/SmithchartSVG.m4 @@ -215,8 +215,8 @@ Loopover_(`rca', iflatex(command "}%", ifsvg(command "")) -] at (0,0)') +] ') -Smithchart +Smithchart at (0,0) .PE diff --git a/graphics/circuit_macros/examples/svg/examplesSVG.htmx b/graphics/circuit_macros/examples/svg/examplesSVG.htmx index f2ea0d8bc5..af8a15f840 100644 --- a/graphics/circuit_macros/examples/svg/examplesSVG.htmx +++ b/graphics/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 dvisvgm and - pdf2svg although -there may be font-related issues for some diagrams. -
+ pdf2svg. 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.


-There are a number of other issues: +There are other issues: