From 6bc45f3087df0ce19bdf3c57a0aec55944ec40ed Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 11 Mar 2023 21:11:43 +0000 Subject: circuit-macros (11mar23)% git-svn-id: svn://tug.org/texlive/trunk@66549 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/circuit-macros/CHANGES | 3 + Master/texmf-dist/doc/latex/circuit-macros/Copying | 2 +- Master/texmf-dist/doc/latex/circuit-macros/README | 2 +- .../texmf-dist/doc/latex/circuit-macros/darrow.m4 | 2 +- .../latex/circuit-macros/doc/Circuit_macros.pdf | Bin 1030606 -> 1037622 bytes .../doc/latex/circuit-macros/doc/ConnMan.m4 | 61 +- .../doc/latex/circuit-macros/doc/FusesMan.m4 | 19 +- .../doc/latex/circuit-macros/doc/Makefile | 10 +- .../doc/latex/circuit-macros/doc/MoreTableMan.m4 | 6 - .../doc/latex/circuit-macros/doc/SLDsMan.m4 | 6 +- .../doc/latex/circuit-macros/doc/Version.tex | 2 +- .../doc/latex/circuit-macros/doc/body.tex | 424 ++-- .../doc/latex/circuit-macros/doc/defines.tex | 117 +- .../doc/latex/circuit-macros/doc/heaterMan.m4 | 26 + .../doc/latex/circuit-macros/dpictools.pic | 17 +- .../latex/circuit-macros/examples/ASME_Y14-5.m4 | 170 -- .../latex/circuit-macros/examples/ASME_Y14-5.m4def | 170 ++ .../latex/circuit-macros/examples/AntiqueClock.m4 | 145 -- .../doc/latex/circuit-macros/examples/ArrowFn.m4 | 56 - .../doc/latex/circuit-macros/examples/Attention.m4 | 41 - .../latex/circuit-macros/examples/Autoencoder.m4 | 82 - .../doc/latex/circuit-macros/examples/Autologix.m4 | 57 - .../doc/latex/circuit-macros/examples/Blogix.m4 | 87 - .../doc/latex/circuit-macros/examples/CSlight.m4 | 173 -- .../doc/latex/circuit-macros/examples/Ccurve.m4 | 13 - .../doc/latex/circuit-macros/examples/Chuck.m4 | 231 -- .../doc/latex/circuit-macros/examples/Conn.m4 | 59 +- .../doc/latex/circuit-macros/examples/Counting.m4 | 26 - .../doc/latex/circuit-macros/examples/Cruller.m4 | 67 - .../doc/latex/circuit-macros/examples/Euro.m4 | 128 - .../doc/latex/circuit-macros/examples/Eye.m4 | 61 - .../doc/latex/circuit-macros/examples/Floor.m4 | 25 - .../doc/latex/circuit-macros/examples/Flow.m4 | 4 +- .../latex/circuit-macros/examples/FlowchartDefs.m4 | 255 -- .../circuit-macros/examples/FlowchartDefs.m4def | 255 ++ .../doc/latex/circuit-macros/examples/Fuses.m4 | 23 +- .../doc/latex/circuit-macros/examples/IC10107.m4 | 48 - .../circuit-macros/examples/IntersectingPlanes.m4 | 84 - .../doc/latex/circuit-macros/examples/Koch.m4 | 32 - .../latex/circuit-macros/examples/Lettering.m4def | 1158 +++++++++ .../doc/latex/circuit-macros/examples/Lyap.m4 | 160 -- .../doc/latex/circuit-macros/examples/Makefile | 60 +- .../doc/latex/circuit-macros/examples/Metamodel.m4 | 78 - .../doc/latex/circuit-macros/examples/MoreTable.m4 | 42 +- .../latex/circuit-macros/examples/OpAmpFilter.m4 | 72 - .../doc/latex/circuit-macros/examples/Orbits.m4 | 74 - .../doc/latex/circuit-macros/examples/PPA.m4 | 40 - .../doc/latex/circuit-macros/examples/Plate.m4 | 4 +- .../latex/circuit-macros/examples/README-examples | 22 +- .../doc/latex/circuit-macros/examples/Resolver.m4 | 49 - .../doc/latex/circuit-macros/examples/SPM.m4 | 59 - .../latex/circuit-macros/examples/SampleFlow.m4 | 35 - .../latex/circuit-macros/examples/ShadeSector.m4 | 14 - .../doc/latex/circuit-macros/examples/Shaky.m4 | 115 - .../doc/latex/circuit-macros/examples/Stator.m4 | 54 - .../doc/latex/circuit-macros/examples/UNO.m4 | 16 +- .../doc/latex/circuit-macros/examples/Views.dms | 5 + .../doc/latex/circuit-macros/examples/Wheat.m4 | 21 - .../doc/latex/circuit-macros/examples/Zcos.m4 | 29 - .../doc/latex/circuit-macros/examples/birds.m4 | 36 - .../doc/latex/circuit-macros/examples/bistable.m4 | 35 - .../doc/latex/circuit-macros/examples/brace.m4 | 80 - .../doc/latex/circuit-macros/examples/chaos.m4 | 39 - .../doc/latex/circuit-macros/examples/clock.m4 | 20 - .../latex/circuit-macros/examples/dpv/ByteDPV.svg | 150 -- .../latex/circuit-macros/examples/dpv/ConnDPV.m4 | 76 +- .../circuit-macros/examples/dpv/ConnectorsDPV.pic | 368 --- .../circuit-macros/examples/dpv/ConnectorsDPV.svg | 853 ------- .../circuit-macros/examples/dpv/CsourceDPV.svg | 1175 --------- .../latex/circuit-macros/examples/dpv/EEPDPV.svg | 662 ----- .../latex/circuit-macros/examples/dpv/FlowDPV.m4 | 2 +- .../latex/circuit-macros/examples/dpv/FlowDPV.svg | 890 ------- .../latex/circuit-macros/examples/dpv/FontsDPV.svg | 204 -- .../latex/circuit-macros/examples/dpv/FusesDPV.m4 | 24 +- .../circuit-macros/examples/dpv/HeathkitDPV.svg | 2010 --------------- .../doc/latex/circuit-macros/examples/dpv/Makefile | 13 +- .../circuit-macros/examples/dpv/MoreTableDPV.m4 | 96 +- .../latex/circuit-macros/examples/dpv/NportDPV.svg | 192 -- .../latex/circuit-macros/examples/dpv/PlateDPV.m4 | 2 +- .../latex/circuit-macros/examples/dpv/UNODPV.m4 | 18 +- .../circuit-macros/examples/dpv/controlDPV.svg | 745 ------ .../latex/circuit-macros/examples/dpv/ex01DPV.svg | 391 --- .../circuit-macros/examples/dpv/examplesDPVs.html | 417 ---- .../circuit-macros/examples/dpv/paletteDPV.svg | 2639 -------------------- .../doc/latex/circuit-macros/examples/dpv/quick.m4 | 16 - .../latex/circuit-macros/examples/dpv/quick.pic | 124 - .../latex/circuit-macros/examples/dpv/quick.svg | 47 - .../latex/circuit-macros/examples/dpv/quick.tex | 188 -- .../latex/circuit-macros/examples/dpv/quick.xsvg | 47 - .../latex/circuit-macros/examples/dpv/quickDPV.svg | 104 - .../doc/latex/circuit-macros/examples/examples.pdf | Bin 1897548 -> 1903610 bytes .../circuit-macros/examples/extras/ASMEbox.m4 | 55 + .../latex/circuit-macros/examples/extras/Ant.m4 | 30 + .../circuit-macros/examples/extras/ArrowFn.m4 | 56 + .../circuit-macros/examples/extras/Attention.m4 | 41 + .../circuit-macros/examples/extras/Autoencoder.m4 | 82 + .../latex/circuit-macros/examples/extras/Bridge.m4 | 35 + .../circuit-macros/examples/extras/CSlight.m4 | 173 ++ .../latex/circuit-macros/examples/extras/Ccurve.m4 | 14 + .../latex/circuit-macros/examples/extras/Chuck.m4 | 226 ++ .../latex/circuit-macros/examples/extras/Clocks.m4 | 229 ++ .../circuit-macros/examples/extras/ControlLoop.m4 | 40 + .../circuit-macros/examples/extras/Counting.m4 | 26 + .../circuit-macros/examples/extras/Cruller.m4 | 67 + .../circuit-macros/examples/extras/Cylinder.m4 | 43 + .../latex/circuit-macros/examples/extras/Egg.m4 | 42 + .../latex/circuit-macros/examples/extras/Euro.m4 | 128 + .../latex/circuit-macros/examples/extras/Eye.m4 | 61 + .../latex/circuit-macros/examples/extras/Fefets.m4 | 75 + .../circuit-macros/examples/extras/FieldLines.m4 | 24 + .../latex/circuit-macros/examples/extras/Floor.m4 | 25 + .../latex/circuit-macros/examples/extras/Flow2.m4 | 47 + .../circuit-macros/examples/extras/Hexagon.m4 | 64 + .../circuit-macros/examples/extras/Highgain.m4 | 80 + .../circuit-macros/examples/extras/IC10107.m4 | 48 + .../latex/circuit-macros/examples/extras/Koch.m4 | 32 + .../latex/circuit-macros/examples/extras/Lyap.m4 | 160 ++ .../latex/circuit-macros/examples/extras/Makefile | 211 ++ .../circuit-macros/examples/extras/Metamodel.m4 | 78 + .../latex/circuit-macros/examples/extras/Obliq.m4 | 72 + .../circuit-macros/examples/extras/OneLine.m4 | 67 + .../circuit-macros/examples/extras/OpAmpFilter.m4 | 69 + .../latex/circuit-macros/examples/extras/Optics.m4 | 31 + .../latex/circuit-macros/examples/extras/Orbits.m4 | 74 + .../latex/circuit-macros/examples/extras/PPA.m4 | 40 + .../latex/circuit-macros/examples/extras/PerpTo.m4 | 26 + .../latex/circuit-macros/examples/extras/Pipe.m4 | 40 + .../latex/circuit-macros/examples/extras/Planes.m4 | 175 ++ .../circuit-macros/examples/extras/README_extras | 6 + .../circuit-macros/examples/extras/RandomNodes.m4 | 19 + .../latex/circuit-macros/examples/extras/Region.m4 | 38 + .../circuit-macros/examples/extras/Resolver.m4 | 49 + .../latex/circuit-macros/examples/extras/SPM.m4 | 59 + .../circuit-macros/examples/extras/SampleFlow.m4 | 35 + .../circuit-macros/examples/extras/ShadeSector.m4 | 14 + .../latex/circuit-macros/examples/extras/Shadow.m4 | 129 + .../latex/circuit-macros/examples/extras/Shaky.m4 | 115 + .../latex/circuit-macros/examples/extras/Star.m4 | 38 + .../latex/circuit-macros/examples/extras/Stator.m4 | 54 + .../circuit-macros/examples/extras/TR_fill.m4 | 17 + .../latex/circuit-macros/examples/extras/Views.m4 | 304 +++ .../latex/circuit-macros/examples/extras/Wheat.m4 | 21 + .../latex/circuit-macros/examples/extras/Wheel.m4 | 20 + .../examples/extras/Y14-5_example.m4 | 53 + .../latex/circuit-macros/examples/extras/Zcos.m4 | 29 + .../latex/circuit-macros/examples/extras/birds.m4 | 36 + .../circuit-macros/examples/extras/bistable.m4 | 35 + .../latex/circuit-macros/examples/extras/brace.m4 | 115 + .../latex/circuit-macros/examples/extras/chaos.m4 | 39 + .../latex/circuit-macros/examples/extras/hsv.m4 | 26 + .../latex/circuit-macros/examples/extras/person.m4 | 45 + .../circuit-macros/examples/extras/rotellipse.m4 | 20 + .../circuit-macros/examples/extras/squiggle.m4 | 26 + .../latex/circuit-macros/examples/extras/venus.m4 | 74 + .../doc/latex/circuit-macros/examples/files.tex | 37 +- .../doc/latex/circuit-macros/examples/heater.m4 | 26 + .../doc/latex/circuit-macros/examples/keyboard.pdf | Bin 118060 -> 118060 bytes .../doc/latex/circuit-macros/examples/mf/cct.mf | 50 +- .../latex/circuit-macros/examples/mpost/Makefile | 9 +- .../latex/circuit-macros/examples/paletteSVG.m4 | 336 --- .../doc/latex/circuit-macros/examples/person.m4 | 48 - .../latex/circuit-macros/examples/rotellipse.m4 | 20 - .../doc/latex/circuit-macros/examples/shadowed.m4 | 49 + .../doc/latex/circuit-macros/examples/snake.m4 | 21 - .../doc/latex/circuit-macros/examples/squiggle.m4 | 26 - .../doc/latex/circuit-macros/examples/venus.m4 | 74 - .../latex/circuit-macros/examples/xfig/xfiglib.fig | 4 +- .../doc/latex/circuit-macros/examples/xtras | 61 + Master/texmf-dist/doc/latex/circuit-macros/gpic.m4 | 2 +- .../texmf-dist/doc/latex/circuit-macros/lib3D.m4 | 2 +- .../texmf-dist/doc/latex/circuit-macros/libSLD.m4 | 6 +- .../texmf-dist/doc/latex/circuit-macros/libcct.m4 | 266 +- .../texmf-dist/doc/latex/circuit-macros/libgen.m4 | 24 +- .../texmf-dist/doc/latex/circuit-macros/liblog.m4 | 2 +- .../texmf-dist/doc/latex/circuit-macros/mfpic.m4 | 2 +- .../texmf-dist/doc/latex/circuit-macros/mpost.m4 | 2 +- Master/texmf-dist/doc/latex/circuit-macros/pdf.m4 | 59 + Master/texmf-dist/doc/latex/circuit-macros/pgf.m4 | 2 +- .../doc/latex/circuit-macros/postscript.m4 | 2 +- .../texmf-dist/doc/latex/circuit-macros/psfrag.m4 | 2 +- .../doc/latex/circuit-macros/pstricks.m4 | 2 +- Master/texmf-dist/doc/latex/circuit-macros/svg.m4 | 2 +- Master/texmf-dist/doc/latex/circuit-macros/xfig.m4 | 2 +- 183 files changed, 6899 insertions(+), 15200 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/doc/heaterMan.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/ASME_Y14-5.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/ASME_Y14-5.m4def delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/ArrowFn.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Attention.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Autoencoder.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Autologix.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Blogix.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/CSlight.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Ccurve.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Chuck.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Counting.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Cruller.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Euro.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Eye.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Floor.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/FlowchartDefs.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/FlowchartDefs.m4def delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/IC10107.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/IntersectingPlanes.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Koch.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Lettering.m4def delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Lyap.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Metamodel.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/OpAmpFilter.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Orbits.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/PPA.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Resolver.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/SPM.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/SampleFlow.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/ShadeSector.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Shaky.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Stator.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Views.dms delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Wheat.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/Zcos.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/birds.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/bistable.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/brace.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/chaos.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/clock.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ByteDPV.svg delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ConnectorsDPV.pic delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ConnectorsDPV.svg delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/CsourceDPV.svg delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/EEPDPV.svg delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FlowDPV.svg delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FontsDPV.svg delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/HeathkitDPV.svg delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/NportDPV.svg delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/controlDPV.svg delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ex01DPV.svg delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/examplesDPVs.html delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/paletteDPV.svg delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.pic delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.svg delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.tex delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.xsvg delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quickDPV.svg create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ASMEbox.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Ant.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ArrowFn.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Attention.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Autoencoder.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Bridge.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/CSlight.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Ccurve.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Chuck.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Clocks.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ControlLoop.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Counting.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Cruller.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Cylinder.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Egg.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Euro.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Eye.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Fefets.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/FieldLines.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Floor.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Flow2.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Hexagon.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Highgain.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/IC10107.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Koch.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Lyap.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Makefile create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Metamodel.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Obliq.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/OneLine.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/OpAmpFilter.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Optics.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Orbits.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/PPA.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/PerpTo.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Pipe.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Planes.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/README_extras create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/RandomNodes.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Region.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Resolver.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/SPM.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/SampleFlow.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ShadeSector.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Shadow.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Shaky.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Star.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Stator.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/TR_fill.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Views.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheat.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheel.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Y14-5_example.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Zcos.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/birds.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/bistable.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/brace.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/chaos.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/hsv.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/person.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/rotellipse.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/squiggle.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/extras/venus.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/heater.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/paletteSVG.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/person.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/rotellipse.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/shadowed.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/snake.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/squiggle.m4 delete mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/venus.m4 create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/examples/xtras create mode 100644 Master/texmf-dist/doc/latex/circuit-macros/pdf.m4 diff --git a/Master/texmf-dist/doc/latex/circuit-macros/CHANGES b/Master/texmf-dist/doc/latex/circuit-macros/CHANGES index 1b7b0c5e5f2..1c34df35d82 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.2: New options for tconn, heater, lamp, thermocouple. + New macro jumper. Include configuration file pdf.m4 in distribution. + Fixed examples/Makefile. Tweaked macros sl_ct, figures in the manual. Version 10.1: Simplified structure and cleanup of the examples directory. New options for em_arrows. Tweaked dot, cross. Version 10.0: New macros Between_, thyristor_t. Bugfix in inductor(,W). diff --git a/Master/texmf-dist/doc/latex/circuit-macros/Copying b/Master/texmf-dist/doc/latex/circuit-macros/Copying index 3cd17dd5b34..96f3a0ceed7 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/Copying +++ b/Master/texmf-dist/doc/latex/circuit-macros/Copying @@ -1,4 +1,4 @@ -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/README b/Master/texmf-dist/doc/latex/circuit-macros/README index 618fb0c532a..d3cd9aab5a1 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/README +++ b/Master/texmf-dist/doc/latex/circuit-macros/README @@ -1,5 +1,5 @@ -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4 b/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4 index 9ba4fa86886..98a98eac323 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 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdf b/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdf index c03b30f49cc..5aba4c4ac4d 100644 Binary files a/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdf and b/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdf differ diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/ConnMan.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/ConnMan.m4 index 204ad5d96a4..aad37f00b26 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/ConnMan.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/ConnMan.m4 @@ -1,5 +1,5 @@ .PS -# `Conn.m4' +# `ConnMan.m4' cct_init T:[ @@ -31,39 +31,44 @@ C: [ C1: ccoax `"\tt ccoax\vphantom{(}"' ht 11 pt__ at C1.s below thinlines_ - arrow <- up 0.1 right 0.1 from C1.C.ne; "C" ljust - arrow <- down 0.05 right 0.1 from C1.S.e; "S" wid 0.1 ht 11pt__ ljust + arrow <- down 0.05 left 0.15 from C1.C.w; "\sl C" rjust + arrow <- down 0.05 right 0.1 from C1.S.e; "\sl S" wid 0.1 ht 11pt__ ljust thicklines_ - C2: ccoax(at C1+(0,0.3),F) - `"\tt ccoax(,F)"' ht 11 pt__ wid 0.65 at C2.ne ljust - ] with .C1.sw at T.S2.se+(0.6,0.0) - -Y: [ - tconn(,O) - {`"\tt tconn(,O)"' at last line.c+(0,-0.2) wid 43 pt__ } - move to Here+(0.3,0) - P1: tconn(,>) - {`"\tt (,>)"' at last line.c+(0,-0.2)} - move to P1.end+(0.3,0) - tconn(,>>) - {`"\tt (,>{}>)"' at last line.c+(0,-0.2)} - move to P1.start+(0,linewid) - P3: tconn(,<) - {`"\tt tconn(,<)"' at last line.c+(0,-0.2)} - move to P3.end+(0.3,0) - tconn(,<<) - {`"\tt (,<{}<)"' at last line.c+(0,-0.2)} - -] with .sw at (C.e.x-0.4,T.s.y) + C2: ccoax(at C1+(0,0.4),F) + `"\tt ccoax(,F)"' ht 11 pt__ at C2.s below + ] with .w at T.e+(0.6,0.0) B: [ tbox(V_2) - { `"\tt tbox(V\_2)"' at last [].sw below ljust } - tbox(V_1,,,<) with .sw at last [].se+(0.75,0) + { `"\tt tbox(V\_2)"' at last [].s below } + tbox(V_1,,,<) at last []+(0,-0.4) { `"\tt tbox(V\_1,{,},<)"' at last [].s below } - tbox(V_1,,,<>) with .sw at last [].se+(0.75,0) + tbox(V_1,,,<>) at last []+(0,-0.4) { `"\tt tbox(V\_1,{,},<>)"' at last [].s below } -] with .nw at T.sw+(0,-0.2) +] with .w at C.e + (0.5,-0.1) + +Y: [ + P1: tconn(,O) + {`"\tt tconn(,O)"' at last line.c+(0,-0.2) wid 43 pt__ } + move to Here+(0.3,0) + P2: tconn(,>) + {`"\tt $\ldots$(,>)"' at last line.c+(0,-0.2)} + move to P2.end+(0.3,0) + P3: tconn(,>>) + {`"\tt $\ldots$(,>{}>)"' at last line.c+(0,-0.2)} + move to P3.end+(0.3,0) + P4: tconn(,<) + {`"\tt $\ldots$(,<)"' at last line.c+(0,-0.2)} + move to P4.end+(0.3,0) + P5: tconn(,<<) + {`"\tt $\ldots$(,<{}<)"' at last line.c+(0,-0.2)} + move to P5.end+(0.3,0) + P6: tconn(,A) + {`"\tt $\ldots$(,A)"' at last line.c+(0,-0.2)} + move to P6.end+(0.3,0) + P7: tconn(,M) + {`"\tt $\ldots$(,M)"' at last line.c+(0,-0.2)} +] with .nw at T.sw+(0,-0.35) .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/FusesMan.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/FusesMan.m4 index bde24fac3eb..dc9262f1e2f 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/FusesMan.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/FusesMan.m4 @@ -1,5 +1,5 @@ .PS -# `Fuses.m4' +# `FusesMan.m4' cct_init movewid = 0.25 @@ -23,17 +23,26 @@ movewid = 0.25 move cbreaker(,R); {"`{\tt cbreaker(,R)}'" at last line.c+(0,-0.25)} move - cbreaker(,{,}D); {"`{\tt $\ldots$(,{,}D)}'" at last line.c+(0,-0.25)} + cbreaker(,,D); {"`{\tt $\ldots$(,{,}D)}'" at last line.c+(0,-0.25)} move - cbreaker(,{,}T); {"`{\tt $\ldots$(,{,}T)}'" at last line.c+(0,-0.25)} + cbreaker(,,T); {"`{\tt $\ldots$(,{,}T)}'" at last line.c+(0,-0.25)} move - cbreaker(,{,}TS); {"`{\tt $\ldots$(,{,}TS)}'" at last line.c+(0,-0.25) } + cbreaker(,,TS); {"`{\tt $\ldots$(,{,}TS)}'" at last line.c+(0,-0.25) } } move down; right_ { fuse(,HB) ; {"`{\tt fuse(,HB)}'" at last line.c+(0,-0.2)} move - fuse(,HC,0.5,0.3) ; {"`{\tt (,HC,0.5,0.3)}'" at last line.c+(0,-0.25)} + fuse(,HC,0.5,0.3) ; {"`{\tt $\ldots$(,HC,0.5,0.3)}'" at last line.c+(0,-0.27)} + move + jumper ; {"`{\tt jumper}'" at last line.c+(0,-0.2) } + move + jumper(,CJBED) ; {"`{\tt $\ldots$(,CJBED)}'" at last line.c+(0,-0.2) } + move + jumper(,body=outlined "gray" shaded "gray";) + "`\tt $\ldots$(,body=outlined \"gray\" \textbackslash'" \ + at last line.start+(0,-20bp__) ljust \ + "`\tt \hphantom{body=}shaded \"gray\";)'" ljust } .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/doc/Makefile index e7ba8ab0611..6eb3e35e033 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/Makefile +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Makefile @@ -23,8 +23,8 @@ PICTEX = \ VariableMan.tex WindingsMan.tex Workflow.tex XformMan.tex \ arrowex.tex \ bitr.tex bi_trans.tex bistableMan.tex \ - currents.tex eboxdims.tex fbfilter.tex fetMan.tex lrarrows.tex \ - MoreTableMan.tex mplex.tex opampex.tex quick.tex \ + currents.tex eboxdims.tex fbfilter.tex fetMan.tex heaterMan.tex \ + lrarrows.tex MoreTableMan.tex mplex.tex opampex.tex quick.tex \ sampleIC.tex stringdims.tex thyristorMan.tex ujtMan.tex \ woodchips.tex @@ -37,6 +37,7 @@ BOXDIMS = AntennasMan.tex bi_trans.tex ConfigA.tex ConfigB.tex ConfigC.tex \ # BOXDIMS = $(PICTEX) LATEX = latex +LATEX = latex --quiet M4 = m4 -I $(LIBDIR) # If M4PATH has been set: M4 = m4 @@ -72,7 +73,7 @@ $(DOC).pdf: touch mode.tex -if grep -q tikz mode.tex ; then true ; else \ rm mode.tex; make MODE=tikz clean mode.tex ; fi - make MODE=pgf PIC="dpic -g" LATEX=pdflatex SFX=pdf \ + make MODE=pgf PIC="dpic -g" LATEX="pdflatex --quiet" SFX=pdf \ POST="; printf '\\\\vspace*{-0.5\\\\baselineskip}\\n'" \ $(DOC).pdf # This breaks internal links: @@ -81,7 +82,8 @@ $(DOC).pdf: $(DOC).ps: printf "\n $(DOC).ps:\n\n" - make MODE=pstricks PIC="dpic -p" LATEX=latex SFX=dvi POST="" $(DOC).dvi + make MODE=pstricks PIC="dpic -p" LATEX="latex --quiet" \ + SFX=dvi POST="" $(DOC).dvi dvips -t letter $(DOC) -o $(DOC).$(SFX): mode.tex citations $(PICTEX) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/MoreTableMan.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/MoreTableMan.m4 index 32ca4bd2812..9f736bfb401 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/MoreTableMan.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/MoreTableMan.m4 @@ -5,14 +5,8 @@ cct_init movewid = 2 pt__ hm = 2.05 vm = 0.28 -{ right; {lamp ; move;"`{\tt lamp}'" ljust} - move right_ hm - {thermocouple ; move;"`{\tt thermocouple}'" ljust } -} move down 0.25; right_ { {memristor ; move;"`{\tt memristor}'" ljust} - move right_ hm - {heater; move;"`{\tt heater}'" ljust} move right_ hm {tline ; move;"`{\tt tline}'" ljust} } diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/SLDsMan.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/SLDsMan.m4 index 67cb2fa8557..2e6efd811dd 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/SLDsMan.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/SLDsMan.m4 @@ -183,7 +183,8 @@ ifelse(1,1,` arrow <- from CTC.Tend down 10bp__ right 7bp__; "\sl Tend" below ljust "\sl Tc" at CTC.Tc ljust thicklines_ - BB: sl_busbar(right_ 3*dimen_,4,port=D) with .Start at Ref.start+(0,-dimen_*2) + BB: sl_busbar(right_ 3*dimen_,4,port=D) \ + with .Start at Ref.start+(0,-dimen_*1.75) "sl\_busbar(right\_ 3{\tt*}dimen\_,4,port=D)" ljust at BB.Start+(0,-15bp__) thinlines_ arrow up ds right ds/2 <- from BB.P1.ne chop dotrad_; "\sl P1" ljust @@ -207,9 +208,6 @@ ifelse(1,1,` "\sl BrI" at Tr32.BrI.n above "\sl BrO" at Tr32.BrO.n above "\sl Br" at Tr32.Br.w rjust -# "\sl C1" at Tr32.Body.C1.nw rjust -# "\sl C2" at Tr32.Body.C2.ne ljust -# "\sl C3" at Tr32.C3.se ljust ] #with .nw at Generators.sw+(0,-dimen_/2) command "}%" 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 e5132166625..58fb6e89e5a 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/Version.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Version.tex @@ -1 +1 @@ -Version 10.1 +Version 10.2 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 934e7813d74..f89fe710fe7 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/body.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/body.tex @@ -121,19 +121,10 @@ concepts applied here do not require \Mfour. Read this section to understand basic usage of \Mfour and macros. The contents of file {\tt quick.m4} and resulting diagram are shown in \FR{quick} to illustrate the language -% to show several ways for placing circuit elements, -%and to provide sufficient information for producing and the production of basic labeled circuits. \begin{figure}[ht] \parbox{\textwidth}{\small\verbatiminput{quick.m4}}% \hfill\llap{\raise-1.15in\hbox{\input quick }}% -% \hfill\llap{\raise-1.15in\hbox{\pdftooltip{\input quick }% -% {The file {\tt quick.m4} and resulting diagram. -% There are several ways of drawing the same picture; for example, -% nodes (such as {\tt Origin}) can be defined and circuit branches -% drawn between them; or absolute coordinates can be used (e.g., -% {\tt source(up\_ from (0,0) to (0,0.75))} ). Element sizes and styles -% can be varied as described in later sections.}}}% \vspace*{-\baselineskip}% \caption{The file {\tt quick.m4} and resulting diagram. There are several ways of drawing the same picture; for example, @@ -189,6 +180,7 @@ and invoke the {\tt-g} option of \dpic as follows: dpic -g quick.pic > quick.tex \vspace*\parsep} +\enlargethispage{\baselineskip} A configuration file ({\tt pstricks.m4} and {\tt pgf.m4} in the above examples) is {\em always} the first file to be given to \Mfour. Put the following or its equivalent in the document body: @@ -210,18 +202,19 @@ The essential line is \verb|\input quick| whether or not the {\tt figure} environment is used. The effect of the \Mfour command above is shown in \FR{ConfigA}. +\begin{figure}[H] +% \vspace*{-\baselineskip} + \input ConfigA + \caption{The command + {\tt m4 pstricks.m4 quick.m4 > quick.pic}. + \label{ConfigA}} + \end{figure} Configuration files {\tt pstricks.m4} or {\tt pgf.m4} cause library {\tt libgen.m4} to be read, thereby defining the macro {\tt cct\_init}. The diagram source file is then read and the circuit-element macros in {\tt libcct.m4} are defined during expansion of {\tt cct\_init}. -\begin{figure}[ht] - \input ConfigA - \caption{The command - {\tt m4 pstricks.m4 quick.m4 > quick.pic}. - \label{ConfigA}} - \end{figure} \subsubsection{Processing with \gpic\label{Processingwithgpic:}} If your printer driver understands \tpic specials and @@ -270,31 +263,16 @@ The \Mfour commands illustrated above can be shortened to \noindent by inserting {\tt include(pstricks.m4)} (assuming \PSTricks processing) -%or {\tt include(libgen.m4)} (assuming the default processor is to be used) {\em immediately} after the {\tt .PS} line, the effect of which -%The effect of the first include statement is shown in \FR{ConfigB}. However, if you then want to use \TPGF, the line must be changed to {\tt include(pgf.m4)}. -%and the second in \FR{ConfigC}. \begin{figure}[h!] \input{ConfigB} \caption{The command {\tt m4 quick.m4 > quick.pic}, with {\tt include(pstricks.m4)} preceding {\tt cct\_init}.} \label{ConfigB} \end{figure} -%\begin{figure}[h!] -% \input{ConfigC} -% \caption{The command {\tt m4 quick.m4 > quick.pic}, -% with {\tt include(libgen.m4)} preceding {\tt cct\_init}, causing -% the default configuration file to be read.} -% \label{ConfigC} -% \end{figure} - -%\item -%On some systems, setting the environment variable {\tt M4PATH} to {\sl -%installdir} allows the {\tt -I} {\sl installdir} option of \Mfour to -%be omitted, but it will be kept in following examples. \item In the absence of a need to examine the file {\tt quick.pic}, @@ -784,7 +762,7 @@ The first part of the source file for this figure is %as follows: on the left: -\begin{figure}[ht] +\begin{figure}[H] \parbox{2in}{\tt .PS\\ \hbox{}\quad cct\_init\\ \hbox{}\quad linewid = 2.0\\ \hbox{}\quad linethick\_(2.0)\\ R1: resistor} \raisebox{-0.3in}{\hbox{\input{BigResistor.tex}}} @@ -904,7 +882,7 @@ directional parameters to point up. Capacitors are illustrated in \FR{Capacitors}. See \SR{Composite:} for the {\tt variable} macro. -\begin{figure}[h!t] +\begin{figure}[H] \input CapacitorsMan \caption{The {\tt capacitor({\sl linespec, chars,} [R],{\sl height, width})} macro, and an example application of the {\tt variable} macro.} @@ -912,7 +890,7 @@ See \SR{Composite:} for the {\tt variable} macro. \end{figure} Basic inductors are illustrated in \FR{Inductors}. -\begin{figure}[h!] +\begin{figure}[H] \input InductorsMan \caption{Basic inductors created with the {\tt inductor({\sl linespec,} W|L, {\sl cycles,} M|P|K, {\sl loop wid})} @@ -923,13 +901,21 @@ Basic inductors are illustrated in \FR{Inductors}. \label{Inductors} \end{figure} -Some more basic elements are in \FR{MoreTable}, and amplifiers in \FR{AmpTable}. -\begin{figure}[h!t] +Some two-terminal elements often drawn with truncated leads are in +\FR{heaterMan}. +More basic elements are in \FR{MoreTable}, and amplifiers in \FR{AmpTable}. +\begin{figure}[H] + \input heaterMan + \caption{These elements have two terminals but are often drawn + with truncated leads.} + \label{heaterMan} + \end{figure} +\begin{figure}[H] \input MoreTableMan \caption{More two-terminal elements.} \label{MoreTable} \end{figure} -\begin{figure}[h!t] +\begin{figure}[H] \vspace*{-\baselineskip} \input AmpTableMan \caption{Amplifier, delay, and integrator.} @@ -939,7 +925,7 @@ Some more basic elements are in \FR{MoreTable}, and amplifiers in \FR{AmpTable}. \FR{Sources} shows sources, many of which contain internal symbols, and of which the {\tt AC} and {\tt S} options illustrate the need to draw a single cycle of a sinusoid or approximate sinusoid. -\begin{figure}[h!t] +\begin{figure}[H] \input SourcesMan \caption{Sources and source-like elements.} \label{Sources} @@ -960,15 +946,49 @@ and for power-system diagrams, macros and {\tt Ysymbol(at {\sl position, keys,} U|D|L|R|{\sl degrees})}, -%Diodes and fuses are shown in \FRS{Diodes} and \REF{Fuses}. Diodes are shown in \FR{Diodes}. -\begin{figure}[h!t] +\begin{figure}[H] \input DiodesMan \caption{The macro {\tt diode(\linespec, B|b|CR|D|L|LE[R]|P[R]|S|T|U|V|v|w|Z|{\sl chars}, [R][E])}. Appending {\tt K} to the second argument draws an open arrowhead.} \label{Diodes} \end{figure} +The arrows are drawn relative to the diode direction by the {\tt LE} +option. For absolute arrow directions, one can +define a wrapper (see \SR{Writing:}) for the {\tt diode} macro to draw arrows +at 45 degrees, for example: +\par +{\tt define(`myLED',`diode(`\$1'); em\_arrows(N,45) + with .Tail at last [].ne')} + +Switches with numerous controls are in \FR{Switches}, +and fuses, breakers, and jumpers in \FR{Fuses}. +\begin{figure}[H] + \input SwitchesMan + \caption{The + {\tt switch(\linespec,L|R,{\sl chars},L|B|D,{\sl attribs})} + macro is a wrapper for the macros + {\tt lswitch(\linespec,[L|R],[O|C][D][K][A])}, + {\tt bswitch(\linespec,[L|R],[O|C])}, + and the many-optioned + {\tt dswitch(\linespec,R,W[ud]B {\sl chars,text})} shown. + The switch is drawn in the current drawing direction. + A second-argument {\tt R} produces a mirror + image with respect to the drawing direction. + The separately defined macros {\tt Proxim} and {\tt Magn} + embellish switches in the bottom row.} + \label{Switches} + \end{figure} +\begin{figure}[H] + \input FusesMan + \caption{Variations of the macros + {\tt fuse(\linespec, A|dA|B|C|D|E|S|HB|HC|SB, {\sl wid}, {\sl ht}),} + {\tt cbreaker(\linespec,L|R,D|T|TS),} + and + {\tt jumper(\linespec,{\sl chars}|{\sl keys}).}} + \label{Fuses} + \end{figure} Most of the two-terminal elements are oriented; that is, they have a defined direction or polarity. Several element macros include an @@ -1009,61 +1029,10 @@ done by redefining {\tt dimen\_} globally as described in \SR{Circuitscaling:}. %{\tt resized(1.8,`diode',right\_ 0.4);} %{\tt resized(1.8,`reversed',`diode',right\_ 0.4)} -Fuses are shown in \FR{Fuses} -and switches with numerous controls in \FR{Switches}. -\begin{figure}[h!t] - \input FusesMan - \caption{Variations of the macros - {\tt fuse(\linespec, A|dA|B|C|D|E|S|HB|HC|SB, {\sl wid}, {\sl ht})} - and {\tt cbreaker(\linespec,L|R,D|T|TS)}.} - \label{Fuses} - \end{figure} - -%\enlargethispage{\baselineskip}% -\begin{figure}[h!t] -%\vspace*{-\baselineskip} - \input SwitchesMan - \caption{The - {\tt switch(\linespec,L|R,{\sl chars},L|B|D,{\sl attribs})} - macro is a wrapper for the macros - {\tt lswitch(\linespec,[L|R],[O|C][D][K][A])}, - {\tt bswitch(\linespec,[L|R],[O|C])}, - and the many-optioned - {\tt dswitch(\linespec,R,W[ud]B {\sl chars,text})} shown. - The switch is drawn in the current drawing direction. - A second-argument {\tt R} produces a mirror - image with respect to the drawing direction. - The separately defined macros {\tt Proxim} and {\tt Magn} - embellish switches in the bottom row.} - \label{Switches} - \end{figure} - -\pagebreak -\FR{Emarrows} contains radiation-effect arrows for embellishing two-terminal -and other macros. -\begin{figure}[h!t] - \input EmarrowsMan - \caption{Radiation arrows: {\tt em\_arrows({\sl type}|{\sl keys,% - angle, length})}} - \label{Emarrows} - \end{figure} -The arrow stems are named {\sl A1}, {\sl A2}, -and each pair is drawn in a \verb|[]| block, with -the names {\sl Head} and {\sl Tail} defined to -aid placement near another device. The second argument specifies -absolute angle in degrees (default 135 degrees). -The arrows are drawn relative to the diode direction by the {\tt LE} -option in \FR{Diodes}. For absolute arrow directions, one can -define a wrapper (see \SR{Writing:}) for the {\tt diode} macro to draw arrows -at 45 degrees, for example: -\par -{\tt define(`myLED',`diode(`\$1'); em\_arrows(N,45) - with .Tail at last [].ne')} - \FR{Arresters} shows a collection of surge-protection devices, or arresters, of which the {\tt E} and {\tt S} types may be either 2-terminal or as 3-terminal (composite) elements described in \SR{Composite:}. -\begin{figure}[ht] +\begin{figure}[H] \input ArrestersMan \caption{Variations of the {\tt arrester({\sl linespec, chars,} {\sl wid}[{\tt :}{\sl arrowhead ht}], @@ -1089,7 +1058,7 @@ thus, the following line draws the third resistor in \FR{Variable}: \par {\tt resistor(up\_ dimen\_); variable(,uN)} -\begin{figure}[ht] +\begin{figure}[H] \vspace*{-\baselineskip} \input VariableMan \caption{Illustrating @@ -1105,6 +1074,21 @@ thus, the following line draws the third resistor in \FR{Variable}: \label{Variable} \end{figure} +\pagebreak +\FR{Emarrows} contains radiation-effect arrows for embellishing two-terminal +and other macros. +\begin{figure}[H] + \input EmarrowsMan + \caption{Radiation arrows: {\tt em\_arrows({\sl type}|{\sl keys,% + angle, length})}} + \label{Emarrows} + \end{figure} +The arrow stems are named {\sl A1}, {\sl A2}, +and each pair is drawn in a \verb|[]| block, with +the names {\sl Head} and {\sl Tail} defined to +aid placement near another device. The second argument specifies +absolute angle in degrees (default 135 degrees). + \subsection{Branch-current arrows\label{Branchcurrent:}} Arrowheads and labels can be added to conductors using basic \pic statements. For example, the following line adds a labeled @@ -1116,8 +1100,7 @@ just been drawn. Many variations of this are possible: \enlargethispage{\baselineskip}% Macros have been defined to simplify labelling two-terminal elements, as shown in \FR{currents}. -\begin{figure}[ht] -% \ifpdf\vspace*{-0.5\baselineskip}\fi% +\begin{figure}[H] \input currents \caption{Illustrating {\tt b\_current, larrow,} and {\tt rarrow}. The drawing direction is to the right.} @@ -1184,7 +1167,7 @@ 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] +\begin{figure}[H] \vspace*{-\baselineskip} \parbox{4in}{\small \verbatiminput{Loop.m4}}% \hfill\raise-0.5in\hbox{\input Loop } @@ -1273,7 +1256,7 @@ The macro {\tt eleminit\_} in the two-terminal elements invokes to establish element length and direction. As shown in \FR{Oblique}, -\begin{figure}[h!t] +\begin{figure}[H] \vspace{-\baselineskip} \parbox{4.5in}{\small \verbatiminput{Oblique.m4}}% \hfill\raise-0.7in\llap{\hbox{\input Oblique }}% @@ -1316,7 +1299,7 @@ makes some geometries particularly simple. Thus, \noindent draws three elements in series as shown in the top line of \FR{Series}. -\begin{figure}[ht] +\begin{figure}[H] \vspace{-\baselineskip} \input Series \caption{Three ways of drawing basic elements in series.} @@ -1367,7 +1350,7 @@ producing the left circuit in \FR{ParSeries}: line from L.end to C.end \end{verbatim} -\begin{figure}[ht] +\begin{figure}[H] % \vspace*{-\baselineskip} \input ParSeries \vspace*{-\baselineskip} @@ -1425,7 +1408,7 @@ first draws a resistor along the specified line, then adds arrows for taps at fractional positions along the body, with default or specified length. A negative length draws the arrow from the right of the current drawing direction. -\begin{figure}[ht!] +\begin{figure}[H] \input Potentiometers \caption{Default and multiple-tap potentiometer.} \label{Potentiometers} @@ -1437,7 +1420,7 @@ The macro {\tt $\ldots$)}, shown in \FR{Taps}, will add taps to the immediately preceding two-terminal element. -\begin{figure}[ht] +\begin{figure}[H] \input Taps \caption{Macros for adding taps to two-terminal elements.} \label{Taps} @@ -1458,7 +1441,7 @@ drawn elements. A few composite symbols derived from two-terminal elements are shown in \FR{Composite}. -\begin{figure}[ht] +\begin{figure}[H] \vspace*{-0.5ex} % \vspace*{-\baselineskip} \input Composite @@ -1485,7 +1468,7 @@ This macro is one of several in which a temporary drawing direction is set using the {\tt setdir\_( U|D|L|R|{\sl degrees, default} R|L|U|D|{\sl degrees} )} macro and reset at the end using {\tt resetdir\_}. -\begin{figure}[ht!] +\begin{figure}[H] \input GroundsMan \caption{The {\tt ground( at }{\sl position}{\tt, @@ -1498,7 +1481,7 @@ The arguments of {\tt antenna(at }{\sl position}{\tt, T|{\sl stem length}, A|L|T|S|D|P|F, U|D|L|R|{\sl degrees})} shown in \FR{Antennas} are similar to those of {\tt ground}. -\begin{figure}[h!] +\begin{figure}[H] \input AntennasMan \caption{Antenna symbols, with macro arguments shown above and terminal names below.} @@ -1507,16 +1490,15 @@ shown in \FR{Antennas} are similar to those of {\tt ground}. \FR{Opamp} illustrates the macro {\tt opamp({\sl\linespec, - label, + label, size, chars})\label{OPAMP}}. -The element is enclosed in a block -containing the predefined internal locations shown. -\begin{figure}[ht] -% \ifpdf\vspace*{-0.5\baselineskip}\fi% +\begin{figure}[H] \input OpampMan \caption{Operational amplifiers. The {\tt P} option adds power connections. The second and third arguments can be used to place and rotate arbitrary text at {\tt In1} and {\tt In2}.} \label{Opamp} \end{figure} +The element is enclosed in a block +containing the predefined internal locations shown. These locations can be referenced in later commands, for example as ``{\tt last [].Out}.'' The first argument defines the direction and length of the opamp, but the @@ -1538,7 +1520,7 @@ using postprocessor commands (for example \PSTricks \verb|\rput|) as second and third arguments. The code in \FR{opampex} places an opamp with three connections. -\begin{figure}[h!b] +\begin{figure}[H] \parbox{4in}{\small \verbatiminput{opampexbody.m4}}% \quad\raise-0.2in\hbox{\input opampex }% \caption{A code fragment invoking the @@ -1546,11 +1528,10 @@ The code in \FR{opampex} places an opamp with three connections. \label{opampex} \end{figure} -\pagebreak \FR{Xform} shows variants of the transformer macro, which has predefined internal locations {\sl P1,} {\sl P2,} {\sl S1,} {\sl S2,} {\sl TP,} and {\sl TS.} -\begin{figure}[h!t] +\begin{figure}[H] \input XformMan \caption{The {\tt transformer(\linespec,L|R,{\sl np},% [A|P][W|L][D1|D2|D12|D21],{\sl ns})} @@ -1573,6 +1554,14 @@ A {\tt D1} puts phase dots at the {\sl P1, S1} end, {\tt D2} at the \FR{Audio} shows some audio devices, defined in {\tt []} blocks, with predefined internal locations as shown. +\begin{figure}[H] + \input AudioMan + \caption{Audio components: + {\tt speaker(U|D|L|R|{\sl degrees},{\sl size},{\sl type}), + bell, microphone, buzzer, + earphone}, with their internally named positions and components.} + \label{Audio} + \end{figure} The first argument specifies the device orientation. Thus, \par @@ -1581,24 +1570,13 @@ Thus, \noindent places an upward-facing speaker with input {\sl In2} at the current location. -\begin{figure}[ht] -% \ifpdf\vspace*{-\baselineskip}\fi% - \input AudioMan -% \ifpdf\vspace*{-\baselineskip}\fi% - \caption{Audio components: - {\tt speaker(U|D|L|R|{\sl degrees},{\sl size},{\sl type}), - bell, microphone, buzzer, - earphone}, with their internally named positions and components.} - \label{Audio} - \end{figure} + The {\tt nport({\sl box specs {\tt[;} other commands{\tt]}, nw, nn, ne, ns, space ratio, pin lgth, style})} macro is shown in \FR{Nport}. -\begin{figure}[ht] -% \ifpdf\vspace*{-\baselineskip}\fi +\begin{figure}[H] \input NportMan -% \ifpdf\vspace*{-\baselineskip}\fi \caption{The {\tt nport} macro draws a sequence of pairs of named pins on each side of a box. The pin names are shown. The default is a twoport. The {\tt nterm} macro draws single pins instead of pin pairs.} @@ -1644,9 +1622,8 @@ define(`nullor',`nport(`$1' \end{verbatim} The above example and the related gyrator macro are illustrated in -\FR{NLG}.\hfill\break - -\begin{figure}[ht] +\FR{NLG}. +\begin{figure}[H] \input NLGMan \caption{The {\tt nullor} example and the {\tt gyrator} macro are customizations of the {\tt nport} macro.} @@ -1658,8 +1635,8 @@ which contains predefined locations {\sl P, C, O} for the armature and normally closed and normally open terminals. An {\tt I} in the first argument draws open circles for contacts. -\begin{figure}[ht] -% \ifpdf\vspace*{-\baselineskip}\else\vspace*{-0.5\baselineskip}\fi% +\begin{figure}[H] + \vspace*{-\baselineskip} \input ContactMan \caption{The {\tt contact({\sl chars})} macro (default drawing direction right) @@ -1667,10 +1644,10 @@ An {\tt I} in the first argument draws open circles for contacts. \label{Contact} \end{figure} -\pagebreak +\enlargethispage{\baselineskip} The {\tt contacts({\sl poles, chars})} macro in \FR{Contacts} draws multiple contacts. -\begin{figure}[h!t] +\begin{figure}[H] \input ContactsMan \caption{The {\tt contacts({\sl poles, chars})} macro (drawing direction right).} @@ -1681,19 +1658,17 @@ For drawing relays, the macro {\tt relaycoil({\sl chars, wid, ht,} {\tt U|D|L|R|}{\sl degrees})} shown in \FR{relaycoil} provides a choice of connection points and actuator types. - -\begin{figure}[ht] -% \ifpdf\vspace*{-\baselineskip}\else\vspace*{-0.5\baselineskip}\fi% +\begin{figure}[H] \input relaycoilMan \vspace{-1ex} \caption{The {\tt relaycoil} macro.} \label{relaycoil} \end{figure} -The {\tt relay({\sl poles, chars})} macro in \FR{Relay} +The {\tt relay} macro in \FR{Relay} defines coil terminals {\sl V1, V2} and contact terminals {\sl P$_i$, C$_i$, O$_i$.} -\begin{figure}[ht] +\begin{figure}[H] \input RelayMan \vspace{-1ex} \caption{The {\tt relay({\sl poles, chars})} @@ -1701,9 +1676,19 @@ terminals {\sl P$_i$, C$_i$, O$_i$.} \label{Relay} \end{figure} +The double-throw switches shown in \FR{NPDT} are drawn in the +current drawing direction like the two-terminal elements, but are +composite elements that must be placed accordingly. +\begin{figure}[H] + \input NPDTMan + \caption{Multipole double-throw switches drawn by + {\tt NPDT({\sl npoles}, [R])}.} + \label{NPDT} + \end{figure} + The {\tt jack} and {\tt plug} macros and their defined points are illustrated in \FR{Jack}. -The first +The first argument of both macros establishes the drawing direction. \begin{figure}[H] \input JackMan \vspace{-1ex} @@ -1713,7 +1698,6 @@ The first \label{Jack} \end{figure} \noindent% -argument of both macros establishes the drawing direction. The second argument is a string of characters defining drawn components. An {\tt R} in the string specifies a right orientation with respect to the drawing direction. @@ -1726,24 +1710,26 @@ argument of both macros establishes the drawing direction. or {\tt S[M|B]} substrings add auxiliary contacts with specified make or break points. + A macro for drawing headers is in \FR{Headers}. -Some connectors are shown in \FR{Conn} and \FR{Pconn}. -The {\tt tstrip} macro allows ``{\sl key}{\tt =}{\sl value}{\tt ;}'' arguments -for width and height. -\begin{figure}[h!t] +\begin{figure}[H] \input HeadersMan \caption{Macro {\tt Header(1|2, {\sl rows, wid, ht, type})}.} \label{Headers} \end{figure} -\begin{figure}[h!t] + +Some connectors are shown in \FR{Conn} and \FR{Pconn}. +The {\tt tstrip} macro allows ``{\sl key}{\tt =}{\sl value}{\tt ;}'' arguments +for width and height. +\begin{figure}[H] \input ConnMan \caption{Macros {\tt tstrip(R|L|U|D|{\sl degrees}, {\sl chars})}, {\tt ccoax(at} {\sl location}, {\tt M|F, {\sl diameter})}, - {\tt tconn(\linespec, >|>>|<|<<|O[F], {\sl wid})}, and - {\tt tbox({\sl text, wid, ht}, <|>|<>,{\sl type})}. } + {\tt tbox({\sl text, wid, ht}, <|>|<>,{\sl type})}, and + {\tt tconn(\linespec, {\sl chars}|{\sl keys}, {\sl wid})}. } \label{Conn} \end{figure} -\begin{figure}[h!t] +\begin{figure}[H] \input PconnMan \caption{A small set of power connectors drawn by {\tt pconnex(R|L|U|D|}{\sl degrees, chars}{\tt)}. Each connector has @@ -1751,27 +1737,14 @@ for width and height. \label{Pconn} \end{figure} -The double-throw switches shown in \FR{NPDT} are drawn in the -current drawing direction like the two-terminal elements, but are -composite elements that must be placed accordingly. -\begin{figure}[h!t] -% \ifpdf{\vspace*{-1ex}}\fi% - \input NPDTMan - \caption{Multipole double-throw switches drawn by - {\tt NPDT({\sl npoles}, [R])}.} - \label{NPDT} - \end{figure} - A basic winding macro for magnetic-circuit sketches and similar figures is shown in \FR{Windings}. For simplicity, the complete spline is first drawn and then blanked in appropriate places using the background (core) color (\verb!lightgray! for example, default \verb!white!). -\begin{figure}[h!t] +\begin{figure}[H] \vspace*{-\baselineskip}% -% \ifpdf\vspace*{-2\baselineskip}\else \vspace{-\baselineskip}\fi \input WindingsMan -% \ifpdf\vspace*{-\baselineskip}\else\vspace*{-1ex}\fi \caption{The {\tt winding(L|R, diam, pitch, turns, core wid, core color)} macro draws a coil with axis along the current drawing direction. Terminals {\tt T1} and {\tt T2} are defined. @@ -1785,30 +1758,33 @@ is first drawn and then blanked in appropriate places using the background {\tt bi\_tr(\linespec,L|R,P,E)} which contains predefined internal locations {\sl E}, {\sl B}, {\sl C}. -The first argument defines the distance and direction from {\sl E} -\begin{figure}[ht] +\begin{figure}[H] + \vspace*{-1ex} \input BipMan \caption{Variants of bipolar transistor {\tt bi\_tr(\linespec,L|R,P,E)} (current direction upward).} \label{Bip} \end{figure} +The first argument defines the distance and direction from {\sl E} to {\sl C,} with location determined by the enclosing block as for other elements, and the base placed to the left or right of the current drawing direction according to the second argument. Setting the third argument to {\tt P} creates a PNP device instead of NPN, and setting the fourth to {\tt E} draws an envelope around the device. + \FR{Darlington} shows a composite macro with several optional internal elements. -\begin{figure}[h!t] +\begin{figure}[H] \input Darlington \caption{Macro {\tt Darlington(L|R,[E][P][B1][E1|R1][E2|R2][D][Z])}, drawing direction {\tt up\_}.} \label{Darlington} \end{figure} +\enlargethispage{\baselineskip} The code fragment example in \FR{bitr} places a bipolar transistor, connects a ground to the emitter, and connects a resistor to the collector. -\begin{figure}[h!t] +\begin{figure}[H] \quad\quad\parbox{4in}{\small \verbatiminput{bitrbody.m4}}% \quad\raise-0.4in\hbox{\input bitr }% \vspace{-\baselineskip} @@ -1821,7 +1797,7 @@ the macro {\tt bi\_trans(\linespec, L|R, {\sl chars}, E)}, which draws the components of the transistor according to the characters in its third argument. For example, multiple emitters and collectors can be specified as shown in \FR{bitrans}. -\begin{figure}[h!t] +\begin{figure}[H] \input bi_trans \caption{The {\tt bi\_trans(\linespec,L|R,{\sl chars},E)} macro. The sub-elements are specified by the third argument. The substring @@ -1830,16 +1806,16 @@ specified as shown in \FR{bitrans}. \label{bitrans} \end{figure} +\pagebreak A UJT macro with predefined internal locations {\sl B1,} {\sl B2,} and {\sl E} is shown in \FR{ujt}. -\begin{figure}[h!t] -% \ifpdf\vspace*{-\baselineskip}\else\vspace*{-0.5\baselineskip}\fi% +\begin{figure}[H] \input ujtMan -% \ifpdf\vspace*{-0.5\baselineskip}\fi% \caption{UJT devices, with current drawing direction {\tt up\_}. } \label{ujt} \end{figure} + The 3 or 4-terminal thyristor macro with predefined internal locations {\sl G} and {\sl T1,} {\sl T2,} or {\sl A,} {\sl K,} {\sl G,} and {\sl Ga} @@ -1870,17 +1846,16 @@ but require a third argument for the label for the compound block; thus, draws the element from position {\sl A} to position {\sl B} with label {\sl Q3}, and draws a line from {\sl G}. -\enlargethispage{\baselineskip} Some FETs with predefined internal locations {\sl S,} {\sl D,} and {\sl G} are also included, with similar arguments to those of {\tt bi\_tr,} as shown in \FR{fet}. -\begin{figure}[ht] +\begin{figure}[H] \vspace*{-\baselineskip} \input fetMan \caption{JFET, insulated-gate enhancement and depletion MOSFETs, simplified versions, graphene, and ferroelectric fets. These macros are wrappers that invoke the {\tt mosfet} - macro as shown in the middle and bottom rows. + macro as shown in the second and lower rows. The bottom-row examples show custom devices, the first defined by omitting the substrate connection, and the second defined using a wrapper macro.} @@ -1904,7 +1879,6 @@ temporarily for compatibility. This system allows considerable freedom in choosing or customizing components, as illustrated in \FR{fet}. -\enlargethispage{\baselineskip} The number of possible semiconductor symbols is very large, so these macros must be regarded as prototypes. Often an element is a minor modification of existing elements. @@ -1928,7 +1902,7 @@ optional argument ``{\tt at} {\sl location}'', the line-thickness macros, the {\tt fill\_} macro, and {\tt crossover}, which is a useful if archaic method to show non-touching conductor crossovers, as in \FR{bistable}. -\begin{figure}[h!t] +\begin{figure}[H] \input bistableMan % \vspace{-1ex} \caption{Bipolar transistor circuit, illustrating {\tt crossover} @@ -1967,7 +1941,7 @@ in \SR{Planarobjects:}. If two straight lines meet at an angle then, depending on the postprocessor, the corner may not be mitred or rounded unless the two lines belong to a multisegment line, as illustrated in \FR{Corners}. -\begin{figure}[ht] +\begin{figure}[H] \input Corners \caption{Producing mitred angles and corners.} \label{Corners} @@ -2015,8 +1989,8 @@ Repetitive actions can also be performed with the {\tt libgen} macro {\sl value2}, $\ldots$)} \noindent -which evaluates {\sl actions} for each instance of {\sl variable} set -to {\sl value1, value2, $\ldots$}. +which evaluates {\sl actions} and increments counter {\tt m4Lx} +for each instance of {\sl variable} set to {\sl value1, value2, $\ldots$} \xection{Logic gates\label{Logicgates:}} \FR{Logic} shows the basic logic gates included in @@ -2029,7 +2003,7 @@ By default, $N=2$ except for macros {\tt NOT\_gate} and {\tt BUFFER\_gate}, which have one input {\tt In1} unless they are given a first argument, which is treated as the line specification of a two-terminal element. -\begin{figure}[h!] +\begin{figure}[H] \vspace*{-0.5\baselineskip} \input LogicMan \caption{Basic logic gates. The input and output locations of @@ -2043,7 +2017,7 @@ two-terminal element. Input locations retain their positions relative to the gate body regardless of gate orientation, as in \FR{FF}. -\begin{figure}[ht] +\begin{figure}[H] \vspace*{-\baselineskip} \parbox{4.75in}{\small \verbatiminput{FF.m4}}% \input FF @@ -2051,9 +2025,11 @@ regardless of gate orientation, as in \FR{FF}. \caption{$SR$ flip-flop.} \label{FF} \end{figure} + +\pagebreak Beyond a default number (6) of inputs, the gates are given wings as in \FR{exVIII}. -\begin{figure}[h!t] +\begin{figure}[H] \input mplex \vspace*{-0.5\baselineskip} \caption{Eight-input multiplexer, showing a gate with wings.} @@ -2127,7 +2103,7 @@ If the first argument is non-blank however, then the buffer is drawn along an invisible line like a two-terminal element, which is convenient sometimes but requires internal locations of the block to be referenced using {\tt last []}, as shown in \FR{Buffer}. -\begin{figure}[h!t] +\begin{figure}[H] \vspace*{-\baselineskip} \input Buffer \caption{The {\tt BUFFER\_gate} and {\tt BUFFER\_gen} macros. @@ -2142,7 +2118,7 @@ the macro {\tt FlipFlop(D|T|RS|JK, {\sl label, boxspec, pinlength})}, which is a wrapper for the more general macro {\tt FlipFlopX(}{\sl boxspec, label, leftpins, toppins, rightpins, bottompins, pinlength}{\tt )}. -\begin{figure}[ht] +\begin{figure}[H] \input FlipFlop \caption{The {\tt FlipFlop} and {\tt FlipFlopX} macros, with variations.} \label{FlipFlops} @@ -2164,17 +2140,17 @@ a label, use {\tt lg\_bartxt(}{\sl label}{\tt)}. The {\sl pinopts} are {\tt [L|M|I|O][N][E]} as for the \verb|lg_pin| macro. Optional argument 7 is the pin length in drawing units. -\pagebreak + \FR{Multiplexer} shows a multiplexer block with variations, and \FR{Demultiplexer} shows the very similar demultiplexer. -\begin{figure}[h!t] +\begin{figure}[H] \input MultiplexerMan \caption{The {\tt Mux({\sl input count}, {\sl label}, [L][B|H|X][N[$n$]|S[$n$]][[N]OE],{\sl wid},{\sl ht})} macro.} \label{Multiplexer} \end{figure} -\begin{figure}[h!t] +\begin{figure}[H] \input DemultiplexerMan \caption{The {\tt Demux({\sl input count}, {\sl label}, [L][B|H|X][N[$n$]|S[$n$]][[N]OE],{\sl wid},{\sl ht})} macro.} @@ -2187,7 +2163,7 @@ For example, the following code defines the custom flipflops in \FR{ShiftR}. define(`customFF',`FlipFlopX(wid 10*L_unit ht FF_ht*L_unit,, :S;NE:CK;:R, N:PR, :Q;;ifelse(`$1',1,:lg_bartxt(Q)), N:CLR) ') \end{verbatim} -\begin{figure}[h!t] +\begin{figure}[H] \input ShiftRMan \caption{A 5-bit shift register.} \label{ShiftR} @@ -2201,10 +2177,8 @@ For hybrid applications, the \verb|dac| and \verb|adc| macros are illustrated in \FR{Dac}. The figure shows the default and predefined internal locations, the number of which can be specified as macro arguments. -\begin{figure}[ht] -% \ifpdf\vspace*{-\baselineskip}\fi% +\begin{figure}[H] \input Dac -% \ifpdf\vspace*{-\baselineskip}\fi% \caption{The {\tt dac({\sl width,height},nIn,nN,nOut,nS)} and {\tt adc({\sl width,height},nIn,nN,nOut,nS)} macros.} \label{Dac} @@ -2232,7 +2206,7 @@ To draw the left-side pins, for example, one can write \end{verbatim} \noindent and so on. -\begin{figure}[h!] +\begin{figure}[H] \parbox{\textwidth}{\small\verbatiminput{sampleIC.m4}}% \hfill\llap{\raise-0.15in\hbox{\input sampleIC }}% \vspace*{-\baselineskip}% @@ -2311,7 +2285,8 @@ that can be named as for normal two-terminal elements. There are four arguments for which defaults are provided as always. The transformers are shown in \FR{SLDTransformers} and other two-terminal elements in \FR{SLDTwoTerms}. -\begin{figure}[h!t] +\begin{figure}[H] + \vspace*{-\baselineskip} \SLDTransformers \caption{The SLD draft transformers drawn by {\tt sl\_transformer({\sl linespec, key-value pairs, @@ -2324,7 +2299,7 @@ elements in \FR{SLDTwoTerms}. The first argument is the linespec defining the direction and location of the element, e.g., {\tt sl\_transformer(right\_ {\sl expr}).} -\begin{figure}[h!t] +\begin{figure}[H] \SLDTwoTerms \caption{SLD two-terminal elements, drawing direction {\tt right\_}.} \label{SLDTwoTerms} @@ -2388,23 +2363,23 @@ and can be labelled like a normal two-terminal element. If, however, breakers are included using {\tt B: tt\_box(,{,},C,C)} then write, for example, {\tt llabel(,Box 15,{,},Body)} to place the label correctly. +\pagebreak \subsection{One-terminal and composite SLD elements\label{OneTermSLD:}} The one-terminal elements have two components: a stem with optional breaker or slash symbol, and a head. SLD generators are shown in \FR{SLDGenerators}, other one-terminal elements in \FR{SLDOneTerms}. -\begin{figure}[h!t] +\begin{figure}[H] \SLDGenerators \caption{SLD generators, drawing direction {\tt up\_}.} \label{SLDGenerators} \end{figure} -\begin{figure}[h!t] +\begin{figure}[H] \SLDOneTerms \caption{SLD one-terminal elements, drawing direction {\tt up\_}.} \label{SLDOneTerms} \end{figure} There are three arguments, as follows. - The first argument is a linespec which defines the location and drawing direction of the element stem. The second argument is a sequence of semicolon-separated key-value pairs @@ -2431,9 +2406,10 @@ internal positions. For {\tt sl\_busbar}, these are {\sl Start, End,} and {\sl P1, P2, $\ldots$ Pnp} where {\sl np} is the value of the second argument. -\begin{figure}[h!t] +\begin{figure}[H] + \vspace*{-\baselineskip} \SLDComposite - \caption{The {\tt sl\_busbar()} and two variants of {\tt sl\_ct}.} + \caption{The {\tt sl\_busbar()} and some transformer variants.} \label{SLDComposite} \end{figure} @@ -2601,11 +2577,12 @@ to defer macro expansion. Macro arguments are referenced inside a macro by number; thus {\tt \$1} refers to the first argument. A few examples will be given. +\pagebreak \Example{1} Custom two-terminal elements can often be defined by writing a wrapper for an existing element. For example, an enclosed thermal switch can be defined as shown in \FR{Thermal}. -\begin{figure}[ht] +\begin{figure}[H] \parbox{5in}{\tt define(`thermalsw',\hfill\break \hbox{}\space`dswitch(`\$1',`\$2',WDdBTh)\hfill\break \hbox{}\space\space circle rad distance(last [].T,last line.c) @@ -2620,22 +2597,22 @@ In the following, two macros are defined to simplify the repeated drawing of a series resistor and series inductor, and the macro {\tt tsection} defines a subcircuit that is replicated several times to generate \FR{Tline}. -\pagebreak + {\small \verbatiminput{Tline.m4}} -\begin{figure}[h!t] -% \ifpdf\vspace*{-\baselineskip}\fi% +\begin{figure}[H] \input Tline \caption{A lumped model of a transmission line, illustrating the use of custom macros.} \label{Tline} \end{figure} +\pagebreak \Example{3} \FR{HybridPi} shows an element that is composed of several basic elements and that can be drawn in any direction prespecified by {\tt Point\_({\sl degrees})}. The labels always appear in their natural horizontal orientation. -\begin{figure}[h!t] +\begin{figure}[H] \vspace*{-0.5ex} \input HybridPi \vspace*{-0.5ex} @@ -2682,11 +2659,12 @@ define(`hybrid_PI_BJT', `$2' ] ') \end{verbatim} +\pagebreak \Example{4} A number of elements have arguments meant explicitly for customization. \FR{Sinus} customizes the {\tt source} macro to show a cycle of a horizontal sinusoid with adjustable phase given by argument 2 in degrees, as might be wanted for a 3-phase circuit: -\begin{figure}[ht] +\begin{figure}[H] \hfill\input Sinus \vspace*{-0.5in} \begin{verbatim} @@ -2710,7 +2688,7 @@ power of the \verb|vec_()| and \verb|rvec_()| macros is not required. Suppose that an optoisolator is to be drawn with left-right or right-left orientation as shown in \FR{Opto}. %\vspace*{-0.5em} -\begin{figure}[h!b] +\begin{figure}[H] \input Opto \caption{Showing {\tt opto} and {\tt opto(BR)} with defined labels.} \label{Opto} @@ -2783,7 +2761,7 @@ F2: fbfilter(L,R,K_2,C_{23},R_3) with .In at F1.In ground(at F2.G) \end{verbatim} \vspace*{-0.5em} -\begin{figure}[ht] +\begin{figure}[H] \input fbfilter \caption{Showing the result of two invocations of the {\tt fbfilter} macro, with labels.} @@ -2895,7 +2873,7 @@ can generate the custom arrows shown below the three native arrows in \FR{arrowex}. The defined keys are {\tt type=}; {\tt lgth=}; {\tt wdth=}; {\tt shaft=}; and {\tt head=}. Many variations of these arrowheads are possible. -\begin{figure}[h!t] +\begin{figure}[H] \input arrowex \caption{The three \dpic native arrows and others generated by {\tt sarrow({\sl linespec}, {\sl keys})}.} @@ -2968,7 +2946,7 @@ This hackery is summarized below, with an example in \FR{stringdim}. The argument of {\tt s\_box} need not be text exclusively; it can be anything that produces a \TeX\ box, for example, \verb|\includegraphics|. \end{itemize} -\begin{figure}[h!t] +\begin{figure}[H] \parbox{3.5in}{\small\tt.PS\\ gen\_init\\ sinclude(Circuit\_macros.dim)\\ @@ -3091,7 +3069,7 @@ Objects can be taylored to their attached text by invoking The small source file in \FR{boxdims}, for example, produces the box in the figure. %\vspace*{-\baselineskip}% -\begin{figure}[ht] +\begin{figure}[H] \parbox{4.2in}{\small \input eboxdims.verb }% \hfill\llap{\raise-0.35in\hbox{\input eboxdims }}% \vspace{-\baselineskip} @@ -3114,7 +3092,7 @@ libgen.m4}, to convert points to drawing coordinates. Sometimes a label needs a plain background in order to blank out previously drawn components overlapped by the label, as shown on the left of \FR{fbox}. -\begin{figure}[h!b] +\begin{figure}[H] \input woodchips \vspace{-0.5\baselineskip} \caption{Illustrating the {\tt f\_box} macro.} @@ -3151,6 +3129,7 @@ evaluates to a position, with {\tt boxcoord(}{\sl object name}{\tt,0,0)} at the lower left corner of the object, and {\tt boxcoord(}{\sl object name}{\tt,1,1)} at its upper right. + \xection{\PSTricks and other tricks\label{Pstricks:}} This section applies only to a \pic processor (\dpic) that is capable of producing output compatible with @@ -3249,7 +3228,6 @@ The lines \noindent\verb|\end{scope}%| \vspace{\parsep} -\pagebreak This is accomplished, for example, by adapting the {\tt \bsl{}mtotex} macro of \SR{Simplifications:} as follows: @@ -3288,10 +3266,8 @@ formats, as shown in \FR{Workflow}. One of the easiest methods for producing web documents is to generate postscript as usual and to convert the result to pdf format with Adobe Distiller or equivalent. -\begin{figure}[h!t] -% \ifpdf\vspace*{-\baselineskip}\fi% +\begin{figure}[H] \input Workflow -% \ifpdf\vspace*{-\baselineskip}\fi% \caption{Output formats produced by \gpic {\tt -t} and \dpic. SVG output can be read by Inkscape or used directly in web documents.} \label{Workflow} @@ -3348,6 +3324,7 @@ as illustrated in \FR{Workflow} and in example files included with the distribution. The \latex drawing commands alone or with {\tt eepic} or {\tt pict2e} extensions are suitable only for simple diagrams. +\enlargethispage{\baselineskip} \xection{Developer's notes\label{Developersnotes:}} 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 @@ -3373,18 +3350,19 @@ 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 -not necessarily in the use of a specific language but in the element -data encoded in the macros, which have been developed with reference -to standards and refined over decades, and which now total thousands -of lines. The learning curve of \pic\ compares well with other -possibilities, but some of the macros have become less readable as more -options and flexibility have been added, and if starting over today, -perhaps I would change some details. Compromises have been made in order -to retain reasonable compatibility with the various postprocessors. -No choice of tool is without compromise, and producing good graphics -seems to be time consuming, no matter how it is done, but the payoff -can be worth the effort. +line graphics. Consequently, the main value of this distribution +is not necessarily in the use of a specific language but in the +element data encoded in the macros, which have been developed with +reference to standards and refined over decades, and which now total +thousands of lines. The learning curve of \pic\ compares well with +other possibilities, but some of the macros have become less readable +as more options and flexibility have been added, and if starting +over today, perhaps I would change some details. Compromises have +been made to preserve the compatability of some of the older macros. +Compromises have also been made to retain reasonable compatibility with +the various postprocessors. No choice of tool is without compromise, +and producing good graphics seems to be time consuming, no matter how +it is done, but the payoff 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, 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 c2b800e5093..f8062361975 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex @@ -377,18 +377,18 @@ \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 + {Triple label along the drawing 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. + copied literally if it is in double quotes or 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} + which is {\tt last []} by default.} \macrodef{cm\_\_}{cm__}{} {gen} - {absolute centiimetres} + {absolute centimetres} \macrodef{consource}{consource}{(\linespec,V|I|v|i,R)} {cct} {voltage or current controlled source with alternate forms; @@ -984,9 +984,33 @@ n|e|s|w,{\sl length})} {gen} {Manhattan box with 45 degree hatching, e.g., {\tt hatchbox(outlined "blue",,dashed outlined "green" thick 0.4)}} -\macrodef{heater}{heater}{({\sl linespec, ndivisions, wid, ht})} - {cct} - {heater element\seesect{Twoterminal:}} +\macrodef{heater}{heater}{({\sl linespec, ndivisions|keys, wid, ht, + boxspec}|[E[R][T]])} + {cct} + {Heater element\seesect{Twoterminal:}. If arg 5 contains {\tt E,} + draws an {\tt heatere({\sl linespec, keys,} [R][T]),} + otherwise a + {\tt heatert({\sl linespec, nparts, wid, ht, boxspec})}} +\macrodef{heatere}{heatere}{({\sl linespec, keys,} [R][T])} + {cct} + {Heater element with curved sides\seesect{Twoterminal:}. + {\tt R} means right orientation; + {\tt T} truncates leads to the width of the body. + The {\sl keys} for the body are + {\tt lgth={\sl expr};} + {\tt wdth={\sl expr};} (default {\tt lgth*2/5}); + {\tt cycles={\sl expr};} + {\tt line={\sl attributes};} (e.g., {\tt dotted, dashed, outlined})} +\macrodef{heatert}{heatert}{({\sl linespec, nparts|keys, wid, ht, boxspec})} + {cct} + {Two-terminal rectangular heater element\seesect{Twoterminal:}. + The {\sl keys} for the body are + {\tt parts={\sl expr};} + {\tt lgth={\sl expr};} + {\tt wdth={\sl expr};} (default {\tt lgth*2/5}); + {\tt box={\sl body attributes};} + (e.g., {\tt dotted, dashed, outlined, shaded}). + Args 3--5 are unused if any key is given} \macrodef{hex\_digit}{hex_digit}{($n$)} {gen} {hexadecimal digit for $0 \leq n < 16$} @@ -1093,6 +1117,21 @@ n|e|s|w,{\sl length})} one or more {\tt L[M][B]} for L and auxiliary contacts with make or break points; {\tt S[M][B]} for S and auxiliary contacts \seesect{Composite:}} +\macrodef{jumper}{jumper}{({\sl linespec, chars}|{\sl keys})} + {cct} + { Two-terminal solder jumper with named body parts. + The {\sl chars} character sequence specifies the jumper components, + and normally begins with {\tt C} and ends with {\tt D.} The character + {\tt E} is an empty (blank) gap, {\tt J} is a filled gap, {\tt B} + is a box component. The components are named {\sl T1, T2, \ldots} + Examples: {\tt CED} is a simple open jumper (the default); {\tt CJD} + closed; {\tt CEBED} three-contact open; {\tt CJBED} three-contact + open and closed. + The {\sl keys} are: {\tt type=}{\sl chars} as previously; + {\tt body=}{\sl attributes} (e.g. {\tt fill\_(0.5)}); + {\tt wdth=}{\sl expr}; + {\tt name=}{\sl chars} (the body name)% +\seesect{Twoterminal:}} \Letter{K}% \macrodef{KelvinR}{KelvinR}{({\sl cycles},[R],{\sl cycle wid})} {cct} @@ -1102,9 +1141,9 @@ n|e|s|w,{\sl length})} \macrodef{L\_unit}{L_unit}{} {log} {logic-element grid size} -\macrodef{lamp}{lamp}{(\linespec, [R])} +\macrodef{lamp}{lamp}{(\linespec, [R][T])} {cct} - {Two-terminal incandescent lamp + {Two-terminal incandescent lamp. {\tt T} truncates leads to the body width. \seesect{Twoterminal:}} \macrodef{larrow}{larrow}{({\sl label},{\tt ->|<-},{\sl dist})} {cct} @@ -1284,18 +1323,24 @@ n|e|s|w,{\sl length})} {MOSFET left or right, included components defined by characters, envelope. arg 3 chars: - {\tt [u][d]B:} center bulk connection pin; {\tt D:} D pin and lead; - {\tt E:} dashed substrate; {\tt F:} solid-line substrate; {\tt - [u][d]G:} G pin to substrate at source; {\tt [u][d]H:} G pin to - substrate at center; {\tt L:} G pin to channel (obsolete); {\tt - [u][d]M:} G pin to channel; u: at drain end; d: at source end {\tt - [u][d]M{\sl n}:} multiple gates G0 to G{\sl n} {\tt Py:} parallel - diode; {\tt Pz:} parallel zener diode; {\tt Q:} connect B pin to - S pin; {\tt R:} thick channel; {\tt [u][d]S:} S pin and lead u: - arrow up; d: arrow down; {\tt [d]T:} G pin to center of channel - d: not circle; {\tt X:} XMOSFET terminal; {\tt Z:} simplified - complementary MOS - \seesect{Semiconductors:}} + {\tt [u][d]B:} center bulk connection pin; + {\tt D:} D pin and lead; + {\tt E:} dashed substrate; + {\tt F:} solid-line substrate; + {\tt [u][d]G:} G pin to substrate at source; + {\tt [u][d]H:} G pin to substrate at center; + {\tt L:} G pin to channel (obsolete); + {\tt [u][d]M:} G pin to channel, u: at drain end, d: at source end; + {\tt [u][d]M{\sl n}:} multiple gates G0 to G{\sl n}; + {\tt Py:} parallel diode; + {\tt Pz:} parallel zener diode; + {\tt Q:} connect B pin to S pin; + {\tt R:} thick channel; + {\tt [u][d]S:} S pin and lead u: arrow up, d: arrow down; + {\tt [d]T:} G pin to center of channel d: not circle; + {\tt X:} XMOSFET terminal; + {\tt Z:} simplified complementary MOS + \seesect{Semiconductors:}} \macrodef{Mux\_ht}{Mux_ht}{} {cct} {Mux height parameter in {\tt L\_unit}s} @@ -1688,7 +1733,7 @@ degrees})} is {\tt r=}{\sl val} then corners have radius {\sl val}. If arg4 is {\tt t=}{\sl val} then a spline with tension {\sl val} is used to draw a ``superellipse,'' and the bounding box is then only approximate. } -\macrodef{rotellipse}{rotellipse}{({\sl wid,ht,type})} +\macrodef{rotellipse}{rotellipse}{({\sl wid,ht,attributes})} {gen} {ellipse oriented in current direction in {\tt [ ]} block; e.g. {\tt Point\_(45); rotellipse(,{},dotted fill\_(0.9)).} Defined @@ -2388,22 +2433,30 @@ justification})} the point is forward, backward, or both with respect to the current drawing direction. \seesect{Composite:}} -\macrodef{tconn}{tconn}{({\sl linespec,}>|>>|<|<<|O[F],{\sl wid})} - {cct} - {Terminal connector, {\tt O}=circle; {\tt OF}=filled circle; - {\tt > or >>} output connector (default {\tt >}) ; {\tt < or << - input connector}; arg3 is arrowhead width or circle diameter +\macrodef{tconn}{tconn}{({\sl linespec, chars}|{\sl keys}, {\sl wid})} + {cct} + {Terminal connector drawn on a linespec, with head enclosed in a {\tt [ ]} + block. The permissible {\sl chars} are: + {\tt > | >> | < | << | A | AA | M | O | OF}. + Type {\tt O} draws a node (circle); {\tt OF} a filled circle. + Type {\tt M} is a black bar; {\tt A} is an open arc end; type {\tt AA} + a double open arc. Type {\tt >} (the default) is an arrow-like output + connector; {\tt <} and {\tt <<} input connectors. Arg 3 is arrowhead + width or circle diameter when key-value pairs are not used. + If keys are specified, they are {\tt type=}{\sl chars} as previously; + {\tt wdth=}{\sl expr}; {\tt lgth=}{\sl expr}; {\tt sep=}{\sl expr}; + {\tt head=}{\sl attributes except} {\tt lgth, wdth.} + The key {\tt sep=} is the double-head separation \seesect{Composite:}} \macrodef{tgate}{tgate}{({\sl linespec,} [B][R|L])} {cct} {transmission gate, {\tt B=} ebox type; {\tt L=} oriented left \seesect{Semiconductors:}} -\macrodef{thermocouple}{thermocouple}{({\sl linespec, wid, ht,} L|R)} +\macrodef{thermocouple}{thermocouple}{({\sl linespec, wid, ht,} L|R [T])} {cct} - { Thermocouple drawn to the left (by default) of the {\sl - linespec} - line. If the {\sl linespec} length equals {\sl wid} (default - {\tt dimen\_/5}), then only the two branches appear. {\tt R=} + { Thermocouple drawn to the left (by default) of the + {\sl linespec} line. A {\tt T} argument truncates the leads so + only the two branches appear. {\tt R=} right orientation. \seesect{Twoterminal:}} \macrodef{thicklines\_}{thicklines_}{({\sl number})} {gen} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/heaterMan.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/heaterMan.m4 new file mode 100644 index 00000000000..da22dbabc6d --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/heaterMan.m4 @@ -0,0 +1,26 @@ +.PS +# heaterMan.m4 +cct_init + +movewid = 2 pt__ +hm = 2.05 +right_ +{ + {lamp ; move; "`{\tt lamp}'" ljust} + move right_ 1.5 + {lamp(,T) ; move;"`{\tt lamp(,T)}'" ljust} + move right_ 1.25 + {thermocouple ; move;" `{\tt thermocouple}'" ljust } + move right_ hm + {thermocouple(,,,T) ; move; "`{\tt thermocouple(,{,},T)}'" ljust } + } +move down 0.25; right_ +{ + {heater; move;"`{\tt heater}'" ljust} + move right_ hm + {heater(,,,,E); move;"`{\tt heater(,{,},{,}E)}'" ljust} + move right_ hm+0.4 + {heater(,,,,ET); move;"`{\tt heater(,{,},{,}ET)}'" ljust} + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic b/Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic index 656c83a6c8a..61180396584 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 "dpictools.pic" -# Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under # +# Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under # # the LaTeX Project Public Licence in file Licence.txt. The files of # # this distribution may be redistributed or modified provided that this # # copyright notice is included and provided that modifications are clearly # @@ -75,7 +75,7 @@ define posarray { define posarray2 { for i_array=3 to $+ do { exec sprintf("$1[%g,%g] : $%g",$2,i_array-2,i_array); }} -# Operations on 3-d vectors (could be generalized +# Operations on 3D vectors (could be generalized # except for cross): # $3 = $1 + $2 define sum3 { @@ -323,7 +323,7 @@ define rgbtocmyk { # postprocessor specified by dpic command-line # option; colorname then evaluates to a string define DefineRGBColor { -case(dpicopt, # The order of the following is defined in dpic source: +case(abs(dpicopt), # The order of the following is defined in dpic source: # MFpic: command sprintf("\mfpdefinecolor{_$1__}{rgb}{%g,%g,%g}",$2,$3,$4) define $1 {"_$1__"} , @@ -507,12 +507,21 @@ define Intersect_ {intersect_($1.start,$1.end,$2.start,$2.end)} # Nearest multiple of 90 define drawdir_ {(int(pmod($1+45,360)/90)*90)} -# vlength(x,y) 2-D vector length +# vlength(x,y) 2-D length define vlength {sqrt(abs(($1)^2+($2)^2))} # distance(Pos1,Pos2) distance between positions define distance {vlength(($1).x-($2).x,($1).y-($2).y)} +# linang(linear obj) angle of linear object +define linang {atan2($1.end.y-$1.start.y,$1.end.x-$1.start.x)} + +# posang(Position) angle of position wrt (0,0) +define posang {atan2(($1).y,($1).x)} + +# cangle(A,B,C) angle at B of line A to B to C +define cangle { (posang(($1-($2)))-posang(($3-($2)))) } + # For PGF, PSTricks, or SVG only: define dpshade { beginshade($1); $2; endshade } # like libgen shade() diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ASME_Y14-5.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ASME_Y14-5.m4 deleted file mode 100644 index 00b044b0930..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/ASME_Y14-5.m4 +++ /dev/null @@ -1,170 +0,0 @@ -divert(-1) -# `datumarrow(linespec,wid,ht)' -define(`datumarrow',`line `$1' - M4_E: last line.end - datum_ht = ifelse(`$3',,`textht',`$3') - M4_P: vperp(last line,(datum_ht*2/sqrt(3))) - M4_X: datum_ht/lin_leng(last line) between M4_E and last line.start - {ifsvg(,`m4fshade(m4fill,')line from M4_E to M4_E+M4_P/2 dnl - then to M4_X then to M4_E-M4_P/2 then to M4_E ifsvg(`fill_(0)',`)')}') - -# `Y14_frame( arg1, arg2, ... ) - Each arg is a ;-separated sequence of 1 or more of - "string"[ wid val], - "(letter)", - or tolerance symbol. - The term "(letter)" expands to the circled letter. - The frame contains as many boxes as arguments.' - `Symbol definitions from ASME Y14.5 Appendix C' -define(`Y14_frameht',`textht*2') -define(`Y14_defaultwid',`textht*2') -# -define(`Y14_frame',`[ tmpthick = linethick; thicklines_ - right_; B:[ Y14_fram_($@) ] - box wid B.wid ht Y14_frameht at B - linethick = tmpthick ]') -define(`Y14_fram_',`ifelse(`$1',,, -`stacksplit_(`Y14',`$1',;) stackreverse_(`Y14') - Bx: [stackdo_(`Y14', - `[ifelse(index(Y14,`"('),0, - `circle diam textht*5/3 - patsubst(Y14,`"(\(.\))"',`"\1"') ht textht*0.8 at last circle', - index(Y14,`"'),0, - `Y14 ifinstr(Y14,`wid ',,`wid textht*2/3*(len(Y14)-2)')', - `Y14')] - move right max(last [].wid+textht/2,Y14_defaultwid) with .c at last []; ')] - ifelse(`$2',,,`{ line up Y14_frameht with .c at Here }') - Y14_fram_(shift($@))') ') - -# Each symbol definition has an abbreviated version -define(`Y14_straightness', -`line right textht*2 ') -define(`Y14_str_',`Y14_straightness($@)') - -define(`Y14_flatness', -`line right textht*3/4 then down textht left textht/2 \ - then left textht*3/2 then up textht right textht/2 \ - then right textht*3/4 ') -define(`Y14_fla_',`Y14_flatness($@)') - -define(`Y14_circularity',`circle diam textht*3/2 ') -define(`Y14_cir_',`Y14_circularity($@)') - -define(`Y14_cylindricity', -`circle diam textht - Y14_C: last circle - Y14_R: (Rect_(last circle.rad,-30)) - Y14_A: (Rect_(textht,60)) - line from Y14_C+Y14_R+Y14_A to Y14_C+Y14_R-Y14_A/2 - line from Y14_C-Y14_R-Y14_A to Y14_C-Y14_R+Y14_A/2 ') -define(`Y14_cyl_',`Y14_cylindricity($@)') - -define(`Y14_lineprofile',`arc from (textht,0) to (-textht,0) with .c at Here ') -define(`Y14_lin_',`Y14_lineprofile($@)') - -define(`Y14_surfaceprofile', -`arc from (textht,0) to (-textht,0) with .c at Here - line from last arc.start to last arc.end ') -define(`Y14_sur_',`Y14_surfaceprofile($@)') - -define(`Y14_perpendicularity', -`line from (-textht,0) to (textht,0) - line from (0,0) to (0,textht*3/2) ') -define(`Y14_per_',`Y14_perpendicularity($@)') - -define(`Y14_angularity', -`line from (textht*3/2,0) to (0,0) then to (textht*3/2,textht*sqrt(3)/2) ') -define(`Y14_ang_',`Y14_angularity($@)') - -define(`Y14_parallelism', -`line up textht*3/2*sqrt(3)/2 right textht*3/4 - move right textht*0.6 - line down textht*3/2*sqrt(3)/2 left textht*3/4 ') -define(`Y14_par_',`Y14_parallelism($@)') - -define(`Y14_symmetry', dnl obsolete! -`line from (-textht/2,0) to (textht/2,0) - line from (-textht/3,textht/4) to (textht/3,textht/4) - line from (-textht/3,-textht/4) to (textht/3,-textht/4) ') -define(`Y14_sym_',`Y14_symmetry($@)') - -define(`Y14_position', -`circle diam textht - line up textht*3/2 with .c at last circle - line right textht*3/2 with .c at last circle ') -define(`Y14_pos_',`Y14_position($@)') - -define(`Y14_concentricity', dnl obsolete! -`circle diam textht - circle diam textht/2 at last circle ') -define(`Y14_con_',`Y14_concentricity($@)') - -define(`Y14_circularrunout', -`arrow ht textht*0.8 wid textht*0.6 up textht*3/2 right textht*3/2 ') -define(`Y14_cir_',`Y14_circularrunout($@)') - -define(`Y14_totalrunout', -`arrow <-> ht textht*0.8 wid textht*0.6 \ - down textht*3/2 left textht*3/2 then right textht*1.1 \ - then up textht*3/2 right textht*3/2 ') -define(`Y14_tot_',`Y14_totalrunout($@)') - -define(`Y14_diameter', -`circle diam textht - line up textht*3/2 right textht*3/4 with .c at last circle') -define(`Y14_dia_',`Y14_diameter($@)') - -# The following are not Y14.5 but go well with them: - - `r_box(angle,pos,string) - Rotated text on a white background - (requires pstricks)' -define(`r_box', - `ifpstricks(`M4tmp: ifelse(`$2',,Here,`$2') - command sprintf("\rput{%g}(%g,%g){",`$1',crl(M4tmp.x),crl(M4tmp.y)) - f_box(`$3') at Orig - command "}%"')') -define(`crl',`int(`($1)'/scale*1000000)/1000000') - - `r_dimen(linespec,offset,label,tic offset,<->,pos) - dimension_ with rotated text on white background' -define(`r_dimen', - `M4tmp: dimension_(`$1',`$2',,,`$4',`$5') - r_box(rp_ang*rtod_,ifelse(`$6',,M4tmp+vec_(0,`$2'),`$6'),`$3')') - - `ctrline(linespec,cycle len) - Centerline' -define(`cdashl',0.1*scale) -define(`cgapl',0.03*scale) -define(`ctrline',`rpoint_(ifelse(`$1',,`to rvec_(linewid,0)',`$1')) - define(`m4h',ifelse(`$2',,1*scale,`$2'))dnl - m4xn = int(rp_len/2/(m4h))*2+1 - for i=1 to m4xn do { - line to rvec_(rp_len/m4xn/2-cdashl/2-cgapl,0) - move to rvec_(cgapl,0); line to rvec_(cdashl,0); move to rvec_(cgapl,0) - line to rvec_(rp_len/m4xn/2-cdashl/2-cgapl,0) } ') - - `ctrarcr(pos,radius,startang,endang,len) - Arc cr centerline' -define(`ctrarcr',`dnl - define(`m5h',ifelse(`$5',,1*scale,`$5'))dnl - rp_len = abs((`$2')*(`$4'-(`$3'))) - m5n = int(rp_len/2/(m5h))*2+1 - m5a = (rp_len/m5n/2-cdashl/2-cgapl)/(`$2') - m5s = cdashl/(`$2') - m5sa = `$3' - for m4irr=1 to m5n do { - arc from `$1'+(rect_(`$2',m5sa)) to `$1'+(rect_(`$2',m5sa+m5a)) \ - with .c at `$1' - m5sa = m5sa+m5a+cgapl/(`$2') - arc from `$1'+(rect_(`$2',m5sa)) to `$1'+(rect_(`$2',m5sa+m5s)) \ - with .c at `$1' - m5sa = m5sa+m5s+cgapl/(`$2') - arc from `$1'+(rect_(`$2',m5sa)) to `$1'+(rect_(`$2',m5sa+m5a)) \ - with .c at `$1' - m5sa = m5sa+m5a - } ') - -define(`ASME_Y14-5_') - -divert(0)dnl diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ASME_Y14-5.m4def b/Master/texmf-dist/doc/latex/circuit-macros/examples/ASME_Y14-5.m4def new file mode 100644 index 00000000000..00b044b0930 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/ASME_Y14-5.m4def @@ -0,0 +1,170 @@ +divert(-1) +# `datumarrow(linespec,wid,ht)' +define(`datumarrow',`line `$1' + M4_E: last line.end + datum_ht = ifelse(`$3',,`textht',`$3') + M4_P: vperp(last line,(datum_ht*2/sqrt(3))) + M4_X: datum_ht/lin_leng(last line) between M4_E and last line.start + {ifsvg(,`m4fshade(m4fill,')line from M4_E to M4_E+M4_P/2 dnl + then to M4_X then to M4_E-M4_P/2 then to M4_E ifsvg(`fill_(0)',`)')}') + +# `Y14_frame( arg1, arg2, ... ) + Each arg is a ;-separated sequence of 1 or more of + "string"[ wid val], + "(letter)", + or tolerance symbol. + The term "(letter)" expands to the circled letter. + The frame contains as many boxes as arguments.' + `Symbol definitions from ASME Y14.5 Appendix C' +define(`Y14_frameht',`textht*2') +define(`Y14_defaultwid',`textht*2') +# +define(`Y14_frame',`[ tmpthick = linethick; thicklines_ + right_; B:[ Y14_fram_($@) ] + box wid B.wid ht Y14_frameht at B + linethick = tmpthick ]') +define(`Y14_fram_',`ifelse(`$1',,, +`stacksplit_(`Y14',`$1',;) stackreverse_(`Y14') + Bx: [stackdo_(`Y14', + `[ifelse(index(Y14,`"('),0, + `circle diam textht*5/3 + patsubst(Y14,`"(\(.\))"',`"\1"') ht textht*0.8 at last circle', + index(Y14,`"'),0, + `Y14 ifinstr(Y14,`wid ',,`wid textht*2/3*(len(Y14)-2)')', + `Y14')] + move right max(last [].wid+textht/2,Y14_defaultwid) with .c at last []; ')] + ifelse(`$2',,,`{ line up Y14_frameht with .c at Here }') + Y14_fram_(shift($@))') ') + +# Each symbol definition has an abbreviated version +define(`Y14_straightness', +`line right textht*2 ') +define(`Y14_str_',`Y14_straightness($@)') + +define(`Y14_flatness', +`line right textht*3/4 then down textht left textht/2 \ + then left textht*3/2 then up textht right textht/2 \ + then right textht*3/4 ') +define(`Y14_fla_',`Y14_flatness($@)') + +define(`Y14_circularity',`circle diam textht*3/2 ') +define(`Y14_cir_',`Y14_circularity($@)') + +define(`Y14_cylindricity', +`circle diam textht + Y14_C: last circle + Y14_R: (Rect_(last circle.rad,-30)) + Y14_A: (Rect_(textht,60)) + line from Y14_C+Y14_R+Y14_A to Y14_C+Y14_R-Y14_A/2 + line from Y14_C-Y14_R-Y14_A to Y14_C-Y14_R+Y14_A/2 ') +define(`Y14_cyl_',`Y14_cylindricity($@)') + +define(`Y14_lineprofile',`arc from (textht,0) to (-textht,0) with .c at Here ') +define(`Y14_lin_',`Y14_lineprofile($@)') + +define(`Y14_surfaceprofile', +`arc from (textht,0) to (-textht,0) with .c at Here + line from last arc.start to last arc.end ') +define(`Y14_sur_',`Y14_surfaceprofile($@)') + +define(`Y14_perpendicularity', +`line from (-textht,0) to (textht,0) + line from (0,0) to (0,textht*3/2) ') +define(`Y14_per_',`Y14_perpendicularity($@)') + +define(`Y14_angularity', +`line from (textht*3/2,0) to (0,0) then to (textht*3/2,textht*sqrt(3)/2) ') +define(`Y14_ang_',`Y14_angularity($@)') + +define(`Y14_parallelism', +`line up textht*3/2*sqrt(3)/2 right textht*3/4 + move right textht*0.6 + line down textht*3/2*sqrt(3)/2 left textht*3/4 ') +define(`Y14_par_',`Y14_parallelism($@)') + +define(`Y14_symmetry', dnl obsolete! +`line from (-textht/2,0) to (textht/2,0) + line from (-textht/3,textht/4) to (textht/3,textht/4) + line from (-textht/3,-textht/4) to (textht/3,-textht/4) ') +define(`Y14_sym_',`Y14_symmetry($@)') + +define(`Y14_position', +`circle diam textht + line up textht*3/2 with .c at last circle + line right textht*3/2 with .c at last circle ') +define(`Y14_pos_',`Y14_position($@)') + +define(`Y14_concentricity', dnl obsolete! +`circle diam textht + circle diam textht/2 at last circle ') +define(`Y14_con_',`Y14_concentricity($@)') + +define(`Y14_circularrunout', +`arrow ht textht*0.8 wid textht*0.6 up textht*3/2 right textht*3/2 ') +define(`Y14_cir_',`Y14_circularrunout($@)') + +define(`Y14_totalrunout', +`arrow <-> ht textht*0.8 wid textht*0.6 \ + down textht*3/2 left textht*3/2 then right textht*1.1 \ + then up textht*3/2 right textht*3/2 ') +define(`Y14_tot_',`Y14_totalrunout($@)') + +define(`Y14_diameter', +`circle diam textht + line up textht*3/2 right textht*3/4 with .c at last circle') +define(`Y14_dia_',`Y14_diameter($@)') + +# The following are not Y14.5 but go well with them: + + `r_box(angle,pos,string) + Rotated text on a white background + (requires pstricks)' +define(`r_box', + `ifpstricks(`M4tmp: ifelse(`$2',,Here,`$2') + command sprintf("\rput{%g}(%g,%g){",`$1',crl(M4tmp.x),crl(M4tmp.y)) + f_box(`$3') at Orig + command "}%"')') +define(`crl',`int(`($1)'/scale*1000000)/1000000') + + `r_dimen(linespec,offset,label,tic offset,<->,pos) + dimension_ with rotated text on white background' +define(`r_dimen', + `M4tmp: dimension_(`$1',`$2',,,`$4',`$5') + r_box(rp_ang*rtod_,ifelse(`$6',,M4tmp+vec_(0,`$2'),`$6'),`$3')') + + `ctrline(linespec,cycle len) + Centerline' +define(`cdashl',0.1*scale) +define(`cgapl',0.03*scale) +define(`ctrline',`rpoint_(ifelse(`$1',,`to rvec_(linewid,0)',`$1')) + define(`m4h',ifelse(`$2',,1*scale,`$2'))dnl + m4xn = int(rp_len/2/(m4h))*2+1 + for i=1 to m4xn do { + line to rvec_(rp_len/m4xn/2-cdashl/2-cgapl,0) + move to rvec_(cgapl,0); line to rvec_(cdashl,0); move to rvec_(cgapl,0) + line to rvec_(rp_len/m4xn/2-cdashl/2-cgapl,0) } ') + + `ctrarcr(pos,radius,startang,endang,len) + Arc cr centerline' +define(`ctrarcr',`dnl + define(`m5h',ifelse(`$5',,1*scale,`$5'))dnl + rp_len = abs((`$2')*(`$4'-(`$3'))) + m5n = int(rp_len/2/(m5h))*2+1 + m5a = (rp_len/m5n/2-cdashl/2-cgapl)/(`$2') + m5s = cdashl/(`$2') + m5sa = `$3' + for m4irr=1 to m5n do { + arc from `$1'+(rect_(`$2',m5sa)) to `$1'+(rect_(`$2',m5sa+m5a)) \ + with .c at `$1' + m5sa = m5sa+m5a+cgapl/(`$2') + arc from `$1'+(rect_(`$2',m5sa)) to `$1'+(rect_(`$2',m5sa+m5s)) \ + with .c at `$1' + m5sa = m5sa+m5s+cgapl/(`$2') + arc from `$1'+(rect_(`$2',m5sa)) to `$1'+(rect_(`$2',m5sa+m5a)) \ + with .c at `$1' + m5sa = m5sa+m5a + } ') + +define(`ASME_Y14-5_') + +divert(0)dnl diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4 deleted file mode 100644 index c77950fe00d..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4 +++ /dev/null @@ -1,145 +0,0 @@ -.PS -# AntiqueClock.m4 -gen_init -NeedDpicTools -# https://tex.stackexchange.com/questions/236923/generate-analog-clock-with-numbered-face-add-seconds-roman-numerals - -# `hms2deg(hr,min,sec) hr:min:sec to degrees -# blank arg1: degrees for minute hand -# blank arg1 and arg2: degrees for second hand' -define(`hms2deg',`ifelse(`$1',, - `ifelse(`$2',, - `(90-pmod(ifelse(`$3',,0,`$3'),60)/60*360)', - `(90-(pmod(`$2',60)/60 + pmod(ifelse(`$3',,0,`$3'),60)/60/60)*360)')', - `(90-(pmod(`$1',12) + pmod(ifelse(`$2',,0,`$2'),60)/60 + dnl - pmod(ifelse(`$3',,0,`$3'),60)/3600)/12*360)')') - -# `SecondHand(length,hr,min,sec)' -define(`SecondHand',`[ shsf = (`$1')/3.2 - C: Here - { L: rpoint_(to (Rect_(`$1',hms2deg(,,`$4')))) } - line thick 8*shsf to rvec_(`$1',0) - ]') - -# `AntiqueMinuteHand(length,hr,min,sec)' -define(`AntiqueMinuteHand',`[ mhsf = (`$1')/2.84 - L: rpoint_(to (Rect_(`$1',hms2deg(,`$3',`$4')))) - C: circle fill_(0) diam 0.47*mhsf at L.start - move to C - spline from rvec_(0,0.047*mhsf) \ - to rvec_(1.65*mhsf,0.11*mhsf) \ - then to rvec_(`$1',0.018*mhsf) \ - then to rvec_(`$1',-0.018*mhsf) \ - then to rvec_(1.65*mhsf,-0.11*mhsf) \ - then to rvec_(0,-0.047*mhsf) \ - shaded rgbstring(0,0,0) - ]') - -# `AntiqueHourHand(length,hr,min,sec)' -define(`AntiqueHourHand',`[ hhsf = (`$1')/2.2 - L: rpoint_(to (Rect_(`$1',hms2deg(`$2',`$3',`$4')))) - C: circle fill_(0) diam 0.6*hhsf at L.start - move to C - v = 0.25*hhsf - { line to rvec_(1.1*hhsf,0) thick 0.15/(1bp__)*hhsf } - { C1: circle rad v at rvec_(1.25*hhsf,0) fill_(0) } - d = `$1'-1.25*hhsf - q = 1bp__*hhsf - r1 = (d^2 + q^2 - v^2)/(v-q)/2 - h = r1+v - shade(0, - arc ccw from C1+vec_(d/h*v,(r1+q)/h*v) to \ - C1+vec_(d,q) rad r1 with .c at C1+vec_(d,r1+q) - arc ccw from C1+vec_(d,-q) to C1+vec_(d/h*v,-(r1+q)/h*v) rad r1 \ - with .c at C1+vec_(d,-r1-q)) - ]') - -define(`AntiqueClock',`[ # h,m,s,diam -# Clock size parameters - # outer radius - hour = ifelse(`$1',,3,`$1') - minute = ifelse(`$2',,41,`$2') - second = ifelse(`$3',,51,`$3') - ifelse(`$4',,`skale=0.5; r1=2',`r1=(`$4')/2; skale=r1/4') - r2 = r1-0.5*skale - r3 = r2-0.14*skale - r4 = r3 - 0.35*skale - r5 = r4 - 0.17*skale - r6 = r5 - 0.63*skale - r7 = r6 - 0.17*skale - shadethick = 1.0 - -C: circle thick 0.2 rad r1 - -define shadeline { - s = 1-($`'1)*2 - v = r*s - h = sqrt(r^2-v^2) - t = 1-abs(s) - line from (vrot_(-h,v,cost,sint)) to (vrot_(h,v,cost,sint)) \ - thick shadethick outlined rgbstring(t,t,t) - } - - r = r1 # Bezel outer - nlines = int(2*r/(shadethick pt__)*1.1) - cost = cosd(10); sint = sind(10); - ShadeObject(shadeline,nlines, 0, 0,0,0, - 0.5, 1,1,1, - 1, 0,0,0 ) at C - - r = r2 # Bezel inner - nlines = int(2*r/(shadethick pt__)*1.1) - cost = cosd(-10); sint = sind(-10); - ShadeObject(shadeline,nlines, 0, 0,0,0, - 0.25, 0.8,0.8,0.8, - 0.5, 1,1,1, - 0.75, 0.8,0.8,0.8, - 1, 0,0,0 ) at C - -# Clock face -Face: circle thick 0 fill_(1) rad r3 at C - circle rad r4 at C - circle rad r5 at C - circle rad r6 at C - circle rad r7 at C - -define rotext { -sprintf("`$'1 ifpstricks(\rput[C]{%g}(0,0){%g}, -ifpgf(\rotatebox{%g}{%g}))",`$'2,`$'3) } -# Outer numbers - command sprintf("\font\outerfont=cmss12 at %4.2fin",r3-r4) - for mn = -15 to 15 by 5 do { rotext(\outerfont,-mn/60*360,pmod(mn,60)) \ - at C+(Rect_((r3+r4)/2,90-mn/60*360)) } - for mn = 20 to 40 by 5 do { rotext(\outerfont,180-mn/60*360,mn) \ - at C+(Rect_((r3+r4)/2,90-mn/60*360)) } -# Outer tics - for mn = 1 to 60 do { t = 90-mn/60*360 - line from C+(Rect_(r5,t)) to C+(Rect_(r4,t)) } - -# Inner numbers - command sprintf("\font\innerfont=cmss12 at %4.2fin",r5-r6) - Loopover_(`mx',`t = (m4Lx-4)/12*360; - sprintf("\innerfont`'ifpstricks(`\rput[C]{%g}(0,0)', - `\rotatebox{%g}'){\scalebox{0.7}[1.0]{mx}}",-t) \ - at C+(Rect_((r5+r6)/2,90-t))', IX,X,XI,XII,I,II,III) - Loopover_(`mx',`t = (m4Lx+3)/12*360; - sprintf("\innerfont`'ifpstricks(`\rput[C]{%g}(0,0)', - `\rotatebox{%g}'){\scalebox{.7}[1.0]{mx}}",-t+180) \ - at C+(Rect_((r5+r6)/2,90-t))', IV,V,VI,VII,VIII) -# Inner tics - for mn = 5 to 60 by 5 do { t = 90-mn/60*360 - line from C+(Rect_(r7,t)) to C+(Rect_(r6,t)) } - -# Hands - AntiqueHourHand(r6,hour,minute,second) with .C at C - AntiqueMinuteHand(r5,hour,minute,second) with .C at C - SecondHand((r3+r4)/2,hour,minute,second) with .C at C - -# Center - dot(at C,0.1/4*r1,1) - ]') - - Clock1: AntiqueClock - Clock2: AntiqueClock(4,50,07,2) at Clock1.e+(1.5,0) - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ArrowFn.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ArrowFn.m4 deleted file mode 100644 index f8ca1527224..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/ArrowFn.m4 +++ /dev/null @@ -1,56 +0,0 @@ -.PS -# ArrowFn.m4 -# https://tex.stackexchange.com/questions/581089/arrow-function-diagrams -gen_init -textoffset = 3bp__ - brad = 0.04 - bht = 0.4 - bwid = 0.25 -define(`rbox',`box rad brad outlined "orange"') - -B1: [ - linethick = 1.2 - arrowwid = 0.08 - rbox wid 5*boxwid ht 3/2*boxwid - line from last box.w-(bht/4,0) "\Large $X$" above ljust -T: Here - arrow up bwid right bwid then right bwid -F: rbox ht bht "\Large $f$" - {"\Large $Y$" above ljust } - arrow down bwid right bwid from T then right boxwid + bwid*3/2 -G: rbox ht bht "\Large $g$" - {"\Large $Z$" above ljust } -S: circle diam bht "\Large $+$" at (G.e.x+boxwid,(F.y+G.y)/2) - d = F.y-S.nw.y - arrow from F.e to S.nw+(-d,d) then to S.nw - arrow from G.e to S.sw+(-d,-d) then to S.sw - arrow right from S.e - ] -[ - bht = bht/2 - sbwid = boxwid*3/4 - bbwid = sbwid*5/4 - dh = bht/2 -B1: rbox wid bbwid ht bbwid -B2: rbox wid sbwid*3/2 ht bbwid at B1+(3/2*bbwid,0) -B3: rbox wid bbwid ht bbwid at B2+(3/2*bbwid,0) -B4: rbox wid sbwid*3/2 ht bbwid at B3+(3/2*bbwid,0) -B5: rbox wid bbwid ht bbwid at B4+(3/2*bbwid,0) - F: rbox ht bht wid sbwid at B2.n-(0,bht*3/4) "$f$" -BR: B2.s+(0,B2.n.y-F.y) - G: rbox ht bht wid sbwid at (B4,F) "$g$" - S: circle diam bht*3/2 at B5+(bht/2,0) "$+$" - arrow right from S.e - T: B1.w+(dh,0) -B: rbox ht bbwid*5/4 wid boxwid*7.25 with .w at T-(sbwid*3/4,0) - { line from T left sbwid "$x$" above ljust } - arrow from T to (B1.e-(dh,0),F) then to F.w - arrow from F.e to (B3.w+(dh,0),F) then to (B3.e-(dh,0),BR) - continue to (B5.w+(dh,0),Here) then to S.sw - line thick 5 outlined "white" from B3.sw to B3.ne chop brad - arrow from T to (B1.e-(dh,0),BR) then to (B3.w+(dh,0),BR) \ - then to (B3.e-(dh,0),G) then to G.w - arrow from G.e to (B5.w+(dh,0),G) then to S.nw - ] with .nw at B1.sw+(0,-0.2) - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Attention.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Attention.m4 deleted file mode 100644 index 7f0b7127c7a..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Attention.m4 +++ /dev/null @@ -1,41 +0,0 @@ -.PS -# Attention.m4 -gen_init -scale = 2.54 -linethick = 0.2 - -define dot2 { (($1).x*($2).x + ($1).y*($2).y) } - - nlines = 128 - nr = 50 - innerrad = 1 - outerrad = 8 - diff = outerrad - innerrad -B: box wid outerrad*2 ht outerrad*2 outline "red" shaded "red" -C: circle rad outerrad at B - circle rad innerrad at C shaded "black" - P[0]: C+(innerrad,0) - t = 0 - for i=1 to nr do { - r = innerrad+i/nr*diff - t = t + i/nr*(-pi_/2)/nr - P[i]: C+(rect_(r,t)) - } - dth = twopi_/nlines - R: (cos(dth),-sin(dth)) - S: (sin(dth),cos(dth)) - for j = 0 to nlines-1 do { - for i=0 to nr do { - X: P[i]-C - Q[nr-i]: (dot2(R,X),dot2(S,X)) + C - } - shade(j%2, - fitcurve(P,nr) - line from P[nr] to Q[0] - fitcurve(Q,nr) - line from Q[nr] to P[0] - ) - for i=0 to nr do { P[i]: Q[nr-i] } - } - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Autoencoder.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Autoencoder.m4 deleted file mode 100644 index 92a81ac9509..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Autoencoder.m4 +++ /dev/null @@ -1,82 +0,0 @@ -.PS -# Masked_Autoencoder.m4 -gen_init -NeedDpicTools - - circlerad = 0.2 - circlesep = 0.5 - rowsep = 0.9 - arrowht = arrowht*0.8 - arrowwid = arrowwid*1.4 - linethick = 1 - -define plan { - m = 0 - for i=1 to 4 do { - for j=1 to ncircles[i] do { - exec sprintf("C[i,j]: circle thick 1.6 at Here \"\large\sf $%g\"",m+j) - if i>1 then { - if "$1"=="" then { - for k=1 to ncircles[i-1] do { arrow from C[i,j] to C[i-1,k] chop } } - } - if j!=ncircles[i] then { move right_ circlesep from C[i,j] } - } - m += ncircles[i] - case(i, - move to C[1,1]+(-circlesep/2,-rowsep), - move to C[2,1]+(0,-rowsep), - move to C[3,1]+(circlesep/2,-rowsep), ) - } - } - gridsiz = 0.78/4 -define grid { [ SW: 0,0 - for i=1 to $1 do { - move to (0,(0.5-i)*gridsiz) - exec sprintf("fv = $%g",2+i) - for j=1 to $2 do { fl = 1-(int(fv / 2^(j-1)) % 2) - box wid gridsiz ht gridsiz outlined "gray" shaded rgbstring(fl,fl,fl) } - } ]} -define cxt { - m = 1 - for i=2 to 4 do { - for j=1 to ncircles[i] do { - exec sprintf("narrows = $%g",m) - for k=1 to narrows do { - exec sprintf("cnum = $%g",m+k) - arrow from C[i,j] to C[i-1,cnum] chop - } - m += narrows+1 - } } } - - array(ncircles,3,4,4,3) - plan() - for j=1 to 3 do { - sprintf("$\hat{x}_%g$",j) at C[1,j].n above - sprintf("$x_%g$",j) at C[4,j].s+(0,-2bp__) below - } - "V" at 0.5 between C[2,1].w and C[1,1].w - "W$^2$" at 0.5 between C[3,1].w and C[2,1].w - "W$^1$" at 0.5 between C[3,1].w and C[4,1].w - -GV: grid(3,4,0,15,6) with .w at C[2,4]+(circlerad*2,rowsep/2) - "$=\hbox{M}^{\hbox{V}}$" at GV.e ljust -G2: grid(4,4,13,0,0,13) with .w at (GV.w,C[3,4]+(circlerad*2,rowsep/2)) - "$=\hbox{M}^{\hbox{V}^2}$" at G2.e ljust -G1: grid(4,3,1,5,1,1) with .w at (GV.w,C[4,3]+(circlerad*2,rowsep/2)) - "$=\hbox{M}^{\hbox{V}^1}$" at G1.e ljust - - move to (GV.x+3*circlesep,C[1,1].y) - plan(3,1,2,1,2,2,1,2,1,2,2,3,1,2) - for i=2 to 4 do { - rgbdraw(0.5,0.5,0.5, - cxt(2,1,3,0,0,2,1,3, 0,4,1,2,3,4,0,0, 0,4,1,2,3,4,0) ) - cxt(0,1,1,1,1,0, 2,2,3,0,2,2,3,2,2,3, 0,0,3,1,3,4) - } - for j=1 to 3 do { sprintf("$x_%g$",j) at C[4,j].s+(0,-2bp__) below } - arrow dotted from C[1,2].n up circlesep/2; "$p(x_2)$" above - "$p(x_3|x_2)$" at (C[1,3]+(circlesep/2,0),last "") above - arrow dotted from C[1,3] to last "".s chop circlerad chop textoffset - "$p(x_1|x_2,x_3)$" at (C[1,1]+(-circlesep/2,0),last "") above - arrow dotted from C[1,1] to last "".s chop circlerad chop textoffset - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Autologix.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Autologix.m4 deleted file mode 100644 index 1e4774d9e5c..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Autologix.m4 +++ /dev/null @@ -1,57 +0,0 @@ -.PS -# `Autologix.m4' -log_init - -A: [ -F: Autologix( - And(Or(x3,x1,~x0),Nor(Or(x3,Not(x2),~x1,x0), - And(Or(x2,x1,~x0),Xor(x2,~x1)))); - ~x0; - And(~x0,Nand(~x1,x3))@ with .nw at 2nd last [].sw+(0,-dimen_*2/3); - Not(x1)) - for_(1,4,1,`"\sl Out`'m4x" at F.Out`'m4x ljust') - Loopover_(`v_', `"\sl In$v_$" at F.In`'v_ above ',x0,x1,x3) -# for_(1,3,1,`"\sl In`'m4x=" at F.In`'m4x+(0,10pt__) above') - "\sl In$x2$" at F.Inx2 +(-10pt__,0) above -# "\sl In4=" at F.In4+(-10pt__,10pt__) above - for_(1,3,1,`"\sl In`'m4x" at F.In`'m4x') - "\sl In17" at F.In17 -G: Autologix( - And(Or(x3,x1,~x0),Nor(Or(x3,Not(x2),~x1,x0), - And(Or(x2,x1,~x0),Xor(x2,~x1)))); - ~x0; - And(~x0,Nand(~x1,x3))@ with .nw at 2nd last [].sw+(0,-dimen_*2/3); - Not(x1), - N) with .Out1 at F.Out1+(6*dimen_,0) - for_(1,4,1,`"\sl Out`'m4x" at G.Out`'m4x ljust') - "\sl In1" at G.In1 rjust - "\sl In2" at G.In2 rjust - "\sl In`'m4nargs" at G.In`'m4nargs rjust - "\tt\ldots ,N)" wid 0.25 at (G.Out2,G.Out4) rjust -] - -S: `"\def\tld{\char126}\shortstack[l]{\tt Autologix(\\\tt - \tt\quad{}And(Or(x3,x1,\tld{}x0),Nor(Or(x3,Not(x2),\tld{}x1,x0), - And(Or(x2,x1,\tld{}x0),Xor(x2,\tld{}x1))));\\ - \tt\quad{}\tld{}x0;\\ - \tt\quad{}And(\tld{}x0,Nand(\tld{}x1,x3))@ - with .nw at 2nd last [].sw+(0,-dimen\_*2/3);\\ - \tt\quad{}Not(x1))}"' \ - ht 58pt__ wid 520pt__ with .nw at A.sw+(0,-15pt__) - -B: [ -F: #utologix( - And(Or(x3,x1,~x0),Nor(Or(x3,Not(x2),~x1,x0), - And(Or(x2,x1,~x0),Xor(x2,~x1)))); - ~x0; - And(~x0,Nand(~x1,x3))@ with .ne at 2nd last [].se+(0,-dimen_*2/3); - Not(x1), - M) - for_(1,4,1,`"\sl Out`'m4x" at F.Out`'m4x rjust') - Loopover_(`v_', `"\sl In$v_$" at F.In`'v_ above ',x0,x1,x3) - "\sl In$x2$" at F.Inx2 +(10pt__,0) above - `"\tt\ldots @ with .ne at 2nd last [].se+(0,-dimen\_*2/3);Not(x1),M)"'\ - wid 200pt__ at F.s below -] with .n at S.s+(0,-0.1) - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Blogix.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Blogix.m4 deleted file mode 100644 index b2d44c5222f..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Blogix.m4 +++ /dev/null @@ -1,87 +0,0 @@ -.PS -# `Blogix.m4' -log_init - -linewid = 0.4 - -# A more complex expression - F: Autologix(And(Or(x3,x1,~x0),Nor(Or(x3,Not(x2),~x1,x0), - And(x4,Or(x2,x1,~x0),Xor(x2,~x1))))) - - Loopover_(`v_', `"$v_$" at F.In`'v_ above', x0,x1,x2,x3,x4) - "\sl Out" ljust at F.Out - `"{\tt \shortstack[l]{Autologix(And(Or(x3,x1,\~{}x0),\\ - \quad Nor(Or(x3,Not(x2),\~{}x1,x0),And(x4,Or(x2,x1,\~{}x0),%\ - Xor(x2,\~{}x1)))))}}"' wid 440pt__ ht 20pt__ \ - with .w at F.sw+(0,-0.25) -# Inputs on the left with vert offset in L_units -define(`Doff',LV;offset=25) - G: Autologix(And(Or(x3,x1,~x0),Nor(Or(x3,Not(x2),~x1,x0), - And(x4,Or(x2,x1,~x0),Xor(x2,~x1)))), - Doff*L_unit) \ - with .sw at F.Out+(0.2,-0.7) - - Loopover_(`v_', `"$v_$" wid 11pt__ at G.In`'v_ rjust ', x0,x1,x2,x3,x4) - "\sl Out" ljust at G.Out - "{\tt ...,Doff*L\_unit)}" at G.s+(0,-10pt__) - -# A more complex expression -define(`Eoff',R) - E: Autologix(And(Or(x3,x1,~x0),Nor(Or(x3,Not(x2),~x1,x0), - And(x4,Or(x2,x1,~x0),Xor(x2,~x1)))); - And(~x0,Nand(~x1,x3)), - Eoff) \ - with .nw at F.sw+(0,-1.5) - - Loopover_(`v_', `"$v_$" at E.In`'v_ above ', x0,x1,x2,x3,x4) - "\sl Out1" ljust at E.Out1 - "\sl Out2" ljust at E.Out2 - "{\tt ...,Eoff)}" at E.s+(0,-10pt__) - -# Inputs on the left with vert offset in L_units -define(`Foff',LRV;offset=17) - D: Autologix(And(Or(x3,x1,~x0),Nor(Or(x3,Not(x2),~x1,x0), - And(x4,Or(x2,x1,~x0),Xor(x2,~x1)))), - Foff*L_unit) \ - with .sw at E.Out1+(0.2,-0.5) - - Loopover_(`v_', `"$v_$" wid 11pt__ at D.In`'v_ rjust ', x0,x1,x2,x3,x4) - "\sl Out" ljust at D.Out - "{\tt ...,Foff)}" at D.s+(0,-10pt__) - -# Here's how to include an arbitrary circuit -# that isn't one of the standard gates. -# First, define the circuit with a name ending -# in _gate. Make sure its inputs are on the left -# and named In1, In2, ... and the output Out -# is on the right. -define(`SR_gate',`[ - S: NOR_gate - R: NOR_gate at S+(0,-L_unit*(AND_ht+4)) - w = (S.Out.x-R.In1.x)/3 - v = 2*L_unit - line right_ dimen_/2 from S.Out - Out: Here - TR: R.In1-(v,0) - line from S.Out+(v,0) down w*3/2 then left S.Out.x-TR.x+v down w \ - then to TR then to R.In1 - TS: S.In2-(v,0); - line from R.Out right v then up w*3/2 then left R.Out.x-TS.x+v up w \ - then to TS then to S.In2 - In1: S.In1 - In2: R.In2 ]') -# Now define the function by which the circuit -# will be invoked, with a preceding _: -define(`SRff',`_AutoGate(SR,$@)') - -# You're done. Here is an example: - F: Autologix(Or(y,SRff(And(x,y),Nand(x,y)))) \ - with .nw at 2nd last [].sw+(0,-0.5) - - "\sl Out" at F.Out ljust - "$x$" at F.Inx above - "$y$" at F.Iny above - `"{\tt Autologix(Or(y,SRff(And(x,y),Nand(x,y))))}"' wid 267pt__ ht 7pt__ \ - with .w at last [].sw+(0,-10pt__) - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/CSlight.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/CSlight.m4 deleted file mode 100644 index 720e74f9e2b..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/CSlight.m4 +++ /dev/null @@ -1,173 +0,0 @@ -.PS -# Csource.m4 - ifmpost(command "verbatimtex") - command "\newcommand\scriptstack[2][c]{\hbox{\scriptsize\shortstack[#1]{#2}}}%" - command "{\scriptsize" - ifmpost(command "etex") -define(`density',0.90) -setrgb(density, density, density) - -cct_init - linewid = 0.4 - -define(`npair',`[define(`m4lr',ifelse(`$1',,l,r)) - J: mosfet(down_ dimen_,ifelse(`$1',,R,L),uHSDF,E) - "\scriptstack[l]{$Q_{`$2'}$\\ 2N5464}" at J.n+(0,8pt__) - G: J.G - line ifelse(`$1',,right,left) dimen_/4 from J.D - Q: bi_tr(up_ dimen_,ifelse(`$1',,L,R),,E) with .B at Here - ifelse(`$1',,r,l)label(,`\scriptstack[m4lr]{$Q_{`$3'}$\\ 2N4239}') - E: Q.E - S: dot(at (Q.C,J.S)) - line from J.S to S then to Q.C ]') - -define(`ppair',`[define(`m4lr',ifelse(`$1',,l,r)) - J: mosfet(down_ dimen_,ifelse(`$1',,R,L),dHSDF,E) - "\scriptstack[l]{$Q_{`$2'}$\\ 2N3819}" at J.s-(0,8pt__) - G: J.G - line ifelse(`$1',,right,left) dimen_/4 from J.S - Q: bi_tr(down_ dimen_,ifelse(`$1',,R,L),P,E) with .B at Here - ifelse(`$1',,l,r)label(,`\scriptstack[m4lr]{$Q_{`$3'}$\\ 2N4236}') - E: Q.E - S: dot(at (Q.C,J.D)) - line from J.D to S then to Q.C ]') - - R2: resistor(down_ dimen_) - llabel(,`\scriptstack[l]{$R_2$\\ 150}') - dot - Q13: bi_tr(down_ dimen_,,P,E) with .E at Here - rlabel(,`\scriptstack[r]{$Q_{13}$\\ 2N4236}') - line down 3.1*elen_ from Q13.C - Q14: bi_tr(up_ dimen_,R,,E) with .C at Here - llabel(,`\scriptstack[r]{$Q_{14}$\\ 2N4239}') - dot(at Q14.E) - { line left_ dimen_*1.3 then up_ dimen_ - R1: potentiometer(up_ dimen_) with .Start at Here - rlabel(,`\scriptstack[l]{$R_1$\\ $20\,$K}') - { ground(at R1.T1) } - line from R1.End to (R1.End,Q13.E) then to Q13.E } - { dot(at Q13.C+(0,-elen_)) - line to (R1.R,Here)+(-dimen_/2,0) - { arrowline(right_ dimen_/2); llabel(,i_1) } - V1: gap(down_ dimen_,1); rlabel(+,V_1,-) - line down_ dimen_/4 chop dotrad_ chop 0; ground(,T) } - R3: resistor(down_ dimen_) - llabel(,`\scriptstack[l]{$R_3$\\ 150}') - dot(at Q13.C+(0,-2*elen_)) - line right_ dimen_/2 - A1: opamp with .In2 at Here; "$A_1$" at A1.C - "`\scriptstack[l]{Nexus\\ SQ-10A}'" at A1.s below - line left_ dimen_/4 from A1.In1 then up_ dimen_/2 then right dimen_ - dot - { resistor(up_ elen_) - llabel(,`\scriptstack[r]{$R_{14}$\\ $19\,$K}') - line to (Here,Q13.E) then to Q13.E } - line to (A1.Out,Here) - dot - { line to A1.Out - dot - resistor(down_ to (Here,Q14.E)) - llabel(,`\scriptstack[l]{$R_{13}$\\ $91\,$K}') - line to Q14.E } - R6: resistor(right_ dimen_) - rlabel(,`\scriptstack[l]{$R_6$\\ $15\,$K}') - dot - line to (Here,A1.In1) then right_ dimen_/4 - A2: opamp with .In1 at Here; "$A_2$" at A2.C - "`\scriptstack[l]{Nexus\\ SQ-10A}'" at A2.s below - line left_ dimen_/4 from A2.In2 - ground - - dot(at A2.Out) - DP1: npair(,3,4) with .E at (A2.Out,Q14.B)+(elen_*1.25,0) - line from A2.Out to (A2.Out,DP1.G) then to DP1.G - line from DP1.E to (DP1.E,R3.bottom); dot - D4: reversed(`diode',up_ dimen_/2 from DP1.S) - D3: reversed(`diode',up_ dimen_/2 from Here+(0,-dimen_/6)) - llabel(,`\scriptstack[r]{$D_4$\\ OMC-V\\ $D_3$}') - DP2: ppair(,1,2) with .E at (DP1.E,Q13.B) - D1: diode(down_ dimen_/2 from DP2.S) - D2: diode(down_ dimen_/2 from Here+(0,dimen_/6)) - rlabel(,`\raisebox{5pt}{\scriptstack[r]{$D_1$\\ $D_2$\\ OMC-V}}') - dot(at (Here,A2)) - line to D2.bottom - line from DP2.G to (A2.Out,DP2.G) then to A2.Out - line from DP2.E to (DP2.E,R2.top); dot - - T: dot(at (DP1.E,A2)+(dimen_,0)) - DP3: npair(,7,8) with .G at (Here,DP1.G)+(dimen_/4,0) - dot(at DP3.E) - line to Q14.B - DP4: ppair(,5,6) with .G at (DP3.G,DP2.G) - dot(at DP4.E) - line to Q13.B - line from DP3.G to (T,DP3.G) then to (T,DP4.G) then to DP4.G - R11: resistor(down_ dimen_ from DP4.S) - rlabel(,`\scriptstack[r]{$R_{11}$\\ $20$}') - D5: diode(up_ from DP3.S to (DP3.S,A2),Z) - llabel(,`\scriptstack[r]{$D_5$\\ 1N4729$_{\vphantom{1}}$}') - line to R11.end - C4: capacitor(right_ dimen_*1.3 from DP3.S,C) - llabel(`C_4'); rlabel(,`0.68\,\mu\hbox{F}') - C3: capacitor(right_ dimen_*1.3 from DP4.S,C) - llabel(`C_3'); rlabel(,`0.68\,\mu\hbox{F}') - dot - dot(at (Here,R6)) - C2: reversed(`capacitor',left_ dimen_*1.3,C) - rlabel(,,`C_2'); llabel(,`0.1\,\mu\hbox{F}') - line to R6.end - - R5: resistor(up_ from R6.end to (R6.end,Q13.B)) - rlabel(,`\scriptstack[l]{$R_5$\\ $100\,$K}') - dot(at R5.top-(0,dimen_/2)) - line left_ dimen_/2 - capacitor(down_ dimen_,C) - rlabel(,`\scriptstack[r]{$C_1$\\ $1\,\mu$F}') - ground(,T) - - line from DP4.E to (DP4.E,R2.bottom) - resistor(up_ to (Here,R2.top)) - rlabel(,`\scriptstack[l]{$R_9$\\ $910$}') - dot - resistor(down_ from DP3.E to (DP3.E,R3.bottom)) - llabel(,`\scriptstack[l]{$R_{10}$\\ $910$}') - dot - - line from R5.top to (R5,Q13.E) - resistor(right_ elen_) - llabel(,`\scriptstack[l]{$R_4$\\ $100\,$K}') - line to (C4.end,Here) then to C4.end - - DP5: npair(L,11,10) with .E at (C4.end,DP1.E)+(elen_*0.8,0) - line from DP5.E to (DP5.E,R3.bottom); dot - line from R3.bottom to Here+(dimen_/2,0) - dot(,,1) - `"${}-E_{CC}$"' ljust - D6: diode(up_ from DP5.S to (DP5.S,A2),Z) - llabel(,`\scriptstack[r]{$D_6$\\ 1N4728}') - DP6: ppair(L,12,9) with .E at (DP5.E,DP2.E) - line from DP6.E to (DP6.E,R2.top); dot - line from R2.top to Here+(dimen_/2,0) - dot(,,1) - `"${}+E_{CC}$"' ljust - resistor(down_ from DP6.S to (DP6.S,C2)) - rlabel(,`\scriptstack[r]{$R_{12}$\\ $20$}') - dot - { line to C2.e } - line to D6.end - - Vr: dot(at (DP6.G,V1.top)+(dimen_/4,0)) - line from DP6.G to (Vr,DP6.G) then to (Vr,DP5.G) then to DP5.G - reversed(`arrowline',right_ dimen_/2 from Vr); llabel(,i_2) - V2: gap(down_ dimen_,1); llabel(+,V_2,-) - line down_ dimen_/4 chop dotrad_ chop 0; ground(,T) - - dot(at (Vr,T)) - resistor(left_ to (DP6.E,Here)) - rlabel(,`\scriptstack[l]{$R_{15}$\\ $200$}') - line to (DP1.E,Here) - dot - - command "ifmpost(verbatimtex) }% ifmpost(etex)" -resetrgb -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Ccurve.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Ccurve.m4 deleted file mode 100644 index 4aed3fb1ab2..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Ccurve.m4 +++ /dev/null @@ -1,13 +0,0 @@ -.PS -# Ccurve.m4 -gen_init -# Gosper C curve - -`define' c_curve {if $3==0 then { continue by ($1,$2) } else { - c_curve( ($1-$2)/2, ($1+$2)/2, $3-1) - c_curve( ($1+$2)/2, ($2-$1)/2, $3-1)}} - -line from 0,4 to 0,4 -c_curve(0,4,10) - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Chuck.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Chuck.m4 deleted file mode 100644 index 2c5dfb76f32..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Chuck.m4 +++ /dev/null @@ -1,231 +0,0 @@ -.PS -# Chuck.m4 -gen_init s_init(Views) sinclude(tst.dim) -# -################################################################# -divert(-1) - - `r_box(angle,pos,string) - Rotated text on a white background - (requires pstricks)' -define(`r_box', - `ifpstricks(`M4tmp: ifelse(`$2',,Here,`$2') - command sprintf("\rput{%g}(%g,%g){",`$1',crl(M4tmp.x),crl(M4tmp.y)) - f_box(`$3') at Orig - command "}%"')') -define(`crl',`int(`($1)'/scale*1000000)/1000000') - - `r_dimen(linespec,offset,label,tic offset,<->,pos) - dimension_ with rotated text on white background' -define(`r_dimen', - `M4tmp: dimension_(`$1',`$2',,,`$4',`$5') - r_box(rp_ang*rtod_,ifelse(`$6',,M4tmp+vec_(0,`$2'),`$6'),`$3')') - - `ctrline(linespec,len) - Centerline' -define(`cdashl',0.1*scale) -define(`cgapl',0.03*scale) -define(`ctrline',`rpoint_(ifelse(`$1',,`to rvec_(linewid,0)',`$1')) - define(`m4h',ifelse(`$2',,1*scale,`$2'))dnl - m4n = int(rp_len/2/(m4h))*2+1 - for i=1 to m4n do { - line to rvec_(rp_len/m4n/2-cdashl/2-cgapl,0) - move to rvec_(cgapl,0); line to rvec_(cdashl,0); move to rvec_(cgapl,0) - line thick dimensionth to rvec_(rp_len/m4n/2-cdashl/2-cgapl,0) } ') - - `ctrarcr(pos,radius,startang,endang,len) - Arc cr centerline' -define(`ctrarcr',`dnl - define(`m5h',ifelse(`$5',,1*scale,`$5'))dnl - rp_len = abs((`$2')*(`$4'-(`$3'))) - m5n = int(rp_len/2/(m5h))*2+1 - m5a = (rp_len/m5n/2-cdashl/2-cgapl)/(`$2') - m5s = cdashl/(`$2') - m5sa = `$3' - for m4irr=1 to m5n do { - arc from `$1'+(rect_(`$2',m5sa)) to `$1'+(rect_(`$2',m5sa+m5a)) \ - with .c at `$1' - m5sa = m5sa+m5a+cgapl/(`$2') - arc from `$1'+(rect_(`$2',m5sa)) to `$1'+(rect_(`$2',m5sa+m5s)) \ - with .c at `$1' - m5sa = m5sa+m5s+cgapl/(`$2') - arc from `$1'+(rect_(`$2',m5sa)) to `$1'+(rect_(`$2',m5sa+m5a)) \ - with .c at `$1' - m5sa = m5sa+m5a - } ') - -divert(0)dnl -################################################################# - -scale = 25.4*2 -tic = 3.6bp__ - -command "{\sf" -#psset_(linecolor=white) -#command "\color{white}" - -#include(Lettering.m4) -#Letter_init - -define(`visible_thick',`linethick_(visibleth)') -define(`hidden_thick',`linethick_(hiddenth)') -define(`dimension_thick',`linethick_(dimensionth) - arrowwid = 1.5*arrowwid; arrowht = 1.5*arrowht; ') - -d1 = 230 -d2 = 204 -d3 = 140 - - visibleth = 1.2 - dimensionth = 0.4 - hiddenth = dimensionth - -Orig: Here -visible_thick - D3: circle diam d3 at Orig - D2: circle diam d2 at Orig - - rr = d1/2 - r = 40 - h = 110/2 - thet = asin((h+r)/(rr+r)) - X1: rect_(rr,thet) - P1: rect_(rr+r,thet) - -dimension_thick - cross(at (P1.x,-P1.y)) - cross(at (-P1.x,P1.y)) - -# Top outer visible line -visible_thick -# top arcs - arc ccw from (-P1.x,h) to (-X1.x,X1.y) with .c at (-P1.x,P1.y) - arc cw to X1 with .c at Orig - arc ccw from X1 to (P1.x,h) with .c at P1 -# right end - line from (P1.x,h) to (305/2,h) then to (305/2,32/2) then left 40-3 - arc ccw rad 3 - line down 32-2*3 - arc ccw rad 3 -dimension_thick { - r_dimen(up 32 with .c at (305/2-5,0),0,32) - arrow <- up 8 right 8 then right 4 from last arc.sw - "3$\,$R" ljust - r_dimen(up h*2 at (305/2,0),-10,110) -}; visible_thick - line right 40-3 then to (305/2,-h) then to (P1.x,-h) -# bottom arcs - arc ccw to (X1.x,-X1.y) with .c at P1.x,-P1.y - arc cw to (-X1.x,-X1.y) with .c at Orig - arc ccw to (-P1.x,-h) with .c at (-P1.x,-P1.y) -# left end - line from (-P1.x,-h) to (-305/2,-h) then to (-305/2,-25/2) then right 25 - down; arc ccw rad 3 - line right 40-25-2*3 - arc ccw rad 3 - line up 25 - {R: line invis down 10 at (2nd last line,last line) } - arc ccw rad 3 - line left 40-25-2*3 - arc ccw rad 3 - line to (-305/2,25/2) then to (-305/2,h) then to (-P1.x,h) - -dimension_thick -# centre - ctrline(right 305-30 with .c at Orig,60) - ctrline(up d1+10 with .c at Orig,) - - {BX: box invis ht 25+2*3 wid 40-25 rad 3 with .w at (-305/2+25,0)} - Q: line invis from BX.n to BX.s; R: line invis from BX.se up 10 left 10 - X: Intersect_(Q,R) - line <-> from BX.se to X then to (X.x,-X.y) then to BX.nw - r_box(90,BX,```3$\,$R''') - -# Drill centres - D[1]: 35,sqrt(85^2-35^2) - D[2]: -D[1].x,D[1].y - D[3]: -D[1].x,-D[1].y - D[4]: D[1].x,-D[1].y - ctrline(from D[3] to D[1] chop 15) - ctrline(to rvec_(2*15,0)) - ctrline(from D[3]+vec_(-15,0) to D[3]+vec_(15,0)) - ctrline(from D[2] to D[4] chop 15) - ctrline(to rvec_(2*15,0)) - ctrline(from D[2]+vec_(-15,0) to D[2]+vec_(15,0)) -visible_thick - for i=1 to 4 do { - circle diam 16 at D[i] - for j = 0 to 7 do { arcr(D[i],23/2,j/8*twopi_,(j+3/4)/8*twopi_) ccw } - } - -hidden_thick - for s=-1 to 1 by 2 do { - line dashed from (-305/2,s*h) to (305/2,s*h) - line dashed from (-305/2,s*30.6) to (305/2,s*30.6) - line dashed from (-305/2,s*21.1) to (305/2,s*21.1) - line dashed from (-305/2+25+2,s*21.1) to (305/2,s*21.1) - line dashed dashwid/2 from (-305/2+25,s*25/2) down -s*(40/2-25/2-2); - if s<0 then { arc dashed dashwid/4 ccw rad 2 } \ - else { up; arc dashed dashwid/4 cw rad 2 } - line dashed to ((305/2,0),Here) - for k = -1 to 1 by 2 do { - move to (k*305/2,s*(30.6+10)) - { dashline(from Here+(0,s*9.5/2) right -k*16,,dashwid/2) - dashline(right -k*9.5/2/2 up -s*9.5/2,,dashwid/3) - dashline(left -k*9.5/2/2 up -s*9.5/2,,dashwid/3) - dashline(left -k*16,,dashwid/2) - dashline(from Here+(-k*16,0) up s*9.5,,dashwid/2.5) } - { dashline(from Here+(0,s*11/2) right -k*36.5,,dashwid/2) - dashline(right -k*11/2/2 up -s*11/2,,dashwid/3) - dashline(left -k*11/2/2 up -s*11/2,,dashwid/3) - dashline(left -k*36.5,,dashwid/2) - dashline(from Here+(-k*36.5,0) up s*11,,dashwid/2.5) } - { dashline(from Here+(0,s*13/2) right -k*32,,dashwid/2) - dashline(down s*13,,dashwid/2) - dashline(left -k*32,,dashwid/2) } - ctrline(right -k*20 chop -3 chop 0); ctrline(right -k*20 chop 0 chop -3) - } - } - -dimension_thick -# bottom - dimension_(from (-305/2,-h) to (305/2,-h),-(rr*1.1-h),"305",20pt__) -# outer radii - r_dimen(from (-P1.x,P1.y) down 40*cosd(30) right 40*sind(30),0,40,,->) - r_dimen(from (P1.x,-P1.y)+(Rect_(40,120)) \ - down 40*cosd(30) right 40*sind(30),0,40,,<-) -# main diameter - r_dimen(from (Rect_(rr,180+50)) to (Rect_(rr,50)),,230,,,(Rect_(50,50))) -# inner circles - r_dimen(from (Rect_(d2/2,180+25)) to (Rect_(d2/2,25)),,204,,,(Rect_(25,25))) - r_dimen(from (Rect_(d3/2,180-12)) to (Rect_(d3/2,-12)),,140,,,(Rect_(25,-12))) - -# bolt hole placement diameter - r_dimen(from Orig to (Rect_(85,-43)),,``85$\,$R'',,->,(Rect_(20,-43))) -# left slot - r_dimen(from (-305/2+6,-25/2) up 25,0,25) - r_dimen(from (-305/2,-26) right 40,0,40) - line from last line.end to (last line.end.x,BX.s.y) chop -tic chop 0 - r_dimen(from (-305/2,26) right 25,0,25) - line from last line.end to (last line.end.x,BX.n.y) chop -tic chop 0 -# right slot - r_dimen(from (305/2-40,-32/2-10) right 40,0,40) - line from (305/2-40,-32/2) down 10+tic -# drill-holes - for i=1 to 4 do { - ctrarcr(Orig,85,atan2(D[i].y,D[i].x)-10*dtor_,atan2(D[i].y,D[i].x)+10*dtor_) - } - ctrarcr(Orig,85,atan2(D[4].y,D[4].x)+10*dtor_,atan2(D[4].y,D[4].x)+25*dtor_) - ctrline(up 30 at D[3]) - ctrline(up 30 at D[4]) - r_dimen(from D[3]+(0,-14) right 35,0,35) - r_dimen(from (0,D[3].y-14) right 35,0,35) - -# arrow <- down 30 left 30 from D[3] chop 16/2 chop 0 then left 5 -# "16 DRILL 23 CBORE" rjust "4 HOLES" rjust - -# arrow <- from (-305/2,30.6+10+2) up 5 left 5 then up 13 -# s_box(SEE (A)) with .sw at Here+(-5pt__,2pt__) - -command "}%" -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m4 index 7229f0afee8..6ccf5d5709e 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m4 @@ -1,3 +1,4 @@ + .PS # `Conn.m4' cct_init @@ -31,38 +32,44 @@ C: [ C1: ccoax `"\tt ccoax\vphantom{(}"' ht 11 pt__ at C1.s below thinlines_ - arrow <- up 0.1 right 0.1 from C1.C.ne; "C" ljust - arrow <- down 0.05 right 0.1 from C1.S.e; "S" wid 0.1 ht 11pt__ ljust + arrow <- down 0.05 left 0.15 from C1.C.w; "\sl C" rjust + arrow <- down 0.05 right 0.1 from C1.S.e; "\sl S" wid 0.1 ht 11pt__ ljust thicklines_ - C2: ccoax(at C1+(0,0.3),F) - `"\tt ccoax(,F)"' ht 11 pt__ wid 0.65 at C2.ne ljust - ] with .C1.sw at T.S2.se+(0.6,0.0) + C2: ccoax(at C1+(0,0.4),F) + `"\tt ccoax(,F)"' ht 11 pt__ at C2.s below + ] with .w at T.e+(0.6,0.0) + +B: [ + tbox(V_2) + { `"\tt tbox(V\_2)"' at last [].s below } + tbox(V_1,,,<) at last []+(0,-0.4) + { `"\tt tbox(V\_1,{,},<)"' at last [].s below } + tbox(V_1,,,<>) at last []+(0,-0.4) + { `"\tt tbox(V\_1,{,},<>)"' at last [].s below } +] with .w at C.e + (0.5,-0.1) Y: [ - tconn(,O) + P1: tconn(,O) {`"\tt tconn(,O)"' at last line.c+(0,-0.2) wid 43 pt__ } move to Here+(0.3,0) - P1: tconn(,>) - {`"\tt (,>)"' at last line.c+(0,-0.2)} - move to P1.end+(0.3,0) - tconn(,>>) - {`"\tt (,>{}>)"' at last line.c+(0,-0.2)} - move to P1.start+(0,linewid) - P3: tconn(,<) - {`"\tt tconn(,<)"' at last line.c+(0,-0.2)} + P2: tconn(,>) + {`"\tt $\ldots$(,>)"' at last line.c+(0,-0.2)} + move to P2.end+(0.3,0) + P3: tconn(,>>) + {`"\tt $\ldots$(,>{}>)"' at last line.c+(0,-0.2)} move to P3.end+(0.3,0) - tconn(,<<) - {`"\tt (,<{}<)"' at last line.c+(0,-0.2)} + P4: tconn(,<) + {`"\tt $\ldots$(,<)"' at last line.c+(0,-0.2)} + move to P4.end+(0.3,0) + P5: tconn(,<<) + {`"\tt $\ldots$(,<{}<)"' at last line.c+(0,-0.2)} + move to P5.end+(0.3,0) + P6: tconn(,A) + {`"\tt $\ldots$(,A)"' at last line.c+(0,-0.2)} + move to P6.end+(0.3,0) + P7: tconn(,M) + {`"\tt $\ldots$(,M)"' at last line.c+(0,-0.2)} -] with .sw at (C.e.x-0.4,T.s.y) - -B: [ - tbox(V_2) - { `"\tt tbox(V\_2)"' at last [].sw below ljust } - tbox(V_1,,,<) with .sw at last [].se+(1.25,0) - { `"\tt tbox(V\_1,{,},<)"' at last [].s below } - tbox(V_1,,,<>) with .sw at last [].se+(1.25,0) - { `"\tt tbox(V\_1,{,},<>)"' at last [].s below } -] with .nw at T.sw+(0,-0.2) +] with .nw at T.sw+(0,-0.35) .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Counting.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Counting.m4 deleted file mode 100644 index 18002ba99ff..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Counting.m4 +++ /dev/null @@ -1,26 +0,0 @@ -.PS -# Counting.m4 -gen_init - - g = 0.4 # grid size - define grid { (($2)*g,-($1)*g) } - circlerad = 0.1 - -for i=1 to 4 do { - sprintf(`"$S_%g$:"',i) ljust at grid(i,-0.5) - for j=1 to 4 do { if i+j < 8 then { - sprintf(`"$s_{%g%g}$"',i,j) at grid(i,j) } } } - -"$\vdots$" at grid(4.75,0) -for i=1 to 3 do { `"$\cdots$"' at grid(i,5) } -"$\cdots$" at grid(4,4) - -P: grid(1,1) -for k=3 to 5 do { - for i=1 to k-1 do { if (k%2==1) then { m=i; n=k-i } else { m=k-i; n=i } - Q: grid(m,n) - arrow from P to Q chop - P: Q } - } - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Cruller.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Cruller.m4 deleted file mode 100644 index d2c215ae133..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Cruller.m4 +++ /dev/null @@ -1,67 +0,0 @@ -.PS -# Cruller.m4 -threeD_init -NeedDpicTools -scale = 2.54 - -define(`lobe',`(sind(6*(`$1'))+4)/5*2.25') - - viewazimuth = 20 # Set view angles in degrees - viewelevation = 30 - setview(viewazimuth,viewelevation,0) - - dt = 3 # major angle degrees per facet - ds = 10 # minor angle degrees per facet - - tradius = 6 -define(`cruller',`rot3Dz((`$1')*dtor_, - sum3D(0,tradius,0,0,Rect_(lobe(`$2'+2*(`$1')),`$2')))') - -define(`tvisible',`dot3D(View3D, - cross3D(diff3D(cruller(`$1'+dt/2,`$2'),cruller(`$1',`$2')), - diff3D(cruller(`$1',`$2'+ds/2),cruller(`$1',`$2'))))') - - # create the arrays and sort - n = 0 - for t = dt to 360+dt/2 by dt do { - for s=ds/2 to 360.1 by ds do { - if tvisible(t,s) > -0.01 then { - n +=1 - t[n] = t - s[n] = s - d[n] = dot3D(cruller(t,s),view3D1,view3D2,view3D3) # view distance - ix[n] = n - } - } } -# prval(n) - dpquicksort(d,1,n,ix) - - # Background -Bne: (9,6) -Bsw: (-9,-6) -B: 0.5 between Bne and Bsw -iflatex(`line fill_(0.75) \ - from (Bsw,Bne) to Bsw then to (Bne,Bsw) then to Bne then to (Bsw,Bne)', - `ShadedPolygon((Bsw,Bne):Bsw:(Bne,Bsw):Bne,,-30, - 0,1,1,1, - .5,.1,.4,0, - 1,0,0,0) at B') - # draw the facets -thinlines_ -[ - rgbtohsv(0.6,0.4,0,h,s,v) - for i = 1 to n do { - tc = t[ix[i]]; sc = s[ix[i]] - SE: (Project(cruller(tc+dt/2,sc-ds/2))) - SW: (Project(cruller(tc-dt/2,sc-ds/2))) - NW: (Project(cruller(tc-dt/2,sc+ds/2))) - NE: (Project(cruller(tc+dt/2,sc+ds/2))) - f = ((dcosine3D(3,cruller(tc,sc))/2.25+1)/2)^2 - hsvtorgb(h,(1-f)*s,1,r,g,b) - line outlined rgbstring(r,g,b) shaded rgbstring(r,g,b) ifpdf( invis ) \ - from SE to SW then to NW then to NE then to SE } - ] at B - -thicklines_ - -.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 deleted file mode 100644 index 26230facbe7..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Euro.m4 +++ /dev/null @@ -1,128 +0,0 @@ -.PS -#Euro.m4 -gen_init -divert(-1) - `euro_simple([height]) - Basic euro symbol with round outer boundary - default height=10pt' -define(`euro_simple', -`[ linethick = 0 - orad = ifelse(`$1',,`5bp__',(`$1')/2) - u = orad/6 - irad = orad - u - C: (0,0) - D: C+(Rect_(irad,40)) - CD: move from C+(0,-orad) to D - DK: move from D down u - Ubot: move from C+(0,u/2) right u - Utop: move from Ubot.start+(0,u) right u - Ltop: move from C+(0,-u/2) right u - Lbot: move from Ltop.start+(0,-u) right u - L_edge: C-(7.5*u,0) - Start: (C,Utop) - slope = (CD.end.y-CD.start.y)/(CD.end.x-CD.start.x) -shade(0, - line from Start to Intersect_(Utop,CD) \ - then to Intersect_(Ubot,CD) \ - then to LCintersect(Ubot,C,irad) - arc to LCintersect(Ltop,C,irad) with .c at C - line to Intersect_(Ltop,CD) \ - then to Intersect_(Lbot,CD) \ - then to LCintersect(Lbot,C,irad) - arc to (D,C)-(0,D.y-C.y) with .c at C - line to LCintersect(DK,C,orad,R) - arc cw to LCintersect(Lbot,C,orad) with .c at C - line to (L_edge,Here) \ - then right u/slope up u \ - then to LCintersect(Ltop,C,orad) - arc cw to LCintersect(Ubot,C,orad) with .c at C - line to (L_edge,Here) \ - then right u/slope up u \ - then to LCintersect(Utop,C,orad) - arc cw to LCintersect(CD,C,orad,R) with .c at C - line to D - arc to LCintersect(Utop,C,irad) with .c at C - line to Start - ) ]') - - `euro_symbol([ht=val; aspect=val; slant=degrees]) - Euro symbol with variable aspect ratio and slant - defaults: ht=10pt, aspect=1, slant=0 - e.g., euro_symbol(ht=14pt__; aspect=1.2)' - -define(`euro_symbol',`[ - setkey_(`$1',ht,10pt__) setkey_(`$1',aspect,1) setkey_(`$1',slant,0) - linethick = 0 - orad = m4ht/2 - u = orad/6 - irad = orad - u - if m4aspect==0 then { squeeze = 1 } else { squeeze = 1/m4aspect } - slant = sind(m4slant) - C: (0,0) - D: C+(Rect_(irad,40)) - CD: move from C+(0,-orad) to D - DK: move from D down u - Ubot: move from C+(0,u/2) right u - Utop: move from Ubot.start+(0,u) right u - Ltop: move from C+(0,-u/2) right u - Lbot: move from Ltop.start+(0,-u) right u - L_edge: C-(7.5*u,0) - Start: (C,Utop) - slope = (CD.end.y-CD.start.y)/(CD.end.x-CD.start.x) - -shade(0, - S: LCintersect(Ubot,C,irad) - line from euro_tr(Start) to euro_tr(Intersect_(Utop,CD)) \ - then to euro_tr(Intersect_(Ubot,CD)) \ - then to euro_tr(S) - euro_arc(S,LCintersect(Ltop,C,irad),irad) - S: LCintersect(Lbot,C,irad) - line to euro_tr(Intersect_(Ltop,CD)) \ - then to euro_tr(Intersect_(Lbot,CD)) \ - then to euro_tr(S) - euro_arc(S,((D,C)-(0,D.y-C.y)),irad) - S: LCintersect(DK,C,orad,R) - line to euro_tr(S) - euro_arc(S,LCintersect(Lbot,C,orad),orad,cw) - S: LCintersect(Ltop,C,orad) - E: LCintersect(Lbot,C,orad) - line to euro_tr((L_edge,E)) \ - then to euro_tr((L_edge,E)+(u/slope,u)) \ - then to euro_tr(S) - E: LCintersect(Ubot,C,orad) - euro_arc(S,E,orad,cw) - S: LCintersect(Utop,C,orad) - line to euro_tr((L_edge,E)) \ - then to euro_tr((L_edge,E)+(u/slope,u)) \ - then to euro_tr(S) - euro_arc(S,LCintersect(CD,C,orad,R),orad,cw) - line to euro_tr(D) - euro_arc(D,LCintersect(Utop,C,irad),irad) - line to euro_tr(Start) -) ]') - - `aspect ratio and slant transformation' -define(`euro_tr',`((`$1').x*squeeze+(`$1').y*slant,(`$1').y)') - `transformed arc, centre C' -define(`euro_arc', -`M4X: `$1'; as = atan2(M4X.y-C.y,M4X.x-C.x) - M4X: `$2'; ae = atan2(M4X.y-C.y,M4X.x-C.x) - ifelse(`$4',cw,`if ae > as then { ae -= twopi_ }', - `if ae < as then { ae += twopi_ }') - ax = ae-as - n = max(5,ceiling_(abs(ax)/(10*dtor_))) - for i=0 to n do { P[i]: euro_tr((rect_(`$3',as+i/n*ax))) } - fitcurve(P,n) - move to P[n] ') - -divert(0)dnl - -euro_simple -move -euro_symbol(slant=15) -move -euro_simple(72bp__) -move -euro_symbol(ht=72bp__*2; aspect=1.0; slant=15) - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Eye.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Eye.m4 deleted file mode 100644 index 1251afca095..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Eye.m4 +++ /dev/null @@ -1,61 +0,0 @@ -.PS -# Eye.m4 -# https://getpocket.com/explore/item/pillars-of-fire-truly-adventurous?utm_source=pocket-newtab -gen_init - -define(`eye',`[ u = `$1'; v = 0.47*u; w = 0.25*u -# for pdf, linethick in shade must be environment - lth = linethick; linethick = 0 - shade(1, - arc outlined "red" from (u/2,0) to (-u/2,0) with .c at (0,-u/3) - arc to (u/2,0) with .c at (0,u/3) ) - linethick = lth - circle diam v fill_(0.25) at (0,0) - circle diam w fill_(0) at (0,0) - circle thick 0 diam last circle.diam/2 fill_(1) at last circle.nw - circle diam last circle.diam-lthick at last circle outlined graystring(0.9) - ] ') - - skale = 2/3 - Bx: box wid 11*skale ht 8.5*skale fill_(0) at (0,0) - ane = atan2(Bx.ht,Bx.wid)*rtod_ - d[5] = 0.92*Bx.ht - d[4] = 0.78*Bx.ht - d[3] = 0.62*Bx.ht - d[2] = 0.40*Bx.ht - d[1] = 0.25*Bx.ht - da = 1 - dax = 360/64 - C[0]: Bx.se; C[1]: Bx.nw - for a=-int(ane/dax)*dax to 180-ane by dax do { - T1: (Rect_(1,a+da)); T1: intersect_(Bx.ne,C[(a>ane)],Bx,T1) - T2: (Rect_(1,a)); T2: intersect_(Bx.ne,C[(a>ane)],Bx,T2) - line outlined "white" shaded "white" from Bx to T1 then to T2 then to Bx - line outlined "white" shaded "white" from Bx to T1*(-1) \ - then to T2*(-1) then to Bx - } - for i=5 to 2 by -1 do { - C[i]: circle diam d[i] fill_(0) at Bx - for a=0 to 359 by dax do { - T1: (Rect_(d[i]/2,a)) - T2: (Rect_(d[i]/2,a-da*2)) - lth = linethick; linethick = 0 - shade(1, - arc cw from T1 to T2 with .c at Bx - spline 0.55 thick 0 to 0.8 between Bx and T2 \ - then to (Rect_(d[i]/4,a+30)) - arc cw to (Rect_(d[i]/4,a+32)) with .c at Bx - spline 0.55 thick 0 to 0.8 between Bx and T1 then to T1 ) - linethick = lth - } - } - C[1]: circle thick 2 diam d[1] at Bx fill_(0.1) - eye(d[1]-4bp__) at (0,0) - for a=0 to 359 by dax do { - T1: (Rect_(d[1]/2-1bp__,a)) - T2: (Rect_(d[1]/2-1bp__,a+dax/2)) - line thick 0 from T1 to T2 then to 0.5 between Bx and T2 \ - then to 0.5 between Bx and T1 then to T1 shaded "white" #outlined "white" - } - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Floor.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Floor.m4 deleted file mode 100644 index 0f3076174a3..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Floor.m4 +++ /dev/null @@ -1,25 +0,0 @@ -.PS -# Floor.m4 -gen_init - s = 0.25 - s60 = s*sqrt(3)/2 - c60 = s/2 - ni = 9 - nj = 6 - cellw = 3*s - cellh = 2*s60 - B:box wid nj*cellw ht ni*cellh shaded rgbstring(0,1,0) - - for i=1 to ni do { - for j=1 to nj do { - line shaded rgbstring(0,0,1) \ - from B.sw+((j-1)*cellw,(i-1)*cellh) \ - right c60 up s60 then right 2*s then up s60 right c60 then left s \ - then down cellh left 2*c60 then left s - line shaded rgbstring(1,0,0) \ - from B.sw+((j-1)*cellw,i*cellh) \ - right s then down cellh right 2*c60 then right s then up s60 left c60 \ - then left 2*s then left c60 up s60 - } - } -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Flow.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Flow.m4 index f117c082c37..7c514050f0a 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Flow.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Flow.m4 @@ -1,7 +1,9 @@ .PS # Flow.m4 gen_init -ifdef(`FlowchartDefs_',,`include(FlowchartDefs.m4)') +ifdef(`FlowchartDefs_',, + `sinclude(FlowchartDefs.m4def) + sinclude(../FlowchartDefs.m4def)') define(`Thistle',`rgbstring(0.85,0.75,0.85)')dnl define(`RubineRed',`rgbstring(0.81,0,0.35)')dnl diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/FlowchartDefs.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/FlowchartDefs.m4 deleted file mode 100644 index fc3dfca6a07..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/FlowchartDefs.m4 +++ /dev/null @@ -1,255 +0,0 @@ -divert(-1) - Google flowchart display symbol - FlowchartDefs.m4 - `Some experimental flow-chart macros. - In the following, every block (subchart) is - in [] brackets, with .N, .S, .E and .W - internally defined. Follow this convention - if you create compound constructs. - - Generally, the first argument is one - or more strings; the second adjusts - the size, and the third can be used - to add color, dashed lines, labels, - or other embellishements. Default is - grey fill if arg3 is blank. - - These macros have been renamed from earlier - versions because of slight differences of - arguments.' - -define(`FlowchartDefs_') - - `Default sizes:' -define(`fboxwid',linewid*2) -define(`fboxht',linewid*0.75) -define(`farrowht',linewid*0.5) - - `Fbox( "text", wid expr ht expr, attributes ) - The basic task box: arg1 may be 1 or more - text strings. Attributes include box - line and fill specs. To adjust the box - size to the size of the typeset text, see - the \boxdims macro in the manual. Example: - Fbox("$x < 1$",, - shaded rgbstring(0.46,0.53,0.63))' -define(`Fbox',`[ boxwid = fboxwid; boxht = fboxht - Box: box `$2' ifelse(`$3',,`fill_(fillval)',`$3') `$1' - N: Box.n; S:Box.s; E:Box.e; W: Box.w - `$4']') - - `Fdelay("text",wid expr ht expr,attributes)' -define(`Fdelay',`[ boxwid = fboxwid; boxht = fboxht - Box: box invis `$2' - N: Box.n; S: Box.s; E: Box.e; W: Box.w - arc from Box.se-(Box.ht/2,0) to Box.ne-(Box.ht/2,0) \ - with .c at Box.e-(Box.ht/2,0) `$3' - line to Box.nw to Box.sw to Box.se-(Box.ht/2,0) `$3' - ifelse(`$1',,,`$1' at Box) - `$4']') - - `Fdisplay("text",wid expr ht expr,attributes)' -define(`Fdisplay',`[ boxwid = fboxwid; boxht = fboxht - Box: box invis `$2' - N: Box.n; S: Box.s; E: Box.e; W: Box.w - NE: Box.ne-(Box.ht/4,0); SE: (NE,Box.s) - NW: Box.nw+(Box.ht/2,0); SW: (NW,Box.s) - ifelse(`$3',,,` - box wid NE.x-NW.x ht Box.ht with .ne at NE `$3' invis - line from W to NW then to SW then to W `$3' invis ') - arc from SE to NE with .c at E-(Box.ht*2/3,0) `$3' - line to NW `$3' - arc from NW to W with .c at (NW,Box)+(Box.ht/4,-Box.ht/4) `$3' - arc from W to SW with .c at (NW,Box)+(Box.ht/4,Box.ht/4) `$3' - line to SE `$3' - ifelse(`$1',,,`$1' at Box) - `$4']') - - `Fstored("text",wid expr ht expr,attributes)' -define(`Fstored',`[ boxwid = fboxwid; boxht = fboxht - Box: box invis `$2' - r = Box.ht*7/8; d = r - sqrt(r^2-(Box.ht/2)^2) - N: Box.n; S: Box.s; E: Box.e-(d,0); W: Box.w - NW: Box.nw+(d,0); SW: (NW,Box.s); NE: Box.ne; SE: Box.se - ifelse(`$3',,,` - box wid NE.x-NW.x ht Box.ht with .nw at NW `$3' invis ') - arc from NW to SW with .c at Box.w+(r,0) `$3'; round - line to SE; round - arc cw to NE with .c at E+(r,0) fill_(1); round - line to NW `$3'; round - ifelse(`$1',,,`$1' at Box) - `$4']') - - `Fconnect("text", - wid expr ht expr[:U|D|L|R|angle], attributes)' -define(`Fconnect',`[ boxht = fboxht; boxwid = boxht - define(`m4wh',`m4Leftstr(`$2')')dnl - define(`m4wid',`patsubst(patsubst(m4wh, ht .*),^wid ,)')dnl - ifelse(m4wid,,`define(`m4wid',boxwid)')dnl - define(`m4ht',`patsubst(m4wh,.* *ht *,)')dnl - ifelse(m4ht,,`define(`m4ht',boxht)')dnl - define(`m4cpt',`m4Rightstr(`$2')')dnl - setdir_(ifelse(m4cpt,,`ifdef(`m4a_',rp_ang*rtod_,0)',m4cpt)) -# {Box: [lbox(m4wid,m4ht,invis)]} - W: Here; NW: vec_(0,m4ht/2); N: vec_(m4wid/2,m4ht/2); NE: vec_(m4wid,m4ht/2) - SW: vec_(0,-m4ht/2); S: vec_(m4wid/2,-m4ht/2); SE: vec_(m4wid,-m4ht/2) - E: vec_(m4wid,0); C: 3/8 between W and E - line from 1/2 between NW and N \ - to NW to SW to S to E to N to 1/2 between NW and N `$3' - ifelse(`$1',,,`$1' at C) - `$4'; resetdir_ ]') - - `Fdata("text",wid expr ht expr, - xslant,attributes)' -define(`Fdata',`[ boxwid = fboxwid; boxht = fboxht - Box: box invis `$2' - xs = ifelse(`$3',,fboxht/6,`($3)/2') - NE: Box.ne+(xs,0); SE: Box.se-(xs,0) - NW: Box.nw+(xs,0); SW: Box.sw-(xs,0) - N: Box.n; E: Box.e; S: Box.s; W: Box.w - line from N to NE then to SE then to SW then to NW then to N \ - ifelse(`$4',,`fill_(fillval)',`$4') - ifelse(`$1',,,`$1' at Box) - `$5']') - - `Fprep("text",wid expr ht expr,attributes)' -define(`Fprep',`[ boxwid = fboxwid; boxht = fboxht - Box: box invis `$2' - NE: Box.ne-(fboxht/4,0); E: Box.e; SE: (NE,Box.s); N: Box.n - NW: Box.nw+(fboxht/4,0); W: Box.w; SW: (NW,Box.s); S: Box.s - line from N to NE to E to SE to SW to W to NW to N \ - ifelse(`$3',,`fill_(fillval)',`$3') - ifelse(`$1',,,`$1' at Box) - `$4']') - - `Fkeyboard("text",wid expr ht expr,attributes)' -define(`Fkeyboard',`[ boxwid = fboxwid; boxht = fboxht - Box: box invis `$2' - NW: Box.nw-(0,min(Box.ht/4,Box.wid/16)); W: Box.w; SW: Box.sw; S: Box.s - NE: Box.ne+(0,min(Box.ht/4,Box.wid/16)); E: Box.e; SE: Box.se; N: 0.5 between NW and NE - line from N to NE to SE to SW to NW to N ifelse(`$3',,`fill_(fillval)',`$3') - ifelse(`$1',,,`$1' at Box) - `$4']') - - `Fdocument("text",wid expr ht expr,attributes)' -define(`Fdocument',`[ boxwid = fboxwid; boxht = fboxht - Box: box invis `$2'; Q: move from Box.sw to Box.se - NE: Box.ne; E: Box.e; SE: Box.se-(0,Box.ht/4); N: Box.n - NW: Box.nw; W: Box.w; SW: Box.sw-(0,Box.ht/4); S: Box.s-(0,Box.ht/4) - line from SE to NE to NW to SW `$3' - arc to S with .c at (0.5 between SW and S) + (0,Box.ht) `$3' - arc to SE with .c at (0.5 between S and SE) -(0,Box.ht) cw \ - ifelse(`$3',,,``$3' shaded rgbstring(1,1,1)') - ifelse(`$1',,,`$1' at Box) - `$4']') - - `Fkeying("text",wid expr ht expr,attributes)' -define(`Fkeying',`[ boxwid = fboxwid; boxht = fboxht - Box: box `$2' invis - hsq = (Box.wid/2)^2-(Box.ht/2)^2 - if hsq > 0 then { d = Box.wid/2-sqrt(hsq) } else { d = 0 } - W: Box.w; NW: Box.nw+(d,0); N: Box.n; NE: Box.ne-(d,0) - E: Box.e; SE: Box.se-(d,0); S: Box.s; SW: Box.sw+(d,0) - if hsq >= 0 then { x = 0 } else { x = sqrt(-hsq) } - box wid NE.x-NW.x ht N.y-S.y `$3' invis at Box - arc from SE to NE with .c at Box - (x,0) `$3'; round(,,`$3') - line to NW `$3'; round(,,`$3') - arc to SW with .c at Box + (x,0) `$3'; round(,,`$3') - line to SE `$3'; round(,,`$3') - ifelse(`$1',,,`$1' at Box) - `$4']') - - `If-then - Ftest( "text", wid expr ht expr, attributes )' -define(`Ftest',`[boxwid = fboxwid*0.8; boxht = fboxht*1.4 - Box: box `$2' invis - N: Box.n; S: Box.s; E: Box.e; W: Box.w - line from 0.5 between last box.n and last box.e to last box.e to last box.s \ - to last box.w to last box.n to 0.5 between last box.n and last box.e \ - ifelse(`$3',,`fill_(fillval)',`$3') - ifelse(`$1',,,`$1' at Box) - `$4']') - - `Fcase: case statement - Fcase(wid expr ht expr, - "Test string 1"[:attributes],task, ..., - "Test string n"[:attributes],task )' - `arg1 adjusts the size of the tests - The optional attributes for each string apply - to the Ftest containing the string. - The Ftest blocks are labeled Test1, Test2, ... - A task is a flow subchart with internal - names .E and .S defined. The tasks are - labeled Task1, Task2, ... ' -define(`Fcase',`[ down; S: Here; sx = S.x - Fcaseloop_(1,$@) - ifelse(`$2',,`E:S; W:S; N:S', - `E:(sx+linewid/2,Task1.E.y); W:Test1.W; N:Test1.N') - Fcasearrow_(1,$@) - arrow from E to (E,S) then to S ]') - - define(`Fcaseloop_',`ifelse(`$3',,, - `Test`$1': Ftest(patsubst(`$3',":.*,"),`$2', - ifinstr(`$3',":,`patsubst(`$3',.*":,)')) with .N at S - Task`$1': `$4' with .nw at Test`$1'.E+(linewid/2,min(Test`$1'.ht,fboxht)/2) - arrow right linewid/4 from Test`$1'.E \ - then down Test`$1'.E.y-Task`$1'.W.y then to Task`$1'.W - S: (Test`$1'.S.x,min(Test`$1'.S.y,Task`$1'.S.y)-linewid/3) - ifelse(`$5',,`line',`arrow') from Test`$1'.S to S - sx = max(sx,Task`$1'.E.x) - Fcaseloop_(incr($1),`$2',shift(shift(shift(shift($@)))))')') - define(`Fcasearrow_',`ifelse(`$3',,, - `arrow from Task`$1'.E to (E,Task`$1'.E) - Fcasearrow_(incr($1),,shift(shift(shift(shift($@)))))')') - - `while statement with explicit test - Fwhiledo("test text", wid x ht y, - attributes, task spec ) - The task structure is given label Task ' -define(`Fwhiledo',`[ down - Test: Ftest(`$1',`$2',`$3') - arrow right linewid/2 from Test.E - Task: `$4' with .W at Here - E: Task.E; W: Test.w; S: Test.S - arrow up max(linewid/4,Test.n.y-Task.n.y+arrowht*1.5) \ - from Task.N then left Task.x-Test.x - N: Here - arrow to Test.n - `$5']') - - `repeat statement with explicit test - Frepeatuntil("test",wid x ht y, - attributes, task spec ) - The task structure is given label Task ' -define(`Frepeatuntil',`[ N: Here - Task: ifelse(`$4',,Here,`$4' with .N at N) - W: Task.W - arrow from Task.S down linewid/3 - Test: Ftest(`$1',`$2',`$3') - E: Task.E+(linewid/2+max(0,Test.e.x-Task.e.x),0) - arrow from Test.e to (E,Test) then to E then to Task.E - S: Test.S - `$5']') - - `if-then-else - Fifthenelse( "test", wid x ht y, attributes, - left tasks, right tasks) - The left task structure is given label - Ltask and the right task structure is - given label Rtask ' -define(`Fifthenelse',`[ Test: Ftest(`$1',`$2',`$3') - N: Test.N - Ltask: ifelse(`$4',,`Test.S; W:Test.W; LS:Ltask', - `$4 with .ne at ((Test.W.x+Test.x)/2,Test.S.y) - W: Ltask.W; LS:Ltask.S - arrow from Test.W to (Ltask.N,Test.W) then to Ltask.N') - Rtask: ifelse(`$5',,`Test.S; E:Test.E; RS:Rtask', - `$5 with .nw at ((Test.E.x+Test.x)/2,Test.S.y) - E: Rtask.E; RS: Rtask.S - arrow from Test.E to (Rtask.N,Test.E) then to Rtask.N') - S: (Test.x,min(LS.y,RS.y)-linewid/3) - arrow from LS to (LS,S) - arrow from RS to (RS,S) - line to (LS,Here) - `$6']') -divert(0)dnl diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/FlowchartDefs.m4def b/Master/texmf-dist/doc/latex/circuit-macros/examples/FlowchartDefs.m4def new file mode 100644 index 00000000000..fc3dfca6a07 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/FlowchartDefs.m4def @@ -0,0 +1,255 @@ +divert(-1) + Google flowchart display symbol + FlowchartDefs.m4 + `Some experimental flow-chart macros. + In the following, every block (subchart) is + in [] brackets, with .N, .S, .E and .W + internally defined. Follow this convention + if you create compound constructs. + + Generally, the first argument is one + or more strings; the second adjusts + the size, and the third can be used + to add color, dashed lines, labels, + or other embellishements. Default is + grey fill if arg3 is blank. + + These macros have been renamed from earlier + versions because of slight differences of + arguments.' + +define(`FlowchartDefs_') + + `Default sizes:' +define(`fboxwid',linewid*2) +define(`fboxht',linewid*0.75) +define(`farrowht',linewid*0.5) + + `Fbox( "text", wid expr ht expr, attributes ) + The basic task box: arg1 may be 1 or more + text strings. Attributes include box + line and fill specs. To adjust the box + size to the size of the typeset text, see + the \boxdims macro in the manual. Example: + Fbox("$x < 1$",, + shaded rgbstring(0.46,0.53,0.63))' +define(`Fbox',`[ boxwid = fboxwid; boxht = fboxht + Box: box `$2' ifelse(`$3',,`fill_(fillval)',`$3') `$1' + N: Box.n; S:Box.s; E:Box.e; W: Box.w + `$4']') + + `Fdelay("text",wid expr ht expr,attributes)' +define(`Fdelay',`[ boxwid = fboxwid; boxht = fboxht + Box: box invis `$2' + N: Box.n; S: Box.s; E: Box.e; W: Box.w + arc from Box.se-(Box.ht/2,0) to Box.ne-(Box.ht/2,0) \ + with .c at Box.e-(Box.ht/2,0) `$3' + line to Box.nw to Box.sw to Box.se-(Box.ht/2,0) `$3' + ifelse(`$1',,,`$1' at Box) + `$4']') + + `Fdisplay("text",wid expr ht expr,attributes)' +define(`Fdisplay',`[ boxwid = fboxwid; boxht = fboxht + Box: box invis `$2' + N: Box.n; S: Box.s; E: Box.e; W: Box.w + NE: Box.ne-(Box.ht/4,0); SE: (NE,Box.s) + NW: Box.nw+(Box.ht/2,0); SW: (NW,Box.s) + ifelse(`$3',,,` + box wid NE.x-NW.x ht Box.ht with .ne at NE `$3' invis + line from W to NW then to SW then to W `$3' invis ') + arc from SE to NE with .c at E-(Box.ht*2/3,0) `$3' + line to NW `$3' + arc from NW to W with .c at (NW,Box)+(Box.ht/4,-Box.ht/4) `$3' + arc from W to SW with .c at (NW,Box)+(Box.ht/4,Box.ht/4) `$3' + line to SE `$3' + ifelse(`$1',,,`$1' at Box) + `$4']') + + `Fstored("text",wid expr ht expr,attributes)' +define(`Fstored',`[ boxwid = fboxwid; boxht = fboxht + Box: box invis `$2' + r = Box.ht*7/8; d = r - sqrt(r^2-(Box.ht/2)^2) + N: Box.n; S: Box.s; E: Box.e-(d,0); W: Box.w + NW: Box.nw+(d,0); SW: (NW,Box.s); NE: Box.ne; SE: Box.se + ifelse(`$3',,,` + box wid NE.x-NW.x ht Box.ht with .nw at NW `$3' invis ') + arc from NW to SW with .c at Box.w+(r,0) `$3'; round + line to SE; round + arc cw to NE with .c at E+(r,0) fill_(1); round + line to NW `$3'; round + ifelse(`$1',,,`$1' at Box) + `$4']') + + `Fconnect("text", + wid expr ht expr[:U|D|L|R|angle], attributes)' +define(`Fconnect',`[ boxht = fboxht; boxwid = boxht + define(`m4wh',`m4Leftstr(`$2')')dnl + define(`m4wid',`patsubst(patsubst(m4wh, ht .*),^wid ,)')dnl + ifelse(m4wid,,`define(`m4wid',boxwid)')dnl + define(`m4ht',`patsubst(m4wh,.* *ht *,)')dnl + ifelse(m4ht,,`define(`m4ht',boxht)')dnl + define(`m4cpt',`m4Rightstr(`$2')')dnl + setdir_(ifelse(m4cpt,,`ifdef(`m4a_',rp_ang*rtod_,0)',m4cpt)) +# {Box: [lbox(m4wid,m4ht,invis)]} + W: Here; NW: vec_(0,m4ht/2); N: vec_(m4wid/2,m4ht/2); NE: vec_(m4wid,m4ht/2) + SW: vec_(0,-m4ht/2); S: vec_(m4wid/2,-m4ht/2); SE: vec_(m4wid,-m4ht/2) + E: vec_(m4wid,0); C: 3/8 between W and E + line from 1/2 between NW and N \ + to NW to SW to S to E to N to 1/2 between NW and N `$3' + ifelse(`$1',,,`$1' at C) + `$4'; resetdir_ ]') + + `Fdata("text",wid expr ht expr, + xslant,attributes)' +define(`Fdata',`[ boxwid = fboxwid; boxht = fboxht + Box: box invis `$2' + xs = ifelse(`$3',,fboxht/6,`($3)/2') + NE: Box.ne+(xs,0); SE: Box.se-(xs,0) + NW: Box.nw+(xs,0); SW: Box.sw-(xs,0) + N: Box.n; E: Box.e; S: Box.s; W: Box.w + line from N to NE then to SE then to SW then to NW then to N \ + ifelse(`$4',,`fill_(fillval)',`$4') + ifelse(`$1',,,`$1' at Box) + `$5']') + + `Fprep("text",wid expr ht expr,attributes)' +define(`Fprep',`[ boxwid = fboxwid; boxht = fboxht + Box: box invis `$2' + NE: Box.ne-(fboxht/4,0); E: Box.e; SE: (NE,Box.s); N: Box.n + NW: Box.nw+(fboxht/4,0); W: Box.w; SW: (NW,Box.s); S: Box.s + line from N to NE to E to SE to SW to W to NW to N \ + ifelse(`$3',,`fill_(fillval)',`$3') + ifelse(`$1',,,`$1' at Box) + `$4']') + + `Fkeyboard("text",wid expr ht expr,attributes)' +define(`Fkeyboard',`[ boxwid = fboxwid; boxht = fboxht + Box: box invis `$2' + NW: Box.nw-(0,min(Box.ht/4,Box.wid/16)); W: Box.w; SW: Box.sw; S: Box.s + NE: Box.ne+(0,min(Box.ht/4,Box.wid/16)); E: Box.e; SE: Box.se; N: 0.5 between NW and NE + line from N to NE to SE to SW to NW to N ifelse(`$3',,`fill_(fillval)',`$3') + ifelse(`$1',,,`$1' at Box) + `$4']') + + `Fdocument("text",wid expr ht expr,attributes)' +define(`Fdocument',`[ boxwid = fboxwid; boxht = fboxht + Box: box invis `$2'; Q: move from Box.sw to Box.se + NE: Box.ne; E: Box.e; SE: Box.se-(0,Box.ht/4); N: Box.n + NW: Box.nw; W: Box.w; SW: Box.sw-(0,Box.ht/4); S: Box.s-(0,Box.ht/4) + line from SE to NE to NW to SW `$3' + arc to S with .c at (0.5 between SW and S) + (0,Box.ht) `$3' + arc to SE with .c at (0.5 between S and SE) -(0,Box.ht) cw \ + ifelse(`$3',,,``$3' shaded rgbstring(1,1,1)') + ifelse(`$1',,,`$1' at Box) + `$4']') + + `Fkeying("text",wid expr ht expr,attributes)' +define(`Fkeying',`[ boxwid = fboxwid; boxht = fboxht + Box: box `$2' invis + hsq = (Box.wid/2)^2-(Box.ht/2)^2 + if hsq > 0 then { d = Box.wid/2-sqrt(hsq) } else { d = 0 } + W: Box.w; NW: Box.nw+(d,0); N: Box.n; NE: Box.ne-(d,0) + E: Box.e; SE: Box.se-(d,0); S: Box.s; SW: Box.sw+(d,0) + if hsq >= 0 then { x = 0 } else { x = sqrt(-hsq) } + box wid NE.x-NW.x ht N.y-S.y `$3' invis at Box + arc from SE to NE with .c at Box - (x,0) `$3'; round(,,`$3') + line to NW `$3'; round(,,`$3') + arc to SW with .c at Box + (x,0) `$3'; round(,,`$3') + line to SE `$3'; round(,,`$3') + ifelse(`$1',,,`$1' at Box) + `$4']') + + `If-then + Ftest( "text", wid expr ht expr, attributes )' +define(`Ftest',`[boxwid = fboxwid*0.8; boxht = fboxht*1.4 + Box: box `$2' invis + N: Box.n; S: Box.s; E: Box.e; W: Box.w + line from 0.5 between last box.n and last box.e to last box.e to last box.s \ + to last box.w to last box.n to 0.5 between last box.n and last box.e \ + ifelse(`$3',,`fill_(fillval)',`$3') + ifelse(`$1',,,`$1' at Box) + `$4']') + + `Fcase: case statement + Fcase(wid expr ht expr, + "Test string 1"[:attributes],task, ..., + "Test string n"[:attributes],task )' + `arg1 adjusts the size of the tests + The optional attributes for each string apply + to the Ftest containing the string. + The Ftest blocks are labeled Test1, Test2, ... + A task is a flow subchart with internal + names .E and .S defined. The tasks are + labeled Task1, Task2, ... ' +define(`Fcase',`[ down; S: Here; sx = S.x + Fcaseloop_(1,$@) + ifelse(`$2',,`E:S; W:S; N:S', + `E:(sx+linewid/2,Task1.E.y); W:Test1.W; N:Test1.N') + Fcasearrow_(1,$@) + arrow from E to (E,S) then to S ]') + + define(`Fcaseloop_',`ifelse(`$3',,, + `Test`$1': Ftest(patsubst(`$3',":.*,"),`$2', + ifinstr(`$3',":,`patsubst(`$3',.*":,)')) with .N at S + Task`$1': `$4' with .nw at Test`$1'.E+(linewid/2,min(Test`$1'.ht,fboxht)/2) + arrow right linewid/4 from Test`$1'.E \ + then down Test`$1'.E.y-Task`$1'.W.y then to Task`$1'.W + S: (Test`$1'.S.x,min(Test`$1'.S.y,Task`$1'.S.y)-linewid/3) + ifelse(`$5',,`line',`arrow') from Test`$1'.S to S + sx = max(sx,Task`$1'.E.x) + Fcaseloop_(incr($1),`$2',shift(shift(shift(shift($@)))))')') + define(`Fcasearrow_',`ifelse(`$3',,, + `arrow from Task`$1'.E to (E,Task`$1'.E) + Fcasearrow_(incr($1),,shift(shift(shift(shift($@)))))')') + + `while statement with explicit test + Fwhiledo("test text", wid x ht y, + attributes, task spec ) + The task structure is given label Task ' +define(`Fwhiledo',`[ down + Test: Ftest(`$1',`$2',`$3') + arrow right linewid/2 from Test.E + Task: `$4' with .W at Here + E: Task.E; W: Test.w; S: Test.S + arrow up max(linewid/4,Test.n.y-Task.n.y+arrowht*1.5) \ + from Task.N then left Task.x-Test.x + N: Here + arrow to Test.n + `$5']') + + `repeat statement with explicit test + Frepeatuntil("test",wid x ht y, + attributes, task spec ) + The task structure is given label Task ' +define(`Frepeatuntil',`[ N: Here + Task: ifelse(`$4',,Here,`$4' with .N at N) + W: Task.W + arrow from Task.S down linewid/3 + Test: Ftest(`$1',`$2',`$3') + E: Task.E+(linewid/2+max(0,Test.e.x-Task.e.x),0) + arrow from Test.e to (E,Test) then to E then to Task.E + S: Test.S + `$5']') + + `if-then-else + Fifthenelse( "test", wid x ht y, attributes, + left tasks, right tasks) + The left task structure is given label + Ltask and the right task structure is + given label Rtask ' +define(`Fifthenelse',`[ Test: Ftest(`$1',`$2',`$3') + N: Test.N + Ltask: ifelse(`$4',,`Test.S; W:Test.W; LS:Ltask', + `$4 with .ne at ((Test.W.x+Test.x)/2,Test.S.y) + W: Ltask.W; LS:Ltask.S + arrow from Test.W to (Ltask.N,Test.W) then to Ltask.N') + Rtask: ifelse(`$5',,`Test.S; E:Test.E; RS:Rtask', + `$5 with .nw at ((Test.E.x+Test.x)/2,Test.S.y) + E: Rtask.E; RS: Rtask.S + arrow from Test.E to (Rtask.N,Test.E) then to Rtask.N') + S: (Test.x,min(LS.y,RS.y)-linewid/3) + arrow from LS to (LS,S) + arrow from RS to (RS,S) + line to (LS,Here) + `$6']') +divert(0)dnl diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Fuses.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Fuses.m4 index bde24fac3eb..2a01cfa3f2a 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Fuses.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Fuses.m4 @@ -19,21 +19,30 @@ movewid = 0.25 } move down; right_ { - cbreaker; {"`{\tt cbreaker}'" at last line.c+(0,-0.25)} + fuse(,HB) ; {"`{\tt fuse(,HB)}'" at last line.c+(0,-0.2)} + move + fuse(,HC,0.5,0.3) ; {"`{\tt $\ldots$(,HC,0.5,0.3)}'" at last line.c+(0,-0.27)} move - cbreaker(,R); {"`{\tt cbreaker(,R)}'" at last line.c+(0,-0.25)} + cbreaker; {"`{\tt cbreaker}'" at last line.c+(0,-0.2)} move - cbreaker(,{,}D); {"`{\tt $\ldots$(,{,}D)}'" at last line.c+(0,-0.25)} + cbreaker(,R,D); {"`{\tt $\ldots$(,R,D)}'" at last line.c+(0,-0.2)} move - cbreaker(,{,}T); {"`{\tt $\ldots$(,{,}T)}'" at last line.c+(0,-0.25)} + cbreaker(,,T); {"`{\tt $\ldots$(,{,}T)}'" at last line.c+(0,-0.2)} move - cbreaker(,{,}TS); {"`{\tt $\ldots$(,{,}TS)}'" at last line.c+(0,-0.25) } + cbreaker(,,TS); {"`{\tt $\ldots$(,{,}TS)}'" at last line.c+(0,-0.2) } } move down; right_ { - fuse(,HB) ; {"`{\tt fuse(,HB)}'" at last line.c+(0,-0.2)} + jumper ; {"`{\tt jumper}'" at last line.c+(0,-0.2) } + move + jumper(,CJBED) ; {"`{\tt $\ldots$(,CJBED)}'" at last line.c+(0,-0.2) } + move + jumper(,body=outlined "gray" shaded "gray";) + {"`\tt $\ldots$(,body=outlined \"gray\" \textbackslash'" wid 172bp__ \ + with .w at (last line.start, last "") + "`\tt \hphantom{$\ldots$(,body=}shaded \"gray\";)'" \ + at last "".sw+(0,-10bp__) ljust } move - fuse(,HC,0.5,0.3) ; {"`{\tt (,HC,0.5,0.3)}'" at last line.c+(0,-0.25)} } .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/IC10107.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/IC10107.m4 deleted file mode 100644 index 5203f67376f..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/IC10107.m4 +++ /dev/null @@ -1,48 +0,0 @@ -.PS -# IC10107.m4 - log_init - -right_ - pinlen = 2*NOT_rad - hunit = AND_wd*L_unit*1.6 -B: box invis wid hunit*4 ht hunit*2 - psep = hunit/2 - nrad = B.ht*0.06 - line from B.w+(0,nrad) to B.nw then to B.ne then to B.se then to B.sw \ - then to B.w-(0,nrad) - arc ccw to Here+(0,2*nrad) with .c at B.w - for i = 1 to 8 do { - line down pinlen from B.sw+(psep/2,0)+((i-1)*psep,0) - sprintf("\small\sf%g",i) below - exec sprintf("P%g: last line.start",i) - line up pinlen from B.ne-(psep/2,0)-((i-1)*psep,0) - sprintf("\small\sf%g",8+i) above - exec sprintf("P%g: last line.start",8+i) - } -G1: OR_gen(2,PIBANEONSEC) with .Out at P12.x-pinlen,B.y+B.ht/4 -G2: OR_gen(2,PIBANNEOSEC) with .Out at B.e.x-4*pinlen,B.y - left_ -G3: OR_gen(2,PIBANEONSEC) with .NE at P3.x,B.y-B.ht/4-AND_ht/6*L_unit - - line from G3.N_NSE.w to (P2,G3.N_NSE) then to P2 - line from P3 to G3.NE - line right pinlen from G3.In1 then down 2*pinlen - contline to (P4,Here) then to P4 - line from G3.In2 to (P5,G3.In2) then to P5 - - line from G2.In2 left pinlen then down 2*pinlen - contline to (P9,Here) then to P9 - line from G2.In1 left pinlen*2 then down G2.In1.y-G2.In2.y+3*pinlen - contline to (P7,Here) then to P7 - line from G2.SE right NOT_rad+2*pinlen then up B.n.y-pinlen-G2.SE.y - contline to (P10,Here) then to P10 - line from G2.N_NNE.e right pinlen then up B.n.y-2*pinlen-G2.N_NNE.y - contline to (P11,Here) then to P11 - - line from P12 to (P12,G1.N_NSE) then to G1.N_NSE.e - line from P13 down pinlen - contline to (G1.NE,Here) then to G1.NE - line from G1.In1 to (P14,G1.In1) then to P14 - line from G1.In2 to (P15,G1.In2) then to P15 - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/IntersectingPlanes.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/IntersectingPlanes.m4 deleted file mode 100644 index 3ed9ab3bc34..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/IntersectingPlanes.m4 +++ /dev/null @@ -1,84 +0,0 @@ -.PS -## IntersectingPlanes.m4 -## Projection of an object defined by 4-sided facets -threeD_init -NeedDpicTools - - setview( 10, 45) -# Define the object by its facets: -# size parameters - a = 3/2 - b = 0.4 -# depth - d = -1 -# line ends and intersections - A0: -a,-b - A1: a,-b - B0: Rot_(A0,120) - B1: Rot_(A1,120) - C0: Rot_(A0,240) - C1: Rot_(A1,240) - AB: intersect_(A0,A1,B0,B1) - BC: intersect_(B0,B1,C0,C1) - CA: intersect_(C0,C1,A0,A1) - - "A0" at project(0,A0.x,A0.y) rjust - "A1" at project(0,A1.x,A1.y) ljust - "B0" at project(0,B0.x,B0.y) ljust - "B1" at project(0,B1.x,B1.y) rjust - "C0" at project(0,C0.x,C0.y) ljust - "C1" at project(0,C1.x,C1.y) rjust -# facet location parameters -define(`facet',`$1.x,$1.y, $2.x,$2.y') -array2(ffc,1,facet(A0,CA)) -array2(ffc,2,facet(CA,A0)) -array2(ffc,3,facet(CA,AB)) -array2(ffc,4,facet(AB,CA)) -array2(ffc,5,facet(AB,A1)) -array2(ffc,6,facet(A1,AB)) - -array2(ffc,7,facet(AB,B0)) -array2(ffc,8,facet(B0,AB)) -array2(ffc,9,facet(BC,AB)) -array2(ffc,10,facet(AB,BC)) -array2(ffc,11,facet(B1,BC)) -array2(ffc,12,facet(BC,B1)) - -array2(ffc,13,facet(C0,BC)) -array2(ffc,14,facet(BC,C0)) -array2(ffc,15,facet(BC,CA)) -array2(ffc,16,facet(CA,BC)) -array2(ffc,17,facet(CA,C1)) -array2(ffc,18,facet(C1,CA)) -nfacets = 18 -# facet corners -define(`fSW',`0,ffc[($1,1)],ffc[($1,2)]') -define(`fNW',`d,ffc[($1,1)],ffc[($1,2)]') -define(`fSE',`0,ffc[($1,3)],ffc[($1,4)]') -define(`fNE',`d,ffc[($1,3)],ffc[($1,4)]') -# facet centre and normal -define(`Fcentre',`sprod3D(0.5,sum3D(fSW(i),fNE(i)))') -define(`Fnoarmal',`cross3D(diff3D(fSE($1),fSW($1)),diff3D(fNE($1),fSE($1)))') -# facet drawing routine -define(`drawfacet',` - Loopover_(`X', `X: project(m4xpand(f`'X)(`$1'));', SW,SE,NE,NW) - line from SW to SE then to NE then to NW then to SW shaded ifelse(`$3',, - "white", `rgbstring(`$3',ifelse(`$4',,`$3',`$4'),ifelse(`$5',,`$3',`$5'))') - ifelse(`$2',,,`sprintf("%g",$2) at 1/2 between NW and SE') ') - -# The rest is generic: sort visible facets by -# distance and plot (but with custom colors) - nvis = 0 - smax = 0 - for i=1 to nfacets do { - if dot3D(View3D,Fnoarmal(i)) >= 0 then { - nvis +=1 - s[nvis] = dot3D(View3D,Fcentre(i)) - smax = max(smax,s[nvis]) - ix[nvis] = i - } } - dpquicksort(s,1,nvis,ix) - - for i=1 to nvis do { drawfacet(ix[i],ix[i],sqrt(i/nvis),i/nvis) } - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Koch.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Koch.m4 deleted file mode 100644 index faa46dfff8e..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Koch.m4 +++ /dev/null @@ -1,32 +0,0 @@ -.PS -# Koch snowflake -gen_init - - leng = 4 - X: 3,5 - nsides = 3; rot[1] = 0; rot[2] = -120; rot[3] = -120 - depth=4 - - for i=1 to depth do { - for j=1 to nsides do { tmp[j] = rot[j] } - leng = leng/3 - k = 0 - for j=1 to nsides do { - rot[k+1] = tmp[j] - rot[k+2] = 60 - rot[k+3] = -120 - rot[k+4] = 60 - k += 4 - } - nsides = k - } - - a = 0 - line from X to X - for i=1 to nsides do { - a += rot[i] - X: X+(Rect_(leng,a)) - continue to X - } - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Lettering.m4def b/Master/texmf-dist/doc/latex/circuit-macros/examples/Lettering.m4def new file mode 100644 index 00000000000..bbc9f0e4ec9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Lettering.m4def @@ -0,0 +1,1158 @@ +divert(-1) +% Lettering.defs +% Lettering definitions + +define(`Letter_init', + `# Letter grid parameters + lu = 0.07 + define(`grthick',`0.4') + define(`letterlinethick',`(lu/0.07)*1.2') + define(`ft2',`(linethick/2)pt__') + linethick_(letterlinethick) + + ifelse(m4postprocessor,pstricks, + ` \newgray{gridgray}{0.75} + \newgray{lightgridgray}{0.80} + \newgray{linegray}{0.40}', + m4postprocessor,pgf, + ` \definecolor{gridgray}{rgb}{0.433,0.433,0.433} + \definecolor{lightgridgray}{rgb}{0.8,0.8,0.8} + \definecolor{linegray}{rgb}{0.231,0.231,0.231}', + m4postprocessor,mpost, + ` define(`gridgray',`0.433,0.433,0.433') + define(`lightgridgray',`0.8,0.8,0.8') + define(`linegray',`0.231,0.231,0.231')', +# else + ` define(`gridgray',`0.5 0.5 0.5') + define(`lightgridgray',`0.8 0.8 0.8') + define(`linegray',`0.3 0.3 0.3')') + ifpstricks(`command `"\makeatletter \def\psas@@c{setlinecap 0 0 moveto"' + command `" 0 0.1 L stroke 0 0 moveto } \makeatother"'') +`# Letter_init end' + ') + +# graph coordinate system +define(`gco',`(vscal_(lu,$1,$2))') + +% `Stroke arrow +% stroke(linespec,vert offset,label,<-,linelabel)' +define(`setstroke',`ifmpost( + `setrgb(0,0,0)', + `psset_(linecolor=black,arrows=-)')dnl + linethick_(0.3); arrowwid = 1.6pt__ ; arrowht = 3pt__') + +define(`stroke',`rpoint_(`$1') ; { setstroke + m4lth = linethick + ifelse((`$2'),(),,`if (`$2') != 0 then { move to rvec_(0,`$2') }') + ifelse(`$3',,,`ifelse(index(`$3',"),0,`{$3}',{"`$3'"})') + ifelse(`$5',,,`$5':)line ifelse(`$4',,->,`$4') to rvec_(rp_len,0) dnl + chop 3pt__ chop 0 + linethick_(m4lth) } +') + +# non-normalized line at 90 deg to line argument +define(`perp',`(`$1'.start.y-`$1'.end.y),(`$1'.end.x-`$1'.start.x) ') + +define(`grid', +` lthtmp = linethick; linethick = grthick + ifmpost(`setrgb(gridgray)',`psset_(linecolor=gridgray)') + for i=0 to $1 do { + { line up ($2)*lu from gco(i,0) } } + for j=0 to $2 do { + { line right ($1)*lu from gco(0,j) } } + psset_(`linecolor=black') + linethick = lthtmp ') + +define(`elarrow',`i = ifelse(`$7',,-1,`$7') + for theta = `$1' to `$2' by `$3' do { i = i+1 + V[i]: `$4'+((`$5')*cosd(theta),(`$6')*sind(theta)) } + fitcurve(V,i,->) ') + +define(`charA', +`[Origin: gco(0,0) `#' `charA' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(3,6)+(0,-ft2) to gco(0,0)+(ft2,ft2) + L2: line from gco(3,6)+(0,-ft2) to gco(6,0)+(-ft2,ft2) + L3t: line invis from gco(0,2)+(0,ft2) right lu + L3: line from Intersect_(L1,L3t) to Intersect_(L2,L3t) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu ,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu , lu*0.75,2) + stroke(from L3.start to L3.end chop lu/3,-lu*0.75,3) ') + box invis wid 6*lu ht 6*lu with .sw at Origin]') + +define(`charB', +`[Origin: gco(0,0) `#' `charB' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + mid = 3.3*lu-ft2 + topht = 6*lu-2*ft2-mid + L2: line right_ 5*lu-2*ft2-mid/2 + L5: arc ccw to Here+(0,mid) with .c at Here+(0,mid/2) + L3: line from (L1,Here) to Here + l4l = 4.5*lu-2*ft2-topht/2 + L4: line from L1.start right_ l4l + L7: arc cw to Here+(0,-topht) with .c at Here+(0,-topht/2) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu/3,-lu*0.75,2) + stroke(from L3.start to L3.end chop lu*.75 chop 0,-lu*0.75,3) + move to L4.start+(0,.75*lu) + {"4"}; line right l4l chop 3pt__ chop 0 + arcd(Here-(0,.75*lu+topht/2),.75*lu+topht/2,90,-30) cw -> + "5" below ljust + arcd(L2.end+(0,mid/2),mid/2+0.75*lu,15,-90) cw -> ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charC', +`[Origin: gco(0,0) `#' `charC' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + ifelse(`$1',,,`circle rad 3*lu-ft2 thick 0.3 dashed at gco(3,3)') + arcr(gco(3,3),3*lu-ft2,atan2(2.5,1.5),atan2(-2,2.0)) + ifelse(`$1',,,` + setstroke + "1" at gco(3,6) above rjust + arcd(gco(3,3),3.75*lu,105,atan2(-2,2.1)*rtod_) -> + "2" at gco(3,6) above ljust + arcd(gco(3,3),3.75*lu,75,atan2(2.5,1.5)*rtod_) cw -> ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charD', +`[Origin: gco(0,0) `#' `charD' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + lr = 3*lu-ft2 + L2: line right 5*lu-ft2-lr + arcd(Here+(0,lr),lr,-90,90) + line to L1.start + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu/3 chop lu/8,-lu*0.75,2) + move to L1.start+(0,.75*lu) + {"3"}; line right 5*lu-ft2-lr chop 3pt__ chop 0 + arcd(Here-(0,.75*lu+lr),.75*lu+lr,90,-90) cw -> ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charE', +`[Origin: gco(0,0) `#' `charE' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + L2: line right 5*lu-2*ft2 + L3: line from L1.start right 4.5*lu-2*ft2 + L4: line from gco(0,3.2)+(ft2,0) right 3*lu-2*ft2 + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu/2 chop lu/3,-lu*0.75,2) + stroke(from L3.start to L3.end chop lu*.75 chop lu/3,-lu*0.75,3) + stroke(from L4.start to L4.end chop lu*.75 chop lu/3,-lu*0.75,4) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charF', +`[Origin: gco(0,0) `#' `charF' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + L2: line from L1.start right 5*lu-2*ft2 + L3: line from gco(0,3.2)+(ft2,0) right 3*lu-2*ft2 + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu*.75 chop lu/3,-lu*0.75,2) + stroke(from L3.start to L3.end chop lu*.75 chop lu/3,-lu*0.75,3) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charG', +`[Origin: gco(0,0) `#' `charG' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + ifelse(`$1',,,`circle rad 3*lu-ft2 thick 0.3 dashed at gco(3,3)') + L3: line from gco(3,3) to gco(5,3) then to gco(5,1) + arcr(gco(3,3),3*lu-ft2,atan2(2.5,1.5),atan2(-2,2.0)) + ifelse(`$1',,,` + setstroke + "1" at gco(3,6) above rjust + arcd(gco(3,3),3.75*lu,105,atan2(-2,2.1)*rtod_) -> + "2" at gco(3,6) above ljust + arcd(gco(3,3),3.75*lu,75,atan2(2.5,1.5)*rtod_) cw -> + line from L3.start+(0,-.75*lu) right 1.2*lu chop .5*lu chop 0 + { "3" at last line.start rjust } + arrow down 1.2*lu ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charH', +`[Origin: gco(0,0) `#' `charH' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + L2: line from gco(5,6)+(0,-ft2) to gco(5,0)+(0,ft2) + L3: line from gco(0,3.2)+(ft2,0) to gco(5,3.2) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu/3, lu*0.75,2) + stroke(from L3.start to L3.end chop lu*.75 chop lu/3,-lu*0.75,3) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charI', +`[Origin: gco(0,0) `#' `charI' + ifelse(`$1',,,`grid(1,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3, lu*0.75,1) ') + box invis wid 2*ft2 ht 6*lu with .sw at Origin]') + +define(`charJ', +`[Origin: gco(0,0) `#' `charJ' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + v = (sqrt(2)-1)*4/3 + al = 2.5*lu-ft2 + bl = 2.0*lu-ft2/2 + CL: gco(2.5,4.0)+(0,-bl) + E: ellipse ht 2*bl wid 2*al thick 0.3 ifelse(`$1',,invis,dashed) at CL + L1: line from (E.e,gco(0,6)+(ft2,-ft2)) to E.e + spline v to (E.e,E.s) then to (E.w,E.s) then to E.w + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3, lu*0.75,1) + "2" at gco(-.5,1.5) + spline v -> from gco(-0.4,0.75) to gco(-0.2,-0.65) then to gco(5.65,-0.65) \ + then to gco(5.65,2) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charK', +`[Origin: gco(0,0) `#' `charK' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + L3t:line ifelse(`$1',,invis,dashed) thick 0.3 from L1.start \ + to gco(5,0)+(-ft2,ft2) + L2: line from gco(4.5,6)+(0,-ft2) to gco(0,2)+(ft2,0) + L3: line from Intersect_(L3t,L2) to L3t.end + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu*4/3 chop lu,-lu*0.75,2) + stroke(from L3.start to L3.end chop lu*.75 chop lu/3, lu*0.75,3) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charL', +`[Origin: gco(0,0) `#' `charL' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + L2: line to gco(5,0)+(-ft2,ft2) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu/3,-lu*0.75,2) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charM', +`[Origin: gco(0,0) `#' `charM' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + L2: line from gco(6,6)+(-ft2,-ft2) to gco(6,0)+(-ft2,ft2) + L3: line from L1.start to gco(3,0)+(0,ft2) + L4: line from L2.start to gco(3,0)+(0,ft2) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu/3, lu*0.75,2) + stroke(from L3.start to L3.end chop lu*.75 chop lu*2, lu*0.75,3) + stroke(from L4.start to L4.end chop lu*.75 chop lu*2,-lu*0.75,4) ') + box invis wid 6*lu ht 6*lu with .sw at Origin]') + +define(`charN', +`[Origin: gco(0,0) `#' `charN' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + L2: line from gco(5,6)+(0,-ft2) to gco(5,0)+(0,ft2) + L3: line from L1.start to L2.end + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu/3, lu*0.75,2) + stroke(from L3.start to L3.end chop lu*1.0 chop lu*1.5, lu*0.75,3) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charO', +`[Origin: gco(0,0) `#' `charO' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + circle rad 3*lu-ft2 at gco(3,3) + ifelse(`$1',,,` + setstroke + "1" at gco(3,6) above rjust + arcd(gco(3,3),3.75*lu,105,atan2(-2,2.1)*rtod_) -> + "2" at gco(3,6) above ljust + arcd(gco(3,3),3.75*lu,75,atan2(-2,2.1)*rtod_+5) cw -> ') + box invis wid 6*lu ht 6*lu with .sw at Origin]') + +define(`charP', +`[Origin: gco(0,0) `#' `charP' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + L2: line from gco(0,3)+(ft2,0) right 5*lu-ft2-(3*lu-ft2)/2 + L3: line from L1.start right 5*lu-ft2-(3*lu-ft2)/2 + arcd(Here+(0,-(3*lu-ft2)/2),(3*lu-ft2)/2,-90,90) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu*.75 chop lu/3,-lu*0.75,2) + "3" at gco(0,6)+(0,lu*.75) + line to (L3.end,Here) chop lu/2 chop 0 + arcd(Here+(0,-4.5*lu/2),4.5*lu/2,90,-90) cw -> ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charQ', +`[Origin: gco(0,0) `#' `charQ' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + circle rad 3*lu-ft2 at gco(3,3) + rpoint_(from gco(3,3) to gco(5,0)) + ifelse(`$1',,,`{line dashed dashwid*0.8 thick 0.3 to rvec_(2*lu-ft2,0)}') + L3: line from rvec_(2*lu-ft2,0) to rvec_(4*lu-ft2,0) + ifelse(`$1',,,` + setstroke + "1" at gco(3,6) above rjust + arcd(gco(3,3),3.75*lu,105,atan2(-2,2.1)*rtod_) -> + "2" at gco(3,6) above ljust + arcd(gco(3,3),3.75*lu,75,atan2(-2,2.1)*rtod_+5) cw -> + stroke(from L3.start to L3.end chop -lu/3 chop lu/3,-lu*0.75,3) ') + box invis wid 6*lu ht 6*lu with .sw at Origin]') + +define(`charR', +`[Origin: gco(0,0) `#' `charR' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + L2: line from gco(0,3)+(ft2,0) right 5*lu-ft2-(3*lu-ft2)/2 + Lt4: line thick 0.3 ifelse(`$1',,invis,dashed) from gco(1,6)+(-ft2,-ft2) \ + to gco(5,0)+(-ft2,ft2) + L4: line from Intersect_(Lt4,L2) to Lt4.end + L3: line from L1.start right 5*lu-ft2-(3*lu-ft2)/2 + arcd(Here+(0,-(3*lu-ft2)/2),(3*lu-ft2)/2,-90,90) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu*.75 chop lu,-lu*0.75,2) + stroke(from L4.start to L4.end chop lu chop lu*.5,-lu*0.75,4) + "3" at gco(0,6)+(0,lu*.75) + line to (L3.end,Here) chop lu/2 chop 0 + arcd(Here+(0,-4.5*lu/2),4.5*lu/2,90,-80) cw -> ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charS', +`[Origin: gco(0,0) `#' `charS' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + ah = 2.0*lu-ft2 + bh = 1.4*lu-ft2/2 + CH: gco(2.5,3.2)+(0,bh) + ifelse(`$1',,,`ellipse ht 2*bh wid 2*ah thick 0.3 dashed at CH') + al = 2.5*lu-ft2 + bl = 1.6*lu-ft2/2 + CL: gco(2.5,3.2)+(0,-bl) + ifelse(`$1',,,`ellipse ht 2*bl wid 2*al thick 0.3 dashed at CL') + i = 0 + V[i]: CH+(ah*cosd(20),bh*sind(20)) + for theta = 30 to 270 by 22.5 do { i = i+1 + V[i]: CH+(ah*cosd(theta),bh*sind(theta)) } + for theta = 90-22.5 to -135 by -22.5 do { i = i+1 + V[i]: CL+(al*cosd(theta),bl*sind(theta)) } + i = i+1 + V[i]: gco(0,1)+(ft2,0) + fitcurve(V,i) + ifelse(`$1',,,` + setstroke + "1" at gco(1,5.5) above rjust + elarrow(120,40,-20,CH,2.75*lu,2.15*lu) + "2" at gco(2.0,4.5) above + i = -1 + for theta = 150 to 270 by 30 do { i = i+1 + V[i]: CH+(1.25*cosd(theta),0.65*sind(theta))*lu } + elarrow(60,-80,-20,CL,3.25*lu,2.35*lu,i) + "3" at gco(0,0) above rjust + elarrow(225,270,15,CL,3.25*lu,2.35*lu) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charT', +`[Origin: gco(0,0) `#' `charT' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(6,6)+(-ft2,-ft2) + L2: line from gco(3,6)+(0,-ft2) to gco(3,0)+(0,ft2) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3, lu*0.75,1) + stroke(from L2.start to L2.end chop lu*2/3 chop lu/3,-lu*0.75,2) ') + box invis wid 6*lu ht 6*lu with .sw at Origin]') + +define(`charU', +`[Origin: gco(0,0) `#' `charU' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + v = (sqrt(2)-1)*4/3 + al = 2.5*lu-ft2 + bl = 2.0*lu-ft2/2 + CL: gco(2.5,4.0)+(0,-bl) + E: ellipse ht 2*bl wid 2*al thick 0.3 ifelse(`$1',,invis,dashed) at CL + L1: line from (E.w,gco(0,6)+(ft2,-ft2)) to E.w + L2: line from (E.e,L1.start) to E.e + spline v to (E.e,E.s) then to (E.w,E.s) then to E.w + ifelse(`$1',,,` + stroke(from L2.start to L2.end chop lu/3, lu*0.75,2) + stroke(from L1.start to L1.end chop lu/3,-lu*0.75,1) + "3" at gco(-.5,1.5) + spline v -> from gco(-0.4,0.75) to gco(-0.2,-0.65) then to gco(5.65,-0.65) \ + then to gco(5.65,2) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charV', +`[Origin: gco(0,0) `#' `charV' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(3,0)+(0,ft2) + L2: line to gco(6,6)+(-ft2,-ft2) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu,-lu*0.75,1) + stroke(from L2.end to L2.start chop lu, lu*0.75,2) ') + box invis wid 6*lu ht 6*lu with .sw at Origin]') + +define(`charW', +`[Origin: gco(0,0) `#' `charW' + ifelse(`$1',,,`grid(8,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(2,0)+(0,ft2) + L2: line from gco(4,6)+(0,-ft2) to L1.end + L3: line from L2.start to gco(6,0)+(0,ft2) + L4: line from gco(8,6)+(-ft2,-ft2) to L3.end + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu*1.5 chop lu*.5,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu*.75 chop lu*1.5,-lu*0.75,2) + stroke(from L3.start to L3.end chop lu*2 chop lu*.5,-lu*0.75,3) + stroke(from L4.start to L4.end chop lu*.75 chop lu*1.5,-lu*0.75,4) ') + box invis wid 8*lu ht 6*lu with .sw at Origin]') + +define(`charX', +`[Origin: gco(0,0) `#' `charX' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0.5,6)+(ft2,-ft2) to gco(6,0)+(-ft2,ft2) + L2: line from gco(5.5,6)+(-ft2,-ft2) to gco(0,0)+(ft2,ft2) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu, lu*0.75,1) + stroke(from L2.start to L2.end chop lu,-lu*0.75,2) ') + box invis wid 6*lu ht 6*lu with .sw at Origin]') + +define(`charY', +`[Origin: gco(0,0) `#' `charY' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(3,3)+(0,ft2) + L2: line from gco(6,6)+(-ft2,-ft2) to L1.end + L3: line to gco(3,0)+(0,ft2) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu, lu*0.75,1) + stroke(from L2.start to L2.end chop lu,-lu*0.75,2) + stroke(from L3.start to L3.end chop lu/3,-lu*0.75,3) ') + box invis wid 6*lu ht 6*lu with .sw at Origin]') + +define(`charZ', +`[Origin: gco(0,0) `#' `charZ' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0.5,6)+(ft2,-ft2) to gco(5,6)+(-ft2,-ft2) + L2: line to gco(0,0)+(ft2,ft2) + L3: line to gco(5,0)+(-ft2,ft2) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3, lu*0.75,1) + stroke(from L2.start to L2.end chop 1.5*lu chop lu,-lu*0.75,2) + stroke(from L3.start to L3.end chop lu/3,-lu*0.75,3) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`char1', +`[Origin: gco(0,0) `#' `char1' + ifelse(`$1',,,`grid(1,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3, lu*0.75,1) ') + box invis wid 2*ft2 ht 6*lu with .sw at Origin]') + +define(`char2', +`[Origin: gco(0,0) `#' `char2' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + ah = 2.0*lu-ft2 + bh = 1.4*lu-ft2/2 + CH: gco(2.5,3.2)+(0,bh) + ifelse(`$1',,,`ellipse ht 2*bh wid 2*ah thick 0.3 dashed at CH') + al = 2.5*lu-ft2 + bl = 1.6*lu-ft2/2 + CL: gco(2.5,3.2)+(0,-bl) + ifelse(`$1',,,`ellipse ht 2*bl wid 2*al thick 0.3 dashed at CL') + i = 0 + V[i]: CH+(ah*cosd(160),bh*sind(160)) + for theta = 150 to -90+22.5 by -22.5 do { i = i+1 + V[i]: CH+(ah*cosd(theta),bh*sind(theta)) } + fitcurve(V,i) + v = (sqrt(2)-1)*4/3 + spline v from V[i] to gco(2.8,3.0) then \ + to gco(1.5,2.6) then to gco(0,1.2)+(ft2,0) then to gco(0,0)+(ft2,ft2) + psset_(`arrows=c-c') dnl + L2: line to gco(5,0)+(-ft2,ft2) + ifelse(`$1',,,` + setstroke + "1" at gco(1,5.5) above rjust + i = -1 + for theta = 120 to -60 by -20 do { i = i+1 + V[i]: CH+(2.75*cosd(theta),2.15*sind(theta))*lu } + i=i+1; V[i]: gco(2.6,2.1) + i=i+1; V[i]: gco(1.3,1.6) + i=i+1; V[i]: gco(0.95,0.5) + v = (sqrt(2)-1)*4/3 + spline v -> from V[0] to V[1] + for n = 2 to i do { continue to V[n] } + stroke(from L2.start to L2.end chop lu/3,-lu*0.75,2) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`char3', +`[Origin: gco(0,0) `#' `char3' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + ah = 2.0*lu-ft2 + bh = 1.4*lu-ft2/2 + CH: gco(2.5,3.2)+(0,bh) + H: ellipse ht 2*bh wid 2*ah thick 0.3 ifelse(`$1',,invis,dashed) at CH + al = 2.5*lu-ft2 + bl = 1.6*lu-ft2/2 + CL: gco(2.5,3.2)+(0,-bl) + L: ellipse ht 2*bl wid 2*al thick 0.3 ifelse(`$1',,invis,dashed) at CL + i = 0 + V[i]: CH+(ah*cosd(160),bh*sind(160)) + for theta = 150 to -90 by -20 do { i = i+1 + V[i]: CH+(ah*cosd(theta),bh*sind(theta)) } + fitcurve(V,i) + line from H.s to (gco(2,3)+(ft2,0),H.s) + i = -1 + for theta = 90 to -135 by -22.5 do { i = i+1 + V[i]: CL+(al*cosd(theta),bl*sind(theta)) } + i = i+1 + V[i]: gco(0,1)+(ft2,0) + fitcurve(V,i) + ifelse(`$1',,,` + setstroke + "1" at gco(1,5.5) above rjust + elarrow(120,-20,-20,CH,2.75*lu,2.15*lu) + "2" at gco(4.6,3.5) + elarrow(40,-80,-10,CL,3.25*lu,2.35*lu) + "3" at gco(0,0) above rjust + i = 0 + V[i]: CL+(3.25*cosd(220),2.35*sind(220))*lu + elarrow(240,270,15,CL,3.25*lu,2.35*lu,0) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`char4', +`[Origin: gco(0,0) `#' `char4' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(4,6)+(-ft2,-ft2) to gco(4,0)+(-ft2,ft2) + L2: line from L1.start to gco(0,1.5)+(ft2,-ft2) + L3: line to (gco(5,1.5)+(-ft2,0),Here) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3 chop 0, lu*.75,1) + stroke(from L2.start to L2.end chop lu chop lu/3,-lu*.75,2) + stroke(from L3.start to L3.end chop lu/3 chop lu/2,-lu*.75,3) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`char5', +`[Origin: gco(0,0) `#' `char5' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(.5,6)+(0,-ft2) to gco(.5,3) + L4: line from L1.start to gco(4.5,6)+(-ft2,-ft2) + al = 2.5*lu-ft2 + bl = 2.0*lu-ft2/2 + CL: gco(2.5,4.0)+(0,-bl) + i = 0 + V[i]: L1.end + for theta = 125 to -135 by -25 do { i = i+1 + V[i]: CL+(al*cosd(theta),bl*sind(theta)) } + i = i+1 + V[i]: gco(0,1)+(ft2,0) + fitcurve(V,i) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3 chop 0,-lu*.75,1) + stroke(from L4.start to L4.end chop lu/3 chop 0, lu*.75,4) + v = (sqrt(2)-1)*4/3 + "2" at gco(1.0,4.0) above + elarrow(110,-80,-10,CL,al+lu*.75,bl+lu*.75) + "3" at gco(0,0) above rjust + i = 0 + V[i]: CL+((al+0.75*lu)*cosd(220),(bl+.75*lu)*sind(220)) + elarrow(240,270,15,CL,al+lu*.75,bl+lu*.75,0) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`char6', +`[Origin: gco(0,0) `#' `char6' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + ab = 2.5*lu-ft2 + bb = 3.0*lu-ft2 + Cb: gco(2.5,3.0) + ifelse(`$1',,,`ellipse ht 2*bb wid 2*ab thick 0.3 dashed at Cb') + i = -1 + for theta = -315 to 180-22.5 by 22.5 do { i = i+1 + if (theta<=-90) then {X:Cb; x=ab; y=bb } \ + else {X: gco(2.5,2); x=ab; y=2*lu-ft2 } + V[i]: X+(x*cosd(theta),y*sind(theta)) } + fitcurve(V,i) + v = (sqrt(2)-1)*4/3 + ifelse(`$1',,,` + setstroke + "1" at gco(2,6) above + x = ab+lu*.75; y = bb+lu*.75 + elarrow(90+22.5,270+22.5,22.5,Cb,x,y) + "3" at gco(3,6) above + elarrow(70,45,-12.5,Cb,x,y) + "2" at gco(1.2,3.8) above + elarrow(100,-50,-10,gco(2.5,2),ab+lu*.65,2*lu+lu*.65) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`char7', +`[Origin: gco(0,0) `#' `char7' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(5,6)+(-ft2,-ft2) + { L1t: line invis to gco(1.3,0) + L2t: line invis up lu from gco(2,0)+(-ft2,0) } + psset_(`arrows=-') dnl + arcto(Intersect_(L1t,L2t),L2t.start,2.5*lu) + line to (Here,gco(2,0)) + ifelse(`$1',,,` + stroke(from L1.start to L1.end chop lu/3, lu*0.75,1) + stroke(from L1t.start to 4th last line.end chop lu/3 chop 0, + lu*.75,2,thick 0.3,L1) + L2: line <- up arrowht from gco(2.75,0)+(-ft2,ft2) + move to L1.end + arcto(Intersect_(L1,L2),L2.start,(2.5-0.75)*lu,thick 0.3) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`char8', +`[Origin: gco(0,0) `#' `char8' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + ah = 2.0*lu + bh = 1.4*lu + CH: gco(2.5,6)+(0,-bh) + H: ellipse ht 2*bh wid 2*ah at CH + al = 2.5*lu + bl = 1.6*lu+ft2/2 + CL: gco(2.5,3.2)+(0,ft2)+(0,-bl) + L: ellipse ht 2*bl wid 2*al at CL + ifelse(`$1',,,` + setstroke + x = ah+lu*.75; y = bh+lu*.75 + "1" at gco(2,6) above + elarrow(110,205,15,CH,x,y) + "2" at gco(3,6) above + elarrow(70,-25,-15,CH,x,y) + x = al+lu*.75; y = bl+lu*.75 + "3" at gco(0.2,2.6) above + elarrow(150,260,10,CL,x,y) + "4" at gco(4.8,2.6) above + elarrow(30,-80,-10,CL,x,y) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`char9', +`[Origin: gco(0,0) `#' `char9' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + ab = 2.5*lu-ft2 + bb = 3.0*lu-ft2 + Cb: gco(2.5,3.0) + ifelse(`$1',,,`ellipse ht 2*bb wid 2*ab thick 0.3 dashed at Cb') + i = -1 + for theta = -135 to 360-22.5 by 22.5 do { i = i+1 + if (theta<=90) then {X:Cb; x=ab; y=bb } \ + else {X: gco(2.5,4); x=ab; y=2*lu-ft2 } + V[i]: X+(x*cosd(theta),y*sind(theta)) } + fitcurve(V,i) + ifelse(`$1',,,` + setstroke + "1" at gco(2,6) above + elarrow(90+22.5,270+22.5,22.5,X,3.15*lu-ft2,2.65*lu-ft2) + "2" at gco(3,6) above + elarrow(80,-80,-10,Cb,ab+lu*.65,bb+lu*.65) + "3" at gco(0,1) + elarrow(225,270,15,Cb,3.15*lu,3.65*lu) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`char0', +`[Origin: gco(0,0) `#' `char0' + ifelse(`$1',,,`grid(6,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + ab = 2.5*lu-ft2 + bb = 3.0*lu-ft2 + Cb: gco(2.5,3.0) + ellipse ht 2*bb wid 2*ab at Cb + ifelse(`$1',,,` + setstroke + "1" at gco(2,6) above + elarrow(90+22.5,270,22.5,Cb,.65*lu+ab,.65*lu+bb) + "2" at gco(3,6) above + elarrow(70,-80,-10,Cb,ab+lu*.65,bb+lu*.65) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charAnd', +`[Origin: gco(0,0) `#' `fAnd' + ifelse(`$1',,,`grid(5,6)') + psset_(`arrows=c-c,linecolor=linegray') dnl + v = (sqrt(2)-1)*4/3 + spline v from gco(5,0)+(-ft2,ft2) \ + to gco(4.605,0.312) to gco(1.443,4.038) \ + to gco(1.335,4.198) to gco(1.134,4.597) to gco(1.103,4.938) \ + to gco(1.143,5.252) to gco(1.358,5.605) to gco(1.702,5.797) \ + to gco(2.236,5.857) to gco(2.637,5.772) to gco(2.981,5.499) \ + to gco(3.157,5.132) to gco(3.087,4.565) to gco(2.746,4.189) \ + to gco(2.415,3.895) to gco(2.009,3.621) to gco(1.522,3.339) \ + to gco(1.157,3.095) to gco(0.671,2.769) to gco(0.435,2.520) \ + to gco(0.227,2.215) to gco(0.101,1.636) to gco(0.234,1.165) \ + to gco(0.373,0.926) to gco(0.512,0.738) to gco(0.918,0.443) \ + to gco(1.190,0.340) to gco(1.427,0.274) to gco(2.140,0.166) \ + to gco(2.617,0.164) to gco(3.031,0.216) to gco(3.616,0.395) \ + to gco(4.017,0.600) to gco(4.121,0.676) to gco(4.482,1.017) \ + to gco(4.637,1.302) to gco(4.753,1.532) to gco(4.863,1.875) + ifelse(`$1',,,` + setstroke + "1" at gco(1.4,6) above + spline -> from gco(1.0,6.2) to gco(.35,5.5) then to gco(.35,4) \ + then to gco(4.0,0) + "2" at gco(2.6,6) above + spline -> from gco(3.0,6.2) to gco(3.75,5.5) then to gco(3.75,3.9) \ + then to gco(1,2.4) then to gco(1,1.1) then to gco(2,.9) + "3" at gco(4.2,2.4) + spline -> from gco(4.1,1.8) to gco(3.8,1.3) then to gco(3,.9) \ + then to gco(2.2,.9) ') + box invis wid 5*lu ht 6*lu with .sw at Origin]') + +define(`charComma', +` circle fill_(0) rad ft2 at Here+(0,-3*lu+ft2) + move to last circle.c + arc cw from Here+(0,ft2) to Here+(0,-4*ft2) \ + with .c at Here+(-ft2,-1.5*ft2) + move to last circle+(ft2,-ft2+3*lu)') + +define(`charPeriod', +` circle fill_(0) rad ft2 at Here+(0,-3*lu+ft2) + move to last circle+(ft2,-ft2+3*lu)') + +define(`chara', +`[Origin: gco(0,0) `#' `chara' + psset_(`arrows=c-c,linecolor=linegray') dnl + circle rad 2*lu-ft2 with .c at gco(2,2) + L3: line from gco(4,4)+(-ft2,-ft2) to gco(4,0)+(-ft2,ft2) + ifelse(`$1',,,` + setstroke + "1" at gco(1.5,3.0) + arcd(gco(2,2),1.2*lu,130,265) -> + "2" at gco(2.5,3.0) + arcd(gco(2,2),1.2*lu,50,-85) -> cw + stroke(from L3.start to L3.end chop lu/3 chop 0,lu*0.5,3) ') + box invis wid 4*lu ht 4*lu with .sw at Origin]') + +define(`charb', +`[Origin: gco(0,0) `#' `charb' + psset_(`arrows=c-c,linecolor=linegray') dnl + circle rad 2*lu-ft2 with .c at gco(2,2) + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu/3 chop 0,lu*0.5,1) + "2" at gco(1.5,3.0) + arcd(gco(2,2),1.2*lu,130,265) -> + "3" at gco(2.5,3.0) + arcd(gco(2,2),1.2*lu,50,-85) -> cw ') + box invis wid 4*lu ht 6*lu with .sw at Origin]') + +define(`charc', +`[Origin: gco(0,0) `#' `charc' + ifelse(`$1',,, + `circle outlined "linegray" rad 2*lu-ft2 thick 0.3 dashed lu/2 at gco(2,2)') + psset_(`linecolor=linegray') dnl + arcr(gco(2,2),2*lu-ft2,atan2(1.7,1),atan2(-1,1.6)) + ifelse(`$1',,,` + setstroke + "1" at gco(1.5,3.0) + arcd(gco(2,2),1.2*lu,130,-45) -> + "2" at gco(2.5,3.0) + arcd(gco(2,2),1.2*lu,50,20) -> cw ht 0.75 * arrowht ') + box invis wid 4*lu ht 4*lu with .sw at Origin]') + +define(`chard', +`[Origin: gco(0,0) `#' `chard' + psset_(`arrows=c-c,linecolor=linegray') dnl + circle rad 2*lu-ft2 with .c at gco(2,2) + L3: line from gco(4,6)+(-ft2,-ft2) to gco(4,0)+(-ft2,ft2) + ifelse(`$1',,,` + setstroke + "1" at gco(1.5,3.0) + arcd(gco(2,2),1.2*lu,130,265) -> + "2" at gco(2.5,3.0) + arcd(gco(2,2),1.2*lu,50,-85) -> cw + stroke(from L3.start to L3.end chop lu/3 chop 0,lu*0.5,3) ') + box invis wid 4*lu ht 6*lu with .sw at Origin]') + +define(`chare', +`[Origin: gco(0,0) `#' `chare' + ifelse(`$1',,, + `circle outlined "linegray" rad 2*lu-ft2 thick 0.3 dashed lu/2 at gco(2,2)') + psset_(`linecolor=linegray') dnl + arcr(gco(2,2),2*lu-ft2,atan2(0.2,2),atan2(-1,1.6)) + L3: line from last arc.start to (gco(0.2,0).x, last arc.start.y) + ifelse(`$1',,,` + setstroke + "1" at gco(1.5,3.0) + arcd(gco(2,2),1.2*lu,130,-45) -> + "2" at gco(2.5,3.0) + arcd(gco(2,2),1.2*lu,50,20) -> cw ht 0.75 * arrowht ') + stroke(from L3.end to L3.start chop lu*1.5 chop lu/3,-lu*0.5,3) + box invis wid 4*lu ht 4*lu with .sw at Origin]') + +define(`charf', +`[Origin: gco(0,0) `#' `charf' + psset_(`arrows=c-c,linecolor=linegray') dnl + L3: line from gco(0,4)+(ft2,0) to gco(2,4)+(-ft2,0) + L1: line from gco(1,0)+(0,ft2) to gco(1,4.8) + psset_(`linecolor=linegray') dnl + arc cw to gco(3,5.5)+(0,0) with .c at gco(2.12,4.8) + ifelse(`$1',,,` + setstroke + stroke(from L1.end to L1.start chop -lu/5 chop lu/3,-lu*0.75,1) + "2" at gco(1.5,4.6) + arcd(gco(2.12,4.8),0.6*lu,140,40) -> cw ht 0.75 * arrowht + stroke(from L3.start to L3.end chop lu*.5 chop 0,-lu*0.75,3) ') + box invis wid 3*lu ht 6*lu with .sw at Origin]') + +define(`charg', +`[Origin: gco(0,0) `#' `charg' + ifelse(`$1',,, + `circle outlined "linegray" rad 2*lu-ft2 thick 0.3 dashed lu/2 at gco(2,0) ') + psset_(`arrows=c-c,linecolor=linegray') dnl + circle rad 2*lu-ft2 with .c at gco(2,2) + L3: line from gco(4,4)+(-ft2,-ft2) to gco(4,0)+(-ft2,0) + psset_(`linecolor=linegray') dnl + arcr(gco(2,0),2*lu-ft2,0,atan2(-1,-1.5)) cw + ifelse(`$1',,,` + setstroke + "1" at gco(1.5,3.0) + arcd(gco(2,2),1.2*lu,130,265) -> + "2" at gco(2.5,3.0) + arcd(gco(2,2),1.2*lu,50,-85) -> cw + "4" at gco(0.7,-0.6) + arcd(gco(2,0),1.2*lu,-135,-45) -> ht 0.75 * arrowht + stroke(from L3.start to L3.end chop lu*0 chop 0,lu*0.5,3) ') + box invis wid 4*lu ht 6*lu with .sw at gco(0,-2)]') + +define(`charh', +`[Origin: gco(0,0) `#' `charh' + ifelse(`$1',,, + `circle outlined "linegray" rad 2*lu-ft2 thick 0.3 dashed lu/2 at gco(2,2) ') + psset_(`linecolor=linegray') dnl + arcd(gco(2,2),2*lu-ft2,180,0) cw + psset_(`arrows=c-c,linecolor=linegray') dnl + line to gco(4,0)+(-ft2,ft2) + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu/3 chop 0,lu*0.5,1) + "2" at gco(1.0,2.4) + arcd(gco(2,2),1.2*lu,130,0) cw + stroke(to (Here,gco(0,0)) chop -3pt__ chop lu/4) ') + box invis wid 4*lu ht 6*lu with .sw at Origin]') + +define(`chari', +`[Origin: gco(0,0) `#' `chari' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,0)+(ft2,ft2) to gco(0,4)+(ft2,-ft2) + L2: line from gco(0,6)+(ft2,-ft2) to gco(0,5.5)+(ft2,0) + ifelse(`$1',,,` + setstroke + stroke(from L2.start to L2.end+(0,-lu*.2) chop -lu*.7 chop 0,-lu*0.5,) + "2" at last line.c+(0.1*lu,-0.2*lu) rjust + stroke(from L1.end to L1.start chop lu/3 chop 0,-lu*0.5,1) ') + box invis wid ft2*2 ht 6*lu with .sw at Origin]') + +define(`charj', +`[Origin: gco(0,0) `#' `charj' + psset_(`arrows=c-c,linecolor=linegray') dnl + L2: line from gco(2,6)+(0,-ft2) to gco(2,5.5) + L1: line from gco(2,4)+(0,-ft2) to gco(2,-0.8) + psset_(`linecolor=linegray') dnl + arc cw to gco(0,-1.5) with .c at gco(0.88,-0.8) + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu/3 chop 0,-lu*0.5,1,solid) + arcd(gco(0.88,-0.8),.62*lu,0,-135) cw -> ht 0.75*arrowht + stroke(from L2.start to L2.end+(0,-lu*.2) chop -lu*.7 chop 0,-lu*0.5,) + "2" at last line.c+(0.1*lu,-0.2*lu) rjust ') + box invis wid 2*lu ht 6*lu with .sw at Origin+(0,-2*lu)]') + +define(`chark', +`[Origin: gco(0,0) `#' `chark' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + L2: line from gco(3.4,4)+(0,-ft2) to gco(0,1.6)+(ft2,ft2) + L3t:line ifelse(`$1',,invis,dashed lu/2) thick 0.3 from gco(0,4)+(ft2,0) \ + to gco(4,0)+(-ft2,ft2) + L3: line from Intersect_(L2,L3t) to L3t.end + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu/3 chop 0,-lu*0.5,1) + stroke(from L2.start to L2.end chop lu/2 ,-lu*0.6,2) + stroke(from L3.start to L3.end chop lu/2 ,-lu*0.6,3) ') + box invis wid 4*lu ht 6*lu with .sw at Origin]') + +define(`charl', +`[Origin: gco(0,0) `#' `charl' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,6)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu/3 chop 0,-lu*0.5,1) ') + box invis wid 2*ft2 ht 6*lu with .sw at Origin]') + +define(`charm', +`[Origin: gco(0,0) `#' `charm' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,4)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + ifelse(`$1',,, + `circle outlined "linegray" rad 1.5*lu-ft2/2 thick 0.3 dashed lu/2 \ + at gco(1.5,2.5)+(ft2/2,0) + circle outlined "linegray" rad 1.5*lu-ft2/2 thick 0.3 dashed lu/2 \ + at gco(4.5,2.5)+(-ft2/2,0) ') + psset_(`linecolor=linegray') dnl + arcd(gco(1.5,2.5)+(ft2/2,0),1.5*lu-ft2/2,180,0) cw + arcd(gco(4.5,2.5)+(-ft2/2,0),1.5*lu-ft2/2,180,0) cw + psset_(`arrows=c-c,linecolor=linegray') dnl + line from gco(3,2.5) to gco(3,0)+(0,ft2) + line from gco(6,2.5)+(-ft2,0) to gco(6,0)+(-ft2,ft2) + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu/3 chop 0,-lu*0.5,1) + "2" at gco(0.9,2.2) + arcd(gco(1.5,2.5)+(ft2/2,0),0.75*lu-ft2/2,160,0) cw + stroke(to (Here,gco(0,0)) chop -3pt__ chop lu/3) + "3" at gco(3.9,2.2) + arcd(gco(4.5,2.5)+(-ft2/2,0),0.75*lu-ft2/2,160,0) cw + stroke(to (Here,gco(0,0)) chop -3pt__ chop lu/3) ') + box invis wid 6*lu ht 4*lu with .sw at Origin]') + +define(`charn', +`[Origin: gco(0,0) `#' `charn' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,4)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + ifelse(`$1',,, + `circle outlined "linegray" rad 2*lu-ft2 thick 0.3 dashed lu/2 at gco(2,2) ') + psset_(`linecolor=linegray') dnl + arcd(gco(2,2),2*lu-ft2,180,0) cw + psset_(`arrows=c-c,linecolor=linegray') dnl + line from gco(4,2)+(-ft2,0) to gco(4,0)+(-ft2,ft2) + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu/3 chop 0,-lu*0.5,1) + "2" at gco(0.9,2.0) + arcd(gco(2,2),1.25*lu,150,0) cw + stroke(to (Here,gco(0,0)) chop -3pt__ chop lu/3) ') + box invis wid 4*lu ht 4*lu with .sw at Origin]') + +define(`charo', +`[Origin: gco(0,0) `#' `charo' + psset_(`arrows=c-c,linecolor=linegray') dnl + circle rad 2*lu-ft2 with .c at gco(2,2) + ifelse(`$1',,,` + setstroke + "1" at gco(1.5,3.0) + arcd(gco(2,2),1.2*lu,130,265) -> + "2" at gco(2.5,3.0) + arcd(gco(2,2),1.2*lu,50,-85) -> cw ') + box invis wid 4*lu ht 4*lu with .sw at Origin]') + +define(`charp', +`[Origin: gco(0,0) `#' `charp' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,4)+(ft2,-ft2) to gco(0,-2)+(ft2,ft2) + circle rad 2*lu-ft2 with .c at gco(2,2) + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu/3 chop 0,-lu*0.5,1) + "2" at gco(1.5,3.0) + arcd(gco(2,2),1.2*lu,130,265) -> + "3" at gco(2.5,3.0) + arcd(gco(2,2),1.2*lu,50,-85) -> cw ') + box invis wid 4*lu ht 6*lu with .sw at Origin+(0,-2*lu)]') + +define(`charq', +`[Origin: gco(0,0) `#' `charq' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(4,4)+(-ft2,-ft2) to gco(4,-2)+(-ft2,ft2) + circle rad 2*lu-ft2 with .c at gco(2,2) + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu/3 chop 0,lu*0.5,3) + "1" at gco(1.5,3.0) + arcd(gco(2,2),1.2*lu,130,265) -> + "2" at gco(2.5,3.0) + arcd(gco(2,2),1.2*lu,50,-85) -> cw ') + box invis wid 4*lu ht 6*lu with .sw at Origin+(0,-2*lu)]') + +define(`charr', +`[Origin: gco(0,0) `#' `charr' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,4)+(ft2,-ft2) to gco(0,0)+(ft2,ft2) + psset_(`linecolor=linegray') dnl + arc cw from gco(0,3)+(ft2,0) to gco(2,3.85) rad 1.2*lu with .c at gco(1.5,2.5) + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu/3,-lu*0.5,1) + "2" at gco(.6,2) above + arcd(gco(1.5,2.5),0.75*lu,140,60) -> cw ht 0.75 * arrowht ') + box invis wid 2*lu ht 4*lu with .sw at Origin]') + +define(`chars', +`[Origin: gco(0,0) `#' `chars' + psset_(`arrows=c-c,linecolor=linegray') dnl + ah = 1.6*lu + bh = (4*lu-ft2-2.1*lu)/2 #0.95*lu-ft2/2 + CH: gco(2.0,2.1)+(0,bh) + ifelse(`$1',,,`ellipse ht 2*bh wid 2*ah thick 0.3 dashed lu/2 at CH') + al = 2.0*lu-ft2 + bl = (2.1*lu-ft2)/2 + CL: gco(2.0,2.1)+(0,-bl) + ifelse(`$1',,,`ellipse ht 2*bl wid 2*al thick 0.3 dashed lu/2 at CL') + i = -1 + for theta = 0 to 270 by 22.5 do { i = i+1 + V[i]: CH+(ah*cosd(theta),bh*sind(theta)) } + for theta = 90-22.5 to -180 by -22.5 do { i = i+1 + V[i]: CL+(al*cosd(theta),bl*sind(theta)) } + fitcurve(V,i) + ifelse(`$1',,,` + setstroke + "1" at gco(0.5,3.5) above + elarrow(120,40,-20,CH,(ah+.6*lu),(bh+.6*lu)) + "2" at gco(1.5,3.2) + i = -1 + for theta = 150 to 270 by 30 do { i = i+1 + V[i]: CH+(lu*cosd(theta),lu*0.5*sind(theta)) } + fitcurve(V,i) + r = V[i].y-CL.y + elarrow(60,-80,-20,CL,2.5*lu,r,i) + "3" at gco(-.3,.9) + elarrow(210,270,15,CL,2.5*lu,r) ') + box invis wid 4*lu ht 4*lu with .sw at Origin]') + +define(`chart', +`[Origin: gco(0,0) `#' `chart' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(1,0)+(0,ft2) to gco(1,6)+(0,-ft2) + L2: line from gco(0,4)+(ft2,0) to gco(2,4)+(-ft2,0) + ifelse(`$1',,,` + setstroke + stroke(from L1.end to L1.start chop lu/3,-lu*0.75,1) + stroke(from L2.start to L2.end chop lu*.5 chop 0,-lu*0.75,2) ') + box invis wid 2*lu ht 6*lu with .sw at Origin]') + +define(`charu', +`[Origin: gco(0,0) `#' `charu' + psset_(`arrows=c-c,linecolor=linegray') dnl + L2: line from gco(4,4)+(-ft2,-ft2) to gco(4,0)+(-ft2,ft2) + ifelse(`$1',,, + `circle outlined "linegray" rad 2*lu-ft2 thick 0.3 dashed lu/2 at gco(2,2) ') + line from gco(0,4)+(ft2,-ft2) to gco(0,2)+(ft2,0) + psset_(`linecolor=linegray') dnl + arcd(gco(2,2),2*lu-ft2,180,0) + ifelse(`$1',,,` + setstroke + stroke(from L2.start to L2.end chop lu/3 chop 0,lu*0.5,2) + "1" at gco(.9,2.0) + arcd(gco(2,2),1.25*lu,210,-30) -> ') + box invis wid 4*lu ht 4*lu with .sw at Origin]') + +define(`charv', +`[Origin: gco(0,0) `#' `charv' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,4)+(ft2,-ft2) to gco(2,0)+(0,ft2) + L2: line to gco(4,4)+(-ft2,-ft2) + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu chop lu/3,-lu*0.5,1) + stroke(from L2.end to L2.start chop lu*.6,-lu*0.5,2) ') + box invis wid 4*lu ht 4*lu with .sw at Origin]') + +define(`charw', +`[Origin: gco(0,0) `#' `charw' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,4)+(ft2,-ft2) to gco(1.5,0)+(0,ft2) + L2: line to gco(3,4)+(0,-ft2) + L3: line to gco(4.5,0)+(0,ft2) + L4: line to gco(6,4)+(-ft2,-ft2) + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu chop lu/3,-lu*0.5,1) + stroke(from L2.end to L2.start chop lu*.6 chop lu,-lu*0.5,2) + stroke(from L3.start to L3.end chop lu*1.5 chop lu/3,-lu*0.5,3) + stroke(from L4.end to L4.start chop lu*.6 chop lu,-lu*0.5,4) ') + box invis wid 6*lu ht 4*lu with .sw at Origin]') + +define(`charx', +`[Origin: gco(0,0) `#' `charx' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0.5,4)+(0,-ft2) to gco(4,0)+(-ft2,ft2) + L2: line from gco(3.5,4)+(0,-ft2) to gco(0,0)+(ft2,ft2) + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu/3,-lu*0.6,1) + stroke(from L2.start to L2.end chop lu/3,lu*0.6,2) ') + box invis wid 4*lu ht 4*lu with .sw at Origin]') + +define(`chary', +`[Origin: gco(0,0) `#' `chary' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0,4)+(ft2,-ft2) to gco(2,0)+(0,ft2) + L2x: gco(4,4)+(-ft2,-ft2) + L2: line from L2x to 1.37 + C: Here-(perp(L2))/lin_leng(L2)*lu*1.1 + psset_(`linecolor=linegray') dnl + arcd(C,lu*1.1,-30,-105) cw + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu chop lu/2,-lu*0.5,1) + stroke(from L2.start to L2.end chop lu*.6 chop 0,-lu*0.5,2,solid) + arcd(C,lu*.6,-30,-110) cw -> ht 0.75*arrowht ') + box invis wid 4*lu ht 6*lu with .sw at Origin+(0,-2*lu)]') + +define(`charz', +`[Origin: gco(0,0) `#' `charz' + psset_(`arrows=c-c,linecolor=linegray') dnl + L1: line from gco(0.5,4)+(ft2,-ft2) to gco(4,4)+(-ft2,-ft2) + L2: line to gco(0,0)+(ft2,ft2) + L3: line to gco(4,0)+(-ft2,ft2) + ifelse(`$1',,,` + setstroke + stroke(from L1.start to L1.end chop lu/3 chop lu,-lu*0.6,1) + stroke(from L2.start to L2.end chop lu,lu*0.6,2) + stroke(from L3.start to L3.end chop lu/3,-lu*0.6,3) ') + box invis wid 4*lu ht 4*lu with .sw at Origin]') + +define(`xpnd',$*) +define(`Letters', + `ifelse(`$1',,,` + ifelse(substr(`$1',0,1),|,`charComma',substr(`$1',0,1),.,`charPeriod', + `xpnd(char`'substr(`$1',0,1))') + ifelse(substr(`$1',1,1),,,`move lu*.75/2*(')ifelse(substr(`$1',1,1),,, + substr(`$1',1,1),8,17,substr(`$1',1,1),6,16,A`'substr(`$1',1,1),A ,3, + substr(`$1',1,1))ifelse(substr(`$1',1,1),,,`-1)') + Letters(substr(`$1',2)) ') ') + +divert(0)dnl diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Lyap.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Lyap.m4 deleted file mode 100644 index e01d365fc02..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Lyap.m4 +++ /dev/null @@ -1,160 +0,0 @@ -.PS -# Lyap.m4 -threeD_init -scale = 1/1.2 - -viewaz = 30 -viewel = 18 -setview(viewaz,viewel) - -Origin: Project(0,0,0) -# Components of view vector W -w1 = view3D1 -w2 = view3D2 -w3 = view3D3 -# Shape factor of the ellipse on the xy plane -q = Cos(40) - -# cost function -h = 0.5 -c = 1 -# The projected ellipse is (x/q)^2 + y^2 = c. -# The cost is v = c+h -define(`vs',`(`$2')*q*cos(`$1'),(`$2')*sin(`$1')') -define(`vp',`vs(`$1',`$2'),0') -define(`vx',`sum3D(vp(`$1',`$2'),0,0,h+(`$2')^2)') - -# The gradient of v is (2x/q, 2y, -1) and the line -# separating front and back is W^T * grad(v) = 0 -# This line intersects the projected ellipse at -# x1,y1 and x2,y2 - ap = w2^2*q^2/w1^2+1 - bp = -w2*w3*q^2/w1^2 - cp = w3^2*q^2/4/w1^2-c - m = sqrt(bp^2-4*ap*cp) - y1 = (-bp+m)/ap/2 ; x1 = (w3-2*y1*w2)*q/2/w1 - y2 = (-bp-m)/ap/2 ; x2 = (w3-2*y2*w2)*q/2/w1 - t1 = atan2(y1,x1) - t2 = atan2(y2,x2) - theta1 = min(t1,t2) - theta2 = max(t1,t2) - -# tangent curve - nT = 11 - for i = 0 to nT do { - y = y1 + (y2-y1)/nT*i - theta = atan2(y,(w3-2*y*w2)*q/2/w1) - r = y/sin(theta) - T[i]: Project(vx(theta,r)) - } - -# front and back parts of the top curve - n = 12 - for i = 0 to n do { - theta = theta1 + (theta2-theta1)/n*i - F[i]: Project(vx(theta,c)) - Fp[i]: Project(vp(theta,c)) - } - for i = 0 to n do { - theta = theta2 + (theta1+twopi_-theta2)/n*i - B[i]: Project(vx(theta,c)) - Bp[i]: Project(vp(theta,c)) - } - -# trajectory -rotations = 1.55 -nx = 7 -thetas = 75*dtor_ -thetaf = thetas - rotations*twopi_ -rx = c*0.9 -beta = exp(log(.5)/20) - -define(`defX',` rx = `$5' ; np = np-1 - ts = `$1' ; tf = `$2' - for i = 0 to `$3' do { - tha = ts + (tf-ts)*i/(`$3') - for thx = tha to -twopi_ by twopi_ do {} - `$4'[i]: Project(vx(thx,rx)) - Xp[np]: Project(vp(thx,rx)) - np = np+1 - rx = beta*rx - }') - -np = 1 -defX(thetas,theta1,nx,X1,rx) -defX(theta1,theta2-twopi_,nx,X2,rx/beta) -defX(theta2-twopi_,theta1-twopi_,nx,X3,rx/beta) -defX(theta1-twopi_,thetaf,5,X4,rx/beta) - -# First draw the inside back -# B is the back curve -# T is the outline -ifpstricks(` -\psset{gradbegin=lightgray,gradend=darkgray,gradlines=1000} -\pscustom[fillstyle=gradient,gradmidpoint=0.7]{ - fitcurve(B,n) - for i = 0 to nT do {TT[i]: T[nT-i] } - fitcurve(TT,nT) -\relax} ', -` fitcurve(B,n) - for i = 0 to nT do {TT[i]: T[nT-i] } - fitcurve(TT,nT) ') - -# Centre axis -thinlines_ -line from Origin to Project(0,0,h) -# F[0] is the leftmost point of the front curve -line from F[0] to Fp[0] -# F[n] is the rightmost point of the front curve -line from F[n] to Fp[n] -thicklines_ - -# Now draw the outside front -ifpstricks(` -\newgray{gray1}{0.9}% -\newgray{gray2}{0.4}% -\psset{gradbegin=gray1,gradend=gray2,gradlines=1000} -\pscustom[linewidth=0pt,fillstyle=gradient,gradmidpoint=0.99]{ - fitcurve(F,n) - fitcurve(T,nT) -\relax} ', -` shade(1,fitcurve(F,n) - fitcurve(T,nT)) ') -# T is the limit curve of visibility - fitcurve(T,nT) -# F is the top front - fitcurve(F,n) -# Front and back projections of the top on xy - fitcurve(Fp,n) - fitcurve(Bp,n) - -# The trajectory in pieces, to allow dashed parts - fitcurve(X1,nx) - fitcurve(X2,nx,dotted 0.025) - fitcurve(X3,nx) - fitcurve(X4,3,dotted 0.015) - arca(from X4[4] to X4[3],ccw,0.3,<-) - -# Projected trajectory - np = np-2 - fitcurve(Xp,np-1) - arca(from Xp[np] to Xp[np-2],ccw,0.18,<-) - "$X(t)$" at Xp[np]-(2bp__,0) ljust - -# Axes and vertical lines -thinlines_ - line from X1[0] to Xp[0] - line from X4[4] to Xp[np] -arrow from Origin to Project(1.5,0,0) -"$x_1$" rjust below -arrow from Origin to Project(0,1.5,0) -"$x_2$" ljust -line dashed from Project(0,0,h) to F[n/2] chop 0 chop arrowht/4 -arrow from F[n/2] to Project(0,0,2) -"$v(X)$" ljust - -"`${0}$'" at Origin+(0,1 pt__) below -"$\Omega$" at Project(0,0.9*c,0)+(0,3bp__) above -"`$v(X) = c$'" at (Project(vp(100*dtor_,c)))+(2bp__,0) above ljust - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile index fd8ab4ea497..b6ccbe29426 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile @@ -15,8 +15,8 @@ # To test the file test.m4, type "make tst" if boxdims is used, otherwise # type "make tst1". In either case the file tst.ps is created. # -# There are a few extra examples in this directory. Process them one -# at a time, or type "make extras.pdf" +# There are more examples in the extras directory. Go to that +# directory and process them one at a time, or type "make". # # To debug a single diagram in a directory other than this examples # directory, copy this makefile and tst.tex to where you want to work, @@ -78,7 +78,8 @@ TEXPICS = \ Quantum.tex quick.tex \ random.tex Rectifiers.tex recycle.tex relaycoil.tex Relay.tex \ Resistors.tex Rotbox.tex \ - Schottky.tex sfg.tex shapes.tex ShiftR.tex Sierpinski.tex Sixpole.tex \ + Schottky.tex sfg.tex shadowed.tex shapes.tex ShiftR.tex Sierpinski.tex \ + Sixpole.tex \ Smithchart.tex Sources.tex SQUID.tex Switches.tex \ Tgate.tex Three.tex thyristor.tex TTLnand.tex Tubediags.tex \ UNO.tex ujt.tex Variable.tex Windings.tex worm.tex Xform.tex XOR.tex @@ -127,6 +128,8 @@ LTXFILE=printf "|documentclass[11pt]{article}\n\ .m4.tex: @touch $(DIMFILE) F_$*.dim $(M4) $(CONF) $(DIMFILE) F_$*.dim $*.m4 | $(PIC) $(MODE) > $*.tex +# $(M4) $(CONF) $(DIMFILE) F_$*.dim $*.m4 > $*.pic +# $(PIC) $(MODE) $*.pic > $*.tex .m4.dvi: @touch $(DIMFILE) F_$*.dim $(M4) pstricks.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -p > $*.tex @@ -209,16 +212,16 @@ $(DOC).pdf: clean pdfmode $(DOC).tex files.tex header.tex rose.pdf: rose.m4 m4 pdf.m4 rose.m4 | dpic -d > rose.pdf -paletteDPV.svg: paletteDPV.m4 - m4 svg.m4 paletteDPV.m4 | dpic -v > paletteDPV.svg - keyboard.svg: keyboard.m4 m4 svg.m4 keyboard.m4 | dpic -v > keyboard.svg keyboard.pdf: keyboard.svg - convert keyboard.svg keyboard.pdf + -conv=`which convert` ; if test "`basename $$conv`" = "convert" ; then \ + convert keyboard.svg keyboard.pdf ; \ + else printf '.PS\n "keyboard.pdf requires imagemagick convert"\n.PE\n' \ + | dpic -d > keyboard.pdf ; fi -pics: $(TEXPICS) rose.pdf keyboard.pdf +pics: rose.pdf keyboard.pdf $(TEXPICS) touch pics $(DOC).ps: psmode $(DOC).dvi @@ -264,43 +267,6 @@ gpic: echopics: @echo $(TEXPICS) -XTRASRC=printf "|documentclass[11pt]{article}\n\ -|usepackage[dvipsnames]{xcolor}\n\ -|usepackage{times,boxdims,siunitx,amssymb,tikz,geometry}\n\ -|geometry{margin=0.5cm}\n\ -|begin{document}\n" | $(BS) - -extras: - ( for file in `ls *.m4` ; do \ - fbase=`basename $$file .m4` ; \ - if test "`grep -L $$fbase files.tex`" = "files.tex" ; then \ - echo $$fbase ; \ - fi ; \ - done ) | sed -e '/Ball/d' \ - -e '/ASME_Y14-5/d' -e '/FlowchartDefs/d' -e '/tubedefs/d' \ - -e '/debug1/d' -e '/debug2/d' \ - -e '/paletteSVG/d' \ - -e '/Consumption/d' -e '/rotatetext/d' -e '/windows/d' \ - > extras - -XBOXDIMS = Chuck - -extras.pdf: extras - @$(XTRASRC) > extras.tex - touch extras.dim - -for file in `cat extras` ; do \ - $(M4) pgf.m4 extras.dim $$file.m4 | $(PIC) -g > $$file.tex ; \ - printf "\n|input{$$file.tex}\n" | $(BS) >> extras.tex ; \ - printf "\n $$file.m4\n |pagebreak\n" | $(BS) >> extras.tex ; \ - done - printf "\n|end{document}\n" | $(BS) >> extras.tex - pdflatex extras - -for file in $(XBOXDIMS) ; do \ - rm -f $$file.tex ; \ - $(M4) pgf.m4 extras.dim $$file.m4 | $(PIC) -g > $$file.tex ; \ - done - pdflatex extras - testall: (cd mf; make) (cd mpost; make) @@ -321,13 +287,11 @@ clobber: clean for file in `ls *.tex` ; do \ nm=`echo $$file | sed -e "s/\(.*\)\.tex/\1/"` ; \ if test -s $$nm.m4 ; then rm -f $$nm.pic $$nm.tex ; fi ; done + (cd dpv; make clobber) # @if test -f distmakefile ; then make -f distmakefile clobber ; fi clean: @printf "\n\n examples clean:\n\n" - -if test -f extras ; then \ - for file in `cat extras` ; do rm -f $$file.pic $$file.tex ; done ; fi - rm -f extras extras.* rm -f core boxdims.tar.gz pics rm -f *.dvi *.aux *.log *.toc *.blg *.eps *.tif *.epsi eps *-mfpic* *.svg rm -f fig*.tex $(TEXPICS) *.roff *.int *.pic gpic.m4 test.tex xxx* *.fig diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Metamodel.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Metamodel.m4 deleted file mode 100644 index e5d1ba0b1ca..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Metamodel.m4 +++ /dev/null @@ -1,78 +0,0 @@ -.PS -# Metamodel: -# https://tex.stackexchange.com/questions/615463/how-to-draw-meta-models-in-tikz -gen_init - - lineht = 0.4 - arrowht = arrowht*3/2; arrowwid = arrowwid*2 - fillv = 0.9 - define bx {box fill_(fillv) rad 5bp__ $1} - up_ - - Event: bx(ht boxht "Event") - sarrow(,type=D); {"{\tt<}contains{\tt>}" at last arrow rjust} - Trace: bx(ht boxht "Trace") - sarrow(,type=D); {"{\tt<}contains{\tt>}" at last arrow rjust} - Log: bx(ht boxwid "Log") - Att: bx(ht boxwid wid boxwid*5/4 "Attribute" dashed) \ - with .nw at Log.ne + (boxwid*2,0) - - fillv = 0.8 - ww = Log.ht - move to (Att.w,Att.n) - (0,ww/9) - { sarrow(to (Log.e,Here),type=D) - {"{\tt<}trace-global{\tt>}" at last arrow above} } - move down_ ww/3 - { sarrow(to (Log.e,Here),type=D) - {"{\tt<}event-global{\tt>}" at last arrow above} } - move down_ ww/3 - { sarrow(to (Log.e,Here),type=D) } - T: 0.8 between last arrow.start and last arrow.end - move down_ ww/9 - line dashed left ww/3 then down ww/2 then right ww/2 - sarrow(up ww*7/18, type=D;shaft=dashed) - "{\tt<}contains{\tt>}" at (last arrow.end,Att.s)-(ww/4,ww*7/18) below - - line from T to (T,Event); sarrow(to Event.e,type=D) - sarrow(from (T,Trace) to Trace.e,type=D) - - ellipsewid = boxwid*0.9 - ellipseht = ellipsewid/2 - move to (Att.e,Att.s)+(ww/6,-ww/8) - y = Here.x-Att.c.x-boxwid/2 - down_ - Loopover_(`Z',`Z: bx(ht boxht*3/4 "Z") - {sarrow(from Z.e+(y,0) to Z.e,type=D)} - {ifelse(Z,Boolean, - `move to last arrow.start; line to (Here,String) - line from Z.w to (Att,Z.w); sarrow(to Att.s,type=O)', - `line from Z.w to (Att,Z.w)')} - move down_ ww/16', - String,Date,Int,Float,Boolean) - - line from Int.e+(y,0) right_ ww/4; Value: ellipse fill_(fillv) "Value" - Key: ellipse fill_(fillv) "Key" with .w at Att.e+(y*2,0) - sarrow(from last ellipse.w to Att.e,type=D) - - Class: bx(ht boxht*3/4 "Classifier") \ - with .s at (0.5 between Log and Att,Att.n)+(0,boxht/2) - line from Class.w to (Log,Class); sarrow(to Log.n,type=D) - "{\tt<}defines{\tt>}" at (0.5 between Log and Class.w,Class) above - line from Att.n to (Att,Class); sarrow(to Class.e,type=D) - "{\tt<}defines{\tt>}" at (0.5 between Att and Class.e,Class) above - - Ext: bx(ht boxht*3/4 "Extension") with .e at (Att.e,Class+(0,boxht*3/2)) - move to (Att.e,Att.n)-(Att.wid/8,0) - sarrow(to (Here,Ext.s),type=D;shaft=dashed) - "{\tt<}defines{\tt>}" at (last arrow,Ext.s)-(0,y) rjust - line dashed from Ext.w to (Log,Ext) then to (Log,Class) - "{\tt<}declares{\tt>}" at (0.5 between Log and Class,Ext) below - - ellipse fill_(fillv) "name" at (Key,Ext) - sarrow(from last ellipse.w to Ext.e,type=D) - ellipse fill_(fillv) "prefix" with .n at last ellipse.s+(0,-ww/16) - line from last ellipse.w left y - URI: ellipse fill_(fillv) "URI" with .n at last ellipse.s+(0,-ww/16) - line from last ellipse.w left y then up Ext.y - URI.y - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/MoreTable.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/MoreTable.m4 index ef8cd718249..3d90b71eb43 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/MoreTable.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/MoreTable.m4 @@ -1,15 +1,44 @@ .PS -# MoreTable.m4 +# heater.m4 cct_init +Heater: [ + movewid = 2 pt__ + hm = 2.05 + right_ +{ + {lamp ; move; "`{\tt lamp}'" ljust} + move right_ 1.5 + {lamp(,T) ; move;"`{\tt lamp(,T)}'" ljust} + move right_ 1.25 + {thermocouple ; move;" `{\tt thermocouple}'" ljust } + move right_ hm + {thermocouple(,,,T) ; move; "`{\tt thermocouple(,{,},T)}'" ljust } + } + move down 0.4; right_ +{ + {heater; move;"`{\tt heater}'" ljust} + move right_ hm + {heater(,,,,E); move;"`{\tt heater(,{,},{,}E)}'" ljust} + move right_ hm+0.4 + {heater(,,,,ET); move;"`{\tt heater(,{,},{,}ET)}'" ljust} + } + ] + +#.PE +#.PS +## MoreTable.m4 +#cct_init + +More: [ movewid = 2 pt__ hm = 2.05 vm = 0.28 -{ right; {lamp ; move;"`{\tt lamp}'" ljust} - move right_ hm - {thermocouple ; move;"`{\tt thermocouple}'" ljust } -} - move down 0.25; right_ +#{ right; {lamp ; move;"`{\tt lamp}'" ljust} +# move right_ hm +# {thermocouple ; move;"`{\tt thermocouple}'" ljust } +#} +# move down 0.25; right_ { {memristor ; move;"`{\tt memristor}'" ljust} move right_ hm {heater; move;"`{\tt heater}'" ljust} @@ -36,4 +65,5 @@ vm = 0.28 {xtal(,type=R;outerdiam=0.2) ; move ;"`{\tt xtal(,type=R)}'" ljust} } +] with .nw at Heater.sw+(0,-0.2) .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/OpAmpFilter.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/OpAmpFilter.m4 deleted file mode 100644 index db1ce2778d7..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/OpAmpFilter.m4 +++ /dev/null @@ -1,72 +0,0 @@ -.PS -# OpAmpFilter.m4 -cct_init -command "{\small\sf" - -divert(-1) -divert(0)dnl - - define(`SpecOpAmp',`$1: [ right_ - lwtmp = linewid; linewid = 1*scale - H: opamp - "$2" at H.In1 below rjust - "$3" at H.In2 below rjust - "$4" at H.E below ljust - "V${-}$" at H.E1 below - line up_ dimen_/3 from H.E1 "4" rjust; dot(,,1) - "$\hbox{V}_{\hbox{CC}}$" above rjust at last [].n - "V${+}$" at H.E2 above - line down_ dimen_/3 from H.E2 "11" ljust; dot(,,1) - "${-}\hbox{V}_{\hbox{CC}}$" below ljust at last [].s - linewid = lwtmp - ifelse($1,U1,,`line left_ jog from H.In2 then down_ jog/2; zground ') - "$1" at H.S below ljust - In1: H.In1; In2: H.In2; Out: H.Out - D: dot(at Out) - V: circle diam 12bp__ "V" at Out+(dimen_/3,dimen_/3) - "V$_{\hbox{\scriptsize $5}}$" at V.n above - open_arrow(from V to D chop last circle.rad chop dotrad_) ] ') - define(`zground',`ground(`$1',,S); "0" at Here+(dimen_/6,-dimen_/2)') - - cscale = 3/2 - linewid = linewid*cscale - jog = dimen_*0.3 - vstep = dimen_*5/4 - SpecOpAmp(U1,2,3,1,hp) - R1: resistor(right_ elen_*3/4 from U1.Out); llabel(,"R1"); rlabel(,"1`\,'k") - dot; line right_ jog - SpecOpAmp(U2,5,6,7,bp) with .In1 at Here - R2: resistor(right_ elen_*3/4 from U2.Out); llabel(,"R2"); rlabel(,"1`\,'k") - dot; line right_ jog - SpecOpAmp(U3,9,10,8,lp) with .In1 at Here - SpecOpAmp(U4,13,12,14,n) with .Out at U3.Out+(0,-dimen_*3.0) - line up vstep from U4.Out - Rf: resistor(left_); rlabel(,R_f); llabel(,"1`\,'k") - line to (U4.In1,Here)-(jog,0) then to U4.In1-(jog,0); dot - line from U3.Out down_ vstep then left_ jog - RL: resistor; rlabel(,RL); llabel(,"100") - line to (U4.In1-(2*jog,0),Here) then to U4.In1-(2*jog,0); dot - line from U1.Out to (U1.Out,Here); right_ - R42: resistor(to U4.In1); llabel(,"R42"); rlabel(,"1`\,'k") - line from U2.Out down_ vstep - R41: resistor(left_ to (U1.In2-(jog,0),Here)) - llabel(,"2.2`\,'k"); rlabel(,"R41") - line to (Here,U1.In2); dot; { line to U1.In2 } - line left_ jog; dot - { resistor(down_ elen_); rlabel(,"R0" rjust "10`\,'k"); zground } - R3: resistor(left_ dimen_); rlabel(,"R3","in"); llabel(,"1`\,'k") - source(down_ elen_,AC); llabel("V$_{\hbox{\scriptsize in}\;}$"); zground - line up_ vstep from U1.Out - R5: resistor(left_ to (U1.In1-(jog,0),Here)); rlabel(,"R6\enskip 10`\,'k") - dot - line from U1.In1 left_ jog then to Here+(0,dimen_/2) - resistor(right_ to (U3.Out,Here)); llabel(,"R5"); rlabel(,"1`\,'k") - line to U3.Out; dot(at Here+(0,vstep)) - capacitor(left_ to (U3.In1-(jog,0),Here)); rlabel(,"C2\enskip 100`\,'n") - line to (Here,U3.In1) - line from U2.Out up_ vstep - capacitor(left_ to (U2.In1-(jog,0),Here)); rlabel(,"C1\enskip 100`\,'n") - line to (Here,U2.In1) - -command "}%" -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Orbits.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Orbits.m4 deleted file mode 100644 index ef85d279353..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Orbits.m4 +++ /dev/null @@ -1,74 +0,0 @@ -.PS -# Orbits.m4 -threeD_init -NeedDpicTools - - crad = 1.0 - g = 0.65 - -# `orbitpos(long,lat,rad,ang)' -define(`orbitpos', - `rot3Dx((`$2')*dtor_,rot3Dz((`$1')*dtor_,rot3Dy(-(`$4')*dtor_,`$3',0,0)))') - -define(`PO',`B.C+(Project(orbitpos(orbitlong,orbitlat,orbitrad,`$1')))') - -define vis { X: PO($1) - if (distance(X,B.C)>crad) || \ - (dot3D(View3D,orbitpos(orbitlong,orbitlat,orbitrad,$1))>0) \ - then {$2 = 1} else {$2 = -1} } - -# `orbit(long,lat,rad)' -define(`orbit', - `[da = 3 - orbitlong = `$1' - orbitlat = `$2' - orbitrad = `$3' - define(`decorated',`ifelse(`$4',,,`outlined `$4'')') - arrow from PO(0) to PO(da*3) decorated - n=0 - P[n]: PO(0) - vis(0,v) - for d=da to 360 by da do { - vis(d,x) - if x*v < 0 then { - findroot(vis,d-da,d,1e-6,x) - n+=1; P[n]: PO(x) - if v < 0 then { fitcurve(P,n,dashed decorated) } \ - else { fitcurve(P,n,decorated) } - P[0]: P[n] - n = 0; v = -v } - n +=1; P[n]: PO(d) - } - if v < 0 then { fitcurve(P,n,dashed decorated) } \ - else { fitcurve(P,n,decorated) } - ] with .c at B.C') - -# ball(rad,highlight rad,highlight degrees) -define(`ball',`[ - lt = linethick bp__ - C: circle invis rad `$1' at (0,0) - D: C+(Rect_(`$2',`$3')) - rm = `$1'+distance(C,D) - a = 1 # fade rate parameter - for r=lt to rm by lt do { - u = 1-(r/rm*(a*r/rm+(1-a))) - if r < (1-g)*`$1' then { circle outlined rgbstring(u,u,u) rad r at D } \ - else { arc cw outlined rgbstring(u,u,u) from Cintersect(D,r,C,`$1') \ - to Cintersect(D,r,C,`$1',R) with .c at D - } - } - circle rad C.rad at C - ]') - - linethick = 0.8 - B: ball(crad,crad*g,110) - - azimuth = 0 - elevation = 0 - setview(azimuth,elevation) - - orbit(10, 30,crad*1.3,"red") - orbit(10,-30,crad*1.3,"blue") - orbit(10,-90,crad*1.3,"cyan") - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/PPA.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/PPA.m4 deleted file mode 100644 index 8d25901310d..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/PPA.m4 +++ /dev/null @@ -1,40 +0,0 @@ -.PS -# `PPA.m4 Push-pull amplifier' -cct_init - -Vs: source(up_ elen_,"$V_S$") - line right elen_/2 -T1: transformer(down_ elen_,,,W,10) with .P1 at Here - { dot(at T1.TP+(-dimen_/8,dimen_/3)) } - { dot(at T1.TS+(dimen_/8,dimen_*2/3))} - { dot(at T1.TS+(dimen_/8,-dimen_/8)) } - line from T1.P2 to Vs.start - - line up_ dimen_*3/4 from T1.S1 then right_ dimen_*3/4 - up_ -Q1: bi_tr(,L,,E) with .B at Here - line down_ dimen_*3/4 from T1.S2 then right_ dimen_*3/4 - down_ -Q2: bi_tr(,R,,E) with .B at Here - line from Q1.E to Q2.E -R2: resistor(left_ dimen_ from last line); llabel(,R_2) - dot; {dot(at R2.start) } - line to T1.TS - line down_ dimen_/2 right_ dimen_/2 from R2.start - ground - - line right_ dimen_/6 from R2.start -Vcc: battery(right_ elen_,2); rlabel(,V_{cc}) - dot - line up dimen_*2/3 then to (R2.start.x,Here.y+dimen_*2/3) - resistor(to (R2.end,Here)); rlabel(,R_1); line to R2.end - line right_ dimen_/2 from Vcc.end -T2: transformer(up_ elen_,,,W,10) with .TS at Here - line from T2.S2 to (T2.S2,Q1.C) then to Q1.C - line from T2.S1 to (T2.S1,Q2.C) then to Q2.C - - line right elen_/2 from T2.P2 - resistor(down_ to (Here,T2.P1)); llabel(,R_L) - line to T2.P1 - -.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 14b6bbfbe35..b3a08a24395 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Plate.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Plate.m4 @@ -5,7 +5,9 @@ # See the ASME Y14.5 standard, Figure 6-30. scale = 100/3 cct_init -ifdef(`ASME_Y14-5_',,`include(ASME_Y14-5.m4)') +ifdef(`ASME_Y14-5_',, + `sinclude(ASME_Y14-5.m4def) + sinclude(../ASME_Y14-5.m4def) ') ifsvg(`svg_font(sans-serif,10bp__)', `textht = 10bp__*2/3 ifpostscript(,latexcommand({\sf\small))') diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples b/Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples index bcd3bf37284..0d46f63d20a 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples @@ -1,9 +1,9 @@ THIS DIRECTORY contains examples.tex, source files for the diagrams - that are imported when examples.tex is LaTeXed, some other example - diagrams, and a subdirectory for producing SVG files without invoking - LaTeX. To generate examples.pdf in a unix-like environment (versions - of unix, linux, cygwin, djgpp, ...): + that are imported when examples.tex is LaTeXed and a subdirectory for + producing SVG files without invoking LaTeX. To generate examples.pdf + in a unix-like environment (versions of unix, linux, cygwin, djgpp, + Mingw, ...): 1. Install the libraries as described in the top-level README file. @@ -30,7 +30,7 @@ SINGLE DIAGRAMS: To test one of the diagrams, say ex01.m4, type one of "make ex01.pdf" (uses pdflatex) "make ex01.png" (requires Imagemagick convert) "make ex01.tif" (requires Imagemagick convert) - "make ex01.svg" (requires Imagemagick convert, but see the svg folder) + "make ex01.svg" (requires Imagemagick convert, but see the dpv folder) DEBUGGING: To test and debug a single diagram, write it into test.m4. Type "make tst" to process the file, creating test.tex, which is imported into @@ -50,14 +50,14 @@ TiKz and PSTricks: By default, the dpic processor is invoked, producing either by LaTeX or PDFlatex, type "make" or "make examplespgf.ps" in the pgf subdirectory. -SVG: Look in the svg directory for examples, and type "make". +SVG: Look in the dpv directory for examples, and type "make". ALTERNATIVES: There are often several methods for producing similar - graphical results, particularly of text labels. Some of the diagrams - in this directory are slightly more complicated than required for Tikz - or PSTricks in order for them to work with other postprocessors. Dpic - output that does not produce LaTeX labels has to be treated separately - as, for example, in the svg directory. + graphical results, particularly of text labels. Some of the diagrams in + this directory are more complicated than required for Tikz or PSTricks + in order for them to work with other postprocessors. Dpic output + that does not produce LaTeX labels has to be treated separately as, + for example, in the dpv directory. METAPOST: To process the diagrams using MetaPost, look in the mpost subdirectory. To accommodate MetaPost, some of these sources use diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Resolver.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Resolver.m4 deleted file mode 100644 index b6ca93047a7..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Resolver.m4 +++ /dev/null @@ -1,49 +0,0 @@ -.PS -# `Resolver.m4' -cct_init -s_init(tst) -sinclude(tst.dim) - -iflatex(`latexcommand({\scriptsize\sf)') - -[ -linewid = linewid*1.25 -define(`dotrad_',dotrad_/2) - - T1: transformer(down_ dimen_/2) - line left from T1.P1; dot; move left 15bp__ "RH" - line left from T1.P2; dot; "RL" rjust - "Rotor ($r$)" at T1.TP rjust - line right_ dimen_*3/4 from T1.S2 - C: Here - phi = 35 - move right_ 0.1 from T1.S1; move from C to C+(Rect_(0.1,90+phi)) - Q: Intersect_(last move,2nd last move) - Lr: inductor(from Q to C) - S1: line from T1.S1 to Q - A: C+(Rect_(dimen_*0.9,90+phi)) - thinlines_ - line dashed from Q to A chop 2bp__ chop 0 - "Rotor shaft" at last line.end rjust "angle" rjust "" rjust - line dashed from C up_ dimen_*0.9 chop 2bp__ chop 0 - arcd(C,dimen_*0.85,90,90+phi) -> - thicklines_ - f_box($\phi$) at C+(Rect_(dimen_*0.85,90+phi/2)) - - d = distance(T1.P1,T1.P2) - Ls: inductor(up_ d from C+(d/2,0)) - line right_ from Ls.end - D2: dot; "S2" ljust - line from Ls.start to (D2,Ls.start); dot; "S4" ljust - "$Kr\cos(\phi)$" at 0.5 between last "" and 2nd last "" - Lq: inductor(right_ d at (Lr,(C+(0,-d/3)))) - line from Lq.end down_ d/4 - K: Here; corner; line to (D2,K); dot; "S3" ljust - line from Lq.start down_ d*5/4 - L: Here; corner; line to (D2,L); dot; "S1" ljust - "$Kr\sin(\phi)$" at 0.5 between last "" and 2nd last "" -] -"Resolver essentials" at last [].s below - -iflatex(`latexcommand(})') -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/SPM.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/SPM.m4 deleted file mode 100644 index 0b3fdb642c4..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/SPM.m4 +++ /dev/null @@ -1,59 +0,0 @@ -.PS -# `SPM.m4 Salient-pole machine' -gen_init - - outerrad = 1 - medrad = 11/16 - windings = 6 - polewid = 3/8 - twid = (outerrad-medrad)/3 - srad = twid/4 - halfline = ifgpic(0,linethick/2 pt__) - - C: circle rad outerrad at 0,0 - line from Rect_(outerrad,180+60) to (C.w,C.s) then down polewid/2 \ - then right 2*outerrad then up polewid/2 then to Rect_(outerrad,-60) - - line from C+(medrad,-twid/2) right twid then up twid then left twid \ - chop -halfline - E: Here+(halfline,0) - for i = 1 to windings*2 do { - Point_(i*360/(windings*2)) - arc ccw from E to C+vec_(medrad,-twid/2) with .c at C - E: rvec_(0,twid) - line to rvec_(twid,0) then to rvec_(twid,twid) then to E chop -halfline - } - move to C - for i = 0 to 3 do {{ - Point_(i*90) - for_(-1,1,2, - `{ line from rvec_(polewid/2,m4x*polewid/2) \ - to rvec_(medrad*2/3,m4x*polewid/2) \ - then to rvec_(medrad*2/3,m4x*(polewid/2+polewid/5)) \ - chop -halfline chop 0 - { move to rvec_(0,-(m4x*polewid/5)) - line from rvec_(-twid/2,m4x*twid/4) to rvec_(-twid/4,m4x*twid/4) \ - then to rvec_(-twid/4,m4x*twid*3/4) \ - then to rvec_(-twid*7/4,m4x*twid*3/4) \ - then to rvec_(-twid*7/4,m4x*twid/4) \ - then to rvec_(-twid/2,m4x*twid/4) } - T: rvec_(srad,0) - arc ifelse(m4x,-1,c)cw to (1+srad/distance(T,C)) with .c at T - }') - arc cw from last arc.end to 2nd last arc.end with .c at C - }} - - t = distance(C,last arc.s) - "\sf N" at C+(0, t) below - "\sf N" at C+(0,-t) above - "\sf S" at C+(-t,0) ljust - "\sf S" at C+( t,0) rjust - - for i = 0 to windings/2-1 do { - for j = 1 to 2 do { sprintf("$\char%g_%g$",97+i,j) \ - at Rect_(outerrad-twid,180*(2-j)-i*360/windings) } - for j = 1 to 2 do { sprintf("$\char%g_%g'$",97+i,j) \ - at Rect_(outerrad-twid,180*(2-j)-90-i*360/windings) } - } - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/SampleFlow.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/SampleFlow.m4 deleted file mode 100644 index 077a0ba6e3c..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/SampleFlow.m4 +++ /dev/null @@ -1,35 +0,0 @@ -.PS -# SampleFlow.m4 -darrow_init - -boxwid = 1.9 -boxht = 1.0 -linethick = 1.2 - - define(`dlthick',0.25) - define(`dfillcolor',`0.7,0.7,0.7') - - define rbox {box rad boxht/10} - define offset { with .nw at last box.se+(-0.15,-0.125)} - define indent { at last box.w+(0.1,0)} - define connect { - { Dline(from 2nd last box.s to (2nd last box,last box),E;ends=!-) - dleft - darrow(to last box.w) } } - - command "{\sf\huge" - - B1: rbox - { "Sample" ljust indent "Acquisition" ljust } - B2: rbox offset - {"Sample" ljust indent "Checking" ljust } - connect - B3: rbox offset - {"Dimensionality" ljust at last box.w "Sample Check" ljust } - connect - B4: rbox offset - {"Sample" ljust indent "Synthesis" ljust "Techniques" ljust } - connect - - command "}%" -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ShadeSector.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ShadeSector.m4 deleted file mode 100644 index 0632fdb14f4..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/ShadeSector.m4 +++ /dev/null @@ -1,14 +0,0 @@ -.PS -# ShadedSector.m4 -# https://tex.stackexchange.com/questions/635327/multi-color-circular-gradient-in-tikz - -gen_init -NeedDpicTools - - rx = 4 - n = int(rx/lthick) - for i=1 to n do { left_ - hsvtorgb((1-i/n)*180,1,1,r,g,b) - arc rad i/n*rx with .c at (0,0) outlined rgbstring(r,g,b) } - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Shaky.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Shaky.m4 deleted file mode 100644 index 81364cf515e..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Shaky.m4 +++ /dev/null @@ -1,115 +0,0 @@ -.PS -# Shaky.m4 -gen_init -NeedDpicTools -divert(-1) - `An attempt to draw shaky hand-drawn lines' - - `shakyline(linespec,type,shake=val,[shakevals]) - Draw a line with a tremor - arg3: shake parameter (default 1) - arg4=normal(0,1) perturbations used if given' -define(`shakyline', -`rpoint_(ifelse(`$1',,`to rvec_(linewid,0)',`$1')) - L_start_: last line.start - L_end_: last line.end - [ Start: L_start_ - End: L_end_ - llen = distance(Start,End) - npts = round_(llen/linewid*4) - pushkey_(`$3',shake,1)dnl - sval = m4shake*llen/npts/8 - if "$4"=="" then { randn(d,npts-1,0,sval) }\ - else { for i=1 to npts-1 do { d[i] = $4[i]*sval) }} - P[0]: Start - for i=1 to npts-1 do { P[i]: i/npts between Start and End + vec_(0,d[i]) } - P[npts]: End - spline ifdpic(ifelse(`$2',,ctension_)) $2 from P[0] to P[1] - for i=2 to npts do { continue to P[i] } popdef(`m4shake') - ] with .Start at L_start_; move to L_end_') - - `shakyarc(arcspec,type,shake=val,[shakevals]) - Draw an arc with a tremor - arg3: s=shake parameter (default 1) - arg4=normal(0,1) perturbations used if given' -define(`shakyarc', -`arc invis $1 - A_start_: last arc.start - A_end_: last arc.end - A_C_: last arc.c - [ Start: A_start_ - End: A_end_ - C: A_C_ - as = atan2(Start.y-C.y,Start.x-C.x) - ae = atan2(End.y-C.y,End.x-C.x) - ar = distance(Start,C) - llen = abs(ar*(ae-as)) - npts = round_(llen/linewid*4) - pushkey_($3,shake,1)dnl - sval = m4shake*llen/npts/8 - if "$4"=="" then { randn(d,npts-1,0,sval) }\ - else { for i=1 to npts-1 do { d[i] = $4[i]*sval }} - P[0]: Start - for i=1 to npts-1 do { P[i]: C + (rect_(ar+d[i],as+i/npts*(ae-as))) } - P[npts]: End - spline ifdpic(ifelse(`$2',,ctension_)) $2 from P[0] to P[1] - for i=2 to npts do { continue to P[i] } popdef(`m4shake') - ] with .Start at last arc.start; move to last arc.end') - - `shakyfitcurve(V,n,linetype, - m (default 0),shake=val,[shakevals]) - Like fitcurve but the control points - are perturbed - arg5: s=shake parameter (default 1) - arg6=normal(0,1) perturbations used if given' -define(`shakyfitcurve',` - [ m4fn = ifelse(`$2',,2,`$2'); m4fm = ifelse(`$4',,0,`$4') - pushkey_($5,shake,1)dnl - if "$6"=="" then { randn(d,2*(m4fn-m4fm-1),0,m4shake) }\ - else { for i=1 to 2*(m4fn-m4fm-1) do { d[i] = $6[i]*m4shake }} - M4PP_[0]: `$1'[m4fm] - for i=m4fm+1 to m4fn-1 do { M4PP_[i-m4fm]: `$1'[i] dnl - +(d[2*(i-m4fm-1)+1],d[2*(i-m4fm-1)+2])\ - *distance(M4PP_[i-m4fm-1],`$1'[i])/16 } - M4PP_[m4fn-m4fm]: `$1'[m4fn]; End: M4PP_[m4fn-m4fm] - fitcurve(M4PP_,m4fn-m4fm) popdef(`m4shake') - ] with .M4PP_[0] at `$1'[ifelse(`$4',,0,`$4')]; move to last [].End ') - - -divert(0) - -P1: [ - linethick = 2.5 - round(,,colored "gray") - nl = 10 - for i=0 to nl do { - shakyline(right 6/nl up 2*(2*pmod(i,2)-1),,shake=2) - {sprintf("%g",2-i/nl*2) at 1/2 between L_start_ and L_end_ } - round(,,colored "gray") } - ] - -P2: [ - linethick = 2.5 - na = 3 - arcrad = 1 - for i=1 to na do { - shakyarc(,colored "gray",shake=2) - } - ] with .nw at last [].sw +(0,-1) - -P3: [ - linethick = 2.5 - na = 3 - arcrad = 2 - for i=1 to na do { - shakyarc(,colored "gray",shake=2) - } - ] with .w at last [].e +(1,0) -P4: [ - n = 0 - for a=0 to 359 by 30 do { V[n]: (Rect_(1,a)); n+=1 } - V[n]: V[0] - shakyfitcurve(V,n,,,shake=1) - ] with .nw at P2.sw + (0,-0.5) - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Stator.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Stator.m4 deleted file mode 100644 index fc74a111e7d..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Stator.m4 +++ /dev/null @@ -1,54 +0,0 @@ -.PS -# Stator.m4 -# https://tex.stackexchange.com/questions/612620/how-to-paint-inside-a-set-of-lines -gen_init -scale = 0.5 - - outerwid = 5/2 - innerwid = 3.7/2 - nteeth = 32 - toothdepth = (innerwid/2)*(twopi_/nteeth) - statordepth = toothdepth*4 - viewangle = 30 - outershade = 0.9 - topshade = 0.8 - innershade = 0.6 - toothshade = 0.5 - - cv = cosd(viewangle) - sv = sind(viewangle) - define ang { ($1)/nteeth*twopi_ } - - T: (0,statordepth*cv) - Tc: (0,toothdepth*cv) - for i = 0 to nteeth/2 do { for j=1 to -1 by -2 do { # Shaded tooth walls - P: (cos(ang(i)+pi_/2)*j,sin(ang(i)+pi_/2)*sv)*outerwid/2 - Q: P*innerwid/outerwid - line from P to P+Tc then to Q+Tc then to Q then to P \ - shaded rgbstring(toothshade,toothshade,toothshade) } } - shade(innershade, # inner arc and teeth - E: ellipsearc(innerwid,innerwid*sv,pi_,0,0,cw) with .C at T - move to (innerwid/2,0) - toothht = toothdepth*cv - for i = 0 to nteeth/2 do { - line up toothht - ellipsearc(innerwid,innerwid*sv,ang(i),ang(i+1),0,ccw) with .Start at Here - move to last [].End - toothht = -toothht } ) - shade(outershade, # outer arc and teeth - E: ellipsearc(outerwid,outerwid*sv,0,pi_,0,cw) with .C at T - line down statordepth*cv from E.End - toothht = toothdepth*cv - for i = nteeth/2 to nteeth-1 do { - line up toothht - ellipsearc(outerwid,outerwid*sv,ang(i),ang(i+1),0,ccw) with .Start at Here - move to last [].End - toothht = -toothht } - line up statordepth*cv from E.Start-T ) - for r=innerwid to outerwid by lthick*2 do { # shade the top - ellipse wid r ht r*sv with .c at T \ - outlined rgbstring(topshade,topshade,topshade) } - ellipse wid outerwid ht outerwid*sv with .c at T - ellipse wid innerwid ht innerwid*sv with .c at T - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/UNO.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/UNO.m4 index 02e89ea13a7..5a4e5381b79 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/UNO.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/UNO.m4 @@ -56,18 +56,6 @@ define(`HeaderPin',` `rotbox(m4Hps,m4Hps,fill_(1))', `circle diam m4Hps fill_(1)') at last line.start ') -define(`brdge',`eleminit_(`$1') - define(`m4h',ifelse(`$2',,`sourcerad_',`($2)/2'))dnl - { line to rvec_(rp_len/2-m4h/2,0) - move to rvec_(m4h/2,0) - for m4ng=75 to 255 by 180 do {{ - m4fshade(0, arc cw from rvec_(Rect_(m4h/2,m4ng)) \ - to rvec_(Rect_(m4h/2,-m4ng)) \ - with .c at Here ) }} - line from rvec_(m4h/2,0) to rvec_(rp_len/2,0) } - { [box invis ht_ m4h wid_ m4h] at rvec_(rp_len/2,0) } - line to rvec_(rp_len,0) invis ') - define(`ATMEGA16U2',`[ Chip: box wid 10*lg_pinsep ht 25*lg_pinsep Loopover_(`x', @@ -168,7 +156,7 @@ divert(0)dnl rlabel(16,,"MHz"); dot XT2: dot(at last line.start-(2*del,0)); { "XT2" at last [].n above } - Br1: brdge(left_ from U3.Pin33.end to (XT2,U3.Pin33)) + Br1: jumper(left_ from U3.Pin33.end to (XT2,U3.Pin33)) rlabel(1,,2); llabel(,"GROUND") BRE: dot line to (Here,U3.Pin28) then to U3.Pin28.end @@ -354,7 +342,7 @@ USB: [ K: box invis wid dimen_/2 ht 5*lg_pinsep line from ZU4.Pin1.end to (RN1D-(1.5*del,0),ZU4.Pin1) then up 7*del continue to (ZU4.Chip.w,Here)+(del,0); BRB: dot - { line down_ 2*del; Br2: brdge(right_ dimen_) + { line down_ 2*del; Br2: jumper(right_ dimen_) llabel(1,,2); rlabel(,"RESET\_EN"); line up_ 2*del; dot } line right_ dimen_+del C5: capacitor(right_ dimen_); llabel(,"C5"); rlabel("100n"); dot diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Views.dms b/Master/texmf-dist/doc/latex/circuit-macros/examples/Views.dms new file mode 100644 index 00000000000..c92e42bac26 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Views.dms @@ -0,0 +1,5 @@ +w[1]=58.0802 +w[2]=47.6604 +w[3]=46.9552 +w[4]=120.41 +w[5]=114.866 diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Wheat.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Wheat.m4 deleted file mode 100644 index c70fa8fc74d..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Wheat.m4 +++ /dev/null @@ -1,21 +0,0 @@ -.PS -# `Wheat.m4' -gen_init - -boxwid = boxht - -[ for j = 0 to 7 do { - for i = 0 to 7 do { - x = 2^(j+8*i) - box fill_((i+j)%2) at (j*boxwid,-i*boxwid) - k = ((i+j)%2==0); setrgb(k,k,k) - if x < 10000 then { sprintf("\Large$%g$",x) at last box } \ - else { y = int(log(x)) - sprintf("{\Large$%g$}$\cdot 10^{%g}$",round_(x/(10^y)),y) at last box } - resetrgb - } - } - ] -box wid 8*boxwid ht 8*boxwid at last [] - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Zcos.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Zcos.m4 deleted file mode 100644 index cbf63fd8f39..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Zcos.m4 +++ /dev/null @@ -1,29 +0,0 @@ -.PS -# Zcos.m4 -gen_init -NeedDpicTools - -# define f1 { ee = expe(8*x*`$1'*(x^2 - (`$1')^2)); -# $2 = ee + 1/ee + 2*cos(2*x^4 + 2*(`$1')^4 - 12*x^2*(`$1')^2) - 4; -# } - -# alternative: |cos(z^4)| = 1 - define f1 { Z: (x,$1) - Z4: Zprod(Zprod(Z,Z),Zprod(Z,Z)) - $2 = zabs(Zcos(Z4)) - 1 - } - - ni = 200 - for i=10 to ni do { x = i/ni*3 - findroot( f1, 0, 0.2, 1e-8, y ) - P[i-10]: x,y } - np = ni-10 - - for deg=0 to 359 by 45 do { - for i=0 to np do { Z[i]: rot_(P[i].x,P[i].y,deg*dtor_) } - fitcurve(Z,np,thick 2 outlined "blue") - for i=0 to np do { Z[i]: rot_(P[i].x,-P[i].y,deg*dtor_) } - fitcurve(Z,np,thick 2 outlined "blue") - } - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/birds.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/birds.m4 deleted file mode 100644 index 4b42ea35af6..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/birds.m4 +++ /dev/null @@ -1,36 +0,0 @@ -.PS -# Birds.m4 -gen_init - -scale = 50 -linethick = 2*linethick - -define bird {[ - line shaded "$1" from (0,0) to \ - (10,-5) to (19,8) to (35,7) to (38,-12)+(0,2) to (60,0) to\ - (75,23) to (80,40) to (52,37)+(2,2) to (74,50) to (52,50) to \ - (60,60) to (38,48)+(0,2) to (35,67) to (19,68) to (10,55) to \ - (0,60) to (-8,50) to (14,50) to (-8,37)+(2,2) to (20,40) to \ - (15,23) to (0,0) -E: (80,40) -W: (20,40) -N: (19,68) -S: (19,8) - line outlined "gray" from (35,15) down 10 right 25 - line outlined "gray" from (40,20) right 25 down 8 - line outlined "gray" from (42,25) right 28 down 6 - line outlined "gray" from (40,30) right 32 down 4 - circle outlined "gray" rad 1 at (1,55) - circle outlined "gray" rad 4 at (24,55) -]} - - ncols = 4 - nrows = 4 - right - for i=0 to nrows-1 do { - for j=0 to ncols-1 do { move to (j*60,-i*60) - if (i+j)%2==0 then { bird(black) } else { bird(white) } - } - } - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/bistable.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/bistable.m4 deleted file mode 100644 index ac49023863b..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/bistable.m4 +++ /dev/null @@ -1,35 +0,0 @@ -.PS -# `bistable.m4' -cct_init # Default initialization - - up_ -rgbdraw(1,0,0, -Q1: bi_tr(,R) # Q1 upward with base to the right - llabel(,Q_1) ) # Label to left of last [] -rgbdraw(0,0,1, -Q2: bi_tr with .C at Q1.C+(elen_*7/4,0) # Q2 with base to left - rlabel(,Q_2) ) - - ground(at Q1.E) - ground(at Q2.E) - - line right_ dimen_/3 from Q1.B # Extend the base conductors -B1: Here - line left_ dimen_/3 from Q2.B -B2: Here - - resistor(up_ elen_*0.75 from Q1.C); llabel(,"$R_L$" wid 0.16) # Load resistors - line to (Q2.C,Here) "$V_{\hbox{cc}}$" below - resistor(down_ to Q2.C); llabel(,R_L) - - move to Q1.C+(0,dimen_/5) - { resistor(right_ to (B1,Here)); llabel(,R_1) -X: line to B2 } # Label the line to be jumped - resistor(from (Q2.C,Here) left_ to (B2,Here)); rlabel(,R_1) - crossover(to B1,R,X) - - resistor(down_ elen_*0.75); rlabel(,R_2) # Bias resistors - {"$-V_{\hbox{cc}}$" rjust} - line to (B2,Here) - resistor(up_ to B2); rlabel(,R_2) -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/brace.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/brace.m4 deleted file mode 100644 index 3cf80f87635..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/brace.m4 +++ /dev/null @@ -1,80 +0,0 @@ -.PS -# brace.m4 -gen_init -NeedDpicTools - -divert(-1) - `brace(linespec,depth,arm thickness,attributes) - Curly brace along linespec - default depth is linewid/5 - attributes = eg - thick 0.4 outlined "string" shaded "string" - (default black)' -define(`brace',`rpoint_(ifelse(`$1',,`to rvec_(linewid,0)',`$1')) - M4brS: last line.start; M4brE: last line.end - [ brdepth = ifelse(`$2',,linewid/5,`$2') - brthick = ifelse(`$3',,brdepth/6,`$3') - define(`m4braceattribs', - `ifelse(`$4',,`thick 0.4 shaded rgbstring(0,0,0)',`$4')')dnl - tension = 0.55 - halfwid = distance(M4brS,M4brE) - smallrad = brdepth-brthick - bigrad = brdepth+brthick - for sgn=1 to -1 by -2 do { - S: rvec_(sgn*halfwid/2,0) - A: S+vec_(0,smallrad/2) - B: vec_(0,smallrad/2) - T: vec_(0,brdepth) - C: vec_(0,bigrad/2) - D: vec_(sgn*halfwid/2,bigrad/2) - {spline tension m4braceattribs \ - from S to tension between S and A \ - then to tension between A-vec_(sgn*bigrad/2,0) and A \ - then to A-vec_(sgn*bigrad/2,0) \ - then to B+vec_(sgn*bigrad/2,0) \ - then to tension between B+vec_(sgn*bigrad/2,0) and B \ - then to tension between T and B \ - then to T \ - then to tension between T and C \ - then to tension between C+vec_(sgn*bigrad/2,0) and C \ - then to C+vec_(sgn*bigrad/2,0) \ - then to D-vec_(sgn*bigrad/2,0) \ - then to tension between D-vec_(sgn*bigrad/2,0) and D \ - then to tension between S and D \ - then to S } - } - E: (0,0) -] with .E at 0.5 between M4brS and M4brE') -divert(0)dnl - - del = 0.2 - maxht = 2 - minht = 0.3 - n = 16 - hmax = 360 -R1: [ - for i=0 to n-1 do { - x = i/n - y = minht*(1-x)+maxht*x - hsvtorgb(x*hmax,1,1,r,g,b) - brace(from (-i*del,-y/2) up y,,,thick 0.4 \ - shaded rgbstring(r,g,b)) - brace(from ((i+1)*del,y/2) down y,,,thick 0.4 \ - outlined rgbstring(r,g,b) \ - shaded rgbstring(r,g,b)) - } - ] -R2: [ - for i=0 to n-1 do { - x = i/n - y = minht*(1-x)+maxht*x - hsvtorgb(x*hmax,1,1,r,g,b) - brace(from (-i*del,-y/2) up y,5bp__+x*20bp__,2bp__+x*13bp__,thick 0.4 \ - shaded rgbstring(r,g,b)) - brace(from ((i+1)*del,y/2) down y,5bp__+x*20bp__,2bp__+x*13bp__,thick 0.4 \ - outlined rgbstring(r,g,b) \ - shaded rgbstring(r,g,b)) - } - ] with .n at R1.s+(0,-0.2) - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/chaos.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/chaos.m4 deleted file mode 100644 index 17ae070e58d..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/chaos.m4 +++ /dev/null @@ -1,39 +0,0 @@ -.PS -# chaos.m4 -# Example simulation of chaos equations. -gen_init -scale = 10 -define(`FF',`dnl - `$4' = `$1'+dt*10*(-`$1'+`$2') - `$5' = `$2'+dt*(28*`$1'-`$2'-`$1'*`$3') - `$6' = `$3'+dt*(-8*`$3'/3+`$1'*`$2') ') -[ -x0 = 1 -y0 = 0 -z0 = 0 -dt = 0.005 -nN = 100 -for i = 1 to nN do { - for j = 1 to 8 do { - FF(x0,y0,z0,x1,y1,z1) - FF(x1,y1,z1,x2,y2,z2) - FF(x2,y2,z2,x3,y3,z3) - FF(x3,y3,z3,x4,y4,z4) - spline from x0,y0 to x1,y1 then to x2,y2 then to x3,y3 then to x4,y4 - x0 = x4; y0 = y4; z0 = z4 - } - } -arrow from (-15,0) to (15,0); "$x$" ljust -line up 1 from (10,0); "$ 10$" at last line.start below -line up 1 from (-10,0); "$-10$" at last line.start below -arrow from (0,-15) to (0,15); "$y$" above -line right 1 from (0,10); "$ 10$" at last line.start rjust -line right 1 from (0,-10); "$-10$" at last line.start rjust -"$ 0$" at (0,0) below rjust -] -`"\parbox{2.5in}{\begin{eqnarray*} - \dot{x}_1 & = & 10(-x_1+x_2)\\ - \dot{x}_2 & = & 28x_1-x_2-x_1x_3\\ - \dot{x}_3 & = & -8x_3/3+x_1x_2 - .\end{eqnarray*}}"' at last [].s below -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/clock.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/clock.m4 deleted file mode 100644 index 3431068d9bf..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/clock.m4 +++ /dev/null @@ -1,20 +0,0 @@ -.PS -# clock.m4 -gen_init - - linethick = 1.5 - arrowwid = 5 pt__ - - rgbfill(255/255,250/255,205/255, - Clock: circle rad 0.75 at (0,0) ) - - command "\newcounter{hour}" - for time=1 to 12 do { - sprintf("\setcounter{hour}{%g}\Roman{hour}",time) \ - at Rect_(Clock.rad*0.85,90-time*30) - } - line <-> from Rect_(Clock.rad*0.95,90-8.5*30) to Clock \ - then to Rect_(Clock.rad*0.7,90-3.5*30) - line thick 1 outline "red" from Clock to Rect_(Clock.rad*0.95,90-0.75*30) - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ByteDPV.svg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ByteDPV.svg deleted file mode 100644 index 317f9367f33..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ByteDPV.svg +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - -B0STDISBL (reset pin is enabled) - -WDTON (WDT not always on) - -SPIEN (allow serial programming) - -CKOPT (full output swing) - -EESAVE (don't preserve EEPB0OM over chip erase) - -BOOTSZ1 - -BOOTSZ0 - -BOOTB0ST (boot reset vector at 0x0000) - -1 - -0 - -0 - -1 - -0 - -0 - -1 - -1 - -0xc9 - - - - - - - - - - - - - - - - - - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ConnDPV.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ConnDPV.m4 index 9500cd8dd08..dd777f1fe4b 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ConnDPV.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ConnDPV.m4 @@ -3,65 +3,73 @@ cct_init(svg_font(sans-serif,10.5bp__)) T:[ + ifelse(ifmpost(T)`'ifpostscript(T),,`command "{\sf"') S1: tstrip(U) thinlines_ arrow <- left 0.15 from S1.L1; "L1" rjust arrow <- left 0.15 from S1.L4; "L4" wid 0.2 rjust - "..." at (0.5 between last "" and 2nd last "")+(-0.15,0.02) + ":" at (0.5 between last "" and 2nd last "")+(0,0.02) arrow <- right 0.25 from S1.R1; "R1" ljust arrow <- right 0.25 from S1.R4; "R4" ljust - "..." at (0.5 between last "" and 2nd last "")+(0.15,0.02) + ":" at (0.5 between last "" and 2nd last "")+(0.05,0.02) arrow <- right 0.15 up 0.10 from S1.T1; "T1" ljust arrow <- right 0.15 up 0.10 from S1.T4; "T4" ljust - "..." at (0.5 between last "" and 2nd last "")+(0.15,0.02) + ":" at (0.5 between last "" and 2nd last "")+(0.15,0.02) thicklines_ CS1: "`tstrip(U)'" at S1.s+(0,-0.15) - S2: tstrip(R,5,DO;wid=1.0;ht=0.25) with .sw at S1.se+(0.7,0.15) + S2: tstrip(R,5,DO;wid=1.0;ht=0.25) with .sw at S1.se+(0.8,0.15) thinlines_ arrow <- up 0.2 right 0.1 from S2.T1; "T1" above arrow <- up 0.2 right 0.1 from S2.T5; "T5" above "..." at 0.5 between last "" and 2nd last "" above - CS2: `"tstrip(R,5,"' ljust \ - `" DO;wid=1.0;ht=0.25)"' ljust at S2.sw+(-0.1,-0.2) + CS2: `"tstrip(R,5,"' ht 0.1 ljust \ + `"DO;wid=1.0;ht=0.25)"' ljust at S2.sw+(-0.1,-0.2) + ifelse(ifmpost(T)`'ifpostscript(T),,`command "}"') ] C: [ C1: ccoax - `"ccoax "' at C1.s below + `"ccoax"' at C1.s below thinlines_ - arrow <- up 0.1 right 0.1 from C1.C.ne; "C" ljust - arrow <- down 0.05 right 0.1 from C1.S.e; "S" wid 0.1 ljust + arrow <- down 0.05 left 0.15 from C1.C.w; "svg_it(C)" rjust + arrow <- down 0.05 right 0.1 from C1.S.e; "svg_it(S)" ljust thicklines_ - C2: ccoax(at C1+(0,0.3),F) - `"ccoax(,F)"' wid 0.65 at C2.ne ljust - ] with .C1.sw at T.S2.se+(0.6,0.0) + C2: ccoax(at C1+(0,0.4),F) + `"ccoax(,F)"' at C2.s below + ] with .w at T.e+(0.6,0.0) + +B: [ + tbox(V_2) + { "`tbox'(V`'svg_sub(2))" at last [].s below } + tbox(V_1,,,<) at last []+(0,-0.4) + { "`tbox'(V`'svg_sub(1),,,svg_lt)" at last [].s below } + tbox(V_1,,,<>) at last []+(0,-0.4) + { "`tbox'(V`'svg_sub(1),,,svg_lt`'svg_gt)" at last [].s below } +] with .w at C.e + (0.5,-0.1) Y: [ - tconn(,O) - {`"tconn(,O)"' at last line.c+(0,-0.2) wid 43 pt__ } + P1: tconn(,O) + {"`tconn'(,O)" at last line.c+(0,-0.2) wid 43 pt__ } move to Here+(0.3,0) - P1: tconn(,>) - {`"(,>)"' at last line.c+(0,-0.2)} - move to P1.end+(0.3,0) - tconn(,>>) - {`"(,>>)"' at last line.c+(0,-0.2)} - move to P1.start+(0,linewid) - P3: tconn(,<) - {`"tconn(,<)"' at last line.c+(0,-0.2)} + P2: tconn(,>) + {"...(,svg_gt)" at last line.c+(0,-0.2)} + move to P2.end+(0.3,0) + P3: tconn(,>>) + {"...(,svg_gt`'svg_gt)" at last line.c+(0,-0.2)} move to P3.end+(0.3,0) - tconn(,<<) - {`"(,<<)"' at last line.c+(0,-0.2)} + P4: tconn(,<) + {"...(,svg_lt)" at last line.c+(0,-0.2)} + move to P4.end+(0.3,0) + P5: tconn(,<<) + {"...(,svg_lt`'svg_lt)" at last line.c+(0,-0.2)} + move to P5.end+(0.3,0) + P6: tconn(,A) + {`"...(,A)"' at last line.c+(0,-0.2)} + move to P6.end+(0.3,0) + P7: tconn(,M) + {`"...(,M)"' at last line.c+(0,-0.2)} -] with .sw at (C.e.x-0.3,T.s.y) - -B: [ - tbox(V`'svg_sub(1)) - { `"tbox'(V`'svg_sub(1))" wid 47bp__ with .nw at last [].sw+(0,-4bp__) } - tbox(V`'svg_sub(2),,,<) with .sw at last [].se+(0.75,0) - { `"tbox'(V`'svg_sub(2)`,,,<)"' at last [].s below } - tbox(V`'svg_sub(3),,,<>) with .sw at last [].se+(0.75,0) - { `"tbox'(V`'svg_sub(3)`,,,<>)"' at last [].s below } -] with .nw at T.sw+(0,-0.2) +] with .nw at T.sw+(0,-0.35) command "" # end font .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ConnectorsDPV.pic b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ConnectorsDPV.pic deleted file mode 100644 index 1fe2aeabfac..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ConnectorsDPV.pic +++ /dev/null @@ -1,368 +0,0 @@ -.PS -# ConnectorsDPV.m4 -# log_init Version 10.1: SVG m4 macro settings. - - # gen_init Version 10.1: SVG m4 macro settings. - - - define rpoint__ { - rp_wid = last line.end.x-last line.start.x - rp_ht = last line.end.y-last line.start.y - rp_len = sqrt(abs((rp_wid)^2+(rp_ht)^2)); move to last line.start - rp_ang = atan2(rp_ht,rp_wid) } - - rtod_ = 57.295779513082323; dtor_ = 0.017453292519943295 - twopi_ = 6.2831853071795862; pi_ = (twopi_/2) - rp_ang = 0; right - - - linethick = 0.8 - arrowwid = 0.05*scale; arrowht = 0.1*scale - - - # gen_init end - - -# log_init end - - - -m4thtmp=textht; dptextratio=0.71; m4thtmp=textht; textht=(8.5*(scale/72))*dptextratio; -command "" - - -#vg_rot_init(test) - -# svg_rot_init begin - if dpicopt > 0 then { copy "/cygdrive/d/Dwight/lib/dpictools.pic" } - - -# Extract from the .svg file the x= y= coordinates -# that appear after each transform="rotate(.." line - retcode = ( sh "awk -e \"/transform=\\"rotate/ { r=1 }; /x=\\".*y=\\"/ { if(r==1){ print; r=0 } }\" ConnectorsDPV.tmp | sed -e \"s/x=\\"\([0-9.]*\)\\" y=\\"\([0-9.]*\)\\".*/\1 \2/\" > ConnectorsDPV.cor" ) - if retcode != 0 then { print " - Awk failure. - Awk and sed are required by svg_rot to rotate svg text. - " } - svgrot_k = 0 - define svg_rotcoords { if "$1" != "" then { svgrot_k += 1 - svg_rx[svgrot_k] = $1; svg_ry[svgrot_k] = $2 } - } - copythru(svg_rotcoords, ConnectorsDPV.cor) - sh "rm -f ConnectorsDPV.tmp ConnectorsDPV.cor" - svgrot_i = 0 - - -# `svg_rot(degrees,"text",[at position]) -# Rotate text degrees ccw -# Requires svg_rot_init(filename) -# which uses both awk and sed. -# The source must be processed twice by m4 and dpic.' - define svg_rot { if retcode != 0 then {$2} else { - if "$1" != "" then { svg_rang = -($1) } else { svg_rang = -90 } - if svgrot_k != 0 then { svgrot_i +=1 - command sprintf("",svg_rang,\ - svg_rx[svgrot_i]+textht/2*sin((svg_rang)*dtor_),\ - svg_ry[svgrot_i]+textht/2*(1-cos((svg_rang)*dtor_))) }\ - else { command sprintf("",svg_rang) } - if "$3"=="" then { $2 } \ - else { $2 $3 - (sin((svg_rang)*dtor_),(cos((svg_rang)*dtor_)-1))*textht/2 } - command "" } } - - -# svg_rot_init end - - -# ArduinoUno -# "Arduino Uno Rev 3" at last [].Connector.s below - Ar: [ - # - Connector: box wid 24*(linewid/10) ht 20*(3*(linewid/10)) -# - plen = 2*(linewid/10) -# -Pin6: line left plen from Connector.nw-(0,(5+1)*(3*(linewid/10))) - { "IOREF" ljust at last line.start } -Pin7: line left plen from Connector.nw-(0,(5+2)*(3*(linewid/10))) - { "RESET" ljust at last line.start } -Pin8: line left plen from Connector.nw-(0,(5+3)*(3*(linewid/10))) - { "+3V3" ljust at last line.start } -Pin9: line left plen from Connector.nw-(0,(5+4)*(3*(linewid/10))) - { "+5V" ljust at last line.start } -Pin10: line left plen from Connector.nw-(0,(5+5)*(3*(linewid/10))) - { "GND" ljust at last line.start } -Pin11: line left plen from Connector.nw-(0,(5+6)*(3*(linewid/10))) - { "GND" ljust at last line.start } -Pin12: line left plen from Connector.nw-(0,(5+7)*(3*(linewid/10))) - { "VIN" ljust at last line.start } - -Pin14: line left plen from Connector.nw-(0,(5+9)*(3*(linewid/10))) - { "A0" ljust at last line.start } -Pin15: line left plen from Connector.nw-(0,(5+10)*(3*(linewid/10))) - { "A1" ljust at last line.start } -Pin16: line left plen from Connector.nw-(0,(5+11)*(3*(linewid/10))) - { "A2" ljust at last line.start } -Pin17: line left plen from Connector.nw-(0,(5+12)*(3*(linewid/10))) - { "A3" ljust at last line.start } -Pin18: line left plen from Connector.nw-(0,(5+13)*(3*(linewid/10))) - { "A4" ljust at last line.start } -Pin19: line left plen from Connector.nw-(0,(5+14)*(3*(linewid/10))) - { "A5" ljust at last line.start } - -# -Pin21: line right plen from Connector.ne-(0,1*(3*(linewid/10))) - { "SCL" rjust at last line.start } -Pin20: line right plen from Connector.ne-(0,2*(3*(linewid/10))) - { "SDA" rjust at last line.start } -Pin19: line right plen from Connector.ne-(0,3*(3*(linewid/10))) - { "AREF" rjust at last line.start } -Pin18: line right plen from Connector.ne-(0,4*(3*(linewid/10))) - { "GND" rjust at last line.start } -Pin17: line right plen from Connector.ne-(0,5*(3*(linewid/10))) - { "~D13" rjust at last line.start } -Pin16: line right plen from Connector.ne-(0,6*(3*(linewid/10))) - { "D12" rjust at last line.start } -Pin15: line right plen from Connector.ne-(0,7*(3*(linewid/10))) - { "~D11" rjust at last line.start } -Pin14: line right plen from Connector.ne-(0,8*(3*(linewid/10))) - { "~D10" rjust at last line.start } -Pin13: line right plen from Connector.ne-(0,9*(3*(linewid/10))) - { "~D9" rjust at last line.start } -Pin12: line right plen from Connector.ne-(0,10*(3*(linewid/10))) - { "D8" rjust at last line.start } - -Pin10: line right plen from Connector.ne-(0,12*(3*(linewid/10))) - { "D7" rjust at last line.start } -Pin9: line right plen from Connector.ne-(0,13*(3*(linewid/10))) - { "~D6" rjust at last line.start } -Pin8: line right plen from Connector.ne-(0,14*(3*(linewid/10))) - { "~D5" rjust at last line.start } -Pin7: line right plen from Connector.ne-(0,15*(3*(linewid/10))) - { "D4" rjust at last line.start } -Pin6: line right plen from Connector.ne-(0,16*(3*(linewid/10))) - { "~D3" rjust at last line.start } -Pin5: line right plen from Connector.ne-(0,17*(3*(linewid/10))) - { "D2" rjust at last line.start } -Pin4: line right plen from Connector.ne-(0,18*(3*(linewid/10))) - { "TX D1" rjust at last line.start } -Pin3: line right plen from Connector.ne-(0,19*(3*(linewid/10))) - { "RX D0" rjust at last line.start } - -# - ] #with .sw at last [].se+(0.25,0) - "Arduino Leonardo" at last [].Connector.s below - - RPI: [ - # - GPIO: box wid 34*(linewid/10) ht 21*(3*(linewid/10)) - plen = 6*(linewid/10) -# -define A_LeftGPIO { - exec sprintf("Pin%g: line left plen from GPIO.nw-(0,%g)",\ - 2*($1)-1,($1)*(3*(linewid/10))) - { "$3" ljust at last line.start } - "$2" at last line.c above } -# -A_LeftGPIO(1,,3V3) -A_LeftGPIO(2,2,SDA1) -A_LeftGPIO(3,3,SCL1) -A_LeftGPIO(4,4,GPIO_GCLK) -A_LeftGPIO(5,,GND) -A_LeftGPIO(6,17,GPIO_GEN0) -A_LeftGPIO(7,27,GPIO_GEN2) -A_LeftGPIO(8,22,GPIO_GEN3) -A_LeftGPIO(9,,3V3) -A_LeftGPIO(10,10,SPI_MOSI) -A_LeftGPIO(11,9,SPI_MISO) -A_LeftGPIO(12,11,SPI_SCLK) -A_LeftGPIO(13,,GND) -A_LeftGPIO(14,,ID_SD) -A_LeftGPIO(15,5,) -A_LeftGPIO(16,6,) -A_LeftGPIO(17,13,) -A_LeftGPIO(18,19,) -A_LeftGPIO(19,26,) -A_LeftGPIO(20,,GND ) - -# -define A_RightGPIO { - exec sprintf("Pin%g: line right plen from GPIO.ne-(0,%g)",\ - 2*($1),($1)*(3*(linewid/10))) - { "$3" rjust at last line.start } - "$2" at last line.c above } -# -A_RightGPIO(1,,5V) -A_RightGPIO(2,,5V) -A_RightGPIO(3,,GND) -A_RightGPIO(4,14,TXD0) -A_RightGPIO(5,15,RXD0) -A_RightGPIO(6,18,GPIO_GEN1) -A_RightGPIO(7,,GND) -A_RightGPIO(8,23,GPIO_GEN4) -A_RightGPIO(9,24,GPIO_GEN5) -A_RightGPIO(10,,GND) -A_RightGPIO(11,25,GPIO_GEN6) -A_RightGPIO(12,8,SPI_CEO_N) -A_RightGPIO(13,7,SPI_CE1_N) -A_RightGPIO(14,,ID_SC) -A_RightGPIO(15,,GND) -A_RightGPIO(16,12,) -A_RightGPIO(17,,GND) -A_RightGPIO(18,16,) -A_RightGPIO(19,20,) -A_RightGPIO(20,21, ) - -# - ] with .sw at last [].se+(0.25,0) - "Raspberry Pi 4 GPIO" at last [].GPIO.s below - - HD: [ - # - Base:[line up 19*(3*(linewid/10))+16*(linewid/10)*2/3/2 then right 16*(linewid/10)*2/3 \ - then right 16*(linewid/10)/3 down 16*(linewid/10)/3 \ - then down 19*(3*(linewid/10))+16*(linewid/10)*2/3-2*16*(linewid/10)/3 then down 16*(linewid/10)/3 left 16*(linewid/10)/3 \ - then left 16*(linewid/10)*2/3 then to Here] - plen = 6*(linewid/10) -# - Pin1: line left plen from Base.nw-(0,16*(linewid/10)/3+(1-1/2)*(3*(linewid/10))) - {"HPD" ljust at last line.start} - "1" at last line.c above -Pin2: line left plen from Base.nw-(0,16*(linewid/10)/3+(2-1/2)*(3*(linewid/10))) - {"UTILITY" ljust at last line.start} - "2" at last line.c above -Pin3: line left plen from Base.nw-(0,16*(linewid/10)/3+(3-1/2)*(3*(linewid/10))) - {"D2+" ljust at last line.start} - "3" at last line.c above -Pin4: line left plen from Base.nw-(0,16*(linewid/10)/3+(4-1/2)*(3*(linewid/10))) - {"D2_SH" ljust at last line.start} - "4" at last line.c above -Pin5: line left plen from Base.nw-(0,16*(linewid/10)/3+(5-1/2)*(3*(linewid/10))) - {"D2-" ljust at last line.start} - "5" at last line.c above -Pin6: line left plen from Base.nw-(0,16*(linewid/10)/3+(6-1/2)*(3*(linewid/10))) - {"D1+" ljust at last line.start} - "6" at last line.c above -Pin7: line left plen from Base.nw-(0,16*(linewid/10)/3+(7-1/2)*(3*(linewid/10))) - {"D1_SH" ljust at last line.start} - "7" at last line.c above -Pin8: line left plen from Base.nw-(0,16*(linewid/10)/3+(8-1/2)*(3*(linewid/10))) - {"D1-" ljust at last line.start} - "8" at last line.c above -Pin9: line left plen from Base.nw-(0,16*(linewid/10)/3+(9-1/2)*(3*(linewid/10))) - {"D0+" ljust at last line.start} - "9" at last line.c above -Pin10: line left plen from Base.nw-(0,16*(linewid/10)/3+(10-1/2)*(3*(linewid/10))) - {"D0_SH" ljust at last line.start} - "10" at last line.c above -Pin11: line left plen from Base.nw-(0,16*(linewid/10)/3+(11-1/2)*(3*(linewid/10))) - {"D0-" ljust at last line.start} - "11" at last line.c above -Pin12: line left plen from Base.nw-(0,16*(linewid/10)/3+(12-1/2)*(3*(linewid/10))) - {"CLK+" ljust at last line.start} - "12" at last line.c above -Pin13: line left plen from Base.nw-(0,16*(linewid/10)/3+(13-1/2)*(3*(linewid/10))) - {"CLK_SH" ljust at last line.start} - "13" at last line.c above -Pin14: line left plen from Base.nw-(0,16*(linewid/10)/3+(14-1/2)*(3*(linewid/10))) - {"CLK-" ljust at last line.start} - "14" at last line.c above -Pin15: line left plen from Base.nw-(0,16*(linewid/10)/3+(15-1/2)*(3*(linewid/10))) - {"CEC" ljust at last line.start} - "15" at last line.c above -Pin16: line left plen from Base.nw-(0,16*(linewid/10)/3+(16-1/2)*(3*(linewid/10))) - {"GND" ljust at last line.start} - "16" at last line.c above -Pin17: line left plen from Base.nw-(0,16*(linewid/10)/3+(17-1/2)*(3*(linewid/10))) - {"SCL" ljust at last line.start} - "17" at last line.c above -Pin18: line left plen from Base.nw-(0,16*(linewid/10)/3+(18-1/2)*(3*(linewid/10))) - {"SDA" ljust at last line.start} - "18" at last line.c above -Pin19: line left plen from Base.nw-(0,16*(linewid/10)/3+(19-1/2)*(3*(linewid/10))) - {"+5V" ljust at last line.start} - "19" at last line.c above - -L1: line from Base.nw+(16*(linewid/10)*2/3-(3*(linewid/10)),0) up plen - svg_rot(90,"21",at last line.c +(-4*(scale/72),0)) - svg_rot(90,"SH2",at last line.start + (4*(scale/72),-8*(scale/72))) - line from Base.nw+(16*(linewid/10)*2/3-2*(3*(linewid/10)),0) up plen - svg_rot(90,"20",at last line.c+(-4*(scale/72),0)) - svg_rot(90,"SH1",at last line.start + (4*(scale/72),-8*(scale/72))) - line from Base.sw+(16*(linewid/10)*2/3-(3*(linewid/10)),0) down plen - svg_rot(90,"23",at last line.c+(-4*(scale/72),0)) - svg_rot(90,"SH4",at last line.start + (4*(scale/72),14*(scale/72))) - line from Base.sw+(16*(linewid/10)*2/3-2*(3*(linewid/10)),0) down plen - svg_rot(90,"22",at last line.c+(-4*(scale/72),0)) - svg_rot(90,"SH3",at last line.start + (4*(scale/72),14*(scale/72))) -# - ] with .nw at last [].ne+(0.25,0.5) - "Micro" rjust at HD.Base.sw "HDMI" rjust - - S: [ - # - Base: box wid 18*(linewid/10) ht 14*(3*(linewid/10)) rad 5/3*(3*(linewid/10)) - plen = 6*(linewid/10) -# - B12: line left plen from Base.n-(18*(linewid/10)/2,(1+0.5)*(3*(linewid/10))) - {"GND" ljust at last line.start} -B11: line left plen from Base.n-(18*(linewid/10)/2,(2+0.5)*(3*(linewid/10))) - {"RX1+" ljust at last line.start} -B10: line left plen from Base.n-(18*(linewid/10)/2,(3+0.5)*(3*(linewid/10))) - {"RX1-" ljust at last line.start} -B9: line left plen from Base.n-(18*(linewid/10)/2,(4+0.5)*(3*(linewid/10))) - {"VBUS" ljust at last line.start} -B8: line left plen from Base.n-(18*(linewid/10)/2,(5+0.5)*(3*(linewid/10))) - {"SBU2" ljust at last line.start} -B7: line left plen from Base.n-(18*(linewid/10)/2,(6+0.5)*(3*(linewid/10))) - {"D-" ljust at last line.start} -B6: line left plen from Base.n-(18*(linewid/10)/2,(7+0.5)*(3*(linewid/10))) - {"D+" ljust at last line.start} -B5: line left plen from Base.n-(18*(linewid/10)/2,(8+0.5)*(3*(linewid/10))) - {"CC2" ljust at last line.start} -B4: line left plen from Base.n-(18*(linewid/10)/2,(9+0.5)*(3*(linewid/10))) - {"VBUS" ljust at last line.start} -B3: line left plen from Base.n-(18*(linewid/10)/2,(10+0.5)*(3*(linewid/10))) - {"TX2-" ljust at last line.start} -B2: line left plen from Base.n-(18*(linewid/10)/2,(11+0.5)*(3*(linewid/10))) - {"TX2+" ljust at last line.start} -B1: line left plen from Base.n-(18*(linewid/10)/2,(12+0.5)*(3*(linewid/10))) - {"GND" ljust at last line.start} - -# - A1: line right plen from Base.n+(18*(linewid/10)/2,-(1+0.5)*(3*(linewid/10))) - {"GND" rjust at last line.start} -A2: line right plen from Base.n+(18*(linewid/10)/2,-(2+0.5)*(3*(linewid/10))) - {"TX1+" rjust at last line.start} -A3: line right plen from Base.n+(18*(linewid/10)/2,-(3+0.5)*(3*(linewid/10))) - {"TX1-" rjust at last line.start} -A4: line right plen from Base.n+(18*(linewid/10)/2,-(4+0.5)*(3*(linewid/10))) - {"VBUS" rjust at last line.start} -A5: line right plen from Base.n+(18*(linewid/10)/2,-(5+0.5)*(3*(linewid/10))) - {"CC1" rjust at last line.start} -A6: line right plen from Base.n+(18*(linewid/10)/2,-(6+0.5)*(3*(linewid/10))) - {"D+" rjust at last line.start} -A7: line right plen from Base.n+(18*(linewid/10)/2,-(7+0.5)*(3*(linewid/10))) - {"D-" rjust at last line.start} -A8: line right plen from Base.n+(18*(linewid/10)/2,-(8+0.5)*(3*(linewid/10))) - {"SBU1" rjust at last line.start} -A9: line right plen from Base.n+(18*(linewid/10)/2,-(9+0.5)*(3*(linewid/10))) - {"VBUS" rjust at last line.start} -A10: line right plen from Base.n+(18*(linewid/10)/2,-(10+0.5)*(3*(linewid/10))) - {"RX2-" rjust at last line.start} -A11: line right plen from Base.n+(18*(linewid/10)/2,-(11+0.5)*(3*(linewid/10))) - {"RX2+" rjust at last line.start} -A12: line right plen from Base.n+(18*(linewid/10)/2,-(12+0.5)*(3*(linewid/10))) - {"GND" rjust at last line.start} - -# - ] with .sw at (HD.e.x+0.25,RPI.s.y) - "USB-C Socket" at S.Base.s below - "B12" at S.B12.end above ljust - "B1" at S.B1.end above ljust - "A1" at S.A1.end above rjust - "A12" at S.A12.end above rjust - - command "" - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ConnectorsDPV.svg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ConnectorsDPV.svg deleted file mode 100644 index 4b63a641be0..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ConnectorsDPV.svg +++ /dev/null @@ -1,853 +0,0 @@ - - - - - - - - - -IOREF - -RESET - -+3V3 - -+5V - -GND - -GND - -VIN - -A0 - -A1 - -A2 - -A3 - -A4 - -A5 - -SCL - -SDA - -AREF - -GND - -~D13 - -D12 - -~D11 - -~D10 - -~D9 - -D8 - -D7 - -~D6 - -~D5 - -D4 - -~D3 - -D2 - -TX D1 - -RX D0 -Arduino Leonardo - - -3V3 - - -SDA1 -2 - -SCL1 -3 - -GPIO_GCLK -4 - -GND - - -GPIO_GEN0 -17 - -GPIO_GEN2 -27 - -GPIO_GEN3 -22 - -3V3 - - -SPI_MOSI -10 - -SPI_MISO -9 - -SPI_SCLK -11 - -GND - - -ID_SD - - - -5 - - -6 - - -13 - - -19 - - -26 - -GND - - -5V - - -5V - - -GND - - -TXD0 -14 - -RXD0 -15 - -GPIO_GEN1 -18 - -GND - - -GPIO_GEN4 -23 - -GPIO_GEN5 -24 - -GND - - -GPIO_GEN6 -25 - -SPI_CEO_N -8 - -SPI_CE1_N -7 - -ID_SC - - -GND - - - -12 - -GND - - - -16 - - -20 - - -21 -Raspberry Pi 4 GPIO - - -HPD -1 - -UTILITY -2 - -D2+ -3 - -D2_SH -4 - -D2- -5 - -D1+ -6 - -D1_SH -7 - -D1- -8 - -D0+ -9 - -D0_SH -10 - -D0- -11 - -CLK+ -12 - -CLK_SH -13 - -CLK- -14 - -CEC -15 - -GND -16 - -SCL -17 - -SDA -18 - -+5V -19 - - -21 - - -SH2 - - - -20 - - -SH1 - - - -23 - - -SH4 - - - -22 - - -SH3 - -Micro -HDMI - - -GND - -RX1+ - -RX1- - -VBUS - -SBU2 - -D- - -D+ - -CC2 - -VBUS - -TX2- - -TX2+ - -GND - -GND - -TX1+ - -TX1- - -VBUS - -CC1 - -D+ - -D- - -SBU1 - -VBUS - -RX2- - -RX2+ - -GND -USB-C Socket -B12 -B1 -A1 -A12 - - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/CsourceDPV.svg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/CsourceDPV.svg deleted file mode 100644 index 81aa8f201dd..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/CsourceDPV.svg +++ /dev/null @@ -1,1175 +0,0 @@ - - - - - - - - -R2 -150Ω - - - - - - - - - - - - - -Q13 -2N4236 - - - - - - - - - - - - - -Q14 -2N4239 - - - - - -R1 -20kΩ - - - - - - - - - - -i1 - - -+ -V1 -- - - - - - -R3 -150Ω - - - - -- -+ -A1 -Nexus -SQ-10A - - - -R14 -19kΩ - - - - - - -R13 -91kΩ - - -R6 -15kΩ - - - - -- -+ -A2 -Nexus -SQ-10A - - - - - - - - - - - - - - - -Q3 -2N5464 - - - - - - - - - - - - - -Q4 -2N4239 - - - - - - - - - - - - - - - -OMC-V -D4 -D3 - - - - - - - - -Q1 -2N3819 - - - - - - - - - - - - - -Q2 -2N4236 - - - - - - - - - - - - -D1 -D2 -OMC-V - - - - - - - - - - - - - - - -Q7 -2N5464 - - - - - - - - - - - - - -Q8 -2N4239 - - - - - - - - - - - - -Q5 -2N3819 - - - - - - - - - - - - - -Q6 -2N4236 - - - - - - -R11 -20Ω - - - - - -D5 -1N4729 - - - - - -C4 -0.68μF - - - - -C3 -0.68μF - - - - - - -C2 -0.1μF - - -R5 -100kΩ - - - - - - -C1 -1μF - - - - - -R9 -910Ω - - -R10 -910Ω - - - -R4 -100kΩ - - - - - - - - - - -Q11 -2N5464 - - - - - - - - - - - - - -Q10 -2N4239 - - - - - - --ECC - - - - - -D6 -1N4728 - - - - - - - - -Q12 -2N3819 - - - - - - - - - - - - - -Q9 -2N4236 - - - - - - -ECC - -R12 -20Ω - - - - - - - - -i2 - - -+ -V2 -- - - - - - - -R15 -200Ω - - - - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/EEPDPV.svg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/EEPDPV.svg deleted file mode 100644 index 25ca2367dd9..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/EEPDPV.svg +++ /dev/null @@ -1,662 +0,0 @@ - - - - - - - - - - - -Public supply - - - - - - - -20 kV - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -20 kV -1.25 MVA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Static Load - - -Electronic Load - -A/C - - -M - - -M - - -M - - -DER_A - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -SM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -SM - - - - - - - - - -Bus 1 -Bus 2 -Bus 3 -Bus 4 -TL1 50 km 69 kV -TL2 30 km -69 kV -TL2 20 km -69 kV -G1 50 MVA -13.8 kV -G2 30 MVA -13.8 kV -T1 50 MVA -13.8/69 kV Δ/Y -T2 30 MVA -69/13.8 kV Y/Δ -T3 50 MVA -13.8/69 kV Y/Δ -T4 20 MVA -69/6.9 kV Y/Δ -SM1 30 MVA -13.8 kV -SM2 20 MVA -6.9 kV - - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FlowDPV.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FlowDPV.m4 index e3543ae405b..70fc877618e 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FlowDPV.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FlowDPV.m4 @@ -1,7 +1,7 @@ .PS # FlowDPV.m4 gen_init(svg_font(sans-serif,11bp__,2.5bp__)) -ifdef(`FlowchartDefs_',,`include(../FlowchartDefs.m4)') +ifdef(`FlowchartDefs_',,`include(../FlowchartDefs.m4def)') define(`Thistle',`rgbstring(0.85,0.75,0.85)')dnl define(`RubineRed',`rgbstring(0.81,0,0.35)')dnl diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FlowDPV.svg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FlowDPV.svg deleted file mode 100644 index cda3c42bee1..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FlowDPV.svg +++ /dev/null @@ -1,890 +0,0 @@ - - - - - - - - -Fbox - - -Ftest - - -Fdata - - -Fprep - - - - - - - - -Fkeying - - -Fkeyboard - - - - - - -Fdocument - - - - -Fdelay - - - - - - - - - - - - -Fdisplay - - - - - - - - - - - - -Fstored - - - - -45 -Fconnect - - -Test 1 - -Task 1 - - - -Task 1.5 - - - - - - -Test 2 - -Task 2 -is bigger - - - - - - -Test 3 - -Task 3 - - - - - - - - - - - -.N -.S -.E -.W -Fcase - - -i < n - - - -Task - - - - -T -.N -.S -.E -.W -Fwhiledo - -Task - - - - -n > 5 - - -T -.N -.S -.E -.W -Frepeatuntil - - -A < B - -False - - - -True - - - - - - - -.N -.S -.E -.W -Fifthenelse - -Start - - - -First task - - - - -Test 1 - -Task - - - - -i ≥ 5 - - - - - - -A < B - -Left - - - -Right - - - - - - - -T - - - - - - - -T - - -Compound statements - - - - -Planejamento - -Execução - -Seleção - - -Avaliação do -Planejamento -Correto -Incompleto - - - - - - - - -Avaliação da -Execução -Correto -Incompleto - - - - - - - -Extração - - - - - -Conclusão - - - - - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FontsDPV.svg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FontsDPV.svg deleted file mode 100644 index 52f9d53f63e..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FontsDPV.svg +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - -Arial - - -ABCDEFG abcdefg - - -Helvetica - - -ABCDEFG abcdefg - - -Times - - -ABCDEFG abcdefg - - -Courier - - -ABCDEFG abcdefg - - -Cursive - - -ABCDEFG abcdefg - - -Verdana - - -ABCDEFG abcdefg - - -Georgia - - -ABCDEFG abcdefg - - -Palatino - - -ABCDEFG abcdefg - - -Garamond - - -ABCDEFG abcdefg - - -Bookman - - -ABCDEFG abcdefg - - -Trebuchet MS - - -ABCDEFG abcdefg - - -Arial Black - - -ABCDEFG abcdefg - - -Impact - - -ABCDEFG abcdefg - -Available fonts: these may be viewer-dependent - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FusesDPV.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FusesDPV.m4 index f45d0461beb..008a5cdc92d 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FusesDPV.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/FusesDPV.m4 @@ -4,7 +4,8 @@ cct_init(svg_font(sans-serif,11bp__)) movewid = 0.25 - {fuse ; {"`fuse'" at last line.c+(0,-0.2)} + { + fuse ; {"`fuse'" at last line.c+(0,-0.2)} move fuse(,D) ; {"`fuse(,D)'" at last line.c+(0,-0.2)} move @@ -18,21 +19,28 @@ movewid = 0.25 } move down; right_ { - cbreaker; {"`cbreaker'" at last line.c+(0,-0.25)} + fuse(,HB) ; {"`fuse(,HB)'" at last line.c+(0,-0.2)} + move + fuse(,HC,0.5,0.3) ; {"`...(,HC,0.5,0.3)'" at last line.c+(0,-0.25)} move - cbreaker(,R); {"`cbreaker(,R)'" at last line.c+(0,-0.25)} + cbreaker; {"`cbreaker'" at last line.c+(0,-0.2)} move - cbreaker(,,D); {"`...(,,D)'" at last line.c+(0,-0.25)} + cbreaker(,R,D); {"`...(,R,D)'" at last line.c+(0,-0.2)} move - cbreaker(,,T); {"`...(,,T)'" at last line.c+(0,-0.25)} + cbreaker(,,T); {"`...(,,T)'" at last line.c+(0,-0.2)} move - cbreaker(,,TS); {"`...(,,TS)'" at last line.c+(0,-0.25)} + cbreaker(,,TS); {"`...(,,TS)'" at last line.c+(0,-0.2) } } move down; right_ { - fuse(,HB) ; {"`fuse(,HB)'" at last line.c+(0,-0.2)} + jumper ; {"`jumper'" at last line.c+(0,-0.2) } + move + jumper(,CJBED) ; {"`...(,CJBED)'" at last line.c+(0,-0.2) } move - fuse(,HC,0.5,0.3) ; {"`(,HC,0.5,0.3)'" ljust at last line.start+(0,-0.25)} + jumper(,body=outlined "gray" shaded "gray") + { "`...(,body=outlined \"gray\" 'svg_backsl" wid 122bp__ \ + with .w at (last line.start, last "") + "` shaded \"gray\")'" at last "".sw+(0,-10bp__) ljust } } command "" # end font diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/HeathkitDPV.svg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/HeathkitDPV.svg deleted file mode 100644 index bafdb74ce67..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/HeathkitDPV.svg +++ /dev/null @@ -1,2010 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -10 -20 -30 -40 -50 -60 -70 -80 -90 -100 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -10 -20 -30 -40 -50 -60 -70 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -POWER SUPPLY -CIRCUIT BOARD - - - - -1 - -RED - -2 - -RED - -3 - -GRN - - - - - -GRN - - - - -6 VAC - -4 - -BRN - - -TO DIAL -LAMPS - -5 - -BLU - -7 - -BLU - -6 - -BLU-YEL - -BLK - - -BLK-YEL - - -BLK-GRN - - -BLK-RED - - - - - - - - - - -3 A FUSE -SLOW BLOW - - - - - - - - - -A - - -B - - - - - - - - - - - - - - - - - - - - - - -120 VAC -50/60 Hz - -1 - -4 - -2 - -5 - -3 - -6 - - - - - - - - -POWER - - -ON -OFF - - - - - - -25 - -R516 -22 - - - - - - - - - - - - - - - -#49 -HI -TEMP - - - - -BRN - -24 - - - - - -23 - - - - - -22 - -R514 -680 K - - - - - - - - - - - - -D508 - - - - - - -D506 - - - - - - -D509 - - - - - - -D507 - - - - -C507 -.22 - - - - - - - -57 -VAC - -21 - - -19 - -20 - - - - - - - - - - - -C504 -.22 - - - - - - - - -D504 - - - - - - - -C505 -100 -75 V - - - - - - - - - - -D503 - - - - - -100 VAC - - - - - - - - - - - -E - -B - -C - - - -R513 -1500 - - - - - -R511 -470 - - - -R512 -5600 -1 W - -Q503 -S2091 HI TEMP -CONTROL - - - - - -D505 - - - - - - -8 - - -R505 -12 K - - - - - - - -C503 -100 -70 V - - - - - - - - - - - - - - -E - -B - -C - - - -R504 -51 K - - - -Q502 -TA7311 -REGULATOR -CONTROL - -9 - - -10 - -R502 -150 - - -11 - -14 - -12 - -13 - - - - - -15 - - - - - - - - - - - -E - -B - -C - - - -Q501 -2N3055 -REGULATOR - - - -17 - -16 - -18 - - - - - - - - - - - - - -E - -B - -C - - - -R508 -680 - - - - - - -225 -10 W -5 % - - -R503 -290 10 W 5% - - - -R507 -100 - -Q504 -40409 -REGULATOR - -R501 -390 5W 5% - - -R506 -82 - - - - - - - - - -C501 -100 -30 V - - - - - - - - - -ZD501 - - - - - - - - - - -C502 -100 -30 V - - - - - - - - - -ZD502 - - - - - - - - - - -C506 -100 -30 V - - - - -GRY - -VIOL - -TO SIGNAL -METER CIRCUIT - -RED TO C508 - -VIOL - -RED - -WHT- -RED - -12.7 V SOURCE -TO MULTIPLEX - -WHT - -12 V SOURCE -TO FM TUNER -SOURCE SWITCH - -ORG - -15 V SOURCE -TO FM TUNER - -BLU - -WHT- -RED - -RED - -27 V SOURCE -TO CONTROL -PREAMP AND -PWR AMPLIFIER - -WHT- -GRY- -GRN - -50 V SOURCE -TO PHONO -PREAMP - - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/Makefile index ff4933c4645..30cd0044027 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/Makefile +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/Makefile @@ -1,8 +1,11 @@ +# +# LIBDIR = $$HOME/lib M4LIBS = svg.m4 DPVconfig.m4 M4LIBS = svg.m4 M4 = m4 # PDFCONVERT = pdf2svg +# The current dvisvgm outputs CRLF line endings PDFCONVERT = dvisvgm # To process a single file, copy it to test.m4 and type "make tst" @@ -32,7 +35,8 @@ DPIC = dpic touch F_$*.dim $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic $(DPIC) -g $*.pic >> $*.tex - echo "\documentclass[crop,tikz,multi=false]{standalone}" > F_$*.tex +# echo "\documentclass[crop,tikz,multi=false]{standalone}" > F_$*.tex + echo "\documentclass[tikz]{standalone}" > F_$*.tex echo "\usepackage{boxdims,siunitx,amssymb}" >> F_$*.tex echo "\begin{document}" >> F_$*.tex echo "\input $*.tex" >> F_$*.tex @@ -42,9 +46,10 @@ DPIC = dpic $(DPIC) -g $*.pic >> $*.tex pdflatex --quiet F_$* if test "$(PDFCONVERT)" = "pdf2svg" ; then \ - pdf2svg F_$*.pdf $*.xsvg && cp $*.xsvg $*.svg ; \ + pdf2svg F_$*.pdf $*.xsvg && cat $*.xsvg | tr -d '\r' > $*.svg ; \ else \ - dvisvgm --pdf F_$*.pdf && mv F_$**.svg $*.svg ; cp $*.svg $*.xsvg ; \ + dvisvgm --pdf F_$*.pdf && cat F_$**.svg | tr -d '\r' > $*.svg ; \ + cp $*.svg $*.xsvg ; \ fi rm -f F_$** @@ -96,6 +101,7 @@ examplesDPV.html: examplesDPV.htmx Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ sed -e 's/Version XXX/Version '$$Version'/' examplesDPV.htmx \ | m4 > examplesDPV.html + rm -f quick.xsvg examplesDPVs.html: examplesDPVs.htmx cp ../quick.m4 . @@ -162,5 +168,4 @@ clean: @printf "\n" clobber: clean -# (cd dev; make clobber) rm -f test.m4 diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/MoreTableDPV.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/MoreTableDPV.m4 index 833dd21a656..d21555a241c 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/MoreTableDPV.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/MoreTableDPV.m4 @@ -1,43 +1,69 @@ .PS # MoreTableDPV.m4 cct_init(svg_font(sans-serif,11pt__)) -textwid = 1.5 -movewid = 2 pt__ -hm = 2.1 -vm = 0.28 -hm = 2.05 -vm = 0.28 +Heater: [ + movewid = 2 pt__ + hm = 2.05 + right_ +{ + {lamp ; move; "`lamp'" ljust} + move right_ 1.5 + {lamp(,T) ; move;"`lamp(,T)'" ljust} + move right_ 1.25 + {thermocouple ; move;" `thermocouple'" ljust } + move right_ hm + {thermocouple(,,,T) ; move; "`thermocouple(,,,T)'" ljust } + } + move down 0.4; right_ +{ + {heater; move;"`heater'" ljust} + move right_ hm + {heater(,,,,E); move;"`heater(,,,,E)'" ljust} + move right_ hm+0.4 + {heater(,,,,ET); move;"`heater(,,,,ET)'" ljust} + } + ] -{ {memristor ; move;"`memristor '" ljust} - move right_ hm - {heater; move;"`heater '" ljust} - move right_ hm - {tline ; move;"`tline '" ljust} -} - move down 0.25; right_ -{ {pvcell ; move;"`pvcell '" ljust} - move right_ hm - {reed ; move ;"`reed '" ljust} - move right_ hm - {reed(,,,fill_(0.9),CR) ; move ; "`reed(,,,fill_(0.9),CR) '" ljust} -} - move down 0.25; right_ -{ {gap ; move ;"`gap '" ljust} - move right_ hm - {gap(,,A) ; move ;"`gap(,,A) '" ljust} - move right_ hm - {arrowline ; move;"`arrowline '" ljust} -} - move down 0.25; right_ -{ move down 0.10; right; {lamp ; move;"`lamp '" ljust} - move right_ hm - {thermocouple ; move;"`thermocouple '" ljust } -# move up 0.10 right_ hm -# {arrester ; move ;"`arrester '" ljust} - move right_ hm - {xtal ; move ;"`xtal '" ljust} -} +More: [ + textwid = 1.5 + movewid = 2 pt__ + hm = 2.1 + vm = 0.28 + + hm = 2.05 + vm = 0.28 + + { {memristor ; move;"`memristor '" ljust} + move right_ hm + {heater; move;"`heater '" ljust} + move right_ hm + {tline ; move;"`tline '" ljust} + } + move down 0.25; right_ + { {pvcell ; move;"`pvcell '" ljust} + move right_ hm + {reed ; move ;"`reed '" ljust} + move right_ hm + {reed(,,,fill_(0.9),CR) ; move ; "`reed(,,,fill_(0.9),CR) '" ljust} + } + move down 0.25; right_ + { {gap ; move ;"`gap '" ljust} + move right_ hm + {gap(,,A) ; move ;"`gap(,,A) '" ljust} + move right_ hm + {arrowline ; move;"`arrowline '" ljust} + } + move down 0.25; right_ + { move down 0.10; right; {lamp ; move;"`lamp '" ljust} + move right_ hm + {thermocouple ; move;"`thermocouple '" ljust } + # move up 0.10 right_ hm + # {arrester ; move ;"`arrester '" ljust} + move right_ hm + {xtal ; move ;"`xtal '" ljust} + } +] with .nw at Heater.sw+(0,-0.2) command "" # end font .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/NportDPV.svg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/NportDPV.svg deleted file mode 100644 index c6968728c8d..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/NportDPV.svg +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - - - - - - - - - -W1a -W1b -E1a -E1b - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -n-port - -W1a -W1b -E1a -E3b -N1a -N1b - N2a -N2b -S1a -S4b -... -... - - - - - - - -W1 -E1 -S1 -nport -nport(wid 1.5 ht 1.75 fill_(0.9),1,2,3,4) -svgLink(Np.svg,"n-port" at Nport,B) -nterm - - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/PlateDPV.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/PlateDPV.m4 index e54235ebc5a..7602aff2199 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/PlateDPV.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/PlateDPV.m4 @@ -4,7 +4,7 @@ # See the ASME Y14.5 standard, Figure 6-30. scale = 100/3 cct_init -include(../ASME_Y14-5.m4) +include(../ASME_Y14-5.m4def) ifsvg(`svg_font(sans-serif,9.5bp__)', `textht = 10bp__*2/3 iflatex(`command "{\sf"')') diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/UNODPV.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/UNODPV.m4 index 8cd5bf3898b..86b5100f341 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/UNODPV.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/UNODPV.m4 @@ -54,18 +54,6 @@ define(`HeaderPin',` `rotbox(m4Hps,m4Hps,fill_(1))', `circle diam m4Hps fill_(1)') at last line.start ') -define(`brdge',`eleminit_(`$1') - define(`m4h',ifelse(`$2',,`sourcerad_',`($2)/2'))dnl - { line to rvec_(rp_len/2-m4h/2,0) - move to rvec_(m4h/2,0) - for m4ng=75 to 255 by 180 do {{ - m4fshade(0, arc cw from rvec_(Rect_(m4h/2,m4ng)) \ - to rvec_(Rect_(m4h/2,-m4ng)) \ - with .c at Here ) }} - line from rvec_(m4h/2,0) to rvec_(rp_len/2,0) } - { [box invis ht_ m4h wid_ m4h] at rvec_(rp_len/2,0) } - line to rvec_(rp_len,0) invis ') - define(`ATMEGA16U2',`[ Chip: box wid 10*lg_pinsep ht 25*lg_pinsep Loopover_(`x', @@ -168,7 +156,7 @@ divert(0)dnl rlabel(16,,MHz); dot XT2: dot(at last line.start-(2*del,0)); { "XT2" at last [].n above } - Br1: brdge(left_ from U3.Pin33.end to (XT2,U3.Pin33)) + Br1: jumper(left_ from U3.Pin33.end to (XT2,U3.Pin33)) rlabel(1,,2); llabel(,GROUND) BRE: dot line to (Here,U3.Pin28) then to U3.Pin28.end @@ -220,7 +208,7 @@ USB: [ K: box invis wid dimen_/2 ht 5*lg_pinsep `Pin`'m4Lx: K.ne-(0,m4Lx/5*K.ht) "x" at Pin`'m4Lx ljust above', 1 XUSB, 2 D`'svg_it(-), 3 D`'svg_it(+), 4 UGND) - P_1: K.sw; {"P$`1'" at P_1 below rjust} + P_1: K.sw; {"P$`1'" wid 15bp__ at P_1 below rjust} P_2: K.s; {"P$`2'" at P_2 below ljust} ] with .Pin2 at Here; "X2" at USB.ne above rjust @@ -358,7 +346,7 @@ USB: [ K: box invis wid dimen_/2 ht 5*lg_pinsep line from ZU4.Pin1.end to (RN1D-(1.5*del,0),ZU4.Pin1) then up 7*del continue to (ZU4.Chip.w,Here)+(del,0); BRB: dot - { line down_ 2*del; Br2: brdge(right_ dimen_) + { line down_ 2*del; Br2: jumper(right_ dimen_) llabel(1,,2); rlabel(,RESET_EN); line up_ 2*del; dot } line right_ dimen_+del C5: capacitor(right_ dimen_); llabel(,C5); rlabel(100n); dot diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/controlDPV.svg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/controlDPV.svg deleted file mode 100644 index bb24d97319a..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/controlDPV.svg +++ /dev/null @@ -1,745 +0,0 @@ - - - - - - - -r(s) - - - - -e(s) - - - -KP - - - - - - - -KD s - - - - - - - -KI /s - - - - - -u(s) - -G(s) - - -y(s) - - - -- -(a) PID control -r - - - -- -+ - -Plant - - -u - -B - - - -+ -+ - - -x -. - -I/s - - -x - -C - - - -y - -A - - - - - -K - - - -Observer - -I/s - - -x -ˆ -. - -+ -+ - - - -+ -+ - - - -B - - - -A - - - - - - - -C - - -y -ˆ - - -x -ˆ - -+ -- - - - -L - - - - -r - - - -- - - - -K - - - -ˆx - - ddt - -ˆx = (A-LC) ˆx -+ Bu + Ly -Observer - - - -u - - - - ddt - -x = A x + Bu -y = C x -Plant - - -y - - - -(b) Plant with feedback from a full-order observer - - -E1 - - - - -- - -+ - - -ε - -H1 - - - -H2 - - - - - -- - - -+ - - - -H3 - - - -H4 - - - -S1 - -R1 - - - - -n1 - -R2 - - - -R3 - - - - -n2 -(c) A multiblock example - -reference -R - - -yc [ref] - -"inverse" -of G - - -ym [ref] - - - -e - -stabilizer -K - - -δu - - -u[ref] - - - - -u - -plant -G - - -disturbance z - - -yc - - -ym - - -- - - -W control input - - -Controller - - -(d) Nonlinear feedforward (for performance) and small-signal feedback -(for stability) - - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ex01DPV.svg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ex01DPV.svg deleted file mode 100644 index 52d4f52e466..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ex01DPV.svg +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - -1 MΩ - - - - - -100 kΩ - - - - - -220 μF - - - - - -33 kΩ - - - - - -0.1 μF - - -555 -7 -6 -2 -4 -8 -3 -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -red - - - -470 Ω - - - - - - - - - -green - - - - - - -9 V - - - - - - - - -- -+ - -vs - - - - - -t = 0 - -47 ohm - - -iR - - - - - - - - - - - - -L - - - - - - -+ -vC -- -C - - - - - - -iL - - - -i2 - - -i1 - - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/examplesDPVs.html b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/examplesDPVs.html deleted file mode 100644 index 8ce1912911b..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/examplesDPVs.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - -SVG Examples: Circuit_macros Version 10.1 - - - - - - - - - - - -
- -

SVG Circuit_macros examples, Version 10.1

- -Home -> -Examples -> -dpv - -
- -

- This file shows a few diagrams in .svg format produced without the use of - LaTeX or equivalent. -The diagrams have been adapted from the Circuit_macros -examples in order to test the svg output of dpic. -To generate the equivalent for all the examples, go to the -examples/dpv directory and type "make". Typing "make examplesDPVs.html" -produces the selection shown here. -

-

-Generating svg line -art is straightforward but formatting text is not because TeX, LaTeX, -and related word processors do not produce svg directly. Either -less-sophisticated text formatting must be employed for svg or an - - intermediate format -such as pdf can be -produced, followed by an additional processing step to convert to svg. -Two possibilities for the latter are - dvisvgm --pdf -and - pdf2svg. -However, many circuit and similar diagrams intended for the web do not -require sophisticated labels; the examples shown below might -be representative. Compare them to those in - examples.html -

-

- Click on the link to view the source of each diagram. -

-
-

-There are other issues: -

    -
  • The default font face is not specified in all of these diagrams but is - inherited from the enclosing document, so the appearance of labels can - differ depending on the browser. Some of these diagrams set the font at - the beginning of the diagram source. -
  • Diagrams such as these contain text labels - that have to be treated differently from the LaTeX-compatible versions; - for example, - apparently there is no direct way to know the bounding box of arbitrary svg - text. - - Consequently, text placement is approximate and may require - manual adjustment. -
  • Rather than patch the original source files for svg production, - edited copies have been used. The configuration file svg.m4 read by - m4 prior to libcct.m4 contains the following macros defined for svg. - Others could be defined to exercise some of the media capabilties - of svg. They are subject to change: -
      -
    • - svg_font(font-face,nominal size[:dptextratio],textoffset, - dpic commands): - Change font face, size, textratio and dpic textoffset parameters. - Change font face and dpic textht, dptextratio, - and textoffset parameters. - If arg4 is blank, the font is changed and - requires command "</g>" to cancel the font change. -
      - Note: - Nominal height = text height in drawing units; actual height = - nominal ht x dptextratio. -
      - Examples:
      - svg_font(Times)
      - svg_font(Times,14bp__)
      - svg_font(sans-serif,14bp__:0.71)
      - svg_font(Times,11bp__,1bp__,"text" at A)
      - svg_font(font-family="Times")
      - svg_font(font-family="Times" font-style="italic")
      - svg_font(style="font-family:Times; font-style:italic") -
    • svgfontratio(font name); - Reasonable dptextratio value for common fonts, used - by svg_font. -
    • svg_tspan(text attributes, text); - e.g. svg_tspan(font-style="italic" font-size="75%",XYZ) -
    • svg_it(text): for italics -
    • svg_tt(text): for monospace (courier) -
    • svg_sf(text): sans-serif (Helvetica) -
    • svg_norm(text): for normal text -
    • svg_bf(text): for bold face -
    • svg_small(text, percent): - to set a smaller text size, default 66 -
    • svg_fsize(text, percent): - for setting larger or smaller text size, default 100 -
    • svg_sub(text, size percent, y displ, x displ): - subscript -
    • svg_ul(text): underlined text -
    • svg_ol(text): overlined text -
    • svg_sup(text, size percent, y displ, x displ): - superscript -
    • svg_hat(character): circumflex-accented character -
    • svg_frac(numerator[:wid], denominator[:wid]): - basic fraction, wid in drawing units -
    • svg_rot(degrees, "text" [at position]): - Rotate text degrees (default 90) ccw. - Requires svg_rot_init(filename) and the source - must be processed twice. -
    • svg_rot_init(filename): - filename is the basename of the output of - dpic -v filename.pic > filename.svg -
    • svg_symbol(text): allow quoted pound sign in text, - e.g., svg_symbol(10&`#'176;) produces 10° -
    • svgLink(URL, drawing object, [B]): - link to external file using - <a xlink:href=...>...</a> (default is - target="_blank" unless - arg 3 = B) -
    • svgLinkString as above but for strings attached to objects -
    • Greek and other symbols: - - - - - - - - - - - - - - - -
      svg_alpha α - svg_beta β - svg_Gamma Γ - svg_gamma γ - svg_Delta Δ - svg_delta δ - svg_epsilon ε - svg_zeta ζ -
      svg_eta η - svg_Theta Θ - svg_theta θ - svg_iota ι - svg_kappa κ - svg_Lambda Λ - svg_lambda λ - svg_mu μ -
      svg_nu ν - svg_Xi Ξ - svg_xi ξ - svg_Pi Π - svg_pi π - svg_rho ρ - svg_Sigma Σ - svg_sigma σ -
      svg_tau τ - svg_upsilon υ - svg_Phi Φ - svg_phi φ - svg_chi χ - svg_Psi Ψ - svg_psi ψ - svg_Omega Ω -
      svg_omega ω - svg_micro μ - svg_ohm Ω - svg_lt < - svg_gt > - svg_leq ≤ - svg_geq ≥ - svg_prime ′ -
      svg_backsl \ - svg_pound # - svg_comma , - svg_lparen ( - svg_rparen ) - svg_circ ˆ - svg_deg ° - svg_grave ` -
      - - - -
      svg_emsp | | - svg_ensp | | - svg_thinsp | | -
      - -
    -
  • Inkscape: It may be efficient to define elements by macro and to - place them using a wysiwyg graphics editor. A draft page intended - for Inkscape is included. A reasonable variety of elements is defined - but many more could be added and they should be customized for - particular applications. Adjustments may also have to be made to - obtain the proper snap-to actions. -
  • Link experiments: Click on the resistor or source of quickDPV - to go to external - files in new windows. Click on "n-port" in NportDPV to replace the diagram - and then "back" to return. -
  • Some of the assumptions used to create this draft may be - naïve. - Comments are welcome. -
- - - -
- - - - - -
-

- -

-Fig. 1 (quickDPV.m4): -SVG produced by dpic   -

-
-

- -

-(quick.m4): -SVG produced from quick.pdf by dvisvgm   -

-
- -
- - - -

- -

-Fig. 2 (ConnectorsDPV.m4): -Some integrated circuits and connectors with simple geometry - and lists of labels   -

-
- - - -

- -

-Fig. 3 (NportDPV.m4): -The nport and nterm macros   -

-
- - - -

- -

-Fig. 4 (ex01DPV.m4): -Two simple labeled circuits   -

-
- - - -

- -

-Fig. 5 (CsourceDPV.m4): -Realization of a controlled source - (illustrating stacked element labels)   -

-
- - - -

- -

-Fig. 6 (HeathkitDPV.m4): -The power supply of a Heathkit AR-15 (Now, that - was a receiver!) with custom transformer and other elements, - drawn on a grid (partially shown) to aid in placement   -

-
- - - -

- -

-Fig. 7 (EEPDPV.m4): -Part of a single-line diagram of a power distribution system - using draft elements   -

-
- - - -

- -

-Fig. 8 (controlDPV.m4): -Control-system block diagrams   -

-
- - -

- -

-Fig. 9 (ByteDPV.m4): -Elementary splines   -

-
- - - -

- -

-Fig. 10 (FlowDPV.m4): -A flowchart sampler   -

-
- - - - - -

- -

-Fig. 11 (paletteDPV.m4): -A draft palette of a few elements for Inkscape using - a 1 mm grid   -

-
- - -

- - -

-
- -
- - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/paletteDPV.svg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/paletteDPV.svg deleted file mode 100644 index 51ccb1bc2c6..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/paletteDPV.svg +++ /dev/null @@ -1,2639 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- -+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- -+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- -+ - - - - -- -+ - - - - - - - - - - - - - - - - - - -- -+ - - - - - -- -+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -D - - -CK - -Q - -Q - - - - -T - - -CK - -Q - -Q - - - - -R - -S - -Q - -Q - - - - -J - - -CK - - -K - -CLR - - -Q - -Q - -PR - - - - - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.m4 deleted file mode 100644 index 7de2399601e..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.m4 +++ /dev/null @@ -1,16 +0,0 @@ -.PS # Pic input begins with .PS -cct_init # Read in macro definitions and set defaults -elen = 0.75 # Variables are allowed; default units are inches -Origin: Here # Position names are capitalized - source(up_ elen); llabel(-,v_s,+) - resistor(right_ elen); rlabel(,R,) - dot - { # Save the current position and direction - capacitor(down_ to (Here,Origin)) #(Here,Origin) = (Here.x,Origin.y) - rlabel(+,v,-); llabel(,C,) - dot - } # Restore position and direction - line right_ elen*2/3 - inductor(down_ Here.y-Origin.y); rlabel(,L,); b_current(i) - line to Origin -.PE # Pic input ends diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.pic b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.pic deleted file mode 100644 index 1f06d07e487..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.pic +++ /dev/null @@ -1,124 +0,0 @@ -.PS # Pic input begins with .PS -# cct_init Version 10.1: TikZ PGF m4 macro settings. - - # gen_init Version 10.1: TikZ PGF m4 macro settings. - - - define rpoint__ { - rp_wid = last line.end.x-last line.start.x - rp_ht = last line.end.y-last line.start.y - rp_len = sqrt(abs((rp_wid)^2+(rp_ht)^2)); move to last line.start - rp_ang = atan2(rp_ht,rp_wid) } - - rtod_ = 57.295779513082323; dtor_ = 0.017453292519943295 - twopi_ = 6.2831853071795862; pi_ = (twopi_/2) - rp_ang = 0; right - - - linethick = 0.8 - arrowwid = 0.05*scale; arrowht = 0.1*scale - - - # gen_init end - - - -# cct_init end - # Read in macro definitions and set defaults -elen = 0.75 # Variables are allowed; default units are inches -Origin: Here # Position names are capitalized - line invis up elen - rpoint__ - - - { line to Here+(((rp_len/2-(0.25*linewid))*(cos(rp_ang))),((rp_len/2-(0.25*linewid))*(sin(rp_ang)))) - move to Here+((((0.25*linewid))*(cos(rp_ang))),(((0.25*linewid))*(sin(rp_ang)))) - { Src_C: circle rad (0.25*linewid) at Here } - - line from Here+((((0.25*linewid))*(cos(rp_ang))),(((0.25*linewid))*(sin(rp_ang)))) \ - to Here+(((rp_len/2)*(cos(rp_ang))),((rp_len/2)*(sin(rp_ang))))} - {[box invis wid (0.25*linewid)*2 ht (0.25*linewid)*2] at Here+(((rp_len/2)*(cos(rp_ang))),((rp_len/2)*(sin(rp_ang))))} - line to Here+(((rp_len)*(cos(rp_ang))),((rp_len)*(sin(rp_ang)))) invis ; {"$ -$" \ - at last [].s rjust below }; {"$ v_s$" \ - at last [].w rjust }; {"$ +$" \ - at last [].n rjust above }; - line invis right elen - rpoint__ - - - if linewid/6/4*6*2 > rp_len then { line invis to Here+(((linewid/6/4*6*2)*(cos(rp_ang))),((linewid/6/4*6*2)*(sin(rp_ang)))) - rpoint__ - - } - M4_xyO: last line.c - { line from last line.start to M4_xyO+(((((linewid/6/4)*(-6)))*(cos(rp_ang))),((((linewid/6/4)*(-6)))*(sin(rp_ang))))\ - then to M4_xyO+((((((linewid/6/4)*(-5)))*(cos(rp_ang)))+((((linewid/6/4)*((2))))*((-sin(rp_ang))))),(((((linewid/6/4)*(-5)))*(sin(rp_ang)))+((((linewid/6/4)*((2))))*(cos(rp_ang))))) \ - then to M4_xyO+((((((linewid/6/4)*(-3)))*(cos(rp_ang)))+((((linewid/6/4)*((-2))))*((-sin(rp_ang))))),(((((linewid/6/4)*(-3)))*(sin(rp_ang)))+((((linewid/6/4)*((-2))))*(cos(rp_ang))))) \ -then to M4_xyO+(((((-(linewid/6/4)))*(cos(rp_ang)))+((((linewid/6/4)*((2))))*((-sin(rp_ang))))),((((-(linewid/6/4)))*(sin(rp_ang)))+((((linewid/6/4)*((2))))*(cos(rp_ang))))) \ - then to M4_xyO+((((linewid/6/4)*(cos(rp_ang)))+((((linewid/6/4)*((-2))))*((-sin(rp_ang))))),(((linewid/6/4)*(sin(rp_ang)))+((((linewid/6/4)*((-2))))*(cos(rp_ang))))) \ -then to M4_xyO+((((((linewid/6/4)*(3)))*(cos(rp_ang)))+((((linewid/6/4)*((2))))*((-sin(rp_ang))))),(((((linewid/6/4)*(3)))*(sin(rp_ang)))+((((linewid/6/4)*((2))))*(cos(rp_ang))))) \ - then to M4_xyO+((((((linewid/6/4)*(5)))*(cos(rp_ang)))+((((linewid/6/4)*((-2))))*((-sin(rp_ang))))),(((((linewid/6/4)*(5)))*(sin(rp_ang)))+((((linewid/6/4)*((-2))))*(cos(rp_ang))))) \ - then to M4_xyO+(((((linewid/6/4)*(6)))*(cos(rp_ang))),((((linewid/6/4)*(6)))*(sin(rp_ang)))) \ - then to last line.end - [box invis ht linewid/6/4*2*2 wid linewid/6/4*6*2] at 2nd last line.c - } - - - -# - line invis from 2nd last line.start to 2nd last line.end ; {"$ R$" \ - at last [].s below }; - [ circle rad (0.04*linewid) fill 0 ] at Here - move to last [] - { # Save the current position and direction - line invis down to (Here,Origin) - rpoint__ - - - { line to Here+(((rp_len/2-linewid/3*0.3/2)*(cos(rp_ang))),((rp_len/2-linewid/3*0.3/2)*(sin(rp_ang)))) - {line from Here+(((-linewid/3/2)*((-sin(rp_ang)))),((-linewid/3/2)*(cos(rp_ang)))) \ - to Here+(((linewid/3/2)*((-sin(rp_ang)))),((linewid/3/2)*(cos(rp_ang))))} - - move to Here+(((linewid/3*0.3)*(cos(rp_ang))),((linewid/3*0.3)*(sin(rp_ang)))) - {line from Here+(((-linewid/3/2)*((-sin(rp_ang)))),((-linewid/3/2)*(cos(rp_ang)))) \ - to Here+(((linewid/3/2)*((-sin(rp_ang)))),((linewid/3/2)*(cos(rp_ang))))} - line to Here+(((rp_len/2-linewid/3*0.3/2)*(cos(rp_ang))),((rp_len/2-linewid/3*0.3/2)*(sin(rp_ang)))) - - - - - - - - } - - {[box invis wid linewid/3 ht linewid/3*0.3 ] at Here+(((rp_len/2)*(cos(rp_ang))),((rp_len/2)*(sin(rp_ang))))} - line to Here+(((rp_len)*(cos(rp_ang))),((rp_len)*(sin(rp_ang)))) invis #(Here,Origin) = (Here.x,Origin.y) - {"$ +$" \ - at last [].n rjust above }; {"$ v$" \ - at last [].l rjust }; {"$ -$" \ - at last [].s rjust below }; ; {"$ C$" \ - at last [].e ljust }; - [ circle rad (0.04*linewid) fill 0 ] at Here - move to last [] - } # Restore position and direction - line right elen*2/3 - line invis down Here.y-Origin.y - rpoint__ - - - { line to Here+((((rp_len-4*linewid/16*2)/2)*(cos(rp_ang))),(((rp_len-4*linewid/16*2)/2)*(sin(rp_ang)))) - {M4coil: [ S: Here; - {line to Here+(((-(linethick *(scale/72)/2))*((-sin(rp_ang)))),((-(linethick *(scale/72)/2))*(cos(rp_ang))))}; - for m4i=1 to 4 do { - arc cw from Here to Here+(((linewid/16*2)*(cos(rp_ang))),((linewid/16*2)*(sin(rp_ang)))) with .c at Here+(((linewid/16)*(cos(rp_ang))),((linewid/16)*(sin(rp_ang)))) - {line to Here+(((-(linethick *(scale/72)/2))*((-sin(rp_ang)))),((-(linethick *(scale/72)/2))*(cos(rp_ang))))} } ] with .S at Here } - - line from Here+(((4*linewid/16*2)*(cos(rp_ang))),((4*linewid/16*2)*(sin(rp_ang)))) to Here+((((rp_len+4*linewid/16*2)/2)*(cos(rp_ang))),(((rp_len+4*linewid/16*2)/2)*(sin(rp_ang)))) } - line to Here+(((rp_len)*(cos(rp_ang))),((rp_len)*(sin(rp_ang)))) invis ; {"$ L$" \ - at last [].l rjust }; ; - { move to last line.start+(((((rp_len-last [].ht)/2*2/3+arrowht/3))*(cos(rp_ang))),((((rp_len-last [].ht)/2*2/3+arrowht/3))*(sin(rp_ang)))) - arrow <- to Here+(((-arrowht)*(cos(rp_ang))),((-arrowht)*(sin(rp_ang)))) "$ i$" \ - ljust} - line to Origin -.PE # Pic input ends diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.svg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.svg deleted file mode 100644 index b07cccbda8f..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.svg +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.tex deleted file mode 100644 index e59bd8597f5..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.tex +++ /dev/null @@ -1,188 +0,0 @@ -\begin{tikzpicture}[scale=2.54]% -% dpic version 2022.12.01 option -g for TikZ and PGF 1.01 -\ifx\dpiclw\undefined\newdimen\dpiclw\fi -\global\def\dpicdraw{\draw[line width=\dpiclw]} -\global\def\dpicstop{;} -\dpiclw=0.8bp -\dpiclw=0.8bp -\dpicdraw (0,0) - --(0,0.25)\dpicstop -\dpicdraw (0,0.375) circle (0.049213in)\dpicstop -\dpicdraw (0,0.5) - --(0,0.75)\dpicstop -\draw (0,0.25) node[below left=-2bp]{$ -$}; -\draw (-0.125,0.375) node[left=-2bp]{$ v_s$}; -\draw (0,0.5) node[above left=-2bp]{$ +$}; -\dpicdraw (0,0.75) - --(0.25,0.75) - --(0.270833,0.791667) - --(0.3125,0.708333) - --(0.354167,0.791667) - --(0.395833,0.708333) - --(0.4375,0.791667) - --(0.479167,0.708333) - --(0.5,0.75) - --(0.75,0.75)\dpicstop -\draw (0.375,0.708333) node[below=-2bp]{$ R$}; -\dpicdraw[fill=black](0.75,0.75) circle (0.007874in)\dpicstop -\dpicdraw (0.75,0.75) - --(0.75,0.4)\dpicstop -\dpicdraw (0.666667,0.4) - --(0.833333,0.4)\dpicstop -\dpicdraw (0.666667,0.35) - --(0.833333,0.35)\dpicstop -\dpicdraw (0.75,0.35) - --(0.75,0)\dpicstop -\draw (0.75,0.4) node[above left=-2bp]{$ +$}; -\draw (0.666667,0.375) node[left=-2bp]{$ v$}; -\draw (0.75,0.35) node[below left=-2bp]{$ -$}; -\draw (0.833333,0.375) node[right=-2bp]{$ C$}; -\dpicdraw[fill=black](0.75,0) circle (0.007874in)\dpicstop -\dpicdraw (0.75,0.75) - --(1.25,0.75)\dpicstop -\dpicdraw (1.25,0.75) - --(1.25,0.5)\dpicstop -\dpicdraw (1.25,0.5) - --(1.244444,0.5)\dpicstop -\dpicdraw (1.25,0.5) - ..controls (1.261165,0.5) and (1.271481,0.494044) - ..(1.277063,0.484375) - ..controls (1.282646,0.474706) and (1.282646,0.462794) - ..(1.277063,0.453125) - ..controls (1.271481,0.443456) and (1.261165,0.4375) - ..(1.25,0.4375)\dpicstop -\dpicdraw (1.25,0.4375) - --(1.244444,0.4375)\dpicstop -\dpicdraw (1.25,0.4375) - ..controls (1.261165,0.4375) and (1.271481,0.431544) - ..(1.277063,0.421875) - ..controls (1.282646,0.412206) and (1.282646,0.400294) - ..(1.277063,0.390625) - ..controls (1.271481,0.380956) and (1.261165,0.375) - ..(1.25,0.375)\dpicstop -\dpicdraw (1.25,0.375) - --(1.244444,0.375)\dpicstop -\dpicdraw (1.25,0.375) - ..controls (1.261165,0.375) and (1.271481,0.369044) - ..(1.277063,0.359375) - ..controls (1.282646,0.349706) and (1.282646,0.337794) - ..(1.277063,0.328125) - ..controls (1.271481,0.318456) and (1.261165,0.3125) - ..(1.25,0.3125)\dpicstop -\dpicdraw (1.25,0.3125) - --(1.244444,0.3125)\dpicstop -\dpicdraw (1.25,0.3125) - ..controls (1.261165,0.3125) and (1.271481,0.306544) - ..(1.277063,0.296875) - ..controls (1.282646,0.287206) and (1.282646,0.275294) - ..(1.277063,0.265625) - ..controls (1.271481,0.255956) and (1.261165,0.25) - ..(1.25,0.25)\dpicstop -\dpicdraw (1.25,0.25) - --(1.244444,0.25)\dpicstop -\dpicdraw (1.25,0.25) - --(1.25,0)\dpicstop -\draw (1.244444,0.375) node[left=-2bp]{$ L$}; -\filldraw[line width=0bp](1.225,0.65) - --(1.25,0.55) - --(1.275,0.65) --cycle\dpicstop -\dpicdraw (1.25,0.572906) - --(1.25,0.65)\dpicstop -\draw (1.25,0.611453) node[right=-2bp]{$ i$}; -\dpicdraw (1.25,0) - --(0,0)\dpicstop -\end{tikzpicture}% -\begin{tikzpicture}[scale=2.54]% -% dpic version 2022.12.01 option -g for TikZ and PGF 1.01 -\ifx\dpiclw\undefined\newdimen\dpiclw\fi -\global\def\dpicdraw{\draw[line width=\dpiclw]} -\global\def\dpicstop{;} -\dpiclw=0.8bp -\dpiclw=0.8bp -\dpicdraw (0,0) - --(0,0.25)\dpicstop -\dpicdraw (0,0.375) circle (0.049213in)\dpicstop -\dpicdraw (0,0.5) - --(0,0.75)\dpicstop -\draw (0,0.25) node[below left=-2bp]{$ -$}; -\draw (-0.125,0.375) node[left=-2bp]{$ v_s$}; -\draw (0,0.5) node[above left=-2bp]{$ +$}; -\dpicdraw (0,0.75) - --(0.25,0.75) - --(0.270833,0.791667) - --(0.3125,0.708333) - --(0.354167,0.791667) - --(0.395833,0.708333) - --(0.4375,0.791667) - --(0.479167,0.708333) - --(0.5,0.75) - --(0.75,0.75)\dpicstop -\draw (0.375,0.708333) node[below=-2bp]{$ R$}; -\dpicdraw[fill=black](0.75,0.75) circle (0.007874in)\dpicstop -\dpicdraw (0.75,0.75) - --(0.75,0.4)\dpicstop -\dpicdraw (0.666667,0.4) - --(0.833333,0.4)\dpicstop -\dpicdraw (0.666667,0.35) - --(0.833333,0.35)\dpicstop -\dpicdraw (0.75,0.35) - --(0.75,0)\dpicstop -\draw (0.75,0.4) node[above left=-2bp]{$ +$}; -\draw (0.666667,0.375) node[left=-2bp]{$ v$}; -\draw (0.75,0.35) node[below left=-2bp]{$ -$}; -\draw (0.833333,0.375) node[right=-2bp]{$ C$}; -\dpicdraw[fill=black](0.75,0) circle (0.007874in)\dpicstop -\dpicdraw (0.75,0.75) - --(1.25,0.75)\dpicstop -\dpicdraw (1.25,0.75) - --(1.25,0.5)\dpicstop -\dpicdraw (1.25,0.5) - --(1.244444,0.5)\dpicstop -\dpicdraw (1.25,0.5) - ..controls (1.261165,0.5) and (1.271481,0.494044) - ..(1.277063,0.484375) - ..controls (1.282646,0.474706) and (1.282646,0.462794) - ..(1.277063,0.453125) - ..controls (1.271481,0.443456) and (1.261165,0.4375) - ..(1.25,0.4375)\dpicstop -\dpicdraw (1.25,0.4375) - --(1.244444,0.4375)\dpicstop -\dpicdraw (1.25,0.4375) - ..controls (1.261165,0.4375) and (1.271481,0.431544) - ..(1.277063,0.421875) - ..controls (1.282646,0.412206) and (1.282646,0.400294) - ..(1.277063,0.390625) - ..controls (1.271481,0.380956) and (1.261165,0.375) - ..(1.25,0.375)\dpicstop -\dpicdraw (1.25,0.375) - --(1.244444,0.375)\dpicstop -\dpicdraw (1.25,0.375) - ..controls (1.261165,0.375) and (1.271481,0.369044) - ..(1.277063,0.359375) - ..controls (1.282646,0.349706) and (1.282646,0.337794) - ..(1.277063,0.328125) - ..controls (1.271481,0.318456) and (1.261165,0.3125) - ..(1.25,0.3125)\dpicstop -\dpicdraw (1.25,0.3125) - --(1.244444,0.3125)\dpicstop -\dpicdraw (1.25,0.3125) - ..controls (1.261165,0.3125) and (1.271481,0.306544) - ..(1.277063,0.296875) - ..controls (1.282646,0.287206) and (1.282646,0.275294) - ..(1.277063,0.265625) - ..controls (1.271481,0.255956) and (1.261165,0.25) - ..(1.25,0.25)\dpicstop -\dpicdraw (1.25,0.25) - --(1.244444,0.25)\dpicstop -\dpicdraw (1.25,0.25) - --(1.25,0)\dpicstop -\draw (1.244444,0.375) node[left=-2bp]{$ L$}; -\filldraw[line width=0bp](1.225,0.65) - --(1.25,0.55) - --(1.275,0.65) --cycle\dpicstop -\dpicdraw (1.25,0.572906) - --(1.25,0.65)\dpicstop -\draw (1.25,0.611453) node[right=-2bp]{$ i$}; -\dpicdraw (1.25,0) - --(0,0)\dpicstop -\end{tikzpicture}% diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.xsvg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.xsvg deleted file mode 100644 index b07cccbda8f..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quick.xsvg +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quickDPV.svg b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quickDPV.svg deleted file mode 100644 index c648e2d9988..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/quickDPV.svg +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - -- -vs -+ - - - - -R - - - - - -+ -v -- -C - - - - - - - - - - - - - -L - - -i - - 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 a567ad90811..ac0892249dd 100644 Binary files a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf and b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf differ diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ASMEbox.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ASMEbox.m4 new file mode 100644 index 00000000000..6dc9d02d8ac --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ASMEbox.m4 @@ -0,0 +1,55 @@ +.PS +# ASME_Y14-5.m4 +# https://en.wikipedia.org/wiki/Geometric_dimensioning_and_tolerancing +cct_init +sinclude(ASME_Y14-5.m4def) +sinclude(../ASME_Y14-5.m4def) +ifsvg(`svg_font(sans-serif,12bp__,3bp__)', +`textht = 11bp__*2/3 + iflatex(`command "{\sf"')') + + boxht = 7.5/0.5*textht + boxwid = 15/7.5 * boxht + circlerad = 2.3/0.5*textht*0.5 + thicklines_(1) +# ASME Y14.5 specs: + arrowht = textht*0.8 + arrowwid = textht*0.6 + + Box: box + Circle: circle at Box.c; {CM: move from Circle.se down textht right textht} +thinlines_ +CLU: ctrline( up_ Box.ht with .c at Box.c, Box.ht/2 ) +CLH: ctrline( right Box.ht with .c at Box.c, Box.ht/2 ) + + dimension_(from Box.nw to Box.n,Box.ht/6) + thicklines_(1) + {Y14_frame("10") with .s at AS_C+(0,textht/2)} + thinlines_ + line from 3rd last line.start to CLU.end + dimension_(from Box.w to Box.nw,Box.ht/6) + thicklines_(1) + {Y14_frame("5") with .e at AS_C+(-textht/2,0)} + thinlines_ + line from 4th last line.start to CLH.start + +thicklines_ + DA: Y14_frame("A") at Box.ne+(-textht*1.5,textht*5) + datumarrow(from DA.s to (DA,Box.n)) + DB: Y14_frame("B") at Box.sw+(-textht*5,textht*2) + datumarrow(from DB.e to (Box.w,DB)) + + F: Y14_frame(Y14_pos_, + Y14_dia_;"0.03";"(M)", + "A","B","C") with .w at Box.se+(-textht*4,-textht*2) + G: Y14_frame(Y14_fla_,Y14_cyl_,Y14_lin_, + Y14_sur_,Y14_per_,Y14_ang_, + Y14_par_) with .nw at F.sw+(0,-0.1) + H: Y14_frame(Y14_pos_,Y14_cir_,Y14_tot_,Y14_dia_) \ + with .nw at G.sw+(0,-0.1) + + { CB: move left textht from F.w } + arrow <- from Circle.se to Intersect_(CM,CB) then to F.w + +command iflatex(`"}"',ifsvg(`""')) +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Ant.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Ant.m4 new file mode 100644 index 00000000000..f4a22226a20 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Ant.m4 @@ -0,0 +1,30 @@ +.PS +# Ant.m4 (Langton's ant) +# https://tex.stackexchange.com/questions/361838/how-to-create-a-langtons-ant-in-latex/361891 +# https://en.wikipedia.org/wiki/Langton%27s_ant +gen_init +NeedDpicTools + picwid = 5 + D: (0,0); DD: (1,0); t[D] = 0 + minx = 0; miny = 0; maxx = 0; maxy = 0 + for i = 0 to 10500 do { + if (t[D]%2) == 0 then { DD: (-DD.y,DD.x) } else { DD: (DD.y,-DD.x) } + t[D] += 1 + D: D+DD + if D.x > maxx then { maxx = D.x; for y = miny to maxy do { t[maxx,y] = 0 }} \ + else { if D.x < minx then { + minx = D.x; for y = miny to maxy do { t[minx,y] = 0 }}} + if D.y > maxy then { maxy = D.y; for x = minx to maxx do { t[x,maxy] = 0 }} \ + else { if D.y < miny then { + miny = D.y; for x = minx to maxx do { t[x,miny] = 0 }}} + } + boxwid = picwid/(maxx-minx) + boxht = picwid/(maxy-miny) + if boxht > boxwid then { boxht = boxwid } else { boxwid = boxht } + circlerad = boxht/2 + hue = 240; val = 1 + for i = minx to maxx do { for j = miny to maxy do { + if t[i,j]!=0 then { sat = (t[i,j]%20)/20 + hsvtorgb(hue,sat,val,r,g,b) + circle colored rgbstring(r,g,b) at (-i,j)*boxwid } }} +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ArrowFn.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ArrowFn.m4 new file mode 100644 index 00000000000..f8ca1527224 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ArrowFn.m4 @@ -0,0 +1,56 @@ +.PS +# ArrowFn.m4 +# https://tex.stackexchange.com/questions/581089/arrow-function-diagrams +gen_init +textoffset = 3bp__ + brad = 0.04 + bht = 0.4 + bwid = 0.25 +define(`rbox',`box rad brad outlined "orange"') + +B1: [ + linethick = 1.2 + arrowwid = 0.08 + rbox wid 5*boxwid ht 3/2*boxwid + line from last box.w-(bht/4,0) "\Large $X$" above ljust +T: Here + arrow up bwid right bwid then right bwid +F: rbox ht bht "\Large $f$" + {"\Large $Y$" above ljust } + arrow down bwid right bwid from T then right boxwid + bwid*3/2 +G: rbox ht bht "\Large $g$" + {"\Large $Z$" above ljust } +S: circle diam bht "\Large $+$" at (G.e.x+boxwid,(F.y+G.y)/2) + d = F.y-S.nw.y + arrow from F.e to S.nw+(-d,d) then to S.nw + arrow from G.e to S.sw+(-d,-d) then to S.sw + arrow right from S.e + ] +[ + bht = bht/2 + sbwid = boxwid*3/4 + bbwid = sbwid*5/4 + dh = bht/2 +B1: rbox wid bbwid ht bbwid +B2: rbox wid sbwid*3/2 ht bbwid at B1+(3/2*bbwid,0) +B3: rbox wid bbwid ht bbwid at B2+(3/2*bbwid,0) +B4: rbox wid sbwid*3/2 ht bbwid at B3+(3/2*bbwid,0) +B5: rbox wid bbwid ht bbwid at B4+(3/2*bbwid,0) + F: rbox ht bht wid sbwid at B2.n-(0,bht*3/4) "$f$" +BR: B2.s+(0,B2.n.y-F.y) + G: rbox ht bht wid sbwid at (B4,F) "$g$" + S: circle diam bht*3/2 at B5+(bht/2,0) "$+$" + arrow right from S.e + T: B1.w+(dh,0) +B: rbox ht bbwid*5/4 wid boxwid*7.25 with .w at T-(sbwid*3/4,0) + { line from T left sbwid "$x$" above ljust } + arrow from T to (B1.e-(dh,0),F) then to F.w + arrow from F.e to (B3.w+(dh,0),F) then to (B3.e-(dh,0),BR) + continue to (B5.w+(dh,0),Here) then to S.sw + line thick 5 outlined "white" from B3.sw to B3.ne chop brad + arrow from T to (B1.e-(dh,0),BR) then to (B3.w+(dh,0),BR) \ + then to (B3.e-(dh,0),G) then to G.w + arrow from G.e to (B5.w+(dh,0),G) then to S.nw + ] with .nw at B1.sw+(0,-0.2) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Attention.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Attention.m4 new file mode 100644 index 00000000000..7f0b7127c7a --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Attention.m4 @@ -0,0 +1,41 @@ +.PS +# Attention.m4 +gen_init +scale = 2.54 +linethick = 0.2 + +define dot2 { (($1).x*($2).x + ($1).y*($2).y) } + + nlines = 128 + nr = 50 + innerrad = 1 + outerrad = 8 + diff = outerrad - innerrad +B: box wid outerrad*2 ht outerrad*2 outline "red" shaded "red" +C: circle rad outerrad at B + circle rad innerrad at C shaded "black" + P[0]: C+(innerrad,0) + t = 0 + for i=1 to nr do { + r = innerrad+i/nr*diff + t = t + i/nr*(-pi_/2)/nr + P[i]: C+(rect_(r,t)) + } + dth = twopi_/nlines + R: (cos(dth),-sin(dth)) + S: (sin(dth),cos(dth)) + for j = 0 to nlines-1 do { + for i=0 to nr do { + X: P[i]-C + Q[nr-i]: (dot2(R,X),dot2(S,X)) + C + } + shade(j%2, + fitcurve(P,nr) + line from P[nr] to Q[0] + fitcurve(Q,nr) + line from Q[nr] to P[0] + ) + for i=0 to nr do { P[i]: Q[nr-i] } + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Autoencoder.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Autoencoder.m4 new file mode 100644 index 00000000000..92a81ac9509 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Autoencoder.m4 @@ -0,0 +1,82 @@ +.PS +# Masked_Autoencoder.m4 +gen_init +NeedDpicTools + + circlerad = 0.2 + circlesep = 0.5 + rowsep = 0.9 + arrowht = arrowht*0.8 + arrowwid = arrowwid*1.4 + linethick = 1 + +define plan { + m = 0 + for i=1 to 4 do { + for j=1 to ncircles[i] do { + exec sprintf("C[i,j]: circle thick 1.6 at Here \"\large\sf $%g\"",m+j) + if i>1 then { + if "$1"=="" then { + for k=1 to ncircles[i-1] do { arrow from C[i,j] to C[i-1,k] chop } } + } + if j!=ncircles[i] then { move right_ circlesep from C[i,j] } + } + m += ncircles[i] + case(i, + move to C[1,1]+(-circlesep/2,-rowsep), + move to C[2,1]+(0,-rowsep), + move to C[3,1]+(circlesep/2,-rowsep), ) + } + } + gridsiz = 0.78/4 +define grid { [ SW: 0,0 + for i=1 to $1 do { + move to (0,(0.5-i)*gridsiz) + exec sprintf("fv = $%g",2+i) + for j=1 to $2 do { fl = 1-(int(fv / 2^(j-1)) % 2) + box wid gridsiz ht gridsiz outlined "gray" shaded rgbstring(fl,fl,fl) } + } ]} +define cxt { + m = 1 + for i=2 to 4 do { + for j=1 to ncircles[i] do { + exec sprintf("narrows = $%g",m) + for k=1 to narrows do { + exec sprintf("cnum = $%g",m+k) + arrow from C[i,j] to C[i-1,cnum] chop + } + m += narrows+1 + } } } + + array(ncircles,3,4,4,3) + plan() + for j=1 to 3 do { + sprintf("$\hat{x}_%g$",j) at C[1,j].n above + sprintf("$x_%g$",j) at C[4,j].s+(0,-2bp__) below + } + "V" at 0.5 between C[2,1].w and C[1,1].w + "W$^2$" at 0.5 between C[3,1].w and C[2,1].w + "W$^1$" at 0.5 between C[3,1].w and C[4,1].w + +GV: grid(3,4,0,15,6) with .w at C[2,4]+(circlerad*2,rowsep/2) + "$=\hbox{M}^{\hbox{V}}$" at GV.e ljust +G2: grid(4,4,13,0,0,13) with .w at (GV.w,C[3,4]+(circlerad*2,rowsep/2)) + "$=\hbox{M}^{\hbox{V}^2}$" at G2.e ljust +G1: grid(4,3,1,5,1,1) with .w at (GV.w,C[4,3]+(circlerad*2,rowsep/2)) + "$=\hbox{M}^{\hbox{V}^1}$" at G1.e ljust + + move to (GV.x+3*circlesep,C[1,1].y) + plan(3,1,2,1,2,2,1,2,1,2,2,3,1,2) + for i=2 to 4 do { + rgbdraw(0.5,0.5,0.5, + cxt(2,1,3,0,0,2,1,3, 0,4,1,2,3,4,0,0, 0,4,1,2,3,4,0) ) + cxt(0,1,1,1,1,0, 2,2,3,0,2,2,3,2,2,3, 0,0,3,1,3,4) + } + for j=1 to 3 do { sprintf("$x_%g$",j) at C[4,j].s+(0,-2bp__) below } + arrow dotted from C[1,2].n up circlesep/2; "$p(x_2)$" above + "$p(x_3|x_2)$" at (C[1,3]+(circlesep/2,0),last "") above + arrow dotted from C[1,3] to last "".s chop circlerad chop textoffset + "$p(x_1|x_2,x_3)$" at (C[1,1]+(-circlesep/2,0),last "") above + arrow dotted from C[1,1] to last "".s chop circlerad chop textoffset + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Bridge.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Bridge.m4 new file mode 100644 index 00000000000..74717922391 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Bridge.m4 @@ -0,0 +1,35 @@ +.PS +# Bridge.m4 +cct_init +linewid = 1.5 + down_ + AC: source(up_ elen_,S) + line right_ elen_ + dlen = linewid*2/3 +Bridge: [ + N: Here; S: Here+(0,-2*dlen); E: N+(dlen,-dlen); W: N+(-dlen,-dlen) + diode(from N to E) + diode(from S to E) + diode(from W to N) + diode(from W to S) + ] at (Here,AC) + + line from Bridge.N to last line.end + line from Bridge.S to (Bridge.S,AC.start) + Gr: line to AC.start + line from Bridge.E right_ dlen + G: gap(down_ Bridge.ht/2+dimen_/4,1); llabel(+,,-) + line from Bridge.W left_ dlen/4 + crossover(to (Here,G.end),,Gr) + line to G.end chop 0 chop dotrad_ + + [ L: line right_ linewid/3 + sinusoid( linewid/6,twopi_/linewid*4,-pi_/2,0,linewid/8) with .End at L + sinusoid( linewid/6,twopi_/linewid*4,-pi_/2,0,linewid/8) with .Start at L + ] at G + R: resistor(down_ G.len from G.start+(dimen_/2,0)); llabel(,R) + arrow wid arrowwid*2 from R.start to 0.5 + arrow wid arrowwid*2 from R.end to 0.5 + + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/CSlight.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/CSlight.m4 new file mode 100644 index 00000000000..720e74f9e2b --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/CSlight.m4 @@ -0,0 +1,173 @@ +.PS +# Csource.m4 + ifmpost(command "verbatimtex") + command "\newcommand\scriptstack[2][c]{\hbox{\scriptsize\shortstack[#1]{#2}}}%" + command "{\scriptsize" + ifmpost(command "etex") +define(`density',0.90) +setrgb(density, density, density) + +cct_init + linewid = 0.4 + +define(`npair',`[define(`m4lr',ifelse(`$1',,l,r)) + J: mosfet(down_ dimen_,ifelse(`$1',,R,L),uHSDF,E) + "\scriptstack[l]{$Q_{`$2'}$\\ 2N5464}" at J.n+(0,8pt__) + G: J.G + line ifelse(`$1',,right,left) dimen_/4 from J.D + Q: bi_tr(up_ dimen_,ifelse(`$1',,L,R),,E) with .B at Here + ifelse(`$1',,r,l)label(,`\scriptstack[m4lr]{$Q_{`$3'}$\\ 2N4239}') + E: Q.E + S: dot(at (Q.C,J.S)) + line from J.S to S then to Q.C ]') + +define(`ppair',`[define(`m4lr',ifelse(`$1',,l,r)) + J: mosfet(down_ dimen_,ifelse(`$1',,R,L),dHSDF,E) + "\scriptstack[l]{$Q_{`$2'}$\\ 2N3819}" at J.s-(0,8pt__) + G: J.G + line ifelse(`$1',,right,left) dimen_/4 from J.S + Q: bi_tr(down_ dimen_,ifelse(`$1',,R,L),P,E) with .B at Here + ifelse(`$1',,l,r)label(,`\scriptstack[m4lr]{$Q_{`$3'}$\\ 2N4236}') + E: Q.E + S: dot(at (Q.C,J.D)) + line from J.D to S then to Q.C ]') + + R2: resistor(down_ dimen_) + llabel(,`\scriptstack[l]{$R_2$\\ 150}') + dot + Q13: bi_tr(down_ dimen_,,P,E) with .E at Here + rlabel(,`\scriptstack[r]{$Q_{13}$\\ 2N4236}') + line down 3.1*elen_ from Q13.C + Q14: bi_tr(up_ dimen_,R,,E) with .C at Here + llabel(,`\scriptstack[r]{$Q_{14}$\\ 2N4239}') + dot(at Q14.E) + { line left_ dimen_*1.3 then up_ dimen_ + R1: potentiometer(up_ dimen_) with .Start at Here + rlabel(,`\scriptstack[l]{$R_1$\\ $20\,$K}') + { ground(at R1.T1) } + line from R1.End to (R1.End,Q13.E) then to Q13.E } + { dot(at Q13.C+(0,-elen_)) + line to (R1.R,Here)+(-dimen_/2,0) + { arrowline(right_ dimen_/2); llabel(,i_1) } + V1: gap(down_ dimen_,1); rlabel(+,V_1,-) + line down_ dimen_/4 chop dotrad_ chop 0; ground(,T) } + R3: resistor(down_ dimen_) + llabel(,`\scriptstack[l]{$R_3$\\ 150}') + dot(at Q13.C+(0,-2*elen_)) + line right_ dimen_/2 + A1: opamp with .In2 at Here; "$A_1$" at A1.C + "`\scriptstack[l]{Nexus\\ SQ-10A}'" at A1.s below + line left_ dimen_/4 from A1.In1 then up_ dimen_/2 then right dimen_ + dot + { resistor(up_ elen_) + llabel(,`\scriptstack[r]{$R_{14}$\\ $19\,$K}') + line to (Here,Q13.E) then to Q13.E } + line to (A1.Out,Here) + dot + { line to A1.Out + dot + resistor(down_ to (Here,Q14.E)) + llabel(,`\scriptstack[l]{$R_{13}$\\ $91\,$K}') + line to Q14.E } + R6: resistor(right_ dimen_) + rlabel(,`\scriptstack[l]{$R_6$\\ $15\,$K}') + dot + line to (Here,A1.In1) then right_ dimen_/4 + A2: opamp with .In1 at Here; "$A_2$" at A2.C + "`\scriptstack[l]{Nexus\\ SQ-10A}'" at A2.s below + line left_ dimen_/4 from A2.In2 + ground + + dot(at A2.Out) + DP1: npair(,3,4) with .E at (A2.Out,Q14.B)+(elen_*1.25,0) + line from A2.Out to (A2.Out,DP1.G) then to DP1.G + line from DP1.E to (DP1.E,R3.bottom); dot + D4: reversed(`diode',up_ dimen_/2 from DP1.S) + D3: reversed(`diode',up_ dimen_/2 from Here+(0,-dimen_/6)) + llabel(,`\scriptstack[r]{$D_4$\\ OMC-V\\ $D_3$}') + DP2: ppair(,1,2) with .E at (DP1.E,Q13.B) + D1: diode(down_ dimen_/2 from DP2.S) + D2: diode(down_ dimen_/2 from Here+(0,dimen_/6)) + rlabel(,`\raisebox{5pt}{\scriptstack[r]{$D_1$\\ $D_2$\\ OMC-V}}') + dot(at (Here,A2)) + line to D2.bottom + line from DP2.G to (A2.Out,DP2.G) then to A2.Out + line from DP2.E to (DP2.E,R2.top); dot + + T: dot(at (DP1.E,A2)+(dimen_,0)) + DP3: npair(,7,8) with .G at (Here,DP1.G)+(dimen_/4,0) + dot(at DP3.E) + line to Q14.B + DP4: ppair(,5,6) with .G at (DP3.G,DP2.G) + dot(at DP4.E) + line to Q13.B + line from DP3.G to (T,DP3.G) then to (T,DP4.G) then to DP4.G + R11: resistor(down_ dimen_ from DP4.S) + rlabel(,`\scriptstack[r]{$R_{11}$\\ $20$}') + D5: diode(up_ from DP3.S to (DP3.S,A2),Z) + llabel(,`\scriptstack[r]{$D_5$\\ 1N4729$_{\vphantom{1}}$}') + line to R11.end + C4: capacitor(right_ dimen_*1.3 from DP3.S,C) + llabel(`C_4'); rlabel(,`0.68\,\mu\hbox{F}') + C3: capacitor(right_ dimen_*1.3 from DP4.S,C) + llabel(`C_3'); rlabel(,`0.68\,\mu\hbox{F}') + dot + dot(at (Here,R6)) + C2: reversed(`capacitor',left_ dimen_*1.3,C) + rlabel(,,`C_2'); llabel(,`0.1\,\mu\hbox{F}') + line to R6.end + + R5: resistor(up_ from R6.end to (R6.end,Q13.B)) + rlabel(,`\scriptstack[l]{$R_5$\\ $100\,$K}') + dot(at R5.top-(0,dimen_/2)) + line left_ dimen_/2 + capacitor(down_ dimen_,C) + rlabel(,`\scriptstack[r]{$C_1$\\ $1\,\mu$F}') + ground(,T) + + line from DP4.E to (DP4.E,R2.bottom) + resistor(up_ to (Here,R2.top)) + rlabel(,`\scriptstack[l]{$R_9$\\ $910$}') + dot + resistor(down_ from DP3.E to (DP3.E,R3.bottom)) + llabel(,`\scriptstack[l]{$R_{10}$\\ $910$}') + dot + + line from R5.top to (R5,Q13.E) + resistor(right_ elen_) + llabel(,`\scriptstack[l]{$R_4$\\ $100\,$K}') + line to (C4.end,Here) then to C4.end + + DP5: npair(L,11,10) with .E at (C4.end,DP1.E)+(elen_*0.8,0) + line from DP5.E to (DP5.E,R3.bottom); dot + line from R3.bottom to Here+(dimen_/2,0) + dot(,,1) + `"${}-E_{CC}$"' ljust + D6: diode(up_ from DP5.S to (DP5.S,A2),Z) + llabel(,`\scriptstack[r]{$D_6$\\ 1N4728}') + DP6: ppair(L,12,9) with .E at (DP5.E,DP2.E) + line from DP6.E to (DP6.E,R2.top); dot + line from R2.top to Here+(dimen_/2,0) + dot(,,1) + `"${}+E_{CC}$"' ljust + resistor(down_ from DP6.S to (DP6.S,C2)) + rlabel(,`\scriptstack[r]{$R_{12}$\\ $20$}') + dot + { line to C2.e } + line to D6.end + + Vr: dot(at (DP6.G,V1.top)+(dimen_/4,0)) + line from DP6.G to (Vr,DP6.G) then to (Vr,DP5.G) then to DP5.G + reversed(`arrowline',right_ dimen_/2 from Vr); llabel(,i_2) + V2: gap(down_ dimen_,1); llabel(+,V_2,-) + line down_ dimen_/4 chop dotrad_ chop 0; ground(,T) + + dot(at (Vr,T)) + resistor(left_ to (DP6.E,Here)) + rlabel(,`\scriptstack[l]{$R_{15}$\\ $200$}') + line to (DP1.E,Here) + dot + + command "ifmpost(verbatimtex) }% ifmpost(etex)" +resetrgb +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Ccurve.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Ccurve.m4 new file mode 100644 index 00000000000..6f3b537aac5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Ccurve.m4 @@ -0,0 +1,14 @@ +.PS +# Ccurve.m4 +gen_init +scale = 1.5 +# Gosper C curve + +`define' c_curve {if $3==0 then { continue by ($1,$2) } else { + c_curve( ($1-$2)/2, ($1+$2)/2, $3-1) + c_curve( ($1+$2)/2, ($2-$1)/2, $3-1)}} + +line from 0,4 to 0,4 +c_curve(0,4,10) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Chuck.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Chuck.m4 new file mode 100644 index 00000000000..df83a8ce0e1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Chuck.m4 @@ -0,0 +1,226 @@ +.PS +# Chuck.m4 +gen_init s_init(Views) sinclude(tst.dim) +# +################################################################# +divert(-1) + + `r_box(angle,pos,string) + Rotated text on a white background + (requires pstricks)' +define(`r_box', + `ifpstricks(`M4tmp: ifelse(`$2',,Here,`$2') + command sprintf("\rput{%g}(%g,%g){",`$1',crl(M4tmp.x),crl(M4tmp.y)) + f_box(`$3') at Orig + command "}%"')') +define(`crl',`int(`($1)'/scale*1000000)/1000000') + + `r_dimen(linespec,offset,label,tic offset,<->,pos) + dimension_ with rotated text on white background' +define(`r_dimen', + `M4tmp: dimension_(`$1',`$2',,,`$4',`$5') + r_box(rp_ang*rtod_,ifelse(`$6',,M4tmp+vec_(0,`$2'),`$6'),`$3')') + + `ctrline(linespec,len) + Centerline' +define(`cdashl',0.1*scale) +define(`cgapl',0.03*scale) +define(`ctrline',`rpoint_(ifelse(`$1',,`to rvec_(linewid,0)',`$1')) + define(`m4h',ifelse(`$2',,1*scale,`$2'))dnl + m4n = int(rp_len/2/(m4h))*2+1 + for i=1 to m4n do { + line to rvec_(rp_len/m4n/2-cdashl/2-cgapl,0) + move to rvec_(cgapl,0); line to rvec_(cdashl,0); move to rvec_(cgapl,0) + line thick dimensionth to rvec_(rp_len/m4n/2-cdashl/2-cgapl,0) } ') + + `ctrarcr(pos,radius,startang,endang,len) + Arc cr centerline' +define(`ctrarcr',`dnl + define(`m5h',ifelse(`$5',,1*scale,`$5'))dnl + rp_len = abs((`$2')*(`$4'-(`$3'))) + m5n = int(rp_len/2/(m5h))*2+1 + m5a = (rp_len/m5n/2-cdashl/2-cgapl)/(`$2') + m5s = cdashl/(`$2') + m5sa = `$3' + for m4irr=1 to m5n do { + arc from `$1'+(rect_(`$2',m5sa)) to `$1'+(rect_(`$2',m5sa+m5a)) \ + with .c at `$1' + m5sa = m5sa+m5a+cgapl/(`$2') + arc from `$1'+(rect_(`$2',m5sa)) to `$1'+(rect_(`$2',m5sa+m5s)) \ + with .c at `$1' + m5sa = m5sa+m5s+cgapl/(`$2') + arc from `$1'+(rect_(`$2',m5sa)) to `$1'+(rect_(`$2',m5sa+m5a)) \ + with .c at `$1' + m5sa = m5sa+m5a + } ') + +divert(0)dnl +################################################################# + +scale = 25.4*2 +tic = 3.6bp__ + +command "{\sf" + +define(`visible_thick',`linethick_(visibleth)') +define(`hidden_thick',`linethick_(hiddenth)') +define(`dimension_thick',`linethick_(dimensionth) + arrowwid = 1.5*arrowwid; arrowht = 1.5*arrowht; ') + +d1 = 230 +d2 = 204 +d3 = 140 + + visibleth = 1.2 + dimensionth = 0.4 + hiddenth = dimensionth + +Orig: Here +visible_thick + D3: circle diam d3 at Orig + D2: circle diam d2 at Orig + + rr = d1/2 + r = 40 + h = 110/2 + thet = asin((h+r)/(rr+r)) + X1: rect_(rr,thet) + P1: rect_(rr+r,thet) + +dimension_thick + cross(at (P1.x,-P1.y)) + cross(at (-P1.x,P1.y)) + +# Top outer visible line +visible_thick +# top arcs + arc ccw from (-P1.x,h) to (-X1.x,X1.y) with .c at (-P1.x,P1.y) + arc cw to X1 with .c at Orig + arc ccw from X1 to (P1.x,h) with .c at P1 +# right end + line from (P1.x,h) to (305/2,h) then to (305/2,32/2) then left 40-3 + arc ccw rad 3 + line down 32-2*3 + arc ccw rad 3 +dimension_thick { + r_dimen(up 32 with .c at (305/2-5,0),0,32) + arrow <- up 8 right 8 then right 4 from last arc.sw + "3$\,$R" ljust + r_dimen(up h*2 at (305/2,0),-10,110) +}; visible_thick + line right 40-3 then to (305/2,-h) then to (P1.x,-h) +# bottom arcs + arc ccw to (X1.x,-X1.y) with .c at P1.x,-P1.y + arc cw to (-X1.x,-X1.y) with .c at Orig + arc ccw to (-P1.x,-h) with .c at (-P1.x,-P1.y) +# left end + line from (-P1.x,-h) to (-305/2,-h) then to (-305/2,-25/2) then right 25 + down; arc ccw rad 3 + line right 40-25-2*3 + arc ccw rad 3 + line up 25 + {R: line invis down 10 at (2nd last line,last line) } + arc ccw rad 3 + line left 40-25-2*3 + arc ccw rad 3 + line to (-305/2,25/2) then to (-305/2,h) then to (-P1.x,h) + +dimension_thick +# centre + ctrline(right 305-30 with .c at Orig,60) + ctrline(up d1+10 with .c at Orig,) + + {BX: box invis ht 25+2*3 wid 40-25 rad 3 with .w at (-305/2+25,0)} + Q: line invis from BX.n to BX.s; R: line invis from BX.se up 10 left 10 + X: Intersect_(Q,R) + line <-> from BX.se to X then to (X.x,-X.y) then to BX.nw + r_box(90,BX,```3$\,$R''') + +# Drill centres + D[1]: 35,sqrt(85^2-35^2) + D[2]: -D[1].x,D[1].y + D[3]: -D[1].x,-D[1].y + D[4]: D[1].x,-D[1].y + ctrline(from D[3] to D[1] chop 15) + ctrline(to rvec_(2*15,0)) + ctrline(from D[3]+vec_(-15,0) to D[3]+vec_(15,0)) + ctrline(from D[2] to D[4] chop 15) + ctrline(to rvec_(2*15,0)) + ctrline(from D[2]+vec_(-15,0) to D[2]+vec_(15,0)) +visible_thick + for i=1 to 4 do { + circle diam 16 at D[i] + for j = 0 to 7 do { arcr(D[i],23/2,j/8*twopi_,(j+3/4)/8*twopi_) ccw } + } + +hidden_thick + for s=-1 to 1 by 2 do { + line dashed from (-305/2,s*h) to (305/2,s*h) + line dashed from (-305/2,s*30.6) to (305/2,s*30.6) + line dashed from (-305/2,s*21.1) to (305/2,s*21.1) + line dashed from (-305/2+25+2,s*21.1) to (305/2,s*21.1) + line dashed dashwid/2 from (-305/2+25,s*25/2) down -s*(40/2-25/2-2); + if s<0 then { arc dashed dashwid/4 ccw rad 2 } \ + else { up; arc dashed dashwid/4 cw rad 2 } + line dashed to ((305/2,0),Here) + for k = -1 to 1 by 2 do { + move to (k*305/2,s*(30.6+10)) + { dashline(from Here+(0,s*9.5/2) right -k*16,,dashwid/2) + dashline(right -k*9.5/2/2 up -s*9.5/2,,dashwid/3) + dashline(left -k*9.5/2/2 up -s*9.5/2,,dashwid/3) + dashline(left -k*16,,dashwid/2) + dashline(from Here+(-k*16,0) up s*9.5,,dashwid/2.5) } + { dashline(from Here+(0,s*11/2) right -k*36.5,,dashwid/2) + dashline(right -k*11/2/2 up -s*11/2,,dashwid/3) + dashline(left -k*11/2/2 up -s*11/2,,dashwid/3) + dashline(left -k*36.5,,dashwid/2) + dashline(from Here+(-k*36.5,0) up s*11,,dashwid/2.5) } + { dashline(from Here+(0,s*13/2) right -k*32,,dashwid/2) + dashline(down s*13,,dashwid/2) + dashline(left -k*32,,dashwid/2) } + ctrline(right -k*20 chop -3 chop 0); ctrline(right -k*20 chop 0 chop -3) + } + } + +dimension_thick +# bottom + dimension_(from (-305/2,-h) to (305/2,-h),-(rr*1.1-h),"305",20pt__) +# outer radii + r_dimen(from (-P1.x,P1.y) down 40*cosd(30) right 40*sind(30),0,40,,->) + r_dimen(from (P1.x,-P1.y)+(Rect_(40,120)) \ + down 40*cosd(30) right 40*sind(30),0,40,,<-) +# main diameter + r_dimen(from (Rect_(rr,180+50)) to (Rect_(rr,50)),,230,,,(Rect_(50,50))) +# inner circles + r_dimen(from (Rect_(d2/2,180+25)) to (Rect_(d2/2,25)),,204,,,(Rect_(25,25))) + r_dimen(from (Rect_(d3/2,180-12)) to (Rect_(d3/2,-12)),,140,,,(Rect_(25,-12))) + +# bolt hole placement diameter + r_dimen(from Orig to (Rect_(85,-43)),,``85$\,$R'',,->,(Rect_(20,-43))) +# left slot + r_dimen(from (-305/2+6,-25/2) up 25,0,25) + r_dimen(from (-305/2,-26) right 40,0,40) + line from last line.end to (last line.end.x,BX.s.y) chop -tic chop 0 + r_dimen(from (-305/2,26) right 25,0,25) + line from last line.end to (last line.end.x,BX.n.y) chop -tic chop 0 +# right slot + r_dimen(from (305/2-40,-32/2-10) right 40,0,40) + line from (305/2-40,-32/2) down 10+tic +# drill-holes + for i=1 to 4 do { + ctrarcr(Orig,85,atan2(D[i].y,D[i].x)-10*dtor_,atan2(D[i].y,D[i].x)+10*dtor_) + } + ctrarcr(Orig,85,atan2(D[4].y,D[4].x)+10*dtor_,atan2(D[4].y,D[4].x)+25*dtor_) + ctrline(up 30 at D[3]) + ctrline(up 30 at D[4]) + r_dimen(from D[3]+(0,-14) right 35,0,35) + r_dimen(from (0,D[3].y-14) right 35,0,35) + +# arrow <- down 30 left 30 from D[3] chop 16/2 chop 0 then left 5 +# "16 DRILL 23 CBORE" rjust "4 HOLES" rjust + +# arrow <- from (-305/2,30.6+10+2) up 5 left 5 then up 13 +# s_box(SEE (A)) with .sw at Here+(-5pt__,2pt__) + +command "}%" +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Clocks.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Clocks.m4 new file mode 100644 index 00000000000..2c8cd097daf --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Clocks.m4 @@ -0,0 +1,229 @@ +.PS +# AntiqueClock.m4 +gen_init +NeedDpicTools +# https://tex.stackexchange.com/questions/236923/generate-analog-clock-with-numbered-face-add-seconds-roman-numerals + +# `hms2deg(hr,min,sec) hr:min:sec to degrees +# blank arg1: degrees for minute hand +# blank arg1 and arg2: degrees for second hand' +define(`hms2deg',`ifelse(`$1',, + `ifelse(`$2',, + `(90-pmod(ifelse(`$3',,0,`$3'),60)/60*360)', + `(90-(pmod(`$2',60)/60 + pmod(ifelse(`$3',,0,`$3'),60)/60/60)*360)')', + `(90-(pmod(`$1',12) + pmod(ifelse(`$2',,0,`$2'),60)/60 + dnl + pmod(ifelse(`$3',,0,`$3'),60)/3600)/12*360)')') + +# `SecondHand(length,hr,min,sec)' +define(`SecondHand',`[ shsf = (`$1')/3.2 + C: Here + { L: rpoint_(to (Rect_(`$1',hms2deg(,,`$4')))) } + line thick 8*shsf to rvec_(`$1',0) + ]') + +# `AntiqueMinuteHand(length,hr,min,sec)' +define(`AntiqueMinuteHand',`[ mhsf = (`$1')/2.84 + L: rpoint_(to (Rect_(`$1',hms2deg(,`$3',`$4')))) + C: circle fill_(0) diam 0.47*mhsf at L.start + move to C + spline from rvec_(0,0.047*mhsf) \ + to rvec_(1.65*mhsf,0.11*mhsf) \ + then to rvec_(`$1',0.018*mhsf) \ + then to rvec_(`$1',-0.018*mhsf) \ + then to rvec_(1.65*mhsf,-0.11*mhsf) \ + then to rvec_(0,-0.047*mhsf) \ + shaded rgbstring(0,0,0) + ]') + +# `AntiqueHourHand(length,hr,min,sec)' +define(`AntiqueHourHand',`[ hhsf = (`$1')/2.2 + L: rpoint_(to (Rect_(`$1',hms2deg(`$2',`$3',`$4')))) + C: circle fill_(0) diam 0.6*hhsf at L.start + move to C + v = 0.25*hhsf + { line to rvec_(1.1*hhsf,0) thick 0.15/(1bp__)*hhsf } + { C1: circle rad v at rvec_(1.25*hhsf,0) fill_(0) } + d = `$1'-1.25*hhsf + q = 1bp__*hhsf + r1 = (d^2 + q^2 - v^2)/(v-q)/2 + h = r1+v + shade(0, + arc ccw from C1+vec_(d/h*v,(r1+q)/h*v) to \ + C1+vec_(d,q) rad r1 with .c at C1+vec_(d,r1+q) + arc ccw from C1+vec_(d,-q) to C1+vec_(d/h*v,-(r1+q)/h*v) rad r1 \ + with .c at C1+vec_(d,-r1-q)) + ]') + +define(`AntiqueClock',`[ # h,m,s,diam +# Clock size parameters + # outer radius + hour = ifelse(`$1',,3,`$1') + minute = ifelse(`$2',,41,`$2') + second = ifelse(`$3',,51,`$3') + ifelse(`$4',,`skale=0.5; r1=2',`r1=(`$4')/2; skale=r1/4') + r2 = r1-0.5*skale + r3 = r2-0.14*skale + r4 = r3 - 0.35*skale + r5 = r4 - 0.17*skale + r6 = r5 - 0.63*skale + r7 = r6 - 0.17*skale + shadethick = 1.0 + +C: circle thick 0.2 rad r1 + +define shadeline { + s = 1-($`'1)*2 + v = r*s + h = sqrt(r^2-v^2) + t = 1-abs(s) + line from (vrot_(-h,v,cost,sint)) to (vrot_(h,v,cost,sint)) \ + thick shadethick outlined rgbstring(t,t,t) + } + + r = r1 # Bezel outer + nlines = int(2*r/(shadethick pt__)*1.1) + cost = cosd(10); sint = sind(10); + ShadeObject(shadeline,nlines, 0, 0,0,0, + 0.5, 1,1,1, + 1, 0,0,0 ) at C + + r = r2 # Bezel inner + nlines = int(2*r/(shadethick pt__)*1.1) + cost = cosd(-10); sint = sind(-10); + ShadeObject(shadeline,nlines, 0, 0,0,0, + 0.25, 0.8,0.8,0.8, + 0.5, 1,1,1, + 0.75, 0.8,0.8,0.8, + 1, 0,0,0 ) at C + +# Clock face +Face: circle thick 0 fill_(1) rad r3 at C + circle rad r4 at C + circle rad r5 at C + circle rad r6 at C + circle rad r7 at C + +define rotext { +sprintf("`$'1 ifpstricks(\rput[C]{%g}(0,0){%g}, +ifpgf(\rotatebox{%g}{%g}))",`$'2,`$'3) } +# Outer numbers + command sprintf("\font\outerfont=cmss12 at %4.2fin",r3-r4) + for mn = -15 to 15 by 5 do { rotext(\outerfont,-mn/60*360,pmod(mn,60)) \ + at C+(Rect_((r3+r4)/2,90-mn/60*360)) } + for mn = 20 to 40 by 5 do { rotext(\outerfont,180-mn/60*360,mn) \ + at C+(Rect_((r3+r4)/2,90-mn/60*360)) } +# Outer tics + for mn = 1 to 60 do { t = 90-mn/60*360 + line from C+(Rect_(r5,t)) to C+(Rect_(r4,t)) } + +# Inner numbers + command sprintf("\font\innerfont=cmss12 at %4.2fin",r5-r6) + Loopover_(`mx',`t = (m4Lx-4)/12*360; + sprintf("\innerfont`'ifpstricks(`\rput[C]{%g}(0,0)', + `\rotatebox{%g}'){\scalebox{0.7}[1.0]{mx}}",-t) \ + at C+(Rect_((r5+r6)/2,90-t))', IX,X,XI,XII,I,II,III) + Loopover_(`mx',`t = (m4Lx+3)/12*360; + sprintf("\innerfont`'ifpstricks(`\rput[C]{%g}(0,0)', + `\rotatebox{%g}'){\scalebox{.7}[1.0]{mx}}",-t+180) \ + at C+(Rect_((r5+r6)/2,90-t))', IV,V,VI,VII,VIII) +# Inner tics + for mn = 5 to 60 by 5 do { t = 90-mn/60*360 + line from C+(Rect_(r7,t)) to C+(Rect_(r6,t)) } + +# Hands + AntiqueHourHand(r6,hour,minute,second) with .C at C + AntiqueMinuteHand(r5,hour,minute,second) with .C at C + SecondHand((r3+r4)/2,hour,minute,second) with .C at C + +# Center + dot(at C,0.1/4*r1,1) + ]') + + Clock1: AntiqueClock +# Clock2: AntiqueClock(4,50,07,2) at Clock1.e+(1.5,0) + Clock2: AntiqueClock(4,50,07,2) with .nw at Clock1.ne+(0.5,0) + Clock3: [ + linethick = 1.5 + arrowwid = 5 pt__ + + rgbfill(255/255,250/255,205/255, + Clock: circle rad 0.75 at (0,0) ) + + command "\newcounter{hour}" + for time=1 to 12 do { + sprintf("\setcounter{hour}{%g}\Roman{hour}",time) \ + at Rect_(Clock.rad*0.85,90-time*30) + } + line <-> from Rect_(Clock.rad*0.95,90-8.5*30) to Clock \ + then to Rect_(Clock.rad*0.7,90-3.5*30) + line thick 1 outline "red" from Clock to Rect_(Clock.rad*0.95,90-0.75*30) + ] with .s at (Clock2,Clock1.s) + +define(`htod',`(90-(`$1')/12*360)') + +# clock1(h:m[:s],diam,color) +define(`ClockA',`[ + clockdiam = ifelse(`$2',,`40 mm__',`$2') + clockrad = clockdiam/2 + stacksplit_(`HMS',ifelse(`$1',,10:10,`$1'),:) + s = HMS; popdef(`HMS') + m = HMS; popdef(`HMS') + ifdef(`HMS',`h = HMS',`h = m; m = s') + C: circle rad clockrad thick 2 shaded ifelse(`$3',,"cyan",`$3') at (0,0) + for t = 1 to 12 do { + if pmod(t,3)==0 then { ticlen = clockrad/5; ticthk = 2 } \ + else { ticlen = clockrad/10; ticthk = 1 } + line thick ticthk from Rect_(clockrad,htod(t)) \ + to Rect_(clockrad-ticlen,htod(t)) + sprintf("\large\sf %g",t) at Rect_(clockrad*3.5/5,htod(t)) + } + line thick 3 from C to Rect_(clockrad*2/5,htod(h+m/60)) + line thick 3 from C to Rect_(clockrad*3/5,htod(m/60*12)) + round(at C, 3) + ifdef(`HMS',`line thick 0.7 outlined "red" from C \ + to Rect_(clockrad*3.5/5,htod(s/60*12)) chop -5bp__ chop 0') + popdef(`HMS') ]') + +[ +CA: ClockA(11:10:35,,"blue!20") + ClockA(10:10,,"blue!20!black!30") + ClockA(10:10:23,,"blue!20!black!30!green!40") + ClockA(10:10,,rgbstring(0.2,0.2,0.7)) + +# calls DrawRoutineName(frac,r,g,b) +# clock2(h:m[:s],diam,color,rim thickness) +define(`ClockB',`[ + clockdiam = ifelse(`$2',,`60 mm__',`$2') + clockrad = clockdiam/2 + stacksplit_(`HMS',ifelse(`$1',,10:10,`$1'),:) + s = HMS; popdef(`HMS') + m = HMS; popdef(`HMS') + ifdef(`HMS',`h = HMS',`h = m; m = s') + rimwd = ifelse(`$4',,9 pt__,`$4') + rimwid = rimwd/(1 pt__) + n = 4 +C: (0,0) + ClockA(`$1',clockdiam-rimwd*2,"green!20") at C +Q:circle diam clockdiam-rimwd thick rimwid \ + outlined rgbstring(0.7,0.7,0.7) at C + Nx: Q.n+(0,Q.thick pt__/2) + +define rimcirc { +#print sprintf("%g: %g,%g,%g",$`'1,$`'2,$`'3,$`'4) + circle diam clockdiam-rimwd thick rimwid/(n+1) \ + outlined rgbstring($`'2,$`'3,$`'4) with .n at Nx-(0,rimwd/(n+1)/2) + Nx : last circle.n+(0,last circle.thick pt__/2) } + + v = 0.1 + ShadeObject(rimcirc, n, + 0,v,v,v, + 1/(n-1),v,v,v, + 1,1,1,1) at C + popdef(`HMS') ]') + +# ClockA(10:10:35,,"green!20") + w = last [].wid + ClockB(10:10:35,w,) with .nw at CA.sw+(10bp__,-0.2) + ] with .nw at 1st [].sw+(0,-0.2) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ControlLoop.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ControlLoop.m4 new file mode 100644 index 00000000000..6fd915401b4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ControlLoop.m4 @@ -0,0 +1,40 @@ +.PS +# ControlLoop.m4 +# https://tex.stackexchange.com/questions/636839/how-to-draw-multi-blocks-block-diagram +gen_init +scale = 25.4 + + boxwid = 18 + boxrad = 3 + define summer { $1: circle diam 10 fill_(0.8) + { line from $1.ne to $1.sw; line from $1.nw to $1.se } + { "$+$" at $1.nw rjust } } + + TPG: box ht 22 shaded "Peach" "Transient" "Profile" "Generator" + arrow <- left_ 8 from TPG.w "r" above + arrow right_ 10 from TPG.e+(0,TPG.ht/4) "$r_1$" above + summer(S1) + line right_ 10 from TPG.e+(0,-TPG.ht/4) "$r_2$" above + arrow right_ S1.diam + summer(S2) + arrow right_ 10 from S2.e "$e_2$" above + arrow from S1.e to (Here,S1) "$e_1$" above + NLSF: box ht 22 "Nonlinear" "State Error" "Feedback" shaded "lime" \ + with .w at (Here,TPG) + arrow right_ 10 "$u_o$" below + summer(S3) + {ESO: box ht 30 shaded "Goldenrod" "Extended" "State" "Observer" \ + with .w at (Here.x+5,NLSF.s.y-15) } + arrow right_ 40 + P: box ht 15 shaded "blue!50!white!50" "Plant" + arrow right_ 10 "$y$" above + arrow <- right_ 10 from ESO.e+(0,-ESO.ht/4) "$y$" above + line to (2nd last arrow,Here) then to 2nd last arrow + arrow <- right_ 10 from ESO.e+(0,ESO.ht/4) "$u$" above; corner + line to (Here,P) + for_(1,3,1, + `arrow from ESO.w+(0,ESO.ht*(m4x-2)/3) left_ ESO.w.x-S`'m4x.x then to S`'m4x.s + "$z_`'m4x$" at last arrow.start-(5,0) above + "$-$" at last arrow.end rjust below ') + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Counting.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Counting.m4 new file mode 100644 index 00000000000..18002ba99ff --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Counting.m4 @@ -0,0 +1,26 @@ +.PS +# Counting.m4 +gen_init + + g = 0.4 # grid size + define grid { (($2)*g,-($1)*g) } + circlerad = 0.1 + +for i=1 to 4 do { + sprintf(`"$S_%g$:"',i) ljust at grid(i,-0.5) + for j=1 to 4 do { if i+j < 8 then { + sprintf(`"$s_{%g%g}$"',i,j) at grid(i,j) } } } + +"$\vdots$" at grid(4.75,0) +for i=1 to 3 do { `"$\cdots$"' at grid(i,5) } +"$\cdots$" at grid(4,4) + +P: grid(1,1) +for k=3 to 5 do { + for i=1 to k-1 do { if (k%2==1) then { m=i; n=k-i } else { m=k-i; n=i } + Q: grid(m,n) + arrow from P to Q chop + P: Q } + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Cruller.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Cruller.m4 new file mode 100644 index 00000000000..d2c215ae133 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Cruller.m4 @@ -0,0 +1,67 @@ +.PS +# Cruller.m4 +threeD_init +NeedDpicTools +scale = 2.54 + +define(`lobe',`(sind(6*(`$1'))+4)/5*2.25') + + viewazimuth = 20 # Set view angles in degrees + viewelevation = 30 + setview(viewazimuth,viewelevation,0) + + dt = 3 # major angle degrees per facet + ds = 10 # minor angle degrees per facet + + tradius = 6 +define(`cruller',`rot3Dz((`$1')*dtor_, + sum3D(0,tradius,0,0,Rect_(lobe(`$2'+2*(`$1')),`$2')))') + +define(`tvisible',`dot3D(View3D, + cross3D(diff3D(cruller(`$1'+dt/2,`$2'),cruller(`$1',`$2')), + diff3D(cruller(`$1',`$2'+ds/2),cruller(`$1',`$2'))))') + + # create the arrays and sort + n = 0 + for t = dt to 360+dt/2 by dt do { + for s=ds/2 to 360.1 by ds do { + if tvisible(t,s) > -0.01 then { + n +=1 + t[n] = t + s[n] = s + d[n] = dot3D(cruller(t,s),view3D1,view3D2,view3D3) # view distance + ix[n] = n + } + } } +# prval(n) + dpquicksort(d,1,n,ix) + + # Background +Bne: (9,6) +Bsw: (-9,-6) +B: 0.5 between Bne and Bsw +iflatex(`line fill_(0.75) \ + from (Bsw,Bne) to Bsw then to (Bne,Bsw) then to Bne then to (Bsw,Bne)', + `ShadedPolygon((Bsw,Bne):Bsw:(Bne,Bsw):Bne,,-30, + 0,1,1,1, + .5,.1,.4,0, + 1,0,0,0) at B') + # draw the facets +thinlines_ +[ + rgbtohsv(0.6,0.4,0,h,s,v) + for i = 1 to n do { + tc = t[ix[i]]; sc = s[ix[i]] + SE: (Project(cruller(tc+dt/2,sc-ds/2))) + SW: (Project(cruller(tc-dt/2,sc-ds/2))) + NW: (Project(cruller(tc-dt/2,sc+ds/2))) + NE: (Project(cruller(tc+dt/2,sc+ds/2))) + f = ((dcosine3D(3,cruller(tc,sc))/2.25+1)/2)^2 + hsvtorgb(h,(1-f)*s,1,r,g,b) + line outlined rgbstring(r,g,b) shaded rgbstring(r,g,b) ifpdf( invis ) \ + from SE to SW then to NW then to NE then to SE } + ] at B + +thicklines_ + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Cylinder.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Cylinder.m4 new file mode 100644 index 00000000000..abe9a9bac7a --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Cylinder.m4 @@ -0,0 +1,43 @@ +.PS +# Cylinder.m4 +gen_init(SIdefaults) # lengths are in mm + +define(`cylinder',`[ angle = ifelse(`$3',,20,`$3') + w = ifelse(`$1',,boxwid,`$1') + h = ifelse(`$2',,boxht,`$2') + B: ellipse wid w ht sind(angle)*w + S: box invis wid w ht h fill_(1) with .s at B + line from S.nw to S.sw + line from S.ne to S.se + T: ellipse wid w ht sind(angle)*w at B+(0,h) + ]') + +define Cylinder { [ dtor = atan2(1,0)/90 + if "$1"=="" then { w = boxwid } else { w = $1 } + if "$2"=="" then { h = boxht } else { h = $2 } + if "$3"=="" then { angle = 20 } else { angle = $3 } + B: ellipse wid w ht sin(angle*dtor)*w + S: box invis wid w ht h fill 1 with .s at B + line from S.nw to S.sw + line from S.ne to S.se + T: ellipse wid w ht sin(angle*dtor)*w at B+(0,h) + ] } + +M4: [ + cylinder + move + cylinder(,,15) + move + cylinder(3,50) + ] +"M4 macro" at last [].s below + +Pic: [ + Cylinder + move + Cylinder(,,15) + move + Cylinder(3,50) + ] with .w at M4.e+(5,0) +"pic macro" at last [].s below +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Egg.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Egg.m4 new file mode 100644 index 00000000000..3cab249877e --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Egg.m4 @@ -0,0 +1,42 @@ +.PS +# Egg.m4 +# https://tex.stackexchange.com/questions/74168/how-can-i-draw-an-egg-using-tikz +threeD_init +NeedDpicTools + +define Eggshape { (0.78*cos(($2)/4)*sin($2),-cos($2))*($1) } # -pi < arg2 < pi + + size = 2 + npts = 41 + + HL: Eggshape(size*0.4,-pi_*3/4) # Highlight + P: Eggshape(size,pi_/4) + d = zabs(P) + nlines = int(d/lthick*1.5) + # This way of blending colors is not the + # simplest for a single postprocessor but it + # works for multiple postprocessors, e.g. SVG +define(`Orange',`1, 0.5, 0') +define(`Gray', `0.5, 0.5, 0.5') +define(`White', `1, 1, 1') +define(`eggblend', + `sum3D(sprod3D($1,Orange), + sum3D(sprod3D($2,White), + sprod3D($3,Gray)))') + +define(`normalize',`($1)/($1+$2+$3), ($2)/($1+$2+$3), ($3)/($1+$2+$3)') + +define EggLine { + for i=0 to npts do { + P[i]: HL*(1-($1))+Eggshape(size*($1),i/npts*twopi_-pi_) } + fitcurve(P,npts,outlined rgbstring($2,$3,$4)) + } + + ShadeObject(EggLine, nlines, + 0, eggblend(normalize(0.3, 1, 0)), + 0.2, eggblend(normalize(0.5, 0.5, 0)), + 0.5, eggblend(normalize(0.5, 0.4, 0.2)), + 1, eggblend(normalize(0.5, 0, 0.7)) + ) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Euro.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Euro.m4 new file mode 100644 index 00000000000..26230facbe7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Euro.m4 @@ -0,0 +1,128 @@ +.PS +#Euro.m4 +gen_init +divert(-1) + `euro_simple([height]) + Basic euro symbol with round outer boundary + default height=10pt' +define(`euro_simple', +`[ linethick = 0 + orad = ifelse(`$1',,`5bp__',(`$1')/2) + u = orad/6 + irad = orad - u + C: (0,0) + D: C+(Rect_(irad,40)) + CD: move from C+(0,-orad) to D + DK: move from D down u + Ubot: move from C+(0,u/2) right u + Utop: move from Ubot.start+(0,u) right u + Ltop: move from C+(0,-u/2) right u + Lbot: move from Ltop.start+(0,-u) right u + L_edge: C-(7.5*u,0) + Start: (C,Utop) + slope = (CD.end.y-CD.start.y)/(CD.end.x-CD.start.x) +shade(0, + line from Start to Intersect_(Utop,CD) \ + then to Intersect_(Ubot,CD) \ + then to LCintersect(Ubot,C,irad) + arc to LCintersect(Ltop,C,irad) with .c at C + line to Intersect_(Ltop,CD) \ + then to Intersect_(Lbot,CD) \ + then to LCintersect(Lbot,C,irad) + arc to (D,C)-(0,D.y-C.y) with .c at C + line to LCintersect(DK,C,orad,R) + arc cw to LCintersect(Lbot,C,orad) with .c at C + line to (L_edge,Here) \ + then right u/slope up u \ + then to LCintersect(Ltop,C,orad) + arc cw to LCintersect(Ubot,C,orad) with .c at C + line to (L_edge,Here) \ + then right u/slope up u \ + then to LCintersect(Utop,C,orad) + arc cw to LCintersect(CD,C,orad,R) with .c at C + line to D + arc to LCintersect(Utop,C,irad) with .c at C + line to Start + ) ]') + + `euro_symbol([ht=val; aspect=val; slant=degrees]) + Euro symbol with variable aspect ratio and slant + defaults: ht=10pt, aspect=1, slant=0 + e.g., euro_symbol(ht=14pt__; aspect=1.2)' + +define(`euro_symbol',`[ + setkey_(`$1',ht,10pt__) setkey_(`$1',aspect,1) setkey_(`$1',slant,0) + linethick = 0 + orad = m4ht/2 + u = orad/6 + irad = orad - u + if m4aspect==0 then { squeeze = 1 } else { squeeze = 1/m4aspect } + slant = sind(m4slant) + C: (0,0) + D: C+(Rect_(irad,40)) + CD: move from C+(0,-orad) to D + DK: move from D down u + Ubot: move from C+(0,u/2) right u + Utop: move from Ubot.start+(0,u) right u + Ltop: move from C+(0,-u/2) right u + Lbot: move from Ltop.start+(0,-u) right u + L_edge: C-(7.5*u,0) + Start: (C,Utop) + slope = (CD.end.y-CD.start.y)/(CD.end.x-CD.start.x) + +shade(0, + S: LCintersect(Ubot,C,irad) + line from euro_tr(Start) to euro_tr(Intersect_(Utop,CD)) \ + then to euro_tr(Intersect_(Ubot,CD)) \ + then to euro_tr(S) + euro_arc(S,LCintersect(Ltop,C,irad),irad) + S: LCintersect(Lbot,C,irad) + line to euro_tr(Intersect_(Ltop,CD)) \ + then to euro_tr(Intersect_(Lbot,CD)) \ + then to euro_tr(S) + euro_arc(S,((D,C)-(0,D.y-C.y)),irad) + S: LCintersect(DK,C,orad,R) + line to euro_tr(S) + euro_arc(S,LCintersect(Lbot,C,orad),orad,cw) + S: LCintersect(Ltop,C,orad) + E: LCintersect(Lbot,C,orad) + line to euro_tr((L_edge,E)) \ + then to euro_tr((L_edge,E)+(u/slope,u)) \ + then to euro_tr(S) + E: LCintersect(Ubot,C,orad) + euro_arc(S,E,orad,cw) + S: LCintersect(Utop,C,orad) + line to euro_tr((L_edge,E)) \ + then to euro_tr((L_edge,E)+(u/slope,u)) \ + then to euro_tr(S) + euro_arc(S,LCintersect(CD,C,orad,R),orad,cw) + line to euro_tr(D) + euro_arc(D,LCintersect(Utop,C,irad),irad) + line to euro_tr(Start) +) ]') + + `aspect ratio and slant transformation' +define(`euro_tr',`((`$1').x*squeeze+(`$1').y*slant,(`$1').y)') + `transformed arc, centre C' +define(`euro_arc', +`M4X: `$1'; as = atan2(M4X.y-C.y,M4X.x-C.x) + M4X: `$2'; ae = atan2(M4X.y-C.y,M4X.x-C.x) + ifelse(`$4',cw,`if ae > as then { ae -= twopi_ }', + `if ae < as then { ae += twopi_ }') + ax = ae-as + n = max(5,ceiling_(abs(ax)/(10*dtor_))) + for i=0 to n do { P[i]: euro_tr((rect_(`$3',as+i/n*ax))) } + fitcurve(P,n) + move to P[n] ') + +divert(0)dnl + +euro_simple +move +euro_symbol(slant=15) +move +euro_simple(72bp__) +move +euro_symbol(ht=72bp__*2; aspect=1.0; slant=15) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Eye.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Eye.m4 new file mode 100644 index 00000000000..1251afca095 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Eye.m4 @@ -0,0 +1,61 @@ +.PS +# Eye.m4 +# https://getpocket.com/explore/item/pillars-of-fire-truly-adventurous?utm_source=pocket-newtab +gen_init + +define(`eye',`[ u = `$1'; v = 0.47*u; w = 0.25*u +# for pdf, linethick in shade must be environment + lth = linethick; linethick = 0 + shade(1, + arc outlined "red" from (u/2,0) to (-u/2,0) with .c at (0,-u/3) + arc to (u/2,0) with .c at (0,u/3) ) + linethick = lth + circle diam v fill_(0.25) at (0,0) + circle diam w fill_(0) at (0,0) + circle thick 0 diam last circle.diam/2 fill_(1) at last circle.nw + circle diam last circle.diam-lthick at last circle outlined graystring(0.9) + ] ') + + skale = 2/3 + Bx: box wid 11*skale ht 8.5*skale fill_(0) at (0,0) + ane = atan2(Bx.ht,Bx.wid)*rtod_ + d[5] = 0.92*Bx.ht + d[4] = 0.78*Bx.ht + d[3] = 0.62*Bx.ht + d[2] = 0.40*Bx.ht + d[1] = 0.25*Bx.ht + da = 1 + dax = 360/64 + C[0]: Bx.se; C[1]: Bx.nw + for a=-int(ane/dax)*dax to 180-ane by dax do { + T1: (Rect_(1,a+da)); T1: intersect_(Bx.ne,C[(a>ane)],Bx,T1) + T2: (Rect_(1,a)); T2: intersect_(Bx.ne,C[(a>ane)],Bx,T2) + line outlined "white" shaded "white" from Bx to T1 then to T2 then to Bx + line outlined "white" shaded "white" from Bx to T1*(-1) \ + then to T2*(-1) then to Bx + } + for i=5 to 2 by -1 do { + C[i]: circle diam d[i] fill_(0) at Bx + for a=0 to 359 by dax do { + T1: (Rect_(d[i]/2,a)) + T2: (Rect_(d[i]/2,a-da*2)) + lth = linethick; linethick = 0 + shade(1, + arc cw from T1 to T2 with .c at Bx + spline 0.55 thick 0 to 0.8 between Bx and T2 \ + then to (Rect_(d[i]/4,a+30)) + arc cw to (Rect_(d[i]/4,a+32)) with .c at Bx + spline 0.55 thick 0 to 0.8 between Bx and T1 then to T1 ) + linethick = lth + } + } + C[1]: circle thick 2 diam d[1] at Bx fill_(0.1) + eye(d[1]-4bp__) at (0,0) + for a=0 to 359 by dax do { + T1: (Rect_(d[1]/2-1bp__,a)) + T2: (Rect_(d[1]/2-1bp__,a+dax/2)) + line thick 0 from T1 to T2 then to 0.5 between Bx and T2 \ + then to 0.5 between Bx and T1 then to T1 shaded "white" #outlined "white" + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Fefets.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Fefets.m4 new file mode 100644 index 00000000000..04d624de356 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Fefets.m4 @@ -0,0 +1,75 @@ +.PS +# https://github.com/circuitikz/circuitikz/issues/515 +# `Fefets.m4' +cct_init + +textht = 0.1 +define(`rmove',0.75) + +Row1: [ + J: Fe_fet(right_ dimen_) + {`"{\tt $\;$ Fe\_fet}"' at J.s+(0,-0.05) below + "$G$" at J.G rjust + "$S$" at J.S rjust + "$D$" at J.D ljust } + move right_ + J: Fe_fet(up_ dimen_) + {`"{\tt (up\_ dimen\_)}"' at J.s+(0,-0.15) below + "$G$" at J.G rjust + "$S$" at J.S rjust + "$D$" at J.D ljust } + move right_ + J: Fe_fet(left_ dimen_) + {`"{\tt (left\_ dimen\_)}"' at J.s+(0,-0.05) below + "$G$" at J.G rjust + "$S$" at J.S ljust + "$D$" at J.D rjust } + move right_ + J: Fe_fet(down_ dimen_) + {`"{\tt (down\_ dimen\_)}"' at J.s+(0,-0.15) below + "$G$" at J.G ljust + "$S$" at J.S rjust + "$D$" at J.D ljust } + ] +Row2: [ + J: Fe_fet(right_ dimen_,R) + {`"{\tt $\;$ Fe\_fet}"' at J.s+(0,-0.05) below + "$G$" at J.G rjust + "$S$" at J.S rjust + "$D$" at J.D ljust } + move right_ + J: Fe_fet(up_ dimen_,R) + {`"{\tt (up\_ dimen\_,R)}"' at J.s+(0,-0.15) below + "$G$" at J.G ljust + "$S$" at J.S rjust + "$D$" at J.D ljust } + move right_ + J: Fe_fet(left_ dimen_,R) + {`"{\tt (left\_ dimen\_,R)}"' at J.s+(0,-0.05) below + "$G$" at J.G rjust + "$S$" at J.S ljust + "$D$" at J.D rjust } + move right_ + J: Fe_fet(down_ dimen_,R) + {`"{\tt (down\_ dimen\_,R)}"' at J.s+(0,-0.15) below + "$G$" at J.G rjust + "$S$" at J.S rjust + "$D$" at J.D ljust } + ] with .nw at last [].sw+(0,-0.5) +Row3: [ + J: Fe_fet(right_ dimen_) + {`"{\tt $\;$ Fe\_fet}"' at J.s+(0,-0.05) below + "$G$" at J.G rjust + "$S$" at J.S rjust + "$D$" at J.D ljust } + move right_ + J: Fe_fet(right_ dimen_,,TEDQSuB) + {`"{\tt $\;$ Fe\_fet(,,TEDSQuB)}"' at J.s+(0,-0.15) below + "$G$" at J.G rjust + "$S$" at J.S rjust + "$D$" at J.D ljust } + ] with .nw at last [].sw+(0,-0.5) +#Row4: [ +# ] with .nw at last [].sw+(0,-0.5) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/FieldLines.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/FieldLines.m4 new file mode 100644 index 00000000000..0832e20d92a --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/FieldLines.m4 @@ -0,0 +1,24 @@ +.PS +# https://tex.stackexchange.com/questions/593866/magnetic-field-with-2-coils +cct_init(SIdefaults) + + setdir_(R) + W1: winding(,20,5,8,10) + line dn_ 10 from W1.T1; dot(,,1) + line dn_ 10 from W1.T2; dot(,,1) + W2: winding(,20,5,8,10) with .w_ at W1.e_+vec_(10,0) + line dn_ 10 from W2.T1; dot(,,1) + line dn_ 10 from W2.T2; dot(,,1) + for i=2 to -2 by -1 do { + spline 0.55 \ + from W2.e_+vec_(30,10/4*i*3) \ + to W2.e_+vec_(25,10/4*i*2) \ + then to W2.e_+vec_(0,10/4*i) \ + then to W1.w_+vec_(0,10/4*i) \ + then to W1.w_+vec_(-25,10/4*i*2) \ + then to W1.w_+vec_(-30,10/4*i*3) + arrow wid 2 ht 2 dn_ i*0.66 rt_ 2 at W1.w_+vec_(-25,10/4*i*2.35) + arrow wid 2 ht 2 up__ i*0.66 rt_ 2 at W2.e_+vec_(25,10/4*i*2.35) + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Floor.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Floor.m4 new file mode 100644 index 00000000000..0f3076174a3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Floor.m4 @@ -0,0 +1,25 @@ +.PS +# Floor.m4 +gen_init + s = 0.25 + s60 = s*sqrt(3)/2 + c60 = s/2 + ni = 9 + nj = 6 + cellw = 3*s + cellh = 2*s60 + B:box wid nj*cellw ht ni*cellh shaded rgbstring(0,1,0) + + for i=1 to ni do { + for j=1 to nj do { + line shaded rgbstring(0,0,1) \ + from B.sw+((j-1)*cellw,(i-1)*cellh) \ + right c60 up s60 then right 2*s then up s60 right c60 then left s \ + then down cellh left 2*c60 then left s + line shaded rgbstring(1,0,0) \ + from B.sw+((j-1)*cellw,i*cellh) \ + right s then down cellh right 2*c60 then right s then up s60 left c60 \ + then left 2*s then left c60 up s60 + } + } +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Flow2.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Flow2.m4 new file mode 100644 index 00000000000..6f8e2affbf4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Flow2.m4 @@ -0,0 +1,47 @@ +.PS +# https://tex.stackexchange.com/questions/661461/flowchart-with-overlapping-of-the-rows +sinclude(FlowchartDefs.m4def) +sinclude(../FlowchartDefs.m4def) + +down_ + smallsep = boxht/3 + testw = fboxwid*7/4 + testh = fboxht*9/4 + Start: Fbox("Start",,rad boxht/8 shaded "red!30") + arrow down_ smallsep "False" ljust + Input: Fdata(`"Input: $f(), a, b, \epsilon$"',wid boxwid*5/4,, + shaded "blue!30") + arrow down_ smallsep + Formula1: Fbox(`"$c=(a+b)/2$"',,shaded "orange!30") + arrow down_ smallsep + Test1: Ftest("if:" `"$f(a)*f(b) > 0$" "\vphantom{\vrule height6pt}"', + wid testw ht testh, shaded "green!30") + A2: arrow down_ smallsep "False" ljust + Test2: Ftest("while:" `"$f(c)\neq 0 \;\&$" "$|f(b)-f(a)| > \delta$" \ + "\vphantom{\vrule height6pt}"',wid testw ht testh, shaded "green!30") + arrow down_ smallsep "True" ljust + Formula2: Fbox(`"$c=(a+b)/2$"',,shaded "orange!30") + arrow down_ smallsep + Test3: Ftest("if:" `"$f(a)*f(c) < 0$" "\vphantom{\vrule height6pt}"', + wid testw ht testh, shaded "green!30") + { arrow from Test3.W left_ boxht*2/3 "True" below + Formula3: Fbox(`"$b=c$"',,shaded "orange!30") + arrow from Formula3.N to (Formula3.N,A2) } + arrow down_ smallsep "False" ljust then left Test3.x-Formula3.E.x + Formula4: Fbox(`"$a=c$"',,shaded "orange!30") with .E at Here + { arrow from Formula4.W left_ Formula4.W.x-Formula3.W.x + smallsep \ + then up_ A2.y-Formula4.y then to A2 } + down_ + Output: Fdata(`"Output: $H, v, t$"',wid boxwid*5/4,,shaded "blue!30") \ + with .N at (Test1.E+(3*smallsep,0),Formula4.N) + { arrow from Test1.E right_ Output.N.x-Test1.E.x "True" above \ + then to Output.N + arrow from Test2.E right_ Output.N.x-Test1.E.x "False" above } + arrow down_ smallsep + Plot: Fbox(,wid boxwid*5/4,shaded "orange!30") + { ["Plot:" ljust "H on T and V on T" ljust] with .w at Plot.W+(3bp__,0) } + arrow down_ smallsep + Stop: Fbox("Stop",,rad boxht/8 shaded "red!30") + + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Hexagon.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Hexagon.m4 new file mode 100644 index 00000000000..c70e865be36 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Hexagon.m4 @@ -0,0 +1,64 @@ +.PS +# Hexagon.m4 +# https://tex.stackexchange.com/questions/640000/how-to-draw-hexagonal-lattice-with-links-and-string-using-latex?noredirect=1&lq=1 +gen_init + scale = 4 + circlerad = 1/4 + s3 = sqrt(3) + +define cline { line $1 + { if "$2"=="" then { circle thick 0.8 at last line fill_(1) } \ + else { circle thick 0.8 at last line $2 } } } + +define topline { + cline(from $1 up s3 right 1) + cline(right 2) + cline(down s3 right 1) + } + +define botline { + cline(from $1 down s3 right 1) + cline(right 2) + cline(up s3 right 1) + cline(right 2) + } + +define hexagon { line $2 from $1 \ + for_(1,6,1,`to $1+(2,0)+(Rect_(2,180-m4x*60)) \') + move to $1 + (2,0) + for i=1 to 6 do {{circle $3 at Here+(Rect_(s3,210-i*60))}} + if "$4"!="" then {$4 at $1+(2,0)} + } + + + nrows = 4 + ncols = 3 +for i=1 to nrows do { + for j=1 to ncols do { topline((3+(j-1)*6,-s3*(2*i-1))) + topline((0+(j-1)*6,-s3*2*i)) } + cline(from (6*ncols,-2*i*s3) up s3 right 1) + if i != nrows then { cline(from (0,-2*i*s3) down s3 right 1) } \ + else { for j=1 to ncols do { botline(((j-1)*6,-2*nrows*s3)) } } + } + linethick = 2 + cline(from (3,-s3) outlined "red" down_ s3 right_ 1,fill_(0)) + { "$\sigma^x$" at last circle.w rjust } + { "\large $I$" above ljust } + { cline(right_ 2 outlined "red",fill_(0)) + { "$\sigma^x$" at last circle.n above ljust } } + cline(left_ 1 down_ s3 outlined "red",fill_(0)) + { "$\sigma^x$" at last circle.e ljust } + + hexagon((12,-4*s3),thick 2 outlined "blue",shaded "white",) + for a=90 to 360 by 180 do {{ + "\large $\sigma^x\!{=}{-}1$" at (14,-4*s3)+(Rect_(2.25,a)) }} + for a=30 to 360 by 180 do {{ + "\large $\sigma^x\!{=}{-}1$" at (14,-4*s3)+(Rect_(2.75,a)) }} + for a=150 to 360 by 180 do {{ + "\large $\sigma^x\!{=}{-}1$" at (14,-4*s3)+(Rect_(2.75,a)) }} + hexagon(( 3,-7*s3),thick 2 outlined "red" shaded "gray",shaded "black", + "\large $p$") + for a=30 to 360 by 60 do {{ + "\large $\sigma^z$" at (5,-7*s3)+(Rect_(2.5,a)) }} + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Highgain.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Highgain.m4 new file mode 100644 index 00000000000..06bc62985ee --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Highgain.m4 @@ -0,0 +1,80 @@ +.PS +# Highgain+.m4 +sinclude(tst.dim) +s_init(Highgain) +darrow_init + +fillval = 0.8 +circlerad = 0.35/2 +linewid = linewid*3/4 + +command " +\newcommand{\Ds}{D(s)} +\newcommand{\Gs}{G(s)} +\newcommand{\Hs}{H(s)} +\newcommand{\Ms}{M(s)} +\newcommand{\Ns}{N(s)} +\newcommand{\Ps}{P(s)} +\newcommand{\Qs}{Q(s)} +\newcommand{\Rs}{R(s)} +\newcommand{\Ss}{S(s)} +\newcommand{\Us}{U(s)} +\newcommand{\Ys}{Y(s)} +\newcommand{\Xs}{X(s)} +\newcommand {\mat}[1]{\left[\matrix{#1}\right]} +\newcommand {\adj}{\mathop{\hbox{adj}}\nolimits} +\newcommand {\coldim}{\mathop{\hbox{col dim}}\nolimits} +\newcommand {\colrank}{\mathop{\hbox{column rank}}\nolimits} +\newcommand {\column}{\mathop{\hbox{column}}\nolimits} +\newcommand {\diag}{\mathop{\hbox{diag}}\nolimits} +\newcommand {\trace}{\mathop{\hbox{trace}}\nolimits} +\newcommand {\image}{\mathop{\hbox{image}}\nolimits} +\newcommand {\kernel}{\mathop{\hbox{kernel}}\nolimits} +\newcommand {\opsim}[1]{\mathinner{\raise-.5ex\hbox{\scriptsize #1}\atop% + \raise1.5ex\hbox{$\sim$}}} +\newcommand {\order}{\mathop{\hbox{order}}\nolimits} +\newcommand {\rank}{\mathop{\hbox{rank}}\nolimits} +\newcommand {\rowdim}{\mathop{\hbox{row dim}}\nolimits} +\newcommand {\rowimage}{\mathop{\hbox{row image}}\nolimits} +\newcommand {\row}{\mathop{\hbox{row}}\nolimits} +\newcommand {\rowrank}{\mathop{\hbox{row rank}}\nolimits} +\newcommand {\zeros}{\mathop{\hbox{zeros}}\nolimits} +" + +define(`vectorsize', + `{"$\phantom{\displaystyle `$1'}% + \atop{{\displaystyle /}\atop{\displaystyle `$1'}}$"\ + `$2' }') + +[ +R: darrow(right linewid,,,,,,|-) + { s_box($R$) dabove(at R.start+(5pt__,0)) } +Sum: circle invis "$\sum$" + darrow(right_ linewid*5/4) + { s_box($E$) dabove(at last line) } + vectorsize(p,at 1/4 along_(last line)) +Gain: shadebox(box "$G = \diag\mat{g_i}$" wid boxwid*1.5 ht boxht*0.75 ) + darrow(,,,,,,!-) + { s_box($U^{\prime}$) dabove(at last line) } +Compensator: shadebox(box wid boxwid*1.5 "\sl Compensator" "$K(s)$") + darrow(right_ linewid*5/4,,,,,,!-) + vectorsize(m,at 1/4 along_(last line)) + { s_box($U$) dabove(at last line) } +Plant: shadebox(box "\sl Plant" "$H(s)$" ) + dline(right_ linewid*3/4 from Plant.e,,,,!-) + vectorsize(p,at last line) +Y: dtee(R) + {s_box($Y$) dabove} + darrow(right_ linewid*2/3,t) + + dline(down boxht from Y,t) + dright + dline(to (Sum,Here),,t) + dright + darrow(to Sum.s) + "$-$" at Here+(0.10,-0.05) + + circle at Sum +] +# blockbox(N) +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/IC10107.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/IC10107.m4 new file mode 100644 index 00000000000..5203f67376f --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/IC10107.m4 @@ -0,0 +1,48 @@ +.PS +# IC10107.m4 + log_init + +right_ + pinlen = 2*NOT_rad + hunit = AND_wd*L_unit*1.6 +B: box invis wid hunit*4 ht hunit*2 + psep = hunit/2 + nrad = B.ht*0.06 + line from B.w+(0,nrad) to B.nw then to B.ne then to B.se then to B.sw \ + then to B.w-(0,nrad) + arc ccw to Here+(0,2*nrad) with .c at B.w + for i = 1 to 8 do { + line down pinlen from B.sw+(psep/2,0)+((i-1)*psep,0) + sprintf("\small\sf%g",i) below + exec sprintf("P%g: last line.start",i) + line up pinlen from B.ne-(psep/2,0)-((i-1)*psep,0) + sprintf("\small\sf%g",8+i) above + exec sprintf("P%g: last line.start",8+i) + } +G1: OR_gen(2,PIBANEONSEC) with .Out at P12.x-pinlen,B.y+B.ht/4 +G2: OR_gen(2,PIBANNEOSEC) with .Out at B.e.x-4*pinlen,B.y + left_ +G3: OR_gen(2,PIBANEONSEC) with .NE at P3.x,B.y-B.ht/4-AND_ht/6*L_unit + + line from G3.N_NSE.w to (P2,G3.N_NSE) then to P2 + line from P3 to G3.NE + line right pinlen from G3.In1 then down 2*pinlen + contline to (P4,Here) then to P4 + line from G3.In2 to (P5,G3.In2) then to P5 + + line from G2.In2 left pinlen then down 2*pinlen + contline to (P9,Here) then to P9 + line from G2.In1 left pinlen*2 then down G2.In1.y-G2.In2.y+3*pinlen + contline to (P7,Here) then to P7 + line from G2.SE right NOT_rad+2*pinlen then up B.n.y-pinlen-G2.SE.y + contline to (P10,Here) then to P10 + line from G2.N_NNE.e right pinlen then up B.n.y-2*pinlen-G2.N_NNE.y + contline to (P11,Here) then to P11 + + line from P12 to (P12,G1.N_NSE) then to G1.N_NSE.e + line from P13 down pinlen + contline to (G1.NE,Here) then to G1.NE + line from G1.In1 to (P14,G1.In1) then to P14 + line from G1.In2 to (P15,G1.In2) then to P15 + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Koch.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Koch.m4 new file mode 100644 index 00000000000..faa46dfff8e --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Koch.m4 @@ -0,0 +1,32 @@ +.PS +# Koch snowflake +gen_init + + leng = 4 + X: 3,5 + nsides = 3; rot[1] = 0; rot[2] = -120; rot[3] = -120 + depth=4 + + for i=1 to depth do { + for j=1 to nsides do { tmp[j] = rot[j] } + leng = leng/3 + k = 0 + for j=1 to nsides do { + rot[k+1] = tmp[j] + rot[k+2] = 60 + rot[k+3] = -120 + rot[k+4] = 60 + k += 4 + } + nsides = k + } + + a = 0 + line from X to X + for i=1 to nsides do { + a += rot[i] + X: X+(Rect_(leng,a)) + continue to X + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Lyap.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Lyap.m4 new file mode 100644 index 00000000000..e01d365fc02 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Lyap.m4 @@ -0,0 +1,160 @@ +.PS +# Lyap.m4 +threeD_init +scale = 1/1.2 + +viewaz = 30 +viewel = 18 +setview(viewaz,viewel) + +Origin: Project(0,0,0) +# Components of view vector W +w1 = view3D1 +w2 = view3D2 +w3 = view3D3 +# Shape factor of the ellipse on the xy plane +q = Cos(40) + +# cost function +h = 0.5 +c = 1 +# The projected ellipse is (x/q)^2 + y^2 = c. +# The cost is v = c+h +define(`vs',`(`$2')*q*cos(`$1'),(`$2')*sin(`$1')') +define(`vp',`vs(`$1',`$2'),0') +define(`vx',`sum3D(vp(`$1',`$2'),0,0,h+(`$2')^2)') + +# The gradient of v is (2x/q, 2y, -1) and the line +# separating front and back is W^T * grad(v) = 0 +# This line intersects the projected ellipse at +# x1,y1 and x2,y2 + ap = w2^2*q^2/w1^2+1 + bp = -w2*w3*q^2/w1^2 + cp = w3^2*q^2/4/w1^2-c + m = sqrt(bp^2-4*ap*cp) + y1 = (-bp+m)/ap/2 ; x1 = (w3-2*y1*w2)*q/2/w1 + y2 = (-bp-m)/ap/2 ; x2 = (w3-2*y2*w2)*q/2/w1 + t1 = atan2(y1,x1) + t2 = atan2(y2,x2) + theta1 = min(t1,t2) + theta2 = max(t1,t2) + +# tangent curve + nT = 11 + for i = 0 to nT do { + y = y1 + (y2-y1)/nT*i + theta = atan2(y,(w3-2*y*w2)*q/2/w1) + r = y/sin(theta) + T[i]: Project(vx(theta,r)) + } + +# front and back parts of the top curve + n = 12 + for i = 0 to n do { + theta = theta1 + (theta2-theta1)/n*i + F[i]: Project(vx(theta,c)) + Fp[i]: Project(vp(theta,c)) + } + for i = 0 to n do { + theta = theta2 + (theta1+twopi_-theta2)/n*i + B[i]: Project(vx(theta,c)) + Bp[i]: Project(vp(theta,c)) + } + +# trajectory +rotations = 1.55 +nx = 7 +thetas = 75*dtor_ +thetaf = thetas - rotations*twopi_ +rx = c*0.9 +beta = exp(log(.5)/20) + +define(`defX',` rx = `$5' ; np = np-1 + ts = `$1' ; tf = `$2' + for i = 0 to `$3' do { + tha = ts + (tf-ts)*i/(`$3') + for thx = tha to -twopi_ by twopi_ do {} + `$4'[i]: Project(vx(thx,rx)) + Xp[np]: Project(vp(thx,rx)) + np = np+1 + rx = beta*rx + }') + +np = 1 +defX(thetas,theta1,nx,X1,rx) +defX(theta1,theta2-twopi_,nx,X2,rx/beta) +defX(theta2-twopi_,theta1-twopi_,nx,X3,rx/beta) +defX(theta1-twopi_,thetaf,5,X4,rx/beta) + +# First draw the inside back +# B is the back curve +# T is the outline +ifpstricks(` +\psset{gradbegin=lightgray,gradend=darkgray,gradlines=1000} +\pscustom[fillstyle=gradient,gradmidpoint=0.7]{ + fitcurve(B,n) + for i = 0 to nT do {TT[i]: T[nT-i] } + fitcurve(TT,nT) +\relax} ', +` fitcurve(B,n) + for i = 0 to nT do {TT[i]: T[nT-i] } + fitcurve(TT,nT) ') + +# Centre axis +thinlines_ +line from Origin to Project(0,0,h) +# F[0] is the leftmost point of the front curve +line from F[0] to Fp[0] +# F[n] is the rightmost point of the front curve +line from F[n] to Fp[n] +thicklines_ + +# Now draw the outside front +ifpstricks(` +\newgray{gray1}{0.9}% +\newgray{gray2}{0.4}% +\psset{gradbegin=gray1,gradend=gray2,gradlines=1000} +\pscustom[linewidth=0pt,fillstyle=gradient,gradmidpoint=0.99]{ + fitcurve(F,n) + fitcurve(T,nT) +\relax} ', +` shade(1,fitcurve(F,n) + fitcurve(T,nT)) ') +# T is the limit curve of visibility + fitcurve(T,nT) +# F is the top front + fitcurve(F,n) +# Front and back projections of the top on xy + fitcurve(Fp,n) + fitcurve(Bp,n) + +# The trajectory in pieces, to allow dashed parts + fitcurve(X1,nx) + fitcurve(X2,nx,dotted 0.025) + fitcurve(X3,nx) + fitcurve(X4,3,dotted 0.015) + arca(from X4[4] to X4[3],ccw,0.3,<-) + +# Projected trajectory + np = np-2 + fitcurve(Xp,np-1) + arca(from Xp[np] to Xp[np-2],ccw,0.18,<-) + "$X(t)$" at Xp[np]-(2bp__,0) ljust + +# Axes and vertical lines +thinlines_ + line from X1[0] to Xp[0] + line from X4[4] to Xp[np] +arrow from Origin to Project(1.5,0,0) +"$x_1$" rjust below +arrow from Origin to Project(0,1.5,0) +"$x_2$" ljust +line dashed from Project(0,0,h) to F[n/2] chop 0 chop arrowht/4 +arrow from F[n/2] to Project(0,0,2) +"$v(X)$" ljust + +"`${0}$'" at Origin+(0,1 pt__) below +"$\Omega$" at Project(0,0.9*c,0)+(0,3bp__) above +"`$v(X) = c$'" at (Project(vp(100*dtor_,c)))+(2bp__,0) above ljust + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Makefile new file mode 100644 index 00000000000..5fba20547c6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Makefile @@ -0,0 +1,211 @@ +# Extras Makefile +# +# Type "make" to generate extras.pdf containing examples. +# The examples are in no particular order (well, they are in ls order). +# Type "make clean; make extras.ps" to invoke latex intead of pdflatex. +# Type "make .ps" to make a postscript file from .m4 +# It may be necessary to type "make clean" before this or any of the following: +# Type "make .eps" to make an .eps file from .m4 +# Type "make .svg" to make an .svg file from .m4 using pdf2svg +# The following require ImageMagick convert: +# Type "make .png" to make a .png file from .m4 +# Type "make .tif" to make a .tif file from .m4 +# +# To test the file test.m4, type "make tst" if boxdims is used, otherwise +# type "make tst1". In either case the file tst.ps is created. +# +# To debug a single diagram in a directory other than this examples +# directory, copy this makefile and tst.tex to where you want to work, +# redefine LIBDIR (below) appropriately, and type "make .xxx" +# where xxx is one of ps, eps, png, or pdf + +######################################################################### + +# Circuit_macro directory, change this if necessary: +# LIBDIR = $$HOME/lib +LIBDIR = .. + +# The dpic processor: +PIC = dpic + +#MODE = -p +MODE = -g + +#CONF = pstricks.m4 +CONF = pgf.m4 + +# Convert options +EPSOPTS = +PNGOPTS = -quiet -density 400 -scale 25% -alpha Remove + +# M4 = m4 -I $(LIBDIR) +# If environment variable M4PATH has been set to the installation directory: +M4 = m4 + +DOC = extras + +# Files that have to be processed twice: +BOXDIMS = + +######################################################################### + +DVIPSOPTS = -G0 -t letter +DIMFILE = $(DOC).dim +BS = tr '|' '\134' + +# Might be needed (change latex commands to $(LTX) ) +# LTX = latex --shell-escape +LTX = pdflatex --shell-escape + +XTRASRC=printf "|documentclass[11pt]{article}\n\ +|usepackage[dvipsnames]{xcolor}\n\ +|usepackage{times,boxdims,siunitx,amssymb,tikz}\n\ +|setlength{|textwidth}{8in} |setlength{|textheight}{10.5in}\n\ +|setlength{|hoffset}{-2cm} |setlength{|voffset}{-3cm}\n\ +|begin{document}\n" | $(BS) + +PDFLTXSRC=printf "|documentclass[11pt]{standalone}\n\ +|usepackage{times,boxdims,siunitx,amssymb,tikz,geometry}\n\ +|geometry{paperwidth=15in,paperheight=14in,margin=1in}\n\ +|pagestyle{empty}|thispagestyle{empty}\n\ +|begin{document}|noindent|input{"$*".tex}|end{document}\n" | $(BS) + +LTXFILE=printf "|documentclass[11pt]{article}\n\ +|usepackage[dvipsnames]{xcolor}\n\ +|usepackage{times,boxdims,graphicx,pstricks}\n\ +|usepackage{siunitx}\n\ +|setlength{|textwidth}{28cm}|setlength{|textheight}{28cm}\n\ +|setlength{|oddsidemargin}{0pt}|setlength{|evensidemargin}{0pt}\n\ +|setlength{|hoffset}{-1cm}\n\ +|pagestyle{empty}|thispagestyle{empty}\n\ +|newbox|graph\n\ +|begin{document}\n\ +|noindent|input{"$*".tex}|box|graph\n\ +|end{document}\n" | $(BS) + +.SUFFIXES: .ps .dvi .tex .m4 .pic .eps .png .pdf .svg .tif .gif +.m4.pic: + @touch $(DIMFILE) F_$*.dim + $(M4) $(CONF) $(DIMFILE) F_$*.dim $*.m4 > $*.pic +.m4.tex: + @touch $(DIMFILE) F_$*.dim + $(M4) $(CONF) $(DIMFILE) F_$*.dim $*.m4 | $(PIC) $(MODE) > $*.tex +.m4.dvi: + @touch $(DIMFILE) F_$*.dim + $(M4) pstricks.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -p > $*.tex + @$(LTXFILE) > F_$*.tex + latex --quiet F_$* + touch F_$*.dim $(DIMFILE) + $(M4) pstricks.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -p > $*.tex + latex --quiet F_$* + mv F_$*.dvi $*.dvi + rm -f F_* +.dvi.ps: + dvips $(DVIPSOPTS) $* -o $*.ps + chmod 644 $*.ps +.m4.ps: + @touch $(DIMFILE) F_$*.dim + $(M4) pstricks.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -p > $*.tex + @$(LTXFILE) > F_$*.tex + latex --quiet F_$* + dvips $(DVIPSOPTS) F_$* -o $*.ps + chmod 644 $*.ps + rm -f F_* +.m4.eps: + @touch $(DIMFILE) F_$*.dim + $(M4) pstricks.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -p > $*.tex + @$(LTXFILE) > F_$*.tex + latex --quiet F_$* + $(M4) pstricks.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -p > $*.tex + latex --quiet F_$* + dvips F_$* -T128cm,28cm -o $*.ps +# Recent changes to PSTricks(?) have clashed with the use of TeXtoEPS +# so use ps2epsi + ps2epsi $*.ps $*.epsi + sed -e '/%%Pages:/d' -e '/BeginPreview/,$$d' $*.epsi \ + | tr '\015' '\012' > $*.eps + sed -e '1,/EndPreview/d' $*.epsi >> $*.eps + rm -f F_* +.m4.pdf: + @touch $(DIMFILE) F_$*.dim + $(M4) pgf.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -g > $*.tex + @$(PDFLTXSRC) > F_$*.tex + pdflatex --quiet F_$* + $(M4) pgf.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -g > $*.tex + pdflatex --quiet F_$* + mv F_$*.pdf $*.pdf + rm -f F_* +.m4.png: + make $*.pdf + convert $(PNGOPTS) $*.pdf $*.png + @if test -f $*.png.0 ; then mv $*.png.0 $*.png ; fi +# rm $*.pdf +.m4.gif: + make $*.pdf + convert $(GIFOPTS) $*.pdf $*.gif +# rm $*.pdf +.m4.tif: + make $*.pdf + convert $(EPSOPTS) $*.pdf $*.tif + @if test -f $*.tif.0 ; then mv $*.tif.0 $*.tif ; fi +# rm $*.pdf +.m4.svg: + make $*.pdf + dvisvgm --pdf $*.pdf $*.svg + chmod 644 $*.svg +# rm $*.pdf + + +######################################################################### + +$(DOC).pdf: + @$(XTRASRC) > extras.tex + touch extras.dim + -for fl in `ls *.m4` ; do \ + file=`basename $$fl .m4` ; \ + echo $$file.m4 ; \ + $(M4) pgf.m4 extras.dim $$file.m4 | $(PIC) -g > $$file.tex ; \ + printf "\n\n|parbox{|textwidth}{\n" | $(BS) >> extras.tex ; \ + printf "|input{$$file.tex}\n" | $(BS) >> extras.tex ; \ + printf "\n $$file.m4\n}\n|vspace{|baselineskip}" \ + | sed -e 's/_/|_/g' | $(BS) >> extras.tex ; \ + done + printf "\n|end{document}\n" | $(BS) >> extras.tex + pdflatex extras + -for file in $(XBOXDIMS) ; do \ + rm -f $$file.tex ; \ + $(M4) pgf.m4 extras.dim $$file.m4 | $(PIC) -g > $$file.tex ; \ + done + pdflatex extras + +$(DOC).ps: psmode $(DOC).dvi + +psmode: + printf "|usepackage{pstricks,pst-grad}\n" | $(BS) > mode.tex + +pdfmode: + printf "|usepackage{tikz}\n" | $(BS) > mode.tex + +$(DOC).dvi: $(DOC).tex files.tex header.tex psmode + touch $(DOC).dim + make CONF=pstricks.m4 MODE=-p DIMFILE=$(DOC).dim pics + cp $(LIBDIR)/doc/Version.tex . + latex $(DOC) + rm -f $(BOXDIMS) ${BOXDIMS:%.tex=%.pic} $(DOC).dvi + make CONF=pstricks.m4 MODE=-p DIMFILE=$(DOC).dim $(BOXDIMS) + latex $(DOC) + +tst: + @$(LTXFILE) | sed -e 's/{\.tex}/{test.tex}/' > tst.tex + make CONF=pstricks.m4 PIC=dpic MODE=-p test.tex; latex --quiet tst + rm -f test.tex test.pic + make CONF=pstricks.m4 PIC=dpic MODE=-p test.tex; latex --quiet tst + dvips $(DVIPSOPTS) tst -o tst.ps + +tst1: + @$(LTXFILE) | sed -e 's/{\.tex}/{test.tex}/' > tst.tex + make CONF=pstricks.m4 PIC=dpic MODE=-p test.tex; latex --quiet tst + dvips $(DVIPSOPTS) tst -o tst.ps + +clean: + rm -f *.ps *.pdf *.tex *.dim *.pic *.log *.dms *.aux diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Metamodel.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Metamodel.m4 new file mode 100644 index 00000000000..e5d1ba0b1ca --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Metamodel.m4 @@ -0,0 +1,78 @@ +.PS +# Metamodel: +# https://tex.stackexchange.com/questions/615463/how-to-draw-meta-models-in-tikz +gen_init + + lineht = 0.4 + arrowht = arrowht*3/2; arrowwid = arrowwid*2 + fillv = 0.9 + define bx {box fill_(fillv) rad 5bp__ $1} + up_ + + Event: bx(ht boxht "Event") + sarrow(,type=D); {"{\tt<}contains{\tt>}" at last arrow rjust} + Trace: bx(ht boxht "Trace") + sarrow(,type=D); {"{\tt<}contains{\tt>}" at last arrow rjust} + Log: bx(ht boxwid "Log") + Att: bx(ht boxwid wid boxwid*5/4 "Attribute" dashed) \ + with .nw at Log.ne + (boxwid*2,0) + + fillv = 0.8 + ww = Log.ht + move to (Att.w,Att.n) - (0,ww/9) + { sarrow(to (Log.e,Here),type=D) + {"{\tt<}trace-global{\tt>}" at last arrow above} } + move down_ ww/3 + { sarrow(to (Log.e,Here),type=D) + {"{\tt<}event-global{\tt>}" at last arrow above} } + move down_ ww/3 + { sarrow(to (Log.e,Here),type=D) } + T: 0.8 between last arrow.start and last arrow.end + move down_ ww/9 + line dashed left ww/3 then down ww/2 then right ww/2 + sarrow(up ww*7/18, type=D;shaft=dashed) + "{\tt<}contains{\tt>}" at (last arrow.end,Att.s)-(ww/4,ww*7/18) below + + line from T to (T,Event); sarrow(to Event.e,type=D) + sarrow(from (T,Trace) to Trace.e,type=D) + + ellipsewid = boxwid*0.9 + ellipseht = ellipsewid/2 + move to (Att.e,Att.s)+(ww/6,-ww/8) + y = Here.x-Att.c.x-boxwid/2 + down_ + Loopover_(`Z',`Z: bx(ht boxht*3/4 "Z") + {sarrow(from Z.e+(y,0) to Z.e,type=D)} + {ifelse(Z,Boolean, + `move to last arrow.start; line to (Here,String) + line from Z.w to (Att,Z.w); sarrow(to Att.s,type=O)', + `line from Z.w to (Att,Z.w)')} + move down_ ww/16', + String,Date,Int,Float,Boolean) + + line from Int.e+(y,0) right_ ww/4; Value: ellipse fill_(fillv) "Value" + Key: ellipse fill_(fillv) "Key" with .w at Att.e+(y*2,0) + sarrow(from last ellipse.w to Att.e,type=D) + + Class: bx(ht boxht*3/4 "Classifier") \ + with .s at (0.5 between Log and Att,Att.n)+(0,boxht/2) + line from Class.w to (Log,Class); sarrow(to Log.n,type=D) + "{\tt<}defines{\tt>}" at (0.5 between Log and Class.w,Class) above + line from Att.n to (Att,Class); sarrow(to Class.e,type=D) + "{\tt<}defines{\tt>}" at (0.5 between Att and Class.e,Class) above + + Ext: bx(ht boxht*3/4 "Extension") with .e at (Att.e,Class+(0,boxht*3/2)) + move to (Att.e,Att.n)-(Att.wid/8,0) + sarrow(to (Here,Ext.s),type=D;shaft=dashed) + "{\tt<}defines{\tt>}" at (last arrow,Ext.s)-(0,y) rjust + line dashed from Ext.w to (Log,Ext) then to (Log,Class) + "{\tt<}declares{\tt>}" at (0.5 between Log and Class,Ext) below + + ellipse fill_(fillv) "name" at (Key,Ext) + sarrow(from last ellipse.w to Ext.e,type=D) + ellipse fill_(fillv) "prefix" with .n at last ellipse.s+(0,-ww/16) + line from last ellipse.w left y + URI: ellipse fill_(fillv) "URI" with .n at last ellipse.s+(0,-ww/16) + line from last ellipse.w left y then up Ext.y - URI.y + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Obliq.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Obliq.m4 new file mode 100644 index 00000000000..0c71c6569e0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Obliq.m4 @@ -0,0 +1,72 @@ +.PS +threeD_init +scale = 2.54 + +divert(-1) + `ProjectObliq(x,y,z,x scale,degrees) + oblique projection + arg4= x scale (default 1/2)' +define(`ProjectObliq',`(`$2'-dnl +(`$1')ifelse(`$4',,/2,*(`$4'))*cosd(ifelse(`$5',,obliqueangle_,(`$5'))),dnl +`$3'-(`$1')ifelse(`$4',,/2,*(`$4'))*sind(ifelse(`$5',,obliqueangle_,(`$5'))))') +define(`obliqueangle_',45) + +divert(0)dnl + +define(`Pr',`ProjectObliq(`$1',`$2',`$3')') + + d = 2 +define(`cube',`[ # w, h, d, scale, degrees + define(`cubewd',ifelse(`$1',,linewid,`$1'))dnl + define(`cubeht',ifelse(`$2',,cubewd,`$2'))dnl + define(`cubedp',ifelse(`$3',,cubewd,`$3'))dnl + for_(0,7,1,`P`'binary_(m4x,3): \ + Pr(ifelse(eval(m4x/4),1,cubedp,0), + ifelse(eval((m4x%4)/2),1,cubewd,0), + ifelse(eval(m4x%2),1,cubeht,0))') +# {command "{\small" +# for_(0,7,1,`"binary_(m4x,3)" at P`'binary_(m4x,3)') +# command "}" +# } + {"000" at P000} + if obliqueangle_ > 0 then { + line dashed from P100 to P000 chop linethick bp__ * 2 chop 0 + line dashed from P010 to P000 chop linethick bp__ * 2 chop 0 + line dashed from P001 to P000 chop linethick bp__ * 2 chop 0 + line from P101 to P001 + line to P011 + line to P111 + line to P101 + line to P100 + line to P110 + line to P010 + line to P011 + line from P110 to P111 + } else { + line dashed from P101 to P001 chop linethick bp__ * 2 chop 0 + line dashed from P011 to P001 chop linethick bp__ * 2 chop 0 + line dashed from P000 to P001 chop linethick bp__ * 2 chop 0 + line from P100 to P101 + line to P111 + line to P110 + line to P100 + line to P000 + line to P010 + line to P011 + line to P111 + line from P010 to P110 + } + ]') + + Cube: cube(1,2,3) +# +##{arrow from Cube.P001 to 3/2 between Cube.P000 and Cube.P001; "$z$" ljust } +##{arrow from Cube.P010 to 3/2 between Cube.P000 and Cube.P010; "$y$" below } +##{arrow from Cube.P100 to 3/2 between Cube.P000 and Cube.P100; "$x$" ljust } + + move define(`obliqueangle_',30); cube(1,2,3) + move define(`obliqueangle_',15); cube(1,2,3) + move define(`obliqueangle_',-15); cube(1,2,3) + move define(`obliqueangle_',-30); cube(1,2,3) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/OneLine.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/OneLine.m4 new file mode 100644 index 00000000000..7b451b366aa --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/OneLine.m4 @@ -0,0 +1,67 @@ +.PS +# OneLine.m4 +# https://tex.stackexchange.com/questions/191598/electric-network-one-line-diagrams/325717#325717 +cct_init +include(libSLD.m4) +First: [ + xgap = 0.6 + dim1 = 1; dim2 = 0.75 ; dim3=0.5 + X: box fill_(0.9) wid 1 "Xingu" "\SI{500}{\kV}" + { "$R_0=\SI{1,682}{\ohm}$" at X.sw below ljust } + sl_transformer(right_ dim2,type=S); rlabel(,\SI{18}{\percent},) + {[Ysymbol;Ysymbol(at last []+(last [].wid,0))] with .s at last [].n+(0,2bp__)} + { B1: line thick 3*linethick up 0.4 with .c at Here + "$s$" wid 0.1 ht 0.1 above } + { arrow right 0.2 from last line.c+(0.1,-0.1) } + { "$I^s$" at last line.start below } + line right 3.0 "$l=\SI{2600}{\km}$" wid 0.1 ht 0.1 above + { B2: line thick 3*linethick up 0.4 with .c at Here; "$r$" above } + sl_transformer(right_ dim2,type=S); rlabel(,\SI{18}{\percent},) + {[Ysymbol;Ysymbol(at last []+(last [].wid,0))] with .s at last [].n+(0,2bp__)} + NI: box fill_(0.9) wid 1 "Nova Igua\c{c}u" "\SI{500}{\kV}" + "$Z_0=a+b$" at NI.sw below ljust + RELE: box wid dimen_/2 ht dimen_/2 with .w at B1+(0.6,0.3) + line left 0.15 from 1/4 between RELE.nw and RELE.sw; "$V^s$" rjust + line left 0.15 from 3/4 between RELE.nw and RELE.sw; "$I^s$" rjust + ] +Second: [ + lstem = dimen_*3/4 + asep = dimen_/3 + sl_grid(U,lgth=dimen_;wdth=dimen_) + sl_transformer(down_ dimen_*7/4,type=S;name=Tr) + llabel(,"$\SI{400}{kVA}$" ljust "$\SI{4}{\percent}$" ljust,,,Tr) + Bus: sl_busbar(right_ dimen_*12, 5) with .P3 at Here +# +define(`loadstring',`[ L: line invis down_ dimen_*5 + line from L.start down_ L.len/4; dot + { arrow <-> down_ last line.len at last line+(asep,0) "\sf $5 m" ljust } + { sl_load(left_ lstem); "\sf $1" at Head.w rjust } + { r_text(90,`\sf\scriptsize NAYY 4x150 mm$^2$', at Here+(-7bp__,0)) } + line down_ L.len/4; dot + { arrow <-> down_ last line.len at last line+(asep,0) "\sf $6 m" ljust } + { sl_load(left_ lstem); "\sf $2" at Head.w rjust } + { box wid dimen_/3 ht dimen_/3 at Here } + line down_ L.len/8-3bp__ + { ACsymbol(at Here+(0,-3bp__),,,2:RA) } + line down_ L.len/8+3bp__ from last line.end chop 6bp__ chop 0; dot + ifelse(`$7',,, + `{ arrow <-> up_ L.len/4 from Here+(asep,0) "\sf $7 m" ljust }') + { sl_load(left_ lstem); "\sf $3" at Head.w rjust } + line down_ L.len/4; dot + { arrow <-> down_ last line.len at last line+(asep,0) "\sf $8 m" ljust } + { sl_load(left_ lstem); Q:"\sf $4" at Head.w rjust } + { box wid dimen_/3 ht dimen_/3 at Here } ]') +# + loadstring(1,2,27,28, 21,21,,21) with .L.start at Bus.P1 + move left_ 13bp__ from last [].Q + loadstring(1,2,15,16, 29,29,,29) with .L.start at Bus.P2 + loadstring(1,2, 8, 9, 40,40,,40) with .L.start at Bus.P3 + loadstring(1,2, 3, 4, 64,64,64,64) with .L.start at Bus.P4 + line down_ last [].L.len/2 from Bus.P5; dot + { r_text(90,`\sf\scriptsize NAYY 4x150 mm$^2$', at last line.c+(-7bp__,0)) } + { arrow <-> down_ last line.len at last line+(asep,0) + "\sf 102 m" wid 30.4 bp__ ljust at last arrow } + { sl_load(left_ lstem)} + ] with .nw at First.sw+(0,-dimen_/2) +#showbox_ +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/OpAmpFilter.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/OpAmpFilter.m4 new file mode 100644 index 00000000000..8e8f82c9801 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/OpAmpFilter.m4 @@ -0,0 +1,69 @@ +.PS +# OpAmpFilter.m4 +cct_init +command "{\small\sf" + + define(`SpecOpAmp',`$1: [ right_ + lwtmp = linewid; linewid = 1*scale + H: opamp + "$2" at H.In1 below rjust + "$3" at H.In2 below rjust + "$4" at H.E below ljust + "V${-}$" at H.E1 below + line up_ dimen_/3 from H.E1 "4" rjust; dot(,,1) + "$\hbox{V}_{\hbox{CC}}$" rjust at last [].w + "V${+}$" at H.E2 above + line down_ dimen_/3 from H.E2 "11" ljust; dot(,,1) + "${-}\hbox{V}_{\hbox{CC}}$" ljust at last [].e + linewid = lwtmp + ifelse($1,U1,,`line left_ jog from H.In2 then down_ jog/2; zground ') + "$1" at H.S below ljust + In1: H.In1; In2: H.In2; Out: H.Out + D: dot(at Out) + V: circle diam 12bp__ "V" at Out+(dimen_/4,dimen_/3) + "V$_{\hbox{\scriptsize $5}}$" at V.n above + open_arrow(from V to D chop last circle.rad chop dotrad_) ] ') + define(`zground',`ground(`$1',,S); "0" at Here+(dimen_/6,-dimen_/2)') + + cscale = 5/4 + linewid = linewid*cscale + jog = dimen_*0.3 + vstep = dimen_*5/4 + SpecOpAmp(U1,2,3,1,hp) + R1: resistor(right_ elen_*3/4 from U1.Out); llabel(,"R1"); rlabel(,"1`\,'k") + dot; line right_ jog + SpecOpAmp(U2,5,6,7,bp) with .In1 at Here + R2: resistor(right_ elen_*3/4 from U2.Out); llabel(,"R2"); rlabel(,"1`\,'k") + dot; line right_ jog + SpecOpAmp(U3,9,10,8,lp) with .In1 at Here + SpecOpAmp(U4,13,12,14,n) with .Out at U3.Out+(0,-dimen_*3.05) + line up vstep from U4.Out + Rf: resistor(left_); rlabel(,"R$_{\hbox{f}}$"); llabel(,"1`\,'k") + line to (U4.In1,Here)-(jog,0) then to U4.In1-(jog,0); dot + line from U3.Out down_ vstep+5bp__ then left_ jog + RL: resistor; rlabel(,"RL"); llabel(,"100") + line to (U4.In1-(2*jog,0),Here) then to U4.In1-(2*jog,0); dot + line from U1.Out to (U1.Out,Here); right_ + R42: resistor(to U4.In1); llabel(,"R42"); rlabel(,"1`\,'k") + line from U2.Out down_ vstep + R41: resistor(left_ to (U1.In2-(jog,0),Here)) + llabel(,"2.2`\,'k"); rlabel(,"R41") + line to (Here,U1.In2); dot; { line to U1.In2 } + line left_ jog; dot + { resistor(down_ elen_); rlabel(,"R0" rjust "10`\,'k"); zground } + R3: resistor(left_ dimen_); rlabel(,"R3","in"); llabel(,"1`\,'k") + source(down_ elen_,AC); llabel("V$_{\hbox{\scriptsize in}\;}$"); zground + line up_ vstep from U1.Out + R5: resistor(left_ to (U1.In1-(jog,0),Here)); rlabel(,"R6\enskip 10`\,'k") + dot + line from U1.In1 left_ jog then to Here+(0,dimen_/2) + resistor(right_ to (U3.Out,Here)); llabel(,"R5"); rlabel(,"1`\,'k") + line to U3.Out; dot(at Here+(0,vstep)) + capacitor(left_ to (U3.In1-(jog,0),Here)); rlabel(,"C2\enskip 100`\,'n") + line to (Here,U3.In1) + line from U2.Out up_ vstep + capacitor(left_ to (U2.In1-(jog,0),Here)); rlabel(,"C1\enskip 100`\,'n") + line to (Here,U2.In1) + +command "}%" +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Optics.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Optics.m4 new file mode 100644 index 00000000000..d4fadd44652 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Optics.m4 @@ -0,0 +1,31 @@ +.PS +# Optics.m4 +# https://tex.stackexchange.com/questions/623201/geometrical-optics +gen_init +scale = 2.54 + + textoffset = 4pt__ + O: dot(at (0,0)) ; "\Large $O$" below rjust + L: line thick 1 right_ 14 with .c at O + S: dot(at (1.8,0)) ; "\Large $S$" below rjust + r = 7 + C: dot(at (S.x-r,0)) ; "\Large $C$" below + F: dot(at (-1.8,0)) ; "\Large $F$" below + I: dot(at (4,0)) ; "\Large $I$" below + arrow dashed from I up_ 3.2 ; It: Here + AS: C.x+sqrt(r^2-3.7^2),3.7 + Arc: arc thick 1 cw from AS to (AS.x,-AS.y) rad r with .c at C + for y=-AS.y to AS.y+0.001 by 0.1 do { line thick 0.4 right 0.5 up 0.1 \ + from (C.x+sqrt(r^2-y^2),y) } + M: move from C to It + A1: arrow outlined "red" from C to LCintersect(M,C,r,R) chop -2 chop 0 + arrow outlined "red" dashed to It chop 0 chop -3 + N: move from It to F + arrow <- outlined "red" dashed from It to LCintersect(N,C,r) chop -2 chop 0 + P: move down_ 1 from A1.start + arrow outlined "red" from last arrow.end to Intersect_(P,N) + Q: move up 1 from O + arrow from O to Intersect_(Q,M) + arrow outlined "red" to (C.x+sqrt(r^2-Here.y^2),Here.y) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Orbits.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Orbits.m4 new file mode 100644 index 00000000000..ef85d279353 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Orbits.m4 @@ -0,0 +1,74 @@ +.PS +# Orbits.m4 +threeD_init +NeedDpicTools + + crad = 1.0 + g = 0.65 + +# `orbitpos(long,lat,rad,ang)' +define(`orbitpos', + `rot3Dx((`$2')*dtor_,rot3Dz((`$1')*dtor_,rot3Dy(-(`$4')*dtor_,`$3',0,0)))') + +define(`PO',`B.C+(Project(orbitpos(orbitlong,orbitlat,orbitrad,`$1')))') + +define vis { X: PO($1) + if (distance(X,B.C)>crad) || \ + (dot3D(View3D,orbitpos(orbitlong,orbitlat,orbitrad,$1))>0) \ + then {$2 = 1} else {$2 = -1} } + +# `orbit(long,lat,rad)' +define(`orbit', + `[da = 3 + orbitlong = `$1' + orbitlat = `$2' + orbitrad = `$3' + define(`decorated',`ifelse(`$4',,,`outlined `$4'')') + arrow from PO(0) to PO(da*3) decorated + n=0 + P[n]: PO(0) + vis(0,v) + for d=da to 360 by da do { + vis(d,x) + if x*v < 0 then { + findroot(vis,d-da,d,1e-6,x) + n+=1; P[n]: PO(x) + if v < 0 then { fitcurve(P,n,dashed decorated) } \ + else { fitcurve(P,n,decorated) } + P[0]: P[n] + n = 0; v = -v } + n +=1; P[n]: PO(d) + } + if v < 0 then { fitcurve(P,n,dashed decorated) } \ + else { fitcurve(P,n,decorated) } + ] with .c at B.C') + +# ball(rad,highlight rad,highlight degrees) +define(`ball',`[ + lt = linethick bp__ + C: circle invis rad `$1' at (0,0) + D: C+(Rect_(`$2',`$3')) + rm = `$1'+distance(C,D) + a = 1 # fade rate parameter + for r=lt to rm by lt do { + u = 1-(r/rm*(a*r/rm+(1-a))) + if r < (1-g)*`$1' then { circle outlined rgbstring(u,u,u) rad r at D } \ + else { arc cw outlined rgbstring(u,u,u) from Cintersect(D,r,C,`$1') \ + to Cintersect(D,r,C,`$1',R) with .c at D + } + } + circle rad C.rad at C + ]') + + linethick = 0.8 + B: ball(crad,crad*g,110) + + azimuth = 0 + elevation = 0 + setview(azimuth,elevation) + + orbit(10, 30,crad*1.3,"red") + orbit(10,-30,crad*1.3,"blue") + orbit(10,-90,crad*1.3,"cyan") + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/PPA.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/PPA.m4 new file mode 100644 index 00000000000..8d25901310d --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/PPA.m4 @@ -0,0 +1,40 @@ +.PS +# `PPA.m4 Push-pull amplifier' +cct_init + +Vs: source(up_ elen_,"$V_S$") + line right elen_/2 +T1: transformer(down_ elen_,,,W,10) with .P1 at Here + { dot(at T1.TP+(-dimen_/8,dimen_/3)) } + { dot(at T1.TS+(dimen_/8,dimen_*2/3))} + { dot(at T1.TS+(dimen_/8,-dimen_/8)) } + line from T1.P2 to Vs.start + + line up_ dimen_*3/4 from T1.S1 then right_ dimen_*3/4 + up_ +Q1: bi_tr(,L,,E) with .B at Here + line down_ dimen_*3/4 from T1.S2 then right_ dimen_*3/4 + down_ +Q2: bi_tr(,R,,E) with .B at Here + line from Q1.E to Q2.E +R2: resistor(left_ dimen_ from last line); llabel(,R_2) + dot; {dot(at R2.start) } + line to T1.TS + line down_ dimen_/2 right_ dimen_/2 from R2.start + ground + + line right_ dimen_/6 from R2.start +Vcc: battery(right_ elen_,2); rlabel(,V_{cc}) + dot + line up dimen_*2/3 then to (R2.start.x,Here.y+dimen_*2/3) + resistor(to (R2.end,Here)); rlabel(,R_1); line to R2.end + line right_ dimen_/2 from Vcc.end +T2: transformer(up_ elen_,,,W,10) with .TS at Here + line from T2.S2 to (T2.S2,Q1.C) then to Q1.C + line from T2.S1 to (T2.S1,Q2.C) then to Q2.C + + line right elen_/2 from T2.P2 + resistor(down_ to (Here,T2.P1)); llabel(,R_L) + line to T2.P1 + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/PerpTo.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/PerpTo.m4 new file mode 100644 index 00000000000..410ce9605f4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/PerpTo.m4 @@ -0,0 +1,26 @@ +.PS +# PerpTo.m4 +# https://tex.stackexchange.com/questions/666411/repetitive-perpendiculars-in-a-right-angle-triangle +gen_init + + O: (0,0) + A: (5,0) + B: (0,3) + +define drawperp { #( depth, O, A, B ) +[ d = $1; O[d]: $2; A[d]: $3; B[d]: $4 + P[d]: PerpTo(O[d],A[d],B[d]) + if d > 0 then { + exec sprintf("drawperp(%g,P[%g],O[%g],A[%g]) with .O[%g] at P[%g]",\ + d-1,d,d,d,d-1,d) + exec sprintf("drawperp(%g,P[%g],B[%g],O[%g]) with .O[%g] at P[%g]",\ + d-1,d,d,d,d-1,d) + } + line outlined graystring((depth-d)/depth) from O[d] to P[d] + ] } + + depth = 6 + drawperp(depth,O,A,B) with .O[depth] at O + line from O to A then to B then to O + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Pipe.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Pipe.m4 new file mode 100644 index 00000000000..0d6512478c1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Pipe.m4 @@ -0,0 +1,40 @@ +.PS +# How about ladder diagrams? +gen_init +NeedDpicTools + + { for x=0 to 5 do { line up 5 from (x,0) } } + { for y=0 to 5 do { line right 5 from (0,y) } } + posarray(A, + (1,0.5), + (4,0.5), + (4.5,1), + (4.5,3), + (4,3.5), + (3.5,3), + (3,2.5), + (1,2.5), + (0.5,3), + (0.5,4), + (1,4.5), + (4,4.5)) + P[0]: 1,0.5 + P[1]: 4.5,0.5 + P[2]: 4.5,3.5 + P[3]: 3.5,3.5 + P[4]: 3.5,2.5 + P[5]: 0.5,2.5 + P[6]: 0.5,4.5 + P[7]: 4,4.5 + + r = 0.4 + define(`curve', + ` move to P[0] + for i_c=1 to 6 do { arcto(P[i_c],P[i_c+1],r,`$1') } + line to P[7] `$1'') + + lw = 0.3/(1bp__) + lt = 1.8 + for i=0 to 6 do { + curve(thick lw-lt*i outlined rgbstring(0.1+i/10,0.1+i/10,0.1+i/10))} +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Planes.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Planes.m4 new file mode 100644 index 00000000000..9344bd2ddad --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Planes.m4 @@ -0,0 +1,175 @@ +.PS +# Planes.m4 +threeD_init +NeedDpicTools + +# These 3D diagrams are like many others: define the surface facets, +# use normal vectors to determine visibility, sort and plot the visible +# facets from back to front. + +# Store a point as x_[i], y_[i], z_[i] +define(`mktriple',` + x_[$1] = $2 + y_[$1] = $3 + z_[$1] = $4') +# Recover point coordinates +define(`triple',`x_[$1], y_[$1], z_[$1]') + +define(`facetnormal',`cross3D( + diff3D(triple($1*3+1),triple($1*3)), + diff3D(triple($1*3+2),triple($1*3+1)))') + +define(`facetcenter',`sprod3D(0.5,sum3D(triple($1*3),triple($1*3+2)))') + +# Create npositive, arrays dcosine[1..npositive] +# and index ix[1..npositive] of sorted facets +# Uses macros facetnormal(i) and facetcenter(i) +define(`processfacets',` + npositive = 0 + for i=1 to `$1' do { + mktriple(0,facetnormal(i)) + dx = dot3D(triple(0),View3D) + if dx > 0 then { + dcosine[i] = dx/length3D(triple(0)) # direction cosine normal wrt View3D + npositive +=1 + dist[npositive] = dot3D(facetcenter(i),View3D) # distance + ix[npositive] = i + } + } + dpquicksort(dist,1,npositive,ix) ') + +ifelse(1,1,` +Threeplanes: [ +# Size parameters + a = 3/2 + b = 0.4 + d = 1 +# Define intersecting lines in the plane + A0: -a,-b + A1: a,-b + B0: Rot_(A0,120) + B1: Rot_(A1,120) + C0: Rot_(A0,240) + C1: Rot_(A1,240) + +# Intersections +define(`lintersect',`intersect_(`$1'0,`$1'1,`$2'0,`$2'1)') + AB: lintersect(A,B) + BC: lintersect(B,C) + CA: lintersect(C,A) + +# Facets are rectangles here; store 3 corners +define(`mkfacet',` + mktriple((`$1')*3, 0,`$2'.x,`$2'.y) + mktriple((`$1')*3+1, 0,`$3'.x,`$3'.y) + mktriple((`$1')*3+2,-d,`$3'.x,`$3'.y) + ') +# Define the facets + mkfacet(m4inx,A0,CA) mkfacet(m4inx,CA,A0) + mkfacet(m4inx,CA,AB) mkfacet(m4inx,AB,CA) + mkfacet(m4inx,AB,A1) mkfacet(m4inx,A1,AB) + + mkfacet(m4inx,B0,AB) mkfacet(m4inx,AB,B0) + mkfacet(m4inx,AB,BC) mkfacet(m4inx,BC,AB) + mkfacet(m4inx,BC,B1) mkfacet(m4inx,B1,BC) + + mkfacet(m4inx,C0,BC) mkfacet(m4inx,BC,C0) + mkfacet(m4inx,BC,CA) mkfacet(m4inx,CA,BC) + mkfacet(m4inx,CA,C1) mkfacet(m4inx,C1,CA) + nfacets = m4x + +# Wierd color +define(`colr',`ifelse(`$1',,"white", + `rgbstring(`$1',ifelse(`$2',,`$1',`$2'),ifelse(`$3',,`$1',`$3'))')') + +# Recover the 4th corner and draw +define(`drawfacet',` + NW_facet: project(triple(($1)*3)) + NE_facet: project(triple(($1)*3+1)) + SE_facet: project(triple(($1)*3+2)) + SW_facet: project(x_[($1)*3+2],y_[($1)*3],z_[($1)*3]) + N_facet: 0.5 between NW_facet and NE_facet + line from N_facet to NE_facet then to SE_facet then to SW_facet \ + then to NW_facet then to N_facet shaded colr(`$2',`$3',`$4') +# fill_(ifelse(`$2',,1,`(1-`$2')')) + ') + +# View angles azimuth, elevation, rotation (degrees) + setview( 10, 40 ) + +# Draw facets, shading with view cosines + processfacets(nfacets) + for i=1 to npositive do { drawfacet(ix[i],max(0,1-2*dcosine[ix[i]]), + dcosine[ix[i]], + dcosine[ix[i]]) +# for i=1 to npositive do { drawfacet(ix[i],dcosine[ix[i]]) + } + +] # Threeplanes +') + +# Bowl +# vertx_(facet_no,vertex_no) + define vertx_ { ($1-1)*nvertices + $2 } + +# Normal vector to a facet +define(`facetnormal',`cross3D( + diff3D(triple(vertx_($1,2)),triple(vertx_($1,1))), + diff3D(triple(vertx_($1,4)),triple(vertx_($1,1))))') + +# Facet center +define(`facetcenter',`sprod3D(1/4,sum3D( + sum3D(triple(vertx_(`$1',1)),triple(vertx_(`$1',2))), + sum3D(triple(vertx_(`$1',3)),triple(vertx_(`$1',4)))))') + +define(`drawplane',` + NW_plane: project(triple(vertx_($1,1))) + SW_plane: project(triple(vertx_($1,2))) + SE_plane: project(triple(vertx_($1,3))) + NE_plane: project(triple(vertx_($1,4))) + N_plane: 0.5 between NW_plane and NE_plane + shd = (`$2')^(1/4) + line from N_plane to NE_plane then to SE_plane then to SW_plane \ + then to NW_plane then to N_plane \ + fill_(ifelse(`$2',,1,shd)) outlined rgbstring(shd,shd,shd) +# line from NW_plane to NE_plane + line from SW_plane to SE_plane + ') + +ifelse(1,1,` + nvertices = 4 # vertices per facet +Bowl: [ + elevation = 30 + setview( 0, 30 ) + nplanes = 40 + bigradius = 2 + smallradius = 1 + cupht = 1.5 + thin = smallradius/10 +# Define the facet corners + for i=1 to nplanes do { + mktriple(vertx_(i,1),rot3Dz((i-1)/nplanes*twopi_,bigradius,0,0)) + mktriple(vertx_(i,2),rot3Dz((i-1)/nplanes*twopi_,smallradius,0,-cupht)) + mktriple(vertx_(i,3),rot3Dz((i )/nplanes*twopi_,smallradius,0,-cupht)) + mktriple(vertx_(i,4),rot3Dz((i )/nplanes*twopi_,bigradius,0,0)) + mktriple(vertx_(nplanes+i,1),triple(vertx_(i,4))) + mktriple(vertx_(nplanes+i,2),triple(vertx_(i,3))) + mktriple(vertx_(nplanes+i,3),triple(vertx_(i,2))) + mktriple(vertx_(nplanes+i,4),triple(vertx_(i,1))) + } +# for i=1 to nplanes do { +# mktriple(vertx_(i,1),rot3Dz((i-1)/nplanes*twopi_,bigradius,0,0)) +# mktriple(vertx_(i,2),rot3Dz((i-1)/nplanes*twopi_,smallradius,0,-cupht)) +# mktriple(vertx_(i,3),rot3Dz((i-1)/nplanes*twopi_,smallradius-thin,0,-cupht)) +# mktriple(vertx_(i,4),rot3Dz((i-1)/nplanes*twopi_,bigradius-thin,0,0)) +# } +# Find the visible facets and sort + processfacets(nplanes*2) + + for i=1 to npositive do { drawplane(ix[i],dcosine[ix[i]]) } + ellipse wid 2*bigradius ht 2*bigradius*sin(elevation*dtor_) at project(0,0,0) + +] #with .sw at Threeplanes.se +') + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/README_extras b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/README_extras new file mode 100644 index 00000000000..140802fb682 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/README_extras @@ -0,0 +1,6 @@ + +THIS DIRECTORY contains a Makefile and .m4 sources for diagrams +not included in the examples files. Type "make" and, to clean up, +"make clean". This directory is assumed to be a subdirectory of +the examples directory in order to include the necessary definition +files. diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/RandomNodes.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/RandomNodes.m4 new file mode 100644 index 00000000000..f14973204f2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/RandomNodes.m4 @@ -0,0 +1,19 @@ +.PS +# RandomNodes.m4 +gen_init +NeedDpicTools + + scale = 2.54 + n = 300 + msiz = 4.90*2 + maxdist = 1.0 + + box wid msiz ht msiz with .sw at (0,0) + for i=1 to n do { X[i] : (rand(), rand())*msiz } + for i=1 to n-1 do { for j=i+1 to n do { + if distance(X[i],X[j]) <= maxdist then { + line outlined "green" from X[i] to X[j] + } } } + for i=1 to n do { circle rad dotrad_ at X[i] shaded "green" } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Region.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Region.m4 new file mode 100644 index 00000000000..e4cde354917 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Region.m4 @@ -0,0 +1,38 @@ +.PS +# Region.m4 +# https://tex.stackexchange.com/questions/606088/how-can-i-plot-in-latex +gen_init + + grsize = 3.3 + maxaxis = 4.5 + define Grid { (($1+maxaxis)/(2*maxaxis)*grsize-grsize/2,\ + ($2+maxaxis)/(2*maxaxis)*grsize-grsize/2) } + +thinlines_ + box wid grsize ht grsize with .c at (0,0) + tic = 0.05 + for x=-maxaxis to maxaxis by 0.5 do { + line up tic from Grid(x,-maxaxis) + y = abs(x) + { if y/2 == int(y/2+0.5) then { sprintf("%g",x) at last line.start below } } + line down tic from Grid(x,maxaxis) + line right tic from Grid(-maxaxis,x) + { if y/2 == int(y/2+0.5) then { sprintf("%g",x) at last line.start rjust } } + line left tic from Grid(maxaxis,x) + } +thicklines_ + + n = 10 + ylim = 3 + for i=0 to n do { y = i/n*ylim + P[i]: Grid(sqrt(1+y^2),y) + P[-i]:( P[i].x,-P[i].y) + Q[i]: (-P[i].x, P[i].y) + Q[-i]:(-P[i].x,-P[i].y) } + rgbfill(0.6,0.6,0.8, + fitcurve(P,n,,-n) + line to (P[n].x,P[n].x) then to (Q[-n].x,Q[-n].x) then to Q[-n] + fitcurve(Q,n,,-n) + line to (Q[n].x,-Q[n].x) then to (P[-n].x,-P[-n].x) then to P[-n] ) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Resolver.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Resolver.m4 new file mode 100644 index 00000000000..b6ca93047a7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Resolver.m4 @@ -0,0 +1,49 @@ +.PS +# `Resolver.m4' +cct_init +s_init(tst) +sinclude(tst.dim) + +iflatex(`latexcommand({\scriptsize\sf)') + +[ +linewid = linewid*1.25 +define(`dotrad_',dotrad_/2) + + T1: transformer(down_ dimen_/2) + line left from T1.P1; dot; move left 15bp__ "RH" + line left from T1.P2; dot; "RL" rjust + "Rotor ($r$)" at T1.TP rjust + line right_ dimen_*3/4 from T1.S2 + C: Here + phi = 35 + move right_ 0.1 from T1.S1; move from C to C+(Rect_(0.1,90+phi)) + Q: Intersect_(last move,2nd last move) + Lr: inductor(from Q to C) + S1: line from T1.S1 to Q + A: C+(Rect_(dimen_*0.9,90+phi)) + thinlines_ + line dashed from Q to A chop 2bp__ chop 0 + "Rotor shaft" at last line.end rjust "angle" rjust "" rjust + line dashed from C up_ dimen_*0.9 chop 2bp__ chop 0 + arcd(C,dimen_*0.85,90,90+phi) -> + thicklines_ + f_box($\phi$) at C+(Rect_(dimen_*0.85,90+phi/2)) + + d = distance(T1.P1,T1.P2) + Ls: inductor(up_ d from C+(d/2,0)) + line right_ from Ls.end + D2: dot; "S2" ljust + line from Ls.start to (D2,Ls.start); dot; "S4" ljust + "$Kr\cos(\phi)$" at 0.5 between last "" and 2nd last "" + Lq: inductor(right_ d at (Lr,(C+(0,-d/3)))) + line from Lq.end down_ d/4 + K: Here; corner; line to (D2,K); dot; "S3" ljust + line from Lq.start down_ d*5/4 + L: Here; corner; line to (D2,L); dot; "S1" ljust + "$Kr\sin(\phi)$" at 0.5 between last "" and 2nd last "" +] +"Resolver essentials" at last [].s below + +iflatex(`latexcommand(})') +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/SPM.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/SPM.m4 new file mode 100644 index 00000000000..0b3fdb642c4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/SPM.m4 @@ -0,0 +1,59 @@ +.PS +# `SPM.m4 Salient-pole machine' +gen_init + + outerrad = 1 + medrad = 11/16 + windings = 6 + polewid = 3/8 + twid = (outerrad-medrad)/3 + srad = twid/4 + halfline = ifgpic(0,linethick/2 pt__) + + C: circle rad outerrad at 0,0 + line from Rect_(outerrad,180+60) to (C.w,C.s) then down polewid/2 \ + then right 2*outerrad then up polewid/2 then to Rect_(outerrad,-60) + + line from C+(medrad,-twid/2) right twid then up twid then left twid \ + chop -halfline + E: Here+(halfline,0) + for i = 1 to windings*2 do { + Point_(i*360/(windings*2)) + arc ccw from E to C+vec_(medrad,-twid/2) with .c at C + E: rvec_(0,twid) + line to rvec_(twid,0) then to rvec_(twid,twid) then to E chop -halfline + } + move to C + for i = 0 to 3 do {{ + Point_(i*90) + for_(-1,1,2, + `{ line from rvec_(polewid/2,m4x*polewid/2) \ + to rvec_(medrad*2/3,m4x*polewid/2) \ + then to rvec_(medrad*2/3,m4x*(polewid/2+polewid/5)) \ + chop -halfline chop 0 + { move to rvec_(0,-(m4x*polewid/5)) + line from rvec_(-twid/2,m4x*twid/4) to rvec_(-twid/4,m4x*twid/4) \ + then to rvec_(-twid/4,m4x*twid*3/4) \ + then to rvec_(-twid*7/4,m4x*twid*3/4) \ + then to rvec_(-twid*7/4,m4x*twid/4) \ + then to rvec_(-twid/2,m4x*twid/4) } + T: rvec_(srad,0) + arc ifelse(m4x,-1,c)cw to (1+srad/distance(T,C)) with .c at T + }') + arc cw from last arc.end to 2nd last arc.end with .c at C + }} + + t = distance(C,last arc.s) + "\sf N" at C+(0, t) below + "\sf N" at C+(0,-t) above + "\sf S" at C+(-t,0) ljust + "\sf S" at C+( t,0) rjust + + for i = 0 to windings/2-1 do { + for j = 1 to 2 do { sprintf("$\char%g_%g$",97+i,j) \ + at Rect_(outerrad-twid,180*(2-j)-i*360/windings) } + for j = 1 to 2 do { sprintf("$\char%g_%g'$",97+i,j) \ + at Rect_(outerrad-twid,180*(2-j)-90-i*360/windings) } + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/SampleFlow.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/SampleFlow.m4 new file mode 100644 index 00000000000..077a0ba6e3c --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/SampleFlow.m4 @@ -0,0 +1,35 @@ +.PS +# SampleFlow.m4 +darrow_init + +boxwid = 1.9 +boxht = 1.0 +linethick = 1.2 + + define(`dlthick',0.25) + define(`dfillcolor',`0.7,0.7,0.7') + + define rbox {box rad boxht/10} + define offset { with .nw at last box.se+(-0.15,-0.125)} + define indent { at last box.w+(0.1,0)} + define connect { + { Dline(from 2nd last box.s to (2nd last box,last box),E;ends=!-) + dleft + darrow(to last box.w) } } + + command "{\sf\huge" + + B1: rbox + { "Sample" ljust indent "Acquisition" ljust } + B2: rbox offset + {"Sample" ljust indent "Checking" ljust } + connect + B3: rbox offset + {"Dimensionality" ljust at last box.w "Sample Check" ljust } + connect + B4: rbox offset + {"Sample" ljust indent "Synthesis" ljust "Techniques" ljust } + connect + + command "}%" +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ShadeSector.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ShadeSector.m4 new file mode 100644 index 00000000000..0632fdb14f4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/ShadeSector.m4 @@ -0,0 +1,14 @@ +.PS +# ShadedSector.m4 +# https://tex.stackexchange.com/questions/635327/multi-color-circular-gradient-in-tikz + +gen_init +NeedDpicTools + + rx = 4 + n = int(rx/lthick) + for i=1 to n do { left_ + hsvtorgb((1-i/n)*180,1,1,r,g,b) + arc rad i/n*rx with .c at (0,0) outlined rgbstring(r,g,b) } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Shadow.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Shadow.m4 new file mode 100644 index 00000000000..1ad65d8eb43 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Shadow.m4 @@ -0,0 +1,129 @@ +.PS +# Shadow.m4 +gen_init +NeedDpicTools +s_init(HSV) + +divert(-1) + `shadowellipse(options,text) + Draws a shadowed ellipse + with gradient from white at the top to + hsv-specified color at the bottom + Default is uniform lightgray shade + Arg 2 is a text label written at the center' +define(`shadowellipse',`[ Orig: Here + m4shadow_keys(`$1') + [ + ellipse wid m4wid ht m4ht invis shaded m4shadow ] wid 0 ht 0 \ + at (m4shadowthick+m4thick bp__/2,-(m4shadowthick+m4thick bp__/2)) +# at ((m4shadowthick)/2,-(m4shadowthick)/2) +ifelse(m4hue,,,` + define pElBshade { v = m4ht*($`'1) + if v < m4rad then { h = (m4wid/2-m4rad)+sqrt(m4rad^2-(m4rad-v)^2) } \ + else { if v < m4ht-m4rad then { h = m4wid/2 } \ + else { h = (m4wid/2-m4rad)+sqrt(m4rad^2-(m4rad-(m4ht-v))^2) } } + line from (-h,v) to (h,v) thick m4thick outlined rgbstring($`'2,$`'3,$`'4) + } + nsteps = rnd(m4ht/(m4thick bp__)*1.1) + hsvtorgb(m4hue,m4sat,m4val,r,g,b) + ShadeObject(pElBshade,nsteps, + 0, r, g, b, + 1, 1, 1, 1) with .c at Orig ') + Ellipse: ellipse ht m4ht wid m4wid thick m4thick outline m4outlined \ + at Orig ifelse(m4hue,,shaded m4shaded) + ifelse(`$2',,,`m4lstring(`$2',"`$2'") at Ellipse') + `$3']') + `shadowbox(options,text) Draws a shadowed box + with gradient from white at the top to + hsv-specified color at the bottom + Default is uniform lightgray shade + Arg 2 is a text label written at the center' +define(`shadowbox',`[ Orig: Here + m4shadow_keys(`$1') + [ + box invis rad m4rad ht m4ht wid m4wid shaded m4shadow ] wid 0 ht 0 \ + at (m4shadowthick+m4thick bp__/2,-(m4shadowthick+m4thick bp__/2)) +# box rad m4rad+m4thick bp__/2+m4shadowthick/2 ht m4ht wid m4wid \ +# thick m4shadowthick/(1bp__) outlined m4shadow ] wid 0 ht 0 \ +# at ((m4shadowthick+m4thick bp__)/2,-(m4shadowthick+m4thick bp__)/2) +ifelse(m4hue,,,` + define pBxBshade { v = m4ht*($`'1) + if v < m4rad then { h = (m4wid/2-m4rad)+sqrt(m4rad^2-(m4rad-v)^2) } \ + else { if v < m4ht-m4rad then { h = m4wid/2 } \ + else { h = (m4wid/2-m4rad)+sqrt(m4rad^2-(m4rad-(m4ht-v))^2) } } + line from (-h,v) to (h,v) thick m4thick outlined rgbstring($`'2,$`'3,$`'4) + } + nsteps = rnd(m4ht/(m4thick bp__)*1.1) + hsvtorgb(m4hue,m4sat,m4val,r,g,b) + ShadeObject(pBxBshade,nsteps, + 0, r, g, b, + 1, 1, 1, 1) with .c at Orig ') + Box: box rad m4rad ht m4ht wid m4wid thick m4thick outline m4outlined \ + at Orig ifelse(m4hue,,shaded m4shaded) + ifelse(`$2',,,`m4lstring(`$2',"`$2'") at Box') + `$3']') +define(`m4shadow_keys', +# Box size parameters +`setkey_(`$1',ht,boxht)dnl + setkey_(`$1',wid,boxwid)dnl + setkey_(`$1',rad,boxht/8)dnl + setkey_(`$1',thick,linethick)dnl +# Shadow thickness + setkey_(`$1',shadowthick,2*lthick)dnl +# HSV color for gradient shading + setkey_(`$1',hue)dnl Default is blank for a shade fill; + setkey_(`$1',sat,1)dnl + setkey_(`$1',val,1)dnl +# Named colors + setkey_(`$1',shaded,"lightgray",N)dnl + setkey_(`$1',outlined,"gray",N)dnl + setkey_(`$1',shadow,"lightgray",N)dnl +') + +divert(0)dnl + +w = 0.3 +boxwid = w +dh = 30 +# Hue from 0 to 360 +T:[ for i=0 to 361 by dh do { shadowbox(hue=i) } ] + { s_box(hue=0) at T.w rjust; s_box(hue=360) at T.e ljust } + { for i=0 to 361 by dh do { s_box("%g",i) at T.nw+(w/2+i/dh*w,0) above } } + { s_box(hue) at T.n+(0,12bp__) above } + +# Hue from 0 to 360; sat=0.5; val=0.5 +Ta:[ for i=0 to 361 by dh do { shadowbox(hue=i;sat=0.5;val=0.5) } ] \ + with .nw at last [].sw + { s_box(`\shortstack[r]{sat=0.5\\val=0.5}') at Ta.w rjust } + +# Hue = 0; sat=0 to 1 +U:[ for i=0 to 361 by dh do { shadowbox(hue=0;sat=i/360) } ] \ + with .nw at last [].sw + { s_box(`\shortstack[r]{hue=0\\sat=0}') at U.w rjust + s_box(sat=1) at U.e ljust } + +# Hue = 0; val=0 to 1 +V:[ for i=0 to 361 by dh do { shadowbox(hue=0;val=i/360) } ] \ + with .nw at last [].sw + { s_box(`\shortstack[r]{hue=0\\val=0}') at V.w rjust + s_box(val=1) at V.e ljust } + +# Miscellaneous +W:[ + shadowbox + DefineRGBColor(verylight,0.95,0.95,0.95); shadowbox(shaded=verylight) + shadowbox(hue=0;val=0) + DefineHSVColor(cx,110,0.5,0.5); shadowbox(shaded=cx) + shadowbox(shaded="yellow") + DefineHSVColor(lx,120,0.4,0.5); shadowbox(hue=120;sat=0.3;val=0.2;shadow=lx) + ] with .nw at last [].sw + +ellipsewid = w +#linethick = 5 +X:[ + shadowellipse(shadowthick=lthick) + ellipse thick 5 + ellipse thick 5 shaded "gray" + ] with .nw at last [].sw+(0,-0.1) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Shaky.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Shaky.m4 new file mode 100644 index 00000000000..81364cf515e --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Shaky.m4 @@ -0,0 +1,115 @@ +.PS +# Shaky.m4 +gen_init +NeedDpicTools +divert(-1) + `An attempt to draw shaky hand-drawn lines' + + `shakyline(linespec,type,shake=val,[shakevals]) + Draw a line with a tremor + arg3: shake parameter (default 1) + arg4=normal(0,1) perturbations used if given' +define(`shakyline', +`rpoint_(ifelse(`$1',,`to rvec_(linewid,0)',`$1')) + L_start_: last line.start + L_end_: last line.end + [ Start: L_start_ + End: L_end_ + llen = distance(Start,End) + npts = round_(llen/linewid*4) + pushkey_(`$3',shake,1)dnl + sval = m4shake*llen/npts/8 + if "$4"=="" then { randn(d,npts-1,0,sval) }\ + else { for i=1 to npts-1 do { d[i] = $4[i]*sval) }} + P[0]: Start + for i=1 to npts-1 do { P[i]: i/npts between Start and End + vec_(0,d[i]) } + P[npts]: End + spline ifdpic(ifelse(`$2',,ctension_)) $2 from P[0] to P[1] + for i=2 to npts do { continue to P[i] } popdef(`m4shake') + ] with .Start at L_start_; move to L_end_') + + `shakyarc(arcspec,type,shake=val,[shakevals]) + Draw an arc with a tremor + arg3: s=shake parameter (default 1) + arg4=normal(0,1) perturbations used if given' +define(`shakyarc', +`arc invis $1 + A_start_: last arc.start + A_end_: last arc.end + A_C_: last arc.c + [ Start: A_start_ + End: A_end_ + C: A_C_ + as = atan2(Start.y-C.y,Start.x-C.x) + ae = atan2(End.y-C.y,End.x-C.x) + ar = distance(Start,C) + llen = abs(ar*(ae-as)) + npts = round_(llen/linewid*4) + pushkey_($3,shake,1)dnl + sval = m4shake*llen/npts/8 + if "$4"=="" then { randn(d,npts-1,0,sval) }\ + else { for i=1 to npts-1 do { d[i] = $4[i]*sval }} + P[0]: Start + for i=1 to npts-1 do { P[i]: C + (rect_(ar+d[i],as+i/npts*(ae-as))) } + P[npts]: End + spline ifdpic(ifelse(`$2',,ctension_)) $2 from P[0] to P[1] + for i=2 to npts do { continue to P[i] } popdef(`m4shake') + ] with .Start at last arc.start; move to last arc.end') + + `shakyfitcurve(V,n,linetype, + m (default 0),shake=val,[shakevals]) + Like fitcurve but the control points + are perturbed + arg5: s=shake parameter (default 1) + arg6=normal(0,1) perturbations used if given' +define(`shakyfitcurve',` + [ m4fn = ifelse(`$2',,2,`$2'); m4fm = ifelse(`$4',,0,`$4') + pushkey_($5,shake,1)dnl + if "$6"=="" then { randn(d,2*(m4fn-m4fm-1),0,m4shake) }\ + else { for i=1 to 2*(m4fn-m4fm-1) do { d[i] = $6[i]*m4shake }} + M4PP_[0]: `$1'[m4fm] + for i=m4fm+1 to m4fn-1 do { M4PP_[i-m4fm]: `$1'[i] dnl + +(d[2*(i-m4fm-1)+1],d[2*(i-m4fm-1)+2])\ + *distance(M4PP_[i-m4fm-1],`$1'[i])/16 } + M4PP_[m4fn-m4fm]: `$1'[m4fn]; End: M4PP_[m4fn-m4fm] + fitcurve(M4PP_,m4fn-m4fm) popdef(`m4shake') + ] with .M4PP_[0] at `$1'[ifelse(`$4',,0,`$4')]; move to last [].End ') + + +divert(0) + +P1: [ + linethick = 2.5 + round(,,colored "gray") + nl = 10 + for i=0 to nl do { + shakyline(right 6/nl up 2*(2*pmod(i,2)-1),,shake=2) + {sprintf("%g",2-i/nl*2) at 1/2 between L_start_ and L_end_ } + round(,,colored "gray") } + ] + +P2: [ + linethick = 2.5 + na = 3 + arcrad = 1 + for i=1 to na do { + shakyarc(,colored "gray",shake=2) + } + ] with .nw at last [].sw +(0,-1) + +P3: [ + linethick = 2.5 + na = 3 + arcrad = 2 + for i=1 to na do { + shakyarc(,colored "gray",shake=2) + } + ] with .w at last [].e +(1,0) +P4: [ + n = 0 + for a=0 to 359 by 30 do { V[n]: (Rect_(1,a)); n+=1 } + V[n]: V[0] + shakyfitcurve(V,n,,,shake=1) + ] with .nw at P2.sw + (0,-0.5) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Star.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Star.m4 new file mode 100644 index 00000000000..0817236d19f --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Star.m4 @@ -0,0 +1,38 @@ +.PS +# Star.m4 +# https://tex.stackexchange.com/questions/605132/how-can-i-insert-a-nine-pointed-star-in-a-latex-document +gen_init + +# star(keys) +# keys: size=expr; +# points=expr; +# angle=expr; last convex vertex ang +# depth=expr; inner vertex fraction +# line=attributes; +define(`star',`[ pushkeys_(`$1', + `size:linewid; points:5; angle:90; depth:1/(m4points-1); line::N') + dang = 360/m4points + T: (Rect_(m4size/2*m4depth,m4angle+dang/2)) # concave inner vertex + S: 1/2 between T and (Rect_(m4size/2,m4angle)) + U: (Rect_(m4size/2,m4angle+dang)) # convex outer vertex + line m4line from S to T then to U + for i=1 to m4points-1 do { + T: (Rect_(m4size/2*m4depth,m4angle+i*dang+dang/2)) + U: (Rect_(m4size/2,m4angle+(i+1)*dang)) + continue to T then to U } + continue to S; popdef(`size',`points',`angle',`depth',`m4line')]') + +linewid = linewid*2 +ifelse(1,1,` +star +star(size=1) +star(points=4) +star(depth=1/4) +star(line=outlined "red") +star(points=8) +star(points=9;line=outlined "red" shaded "magenta") +') +#for_(3,8,1,` +#star(points=m4x;line=outlined "red" shaded "magenta")') + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Stator.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Stator.m4 new file mode 100644 index 00000000000..fc74a111e7d --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Stator.m4 @@ -0,0 +1,54 @@ +.PS +# Stator.m4 +# https://tex.stackexchange.com/questions/612620/how-to-paint-inside-a-set-of-lines +gen_init +scale = 0.5 + + outerwid = 5/2 + innerwid = 3.7/2 + nteeth = 32 + toothdepth = (innerwid/2)*(twopi_/nteeth) + statordepth = toothdepth*4 + viewangle = 30 + outershade = 0.9 + topshade = 0.8 + innershade = 0.6 + toothshade = 0.5 + + cv = cosd(viewangle) + sv = sind(viewangle) + define ang { ($1)/nteeth*twopi_ } + + T: (0,statordepth*cv) + Tc: (0,toothdepth*cv) + for i = 0 to nteeth/2 do { for j=1 to -1 by -2 do { # Shaded tooth walls + P: (cos(ang(i)+pi_/2)*j,sin(ang(i)+pi_/2)*sv)*outerwid/2 + Q: P*innerwid/outerwid + line from P to P+Tc then to Q+Tc then to Q then to P \ + shaded rgbstring(toothshade,toothshade,toothshade) } } + shade(innershade, # inner arc and teeth + E: ellipsearc(innerwid,innerwid*sv,pi_,0,0,cw) with .C at T + move to (innerwid/2,0) + toothht = toothdepth*cv + for i = 0 to nteeth/2 do { + line up toothht + ellipsearc(innerwid,innerwid*sv,ang(i),ang(i+1),0,ccw) with .Start at Here + move to last [].End + toothht = -toothht } ) + shade(outershade, # outer arc and teeth + E: ellipsearc(outerwid,outerwid*sv,0,pi_,0,cw) with .C at T + line down statordepth*cv from E.End + toothht = toothdepth*cv + for i = nteeth/2 to nteeth-1 do { + line up toothht + ellipsearc(outerwid,outerwid*sv,ang(i),ang(i+1),0,ccw) with .Start at Here + move to last [].End + toothht = -toothht } + line up statordepth*cv from E.Start-T ) + for r=innerwid to outerwid by lthick*2 do { # shade the top + ellipse wid r ht r*sv with .c at T \ + outlined rgbstring(topshade,topshade,topshade) } + ellipse wid outerwid ht outerwid*sv with .c at T + ellipse wid innerwid ht innerwid*sv with .c at T + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/TR_fill.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/TR_fill.m4 new file mode 100644 index 00000000000..bf3fae888c0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/TR_fill.m4 @@ -0,0 +1,17 @@ +.PS +# TR_fill.m4 +# https://tex.stackexchange.com/questions/654117/fill-parts-of-a-shape +gen_init + + B: (0,0); "B" at B below + C: (5,0); "C" at C below + A: Cintersect(B,4,C,3); "A" at A above + line from B to C then to A then to B + RightAngle(B,A,C,0.25) + + rgbfill(0.5,0.5,0.5, + arc from A to B rad 2 + arc cw to C rad 2.5 + arc to A rad 1.5 ) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Views.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Views.m4 new file mode 100644 index 00000000000..c02c9a48172 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Views.m4 @@ -0,0 +1,304 @@ +.PS +# Views.m4 +threeD_init + +sinclude(Lettering.m4def) +sinclude(../Lettering.m4def) +Letter_init + +define(`textwidth',5.5) + +`# Perspective transformations +# mult4( matrix, vector, vector ) + define mult4 { for i=1 to 4 do { + $3[i] = 0 + for j=1 to 4 do { $3[i] = $3[i] + $1[(j-1)*4+i]*$2[j] }}} +# eye4 make unit matrix + define eye4 { for i=1 to 4 do { for j=1 to 4 do { $1[(j-1)*4+i] = 0 }}} +# rotx4( theta, vector, vector ) + define rotx4 { $3[1] = $2[1] + $3[2] = cos($1)*$2[2]-sin($1)*$2[3] + $3[3] = sin($1)*$2[2]+cos($1)*$2[3] + $3[4] = $2[4] } +# roty4( theta, vector, vector ) + define roty4 { $3[1] = cos($1)*$2[1]-sin($1)*$2[3] + $3[2] = $2[2] + $3[3] = sin($1)*$2[1]+cos($1)*$2[3] + $3[4] = $2[4] } +# rotz4( theta, vector, vector ) + define rotz4 { $3[1] = cos($1)*$2[1]-sin($1)*$2[2] + $3[2] = sin($1)*$2[1]+cos($1)*$2[2] + $3[3] = $2[3] + $3[4] = $2[4] } +# add4( vector, vector, vector ) + define add4 { + if (($1[4]==0) && ($2[4]==0)) then { + for i=1 to 4 do { $3[i] = $1[i]+$2[i] } } \ + else { if $1[4]==0 then { for i=1 to 4 do { $3[i] = $1[i] } } \ + else { if $2[4]==0 then { for i=1 to 4 do { $3[i] = $2[i] } } \ + else { for i=1 to 3 do { $3[i] = $1[i]/$1[4]+$2[i]/$2[4] }; $3[4] = 1 } + } } } + +# vec4( x,y,z, vector ) + define vec4 { $4[1] = $1; $4[2] = $2; $4[3] = $3; $4[4] = 1 } +# copy4( vector, vector ) + define copy4 { $2[1] = $1[1]; $2[2] = $1[2]; $2[3] = $1[3]; $2[4] = $1[4] } +# pr4( vector, label ) + define pr4 { if $1[4]==0 then { print "Divide by zero" } \ + else { $2: pr($1[1]/$1[4],$1[2]/$1[4],$1[3]/$1[4]) }} + + define print4 { print sprintf("%g,%g,%g,%g",$1[1],$1[2],$1[3],$1[4]) } +' +# Basic dimensions + u = 1*27/28.7*0.7 ifdef(`xsnotes',`*1.14') + a = 2*u + b = 1*u + c = 1.2*u + d = c*1/2 + e = c/3 + f = u*1/4 + r = c/3 + + visibleth = 1.2 + dimensionth = 0.4 + hiddenth = dimensionth + linethick_(visibleth) + +# Iso diagram viewing angle +dazim = 45 +delev = -30 +setview(dazim,delev) + +define(`pr',`(project(`$3',`$1',`$2'))') +define(`xpnd',$1) + + define(`X0', `0,0,0') + define(`X1', `0,b,0') + define(`X2', `a,b,0') + define(`X3', `a,0,0') + define(`X4', `0,0,c') + define(`X5', `0,b,c') + define(`X6', `a,b,c') + define(`X7', `a,0,c') + define(`X8', `-e,0,c/2-f/2') + define(`X9', `-e,d,c/2-f/2') + define(`X10',`0,d,c/2-f/2') + define(`X11',`0,0,c/2-f/2') + define(`X12',`-e,0,c/2+f/2') + define(`X13',`-e,d,c/2+f/2') + define(`X14',`0,d,c/2+f/2') + define(`X15',`0,0,c/2+f/2') + define(`X16',`0,b*1.25,c') + define(`X17',`a/4,b*1.25,c') + define(`X18',`a/4,b,c') + define(`X19',`0,b,c/2') + define(`X20',`a/4,b,c/2') + define(`xn',20) + + define(`ncirc',18) + dt = 360/ncirc + tx = a*2/3; ty = b; tz = c/2 + define(`TR',`tx,ty,tz') + +define(`loopX',`ifelse(eval(`$1'>=0),1, + `define(`X'eval(`$1'+xn+1),`tx+r*cosd(`$1'*dt),ty,tz+r*sind(`$1'*dt)') + loopX(eval($1-1))')') + + loopX(ncirc) + +define(`loopTT',`ifelse(eval(`$1'>=0),1, + `TT[`$1']: ifelse(`$3',0,`pr(X$2)',`Y$2') + loopTT(eval(`$1'-1),eval(`$2'-1),`$3')')') + +define(`drawobj',` + line from pr(xpnd(`$1'0)) to pr(xpnd(`$1'1)) to pr(xpnd(`$1'2)) + line to pr(xpnd(`$1'3)) to pr(xpnd(`$1'0)) + line from pr(xpnd(`$1'0)) to pr(xpnd(`$1'11)) to pr(xpnd(`$1'8)) \ + to pr(xpnd(`$1'12)) to pr(xpnd(`$1'13)) + line to pr(xpnd(`$1'9)) to pr(xpnd(`$1'8)) + line from pr(xpnd(`$1'13)) to pr(xpnd(`$1'14)) to pr(xpnd(`$1'10)) + line to pr(xpnd(`$1'9)) + line from pr(xpnd(`$1'10)) to pr(xpnd(`$1'11)) + ifelse(`$2',0, + `shade(0.92,line width 0 from pr(xpnd(`$1'1)) to pr(xpnd(`$1'5)) \ + to pr(xpnd(`$1'6)) to pr(xpnd(`$1'2)) to pr(xpnd(`$1'1))) + perspective(X1,Z) + ellipse fill_(0.7) ht 2*r*tmx[2]/tmx[4]/b wid 2*r at pr(TR) + shade(1,line width 0 from pr(xpnd(`$1'19)) to pr(xpnd(`$1'16)) \ + to pr(xpnd(`$1'17)) to pr(xpnd(`$1'20)) to pr(xpnd(`$1'19))) + shade(0.7,line width 0 from pr(xpnd(`$1'0)) to pr(xpnd(`$1'1)) \ + to pr(xpnd(`$1'2)) to pr(xpnd(`$1'3)) to pr(xpnd(`$1'0))) + shade(0.6,line width 0 from pr(xpnd(`$1'0)) to pr(xpnd(`$1'1)) \ + to pr(xpnd(`$1'19)) to pr(xpnd(`$1'16)) to pr(xpnd(`$1'4)) \ + to pr(xpnd(`$1'0))) + shade(0.9,line width 0 from pr(xpnd(`$1'13)) to pr(xpnd(`$1'14)) \ + to pr(xpnd(`$1'10)) to pr(xpnd(`$1'9)) to pr(xpnd(`$1'13))) + shade(0.7,line width 0 from pr(xpnd(`$1'8)) to pr(xpnd(`$1'9)) \ + to pr(xpnd(`$1'10)) to pr(xpnd(`$1'11)) to pr(xpnd(`$1'8))) + shade(0.6,line width 0 from pr(xpnd(`$1'8)) to pr(xpnd(`$1'9)) \ + to pr(xpnd(`$1'13)) to pr(xpnd(`$1'12)) to pr(xpnd(`$1'8))) + A: line invis from pr(xpnd(`$1'4)) to pr(xpnd(`$1'0)) + B: line invis from pr(xpnd(`$1'12)) to pr(xpnd(`$1'13)) + line from Intersect_(A,B) to pr(xpnd(`$1'4)) + line from pr(xpnd(`$1'4)) to pr(xpnd(`$1'16))', + + `A: line invis from pr(xpnd(`$1'4)) to pr(xpnd(`$1'16)) + B: line invis from pr(xpnd(`$1'14)) to pr(xpnd(`$1'13)) + line from Intersect_(A,B) to pr(xpnd(`$1'16)) + line thick dimensionth from pr(xpnd(`$1'2)) to -0.5 between \ + pr(xpnd(`$1'2)) and pr(xpnd(`$1'1)) chop 0.05 + line thick dimensionth from pr(xpnd(`$1'3)) to -0.5 between \ + pr(xpnd(`$1'3)) and pr(xpnd(`$1'0)) chop 0.05 + line thick dimensionth from pr(xpnd(`$1'5)) to -1.0 between \ + pr(xpnd(`$1'5)) and pr(xpnd(`$1'1)) chop 0.05 + line thick dimensionth from pr(xpnd(`$1'4)) to -1.0 between \ + pr(xpnd(`$1'4)) and pr(xpnd(`$1'0)) chop .1 chop 0.05 + loopTT(ncirc,eval(xn+ncirc+1),`$2') + fitcurve(TT,ncirc) + ') + line from pr(xpnd(`$1'16)) to pr(xpnd(`$1'19)) \ + to pr(xpnd(`$1'20)) to pr(xpnd(`$1'17)) to pr(xpnd(`$1'16)) + line from pr(xpnd(`$1'19)) to pr(xpnd(`$1'1)) + A: line invis from pr(xpnd(`$1'5)) to pr(xpnd(`$1'6)) + B: line invis from pr(xpnd(`$1'17)) to pr(xpnd(`$1'20)) + line from Intersect_(A,B) to pr(xpnd(`$1'6)) + line from pr(xpnd(`$1'6)) to pr(xpnd(`$1'2)) + ') + + dp = 1.0*a + s4f = 1.6 + fth = 180*dtor_ + +# perspective(x,y,z,position) +`define perspective { + vec4($3,$1,$2,tmp) + roty4(180*dtor_,tmp,tmx) + rotz4(90*dtor_,tmx,tmp) + rotx4(-90*dtor_,tmp,tmx) + roty4(-45*dtor_,tmx,tmp) + tmp[4] = tmp[3]/dp+tmp[4] + rotx4(55*dtor_,tmp,tmx) + $4: (tmx[1]/tmx[4],tmx[2]/tmx[4]) + } +' +lu = 0.1/6 * 0.8 + +# Handle forward referencing of lettering guide line lengths + nguides = 0 + sh "touch Views.dms" + for i=1 to 10 do { w[i] = 1 } + copy "Views.dms" + sh "rm -f Views.dms" + +define(`guideletter',`[ nguides += 1 + line thick grthick from (0,0) right w[nguides]*lu outlined "lightgridgray" + line thick grthick from (0,-6*lu) right w[nguides]*lu outlined "lightgridgray" + T: $1 with .nw at (0,0) + print sprintf("w[%g]=%g",nguides,T.wid/lu) >> "Views.dms" +]') + +define(`pfront',`(`$1',`$2')') +define(`ptop',`(`$1',`$3')') +define(`pside',`(-(`$3'),`$2')') + sep = 0.6*u +define(`centreline',`rpoint_(ifelse(`$1',,`to rvec_(linewid,0)',`$1')) + line thick dimensionth to rvec_(rp_len/2-.08,0) + move to rvec_(.03,0) + line thick dimensionth to rvec_(.1,0) + move to rvec_(.03,0) + line thick dimensionth to rvec_(rp_len/2-.08,0)') + +Orthographics: [ +Top: [ + line from ptop(X1) to ptop(X5) to ptop(X6) to ptop(X2) to ptop(X1) + line from ptop(X17) to ptop(X20) to ptop(X19) + line from ptop(X10) to ptop(X9) to ptop(X13) to ptop(X14) + circle rad r at ptop(TR) + centreline(from ptop(TR)+(0,r) down 2*r chop -.1) + centreline(from ptop(TR)+(-r,0) right 2*r chop -.1) + W: ptop(X9) + E: ptop(X2) + ] +Front: [ + line from pfront(X0) to pfront(X1) to pfront(X2) to pfront(X3) to pfront(X0) + line from pfront(X0) to pfront(X8) to pfront(X9) to pfront(X10) + line from pfront(X19) to pfront(X16) to pfront(X17) to pfront(X20) + line thick hiddenth dashed from pfront(TR)+(-r,0) down b + line thick hiddenth dashed from pfront(TR)+( r,0) down b + centreline(from pfront(TR) down b chop -.1) + W: pfront(X9) + E: pfront(X2) + N: pfront(X16) + S: pfront(X8) + ] with .nw at Top.sw+(0,-sep) + +Side: [ + line from pside(X0) to pside(X4) to pside(X16) to pside(X19) to pside(X1) \ + to pside(X0) to pside(X4) + line from pside(X12) to pside(X13) to pside(X9) to pside(X8) + line thick hiddenth dashed from pside(X5) to pside(X19) + line thick hiddenth dashed from pside(TR)+(-r,0) down b + line thick hiddenth dashed from pside(TR)+( r,0) down b + centreline(from pside(TR) down b chop -.1) + N: pside(X16) + S: pside(X0) + ] with .ne at Front.nw+(-sep,0) + +if 1 then { + linethick_(0.8) + guideletter([Letters(`F R O N T8V I5E1W')]) with .n at Front.s+(0,-.05) + guideletter([Letters(`S4I5D4E8V I5E1W')]) with .n at Side.s+(0,-.05) + guideletter([Letters(`T O4P8V I5E1W')]) with .n at Top.s+(0,-.10) + linethick_(visibleth) +} + + line thick dimensionth from Side.N to Front.N chop 0.05 + line thick dimensionth from Side.S to Front.S chop 0.05 + line thick dimensionth from Top.W to Front.W chop 0.05 + line thick dimensionth from Top.E to Front.E chop 0.05 + + ] # End Orthographics + +define(`looppersp',`ifelse(eval(`$1'>=0),1,`perspective(xpnd(X`$1'),Z`$1') + Y`$1': (cos(fth)*Z`$1'.x-sin(fth)*Z`$1'.y,\ + sin(fth)*Z`$1'.x+cos(fth)*Z`$1'.y)*s4f + looppersp(eval($1-1))')') + +if 1 then { +Perspective: [ + pushdef(`pr',`$1') + right_ + looppersp(eval(xn+ncirc+1)) + drawobj(Y,1) + popdef(`pr') +# ] with .sw at Isometric.ne+(-3.5*sep,0) + ] with .se at Orthographics.sw+(-1.5*sep,0) + + linethick_(0.8) + guideletter([[Letters(T2W O)]; move right lu; line right 4*lu; move right lu + [Letters(P O4I5N T8P E R S P E C T I V E)]])\ + with .w at Perspective.s+(.2*u,0) + linethick_(visibleth) +} + +if 1 then { +# Pictorials: +Isometric: [ + drawobj(X,0) +# command "{\small" +# define(`loopprt',`ifelse(eval(`$1'>=0),1,`"`$1'" at pr(X$1) +# loopprt(eval($1-1))')') +# loopprt(xn) +# for i=0 to ncirc do { sprintf("%g",i) at TT[i] } +# command "}%" +#] with .sw at (Orthographics.e+(-textwidth,0),Orthographics.Side.sw+(0,0.1)) +#] at Orthographics.nw + ] with .s at Perspective.n+(0,0.2) + + linethick_(0.8) + guideletter([Letters(`S4H2A2D E D8I S O M5E2T2R5I C8V I5E1W')])\ + with .w at Isometric.s+(.2*u,0) #(0,-.2) + linethick_(visibleth) +} + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheat.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheat.m4 new file mode 100644 index 00000000000..c70fa8fc74d --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheat.m4 @@ -0,0 +1,21 @@ +.PS +# `Wheat.m4' +gen_init + +boxwid = boxht + +[ for j = 0 to 7 do { + for i = 0 to 7 do { + x = 2^(j+8*i) + box fill_((i+j)%2) at (j*boxwid,-i*boxwid) + k = ((i+j)%2==0); setrgb(k,k,k) + if x < 10000 then { sprintf("\Large$%g$",x) at last box } \ + else { y = int(log(x)) + sprintf("{\Large$%g$}$\cdot 10^{%g}$",round_(x/(10^y)),y) at last box } + resetrgb + } + } + ] +box wid 8*boxwid ht 8*boxwid at last [] + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheel.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheel.m4 new file mode 100644 index 00000000000..934c4c46dbd --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheel.m4 @@ -0,0 +1,20 @@ +.PS +# Wheel.m4 +# https://tex.stackexchange.com/questions/605178/drawing-a-directed-wheel-graph-with-tikz +gen_init + + linethick = 1.6 + nnodes = 9 + brad = 2 + srad = circlerad/2 + P: circle rad srad at (1,0.5) fill_(0.75) + A: Rect_(brad,90+360/nnodes) + for i=1 to nnodes do { + B: circle invis shaded "lightgray" at Rect_(brad,90-(i-1)/nnodes*360) \ + sprintf("\Huge %g",i) + line from B to P chop circlerad chop srad + line from B to A chop + A: B + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Y14-5_example.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Y14-5_example.m4 new file mode 100644 index 00000000000..cb4397516c3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Y14-5_example.m4 @@ -0,0 +1,53 @@ +.PS +# Y14-5_example.m4 +# https://en.wikipedia.org/wiki/Geometric_dimensioning_and_tolerancing +cct_init +textht = 11bp__*2/3 +command "{\sf" +sinclude(ASME_Y14-5.m4def) +sinclude(../ASME_Y14-5.m4def) + + boxht = 7.5/0.5*textht + boxwid = 15/7.5 * boxht + circlerad = 2.3/0.5*textht*0.5 + thicklines_(1) + arrowht = textht*0.8 + arrowwid = textht*0.6 + + Box: box + Circle: circle at Box.c; {CM: move from Circle.se down textht right textht} +thinlines_ +CLV: ctrline( up_ Box.ht with .c at Box.c, Box.ht/2 ) +CLH: ctrline( right Box.ht with .c at Box.c, Box.ht/2 ) + + dimension_(from Box.nw to Box.n,Box.ht/6) + thicklines_(1) + {Y14_frame("10") with .s at AS_C+(0,textht/2)} + thinlines_ + line from 3rd last line.start to CLV.end + dimension_(from Box.w to Box.nw,Box.ht/6) + thicklines_(1) + {Y14_frame("5") with .e at AS_C+(-textht/2,0)} + thinlines_ + line from 4th last line.start to CLH.start + +thicklines_ + DA: Y14_frame("A") at Box.ne+(-textht*1.5,textht*5) + datumarrow(from DA.s to (DA,Box.n)) + DB: Y14_frame("B") at Box.sw+(-textht*5,textht*2) + datumarrow(from DB.e to (Box.w,DB)) + + F: Y14_frame(Y14_pos_, + Y14_dia_;"0.03";"(M)", + "A","B","C") with .w at Box.se+(-textht*4,-textht*2) + G: Y14_frame(Y14_fla_,Y14_cyl_,Y14_lin_, + Y14_sur_,Y14_per_,Y14_ang_, + Y14_par_) with .nw at F.sw+(0,-0.1) + H: Y14_frame(Y14_pos_,Y14_cir_,Y14_tot_,Y14_dia_) \ + with .nw at G.sw+(0,-0.1) + + { CB: move left textht from F.w } + arrow <- from Circle.se to Intersect_(CM,CB) then to F.w + + command "}" +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Zcos.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Zcos.m4 new file mode 100644 index 00000000000..cbf63fd8f39 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Zcos.m4 @@ -0,0 +1,29 @@ +.PS +# Zcos.m4 +gen_init +NeedDpicTools + +# define f1 { ee = expe(8*x*`$1'*(x^2 - (`$1')^2)); +# $2 = ee + 1/ee + 2*cos(2*x^4 + 2*(`$1')^4 - 12*x^2*(`$1')^2) - 4; +# } + +# alternative: |cos(z^4)| = 1 + define f1 { Z: (x,$1) + Z4: Zprod(Zprod(Z,Z),Zprod(Z,Z)) + $2 = zabs(Zcos(Z4)) - 1 + } + + ni = 200 + for i=10 to ni do { x = i/ni*3 + findroot( f1, 0, 0.2, 1e-8, y ) + P[i-10]: x,y } + np = ni-10 + + for deg=0 to 359 by 45 do { + for i=0 to np do { Z[i]: rot_(P[i].x,P[i].y,deg*dtor_) } + fitcurve(Z,np,thick 2 outlined "blue") + for i=0 to np do { Z[i]: rot_(P[i].x,-P[i].y,deg*dtor_) } + fitcurve(Z,np,thick 2 outlined "blue") + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/birds.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/birds.m4 new file mode 100644 index 00000000000..4b42ea35af6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/birds.m4 @@ -0,0 +1,36 @@ +.PS +# Birds.m4 +gen_init + +scale = 50 +linethick = 2*linethick + +define bird {[ + line shaded "$1" from (0,0) to \ + (10,-5) to (19,8) to (35,7) to (38,-12)+(0,2) to (60,0) to\ + (75,23) to (80,40) to (52,37)+(2,2) to (74,50) to (52,50) to \ + (60,60) to (38,48)+(0,2) to (35,67) to (19,68) to (10,55) to \ + (0,60) to (-8,50) to (14,50) to (-8,37)+(2,2) to (20,40) to \ + (15,23) to (0,0) +E: (80,40) +W: (20,40) +N: (19,68) +S: (19,8) + line outlined "gray" from (35,15) down 10 right 25 + line outlined "gray" from (40,20) right 25 down 8 + line outlined "gray" from (42,25) right 28 down 6 + line outlined "gray" from (40,30) right 32 down 4 + circle outlined "gray" rad 1 at (1,55) + circle outlined "gray" rad 4 at (24,55) +]} + + ncols = 4 + nrows = 4 + right + for i=0 to nrows-1 do { + for j=0 to ncols-1 do { move to (j*60,-i*60) + if (i+j)%2==0 then { bird(black) } else { bird(white) } + } + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/bistable.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/bistable.m4 new file mode 100644 index 00000000000..ac49023863b --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/bistable.m4 @@ -0,0 +1,35 @@ +.PS +# `bistable.m4' +cct_init # Default initialization + + up_ +rgbdraw(1,0,0, +Q1: bi_tr(,R) # Q1 upward with base to the right + llabel(,Q_1) ) # Label to left of last [] +rgbdraw(0,0,1, +Q2: bi_tr with .C at Q1.C+(elen_*7/4,0) # Q2 with base to left + rlabel(,Q_2) ) + + ground(at Q1.E) + ground(at Q2.E) + + line right_ dimen_/3 from Q1.B # Extend the base conductors +B1: Here + line left_ dimen_/3 from Q2.B +B2: Here + + resistor(up_ elen_*0.75 from Q1.C); llabel(,"$R_L$" wid 0.16) # Load resistors + line to (Q2.C,Here) "$V_{\hbox{cc}}$" below + resistor(down_ to Q2.C); llabel(,R_L) + + move to Q1.C+(0,dimen_/5) + { resistor(right_ to (B1,Here)); llabel(,R_1) +X: line to B2 } # Label the line to be jumped + resistor(from (Q2.C,Here) left_ to (B2,Here)); rlabel(,R_1) + crossover(to B1,R,X) + + resistor(down_ elen_*0.75); rlabel(,R_2) # Bias resistors + {"$-V_{\hbox{cc}}$" rjust} + line to (B2,Here) + resistor(up_ to B2); rlabel(,R_2) +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/brace.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/brace.m4 new file mode 100644 index 00000000000..b0089fe96d7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/brace.m4 @@ -0,0 +1,115 @@ +.PS +# brace.m4 +gen_init +NeedDpicTools + +divert(-1) + `bracket(linespec, end depth, + thickness, end thickness, attributes) + Square bracket along linespec + default depth is linewid/5 + attributes = eg + thick 0.4 outlined "string" shaded "string" + (default black)' +define(`bracket',`rpoint_(ifelse(`$1',,`to rvec_(linewid,0)',`$1')) + M4brS: last line.start; M4brE: last line.end + [ brdepth = ifelse(`$2',,linewid/5,`($2)') + brthick = ifelse(`$3',,brdepth/6,`($3)') + endthick = ifelse(`$4',,brthick/3,`($4)') + define(`m4brackattribs', + `ifelse(`$5',,`thick 0.4 shaded rgbstring(0,0,0)',`$5')')dnl + {line m4brackattribs \ + from M4brS+vec_(0,brdepth) to M4brS+vec_(0,brdepth+brthick) \ + then to M4brE+vec_(0,brdepth+brthick) \ + then to M4brE \ + then to M4brE+vec_(-endthick,0) \ + then to M4brE+vec_(-endthick,brdepth) \ + then to M4brS+vec_( endthick,brdepth) \ + then to M4brS+vec_( endthick,0) \ + then to M4brS \ + then to M4brS+vec_(0,brdepth) } + S: M4brS + ] with .S at Here') + + `brace(linespec,depth,arm thickness,attributes) + Curly brace along linespec + default depth is linewid/5 + attributes = eg + thick 0.4 outlined "string" shaded "string" + (default black)' +define(`brace',`rpoint_(ifelse(`$1',,`to rvec_(linewid,0)',`$1')) + M4brS: last line.start; M4brE: last line.end + [ brdepth = ifelse(`$2',,linewid/5,`$2') + brthick = ifelse(`$3',,brdepth/6,`$3') + define(`m4braceattribs', + `ifelse(`$4',,`thick 0.4 shaded rgbstring(0,0,0)',`$4')')dnl + tension = 0.55 + halfwid = distance(M4brS,M4brE) + smallrad = brdepth-brthick + bigrad = brdepth+brthick + for sgn=1 to -1 by -2 do { + S: rvec_(sgn*halfwid/2,0) + A: S+vec_(0,smallrad/2) + B: vec_(0,smallrad/2) + T: vec_(0,brdepth) + C: vec_(0,bigrad/2) + D: vec_(sgn*halfwid/2,bigrad/2) + {spline tension m4braceattribs \ + from S to tension between S and A \ + then to tension between A-vec_(sgn*bigrad/2,0) and A \ + then to A-vec_(sgn*bigrad/2,0) \ + then to B+vec_(sgn*bigrad/2,0) \ + then to tension between B+vec_(sgn*bigrad/2,0) and B \ + then to tension between T and B \ + then to T \ + then to tension between T and C \ + then to tension between C+vec_(sgn*bigrad/2,0) and C \ + then to C+vec_(sgn*bigrad/2,0) \ + then to D-vec_(sgn*bigrad/2,0) \ + then to tension between D-vec_(sgn*bigrad/2,0) and D \ + then to tension between S and D \ + then to S } + } + E: (0,0) +] with .E at 0.5 between M4brS and M4brE') +divert(0)dnl + + del = 0.2 + maxht = 2 + minht = 0.3 + n = 16 + hmax = 360 +R1: [ + for i=0 to n-1 do { + x = i/n + y = minht*(1-x)+maxht*x + hsvtorgb(x*hmax,1,1,r,g,b) + brace(from ( -i*del,-y/2) up y,,,thick 0.4 shaded rgbstring(r,g,b)) + brace(from ((i+1)*del, y/2) down y,,,thick 0.4 \ + outlined rgbstring(r,g,b) shaded rgbstring(r,g,b)) + } + ] +R2: [ + for i=0 to n-1 do { + x = i/n + y = minht*(1-x)+maxht*x + hsvtorgb(x*hmax,1,1,r,g,b) + brace(from ( -i*del,-y/2) up y,5bp__+x*20bp__,2bp__+x*13bp__,thick 0.4 \ + shaded rgbstring(r,g,b)) + brace(from ((i+1)*del, y/2) down y,5bp__+x*20bp__,2bp__+x*13bp__,thick 0.4 \ + outlined rgbstring(r,g,b) shaded rgbstring(r,g,b)) + } + ] with .n at R1.s+(0,-0.2) +R3: [ + for i=0 to n-1 do { + x = i/n + y = minht*(1-x)+maxht*x + hsvtorgb(x*hmax,1,1,r,g,b) + bracket(from ( -i*del,-y/2) up y, 5bp__+x*20bp__, 2bp__+x*13bp__,, + thick 0.4 shaded rgbstring(r,g,b)) + bracket(from ((i+1)*del, y/2) down y, 5bp__+x*20bp__, 2bp__+x*13bp__,, + thick 0.4 outlined rgbstring(r,g,b) shaded rgbstring(r,g,b)) + } + ] with .n at R2.s+(0,-0.2) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/chaos.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/chaos.m4 new file mode 100644 index 00000000000..17ae070e58d --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/chaos.m4 @@ -0,0 +1,39 @@ +.PS +# chaos.m4 +# Example simulation of chaos equations. +gen_init +scale = 10 +define(`FF',`dnl + `$4' = `$1'+dt*10*(-`$1'+`$2') + `$5' = `$2'+dt*(28*`$1'-`$2'-`$1'*`$3') + `$6' = `$3'+dt*(-8*`$3'/3+`$1'*`$2') ') +[ +x0 = 1 +y0 = 0 +z0 = 0 +dt = 0.005 +nN = 100 +for i = 1 to nN do { + for j = 1 to 8 do { + FF(x0,y0,z0,x1,y1,z1) + FF(x1,y1,z1,x2,y2,z2) + FF(x2,y2,z2,x3,y3,z3) + FF(x3,y3,z3,x4,y4,z4) + spline from x0,y0 to x1,y1 then to x2,y2 then to x3,y3 then to x4,y4 + x0 = x4; y0 = y4; z0 = z4 + } + } +arrow from (-15,0) to (15,0); "$x$" ljust +line up 1 from (10,0); "$ 10$" at last line.start below +line up 1 from (-10,0); "$-10$" at last line.start below +arrow from (0,-15) to (0,15); "$y$" above +line right 1 from (0,10); "$ 10$" at last line.start rjust +line right 1 from (0,-10); "$-10$" at last line.start rjust +"$ 0$" at (0,0) below rjust +] +`"\parbox{2.5in}{\begin{eqnarray*} + \dot{x}_1 & = & 10(-x_1+x_2)\\ + \dot{x}_2 & = & 28x_1-x_2-x_1x_3\\ + \dot{x}_3 & = & -8x_3/3+x_1x_2 + .\end{eqnarray*}}"' at last [].s below +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/hsv.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/hsv.m4 new file mode 100644 index 00000000000..662184dd7dd --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/hsv.m4 @@ -0,0 +1,26 @@ +.PS +# hsv.m4 +gen_init +NeedDpicTools + +define grid { (($2)*boxwid,($1)*boxht) } +r = 0 +g = 0 +b = 1 +rgbtohsv(r,g,b,h,s,v) +nstep = 4 +{ for j=0 to nstep do { + sprintf("%g",j/nstep) at ((0.5+j)*boxwid,-boxht/2) below } } + { "S" at ((0.5+nstep/2)*boxwid, -boxht) } +{ for i=0 to nstep do { sprintf("%g",i/nstep) at (-boxht/3,(i)*boxht) } } + { "V" at (-boxht,(nstep/2)*boxht) \ + "or" \ + "L" } +right_ +for v = 0 to nstep do { + { for s = 0 to nstep do { hsvtorgb(h,s/nstep,v/nstep,r,g,b) + box shaded rgbstring(r,g,b) } } + move up_ boxht; right_ } + + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/person.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/person.m4 new file mode 100644 index 00000000000..4fdf09d3878 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/person.m4 @@ -0,0 +1,45 @@ +.PS +# person.m4 +gen_init + +divert(-1) + `person( + hght=expr;wdth=expr;fill="colorname") + e.g. person(hght=1;fill="gray")' +define(`person', + `[ pushkeys_(`$1',hght:linewid;wdth:m4hght*2/5;fill:"black":N)dnl + bodywid = m4wdth/2 + bodyrad = bodywid/8 + bodyht = (m4hght - bodywid - bodywid/16 + bodyrad*2)/2 + tmplth = linethick; linethick = 0 + Head: circle diam bodywid colored m4fill + Body: box rad bodyrad ht bodyht wid bodywid colored m4fill \ + with .n at Head.s+(0,-Head.diam/16) + armwid = bodywid/3 + Armleft: box wid armwid rad armwid/2 ht Body.ht-bodyrad colored m4fill \ + with .w at Body.e + (armwid/2,0) + Armright: box same with .e at Body.w + (-armwid/2,0) + Legleft: box wid bodywid/2.5 rad armwid/2 ht Body.ht colored m4fill \ + with .n at (Body.w,Body.s)+(bodywid/5,bodyrad*2) + Legright: box same with .n at (Body.e,Body.s)+(-bodywid/5,bodyrad*2) + linethick_(tmplth) popdef(`m4hght',`m4wdth',`m4fill') ]') + +divert(0)dnl + + linewid = 3*linewid + movewid = 0.2 + + setrgb(0.54,0.81,0.94,babyblue) + person(fill="babyblue") + move + person(wdth=linewid*3/4;fill="babyblue") + move + person(wdth=linewid;fill="babyblue") + move + person + move + resetrgb + person(hght=1;fill="gray") + + line up linewid with .c at last [].e+(linewid/10,0) +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/rotellipse.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/rotellipse.m4 new file mode 100644 index 00000000000..a49ce308b3b --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/rotellipse.m4 @@ -0,0 +1,20 @@ +.PS +# `rotellipse.m4' +gen_init + +[ + E: ellipse shaded "red" outlined "blue" + + A: rotellipse(1,1,outlined "red" shaded "blue") with .w at E.e + Point_(45) + B: rotellipse(,,dotted fill_(0.9)) + C: rotellipse(,,colored "red") with .s at last [].n + thinlines_ + showbox_(A) + showbox_(B) + showbox_(C) + thicklines_ + +] with .sw at 1,1 + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/squiggle.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/squiggle.m4 new file mode 100644 index 00000000000..671ae2addd0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/squiggle.m4 @@ -0,0 +1,26 @@ +.PS +# squiggle.m4 +gen_init + +divert(-1) +dnl Should this macro be in libgen.m4 or would that be just adding clutter? + + `squiggle(linespec, + amplitude,wavelength,attributes)' + `squiggly line (sinusoid), e.g. + squiggle(up_ 1 right_ 2,,,outlined "red")' +define(`squiggle',`rpoint_(ifelse(`$1',,linewid,`$1')) + m4dist = lin_leng(last line) + m4cycles = int(m4dist/(ifelse(`$3',,0.25*scale,`$3'))+0.5) + define(`squiggleampl',`ifelse(`$2',,0.04*scale,`$2')')dnl + define(`squigglefreq',`(twopi_*m4cycles/m4dist)')dnl + sinusoid(squiggleampl,squigglefreq,-twopi_/4,0,m4dist,`$4') \ + with .Origin at last line.start + move to last line.end') +divert(0)dnl + +squiggle(up_ 1 right_ 2,,,outlined "red") +squiggle(up 2 right_ 2,0.1,0.15,outlined "red" <-> wid 0.06 ht 0.05) +squiggle(right_ 1,,,thick 2 dotted outlined "blue" ) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/venus.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/venus.m4 new file mode 100644 index 00000000000..676cd98143d --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/venus.m4 @@ -0,0 +1,74 @@ +.PS +# venus.m4 +# https://tex.stackexchange.com/questions/576423/a-more-precise-dance-of-planets-with-metapost-and-tikz +# https://tex.stackexchange.com/questions/575986/dance-of-venus-and-variations-in-tikz-pgf + +gen_init +NeedDpicTools +maxpsht = 20 + +thinlines_ + +define(`venus', +`setkeys_(`$1', + outerlength:4; + innerlength:2.8933; + outerrate:8; + innerrate:13; + maxtimes:2880; + increment:2; + changephase:0 ) + sizefactor = 165/200 + nmaxtimes = 360*m4outerrate + for x=0 to nmaxtimes by m4increment do { + if "$2" != "" then { hue = \ + abs(sind(360*x/nmaxtimes*abs(m4innerrate-m4outerrate)+m4changephase-60)) + hsvtorgb(hue*360,1,1,r,g,b) + line from (Rect_(m4outerlength,x))*sizefactor \ + to (Rect_(m4innerlength,x/m4outerrate*m4innerrate))*sizefactor \ + outlined rgbstring(r,g,b) } \ + else { + line from (Rect_(m4outerlength,x))*sizefactor \ + to (Rect_(m4innerlength,x/m4outerrate*m4innerrate))*sizefactor + } + } ') + +AA:[ + sizefactor = 1/2.54 + define(`venusA',`[ + setkeys_(`$1', + iterations:270; + outerdistance:5.41; + innerdistance:7.48; + outerperiod:123; + innerperiod:200; + step:5) + for x=0 to m4iterations by m4step do { + line from (Rect_(m4outerdistance,x))*sizefactor \ + to (Rect_(m4innerdistance,x/m4outerperiod*m4innerperiod))*sizefactor \ + outlined "gray" + } + ]') + +# 3 columns, 5 rows + sizefactor /= 3 + Orig:(0,0) + for i=1 to 5 do { + iteri = 180 + (i-1)*540 + for j=1 to 3 do { + if (i==1) && (j==1) then { iter = 270 } \ + else { iter = iteri + (j-1)*180 } + V[i,j]: venusA(iterations=iter) with .sw at Orig + sprintf("%g",iter) at last [] #colored rgbstring(1,0,0) + Orig: V[i,j].se + } + Orig: V[i,1].sw-(0,V[i,1].ht) + } + ] + +BB:[ + venus(outerrate=8;innerrate=17;increment=2;innerlength=3.5;changephase=60,T) + ] at AA +# ] with .nw at AA.sw+(0,-0.5) + +.PE 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 4a90ac0332c..8ca2c08f76f 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex @@ -179,7 +179,7 @@ \bfig{ \centerline{\getpic{Chips}} - \caption{IC package outlines + \caption{IC package outlines and examples \src{Chips.m4}.} } @@ -565,6 +565,14 @@ \src{Rotbox.m4}.} } +\ifmpost\else\ifpostscript\else\bfig{ + \centerline{\getpic{shadowed}} + \caption{The macro + {\tt shadowed(box|circle|ellipse|line,[at {\sl position}],{\sl keys})} + shadowed object + \src{shadowed.m4}.} + }\fi\fi + \bfig{ \centerline{\getpic{ex06}} \caption{Crosshatching @@ -648,18 +656,20 @@ \src{csc.m4}.} } -\ifpostscript\bfig{% For psfrag - \includegraphics[width=\textwidth]{rose.eps} %\centerline{\getpic{rose}} - \caption{The left object, used for testing {\tt dipic,} is redrawn from - a detail of the set design for the musical {\it Dracula.} This - consumes much \LaTeX\ main memory but can be produced directly - as pdf using \hbox{\tt dpic -d}, as svg using \hbox{\tt dpic -v}, - or as postscript using \hbox{\tt dpic -r} since no text formatting - is required. The right object adjusts the size of dots to produce - a halftone effect +\ifpostscript% +\bfig{% For psfrag +\includegraphics[width=\textwidth]{rose.eps} %\centerline{\getpic{rose}}%ignore% + \caption{The left object, used for testing {\tt dipic,} is redrawn from%ignore% + a detail of the set design for the musical {\it Dracula.} This %ignore% + consumes much \LaTeX\ main memory but can be produced directly %ignore% + as pdf using \hbox{\tt dpic -d}, as svg using \hbox{\tt dpic -v}, %ignore% + or as postscript using \hbox{\tt dpic -r} since no text formatting%ignore% + is required. The right object adjusts the size of dots to produce%ignore% + a halftone effect %ignore% \src{rose.m4}.} - }\else% -\ifmpost\else\bfig{% + } +\else\ifmpost\else% +\bfig{% Not psfrag \includegraphics[width=\textwidth]{rose.pdf} %\centerline{\getpic{rose}} \caption{The left object, used for testing {\tt dipic,} is redrawn from a detail of the set design for the musical {\it Dracula.} This @@ -669,7 +679,8 @@ is required. The right object adjusts the size of dots to produce a halftone effect \src{rose.m4}.} - }\fi\fi + } +\fi\fi \bfig{ \centerline{\getpic{diamond}} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/heater.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/heater.m4 new file mode 100644 index 00000000000..d3f0f8ee331 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/heater.m4 @@ -0,0 +1,26 @@ +.PS +# heater.m4 +cct_init + +movewid = 2 pt__ +hm = 2.05 +right_ +{ + {lamp ; move; "`{\tt lamp}'" ljust} + move right_ 1.5 + {lamp(,T) ; move;"`{\tt lamp(,T)}'" ljust} + move right_ 1.25 + {thermocouple ; move;" `{\tt thermocouple}'" ljust } + move right_ hm + {thermocouple(,,,T) ; move; "`{\tt thermocouple(,{,},T)}'" ljust } + } +move down 0.25; right_ +{ + {heater; move;"`{\tt heater}'" ljust} + move right_ hm + {heater(,,,,E); move;"`{\tt heater(,{,},{,}E)}'" ljust} + move right_ hm+0.4 + {heater(,,,,ET); move;"`{\tt heater(,{,},{,}ET)}'" ljust} + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/keyboard.pdf b/Master/texmf-dist/doc/latex/circuit-macros/examples/keyboard.pdf index 94548b033a0..0d5fa829b82 100644 Binary files a/Master/texmf-dist/doc/latex/circuit-macros/examples/keyboard.pdf and b/Master/texmf-dist/doc/latex/circuit-macros/examples/keyboard.pdf differ 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 e134c95c63d..fd626e6be7a 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/11/28 at 18:39 +% from TeX source "font" on 2023/03/10 at 23:35 numeric mfpicversion; mfpicversion := 110; if unknown mode: mode := localfont; fi if unknown mag: mag := 1000/1000; fi @@ -2505,10 +2505,10 @@ begingroup; save mfpicnexus; hide(numeric mfpicnexus; path mfpicnexus[]; mfpicnexus = 0) store (mfpicnexus[incr mfpicnexus]) -arcplr ((-0.074188,-0.014308),22.529508,35.422548,0.233002); +arcplr ((-0.075317,-0.012706),21.601282,34.940662,0.233002); store (mfpicnexus[incr mfpicnexus]) -arcplr ((0.043984,-0.100954),72.077452,58.261852,0.233002); +arcplr ((0.043548,-0.100813),71.96482,57.676312,0.233002); mkpoly (false, mfpicnexus) endgroup; @@ -2517,7 +2517,7 @@ resizedrawpen (0.8bp); store (curpath) drawn -arcplr ((-0.022091,-0.067162),11.25,45.13128,0.233002); +arcplr ((-0.022091,-0.067162),11.25,49.625848,0.233002); store (curpath) drawn @@ -2561,10 +2561,10 @@ begingroup; save mfpicnexus; hide(numeric mfpicnexus; path mfpicnexus[]; mfpicnexus = 0) store (mfpicnexus[incr mfpicnexus]) -arcplr ((-0.014308,0.074188),-67.470492,-54.577452,0.233002); +arcplr ((-0.012706,0.075317),-68.398718,-55.059338,0.233002); store (mfpicnexus[incr mfpicnexus]) -arcplr ((-0.100954,-0.043984),-17.922548,-31.738148,0.233002); +arcplr ((-0.100813,-0.043548),-18.03518,-32.323688,0.233002); mkpoly (false, mfpicnexus) endgroup; @@ -2573,7 +2573,7 @@ resizedrawpen (0.8bp); store (curpath) drawn -arcplr ((-0.067162,0.022091),-78.75,-44.86872,0.233002); +arcplr ((-0.067162,0.022091),-78.75,-40.374152,0.233002); store (curpath) drawn @@ -2617,10 +2617,10 @@ begingroup; save mfpicnexus; hide(numeric mfpicnexus; path mfpicnexus[]; mfpicnexus = 0) store (mfpicnexus[incr mfpicnexus]) -arcplr ((0.074188,0.014308),-157.470492,-144.577452,0.233002); +arcplr ((0.075317,0.012706),-158.398718,-145.059338,0.233002); store (mfpicnexus[incr mfpicnexus]) -arcplr ((-0.043984,0.100954),-107.922548,-121.738148,0.233002); +arcplr ((-0.043548,0.100813),-108.03518,-122.323688,0.233002); mkpoly (false, mfpicnexus) endgroup; @@ -2629,7 +2629,7 @@ resizedrawpen (0.8bp); store (curpath) drawn -arcplr ((0.022091,0.067162),-168.75,-134.86872,0.233002); +arcplr ((0.022091,0.067162),-168.75,-130.374152,0.233002); store (curpath) drawn @@ -2673,10 +2673,10 @@ begingroup; save mfpicnexus; hide(numeric mfpicnexus; path mfpicnexus[]; mfpicnexus = 0) store (mfpicnexus[incr mfpicnexus]) -arcplr ((0.014308,-0.074188),112.529508,125.422548,0.233002); +arcplr ((0.012706,-0.075317),111.601282,124.940662,0.233002); store (mfpicnexus[incr mfpicnexus]) -arcplr ((0.100954,0.043984),162.077452,148.261852,0.233002); +arcplr ((0.100813,0.043548),161.96482,147.676312,0.233002); mkpoly (false, mfpicnexus) endgroup; @@ -2685,7 +2685,7 @@ resizedrawpen (0.8bp); store (curpath) drawn -arcplr ((0.067162,-0.022091),101.25,135.13128,0.233002); +arcplr ((0.067162,-0.022091),101.25,139.625848,0.233002); store (curpath) drawn @@ -2729,10 +2729,10 @@ begingroup; save mfpicnexus; hide(numeric mfpicnexus; path mfpicnexus[]; mfpicnexus = 0) store (mfpicnexus[incr mfpicnexus]) -arcplr ((-0.0153,-0.121331),34.780608,22.077452,0.236733); +arcplr ((-0.014561,-0.123133),35.685526,22.548869,0.236733); store (mfpicnexus[incr mfpicnexus]) -arcplr ((-0.025038,0.02723),-14.577452,-0.979566,0.236733); +arcplr ((-0.025156,0.026775),-14.463672,-0.407722,0.236733); mkpoly (false, mfpicnexus) endgroup; @@ -2741,7 +2741,7 @@ resizedrawpen (0.8bp); store (curpath) drawn -arcplr ((-0.032152,-0.047835),12.233526,41.25,0.236733); +arcplr ((-0.032152,-0.047835),7.809161,41.25,0.236733); store (curpath) drawn @@ -2785,10 +2785,10 @@ begingroup; save mfpicnexus; hide(numeric mfpicnexus; path mfpicnexus[]; mfpicnexus = 0) store (mfpicnexus[incr mfpicnexus]) -arcplr ((-0.121331,0.0153),-55.219392,-67.922548,0.236733); +arcplr ((-0.123133,0.014561),-54.314474,-67.451131,0.236733); store (mfpicnexus[incr mfpicnexus]) -arcplr ((0.02723,0.025038),-104.577452,-90.979566,0.236733); +arcplr ((0.026775,0.025156),-104.463672,-90.407722,0.236733); mkpoly (false, mfpicnexus) endgroup; @@ -2797,7 +2797,7 @@ resizedrawpen (0.8bp); store (curpath) drawn -arcplr ((-0.047835,0.032152),-77.766474,-48.75,0.236733); +arcplr ((-0.047835,0.032152),-82.190839,-48.75,0.236733); store (curpath) drawn @@ -2841,10 +2841,10 @@ begingroup; save mfpicnexus; hide(numeric mfpicnexus; path mfpicnexus[]; mfpicnexus = 0) store (mfpicnexus[incr mfpicnexus]) -arcplr ((0.0153,0.121331),-145.219392,-157.922548,0.236733); +arcplr ((0.014561,0.123133),-144.314474,-157.451131,0.236733); store (mfpicnexus[incr mfpicnexus]) -arcplr ((0.025038,-0.02723),165.422548,179.020434,0.236733); +arcplr ((0.025156,-0.026775),165.536328,179.592278,0.236733); mkpoly (false, mfpicnexus) endgroup; @@ -2853,7 +2853,7 @@ resizedrawpen (0.8bp); store (curpath) drawn -arcplr ((0.032152,0.047835),-167.766474,-138.75,0.236733); +arcplr ((0.032152,0.047835),-172.190839,-138.75,0.236733); store (curpath) drawn @@ -2897,10 +2897,10 @@ begingroup; save mfpicnexus; hide(numeric mfpicnexus; path mfpicnexus[]; mfpicnexus = 0) store (mfpicnexus[incr mfpicnexus]) -arcplr ((0.121331,-0.0153),124.780608,112.077452,0.236733); +arcplr ((0.123133,-0.014561),125.685526,112.548869,0.236733); store (mfpicnexus[incr mfpicnexus]) -arcplr ((-0.02723,-0.025038),75.422548,89.020434,0.236733); +arcplr ((-0.026775,-0.025156),75.536328,89.592278,0.236733); mkpoly (false, mfpicnexus) endgroup; @@ -2909,7 +2909,7 @@ resizedrawpen (0.8bp); store (curpath) drawn -arcplr ((0.047835,-0.032152),102.233526,131.25,0.236733); +arcplr ((0.047835,-0.032152),97.809161,131.25,0.236733); store (curpath) drawn diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/Makefile index bef3268c06e..978e1e35927 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/Makefile +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/Makefile @@ -96,7 +96,7 @@ $(DOC).ps: $(DOC).dvi EXL = exlinks $(DOC).dvi: $(DOC).tex -if test "$(DOC)" = "examplesmpost" ; then make exlinks dims; fi - make $(FIGS) + make $(FIGS) rose.pdf $(LATEX) $(DOC) -if test -n "$(BOXDIMS)" ; then rm -f dims; \ for box in $(BOXDIMS) ; do rm -f $$box.1; done; \ @@ -109,9 +109,12 @@ dims: figs: $(EXL) $(FIGS) +rose.pdf: ../rose.m4 + m4 pdf.m4 ../rose.m4 | dpic -d > rose.pdf + exlinks: @echo "" - @echo 'Ignore "cannot create ... exists" warnings.' + @echo 'Ignore "cannot create ... exists and file.1 not found" warnings.' -@if test ! -f ex11.m4 ; then \ ls ../*.m4 | sed -e 's/^/ln -s /' -e '/test.m4/d' | sh;\ fi @@ -133,7 +136,7 @@ tst1: test.1 tstmpost.tex dvips tstmpost clean: - rm -f stamp-* $(FIGS) *.pic mp*.tex + rm -f stamp-* $(FIGS) *.pic mp*.tex rose.pdf -if /usr/bin/test -f exlinks ; then \ ls -l *.m4 *.bb *.gz | grep '\->' | \ sed -e 's/^.* \([^ ][^ ]*\) ->.*$$/rm -f \1/' | sh; fi diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/paletteSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/paletteSVG.m4 deleted file mode 100644 index 4c5a40f0387..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/paletteSVG.m4 +++ /dev/null @@ -1,336 +0,0 @@ -.PS -# This is the source for a prototype svg library of electric circuit -# elements. Each element is a compound svg object with corners on grid points. -# -# Processing svg.m4 and this file thought dpic -v gives -# output that can be read into Inkscape. -# -define(`SIdefaults',` - scale = 25.4 - arcrad = 5 - arrowht = 2.5 - arrowwid = arrowht/2 - boxht = 12 - boxrad = 0 - boxwid = 20 - circlerad = 5 - dashwid = 1.5 - ellipseht = 12 - ellipsewid = 16 - lineht = 12 - linewid = 12 - moveht = 12 - movewid = 12 - textht = ifsvg(3,0) - textoffset = 1 - textwid = 0 -') - -log_init(svg_font(sans-serif,11bp__)) -SIdefaults - - # Assume dpic scale is in mm -gunit = 1 # Inkscape grid dimension -divert(-1) -define(`elen_',`(10*gunit)') # default 2-terminal element length -define(`dimen_',`(10*gunit)')# reference dimension for element bodies -define(`L_unit',`(2*gunit)') # logic gate grid size -define(`N_diam',1) # L_unit size of `not' circles - - # grid round and chop -define(`g_round',`(int((`$1')/gunit+100000.5 )-100000)*gunit') -define(`g_chop', `(int((`$1')/gunit+100000.9999)-100000)*gunit') - # snap to grid -define(`g_snap',`(g_round((`$1').x),g_round((`$1').y))') - -# Box containing an element. The element must be in a box that is -# intersected by a horizontal or vertical line from entry to exit. -define(`Gridbox',`[ command "" - S: Here; `$1'; F: Here - if S.y == F.y then { - move from (max(S.x,F.x),F.y+g_chop(last[].n.y-F.y)) \ - to (min(S.x,F.x),F.y-g_chop(F.y-last[].s.y)) } \ - else { - move from (F.x+g_chop(last[].e.x-F.x),max(S.y,F.y)) \ - to (F.x-g_chop(F.x-last[].w.x),min(S.y,F.y)) } - command "" ] ') - -# Place compound object corners at grid intersections -define(`Below', - `with .n at g_snap(ifelse(`$1',,`last []',`$1').s)-(0,2*gunit)') -define(`Right', - `with .w at g_snap(ifelse(`$1',,`last []',`$1').e)+(2*gunit,0)') - -# for debug -define(`prpos',`print (`$1').x/gunit,(`$1').y/gunit') -divert(0)dnl - -[ - -rpoint_(down_ elen_) -A:Gridbox( resistor ) - Gridbox( resistor(down_ dimen_*1/2) ) Right - Gridbox( resistor(,,E) ) Right - Gridbox( resistor(,,Q) ) Right - Gridbox( resistor(,,H) ) Right - Gridbox( resistor(,,N) ) Right - Gridbox( inductor(,W) ) Right - Gridbox( inductor(,W,,M) ) Right - Gridbox( inductor(,L) ) Right - Gridbox( inductor ) Right - Gridbox( inductor(,,,M) ) Right - Gridbox( capacitor ) Right - Gridbox( capacitor(,C) ) Right - Gridbox( capacitor(,P) ) Right - Gridbox( capacitor(,E) ) Right - Gridbox( capacitor(,K) ) Right - Gridbox( diode ) Right - Gridbox( diode(,K) ) Right - Gridbox( diode(,Z) ) Right - Gridbox( diode(,S) ) Right - Gridbox( diode(,L) ) Right - Gridbox( diode(,V) ) Right - Gridbox( diode(,v) ) Right - Gridbox( diode(,T) ) Right - Gridbox( diode(,CR) ) Right - Gridbox( diode(,D) ) Right - Gridbox( diode(,B) ) Right - Gridbox( diode(,LE) ) Right - Gridbox( [circle diam dimen_*0.7] ) Right - Gridbox( xtal ) Right - dot(at g_snap(last [].e+(2*gunit,0))) - -A:Gridbox( source ) Below(A) - Gridbox( source(,I) ) Right - Gridbox( source(,i) ) Right - Gridbox( source(,V) ) Right - Gridbox( source(,v) ) Right - Gridbox( source(,AC) ) Right - Gridbox( source(,S) ) Right - Gridbox( source(,X) ) Right - Gridbox( source(,F) ) Right - Gridbox( source(,P) ) Right - Gridbox( source(,U) ) Right - Gridbox( source(,R) ) Right - Gridbox( source(,T) ) Right - Gridbox( source(,L) ) Right - Gridbox( nullator ) Right - Gridbox( norator ) Right - Gridbox( consource ) Right - Gridbox( consource(,I) ) Right - Gridbox( consource(,i) ) Right - Gridbox( consource(,V) ) Right - Gridbox( consource(,v) ) Right - Gridbox( source(,Q) ) Right - Gridbox( source(,G) ) Right - -A:Gridbox( battery(up_ elen_) ) Below(A) - Gridbox( battery(up_ elen_,3) ) Right - Gridbox( ttmotor ) Right - Gridbox( memristor ) Right - Gridbox( tline ) Right - Gridbox( fuse ) Right - Gridbox( fuse(,D) ) Right - Gridbox( fuse(,B) ) Right - Gridbox( fuse(,C) ) Right - Gridbox( fuse(,S) ) Right - Gridbox( fuse(,HB) ) Right - Gridbox( fuse(,HC) ) Right - Gridbox( cbreaker ) Right - Gridbox( cbreaker(,,D) ) Right - Gridbox([variable(`[]',A)]) Right - Gridbox([variable(`[]',P)]) Right - Gridbox([variable(`[]',L)]) Right - Gridbox([variable(`[]',N)]) Right - Gridbox([variable(`[]',uN)]) Right - Gridbox([line to Here+(Rect_(dimen_/6,45))]) Right - Gridbox([line up dimen_*0.06 then right dimen_*0.12 \ - then up dimen_*0.06]) Right - Gridbox([em_arrows]) Right - Gridbox([em_arrows(N)]) Right - Gridbox([em_arrows(ND)]) Right - Gridbox([em_arrows(I)]) Right - Gridbox([em_arrows(ID)]) Right - Gridbox([em_arrows(E)]) Right - Gridbox([em_arrows(ED)]) Right - -A:Gridbox( [right_; ground] ) Below(A) - Gridbox( [right_; ground(,T)] ) Right - Gridbox( [right_; ground(,,F)] ) Right - Gridbox( [right_; ground(,,E)] ) Right - Gridbox( [right_; ground(,,S)] ) Right - Gridbox( [right_; ground(,,L)] ) Right - Gridbox( [right_; ground(,,P)] ) Right - Gridbox( transformer(right_ 6*gunit,L) ) Right - Gridbox( transformer(right_ 8*gunit,,2,8) ) Right - Gridbox( transformer(,,8,W,4) ) Right - Gridbox( transformer(,,9,AL) ) Right - Gridbox( transformer(,R,8,AW) ) Right - - rpoint_(right_) -A:Gridbox( switch ) Below(A) - Gridbox( switch(,,O) ) Right - Gridbox( switch(,,D) ) Right - Gridbox( switch(,,OD) ) Right - Gridbox( switch(,,C) ) Right - Gridbox( switch(,,B) ) Right - Gridbox( switch(,C,B) ) Right - Gridbox( dswitch ) Right - Gridbox( dswitch(,,WBK) ) Right - Gridbox( dswitch(,,WBuD) ) Right - Gridbox( dswitch(,,WBF) ) Right - Gridbox( dswitch(,,WBKF) ) Right - Gridbox( dswitch(,,WBL) ) Right - Gridbox( dswitch(,,WBKL) ) Right - -A:Gridbox( dswitch(,,WBT) ) Below(A) - Gridbox( dswitch(,,WdBKC) ) Right - Gridbox( dswitch(,,WBM) ) Right - Gridbox( dswitch(,,WBCO) ) Right - Gridbox( dswitch(,,WBCMP) ) Right - Gridbox( dswitch(,,WBCY) ) Right - Gridbox( dswitch(,,WBCZ) ) Right - Gridbox( dswitch(,,WBCE) ) Right - Gridbox( dswitch(,,WBRH) ) Right - Gridbox( dswitch(,,WBRdH) ) Right - Gridbox( dswitch(,,WBRHH) ) Right - -A:Gridbox( dswitch(,,WBMMR) ) Below(A) - Gridbox( dswitch(,,WBMM) ) Right - Gridbox( dswitch(,,WBMR) ) Right - Gridbox( dswitch(,,WBEL) ) Right - Gridbox( dswitch(,,WBLE) ) Right - Gridbox( dswitch(,,WBKEL) ) Right - Gridbox( antenna ) Right - Gridbox( antenna(,,L) ) Right - Gridbox( antenna(,,T) ) Right - Gridbox( antenna(,,S) ) Right - Gridbox( antenna(,,D) ) Right - Gridbox( antenna(,,P) ) Right - Gridbox( antenna(,,F) ) Right - -A:Gridbox( amp(right_ elen_*10/8) ) Below(A) -D1:Gridbox( integrator ) Right - Gridbox( delay ) Right - Gridbox( opamp ) Right - Gridbox( opamp(,,,,T) ) Right - Gridbox( amp(,dimen_/2) ) Right - Gridbox( integrator(,dimen_/2) ) Right - Gridbox( delay(,delay_rad_) ) Right - Gridbox( opamp(,,,dimen_*2/3) ) Right - Gridbox( opamp(,,,dimen_*2/3,T) ) Right - -right_ -A:Gridbox( relay(2) ) Below(A) - Gridbox( relay(2,O) ) Right - Gridbox( relay(2,C) ) Right - Gridbox( relay ) Right - Gridbox( contact ) Right - Gridbox( contact(O) ) Right - Gridbox( contact(C) ) Right - -up_ -A:Gridbox( [circle rad 29/10*gunit] ) Below(A) - Gridbox( bi_tr ) Right - Gridbox( bi_tr(,R) ) Right - Gridbox( bi_tr(,,P) ) Right - Gridbox( bi_tr(,R,P) ) Right - - Gridbox( j_fet ) Right - Gridbox( j_fet(,R) ) Right - Gridbox( j_fet(,,P,) ) Right - Gridbox( j_fet(,R,P,) ) Right - Gridbox( e_fet(,,,) ) Right - Gridbox( e_fet(,R,,) ) Right - - Gridbox( e_fet(,,P,) ) Right - Gridbox( e_fet(,R,P,) ) Right - Gridbox( d_fet(,,,) ) Right - Gridbox( d_fet(,R,,) ) Right - Gridbox( d_fet(,,P,) ) Right - Gridbox( d_fet(,R,P,) ) Right - -A:Gridbox( igbt ) Below(A) - Gridbox( ujt ) Right - Gridbox( ujt(,,P) ) Right -rpoint_(down_) - Gridbox( thyristor ) Right - Gridbox( thyristor(,B) ) Right - Gridbox( thyristor(,BG) ) Right - Gridbox( thyristor(,A) ) Right - Gridbox( thyristor(,C) ) Right -rpoint_(up_) - Gridbox( j_fet ) Right - Gridbox( e_fet ) Right - Gridbox( e_fet(,,,S) ) Right - Gridbox( e_fet(,,P) ) Right - Gridbox( e_fet(,,P,S) ) Right - Gridbox( d_fet ) Right - Gridbox( d_fet(,,,S) ) Right - Gridbox( d_fet(,,P,) ) Right - Gridbox( d_fet(,,P,S) ) Right - Gridbox( j_fet ) Right - Gridbox( j_fet(,,P) ) Right - Gridbox( mosfet(,,uHSDF) ) Right - -rpoint_(right_) -A:Gridbox( tgate ) Below(A) - Gridbox( tgate(,B) ) Right - Gridbox( ptrans ) Right - -A:Gridbox( AND_gate ) Below(A) - Gridbox( OR_gate ) Right - Gridbox( NAND_gate ) Right - Gridbox( NOR_gate ) Right - Gridbox( XOR_gate ) Right - Gridbox( NXOR_gate ) Right - Gridbox( BUFFER_gate ) Right - Gridbox( NOT_gate ) Right - -# input lines for OR-like gates. -define(`OR_inlgth',`(-sqrt(OR_rad^2-G_hht^2)+sqrt(OR_rad^2-`$1'^2))*L_unit') - - Gridbox( [ {move right_ gunit} - {move from last move-svec_(0,G_hht) to last move+svec_(0,G_hht)} - {line right_ OR_inlgth(0)} - {line right_ OR_inlgth(2) from Here+svec_(0,2)} - {line same from Here-svec_(0,2)} - {line right_ OR_inlgth(1) from Here+svec_(0,1)} - {line same from Here-svec_(0,1)}] ) Right - Gridbox( [ {move right_ gunit} - {move from last move-svec_(0,G_hht) to last move+svec_(0,G_hht)} - {line right_ OR_inlgth(0)} - {line right_ OR_inlgth(2) from Here+svec_(0,2)} - {line same from Here-svec_(0,2)}] ) Right - Gridbox( [ {move right_ gunit} - {move from last move-svec_(0,G_hht) to last move+svec_(0,G_hht)} - {line right_ OR_inlgth(2) from Here+svec_(0,2)} - {line same from Here-svec_(0,2)}] ) Right - Gridbox( [ {move right_ gunit} - {move from last move-svec_(0,G_hht) to last move+svec_(0,G_hht)} - {line right_ OR_inlgth(0)}] ) Right - -right_ -A:Gridbox( speaker ) Below(A) - Gridbox( speaker(,,H) ) Right - Gridbox( bell ) Right - Gridbox( microphone ) Right - Gridbox( buzzer ) Right - Gridbox( buzzer(,,C) ) Right - Gridbox( earphone ) Right - Gridbox( earphone(,,C) ) Right - Gridbox( nport ) Right - Gridbox( nterm ) Right - -A:Gridbox( FlipFlop(D) ) Below(A) - Gridbox( FlipFlop(T) ) Right - Gridbox( FlipFlop(RS)) Right - Gridbox( FlipFlop(JK)) Right - - ] with .nw at (0,0) - -#"A draft palette of a few elements for Inkscape using a 1 mm grid" \ -# ljust below at last [].sw - - command "" # end font -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/person.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/person.m4 deleted file mode 100644 index 5f5a9cb8bd5..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/person.m4 +++ /dev/null @@ -1,48 +0,0 @@ -.PS -# person.m4 -gen_init - -divert(-1) - `person( - height=val;width=val;fill="colorname") - e.g. person(height=1;fill="gray")' -define(`person',`[ setkey_(`$1',height,linewid) - setkey_(`$1',width,m4height*2/5)dnl - setkey_(`$1',fill,"black",N)dnl - bodywid = m4width/2 - bodyrad = bodywid/8 - bodyht = (m4height - bodywid - bodywid/16 + bodyrad*2)/2 - tmplth = linethick; linethick = 0 - Head: circle diam bodywid colored m4fill - Body: box rad bodyrad ht bodyht wid bodywid colored m4fill \ - with .n at Head.s+(0,-Head.diam/16) - armwid = bodywid/3 - Armleft: box wid armwid rad armwid/2 ht Body.ht-bodyrad colored m4fill \ - with .w at Body.e + (armwid/2,0) - Armright: box same with .e at Body.w + (-armwid/2,0) - Legleft: box wid bodywid/2.5 rad armwid/2 ht Body.ht colored m4fill \ - with .n at (Body.w,Body.s)+(bodywid/5,bodyrad*2) - Legright: box same with .n at (Body.e,Body.s)+(-bodywid/5,bodyrad*2) - linethick_(tmplth) - popdef(`m4height',`m4fill')dnl - ]') - -divert(0)dnl - - linewid = 3*linewid - movewid = 0.2 - - setrgb(0.54,0.81,0.94,babyblue) - person(fill="babyblue") - move - person(width=linewid*3/4;fill="babyblue") - move - person(width=linewid;fill="babyblue") - move - person - move - resetrgb - person(height=1;fill="gray") - - line up linewid with .c at last [].e+(linewid/10,0) -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/rotellipse.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/rotellipse.m4 deleted file mode 100644 index a49ce308b3b..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/rotellipse.m4 +++ /dev/null @@ -1,20 +0,0 @@ -.PS -# `rotellipse.m4' -gen_init - -[ - E: ellipse shaded "red" outlined "blue" - - A: rotellipse(1,1,outlined "red" shaded "blue") with .w at E.e - Point_(45) - B: rotellipse(,,dotted fill_(0.9)) - C: rotellipse(,,colored "red") with .s at last [].n - thinlines_ - showbox_(A) - showbox_(B) - showbox_(C) - thicklines_ - -] with .sw at 1,1 - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/shadowed.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/shadowed.m4 new file mode 100644 index 00000000000..b0bf0afa154 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/shadowed.m4 @@ -0,0 +1,49 @@ +.PS +gen_init +divert(-1) + +divert(0)dnl + +Boxes: [ +shadebox(box "s{}hadebox",lthick*4/(1bp__)) + +move +#{print "B"} +B: shadowed(,, + shadowthick=lthick*4;attrib=fill_(0.95) "box") + +move +#{print "B1"} +B1: shadowed(,, + rad=0bp__; shadowthick=lthick*4; shadowcolor="lightgray"; shadowangle=-60; \ + attrib=fill_(0.85) "box") + +move +#{print "R"} +R: shadowed(box,, rad=6bp__; shadowthick=lthick*4; \ + attrib=wid boxht*2 shaded "orange" outlined "red" thick 2 \ + `"\tt box\char44\char44" "\tt rad=6bp\_\_"') +] + +Others:[ +#{print "C"} +C: shadowed(circle,, + shadowthick=lthick*4;shadowcolor="blue";\ + attrib=outlined "green" shaded "green" diam 0.75 "circle") + +move +#{print "E"} + E: shadowed(ellipse,, + shadowthick=lthick*4; attrib=ht boxwid wid boxht shaded "yellow" \ + dashed "ellipse") + +move right movewid*3/2 then down moveht/2; right_ + b = boxht + F: shadowed(line,, + attrib=left b then up b right b then down b right b then to Here \ + shaded "orange" outlined "red" thick 3;shadowthick=4.5bp__;\ + shadowangle=45) + "line" at F.n+(0,-0.3) +] with .nw at Boxes.sw+(0,-moveht) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/snake.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/snake.m4 deleted file mode 100644 index 39f2b7d1d1f..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/snake.m4 +++ /dev/null @@ -1,21 +0,0 @@ -.PS -# snake.m4 -gen_init -scale = 2 -rmax = 0.8 -rmin = 0.2 -fact = 0.75 -wd = 0.15 -[ -shade(0.8, - for r = rmax to rmin by *fact do { - arc cw rad r to Here+(r+r,0) - arc ccw rad r-wd to Here+(2*(r-wd),0) } - line right wd - for r = r to rmax by *1/fact do { - arc cw rad r to Here-(r+r,0) - arc ccw rad r-wd to Here-(2*(r-wd),0) } - line to (0,0) - ) -] with .sw at 2,2 -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/squiggle.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/squiggle.m4 deleted file mode 100644 index 671ae2addd0..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/squiggle.m4 +++ /dev/null @@ -1,26 +0,0 @@ -.PS -# squiggle.m4 -gen_init - -divert(-1) -dnl Should this macro be in libgen.m4 or would that be just adding clutter? - - `squiggle(linespec, - amplitude,wavelength,attributes)' - `squiggly line (sinusoid), e.g. - squiggle(up_ 1 right_ 2,,,outlined "red")' -define(`squiggle',`rpoint_(ifelse(`$1',,linewid,`$1')) - m4dist = lin_leng(last line) - m4cycles = int(m4dist/(ifelse(`$3',,0.25*scale,`$3'))+0.5) - define(`squiggleampl',`ifelse(`$2',,0.04*scale,`$2')')dnl - define(`squigglefreq',`(twopi_*m4cycles/m4dist)')dnl - sinusoid(squiggleampl,squigglefreq,-twopi_/4,0,m4dist,`$4') \ - with .Origin at last line.start - move to last line.end') -divert(0)dnl - -squiggle(up_ 1 right_ 2,,,outlined "red") -squiggle(up 2 right_ 2,0.1,0.15,outlined "red" <-> wid 0.06 ht 0.05) -squiggle(right_ 1,,,thick 2 dotted outlined "blue" ) - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/venus.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/venus.m4 deleted file mode 100644 index 676cd98143d..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/venus.m4 +++ /dev/null @@ -1,74 +0,0 @@ -.PS -# venus.m4 -# https://tex.stackexchange.com/questions/576423/a-more-precise-dance-of-planets-with-metapost-and-tikz -# https://tex.stackexchange.com/questions/575986/dance-of-venus-and-variations-in-tikz-pgf - -gen_init -NeedDpicTools -maxpsht = 20 - -thinlines_ - -define(`venus', -`setkeys_(`$1', - outerlength:4; - innerlength:2.8933; - outerrate:8; - innerrate:13; - maxtimes:2880; - increment:2; - changephase:0 ) - sizefactor = 165/200 - nmaxtimes = 360*m4outerrate - for x=0 to nmaxtimes by m4increment do { - if "$2" != "" then { hue = \ - abs(sind(360*x/nmaxtimes*abs(m4innerrate-m4outerrate)+m4changephase-60)) - hsvtorgb(hue*360,1,1,r,g,b) - line from (Rect_(m4outerlength,x))*sizefactor \ - to (Rect_(m4innerlength,x/m4outerrate*m4innerrate))*sizefactor \ - outlined rgbstring(r,g,b) } \ - else { - line from (Rect_(m4outerlength,x))*sizefactor \ - to (Rect_(m4innerlength,x/m4outerrate*m4innerrate))*sizefactor - } - } ') - -AA:[ - sizefactor = 1/2.54 - define(`venusA',`[ - setkeys_(`$1', - iterations:270; - outerdistance:5.41; - innerdistance:7.48; - outerperiod:123; - innerperiod:200; - step:5) - for x=0 to m4iterations by m4step do { - line from (Rect_(m4outerdistance,x))*sizefactor \ - to (Rect_(m4innerdistance,x/m4outerperiod*m4innerperiod))*sizefactor \ - outlined "gray" - } - ]') - -# 3 columns, 5 rows - sizefactor /= 3 - Orig:(0,0) - for i=1 to 5 do { - iteri = 180 + (i-1)*540 - for j=1 to 3 do { - if (i==1) && (j==1) then { iter = 270 } \ - else { iter = iteri + (j-1)*180 } - V[i,j]: venusA(iterations=iter) with .sw at Orig - sprintf("%g",iter) at last [] #colored rgbstring(1,0,0) - Orig: V[i,j].se - } - Orig: V[i,1].sw-(0,V[i,1].ht) - } - ] - -BB:[ - venus(outerrate=8;innerrate=17;increment=2;innerlength=3.5;changephase=60,T) - ] at AA -# ] with .nw at AA.sw+(0,-0.5) - -.PE 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 ce3f289160c..53db089ade2 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 @@ -6,7 +6,7 @@ Letter 100.00 Single -2 -# dpic version 2022.12.01 option -x for Fig 3.2 +# dpic version 2023.03.01 option -x for Fig 3.2 1200 2 6 0 0 3975 5025 6 0 0 3975 5025 @@ -195,9 +195,11 @@ Single 1125 1425 1125 1275 1 3 0 1 0 -1 0 -1 -1 0 1 0.0 1125 1125 150 150 1275 1125 1275 1125 6 1025 1089 1225 1161 +6 1025 1089 1225 1161 5 1 0 1 0 -1 0 -1 -1 0 0 1 0 0 1075 1142 1125 1125 1075 1089 1025 1125 5 1 0 1 0 -1 0 -1 -1 0 0 1 0 0 1175 1108 1125 1125 1175 1161 1225 1125 -6 +-6 2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2 1125 975 1125 825 -6 diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/xtras b/Master/texmf-dist/doc/latex/circuit-macros/examples/xtras new file mode 100644 index 00000000000..d2211aa5f50 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/xtras @@ -0,0 +1,61 @@ +mv ASMEbox.m4 extras +mv Ant.m4 extras +mv ArrowFn.m4 extras +mv Attention.m4 extras +mv Autoencoder.m4 extras +mv Bridge.m4 extras +mv CSlight.m4 extras +mv Ccurve.m4 extras +mv Chuck.m4 extras +mv Clocks.m4 extras +mv ControlLoop.m4 extras +mv Counting.m4 extras +mv Cruller.m4 extras +mv Cylinder.m4 extras +mv Egg.m4 extras +mv Euro.m4 extras +mv Eye.m4 extras +mv Fefets.m4 extras +mv FieldLines.m4 extras +mv Floor.m4 extras +mv Flow2.m4 extras +mv Hexagon.m4 extras +mv Highgain.m4 extras +mv IC10107.m4 extras +mv Koch.m4 extras +mv Lyap.m4 extras +mv Metamodel.m4 extras +mv Obliq.m4 extras +mv OneLine.m4 extras +mv OpAmpFilter.m4 extras +mv Optics.m4 extras +mv Orbits.m4 extras +mv PPA.m4 extras +mv PerpTo.m4 extras +mv Pipe.m4 extras +mv Planes.m4 extras +mv RandomNodes.m4 extras +mv Region.m4 extras +mv Resolver.m4 extras +mv SPM.m4 extras +mv SampleFlow.m4 extras +mv ShadeSector.m4 extras +mv Shadow.m4 extras +mv Shaky.m4 extras +mv Star.m4 extras +mv Stator.m4 extras +mv TR_fill.m4 extras +mv Views.m4 extras +mv Wheat.m4 extras +mv Wheel.m4 extras +mv Y14-5_example.m4 extras +mv Zcos.m4 extras +mv birds.m4 extras +mv bistable.m4 extras +mv brace.m4 extras +mv chaos.m4 extras +mv hsv.m4 extras +mv person.m4 extras +mv rotellipse.m4 extras +mv squiggle.m4 extras +mv venus.m4 extras diff --git a/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4 b/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4 index 818f37c305a..109f941e7b8 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4 @@ -1,7 +1,7 @@ divert(-1) gpic.m4 Initialization for gpic. -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/lib3D.m4 b/Master/texmf-dist/doc/latex/circuit-macros/lib3D.m4 index 6b27b928162..040866aa456 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/lib3D.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/lib3D.m4 @@ -3,7 +3,7 @@ lib3D.m4 Macros for rotation, projection, and other operations on argument triples representing 3D vectors or colors. -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/libSLD.m4 b/Master/texmf-dist/doc/latex/circuit-macros/libSLD.m4 index ff1c01cb96c..5555e031311 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/libSLD.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/libSLD.m4 @@ -2,7 +2,7 @@ divert(-1) libSLD.m4 Draft macros for single-line diagram elements -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * @@ -628,8 +628,8 @@ define(`sl_ct',`[ Origin: Here pushkeys_(`$2', type:L:N; scale:1; grnd::N ) dnl define(`m4scf',`(m4scale*1.2)')dnl setdir_(`$3',R) - ifinstr(m4type,L, - `L: inductor(to vec_(2*dimen_/8*m4scf,0) with .c at Origin,,2); C: L.c + ifinstr(m4type,L,`define(`m4lw',`dimen_/8*m4scf')dnl + L: inductor(to vec_(2*m4lw,0) with .c at Origin,,2,,m4lw); C: L.c pushkey_(`$2',stemlgth,dimen_/5)dnl line from L.start to L.start+vec_(0,-m4stemlgth) Tstart: Here diff --git a/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 b/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 index 3a3e1f398ab..cf73ba0567a 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 @@ -1,7 +1,7 @@ divert(-1) libcct.m4 -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * @@ -1070,40 +1070,71 @@ define(`pvcell',`eleminit_(`$1') move to rvec_(m4wd,0); line to rvec_(max(0,rp_len/2-m4wd/2),0) } line invis to rvec_(rp_len,0)') - `heater( linespec, nparts, wid, ht )' -define(`heater',`eleminit_(`$1') - define(`m4hn',ifelse(`$2',,4,`$2'))dnl - define(`m4wd',ifelse(`$3',,`dimen_/2',`($3)'))dnl - define(`m4ht',ifelse(`$4',,`dimen_/5',`($4)'))dnl - { line to rvec_(max(0,rp_len/2-m4wd/2),0) - {[lbox(m4wd,m4ht)] at rvec_(m4wd/2,0)} - for m4ix=1 to m4hn-1 do { - {line from rvec_(m4ix*m4wd/(m4hn),m4ht/2) \ - to rvec_(m4ix*m4wd/(m4hn),-m4ht/2)}} - line from rvec_(m4wd,0) \ - to rvec_(max(0,rp_len/2+m4wd/2),0) } - line invis to rvec_(rp_len,0)') - - `thermocouple(linespec, wid, ht, L|R) - R=right orientation' -define(`thermocouple',`eleminit_(`$1') - define(`m4wd',ifelse(`$2',,`dimen_/5',`($2)'))dnl - define(`m4ht',ifelse(`$3',,`dimen_/2',`($3)'))dnl - define(`m4ths',`ifinstr(`$4',R,-)')dnl - {line to rvec_(max(0,rp_len/2-m4wd/2),0) \ - then to rvec_(max(0,rp_len/2-m4wd/2),m4ths`'(m4ht-m4wd/2)) \ - then to rvec_(rp_len/2,m4ths`'m4ht) \ - then to rvec_(max(0,rp_len/2-m4wd/2)+m4wd,m4ths`'(m4ht-m4wd/2)) \ - then to rvec_(max(0,rp_len/2-m4wd/2)+m4wd,0) \ - then to rvec_(rp_len,0)} - { dot(at rvec_(rp_len/2,m4ths`'m4ht)) } - {[box invis ht_ m4ht wid_ m4wd] at rvec_(rp_len/2,m4ths`'m4ht/2)} - line to rvec_(rp_len,0) invis ') - - `lamp(linespec,[R])' -define(`lamp',`define(`m4ng',ifinstr(`$2',R,-))define(`m4hw',`dimen_/10')dnl -define(`m4dp',(m4ng`'m4hw/2))define(`m4ht',(m4ng`'dimen_/8))dnl -eleminit_(`$1') + `heater( linespec, nparts|keys, wid, ht, + boxspec|[E[R][T]] ) + If arg5 contains E, draws an + heatere(linespec,keys,[R][T]) otherwise a + heatert(linespec,nparts,wid,ht,boxspec)' +define(`heater',`ifinstr(`$5',E, + `heatere(`$1',`$2',`$5')', + `heatert($@)')') + + `heatere( linespec, keys, [R|T] ) + R: right orientation + T: truncates leads to the width of the body + keys: (for body) + lgth=expr; + wdth=expr; (default lgth*2/5) + cycles=expr; + line=attributes' +define(`heatere', +`pushkeys_(`$2',`lgth:dimen_/2; wdth:m4lgth*2/5; cycles:3; line::N;')dnl + ifinstr(`$3',R,`pushdef(`m4ng',-)pushdef(`m4cw')pushdef(`m4ccw',cw)', + `pushdef(`m4ng') pushdef(`m4cw',cw)pushdef(`m4ccw')')dnl + eleminit_(ifinstr(`$3',T,m4wdth,`$1')) + { line to rvec_(rp_len/2-m4wdth/2,0); round + {[S: Here; r = m4lgth/(4*m4cycles+1) + arc m4cw m4line to rvec_(r,m4ng`'r) with .c at rvec_(r,0) + for i=1 to m4cycles do { arc m4ccw m4line to rvec_(0,m4ng`'2*r) \ + with .c at rvec_(0,m4ng`'r) + arc m4cw m4line to rvec_(0,m4ng`'2*r) with .c at rvec_(0,m4ng`'r) } + line m4line to rvec_(m4wdth-2*r,0) + for i=1 to m4cycles do {arc m4cw m4line to rvec_(0,m4ng`'(-2*r)) \ + with .c at rvec_(0,m4ng`'(-r)) + arc m4ccw m4line to rvec_(0,m4ng`'(-2*r)) with .c at rvec_(0,m4ng`'(-r)) } + arc m4cw m4line to rvec_(r,m4ng`'(-r)) with .c at rvec_(0,m4ng`'(-r)); round + ] with .S at Here } + line from rvec_(m4wdth,0) to rvec_(rp_len/2+m4wdth/2,0) } + line invis to rvec_(rp_len,0)dnl + popdef(`m4lgth',`m4wdth',`m4cycles',`m4line',`m4ng',`m4cw',`m4ccw') ') + + `heatert(linespec, nparts|keys, wid,ht,boxspec) + keys: parts=expr; + lgth=expr; + wdth=expr; + box=attributes; + args 3-5 unused if any key is given + arg5= body attributes' +define(`heatert',`eleminit_(`$1') + ifelse(regexp(`$2',`parts=\|lgth=\|wdth=\|box='),-1, dnl not very elegant + `pushdef(`m4parts',ifelse(`$2',,4,`$2'))dnl + pushdef(`m4lgth',ifelse(`$3',,`dimen_/2',`($3)'))dnl + pushdef(`m4wdth',ifelse(`$4',,`dimen_/5',`($4)'))dnl + pushdef(`m4box',`$5')', + `pushkeys_(`$2',`parts:4; lgth:dimen_/2; wdth:dimen_/5; box::N')')dnl + { line to rvec_(max(0,rp_len/2-m4lgth/2),0) + {[lbox(m4lgth,m4wdth,m4box)] at rvec_(m4lgth/2,0)} + for m4ix=1 to m4parts-1 do { + {line from rvec_(m4ix*m4lgth/(m4parts),m4wdth/2) \ + to rvec_(m4ix*m4lgth/(m4parts),-m4wdth/2) m4box}} + line from rvec_(m4lgth,0) \ + to rvec_(max(0,rp_len/2+m4lgth/2),0) } + line invis to rvec_(rp_len,0) popdef(`m4parts',`m4lgth',`m4wdth',`m4box')') + + `lamp(linespec,[R][T])' +define(`lamp',`pushdef(`m4ng',`ifinstr(`$2',R,-)')pushdef(`m4hw',`dimen_/10')dnl +pushdef(`m4dp',(m4ng`'m4hw/2))pushdef(`m4ht',(m4ng`'dimen_/8))dnl +eleminit_(ifinstr(`$2',T,m4hw*2,`$1')) { line to rvec_(rp_len/2-m4hw,0) \ then to rvec_(rp_len/2-m4hw,m4ng`'dimen_/3.2) spline ifdpic(ctension_) to rvec_(0,m4ht) \ @@ -1116,7 +1147,24 @@ eleminit_(`$1') line to rvec_(0,-(m4ng`'dimen_/3.2)) \ then to rvec_(rp_len/2-m4hw,-(m4ng`'dimen_/3.2)) } { [ circle rad dimen_/5 ] at rvec_(rp_len/2,m4ng`'dimen_/3.2) } - line invis to rvec_(rp_len,0) ') + line invis to rvec_(rp_len,0) popdef(`m4ng',`m4hw',`m4dp',`m4ht') ') + + `thermocouple(linespec, wid, ht, L|R [T]) + T=truncated leads; + R=right orientation' +define(`thermocouple',`pushdef(`m4wd',ifelse(`$2',,`dimen_/5',`($2)'))dnl + eleminit_(ifinstr(`$4',T,m4wd,`$1')) + pushdef(`m4ht',ifelse(`$3',,`dimen_/2',`($3)'))dnl + pushdef(`m4ths',`ifinstr(`$4',R,-)')dnl + {line to rvec_(max(0,rp_len/2-m4wd/2),0) \ + then to rvec_(max(0,rp_len/2-m4wd/2),m4ths`'(m4ht-m4wd/2)) \ + then to rvec_(rp_len/2,m4ths`'m4ht) \ + then to rvec_(max(0,rp_len/2-m4wd/2)+m4wd,m4ths`'(m4ht-m4wd/2)) \ + then to rvec_(max(0,rp_len/2-m4wd/2)+m4wd,0) \ + then to rvec_(rp_len,0)} + { dot(at rvec_(rp_len/2,m4ths`'m4ht)) } + {[box invis ht_ m4ht wid_ m4wd] at rvec_(rp_len/2,m4ths`'m4ht/2)} + line to rvec_(rp_len,0) invis popdef(`m4wd',`m4ht',`m4ths')') `cbreaker( linespec, L|R, D|Th|TS, body name ) circuit breaker to left or right of linespec, @@ -1164,6 +1212,45 @@ define(`mbreaker',`eleminit_(`$1') define(`m4R',`ifelse(`$2',R,-)') wid_ m4h+dimen_/16] at rvec_(m4h/2,m4R`'(m4ht/2)) } line to rvec_(rp_len,0) invis ') + `jumper(linespec,chars|keys) + Two-terminal solder jumper with named body parts. + chars: character sequence normally beginning + with C and ending with D specifying the jumper + components and their attribs: C is first, D last, + E is empty (blank) gap, J is filled gap, B is + box component. + The components are named T1, T2, ... + e.g. CED is a simple open jumper (default); + CJD closed; CEBED three-contact open; + CJBED three-contact open and closed. + keys: + type=chars as above; + body=attributes; (e.g. fill_(0.5)) + wdth=expr; + name=chars; body name' +define(`jumper',`eleminit_(`$1') + pushkeys_(`$2',`type:m4typ:N; body:fill_(0):N; wdth:dimen_/5; name::N;')dnl + ifelse(m4type,m4typ, + `poppushdef(`m4type',`ifelse(`$2',,CED,`ifinstr(`$2',=,CED,`$2')')')')dnl + pushdef(`m4r',m4wdth/2) pushdef(`m4lgth',`m4r*len(m4type)')dnl + { line to rvec_(rp_len/2-m4lgth/2,0) + { line from rvec_(m4lgth,0) to rvec_(rp_len/2+m4lgth/2,0) } + {ifelse(m4name,,,m4name:) [ S: Here + for_(1,len(m4type),1,`define(`m4ch',`substr(m4type,decr(m4x),1)')dnl + T`'m4x: ifelse(m4ch,C, + `[ arc to rvec_(0,-m4wdth) with .c at rvec_(0,-m4r) m4body + round(,,m4body); L: line to rvec_(0,m4wdth) m4body; round(,,m4body) + ] with .L.c at rvec_(m4r,0); move to last [].L.c ', + m4ch,J,`rotbox(m4r,m4r,m4body)', + m4ch,B,`rotbox(m4r,m4wdth,m4body)', + m4ch,E,`move to rvec_(m4r,0)', + m4ch,D,`[ arc to rvec_(0,m4wdth) with .c at rvec_(0,m4r) m4body + round(,,m4body); L: line to rvec_(0,-m4wdth) m4body; round(,,m4body) + ] with .L.c at Here; move to T`'m4x.L.c+vec_(m4r,0)')') + ] with .S at Here } } + line invis to rvec_(rp_len,0) undefine(`m4ch') dnl + popdef(`m4type',`m4body',`m4wdth',`m4name',`m4r',`m4lgth') ') + `gap( linespec,fill,A ) Gap with filled dots e.g. gap(down_ linewid/2,1); rlabel(+,v_1,-) @@ -1986,9 +2073,8 @@ define(`m4gen_d',`{dnl sep=expr; arrow separation angle=degrees; absolute direction' define(`em_arrows',`[ - pushkeys_(`$1',`type:m4nul:N; angle:ifelse(`$2',,135,`($2)')*dtor_')dnl - ifelse(m4type,m4nul, - `popdef(`m4type')pushdef(`m4type',`ifelse(`$1',,N,`$1')')')dnl + pushkeys_(`$1',`type:m4typ:N; angle:ifelse(`$2',,135,`($2)')*dtor_')dnl + ifelse(m4type,m4typ,`poppushdef(`m4type',`ifelse(`$1',,N,`$1')')')dnl arrowhead = em_arrowhead sc_draw(`m4type',N, `pushkeys_(`$1',lgth:ifelse(`$3',,dimen_*0.46,`$3'); sep:em_arrowwid*9/8)dnl @@ -3201,37 +3287,67 @@ define(`ccoax',`[define(`m4cd',ifelse(`$3',,`dimen_*0.4',`$3'))dnl C: circle diam m4cd/3 fill_(ifinstr(`$2',F,1,0)) at S `$4'] with .c ifelse(`$1',,`at Here',`$1')') - `tconn( linespec, >|>>|<|<<|O[F], wid) - terminal connector - O=node (circle); OF=filled circle - > (default) or >> =output - < or << =input - arg3 is arrowhead width or circle diam' + `tconn( linespec, chars|keys, wid) + terminal connector with head in a [] block + chars: + O=node (circle); OF=filled circle + > (default) | >> | < | << | A | AA | M + A or AA signify arc or double arc + M signifies male bar contact + arg3 is head width or circle diam + keys: + type=chars as above; + wdth=expr; head width; + lgth=expr; type M head length; + sep=expr; double head separation + head=attributes; except lgth, wdth' define(`tconn', - `define(`m4ph',`ifelse(`$3',,`dimen_/6',`($3)/2')')dnl - define(`m4ps',`dimen_/8') define(`m4cd',`ifelse(`$3',,`dimen_/5',`$3')')dnl - eleminit_(`$1',dimen_*3/4) - M4Ss: last line.start; M4Se: last line.end - ifelse(ifinstr(`$2',0,O,`$2'),O, - `{circle diam m4cd ifinstr(`$2',OF,`fill_(0)') ifinstr(`$2',0F,`fill_(0)') \ - at (m4cd)/2/distance(M4Ss,M4Se) between M4Se and M4Ss} - {line to last line.end chop 0 chop m4cd}', - `$2',<<, - `{line to last line.end chop 0 chop m4ps+m4ph - {line from rvec_(m4ph,m4ph) to Here then to rvec_(m4ph,-m4ph)} - move to rvec_(m4ps,0) - line from rvec_(m4ph,m4ph) to Here then to rvec_(m4ph,-m4ph)}', - `$2',<, - `{line to last line.end chop 0 chop m4ph - line from rvec_(m4ph,m4ph) to Here then to rvec_(m4ph,-m4ph)}', - `$2',>>, - `{line to last line.end chop 0 chop m4ps - {line from rvec_(-m4ph,m4ph) to Here then to rvec_(-m4ph,-m4ph)} - move to rvec_(m4ps,0) - line from rvec_(-m4ph,m4ph) to Here then to rvec_(-m4ph,-m4ph)}', + `pushkeys_(`$2', + `type:m4typ:N; lgth:m4nl; wdth:dimen_/6; sep:dimen_/8; head::N') + ifelse(m4type,m4typ,`poppushdef(`m4type',ifelse(`$2',,>,`$2'))')dnl + ifelse(m4lgth,(m4nl),`poppushdef(`m4lgth',ifelse(`$3',,(dimen_/2),`($3)/2'))') + eleminit_(`$1',dimen_*3/4) + M4Ss: last line.start; M4Se: last line.end + ifelse(ifinstr(m4type,0,O,`ifinstr(m4type,OF,O,m4type)'),O, + `{popdef(`m4wdth')pushdef(`m4wdth',ifelse(`$3',,dimen_/5,`$3'))dnl + line to last line.end chop 0 chop m4wdth + [circle diam m4wdth ifinstr(m4type,OF,`fill_(0)') m4head] \ + at rvec_(m4wdth/2,0)}', + m4type,AA, + `{line to last line.end chop 0 chop m4sep+m4wdth + [{A: arc from rvec_(0,m4wdth) to rvec_(0,-m4wdth) with .c at Here m4head} + arc from rvec_(m4sep,m4wdth) to rvec_(m4sep,-m4wdth) \ + with .c at rvec_(m4sep,0) m4head] with .A.c at rvec_(m4wdth,0) }', + m4type,A, + `{line to last line.end chop 0 chop m4wdth + [A:arc from rvec_(0,m4wdth) to rvec_(0,-m4wdth) with .c at Here m4head] \ + with .A.c at rvec_(m4wdth,0) }', + m4type,<<, + `{line to last line.end chop 0 chop m4sep+m4wdth + [S: Here; {line from rvec_(m4wdth,m4wdth) to S \ + then to rvec_(m4wdth,-m4wdth) m4head}; move to rvec_(m4sep,0) + line from rvec_(m4wdth,m4wdth) to Here then to rvec_(m4wdth,-m4wdth) \ + m4head ] with .S at Here }', + m4type,<, + `{line to last line.end chop 0 chop m4wdth + [S: Here; line from rvec_(m4wdth,m4wdth) to S \ + then to rvec_(m4wdth,-m4wdth) m4head] with .S at Here }', + m4type,>>, + `{line to last line.end chop 0 chop m4sep + [S: Here; {line from rvec_(-m4wdth,m4wdth) to S \ + then to rvec_(-m4wdth,-m4wdth) m4head}; move to rvec_(m4sep,0) + line from rvec_(-m4wdth,m4wdth) to Here then to rvec_(-m4wdth,-m4wdth) \ + m4head ] with .S at Here }', + m4type,M, + `{line to last line.end chop 0 chop m4lgth + [ S: Here; NW: rvec_(0,m4wdth/2); SW: rvec_(0,-m4wdth/2) + NE: rvec_(m4lgth,m4wdth/2); SE: rvec_(m4lgth,-m4wdth/2) + L: line thick 0 to NW then to NE then to SE then to SW then to Here \ + ifelse(m4head,,fill_(0),m4head) ] with .S at Here}', `{line to last line.end - line from rvec_(-m4ph,m4ph) to Here then to rvec_(-m4ph,-m4ph)}') - line invis to M4Se') + [S: Here; line from rvec_(-m4wdth,m4wdth) to S \ + then to rvec_(-m4wdth,-m4wdth) m4head ] with .S at Here }') + line invis to M4Se popdef(`m4type',`m4lgth',`m4wdth',`m4sep',`m4head') ') `tbox( text,wid,ht,<|>|<>,type ) Pointed terminal box. @@ -3497,13 +3613,15 @@ define(`ACsymbol',`[ Origin: Here pushdef(`m4amp',`ifelse(`$3',,`m4range/6',`($3)/2')')dnl for_(1,m4n,1,`move to Origin+vec_(0,((m4n+1)/2-m4x)*m4range/3) ifinstr(ifgpic(A,`$4'),A, - `{ arc ccw to rvec_(-m4range/2,0) \ - with .c at rvec_(-m4range/4,-max(m4range/4-m4amp,0)) } - { arc ccw to rvec_( m4range/2,0) \ - with .c at rvec_( m4range/4, max(m4range/4-m4amp,0)) }', - `{ sinusoid(m4amp,twopi_/m4range,pi_/2,-m4range/2,m4range/2) \ + `{ S`'m4x: [ Origin: Here + { arc ccw to rvec_(-m4range/2,0) \ + with .c at rvec_(-m4range/4,-max(m4range/4-m4amp,0)) } + { arc ccw to rvec_( m4range/2,0) \ + with .c at rvec_( m4range/4, max(m4range/4-m4amp,0)) }] dnl + with .Origin at Here }', + `{ S`'m4x: sinusoid(m4amp,twopi_/m4range,pi_/2,-m4range/2,m4range/2) dnl with .Origin at Here } ')') - `$5'; resetdir_ popdef(`m4amp',`m4n',`m4ACd',`m4range')] \ + `$5'; resetdir_ popdef(`m4amp',`m4n',`m4ACd',`m4range')] dnl with .Origin ifelse(`$1',,`at Here',`$1')') `Deltasymbol(at position, keys, U|D|L|R|degrees) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4 b/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4 index 6846782197c..b62c7d3fa89 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4 @@ -2,7 +2,7 @@ divert(-1) libgen.m4 Base macros for dpic and gpic diagrams -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * @@ -186,7 +186,7 @@ define(`latexcommand', `$2')') define(`m4announceprocessor',`dnl Do not change the format of the next line: -`#' `$1' Version 10.1: ifelse(m4picprocessor,gpic,`Gpic', +`#' `$1' Version 10.2: ifelse(m4picprocessor,gpic,`Gpic', m4postprocessor,pstricks,`PSTricks', m4postprocessor,pgf,`TikZ PGF', m4postprocessor,mfpic,`Mfpic', @@ -425,7 +425,7 @@ stackexec_(`m4stp__',`$1')') define(`m4msg',`syscmd(echo "$@" >/dev/stderr)') `Dump stack to the terminal during m4 execution' define(`m4stackmsg',`stackexec_(`$1',`m4Btmp', -`syscmd(echo $1 >/dev/console)')dnl +`syscmd(echo $1 >/dev/stderr)')dnl stackexec_(`m4Btmp',`$1')') `Macro error message to the terminal' define(`M4ErrorMsg',`m4msg(*** Macro ERROR: @@ -855,6 +855,10 @@ popdef(`m4xt')') define(`key_prefix',`m4') # Could be locally redefined + `poppushdef(`name',`new def') + Short for popdef(`name')pushdef(`name',`new def')' +define(`poppushdef',`popdef(`$1')pushdef(`$1',`$2')') + `pushkeys_(string,keysequence,keysep,itemsep) Invoke pushkey_ on a sequence of terms. Arg 2 is a sequence of terms separated by @@ -1121,7 +1125,7 @@ define(`rotbox',`[ Line: line from E to NE then to NW then to SW then to SE then to E `$3' ') popdef(`m4bw2',`m4bh2') `$5' ]') - `rotellipse(wid,ht,type) + `rotellipse(wid,ht,attributes) ellipse oriented in current direction and enclosed in a [] block, e.g. Point_(45); rotellipse(,,dotted fill_(0.9))' @@ -1144,7 +1148,7 @@ define(`rotellipse', `ellipsearc(wid,ht,startrads,endrads, rotangle,cw|ccw,linetype) e.g. ellipsearc(2,1,0,pi_,pi_/4,,dashed) - arg5 is the angle of the wid axis + arg5 is the angle of the ellipse wid axis Internal locations Start, End, C' define(`ellipsearc',`[ C: (0,0) a_earc = ifelse(`$1',,ellipsewid,`($1)')/2 @@ -1515,11 +1519,11 @@ define(`Equidist3',` `$4': intersect_(M4tmp_P1,M4tmp_T1,M4tmp_P2,M4tmp_T2) ifelse(`$5',,,`$5 = distance(`$4',`$1');') ') - `Cintersect(Pos1,rad1,Pos2,rad2,[R]) + `Cintersect(Ctr1,rad1,Ctr2,rad2,[R]) Upper (lower if arg5=R) intersection of - circles at Pos1 and Pos2, radius rad1 and rad2 + circles at Ctr1 and Ctr2, radius rad1 and rad2 Supercedes obsolete cintersect which is kept - for consistnecy' + for consistency' define(`Cintersect', `define(`m4Cr1',`ifelse(`$2',,circlerad,(`$2'))')dnl define(`m4Cr2',`ifelse(`$4',,circlerad,(`$4'))')dnl @@ -1792,8 +1796,8 @@ define(`graystring',`rgbstring(`$1',`$1',`$1')') evaluates to a string for use in `outlined string' or `shaded string' (mpost,PSTricks,pdf,tikz-pgf,postscript,svg - only)' - `The 1: after rgb is a divisor for the values + only) + The 1: after rgb is a divisor for the values (xcolor manual p 16)' ifelse( m4postprocessor,pstricks,`define(`rgbstring',`ifelse(`$2',,`"$1"', diff --git a/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4 b/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4 index d25ba888e78..52e2d116b21 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4 @@ -1,7 +1,7 @@ divert(-1) liblog.m4 Logic gates -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/mfpic.m4 b/Master/texmf-dist/doc/latex/circuit-macros/mfpic.m4 index 0b54325003b..d82447b136a 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/mfpic.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/mfpic.m4 @@ -1,7 +1,7 @@ divert(-1) mfpic.m4 Initialization for mfpic. -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/mpost.m4 b/Master/texmf-dist/doc/latex/circuit-macros/mpost.m4 index 8afea451bcb..47a54c6c8d1 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/mpost.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/mpost.m4 @@ -1,7 +1,7 @@ divert(-1) mpost.m4 Initialization for metapost. -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/pdf.m4 b/Master/texmf-dist/doc/latex/circuit-macros/pdf.m4 new file mode 100644 index 00000000000..a9f2da0997d --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/pdf.m4 @@ -0,0 +1,59 @@ +divert(-1) + pdf.m4 Initialization for pdf output. + +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * + +define(`m4picprocessor',dpic) +define(`m4postprocessor',pdf) + +ifdef(`libgen_',,`include(libgen.m4)divert(-1)')dnl + + Color utilities +define(`setrgb',`pushdef(`r_',`$1')pushdef(`g_',`$2')pushdef(`b_',`$3')dnl +pushdef(`m4cl_',ifelse(`$4',,lcspec,`$4'))dnl + command sprintf(" %7.5f %7.5f %7.5f rg",r_,g_,b_)') + +define(`resetrgb',`popdef(`m4cl_')popdef(`r_')popdef(`g_')popdef(`b_')dnl + ifdef(`r_', + `command sprintf(" %7.5f %7.5f %7.5f rg",r_,g_,b_)', + `command " 0 g"') ') + + `rgbdraw(color triple, drawing commands)' +define(`rgbdraw',`setrgb(`$1',`$2',`$3') + shift(shift(shift($@))) + resetrgb') + + Define some primary colors +define(`defineRGBprimaries',` +define(`white',`1 1 1')dnl +define(`lightgrey',`0.75 0.75 0.75')dnl +define(`lightgray',`0.75 0.75 0.75')dnl +define(`grey',`0.5 0.5 0.5')dnl +define(`gray',`0.5 0.5 0.5')dnl +define(`darkgrey',`0.25 0.25 0.25')dnl +define(`darkgray',`0.25 0.25 0.25')dnl +define(`black',`0 0 0')dnl +define(`red',`1 0 0')dnl +define(`green',`0 1 0')dnl +define(`blue',`0 0 1')dnl +define(`cyan',`0 1 1')dnl +define(`magenta',`1 0 1')dnl +define(`yellow',`1 1 0') ') + +define(`thinlines_',`linethick = 0.4 + arrowwid = 0.04*scale; arrowht = 0.2/3*scale;') +define(`thicklines_',`linethick = 0.8 + arrowwid = 0.05*scale; arrowht = 0.1*scale;') + `linethick_(x) + set line width to x pt (default 0.8) + and scale arrowhead parameters' +define(`linethick_',`linethick = ifelse(`$1',,`0.8',`$1'); dnl + arrowwid = ifelse(`$1',,`0.05',linethick/16)*scale; dnl + arrowht = ifelse(`$1',,`0.1',linethick/8)*scale;') + +divert(0)dnl diff --git a/Master/texmf-dist/doc/latex/circuit-macros/pgf.m4 b/Master/texmf-dist/doc/latex/circuit-macros/pgf.m4 index 20d2cc6a62f..1f13d582e1e 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/pgf.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/pgf.m4 @@ -1,7 +1,7 @@ divert(-1) pgf.m4 Initialization for Tikz-pgf. -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/postscript.m4 b/Master/texmf-dist/doc/latex/circuit-macros/postscript.m4 index e150f62095d..f5d052943da 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/postscript.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/postscript.m4 @@ -1,7 +1,7 @@ divert(-1) postscript.m4 Initialization for Postscript output. -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/psfrag.m4 b/Master/texmf-dist/doc/latex/circuit-macros/psfrag.m4 index d35847525e8..3ab0bf00901 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/psfrag.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/psfrag.m4 @@ -2,7 +2,7 @@ divert(-1) psfrag.m4 Initialization for dpic -f processing: Postscript with psfrag strings -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/pstricks.m4 b/Master/texmf-dist/doc/latex/circuit-macros/pstricks.m4 index 906714005e0..8c16babd1c3 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/pstricks.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/pstricks.m4 @@ -1,7 +1,7 @@ divert(-1) pstricks.m4 Initialization for PSTricks. -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/svg.m4 b/Master/texmf-dist/doc/latex/circuit-macros/svg.m4 index 63dca4a8ce0..3e2479539b1 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/svg.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/svg.m4 @@ -1,7 +1,7 @@ divert(-1) svg.m4 Initialization for svg output. -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4 b/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4 index 6c56dc1fbf0..966da643fd4 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4 @@ -1,7 +1,7 @@ divert(-1) xfig.m4 Initialization for xfig. -* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.2, copyright (c) 2023 J. D. Aplevich under * * the LaTeX Project Public Licence in file Licence.txt. The files of * * this distribution may be redistributed or modified provided that this * * copyright notice is included and provided that modifications are clearly * -- cgit v1.2.3