diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/examples')
68 files changed, 1135 insertions, 1133 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4 index 566fb4c8141..814824bee75 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4 @@ -2,7 +2,11 @@ # AntiqueClock.m4 gen_init NeedDpicTools -iflatex(command "{\sf") + +# PSTricks or tikz only: +ifelse(ifpstricks(T)`'ifpgf(T),T,` + +iflatex(`latexcommand({\sf)') # https://tex.stackexchange.com/questions/236923/generate-analog-clock-with-numbered-face-add-seconds-roman-numerals @@ -102,7 +106,7 @@ Face: circle thick 0 fill_(1) rad r3 at C # Text rotation for PSTricks or TikZ define(`rottext', - `ifpstricks(`\rput[c]{%g}(0,0)')ifpgf(`\pgftext[rotate=%g]')') + `ifpstricks(`\rput[c]{%g}(0,0)',`ifpgf(`\pgftext[rotate=%g]',%g)')') # Outer numbers command sprintf("\font\outerfont=cmss12 at %4.2fin",r3-r4) for mn = -15 to 15 by 5 do { sprintf("rottext{\outerfont %g}",\ @@ -138,5 +142,8 @@ Face: circle thick 0 fill_(1) rad r3 at C Clock1: AntiqueClock(,,,3) # Clock2: AntiqueClock(4,50,07,2) at Clock1.e+(1.5,0) -iflatex(command "}%") + iflatex(`latexcommand(})') + +',` "AntiqueClock.m4 requires pstricks or pgf" ') + .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Arrester.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Arrester.m4 new file mode 100644 index 00000000000..791a2f21623 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Arrester.m4 @@ -0,0 +1,28 @@ +.PS +# Arrester.m4 +cct_init + +divert(-1) + +divert(0)dnl + +movewid = movewid/2 + M: arrester + {"\tt arr{}ester()" at last [].s below} + N: arrester(,D) with .A at M.end+(movewid,0) + {"\strut\tt $\cdots$(,D)" at last [].s below} + P: arrester(,LD) with .A at N.B+(movewid,0) + {"\tt (,LD)" at last [].s below} + move; H: arrester(,S) + {"\tt (,S)" at last [].s below} + move; Q: arrester(,E) + {"\tt (,E)" at last [].s below} + R: arrester(,ED) with .A at Q.end+(movewid,0) + {"\tt $\cdots$(,ED)" at last [].s below} + thinlines_ + Loopover_(`X', + `spline <- from X.A up 8bp__ then up 6bp__ right 4bp__; "\sl A" ljust + spline <- from X.B up 8bp__ then up 6bp__ left 4bp__; "\sl B" rjust + arrow <- from X.G right 12bp__ up 2bp__; "\sl G" ljust',N,R) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Audio.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Audio.m4 index 722a2434d8a..662c6d0c994 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Audio.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Audio.m4 @@ -46,14 +46,6 @@ L:[ thicklines_ ] with .w at last [].e+(0.0,0.5) [ - M: microphone - `"\tt microphone"' at M.s+(0,-0.2) #below - In123(M) - thinlines_ - arrow <- from M.Circle.n up 0.15 ; "\sl Circle" above - thicklines_ - ] with .sw at last [].se+(0.4,0) -[ Z: buzzer `"\tt buzzer"' at Z.s+(0,-0.2) #below In123(Z) @@ -71,6 +63,24 @@ R:[ "\sl Face" above thicklines_ ] with .sw at last [].se+(0.4,0) +[ + M: microphone + `"\tt microphone"' at M.s+(0,-0.2) #below + In123(M) + thinlines_ + arrow <- from M.Circle.n up 0.15 ; "\sl Circle" above + thicklines_ + ] with .sw at last [].se+(0.4,0) +[ + M: microphone(A) + `"\tt microphone(A)"' at M.s+(0,-0.2) #below + thinlines_ + arrow <- from M.Head.e+(0,0.05) right 0.2; "\sl Head" ljust + spline 0.5 <- from M.Head.b down 0.05 right 0.1 then right 0.1 + "\sl Head.b" ljust + arrow <- from M.Stand.s right 0.2; "\sl Stand.s" ljust + thicklines_ + ] with .n at last [].s+(0,-0.05) [[ E: earphone `"\tt earphone"' at E.s+(0,-0.2) #below @@ -89,6 +99,6 @@ R:[ "\sl C" at E.C thicklines_ ] with .sw at last [].se+(0.6,0) -] with .n at (0.6 between L and R, R.s)+(0,0.1-ifdpic(0.2,0.25)) +] with .n at (0.6 between L and R, R.s)+(0.5,0.1-ifdpic(0.2,0.25)) .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 7253d2b313e..204ad5d96a4 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m4 @@ -17,7 +17,7 @@ T:[ "$\vdots$" at (0.5 between last "" and 2nd last "")+(0.15,0.02) thicklines_ CS1: "`\tt 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 @@ -36,7 +36,7 @@ C: [ 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.5,0.0) + ] with .C1.sw at T.S2.se+(0.6,0.0) Y: [ tconn(,O) @@ -46,24 +46,24 @@ Y: [ {`"\tt (,>)"' at last line.c+(0,-0.2)} move to P1.end+(0.3,0) tconn(,>>) - {`"\tt (,>>)"' at last line.c+(0,-0.2)} + {`"\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)} + {`"\tt (,<{}<)"' 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 - [ left_; - tbox(V_1,,,<>) ] with .nw at last [].sw+(0,-0.25) - `"\tt tbox(V\_1,{,},<>)"' at last [].sw below ljust -# `"\tt left\_"' at last [].sw +(0,-0.2) ljust `"\tt tbox(V\_1)"' ljust -] with .nw at Y.ne+(0.2,0) + { `"\tt tbox(V\_2)"' at last [].sw below ljust } + tbox(V_1,,,<) with .sw at last [].se+(0.75,0) + { `"\tt tbox(V\_1,{,},<)"' at last [].s below } + tbox(V_1,,,<>) with .sw at last [].se+(0.75,0) + { `"\tt tbox(V\_1,{,},<>)"' at last [].s below } +] with .nw at T.sw+(0,-0.2) .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Connectors.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Connectors.m4 new file mode 100644 index 00000000000..5c3207c17da --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Connectors.m4 @@ -0,0 +1,24 @@ +.PS +# Connectors +log_init +include(ics.m4) + +# ArduinoUno +# "{\sf Arduino Uno Rev 3}" at last [].Connector.s below + Ar: ArduinoLeonardo #with .sw at last [].se+(0.25,0) + "{\sf Arduino Leonardo}" at last [].Connector.s below + + RPI: RPi with .sw at last [].se+(0.25,0) + "{\sf Raspberry Pi 4 GPIO}" at last [].GPIO.s below + + HD: HDMI_micro with .nw at last [].ne+(0.25,0.5) + "\sf Micro" rjust at HD.Base.sw+(-2bp__,10bp__) "\sf HDMI" rjust + + S: USB_C_Socket with .sw at (HD.e.x+0.25,RPI.s.y) + "\sf USB-C Socket" at S.Base.s below + "\sf B12" at S.B12.end above ljust + "\sf B1" at S.B1.end above ljust + "\sf A1" at S.A1.end above rjust + "\sf A12" at S.A12.end above rjust + +.PE 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 b308e5aadbd..bde24fac3eb 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Fuses.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Fuses.m4 @@ -4,7 +4,8 @@ cct_init movewid = 0.25 - {fuse ; {"`{\tt fuse}'" at last line.c+(0,-0.2)} + { + fuse ; {"`{\tt fuse}'" at last line.c+(0,-0.2)} move fuse(,D) ; {"`{\tt fuse(,D)}'" at last line.c+(0,-0.2)} move @@ -14,11 +15,10 @@ movewid = 0.25 move fuse(,S) ; {"`{\tt fuse(,S)}'" at last line.c+(0,-0.2)} move - fuse(,HB) ; {"`{\tt fuse(,HB)}'" at last line.c+(0,-0.2)} + fuse(,SB) ; {"`{\tt fuse(,SB)}'" at last line.c+(0,-0.2)} } move down; right_ - fuse(,HC,0.5,0.3) ; {"`{\tt (,HC,0.5,0.3)}'" at last line.c+(0,-0.25)} - move + { cbreaker; {"`{\tt cbreaker}'" at last line.c+(0,-0.25)} move cbreaker(,R); {"`{\tt cbreaker(,R)}'" at last line.c+(0,-0.25)} @@ -27,6 +27,13 @@ movewid = 0.25 move 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)} + } .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Grounds.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Grounds.m4 index 13b4730b801..e93fadf33c2 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Grounds.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Grounds.m4 @@ -8,15 +8,18 @@ Ground: ground GT: ground(,T) move right sep GF: ground(,,F) +sep = 0.55 move right sep GE: ground(,,E) move right sep -B: Here+(0,-0.5) ; { - "{\tt `ground'}" wid 32bp__ at (Ground,B) - "{\tt `ground'(,T)}" at (GT,B)+(0,7bp__) +B: Here+(0,-0.5) +D: B+(0,11bp__) + + { "{\tt `ground'}" wid 32bp__ at (Ground,B) + "{\tt `ground'(,T)}" at (GT,B)+(0,11bp__) "{\tt (,{,}F)}" at (GF,B) - "{\tt (,{,}E)}" at (GE,B)} + "{\tt (,{,}E)}" at (GE,D)} GS: ground(,,S) @@ -28,12 +31,16 @@ GQ: ground(,,Q) GL: ground(,,L) move right sep GP: ground(,,P) + move right sep +GPA: ground(,T,PA) C: Here+(0,-0.5) +E: C+(0,11bp__) "{\tt (,{,}S)}" at (GS,C) - "{\tt (,{,}S,90)}" at (GS90,C) + "{\tt (,{,}S,90)}" at (GS90,E) "{\tt (,{,}Q)}" at (GQ,C) - "{\tt (,{,}L)}" at (GL,C) + "{\tt (,{,}L)}" at (GL,E) "{\tt (,{,}P)}" at (GP,C) + "{\tt (,T,PA)}" at (GPA,E) .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Headers.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Headers.m4 index a4e1abce3b8..1c040227e3c 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Headers.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Headers.m4 @@ -5,7 +5,11 @@ log_init Header {"\sl P1" at last [].P1 rjust `"\tt Header"' at last [].s+(0,-10pt__) - "\sl P2" at last [].P2 rjust} + "\sl P2" at last [].P2 rjust + thinlines_ + arrow <- from last [].Block.ne-(0,0.1) up 0.15 right 0.15 + "\sl Block" ljust + thicklines_ } Header(2,3,8mm__,10mm__) with .nw at last [].ne+(0.75,-0.05) {"\sl P1" at last [].P1 rjust diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4 index 6e4eb88ea0d..d76016c6e4b 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4 @@ -2,6 +2,7 @@ # MC.m4 cct_init +MC: [ dv = dimen_*0.6 dh = dimen_*0.4 backup = dimen_/6 @@ -32,4 +33,49 @@ cct_init source(right_ dimen_,AC); llabel(sprintf("$v_{\char%g}$",64+i)) if i==2 then { Output: dot } else { line down (2-i)*dv } }} +] + +Three: [ + dv = dimen_*0.6 + dh = dimen_ + define(`swfet',`mosfet(`$1',,dMEDSuBQPy)') + define(`swpair',`[ up_ + BS: swfet(up_ dimen_); { "`$1'" at BS.D-(0,2bp__) rjust } + L: line up_ 3*dimen_ from BS.D + TS: swfet(up_ dimen_) with .S at Here; { "`$2'" at TS.S+(0,2bp__) rjust } + T: TS.D + B: BS.S + C: L.c + ]') + + V1: gap(up_ 5*dimen_,1,A); { "$V_1$" at last arrow.c rjust } + line right_ dh/2 + { C1: capacitor(down_ to (Here,V1.start)); llabel(C_1) } + for_(1,3,1,` + line right_ dh ifelse(m4x,1,,*5/4) + {SP1`'m4x: swpair(S1`'eval(m4x+3),S1`'m4x) with .T at Here + dot(at last [].C + (0,(2-m4x)*dh)) + line right_ (3-m4x)*dh*5/4 + inductor(right_ dimen_,L); llabel(,L_{1\char`'eval(64+m4x)}) + line down_ (2-m4x)*dimen_*2/3 + pushdef(`dimen_',dimen_*1.2) inductor(right_ dimen_*3/4) popdef(`dimen_') + line down_ (2-m4x)*dimen_/3 + M: move right_ dimen_/8 + line up_ (2-m4x)*dimen_/3 + pushdef(`dimen_',dimen_*1.2) inductor(right_ dimen_*3/4) popdef(`dimen_') + line up_ (2-m4x)*dimen_*2/3 + inductor(right_ dimen_,L); llabel(,L_{2\char`'eval(64+m4x)}) + line right_ dimen_/8+(m4x-1)*dh*5/4 + dot + SP2`'m4x: swpair(S2`'eval(m4x+3),S2`'m4x) with .C at Here+(0,(m4x-2)*dh) } + ') + "$T_r$" at M.c+(0,dimen_/2) + line from V1.start to SP13.B + line from SP21.B to SP23.B+(dh*3/4,0) + { C2: capacitor(up_ to (Here,V1.end)); llabel(,,C_2) } + line right_ dh/2 + gap(up_ 5*dimen_,1,A); { "$V_2$" at last arrow.c ljust } + line to SP21.T chop dotrad_ chop 0 + +] with .nw at MC.sw+(0,-0.2) .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile index 92968df523a..d729596a17d 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile @@ -27,18 +27,15 @@ LIBDIR = .. # The dpic processor: PIC = dpic -p -#PIC = $$HOME/dpic/bu*/p2c/ftp/dpic -p -#PIC = /cygdrive/d/Dwight/dpic/p2c/Windows/dpic -p -#PIC = dpic -1 -p -#PIC = $$HOME/dpic/build/test/dpic -p +#PIC = $$HOME/dpic/build/p2c/ftp/dpic -p #PIC = $$HOME/dpic/dev/p2c/ftp/dpic -p -#PIC = $$HOME/tmp/dpic -p #PIC = $$HOME/dpic/bison/dpic -p #PIC = $$HOME/dpic/bdev/dpic -p CONFIGFILE = pstricks.m4 -# This is for testing the mingw version of dpic: +# Testing the mingw version of dpic: +#PIC = $$HOME/dpic/bison/distsrc/Windows/dpic -p #CUSTOM=windows.m4 # Uncomment for gpic. Use gpic or pic as applicable on your machine: @@ -61,8 +58,9 @@ DOC = examples PICS = \ ABlogix.tex Adder.tex Alogix.tex AmpTable.tex Antennas.tex \ AntiqueClock.tex Audio.tex Bip.tex Btree.tex Buttons.tex Byte.tex \ - CanLogic.tex CctTable.tex Conn.tex Contacts.tex Contact.tex control.tex \ - Counting.tex Crossbar.tex Crow.tex csc.tex Csource.tex Decoder.tex \ + CanLogic.tex CctTable.tex Conn.tex Connectors.tex \ + Contacts.tex Contact.tex control.tex Counting.tex Crossbar.tex Crow.tex \ + csc.tex Csource.tex Decoder.tex \ Demultiplexer.tex diamond.tex Dini.tex Diodes.tex Drive.tex Emarrows.tex \ ex00.tex ex01.tex ex02.tex ex03.tex ex04.tex ex05.tex ex06.tex ex08.tex \ ex09.tex ex10.tex ex11.tex ex12.tex ex15.tex ex16.tex ex17.tex ex18.tex \ @@ -111,7 +109,7 @@ BS = tr '|' '\134' make $*.tex printf "|documentclass[11pt]{article}\n\ |usepackage{times,pstricks,boxdims,graphicx,pst-grad,pst-slpe}\n\ -|usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits}\n\ +|usepackage{siunitx}\n\ |setlength{|textwidth}{28cm}|setlength{|textheight}{28cm}\n\ |setlength{|oddsidemargin}{0pt}|setlength{|evensidemargin}{0pt}\n\ |setlength{|hoffset}{-1cm}\n\ @@ -174,10 +172,10 @@ BS = tr '|' '\134' $(DOC).pdf: clean pdfmode $(DOC).frp touch $(DOC).dim rm -f $(BOXDIMS) $(BOXPICS) - make PIC="dpic -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim pics + make PIC="$(PIC) -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim pics pdflatex $(DOC) rm -f $(BOXDIMS) $(BOXPICS) - make PIC="dpic -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim pics + make PIC="$(PIC) -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim pics pdflatex $(DOC) optpdf $(DOC).pdf @@ -202,14 +200,14 @@ $(DOC).dvi: $(DOC).frs latex $(DOC) $(DOC).frs: $(DOC).tex files.tex header.tex psmode - make PIC="dpic -p" CONFIGFILE=pstricks.m4 DIMFILE=$(DOC).dim pics + make PIC="$(PIC) -p" CONFIGFILE=pstricks.m4 DIMFILE=$(DOC).dim pics cp $(LIBDIR)/doc/Version.tex . latex $(DOC) rm -f $(DOC).dvi touch $(DOC).frs $(DOC).frp: $(DOC).tex files.tex header.tex pdfmode - make PIC="dpic -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim pics + make PIC="$(PIC) -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim pics cp $(LIBDIR)/doc/Version.tex . pdflatex $(DOC) rm -f $(DOC).pdf @@ -235,7 +233,7 @@ echopics: clobber: clean rm -f *.ps - -@for dir in mf mpost pdflatex xfig psfrag pgf svg dev test; \ + -@for dir in mf mpost pdflatex xfig psfrag svg dev test; \ do (if test -d $$dir ; then cd $$dir; make clobber; fi) ; done rm -f *.warn rm -f examples.pdf diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Pconn.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Pconn.m4 index fbda5cc2e7e..cb8afd0875e 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Pconn.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Pconn.m4 @@ -19,27 +19,23 @@ P1: [ arrow from G.w to C1.G.e arrow from G.e to C2.G.w `"\tt (,AF)"' at last [].s below - C03: pconnex(,AC) with .w at C2.e+(0.2,0) + C03: pconnex(,AC) with .w at C2.e+(0.25,0) `"\tt (,AC)"' at last [].s below C3: pconnex(,ACF) with .w at last [].e+(0.2,0) `"\tt (,ACF)"' at last [].s below - C5: pconnex(U,D) with .w at last [].e+(0.2,0) + C5: pconnex(U,D) with .w at last [].e+(0.25,0) `"\tt (U,D)"' at last [].s below - C6: pconnex(U,DF) with .w at last [].e+(0.2,0) + C6: pconnex(U,DF) with .w at last [].e+(0.25,0) `"\tt (U,DF)"' at last [].s below - C7: pconnex(U,J) with .w at last [].e+(0.2,0) + C7: pconnex(U,J) with .w at last [].e+(0.25,0) `"\tt (U,J)"' at last [].s below - C8: pconnex(U,JF) with .w at last [].e+(0.2,0) + C8: pconnex(U,JF) with .w at last [].e+(0.25,0) `"\tt (U,JF)"' at last [].s below ] P2: [ - C4: pconnex(,P) - `"\tt (,P)"' at last [].s below - C11: pconnex(,PF) with .w at last [].e+(0.2,0) - `"\tt (,PF)"' at (C11,last "") below - C9: pconnex(,G) with .w at last [].e+(0.2,0) + C9: pconnex(,G) #with .w at last [].e+(0.2,0) `"\tt (,G)"' at last [].s below C91: pconnex(,GF) with .w at last [].e+(0.2,0) `"\tt (,GF)"' at last [].s below @@ -47,6 +43,15 @@ P2: [ `"\tt (L,GF)"' at last [].s below C10: pconnex(,GC) with .w at last [].e + (0.2,0) `"\tt (,GC)"' ht 11pt__ at last [].s below -] with .nw at P1.C1.sw + (0,-0.25) + C12: pconnex(,GCF) with .w at last [].e + (0.2,0) + `"\tt (,GCF)"' ht 11pt__ at last [].s below +] with .nw at P1.C1.sw + (0,-0.35) + +P3: [ + C4: pconnex(,P) + `"\tt (,P)"' at last [].s below + C11: pconnex(,PF) with .w at last [].e+(0.2,0) + `"\tt (,PF)"' at (C11,last "") below +] with .nw at P2.C9.sw + (0,-0.35) .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples b/Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples index 7585e3dc77c..5561e4d3fc1 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples @@ -8,7 +8,8 @@ of unix, linux, cygwin, djgpp, ...): 2. In this directory, type "make". If your installed dpic is the Mingw version included in the dpic distribution, (a) edit the file windows.m4 to point to your installation folder, and (b) uncomment - the CUSTOM= line in the Makefile, or type "make CUSTOM=windows.m4". + the CUSTOM=windows.m4 line in the Makefile, or type + "make CUSTOM=windows.m4". To test one of the diagrams, say ex01.m4, type one of the following (and have a look at the comments at the top of the Makefile): diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Rectifiers.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Rectifiers.m4 index e24315d0fd2..23d544f812c 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Rectifiers.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Rectifiers.m4 @@ -59,19 +59,22 @@ Threephase: [ linethick_(1) ] Cct3:[ - No: dot; {"$N_o$" below rjust } - { inductor(to Here+(Rect_(dimen_,60)),W); E2: "$e_2$" ljust } - { inductor(to Here+(Rect_(dimen_,-60)),W); E3: "$e_3$" ljust } - { inductor(from No-(dimen_,0) to No,W); E1: "$e_1$" above at last line.start } + No: dot; "$N_o$" at last [].s below rjust + E2: No+(Rect_(dimen_,60)) + E3: No+(Rect_(dimen_,-60)) + E1: No+(-dimen_,0) + inductor(from No to E2,W); round; "$e_2$" ljust + inductor(from No to E3,W); round; "$e_3$" ljust + inductor(from E1 to No,W); round(at E1); "$e_1$" at E1 above D3: diode(down_ from E3); b_current(i_3,rjust); llabel(,,D_3) - line from E1 to (E1,D3.start) - D1: diode(down_); b_current(i_1,rjust); llabel(,,D_1) - line from E2 left E2.x-E1.x+dimen_/3 then down E2.y-E3.y \ - then to 0.5 between D1.start and D3.start + line from E1 to (E1.x,D3.start.y+dimen_/3) then right_ (E3.x-E1.x)/2 \ + then down_ dimen_/3 + D1: diode(down_); b_current(i_1,rjust); llabel(,,D_1); dot + line from E2 left_ E2.x-E1.x+dimen_/3 then down_ E2.y-E3.y \ + then to 2 between D3.start and D1.start; corner D2: diode(down_); b_current(i_2,rjust); llabel(,,D_2) - { line from D1.end to D3.end } - dot - arrowline(down elen_/2); rlabel(,i_L) + { line from D2.end to D3.end } + arrowline(from D1.end down_ elen_/2); rlabel(,i_L) resistor(right_ elen_); rlabel(+,e_L,-); llabel(,R) line to (Here,No) then to No ] with .e at Threephase.w-(0.5,0) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/SampleFlow.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/SampleFlow.m4 new file mode 100644 index 00000000000..f8d73ca203b --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/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 indent "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/Sources.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Sources.m4 index a70cea11137..8a4bab9bc64 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Sources.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Sources.m4 @@ -21,7 +21,8 @@ define(`NL',`; move down $1; right_') {source(,X) ; move ; "`source(,X)'" ljust} NL {source(,F) ; move ; "`source(,F)'" ljust} NL {source(,G) ; move ; "`source(,G)'" ljust} NL - {source(,Q) ; move ; "`source(,Q)'" ljust} + {source(,Q) ; move ; "`source(,Q)'" ljust} NL(0.3) + {proximity ; move ; "`\shortstack[l]{proximity\\ = consource(,P)}'" ljust} } move right_ 2.0 { @@ -34,8 +35,8 @@ define(`NL',`; move down $1; right_') {source(,SCr) ; move ; "`source(,SCr)'" ljust} NL {source(,T) ; move ; "`source(,T)'" ljust} NL {source(,L) ; move ; "`source(,L)'" ljust} NL - {source(,B) ; move ; "`source(,B)'" ljust} NL(moveht*0.8) - {nullator ; move ; "`nullator'" ljust} NL(moveht*0.6) + {source(,B) ; move ; "`source(,B)'" ljust} NL + {nullator ; move ; "`nullator'" ljust} NL(moveht*0.8) {norator ; move ; "`norator'" ljust} } move right_ 2.0 @@ -49,7 +50,7 @@ define(`NL',`; move down $1; right_') {source(,SE) ; move ; "`source(,SE)'" ljust} NL {consource(,V) ; move ; "`consource(,V)'" ljust} NL(0.32) {consource(,v) ; move ; "`consource(,v)'" ljust} NL(0.3) - {battery ; move ; "`battery'" ljust} NL + {battery ; move ; "`battery'" ljust} NL(0.3) {battery(,3,R) ; move ; "`battery(,3,R)'" ljust} iflatex(`ifpsfrag(,`latexcommand(})')') diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Switches.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Switches.m4 index d8262be92db..46b3f9240d3 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Switches.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Switches.m4 @@ -2,38 +2,40 @@ # Switches.m4 cct_init +define(`Below',`at last [].s+(0,-10bp__)') + movewid = 0.25 # Row 1 right_; { - lswitch; {S:"\tt ls{}witch" at last [].s+(0,-10bp__)} + lswitch; {S:"\tt ls{}witch" Below} move right_ - lswitch(,,O); {"\tt (,,O)" at (last [],S)} + lswitch(,,O); {"\tt (,{,}O)" at (last [],S)} move right_ - lswitch(,,C); {"\tt (,,C)" at (last [],S)} + lswitch(,,C); {"\tt (,{,}C)" at (last [],S)} move right_ - lswitch(,,DA); {"\tt (,,DA)" at (last [],S)} + lswitch(,,DA); {"\tt (,{,}DA)" at (last [],S)} move right_ - lswitch(,,dDO); {"\tt (,,dDO)" at (last [],S)} + lswitch(,,dDO); {"\tt (,{,}dDO)" at (last [],S)} move right_ - lswitch(,,uDC); {"\tt (,,uDC)" at (last [],S)} + lswitch(,,uDC); {"\tt (,{,}uDC)" at (last [],S)} } # Row 2 move down; right_; { - lswitch(,,K); {S:"\tt (,,K)" at last [].s+(0,-10bp__)} + lswitch(,,K); {S:"\tt (,{,}K)" Below} move right_ - lswitch(,,KD); {"\tt (,,KD)" at (last [],S)} + lswitch(,,KD); {"\tt (,{,}KD)" at (last [],S)} move right_ - lswitch(,,KOD); {"\tt (,,KOD)" at (last [],S)} + lswitch(,,KOD); {"\tt (,{,}KOD)" at (last [],S)} move right_ - lswitch(,,KCD); {"\tt (,,KCD)" at (last [],S)} + lswitch(,,KCD); {"\tt (,{,}KCD)" at (last [],S)} move right_ bswitch; {"\tt `bswitch'" at (last [],S)} move right_ - bswitch(,,C); {"\tt (,,C)" at (last [],S)} + bswitch(,,C); {"\tt (,{,}C)" at (last [],S)} } # Row 3 move down; right_; { - D: dswitch(,,); {S: "\tt ds{}witch(,{},)" at last [].s+(0,-10bp__)} + D: dswitch(,,); {S: "\tt ds{}witch(,{},)" Below} thinlines_ { spline <- from 0.25 along_(D) up 0.1 then up 0.05 left 0.1 {"\tt W" rjust} @@ -41,7 +43,7 @@ movewid = 0.25 {"\tt B" rjust }} thicklines_ move right_ - D: dswitch(,,WdBK); {"\tt (,,WdBK)" at (last [],S)+(0,-4bp__)} + D: dswitch(,,WdBK); {"\tt (,{,}WdBK)" at (last [],S)+(0,-4bp__)} thinlines_ { spline <- from tr_xy(0,-2) up 0.1 then up 0.10 left 0.1 {"\tt dB" rjust} @@ -49,69 +51,81 @@ movewid = 0.25 {"\tt K" above }} thicklines_ move right_ - dswitch(,,WBmdDK); {"\tt (,,WBmdDK)" at (last [],S)} + dswitch(,,WBmdDK); {"\tt (,{,}WBmdDK)" at (last [],S)} move right_ - dswitch(,,WBKTr); {"\tt (,,WBKTr)" at (last [],S)} + dswitch(,,WBKTr); {"\tt (,{,}WBKTr)" at (last [],S)} move right_ - dswitch(,,WdBL); {"\tt (,,WdBL)" at (last [],S+(0,-4bp__))} + dswitch(,,WdBL); {"\tt (,{,}WdBL)" at (last [],S+(0,-4bp__))} move right_ - dswitch(,,WBCo); {"\tt (,,WBCo)" at (last [],S)} + dswitch(,,WBCo); {"\tt (,{,}WBCo)" at (last [],S)} } # Row 4 move down; right_; { - dswitch(,,WBKCo); {S: "\tt (,,WBKCo)" at last [].s+(0,-10bp__)} + dswitch(,,WBKCo); {S: "\tt (,{,}WBKCo)" Below} move right_ - dswitch(,,WBCb); {"\tt (,,WBCb)" at (last [],S)} + dswitch(,,WBCb); {"\tt (,{,}WBCb)" at (last [],S)} move right_ - dswitch(,,WBDI); {"\tt (,,WBDI)" at (last [],S)} + dswitch(,,WBDI); {"\tt (,{,}WBDI)" at (last [],S)} move right_ - dswitch(,,WBSd); {"\tt (,,WBSd)" at (last [],S)} + dswitch(,,WBSd); {"\tt (,{,}WBSd)" at (last [],S)} move right_ - dswitch(,,WBFDI); {"\tt (,,WBFDI)" at (last [],S)} + dswitch(,,WBFDI); {"\tt (,{,}WBFDI)" at (last [],S)} move right_ - dswitch(,,WBFSd); {"\tt (,,WBFSd)" at (last [],S)} + dswitch(,,WBFSd); {"\tt (,{,}WBFSd)" at (last [],S)} } # Row 5 move down moveht*5/4; right_; { - dswitch(,,WBTh); {S: "\tt (,,WBTh)" at last [].s+(0,-10bp__)} + dswitch(,,WBTh); {S: "\tt (,{,}WBTh)" Below} move right_ - dswitch(,,WBKC); {"\tt (,,WBKC)" at (last [],S)} + dswitch(,,WBKC); {"\tt (,{,}WBKC)" at (last [],S)} move right_ - dswitch(,,WBM); {"\tt (,,WBM)" at (last [],S)} + dswitch(,,WBM); {"\tt (,{,}WBM)" at (last [],S)} move right_ - dswitch(,,WBCO); {"\tt (,,WBCO)" at (last [],S)} + dswitch(,,WBCO); {"\tt (,{,}WBCO)" at (last [],S)} move right_ - dswitch(,,WBMP); {"\tt (,,WBMP)" at (last [],S)} + dswitch(,,WBMP); {"\tt (,{,}WBMP)" at (last [],S)} move right_ - dswitch(,,WBoKCP); {"\tt (,,WBoKCP)" at (last [],S)} + dswitch(,,WBoKCP); {"\tt (,{,}WBoKCP)" at (last [],S)} } # Row 6 move down moveht*5/4; right_; { - dswitch(,,WBCY); {S: "\tt (,,WBCY)" at last [].s+(0,-10bp__)} + dswitch(,,WBCY); {S: "\tt (,{,}WBCY)" Below} move right_ - dswitch(,,WBCZ); {"\tt (,,WBCZ)" at (last [],S)} + dswitch(,,WBCZ); {"\tt (,{,}WBCZ)" at (last [],S)} move right_ - dswitch(,,WBCE); {"\tt (,,WBCE)" at (last [],S)} + dswitch(,,WBCE); {"\tt (,{,}WBCE)" at (last [],S)} move right_ - dswitch(,,WBRH); {"\tt (,,WBRH)" at (last [],S)} + dswitch(,,WBRH); {"\tt (,{,}WBRH)" at (last [],S)} move right_ - dswitch(,,WBRdH); {"\tt (,,WBRdH)" at (last [],S)} + dswitch(,,WBRdH); {"\tt (,{,}WBRdH)" at (last [],S)} move right_ - dswitch(,,WBRHH); {"\tt (,,WBRHH)" at (last [],S)} + dswitch(,,WBRHH); {"\tt (,{,}WBRHH)" at (last [],S)} } # Row 7 + move down moveht; right_; { + move down_ 2bp__; right_ + dswitch(,,WBPr); {S: "\tt (,{,}WBPr)" Below} + move right_ + dswitch(,,WBPrT); {S: "\tt (,{,}WBPrT)" Below} +# move right_ +# Proxim; {S: "\tt Pro{}xim" Below} +# move right_ +# Magn; {S: "\tt Mag{}n" Below} + move down_ 6bp__ then right_ + dswitch(,,WBPrM); {S: "\tt (,{,}WBPrM)" Below} + } +# Row 8 move down; right_; { - dswitch(,,WBMMR); {S: "\tt (,,WBMMR)" at last [].s+(0,-10bp__)} + dswitch(,,WBMMR); {S: "\tt (,{,}WBMMR)" Below} move right_ - dswitch(,,WBMM); {"\tt (,,WBMM)" at (last [],S)} + dswitch(,,WBMM); {"\tt (,{,}WBMM)" at (last [],S)} move right_ - dswitch(,,WBMR); {"\tt (,,WBMR)" at (last [],S)} + dswitch(,,WBMR); {"\tt (,{,}WBMR)" at (last [],S)} move right_ - dswitch(,,WBEL); {"\tt (,,WBEL)" at (last [],S)} + dswitch(,,WBEL); {"\tt (,{,}WBEL)" at (last [],S)} move right_ - dswitch(,,WBLE); {"\tt (,,WBLE)" at (last [],S)} + dswitch(,,WBLE); {"\tt (,{,}WBLE)" at (last [],S)} move right_ - dswitch(,,WBoKEL); {"\tt (,,WBoKEL)" at (last [],S)} + dswitch(,,WBoKEL); {"\tt (,{,}WBoKEL)" at (last [],S)} } - .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Tubediags.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Tubediags.m4 index e07336e4e36..b49f0ffa8ed 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Tubediags.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Tubediags.m4 @@ -4,7 +4,7 @@ cct_init include(tubedefs.m4) -iflatex(`command "{\sf"') +iflatex(`latexcommand({\sf)') Overall:[ @@ -366,5 +366,5 @@ PO: dot #showbox_ #print last [].wid,last [].ht -iflatex(command "}") +iflatex(latexcommand(})) .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Variable.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Variable.m4 index 6fac01e1648..e52e30913d1 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Variable.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Variable.m4 @@ -3,11 +3,11 @@ cct_init define(`elen_',dimen_); down_ -[ { variable(`capacitor') }; move right - { variable(`resistor',uN) }; move right - { variable(`capacitor(,C)') }; move right - { variable(`inductor') }; move right - { variable(`inductor(,W)') } +[ { variable(`resistor',A) }; {"A" at last line.end below}; move right + { variable(`resistor',N) }; {"N" at last line.end below}; move right + { variable(`resistor',uN) }; {"uN" at last line.end below}; move right + { variable(`resistor',NN) }; {"uN" at last line.end below}; move right + { variable(`resistor',uNN) }; {"uNN" at last line.end below}; #; move right ] [ skp = 0.4 diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/debug2.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/debug2.m4 index eccd9d38bbc..6b6edf77ba2 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/debug2.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/debug2.m4 @@ -20,9 +20,9 @@ % If boxdims.sty is not found, then either it has not been copied to % where latex can find it or the latex filename database has not been % updated correctly. Instructions for the latter depend on the operating -% system and may invlove commands texhash, mktexlsr, tlmgr, possibly preceded -% by sudo, or (for MiKTeX) clicking on the Refresh FNDB button. See steps 3 -% and 4 (ignore 1 and 2) at +% system and may involve commands texhash, mktexlsr, tlmgr, possibly preceded +% by sudo, or (for MiKTeX) clicking on the Refresh FNDB button. +% See Manual Installation, steps 3 and 4 (ignore 1 and 2) at % https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages % % On my Ubuntu machine, boxdims.sty is in diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf Binary files differindex 2f31b4f0309..d59436e0a36 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.tex index 0e483fa0944..e2f90fc5857 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.tex @@ -28,20 +28,17 @@ Most of the examples can be processed using either dpic~-p, dpic~-g, or gpic~-t, but the possibility of other postprocessing has meant that sometimes the source is slightly more complicated than it would be if - only one workflow had been assumed. The most simplicity and elegance - is achieved by sticking to one pic interpreter and one postprocessor. + only one workflow had been assumed. Some of the examples require dpic. + The most simplicity and elegance is achieved by sticking to one pic + interpreter and one postprocessor. - A few of these examples are also found in the manual - Circuit\_macros.pdf. There are other examples in the examples directory - that are not included in this document. To process {\sl file}.m4, type, for - example, "make {\sl file}.pdf." + This document duplicates a few diagrams from the manual + Circuit\_macros.pdf. There are also a few files in the + examples directory that are not included in this document. To process + {\sl file}.m4, type, for example, "make {\sl file}.pdf." -% The tables of elements attempt to illustrate each macro option -% at least once but the number of option combinations is huge so these -% examples are not exhaustive. - - A few of the examples following the circuits test some of the boundaries - of what macros and the pic language can do. +% Some of the boundaries of what macros and the pic language can do are +% tested toward the end of the following examples. \input files \endinput 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 3f14c21bdb3..334c7657f6d 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex @@ -140,6 +140,12 @@ } \bfig{ + \centerline{\getpic{Connectors}} + \caption{Some connectors with simple geometry and lists of labels + \src{Connectors.m4}.} + } + +\bfig{ \centerline{\getpic{fet}} \caption{FETs, showing programmable components and example customizations \src{fet.m4}.} @@ -247,7 +253,7 @@ \bfig{ \centerline{\getpic{MC}} - \caption{A three-phase switched AC-AC converter + \caption{A three-phase switched AC-AC converter and a DC-DC converter \src{MC.m4}.} } @@ -666,6 +672,7 @@ \src{Btree.m4}.} } +\ifmpost\else% Tex capacity exceeded at this point under metapost \bfig{ \centerline{\getpic{Ttree}} \caption{Another tree @@ -710,5 +717,6 @@ \src{Inclpdf.m4}.} } \fi\fi\fi\fi\fi +\fi % ifmpost \end{document} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ics.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ics.m4 index 023b0d2a568..15e0f05bb8e 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/ics.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/ics.m4 @@ -1,26 +1,26 @@ divert(-1) - Macros defining some integrated circuits + Macros defining some integrated circuits and connectors -define(`lg_pinsep',3*L_unit) logic pin separation in logic units -define(`lg_chipwd',18*L_unit) default chip width - - `Chip outline sizes' -define(`chip_gen',` box invis wid lg_chipwd ht lg_pinsep*eval(`$1'/2+1) - arcd(last box.n, lg_pinsep/2, 180, 360) - { line to last box.ne chop -linewid bp__/2 } - { line from last arc.start to last box.nw chop -linewid bp__/2 } - line from last box.nw to last box.sw then to last box.se then to last box.ne - ') + `DIP_chip_outline( pin count, wid )' +define(`DIP_chip_outline', + `[ define(`m4chgw',`ifelse(`$2',,(18*L_unit),`$2')')dnl + Chip: box invis wid m4chgw ht lg_pinsep*eval((`$1')/2+1) + arcd(last box.n, lg_pinsep/2, 180, 360) + { line to last box.ne chop -linewid bp__/2 } + { line from last arc.start to last box.nw chop -linewid bp__/2 } + line from last box.nw to last box.sw then to last box.se then to last box.ne + `$3']') `A sequence of pins along the east or west side of a chip: - lg_pinseq(initial pin no,final pin no, - e|w,initial offset,pinnum_root,Labelroot,[not])' -lg_pinseq(1,8,w) + lg_pinseq(initial pin no, final pin no, + e|w, initial offset, pinnum_root, Labelroot, [N])' + `e.g., lg_pinseq(1,8,w)' define(`lg_pinseq',`for_($1,$2,1, - `lg_pin( Chip.s`$3'+(0,eval($4+m4x)*lg_pinsep), + `lg_pin( Chip.s`$3'+(0,($4+m4x)*lg_pinsep), $6`'m4x,Pin`'eval($5`'m4x),`$3'`$7',eval($5`'m4x))') ') + define(`ic6116',`[ Chip: box wid_ lg_chipwd ht_ 15*lg_pinsep lg_pin(Chip.sw_+(0,lg_pinsep),GND,Pin12,w,12) lg_pin(Chip.sw_+(0,2*lg_pinsep),lg_bartxt(CS),Pin18,wN,18) @@ -113,4 +113,163 @@ define(`icVS1053',`[ Chip: chip_gen(32) SDCD,RX,TX,7,6,5,4,3,2,1,0,GND,3V3,AGND,MIC-,MIC+) `$1']') + `ArduinoUno( wid,ht,pinlen )' +define(`ArduinoUno',`[ + define(`m4bwid',`ifelse(`$1',,`24*L_unit',`$1')')dnl + define(`m4bht',`ifelse(`$2',,`20*lg_pinsep',`$2')')dnl +# + command "{\small\sf" + Connector: box wid m4bwid ht m4bht +# + plen = ifelse(`$4',,`2*L_unit',`$4') +# +Loopover_(`x',`ifelse(x,nul,, + `Pin`'eval(5+m4Lx): line left_ plen from Connector.nw-(0,(5+m4Lx)*lg_pinsep) + { "x" ljust at last line.start }')', + IOREF, RESET,`$+$`'3V3',`$+$`'5V', GND, GND, VIN, + nul, A0, A1, A2, A3, A4, A5) +# +Loopover_(`x',`ifelse(x,nul,, + `Pin`'eval(22-m4Lx): line right_ plen from Connector.ne-(0,m4Lx*lg_pinsep) + { "x" rjust at last line.start }')', + SCL, SDA, AREF, GND, D13, D12, \char126 D11, \char126 D10, \char126 D9, D8, + nul, D7, \char126 D6, \char126 D5, D4, \char126 D3, D2, TX D1, RX D0) +# + command "}" + `$4'] ') + + `ArduinoLeonardo( wid,ht,pinlen )' +define(`ArduinoLeonardo',`[ + define(`m4bwid',`ifelse(`$1',,`24*L_unit',`$1')')dnl + define(`m4bht',`ifelse(`$2',,`20*lg_pinsep',`$2')')dnl +# + command "{\small\sf" + Connector: box wid m4bwid ht m4bht +# + plen = ifelse(`$4',,`2*L_unit',`$4') +# +Loopover_(`x',`ifelse(x,nul,, + `Pin`'eval(5+m4Lx): line left_ plen from Connector.nw-(0,(5+m4Lx)*lg_pinsep) + { "x" ljust at last line.start }')', + IOREF, RESET,`$+$`'3V3',`$+$`'5V', GND, GND, VIN, + nul, A0, A1, A2, A3, A4, A5) +# +Loopover_(`x',`ifelse(x,nul,, + `Pin`'eval(22-m4Lx): line right_ plen from Connector.ne-(0,m4Lx*lg_pinsep) + { "x" rjust at last line.start }')', + SCL, SDA, AREF, GND, + \char126 D13, D12, \char126 D11, \char126 D10, \char126 D9, D8, + nul, D7, \char126 D6, \char126 D5, D4, \char126 D3, D2, TX D1, RX D0) +# + command "}" + `$4'] ') + + `RPi( wid,ht,pinlen )' +define(`RPi',`[ + define(`m4bwid',`ifelse(`$1',,`34*L_unit',`$1')')dnl + define(`m4bht',`ifelse(`$2',,`21*lg_pinsep',`$2')')dnl +# + command "{\small\sf" + GPIO: box wid m4bwid ht m4bht + plen = ifelse(`$4',,`6*L_unit',`$4') +# +define A_LeftGPIO { + exec sprintf("Pin%g: line left_ plen from GPIO.nw-(0,%g)",\ + 2*(`$'1)-1,(`$'1)*lg_pinsep) + { "`$'3" ljust at last line.start } + "`$'2" at last line.c above } +# +Loopover_(`x',`ifelse(x,nul,,`A_LeftGPIO(m4Lx,patsubst(x,;,`,'))')', + ;3V3, + 2;SDA1, 3;SCL1, 4;GPIO\_GCLK, + ;GND, + 17;GPIO\_GEN0, 27;GPIO\_GEN2, 22;GPIO\_GEN3, + ;3V3, + 10;SPI\_MOSI, 9;SPI\_MISO, 11;SPI\_SCLK, + ;GND, + ;ID\_SD, + 5;, 6;, 13;, 19;, 26;, + ;GND ) +# +define A_RightGPIO { + exec sprintf("Pin%g: line right_ plen from GPIO.ne-(0,%g)",\ + 2*(`$'1),(`$'1)*lg_pinsep) + { "`$'3" rjust at last line.start } + "`$'2" at last line.c above } +# +Loopover_(`x',`ifelse(x,nul,,`A_RightGPIO(m4Lx,patsubst(x,;,`,'))')', + ;5V, + ;5V, + ;GND, + 14;TXD0, 15;RXD0, 18;GPIO\_GEN1, + ;GND, + 23;GPIO\_GEN4, 24;GPIO\_GEN5, + ;GND, + 25;GPIO\_GEN6, 8;SPI\_CEO\_N, 7;SPI\_CE1\_N, + ;ID\_SC, + ;GND, + 12;, + ;GND, + 16;, 20;, 21; ) +# + command "}" + `$4'] ') + + `USB_C_Socket( wid, ht, pinlen )' +define(`USB_C_Socket',`[ + define(`m4bwid',`ifelse(`$1',,`18*L_unit',`$1')')dnl + define(`m4bht',`ifelse(`$2',,`14*lg_pinsep',`$2')')dnl + command "{\small\sf" +# + Base: box wid m4bwid ht m4bht rad 5/3*lg_pinsep + plen = ifelse(`$4',,`6*L_unit',`$4') +# + Loopover_(`x', + `B`'eval(13-m4Lx): dnl + line left_ plen from Base.n-(m4bwid/2,(m4Lx+0.5)*lg_pinsep) + {"x" ljust at last line.start}', + GND, RX1$+$, RX1$-$, VBUS, SBU2, D$-$, D$+$, CC2, VBUS, TX2$-$, TX2$+$, GND) +# + Loopover_(`x', + `A`'m4Lx: line right_ plen from Base.n+(m4bwid/2,-(m4Lx+0.5)*lg_pinsep) + {"x" rjust at last line.start}', + GND, TX1$+$, TX1$-$, VBUS, CC1, D$+$, D$-$, SBU1, VBUS, RX2$-$, RX2$+$, GND) +# + command "}" + `$4']') + + `HDMI_micro( wid, ht, pinlen )' +define(`HDMI_micro',`[ + define(`m4bwid',`ifelse(`$1',,`16*L_unit',`$1')')dnl + define(`m4bht',`ifelse(`$2',,`20*lg_pinsep+m4bwid*2/3',`$2')')dnl + command "{\small\sf" +# + Base:[line up m4bht/2 then right m4bwid*2/3 \ + then right m4bwid/3 down m4bwid/3 \ + then down m4bht-2*m4bwid/3 then down m4bwid/3 left m4bwid/3 \ + then left m4bwid*2/3 then to Here] + plen = ifelse(`$4',,`6*L_unit',`$4') +# + Loopover_(`x', + `Pin`'m4Lx: line left_ plen from Base.nw-(0,m4bwid/3+m4Lx*lg_pinsep) + {"x" ljust at last line.start} + "m4Lx" at last line.c above', + HPD, UTILITY, D2$+$, D2\_SH, D2$-$, D1$+$, D1\_SH, D1$-$, D0$+$, D0\_SH, + D0$-$, CLK$+$, CLK\_SH, CLK$-$, CEC, GND, SCL, SDA, $+``$''5V) + line from Base.nw+(m4bwid*2/3-lg_pinsep,0) up plen + r_text(21) at last line.c+(-5bp__,0) + r_text(SH2) at last line.start + (0,-10bp__) + line from Base.nw+(m4bwid*2/3-2*lg_pinsep,0) up plen + r_text(20) at last line.c+(-5bp__,0) + r_text(SH1) at last line.start + (0,-10bp__) + line from Base.sw+(m4bwid*2/3-lg_pinsep,0) down plen + r_text(23) at last line.c+(-5bp__,0) + r_text(SH4) at last line.start + (0, 10bp__) + line from Base.sw+(m4bwid*2/3-2*lg_pinsep,0) down plen + r_text(22) at last line.c+(-5bp__,0) + r_text(SH3) at last line.start + (0, 10bp__) +# + command "}" + `$4']') + divert(0)dnl 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 789ec556e10..7134b617a09 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 2020/02/16 at 21:34 +% from TeX source "font" on 2020/05/01 at 17:17 numeric mfpicversion; mfpicversion := 110; if unknown mode: mode := localfont; fi if unknown mag: mag := 1000/1000; fi @@ -135,15 +135,15 @@ resizedrawpen (0.4bp); store (curpath) drawn -circle ((0.3084,-0),0.002767); +circle ((0.3084,0),0.002767); resizedrawpen (0.8bp); store (curpath) drawn polyline (false) -((0.3084,-0), -(0.333333,-0)); +((0.3084,0), +(0.333333,0)); endmfpic; % (3) line 59 in the TeX source. %------------------------------------------ @@ -217,15 +217,15 @@ resizedrawpen (0.4bp); store (curpath) drawn -circle ((-0,-0.3084),0.002767); +circle ((0,-0.3084),0.002767); resizedrawpen (0.8bp); store (curpath) drawn polyline (false) -((-0,-0.3084), -(-0,-0.333333)); +((0,-0.3084), +(0,-0.333333)); endmfpic; % (4) line 77 in the TeX source. %------------------------------------------ @@ -3121,7 +3121,7 @@ polyline (false) store (curpath) drawn -arcplr ((0,0.1375),180,-0,0.175); +arcplr ((0,0.1375),-180,-360,0.175); store (curpath) drawn @@ -4687,7 +4687,7 @@ polyline (false) store (curpath) drawn -arcplr ((0,-0.2),-0,-180,0.15); +arcplr ((0,-0.2),0,-180,0.15); endmfpic; % (103) line 1561 in the TeX source. %------------------------------------------ @@ -4739,7 +4739,7 @@ polyline (false) store (curpath) drawn -arcplr ((0,0.2),180,0,0.15); +arcplr ((0,0.2),-180,-360,0.15); endmfpic; % (105) line 1581 in the TeX source. %------------------------------------------ @@ -5035,7 +5035,7 @@ polyline (false) store (curpath) drawn -arcplr ((0,-0.2),-0,-180,0.15); +arcplr ((0,-0.2),0,-180,0.15); store (curpath) drawn @@ -5095,7 +5095,7 @@ polyline (false) store (curpath) drawn -arcplr ((0,0.2),180,0,0.15); +arcplr ((0,0.2),-180,-360,0.15); 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 3373e88305f..2b8099c34d9 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/Makefile +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/Makefile @@ -22,6 +22,7 @@ DOC = examplesmpost FIGS = Adder.1 Alogix.1 ABlogix.1 Antennas.1 AmpTable.1 Audio.1 \ AntiqueClock.1 \ Bip.1 Btree.1 Byte.1 Buttons.1 \ + Connectors.1 Contact.1 Contacts.1 \ Counting.1 Crossbar.1 Crow.1 Csource.1 CanLogic.1 CctTable.1 Conn.1 \ Decoder.1 Demultiplexer.1 Dini.1 Diodes.1 Drive.1 \ Emarrows.1 Flow.1 Fuses.1 \ @@ -71,7 +72,7 @@ DIMFILE = tmp.dim @(printf 'verbatimtex\n' ;\ printf '=documentclass[11pt]{article}\n' ;\ printf '=usepackage{times,boxdims,graphicx}\n' ;\ - printf '=usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits}\n' ;\ + printf '=usepackage{siunitx}\n' ;\ $(MKDIM) ;\ printf '=begin{document} etex\n' ) $(TR) > $*.mp # $(M4) $(DIMFILE) $(DOC).dim $*.m4 | $(DPIC) -s >> $*.mp diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/README-mpost b/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/README-mpost index 8ac5ba426f3..53d0263f278 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/README-mpost +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/README-mpost @@ -7,6 +7,8 @@ output of dpic. passed through m4, dpic, and MetaPost, and then is imported into examplesmpost.tex by the \includegraphics macro. On MikTeX, check the MKDIM definition in the Makefile before typing "make". + The current version truncates the input near the end to avoid + a "Tex capacity exceeded error". 2. To work on a single file, copy the source into test.m4 in this directory and type make tst. The files test.pic, test.mp, test.1, tst.dvi, and tst.ps diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/examplesmpost.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/examplesmpost.tex index 280a985c49e..45baa6b3254 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/examplesmpost.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/examplesmpost.tex @@ -4,7 +4,7 @@ \usepackage{times,boxdims,pstricks} \usepackage{rotating} \usepackage{graphicx} -\usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits} +\usepackage{siunitx} \input ../header diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/mptest b/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/mptest index 29f6d5841ae..cfc94b6bc01 100755 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/mptest +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/mptest @@ -18,7 +18,7 @@ m4 $LIBS $1.m4 > $1.pic ( echo 'verbatimtex =documentclass[11pt]{article} =usepackage{times,boxdims}=usepackage{graphicx} -=usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits} +=usepackage{siunitx} =begin{document} etex ') | tr '=' '\134' > $1.mp diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/tstmpost.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/tstmpost.tex index a791b3d9dd8..a64a66241fc 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/tstmpost.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/tstmpost.tex @@ -1,7 +1,7 @@ \documentclass[11pt,dvips]{article} \usepackage[dvips]{graphicx} \usepackage{amssymb,pstricks,boxdims,pst-grad} -\usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits} +\usepackage{siunitx} \addtolength{\textwidth}{2cm} \addtolength{\textheight}{3cm} \setlength{\oddsidemargin}{0pt} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/odistmakefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/odistmakefile deleted file mode 100644 index f6e26d9d37b..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/odistmakefile +++ /dev/null @@ -1,548 +0,0 @@ -# Examples distmakefile. -# -# CTAN dist files: make -f distmakefile dist zips -# The CTAN file is tmp/Circuit_macros/Circuit_macrosN.N.tar.gz -# or -# make -f distmakefile distece -# The ECE file is ~/tmp/CMdistfiles.tar.gz -# Change the version number in doc/Version.tex - -# Circuit_macro directory, change this if necessary: -LIBDIR = $$HOME/lib -LIBDIR=/cygdrive/D/Dwight/lib -# LIBDIR = .. - -# The dpic processor: -PIC = dpic -p - -CONFIGFILE = pstricks.m4 - -# Uncomment for gpic. Use gpic or pic as applicable on your machine: -# PIC = gpic -t -# PIC = pic -t -# CONFIGFILE = gpic.m4 - -######################################################################### - -# M4 = m4 -B32000 -# M4 = m4 -I $(LIBDIR) -# Environment variable M4PATH has been set to the installation directory: -M4 = m4 - -######################################################################### - -THISFILE = distmakefile - -DOC = examples -PICS = \ - Adder.tex Alogix.tex ABlogix.tex AmpTable.tex Antennas.tex Audio.tex \ - Bip.tex Btree.tex Byte.tex Buttons.tex \ - CanLogic.tex CctTable.tex Conn.tex Counting.tex Crossbar.tex Crow.tex \ - Csource.tex \ - Decoder.tex Demultiplexer.tex Dini.tex Diodes.tex Drive.tex \ - Emarrows.tex Flow.tex Fuses.tex Grounds.tex \ - Headers.tex Heathkit.tex \ - I2L.tex Incleps.tex Jack.tex \ - Logic.tex Loglog.tex MC.tex Mixer.tex MotorControl.tex Multiplexer.tex \ - NLG.tex NPDT.tex Nport.tex \ - Opamp.tex Optoiso.tex \ - Pconn.tex PushPull.tex Quantum.tex \ - Rectifiers.tex Relay.tex Rotbox.tex \ - Schottky.tex ShiftR.tex Sierpinski.tex Sixpole.tex Sources.tex SQUID.tex \ - Switches.tex \ - TTLnand.tex Tgate.tex Three.tex Timer.tex Ttree.tex Tubediags.tex \ - Variable.tex Windings.tex Xform.tex \ - control.tex csc.tex diamond.tex \ - ex00.tex ex01.tex ex02.tex ex03.tex ex04.tex ex05.tex ex06.tex \ - ex08.tex ex09.tex ex10.tex ex11.tex ex12.tex ex15.tex \ - ex16.tex ex17.tex ex18.tex ex21.tex exp.tex fet.tex \ - graysurf.tex lcct.tex pwrsupply.tex quick.tex recycle.tex rose.tex \ - sfg.tex shapes.tex thyristor.tex ujt.tex worm.tex XOR.tex - -PICS = `make -f Makefile echopics` - -MANFIGS = AmpTable Antennas Audio Bip CctTable Conn Contact Contacts \ - Demultiplexer Diodes \ - Emarrows Fuses Grounds Headers Jack Logic Multiplexer NLG NPDT Nport Opamp \ - Pconn Relay ShiftR Sources Switches Tgate Variable Windings Xform fet quick \ - thyristor ujt - -# Files that have to be processed twice: -BOXDIMS = ex09 Crow Incleps Loglog Opamp Windings - -M4LIBS = $(CONFIGFILE) - -# Convert options -EPSOPTS = -trim -TIFOPTS = -trim -SVGOPTS = -trim -GIFOPTS = -trim -PNGOPTS = -trim -density 400 -scale 25% -quality 92 -alpha Remove - -DVIPSOPTS = -Ppdf -G0 -t ledger - -DIMFILE = $(DOC).dim -LTX = latex --shell-escape --quiet -BS = tr '|' '\134' - -.SUFFIXES: .ps .dvi .tex .m4 .pic .eps .png .pdf .svg .tif .gif -.dvi.ps: - dvips $(DVIPSOPTS) $* -o $*.ps - chmod 644 $*.ps -.m4.tex: - @if test -n "$(DIMFILE)" ; then touch $(DIMFILE) ; fi ; touch F_$*.dim - $(M4) $(M4LIBS) $(DIMFILE) F_$*.dim $*.m4 | sed -e '/^ *$$/d' > $*.pic - $(PIC) $*.pic > $*.tex -.m4.pic: - @if test -n "$(DIMFILE)" ; then touch $(DIMFILE) ; fi - $(M4) $(M4LIBS) $(DIMFILE) $*.m4 > $*.pic -.m4.dvi: - make -f $(THISFILE) $*.tex - printf "|documentclass[11pt]{article}\n\ -|usepackage{times,pstricks,boxdims,graphicx,pst-grad,pst-slpe}\n\ -|usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits}\n\ -|setlength{|textwidth}{28cm}|addtolength{|textheight}{28cm}\n\ -|setlength{|oddsidemargin}{0pt}|setlength{|evensidemargin}{0pt}\n\ -|setlength{|hoffset}{-1cm}\n\ -|newbox|graph\n\ -|pagestyle{empty}|thispagestyle{empty}\n\ -|begin{document}\n\ -|noindent|input{"$*".tex}\n\ -|end{document}\n" | $(BS) > F_$*.tex - latex --quiet F_$* - touch F_$*.dim $(DIMFILE) ; rm -f $*.tex $*.pic ; make -f $(THISFILE) $*.tex - latex --quiet F_$* - touch F_$*.dim $(DIMFILE) ; rm -f $*.tex $*.pic ; make -f $(THISFILE) $*.tex - latex --quiet F_$* -.m4.eps: - make -f $(THISFILE) $*.dvi - dvips -Ppdf 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' -e '/%%HiResBoundingBox/d' \ - $*.epsi | tr '\015' '\012' ; sed -e '1,/EndPreview/d' $*.epsi ) | awk \ - '/^%%BoundingBox/{print $$1" "$$2" "$$3" "$$4+10" "$$5+15; next}; {print}' \ - >$*.eps -.m4.ps: - make -f $(THISFILE) $*.tex && mv $*.tex test.tex; latex --quiet tst - rm -f test.tex $*.pic - if test -f tst.dim ; then cp tst.dim F_$*.dim ; fi - make -f $(THISFILE) $*.tex && mv $*.tex test.tex; latex --quiet tst - dvips $(DVIPSOPTS) tst -o $*.ps - chmod 644 $*.ps -.m4.svg: - make -f $(THISFILE) $*.ps - convert $(SVGOPTS) $*.ps $*.svg -.m4.png: - make -f $(THISFILE) $*.ps -# make -f $(THISFILE) $*.eps -# convert $(PNGOPTS) $*.eps $*.png - convert $(PNGOPTS) $*.ps $*.png - @if test -f $*.png.0 ; then mv $*.png.0 $*.png ; fi -.m4.gif: - make -f $(THISFILE) $*.ps - convert $(GIFOPTS) $*.ps $*.gif -.m4.tif: - make -f $(THISFILE) $*.ps - convert $(TIFOPTS) $*.ps $*.tif - @if test -f $*.tif.0 ; then mv $*.tif.0 $*.tif ; fi -.m4.pdf: - touch F_$*.dim - $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic - dpic -g $*.pic > test.tex - sed -e '/^\\usepackage.*graphicx/s/^.*$$/\\usepackage{tikz}/' \ - -e '/pstricks/d' tst.tex > F_$*.tex - pdflatex --quiet F_$* - $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic - dpic -g $*.pic > test.tex - pdflatex --quiet F_$* - mv F_$*.pdf $*.pdf - -######################################################################### -default: - @printf "\n === making default\n" - @printf "\n\n\nUSAGE: make -f $(THISFILE) distece\n\n\n" - -$(DOC).ps: $(DOC).dvi - -doclinks: - @printf "\n === making doclinks\n" - -for nm in $(MANFIGS) ; do cp $(LIBDIR)/doc/$$nm.m4 . ; done - touch doclinks - -$(DOC).dvi: $(DOC).frs - @printf "\n === making $(DOC).dvi\n" - touch $(DOC).dim - for file in $(BOXDIMS) ; do \ - rm -f $$file.tex $$file.pic ; \ - make -f $(THISFILE) PIC="$(PIC)" DIMFILE=$(DOC).dim $${file}.tex ; done - latex --quiet $(DOC) - for file in $(BOXDIMS) ; do \ - rm -f $$file.tex $$file.pic ; \ - make -f $(THISFILE) PIC="$(PIC)" DIMFILE=$(DOC).dim $${file}.tex ; done - latex --quiet $(DOC) - -$(DOC).frs: $(DOC).tex files.tex header.tex - @printf "\n === making $(DOC).frs\n" - printf "|usepackage{pstricks,pst-grad}\n" | $(BS) > mode.tex - make -f $(THISFILE) $(PICS) - cp $(LIBDIR)/doc/Version.tex . - latex --quiet $(DOC) - touch $(DOC).frs - rm -f $(DOC).dvi - -tst: - make -f $(THISFILE) test.tex; latex --quiet tst; rm -f test.tex test.pic - make -f $(THISFILE) DIMFILE=tst.dim test.tex; latex --quiet tst - dvips $(DVIPSOPTS) tst -o tst.ps - -tst1: test.tex tst.tex - latex --quiet tst - dvips $(DVIPSOPTS) tst -o tst.ps - -gtst: - touch test.m4; make -f $(THISFILE) PIC="gpic -t" CONFIGFILE="" tst - -gtst1: - touch test.m4; make -f $(THISFILE) PIC="gpic -t" CONFIGFILE="" tst1 - -# Distribution files -NAME=Circuit_macros -TMP=/tmp - -# Makes test.m4, examples.pdf, Circuit_macros.pdf, -# Copying, examples/mf/cct.tfm examples/xfig -dist: - @printf "\n === making lib/examples/dist\n" - (cd .. ; make clobber ) - touch test.m4; cp test.m4 $(TMP)/test`date +%Y.%m.%d.%H:%M:%S` - find . -name test.m4 -exec rm -f {} \; - make -f $(THISFILE) test.m4 - (cd $(LIBDIR)/doc; make ) - make -f Makefile examples.pdf - ( cd $(LIBDIR); mv doc/Circuit_macros.pdf . ; \ - mv examples/examples.pdf . ; \ - make clobber; chmod 644 Circuit_macros.pdf examples.pdf; \ - cp -p Circuit_macros.pdf examples.pdf $(TMP) ; \ - mv Circuit_macros.pdf doc; mv examples.pdf examples ) -# touch reducedfiles -# make -f $(THISFILE) reducedfiles -# while test -f reducedfiles ; do sleep 1; done - make -f $(THISFILE) Copying - @printf "\n === making lib/examples/mf/cct.tfm\n" - (cd mf; make; chmod 644 cct.tfm; make clean) - @printf "\n === making lib/examples/xfig\n" - (cd xfig; make; make clean) - (cd $(LIBDIR)/doc; make clean ) - -dir=`pwd` ; if [ "`basename $$dir`" = "examples" ] ; then \ - rm -f $(LIBDIR)/examples.tar.gz ; fi - -EXCHANGE="`find C:/Program*\\(x86\\)/Adobe -name Acrobat.exe -print`" - -reducedfiles: - @printf "\n === making reducedfiles\n" - -( cd $(LIBDIR)/doc ; \ - printf "\n\n save Circuit_macros.pdf as reduced size pdf\n\n" ; \ - pwd | sed -e 's%/cygdrive/\(.\)%\1:%' -e 's%/%\\\\%g' \ - -e 's%^%$(EXCHANGE) %' -e 's%$$%\\\\Circuit_macros.pdf%' | sh ) && \ - ( printf "\n\n save examples.pdf as reduced size pdf\n\n" ; \ - pwd | sed -e 's%/cygdrive/\(.\)%\1:%' -e 's%/%\\\\%g' \ - -e 's%^%$(EXCHANGE) %' -e 's%$$%/examples.pdf%' | sh ) && \ - -$(TMP)/$(NAME): - if test -d $(TMP)/$(NAME); then rm -rf $(TMP)/$(NAME); \ - mkdir -p $(TMP)/$(NAME) ; fi - -COPIED = boxdims.sty CHANGES Copying darrow.m4 doc examples gpic.m4 \ - lib3D.m4 libcct.m4 libgen.m4 liblog.m4 Licence.txt \ - Makefile mfpic.m4 mpost.m4 pgf.m4 postscript.m4 psfrag.m4 pstricks.m4 \ - README svg.m4 xfig.m4 dpictools.pic - -REMOVED = examples/test examples/dev examples/pdflatex examples/xfig/info \ - examples/htmlsource examples/html examples/dist examples/zips \ - examples/SCP examples/distmakefile examples/boxdims \ - m4s \ - doc/expl-m4.pdf - -zipdir: $(TMP)/$(NAME) - @printf "\n === making lib/examples/zips\n" - Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ - PCVersion=`echo $$Version | sed -e 's/\./_/g'` ; \ - rm -rf $(TMP)/$(NAME)$$Version ; mkdir $(TMP)/$(NAME)$$Version; \ - (cd $(LIBDIR); cp -r $(COPIED) $(TMP)/$(NAME)$$Version ); \ - (cd $(TMP)/$(NAME)$$Version ; rm -rf $(REMOVED) ) ; \ - (cd $(TMP)/$(NAME)$$Version ; find . -type f -exec chmod 644 {} \; ) ; \ - (cd $(TMP)/$(NAME)$$Version ; find . -type f -empty -exec rm {} \; ) ; \ - (cd $(TMP)/$(NAME)$$Version ; find . -type d -exec chmod 755 {} \; ) ; \ - (cd $(TMP)/$(NAME)$$Version ; chmod +x examples/mf/mftest ) ; \ - (cd $(TMP)/$(NAME)$$Version ; chmod +x examples/mpost/mptest ) ; \ - (cd $(LIBDIR)/doc; make clobber ) - touch zipdir - -zips: zipdir - Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ - ( cd $(TMP); \ - tar cf - $(NAME)$$Version | gzip > $(NAME)$$Version.tar.gz ; \ - (cd $(NAME)$$Version; zip -r $(NAME) * ) ; \ - mv $(NAME)$$Version/$(NAME).zip $(NAME)$$PCVersion.zip ; \ - printf "\n$(TMP)/$(NAME)$$Version and\n" ; \ - printf "$(TMP)/$(NAME)$$Version.tar.gz created\n"; \ - printf "\n$(TMP)/$(NAME)$$PCVersion.zip created\n" ) -# touch zips - -test.m4: - @printf "\n === making test.m4\n" - printf \ -".PS\n\ -# Test.m4\n\ -cct_init\n\ -# Use this file to do a quick test of diagrams you are developing.\n\ -# Enter the drawing commands here and (if you have a \"make\" utility) type\n\ -# make tst\n\ -# Otherwise, to process a file called filename.m4, type one of\n\ -# make filename.ps\n\ -# make filename.eps\n\ -# make filename.pdf\n\ -# make filename.gif (requires ImageMagick convert)\n\ -# make filename.png (requires ImageMagick convert)\n\ -# make filename.tif (requires ImageMagick convert)\n\ -# To perform tests in a new folder, copy the Makefile, this file,\n\ -# and tst.tex (or your own equivalent) to that folder.\n\ -.PE\n" > test.m4 - -# For the git repository -GITDIR=$${HOME}/dpic/git/Circuit_macros -gitsync: dist zipdir - cd $(GITDIR) && rsync -a -v $(TMP)/Cir*[0-9]/* . - cp -p htmlsource/.gitignore $(GITDIR) - -distfile: - @printf "\n === making distfile\n" - rm -f dist zips htmlfiles - make -f $(THISFILE) dist zips htmlfiles - rm -rf distfile distfile.tar.gz; mkdir distfile - Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ - cp -p $(TMP)/$(NAME)$$Version.tar.gz \ - $(TMP)/$(NAME)$$Version/README $(TMP)/$(NAME)$$Version/CHANGES \ - distfile ;\ - PCVersion=`echo $$Version | sed -e 's/\./_/g'` ; \ - cp -p $(TMP)/$(NAME)$$PCVersion.zip distfile ;\ - mkdir distfile/html - cp -rp html/* distfile/html - (cd distfile/html; mv index.html .. ; rm -f access.log *.pl ) -# tarlib distfile - -EPSFILES=${PICS:%.tex=%.eps} -# Make an encapsulated Postscript file for each example (requires pstricks) -eps: - @printf "\n === making eps\n" - make -f $(THISFILE) ${PICS:%.tex=%.eps} - -Copying: $(LIBDIR)/doc/Version.tex - @printf "\n === making Copying\n" - sed -e \ - "s%Version *[0-9.]*,%`cat $(LIBDIR)/doc/Version.tex`,%" $(LIBDIR)/Copying \ - > xxx - sed -e "s%opyright (c) [^ ][^ ]* J%opyright (c) `date '+%Y'` J%" xxx \ - > $(LIBDIR)/Copying ; rm -f xxx -# for file in `find $(LIBDIR) -name Copying -print` ; do \ -# if test ! "$$file" = "$(LIBDIR)/Copying" ; then \ -# cp $(LIBDIR)/Copying $$file; fi ; done - (cd $(LIBDIR) ; for file in `grep -l 'Version [0-9][\.0-9]*,' *` ; do \ - if test ! \( "$$file" = "Copying" -o "$$file" = "CHANGES" \) ; then \ - ( sed -e '/opyright (c)/,$$d' $$file ; cat Copying ; echo "" ; \ - sed -e '1,/opyright (c)/d' $$file | sed -e '1,/^ *$$/d' ) > xxx ; \ - sed -e "s%Version *[0-9.]*:%`cat doc/Version.tex`:%" xxx \ - > $$file ; rm -f xxx ; fi ; done ; ) - (cd $(LIBDIR) ; \ - ( sed -e '/opyright (c)/,$$d' dpictools.pic ; \ - sed -e 's/^ *\*/\#/' -e 's/\* *$$/\#/' Copying ; echo "" ; \ - sed -e '1,/opyright (c)/d' dpictools.pic | sed -e '1,/^ *$$/d' ) > xxx ;\ - sed -e "s%Version *[0-9.]*:%`cat doc/Version.tex`:%" xxx \ - > dpictools.pic ; rm xxx ) - -htmlfiles: html svgfiles pngs html/examples.html html/index.html \ - Circuit_macros.ico html/Optosample.png - @printf "\n === making lib/examples/htmlfiles\n" - mv Circuit_macros.ico html - if test -f examples.pdf ; \ - then printf "\n\n examples.pdf found\n" ; \ - else printf "\n\n examples.pdf not found\n" ; fi - if test -f doc/Circuit_macros.pdf ; \ - then printf "\n\n doc/Circuit_macros.pdf found\n" ; \ - cp doc/Circuit_macros.pdf html ; \ - else printf "\n\n doc/Circuit_macros.pdf not found\n" ; \ - cp $(TMP)/Circuit_macros.pdf $(LIBDIR)/doc ; fi - cp examples.pdf html - (cd html; chmod 644 *.svg *.txt *.html *.pdf ) - touch htmlfiles - -html: - @printf "\n === making html\n" - if test ! -d html ; then mkdir html ; fi - ( cd htmlsource; cp -p $(PERLFILE).pl .htaccess ../html ) - -svgfiles: html - @printf "\n === making svgfiles\n" - ( cd svg; make ) - for file in `ls svg/*SVG.m4` ; \ - do cp $$file html/`basename $$file .m4`.txt ; done - cp -p svg/examplesSVG.html svg/*.svg svg/*.jpg html - touch svgfiles - -Circuit_macros.ico: html htmlsource/favicon.m4 - @printf "\n === making Circuit_macros.ico\n" - cp htmlsource/favicon.m4 . - make -f $(THISFILE) favicon.eps - convert -density 105 favicon.eps Circuit_macros.ico - rm -f favicon.* - -html/index.html: htmlsource/index.htmx html - @printf "\n === making index.html\n" - Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ - PCVersion=`echo $$Version | sed -e 's/\./_/g'` ; \ - sed -e 's/XXX/'$$Version'/' \ - -e 's/PCVersion/'$$PCVersion'/' \ - htmlsource/index.htmx > html/index.html - -html/Optosample.png: html htmlsource/Optosample.m4 - @printf "\n === making Optosample.png\n" - cp htmlsource/Optosample.m4 . - make -f $(THISFILE) Optosample.eps - convert Optosample.eps Optosample.png - mv Optosample.png html/Optosample.png - rm -f Optosample.* - -TR = tr '^@' '\012`' -html/examples.html: html htmlsource/examples.htmx files.tex - @printf "\n === making examples.html\n" - Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ - sed -e 's/Version XXX/Version '$$Version'/' htmlsource/examples.htmx \ - > html/examples.html - cat files.tex | sed -e '/bfig[\{]/d' -e '/^ *[\}][\}]* *$$/d' \ - -e '/src[\{]/d' -e '/\\if/d' -e '/\\fi/d' -e '/includegraphics/d' \ - -e '/\%ignore\%/d' -e '/^\%/d' -e '/\\end[\{]/d' -e '/^\%/d' \ - -e '/getpic/s/\\getpic[\{]\([^\}]*\)[\}][\}]*/ <\1> /g' \ - -e '/<[^-]/s/^[^<]*<//' -e '/<[^-]/s/>[^<]*</> /g' -e '/[^-]>/s/>.*$$/>/' \ - -e 's/\([^ -][^ -]*\)>/IS_"\1.png" A_"\1 diagram">B_"\1.txt" T_\1.m4Y/'\ - -e 's/IS_/<P><IMG SRC=/' -e 's/A_/ALT=/' -e 's/B_/<BR>^<A HREF=/' \ - -e 's/T_/TARGET="_blank"><P>/' -e 's/4Y/4<\/A>:/' \ - -e 's/^.*caption[\{]//' -e '/^ *$$/s/^ */<HR>/' \ - -e 's/\\hbox//g' \ - | sed \ - -e '/<P>/!s/{\\tt \([^}]*\)}/<tt>\1<\/tt>/g' \ - -e '/<P>/!s/{\\texttt \([^}]*\)}/<tt>\1<\/tt>/g' \ - -e '/<P>/!s/{\\bf \([^}]*\)}/<tt>\1<\/tt>/g' \ - -e '/<P>/!s/{\\em \([^}]*\)}/<em>\1<\/em>/g' \ - -e '/<P>/!s/{\\it \([^}]*\)}/<em>\1<\/em>/g' \ - -e '/<P>/!s/{\\sl \([^}]*\)}/<em>\1<\/em>/g' \ - -e '/<P>/!s%\([^\\]\)_\(.\)%\1<sub>\2</sub>%g' \ - -e '/<P>/!s%\([^\\]\)\^\(.\)%\1<sup>\2</sup>%g' \ - -e 's%``%"%g' -e "s%''%\"%g" -e 's/\~/ /g' \ - -e 's%\\%%g' -e 's/\$$//g' \ - | sed -e 's/HREF=Inclpdf.m4/HREF=Inclpdf.txt/' | $(TR) \ - >> html/examples.html - cat htmlsource/endexamples.htmx >> html/examples.html - -BACKGROUND = blight - -pngs: basenames - @printf "\n === making pngs\n" - cp htmlsource/$(BACKGROUND).m4 . - -for nm in `cat basenames` ; do \ - echo "make -f $(THISFILE) $$nm.png ; mv $$nm.png html/$$nm.png" ;\ - make -f $(THISFILE) $$nm.png ; mv $$nm.png html/$$nm.png ;\ - ls -l html/$$nm.png ; \ - done - make -f $(THISFILE) $(BACKGROUND).png - mv $(BACKGROUND).png html/$(BACKGROUND).png - rm -f $(BACKGROUND).tex - -for nm in `cat basenames` ; do\ - cp $$nm.m4 html/$$nm.txt ; done - cp Inclpdf.m4 html/Inclpdf.txt - echo "" > html/Inclpdf.m4 - cat Inclpdf.m4 >> html/Inclpdf.m4 - chmod 644 html/Inclpdf.m4 - -gifs: basenames - @printf "\n === making gifs\n" - -for nm in `cat basenames` ; do \ - make -f $(THISFILE) $$nm.gif ; mv $$nm.gif html/$$nm.gif ;\ - done - make -f $(THISFILE) $(BACKGROUND).gif - mv $(BACKGROUND).gif html/$(BACKGROUND).gif - rm -f $(BACKGROUND).tex - -for nm in `cat basenames` ; do\ - cp $$nm.m4 html/$$nm.txt ; done - cp Inclpdf.m4 html/Inclpdf.txt - echo "" > html/Inclpdf.m4 - cat Inclpdf.m4 >> html/Inclpdf.m4 - chmod 644 html/Inclpdf.m4 - -basenames: files.tex - @printf "\n === making basenames\n" - grep '\\getpic' files.tex | sed -e '/Inclpdf/d' \ - -e 's%\\getpic[\{]\([^\}]*\)[\}]% <\1> %g' \ - -e 's/^[^<]*<//' -e 's/>[^<]*</ /g' -e 's/>.*$$//' \ - | sort | uniq > basenames - -# To make but not distribute everything: make dist zips htmlfiles - -ECETMP = /cygdrive/d/Dwight/tmp -ECENAM = CMdistfiles -ECEDIR = $(ECETMP)/$(NAME) -PERLFILE = Circuit_macros_access_log - -# (cd lib/examples; make -f distmakefile distece 2>&1)2>&1 > typescript -distece: - @printf "\n === making lib/examples/distece\n" - (cd ..; find . -type f -exec chmod 644 {} \; ) - rm -f dist zips htmlfiles - make -f $(THISFILE) dist zips htmlfiles - rm -rf $(ECEDIR)* ; mkdir $(ECEDIR) - Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ - PCVersion=`echo $$Version | sed -e 's/\./_/g'` ; \ - cp -p $(TMP)/$(NAME)$$Version.tar.gz \ - $(TMP)/$(NAME)$$PCVersion.zip \ - $(TMP)/$(NAME)$$Version/README $(TMP)/$(NAME)$$Version/CHANGES \ - $(TMP)/$(NAME)$$Version/doc/Circuit_macros.pdf \ - $(ECEDIR) - rm -rf $(ECEDIR)/html ; mkdir $(ECEDIR)/html - cp -rp html/* $(ECEDIR)/html - mv $(ECEDIR)/html/index.html $(ECEDIR)/index.html - (cd $(ECETMP); tarlib $(NAME); mv $(NAME).tar.gz $(ECENAM).tar.gz ) - echo ""; echo ""; ls -l $(ECETMP)/$(ECENAM).tar.gz - -testall: - (cd mf; make) - (cd mpost; make) -# (cd pgf; make) - (cd psfrag; make) - (cd svg; make) - (cd xfig; make) - -clobber: clean - rm -f *.ps - -@for dir in mf mpost pdflatex xfig psfrag pgf svg dev test; \ - do (if test -d $$dir ; then cd $$dir; make clobber; fi) ; done - rm -f *.warn - rm -rf index.html html basenames *.png* dist zips htmlfiles svgfiles - rm -rf $(TMP)/Cir* $(ECETMP)/Cir* $(ECEDIR) - if test -f Incl.pdf ; then \ - mv Incl.pdf Incl.pdx; rm -f *.pdf; mv Incl.pdx Incl.pdf ; fi - 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 - -clean: - @printf "\nclean:\n" - find .. -name \*stackdump -exec rm {} \; - rm -f core snapshots *.ico *favicon* $(BACKGROUND).* zipdir - rm -f *.dvi *.aux *.log *.toc *.blg *.eps *.epsi eps *-mfpic* - rm -f fig*.tex $(PICS) *.roff *.int *.pic gpic.m4 test.tex xxx* *.fig - rm -f *.dim *.bak *.frs $(RPICS) rotate.ps tst.ps *.bbl *-pics.ps *.gif - rm -f *.tfm *[0-9]pk *.png *.1 - rm -f F_*.tex Version.tex doclinks *stackdump *.ico - rm -rf distfile distfile.tar.gz - @printf "\n" diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/Makefile index 83eb573f8e0..314d8c3ef15 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/Makefile +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/Makefile @@ -23,8 +23,10 @@ DOC = examplespsfrag FIGS = Adder.eps Alogix.eps ABlogix.eps Antennas.eps Audio.eps AmpTable.eps \ AntiqueClock.eps \ Bip.eps Btree.eps Byte.eps Buttons.eps \ - CanLogic.eps CctTable.eps Conn.eps Counting.eps Crossbar.eps Crow.eps \ + CanLogic.eps CctTable.eps Conn.eps Connectors.eps \ + Counting.eps Crossbar.eps Crow.eps \ Decoder.eps Demultiplexer.eps Dini.eps Diodes.eps Drive.eps \ + Contact.eps Contacts.eps \ Csource.eps \ Emarrows.eps Flow.eps Fuses.eps \ GrayCode.eps Grounds.eps Headers.eps Heathkit.eps Jack.eps \ diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/examplespsfrag.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/examplespsfrag.tex index 594eafcd08c..2baa5cd04f3 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/examplespsfrag.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/examplespsfrag.tex @@ -2,7 +2,7 @@ \documentclass[11pt]{article} \usepackage{times,boxdims} -\usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits} +\usepackage{siunitx} \usepackage{rotating} \usepackage{graphicx} \usepackage[scanall]{psfrag} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/tstpsfrag.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/tstpsfrag.tex index 2073079ef1c..6aa6ed438f8 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/tstpsfrag.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/tstpsfrag.tex @@ -1,6 +1,6 @@ \documentclass[dvips]{article} \usepackage{times,boxdims,graphicx} -\usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits} +\usepackage{siunitx} \usepackage[scanall]{psfrag} \addtolength{\textwidth}{2cm} \addtolength{\textheight}{3cm} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AntiqueClockSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AntiqueClockSVG.m4 index 0848a53cbe3..63c169d3e24 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AntiqueClockSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AntiqueClockSVG.m4 @@ -4,9 +4,7 @@ gen_init(svg_font(font-family="sans-serif" font-stretch="condensed")) # https://tex.stackexchange.com/questions/236923/generate-analog-clock-with-numbered-face-add-seconds-roman-numerals -# `Initialize rotated text. Any unrotated text must -# appear after the rotated text.' -svgrot_init(AntiqueClockSVG) +svg_rot_init(AntiqueClockSVG) # `hms2deg(hr,min,sec) hr:min:sec to degrees # blank arg1: degrees for minute hand @@ -74,8 +72,8 @@ define(`AntiqueClock',`[ # h,m,s,diam second = ifelse(`$3',,51,`$3') # outer radius ifelse(`$4',,`skale=0.5; r1=2',`r1=(`$4')/2; skale=r1/4') - r2 = r1-0.5*skale - r3 = r2-0.14*skale + 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 @@ -117,11 +115,11 @@ Face: circle thick 0 fill_(1) rad r3 at C textht = (r3-r4)*0.6 for mn = -15 to 15 by 5 do { t = 90-mn/60*360 R:(Rect_((r3+r4)/2,t)) - svg_rot(mn/60*360,sprintf("%g",pmod(mn,60)) at C+R+adj(t)) + svg_rot(-mn/60*360,sprintf("%g",pmod(mn,60)) at C+R+adj(t)) } for mn = 20 to 40 by 5 do { t = 450-mn/60*360 R: (Rect_((r3+r4)/2,t)) - svg_rot(-180+mn/60*360, sprintf("%g",pmod(mn,60)) at C+R+adj(t)) + svg_rot(180-mn/60*360, sprintf("%g",pmod(mn,60)) at C+R+adj(t)) } # Outer tics for mn = 1 to 60 do { t = 90-mn/60*360 @@ -131,11 +129,11 @@ Face: circle thick 0 fill_(1) rad r3 at C textht = (r5-r6)*0.6 Loopover_(`mx',`tt = 90-(m4Lx-4)/12*360 R: (Rect_((r5+r6)/2,tt)) - svg_rot(90-tt, "mx" at C+R+adj(tt)) ', + svg_rot(tt-90, "mx" at C+R+adj(tt)) ', IX,X,XI,XII,I,II,III) Loopover_(`mx',`tt = 360-m4Lx*30 R: (Rect_((r5+r6)/2,tt)) - svg_rot(270-tt, "mx" at C+R+adj(tt)) ', + svg_rot(tt-270, "mx" at C+R+adj(tt)) ', IV,V,VI,VII,VIII) # Inner tics diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AudioSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AudioSVG.m4 index 116f155e589..709fdf4c251 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AudioSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AudioSVG.m4 @@ -1,5 +1,5 @@ .PS -# `Audio.m4' +# `AudioSVG.m4' cct_init(svg_font(sans-serif,11bp__,2bp__)) define(`In123',` @@ -44,14 +44,6 @@ L:[ thicklines_ ] with .sw at last [].se+(0.35,0) [ - M: microphone - `"microphone"' at M.s+(0,-0.2) below - In123(M) - thinlines_ - arrow <- from M.Circle.n up 0.15 ; "svg_it(Circle)" above - thicklines_ - ] with .sw at last [].se+(0.4,0) -[ Z: buzzer `"buzzer"' at Z.s+(0,-0.2) below In123(Z) @@ -69,6 +61,24 @@ R:[ "svg_it(Face)" wid 0.5 at Here above thicklines_ ] with .sw at last [].se+(0.4,0) +[ + M: microphone + `"microphone"' wid 60bp__ at M.s+(0,-0.2) below + In123(M) + thinlines_ + arrow <- from M.Circle.n up 0.15 ; "svg_it(Circle)" above + thicklines_ + ] with .sw at last [].se+(0.4,0) +[ + M: microphone(A) + "`microphone(A)'" at M.s+(0,-0.2) #below + thinlines_ + arrow <- from M.Head.e+(0,0.05) right 0.2; "svg_it(Head)" wid 40bp__ ljust + spline 0.5 <- from M.Head.b down 0.05 right 0.1 then right 0.1 + "svg_it(Head.b)" ljust + arrow <- from M.Stand.s right 0.2; "svg_it(Stand.s)" ljust + thicklines_ + ] with .n at last [].s+(0,-0.2) [[ E: earphone `"earphone"' at E.s+(0,-0.2) below @@ -87,7 +97,7 @@ R:[ "svg_it(C)" at E.C thicklines_ ] with .sw at last [].se+(0.4,0) -] with .n at (0.5 between L and R,L.s)+(0,-0.2) +] with .n at (0.5 between L and R,L.s)+(0.5,-0.2) command "</g>" # end font .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Banking.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Banking.m4 deleted file mode 100644 index 630326f867c..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Banking.m4 +++ /dev/null @@ -1,59 +0,0 @@ -.PS -#Banking.m4 - -gen_init - - scale = 2.54 # use cm - svg_font(Arial Black,11 bp__,2 bp__) - boxwid = 6.8 - boxht = 4.5 - linethick_(1.5) - - define(`heading', - `<tspan font-style=\"bold\" font-size=\"120%\" fill=\"white\">`$1'</tspan>') - define(`subheading', - `<tspan fill=\"white\" font-size=\"75%\" font-style=\"bold\">[`$1']</tspan>') - define(`wtext',`<tspan fill=\"white\">`$1'</tspan>') - - C: circle diam 2.6 colored "mediumblue" - Person: box rad boxht/4 colored "mediumblue" with .n at C.s+(0,C.rad/8) \ - "heading(Personal Banking)" \ - "" \ - "heading(Customer)" \ - "subheading(Person)" \ - "" \ - "wtext(A customer of the bank`,' with)" \ - "wtext(personal bank accounts.)" - - A1: arrow thick 1.5 dashed down 3.5 from Person.s - svg_font(Arial,11 bp__,2 bp__) - { box invis fill 1 ht 0.4 wid 1.0 "Uses" at A1 } - command "</g>" - Internet: box colored "steelblue" \ - "heading(Internet Banking System)" \ - "subheading(Software system)" \ - "" \ - "wtext(Allows customers to view)" \ - "wtext(information about their bank)" \ - "wtext(accounts`,' and make payments.)" - - svg_font(Arial,11 bp__,2 bp__) - A2: arrow thick 1.5 dashed right 5.4 from Internet.e \ - "Sends e-mail" above "using" below - command "</g>" - Email: box colored "slategrey" \ - "heading(E-mail System)" \ - "subheading(Software system)" \ - "" \ - "wtext(Internal Microsoft Exchange)" \ - "wtext(e-mail system.)" - - A3:arrow thick 1.5 dashed from Email.nw+(0.4,0) to Person.se+(0.3,Person.ht/5) - svg_font(Arial,11 bp__,2 bp__) - { box invis fill 1 ht 0.4 wid 3.3 "Sends e-mails to" at A3 } - command "</g>" - -# etc - - command "</g>" # font -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ButtonsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ButtonsSVG.m4 index b9e9c12e699..79c94636397 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ButtonsSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ButtonsSVG.m4 @@ -1,7 +1,7 @@ .PS # ButtonsSVG.m4 gen_init(svg_font(sans-serif,11bp__)) -copy "HOMELIB_/dpictools.pic" +NeedDpicTools divert(-1) ################################################################# diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ConnSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ConnSVG.m4 index 9d828ee48fd..7344baeb23e 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ConnSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ConnSVG.m4 @@ -1,6 +1,6 @@ .PS # `ConnSVG.m4' -cct_init(svg_font(sans-serif,11.5bp__)) +cct_init(svg_font(sans-serif,10.5bp__)) T:[ S1: tstrip(U) @@ -55,13 +55,13 @@ Y: [ ] with .sw at (C.e.x-0.3,T.s.y) B: [ - tbox(V`'svg_sub(2)) - `"tbox(V`'svg_sub(2))"' wid 105bp__ with .nw at last [].sw+(0,-4bp__) - [ left_; - tbox(V`'svg_sub(1)) ] with .nw at last [].sw+(0,-0.25) - `"left_"' at last [].sw +(0,-0.2) ljust `"tbox(V`'svg_sub(1))"' wid 100bp__ \ - ljust -] with .nw at Y.ne+(0.2,0) + 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) command "</g>" # end font .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ConnectorsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ConnectorsSVG.m4 new file mode 100644 index 00000000000..59860a2d1ea --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ConnectorsSVG.m4 @@ -0,0 +1,30 @@ +.PS +# ConnectorsSVG.m4 +log_init +include(icsSVG.m4) + +svg_font(sans-serif,8.5bp__) +#vg_rot_init(test) +svg_rot_init(ConnectorsSVG) + +# ArduinoUno +# "Arduino Uno Rev 3" at last [].Connector.s below + Ar: ArduinoLeonardo #with .sw at last [].se+(0.25,0) + "Arduino Leonardo" at last [].Connector.s below + + RPI: RPi with .sw at last [].se+(0.25,0) + "Raspberry Pi 4 GPIO" at last [].GPIO.s below + + HD: HDMI_micro with .nw at last [].ne+(0.25,0.5) + "Micro" rjust at HD.Base.sw+(0,10bp__) "HDMI" rjust + + S: USB_C_Socket 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 "</g>" + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CsourceSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CsourceSVG.m4 index e194f01f8cb..c95aaff3d45 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CsourceSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CsourceSVG.m4 @@ -4,7 +4,7 @@ cct_init(svg_font(sans-serif,11bp__,2bp__)) # The default line separation is a bit small if the top line contains # subscripts, so we space stacked lines explicitly: -define(`stbelow',`at last ""-(0,textht*1.3)') +define(`stbelow',`at last ""-(0,textht*1.5)') define(`loffset',`+(textoffset,0)') define(`roffset',`-(textoffset,0)') diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FontsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FontsSVG.m4 index 856014836b9..57dcd431a57 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FontsSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FontsSVG.m4 @@ -3,10 +3,13 @@ gen_init textht = 0.2 -define(`ft',`{ svg_font(`$1',`$2',`$3',"`$1'")}; move down 0.5; right_') +define(`ft',`{ svg_font(`$1',`$2',`$3',"`$1'" ljust) + move to (B.w+(2.5,0),Here) + svg_font(`$1',`$2',`$3',"ABCDEFG abcdefg" ljust)} + move down 0.5; right_') -B: box wid 4 ht 7 - move to B.nw+(2,-0.5) +B: box wid 5.5 ht 7 + move to B.nw+(0.5,-0.5) ft(Arial) ft(Helvetica) @@ -23,6 +26,6 @@ B: box wid 4 ht 7 ft(Arial Black) ft(Impact) - textht = 0.1 - "These may be vewer-dependent" above ljust at B.sw + textht = 0.12 + "These may be viewer-dependent" above ljust at B.sw .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FusesSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FusesSVG.m4 index a4617e62212..a421c45b578 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FusesSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FusesSVG.m4 @@ -14,11 +14,10 @@ movewid = 0.25 move fuse(,S) ; {"`fuse(,S)'" at last line.c+(0,-0.2)} move - fuse(,HB) ; {"`fuse(,HB)'" at last line.c+(0,-0.2)} + fuse(,SB) ; {"`fuse(,SB)'" at last line.c+(0,-0.2)} } move down; right_ - fuse(,HC,0.5,0.3) ; {"`(,HC,0.5,0.3)'" ljust at last line.start+(0,-0.25)} - move + { cbreaker; {"`cbreaker'" at last line.c+(0,-0.25)} move cbreaker(,R); {"`cbreaker(,R)'" at last line.c+(0,-0.25)} @@ -28,6 +27,13 @@ movewid = 0.25 cbreaker(,,T); {"`...(,,T)'" at last line.c+(0,-0.25)} move cbreaker(,,TS); {"`...(,,TS)'" at last line.c+(0,-0.25)} + } + move down; right_ + { + fuse(,HB) ; {"`fuse(,HB)'" 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)} + } command "</g>" # end font .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GroundsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GroundsSVG.m4 index 7c4d741d0ee..c1a9589f2d8 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GroundsSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GroundsSVG.m4 @@ -8,15 +8,17 @@ Ground: ground GT: ground(,T) move right sep GF: ground(,,F) +sep = 0.55 move right sep GE: ground(,,E) move right sep -B: Here+(0,-0.5) ; { - "`ground'" wid 36bp__ at (Ground,B) - "`ground'(,T)" at (GT,B)+(0,12bp__) +B: Here+(0,-0.5) +D: B+(0,11bp__) + { "`ground'" wid 36bp__ at (Ground,B) + "`ground'(,T)" at (GT,B)+(0,11bp__) "(,,F)" at (GF,B) - "(,,E)" at (GE,B)} + "(,,E)" at (GE,D)} GS: ground(,,S) @@ -28,13 +30,17 @@ GQ: ground(,,Q) GL: ground(,,L) move right sep GP: ground(,,P) + move right sep +GPA: ground(,T,PA) C: Here+(0,-0.5) +E: C+(0,11bp__) "(,,S)" at (GS,C) - "(,,S,90)" at (GS90,C) + "(,,S,90)" at (GS90,E) "(,,Q)" at (GQ,C) - "(,,L)" at (GL,C) + "(,,L)" at (GL,E) "(,,P)" at (GP,C) + "(,T,PA)" wid 32bp__ at (GPA,E) command "</g>" # end font .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/HeadersSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/HeadersSVG.m4 index c222f186500..15e4cda70bc 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/HeadersSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/HeadersSVG.m4 @@ -5,7 +5,11 @@ log_init(svg_font(sans-serif,10bp__)) Header {"svg_it(P1)" wid 15bp__ at last [].P1 rjust `"Header"' wid 45bp__ at last [].s+(0,-10pt__) - "svg_it(P2)" at last [].P2 rjust} + "svg_it(P2)" at last [].P2 rjust + thinlines_ + arrow <- from last [].Block.ne-(0,0.1) up 0.15 right 0.15 + "svg_it(Block)" ljust + thicklines_ } Header(2,3,8mm__,10mm__) with .nw at last [].ne+(0.75,-0.05) {"svg_it(P1)" at last [].P1 rjust diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4 index ef1d2158091..cececf42b5c 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4 @@ -3,6 +3,7 @@ cct_init(svg_font(Times,11bp__)) textoffset = 3bp__ +MC:[ dv = dimen_*0.6 dh = dimen_*0.4 backup = dimen_/6 @@ -40,5 +41,57 @@ textoffset = 3bp__ llabel(sprintf("svg_it(v`'svg_sub(&``#''%g;,66%))",64+i)) if i==2 then { Output: dot } else { line down (2-i)*dv } }} +] + +Three: [ + dv = dimen_*0.6 + dh = dimen_ + define(`swfet',`mosfet(`$1',,dMEDSuBQPy)') + define(`swpair',`[ up_ + BS: swfet(up_ dimen_); { "`$1'" at BS.D-(0,2bp__) rjust } + L: line up_ 3*dimen_ from BS.D + TS: swfet(up_ dimen_) with .S at Here; { "`$2'" at TS.S+(0,2bp__) rjust } + T: TS.D + B: BS.S + C: L.c + ]') + + V1: gap(up_ 5*dimen_,1,A) + { "svg_it(V)svg_sub(1)" wid 12bp__ at last arrow.c rjust } + line right_ dh/2 + { C1: capacitor(down_ to (Here,V1.start)); llabel(svg_it(C)svg_sub(1)) } + for_(1,3,1,` + line right_ dh ifelse(m4x,1,,*5/4) + {SP1`'m4x: swpair(svg_it(S`'svg_sub(1`'eval(m4x+3))), + svg_it(S`'svg_sub(1`'m4x))) with .T at Here + dot(at last [].C + (0,(2-m4x)*dh)) + line right_ (3-m4x)*dh*5/4 + inductor(right_ dimen_,L) + {sprintf("svg_it(L`'svg_sub(1&`#'%g;,70%))",64+m4x) at last [].n+(0,8bp__)} + line down_ (2-m4x)*dimen_*2/3 + pushdef(`dimen_',dimen_*1.2) inductor(right_ dimen_*3/4) popdef(`dimen_') + line down_ (2-m4x)*dimen_/3 + M: move right_ dimen_/8 + line up_ (2-m4x)*dimen_/3 + pushdef(`dimen_',dimen_*1.2) inductor(right_ dimen_*3/4) popdef(`dimen_') + line up_ (2-m4x)*dimen_*2/3 + inductor(right_ dimen_,L) + {sprintf("svg_it(L`'svg_sub(2&`#'%g;,70%))",64+m4x) at last [].n+(0,8bp__)} + line right_ dimen_/8+(m4x-1)*dh*5/4 + dot + SP2`'m4x: swpair(svg_it(S`'svg_sub(2`'eval(m4x+3))), + svg_it(S`'svg_sub(2`'m4x))) with .C at Here+(0,(m4x-2)*dh) } + ') + "svg_it(T)svg_sub(r)" at M.c+(0,dimen_*2/3) + line from V1.start to SP13.B + line from SP21.B to SP23.B+(dh*3/4,0) + { C2: capacitor(up_ to (Here,V1.end)); llabel(,,svg_it(C`'svg_sub(2))) } + line right_ dh/2 + gap(up_ 5*dimen_,1,A) + { "svg_it(V`'svg_sub(2))" wid 12bp__ at last arrow.c ljust } + line to SP21.T chop dotrad_ chop 0 + +] with .nw at MC.sw+(0,-0.2) + command "</g>" # end font .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile index 5ee232a5ea9..4471d513f47 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile @@ -1,14 +1,21 @@ LIBDIR = $$HOME/lib M4LIBS = svg.m4 SVGconfig.m4 +M4LIBS = svg.m4 # To process a single file, copy it to test.m4 and type "make tst" # to produce tstSVG.html DPIC = dpic -#DPIC = $$HOME/dpic/bu*/p2c/ftp/dpic -#DPIC = $$HOME/dpic/bu*/test/dpic -#DPIC = $$HOME/dpic/dev/p2c/ftp/dpic +#DPIC = $$HOME/dpic/build/p2c/ftp/dpic +#DPIC = ../../../dpic/build/p2c/ftp/dpic #DPIC = ../../../dpic/bison/dpic +#DPIC = ../../../dpic/bdev/dpic + +# To test the Windows executable. Change these as needed for the operating +# system. NOTE: AntiqueClockSVG.m4 and Connectors.m4 use awk and sed which +# do not work at present with the Windows version. +# M4LIBS = svg.m4 windows.m4 +# DPIC = ../../../dpic/bison/distsrc/Windows/dpic .SUFFIXES: .pic .svg .m4 .pic.svg: @@ -23,8 +30,9 @@ CCTSVG = \ AdderSVG.svg AlogixSVG.svg ABlogixSVG.svg AmpTableSVG.svg AntennasSVG.svg \ AntiqueClockSVG.svg \ AudioSVG.svg \ BipSVG.svg BtreeSVG.svg ByteSVG.svg ButtonsSVG.svg \ - CanLogicSVG.svg CctTableSVG.svg ConnSVG.svg ContactSVG.svg ContactsSVG.svg \ - CountingSVG.svg CrossbarSVG.svg CrowSVG.svg CrullerSVG.svg CsourceSVG.svg \ + CanLogicSVG.svg CctTableSVG.svg ConnSVG.svg ConnectorsSVG.svg \ + ContactSVG.svg ContactsSVG.svg \ + CountingSVG.svg CrossbarSVG.svg CrowSVG.svg CsourceSVG.svg \ DecoderSVG.svg DemultiplexerSVG.svg DiniSVG.svg DiodesSVG.svg DriveSVG.svg \ EmarrowsSVG.svg \ FlowSVG.svg FontsSVG.svg FusesSVG.svg GrayCodeSVG.svg GroundsSVG.svg \ @@ -68,6 +76,7 @@ tst: test.pic: if test -f test.pic ; then echo "Usage: make clean tst" ; fi m4 $(M4LIBS) test.m4 | $(SED) > test.pic + m4 $(M4LIBS) test.m4 | $(SED) > test.pic tstSVG.html: tstSVG.htmx $(TEST).svg Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ @@ -78,7 +87,14 @@ tstSVG.html: tstSVG.htmx $(TEST).svg xst: Incleps.png -AntiqueClockSVG.svg: +AntiqueClockSVG.svg ConnectorsSVG.svg: + m4 $(M4LIBS) $*.m4 | sed -e '/^\%/d' > $*.pic + $(DPIC) -v $*.pic > $*.svg + m4 $(M4LIBS) $*.m4 | sed -e '/^\%/d' > $*.pic + $(DPIC) -v $*.pic > $*.svg + grep '<\!-- width' $*.svg | sed -e 's%<\!-- *%%' -e 's% *-->%%' > $*.siz + +xntiqueClockSVG.svg: m4 $(M4LIBS) AntiqueClockSVG.m4 | sed -e '/^\%/d' > AntiqueClockSVG.pic $(DPIC) -v AntiqueClockSVG.pic > AntiqueClockSVG.svg m4 $(M4LIBS) AntiqueClockSVG.m4 | sed -e '/^\%/d' > AntiqueClockSVG.pic @@ -96,8 +112,9 @@ Incleps.png: clean: @printf "\n svg clean:\n" rm -f *.svg *.dim *.ps *log *.siz *.pic examplesSVG.html Incleps.png - rm -f tstSVG.html + rm -f tstSVG.html copy_tmp__ @printf "\n" clobber: clean + (cd dev; make clobber) rm -f test.m4 diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MixerSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MixerSVG.m4 index aa778337b33..1712e017ed0 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MixerSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MixerSVG.m4 @@ -1,7 +1,7 @@ .PS #`MixerSVG.m4 # Showing VMOS mosfet and custom transformer' -cct_init(svg_font(sans-serif,11bp__,1bp__)) +cct_init(svg_font(sans-serif,10.5bp__,1bp__)) define(`dimen_',0.6) define(`elen_',0.75) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PconnSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PconnSVG.m4 index 348a6193171..b0fdb65e803 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PconnSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PconnSVG.m4 @@ -19,27 +19,23 @@ P1: [ arrow from G.w to C1.G.e arrow from G.e to C2.G.w `"(,AF)"' at last [].s below - C03: pconnex(,AC) with .w at C2.e+(0.2,0) + C03: pconnex(,AC) with .w at C2.e+(0.25,0) `"(,AC)"' at last [].s below C3: pconnex(,ACF) with .w at last [].e+(0.2,0) `"(,ACF)"' at last [].s below - C5: pconnex(U,D) with .w at last [].e+(0.2,0) + C5: pconnex(U,D) with .w at last [].e+(0.25,0) `"(U,D)"' at last [].s below - C6: pconnex(U,DF) with .w at last [].e+(0.2,0) + C6: pconnex(U,DF) with .w at last [].e+(0.25,0) `"(U,DF)"' at last [].s below - C7: pconnex(U,J) with .w at last [].e+(0.2,0) + C7: pconnex(U,J) with .w at last [].e+(0.25,0) `"(U,J)"' at last [].s below - C8: pconnex(U,JF) with .w at last [].e+(0.2,0) + C8: pconnex(U,JF) with .w at last [].e+(0.25,0) `"(U,JF)"' wid 21bp__ at last [].s below ] P2: [ - C4: pconnex(,P) - `"(,P)"' at last [].s below - C11: pconnex(,PF) with .w at last [].e+(0.2,0) - `"(,PF)"' at C11.s below - C9: pconnex(,G) with .w at C11.e+(0.2,0) + C9: pconnex(,G) `"(,G)"' at last [].s below C91: pconnex(,GF) with .w at last [].e+(0.2,0) `"(,GF)"' at last [].s below @@ -47,7 +43,17 @@ P2: [ `"(L,GF)"' at last [].s below C10: pconnex(,GC) with .w at last [].e + (0.2,0) `"(,GC)"' at last [].s below -] with .nw at P1.C1.sw + (0,-0.25) + C12: pconnex(,GCF) with .w at last [].e + (0.2,0) + `"(,GCF)"' at last [].s below +] with .nw at P1.C1.sw + (0,-0.35) + +P3:[ + C4: pconnex(,P) + `"(,P)"' at last [].s below + C11: pconnex(,PF) with .w at last [].e+(0.2,0) + `"(,PF)"' at C11.s below +] with .nw at P2.C9.sw + (0,-0.35) + command "</g>" # end font .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/RectifiersSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/RectifiersSVG.m4 index 3329094082c..c6473744eb4 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/RectifiersSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/RectifiersSVG.m4 @@ -60,20 +60,21 @@ Threephase: [ linethick_(1) ] Cct3:[ - No: dot; {"N`'svg_sub(o)" below rjust } - { inductor(to Here+(Rect_(dimen_,60)),W); E2: "e`'svg_sub(2)" ljust } - { inductor(to Here+(Rect_(dimen_,-60)),W); E3: "e`'svg_sub(3)" ljust } - { inductor(from No-(dimen_,0) to No,W) - E1: "e`'svg_sub(1)" above at last line.start } + No: dot; {"N`'svg_sub(o)" at last [].s below rjust } + { inductor(to Here+(Rect_(dimen_,60)),W); E2: Here; "e`'svg_sub(2)" ljust } + { inductor(to Here+(Rect_(dimen_,-60)),W); E3: Here; "e`'svg_sub(3)" ljust } + { inductor(from No-(dimen_,0) to No,W); E1: last line.start + "e`'svg_sub(1)" at E1 above } D3: diode(down_ from E3); b_current(i`'svg_sub(3),rjust) llabel(,,D`'svg_sub(3)) - line from E1 to (E1,D3.start) + line from E1 to (E1.x,D3.start.y+dimen_/3) then right_ (E3.x+E1.x)/2-E1.x \ + then down_ dimen_/3 D1: diode(down_); b_current(i`'svg_sub(1),rjust); llabel(,,D`'svg_sub(1)) line from E2 left E2.x-E1.x+dimen_/3 then down E2.y-E3.y \ - then to 0.5 between D1.start and D3.start + then to 2 between D3.start and D1.start D2: diode(down_); b_current(i`'svg_sub(2),rjust); llabel(,,D`'svg_sub(2)) - { line from D1.end to D3.end } - dot + { line from D2.end to D3.end } + dot(at D1.end) arrowline(down elen_/2); rlabel(,i`'svg_sub(L)) resistor(right_ elen_); rlabel(+,e`'svg_sub(L),-); llabel(,R) line to (Here,No) then to No diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SVGconfig.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SVGconfig.m4 index 372a93937bb..e8aa1fa3ec1 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SVGconfig.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SVGconfig.m4 @@ -50,21 +50,9 @@ define(`SIdefaults',` ') define(`local_init',` +`#' local init begin scaledefaults(1.1) +`#' local init end ') -# If the variable dptextratio is not found you don't have -# dpic version 2018.05.15 or later. In that case, change -# dptextratio to 1 in the following (or delete *dptextrario ). -define(`svg_font',` -command "<g patsubst(ifelse(`$1',,, -index(`$1',font),0,`$1', -index(`$1',style),0,`$1', -style="font-family:`$1'") -,",\\")>" - ifelse(`$2',,,`textht=(`$2')*dptextratio') - ifelse(`$3',,,`textoffset=`$3'') - `$4' - ifelse(`$4',,,`command "</g>"')') - divert(0)dnl diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ShiftRSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ShiftRSVG.m4 index 022f4ced9fa..9a0b56d523f 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ShiftRSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ShiftRSVG.m4 @@ -21,8 +21,8 @@ define(`customFF',`FlipFlopX(wid 10*L_unit ht FF_ht*L_unit,, line from T to (T,F0.W3) then to F0.W3.end NCLR: NOT_gate(right T.x-Serial.x from (Serial,F0.S1.end),N) - "CLEAR" at NCLR.start rjust - line left textht*5 from last ""+(-textoffset,0.8*textht) + "CLEAR" wid 33bp__ at NCLR.start rjust + line left last "".wid with .c at last "".n+(0,1.5bp__) CLK: NOT_gate(right T.x-Serial.x from NCLR.start+(0,-BUF_ht*3/2*L_unit)) "CLOCK" at CLK.start rjust diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SourcesSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SourcesSVG.m4 index 8096317a5d4..2a611fe681c 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SourcesSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SourcesSVG.m4 @@ -15,7 +15,8 @@ define(`NL',`; move down $1; right_') {source(,X) ; move ; "`source(,X)'" ljust} NL {source(,F) ; move ; "`source(,F)'" ljust} NL {source(,G) ; move ; "`source(,G)'" ljust} NL - {source(,Q) ; move ; "`source(,Q)'" ljust} + {source(,Q) ; move ; "`source(,Q)'" ljust} NL(0.3) + {proximity ; move ; "`proximity" ljust "= consource(,P)'" ljust} } move right_ 2.0 { @@ -27,8 +28,8 @@ define(`NL',`; move down $1; right_') {source(,S) ; move ; "`source(,S)'" ljust} NL {source(,T) ; move ; "`source(,T)'" ljust} NL {source(,L) ; move ; "`source(,L)'" ljust} NL - {source(,B) ; move ; "`source(,B)'" ljust} NL(moveht*0.8) - {nullator ; move ; "`nullator'" ljust} NL(moveht*0.6) + {source(,B) ; move ; "`source(,B)'" ljust} NL + {nullator ; move ; "`nullator'" ljust} NL(moveht*0.8) {norator ; move ; "`norator'" ljust} } move right_ 2.0 diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SwitchesSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SwitchesSVG.m4 index 04fc2f52c56..95c9f2b2caa 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SwitchesSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SwitchesSVG.m4 @@ -101,6 +101,15 @@ movewid = 0.25 dswitch(,,WBRHH); {"svg_tt(`(,,WBRHH)')" at (last [],S)} } # Row 7 + move down moveht*5/4; right_; { + move down 2bp__; right_ + dswitch(,,WBPr); {S: "svg_tt(`(,,WBPr)')" at last [].s+(0,-10bp__)} + move right_ + dswitch(,,WBPrT); {S: "svg_tt(`(,,WBPrT)')" at last [].s+(0,-10bp__)} + move down_ 6bp__ then right_ + dswitch(,,WBPrM); {S: "svg_tt(`(,,WBPrM)')" at last [].s+(0,-10bp__)} + } +# Row 8 move down; right_; { dswitch(,,WBMMR); {S: "svg_tt(`(,,WBMMR)')" at last [].s+(0,-10bp__)} move right_ diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/TimerSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/TimerSVG.m4 index dcdb2cc4774..d1a0c2ffa14 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/TimerSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/TimerSVG.m4 @@ -1,6 +1,6 @@ .PS # TimerSVG.m4 -cct_init(svg_font(sans-serif,11bp__,1bp__)) +cct_init(svg_font(sans-serif,10.5bp__)) define(`ic555',`[Chip: box ht boxwid wid boxwid "555" P7: "7" ljust at 1/6<Chip.sw,Chip.nw> diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/TubediagsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/TubediagsSVG.m4 index cfc87b0a6aa..6409325558b 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/TubediagsSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/TubediagsSVG.m4 @@ -1,7 +1,7 @@ .PS # TubediagsSVG.m4 -cct_init(svg_font(sans-serif,11bp__,2bp__)) +cct_init(svg_font(sans-serif,10bp__,2bp__)) include(../tubedefs.m4) # Some base diagrams diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/VariableSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/VariableSVG.m4 index 642b81466ac..ccab6539363 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/VariableSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/VariableSVG.m4 @@ -1,36 +1,29 @@ .PS -# `Variable.m4' -cct_init(svg_font(sans-serif,11bp__)) +# `VariableSVG.m4' +cct_init -define(`elen_',dimen_) -down_ -[ { variable(`capacitor') } - move right; down_ - { variable(`resistor',uN) } - move right; down_ - { variable(`capacitor(,C)') } - move right; down_ - { variable(`inductor') } - move right; down_ - { variable(`inductor(,W)') } +define(`elen_',dimen_); down_ +[ { variable(`resistor',A) }; {"svg_tt(A)" at last line.end below}; move right + { variable(`resistor',N) }; {"svg_tt(N)" at last line.end below}; move right + { variable(`resistor',uN) }; {"svg_tt(uN)" at last line.end below}; move right + { variable(`resistor',NN) }; {"svg_tt(uN)" at last line.end below}; move right + { variable(`resistor',uNN) }; {"svg_tt(uNN)" at last line.end below} ] [ skp = 0.4 hskip = linewid*0.5 cskip = hskip Orig: Here - { move right cskip - move right elen_; move up 0.15 then down 0.15 then right_ hskip - line invis right_ elen_ "C"; move right_ hskip - line invis right_ elen_ "S" } + { move right cskip+elen_+hskip + line invis right_ elen_ "svg_tt(C)"; move right_ hskip + { move up_ 0.25 } + line invis right_ elen_ "svg_tt(S)" } Loopover_(`char', `move down skp ifelse(char,A,*0.5) - { line invis right_ cskip "char" + { line invis right_ cskip "svg_tt(char)" variable(`capacitor(,C)',char); move right_ hskip variable(`capacitor(,C)',char`'C); move right_ hskip variable(`capacitor(,C)',char`'S) }', A,P,L,N) ] with .w at last [].e+(0.4,0) - - command "</g>" # end font .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex01SVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex01SVG.m4 index 535bdec7955..3a20d90a182 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex01SVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex01SVG.m4 @@ -1,6 +1,6 @@ .PS # ex01.m4 -cct_init(svg_font(sans-serif,11bp__)) +cct_init(svg_font(sans-serif,10.5bp__)) linewid = linewid*1.5 # let's make the circuit elements bigger than usual define(`elen_',linewid) # but not longer diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex09SVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex09SVG.m4 index 507245235e6..b267c68ea09 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex09SVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex09SVG.m4 @@ -65,7 +65,7 @@ define(`bdot', move right 0.8 # Upper left diagram - spacer + spacer # Lower left diagram [ define(`lwid',`29bp__') @@ -76,18 +76,21 @@ Ctr: 0.5 between A and B L: move left 0.85*sk from A linethick_(1) - dimension_(from A to B,0.5*sk,label,lwid,0.1*sk) - "`dimension_(from A to B,0.5,label,29bp__,0.1)'" wid 90 \ - with .w at (L.end,A +(0,-9)) + dimension_(from A to B,0.5*sk,svg_it(label),lwid,0.1*sk) + "`dimension_(from A to B,0.5,label,29bp__,0.1)'" wid 70 \ + with .w at (L.end.x+2,A.y-10) + move down_ 4 from last "" thinlines_ - arrow from A to B chop 0.05*sk "linespec" below - dimension_(up_ 0.5*sk from A,0.2*sk,"offset" rjust,,,->) - dimension_(up_ 0.1*sk from B,-0.2*sk," tic offset" ljust) - dimension_(up_ 0.1*sk from B+(0,0.5*sk),-0.2*sk," tic offset" ljust) + arrow from A to B chop 0.05*sk "svg_it(linespec)" below + dimension_(up_ 0.5*sk from A,0.2*sk,"svg_it(offset)" rjust,,,->) + dimension_(up_ 0.1*sk from B,-0.2*sk," svg_it(tic offset)" ljust) + dimension_(up_ 0.1*sk from B+(0,0.5*sk),-0.2*sk, + " svg_it(tic offset)" ljust) dimension_(from Ctr+(-lwid/2,0.5*sk) right lwid,0.2*sk, - "blank width" above) -] with .nw at last [].sw+(0,-0.7*sk) + "svg_it(blank width)" above) +] with .nw at last [].sw+(0,-0.4*sk) +#showbox_ # Upper right diagram [ A: bdot(at (0,0),A, above rjust) @@ -104,23 +107,22 @@ T: C+(-0.45*sk,-0.5*sk) dimension_(from C to D chop dotrad_,,svg_it(T`'svg_sub(15)),15bp__) arcdimension_(from C to D with .c at 0.5 between A and B,12bp__, svg_it(C) to svg_it(D),34bp__) -Q: C+(-9,-9) +Q: C+(-9,-15) `define' leftparagraph { [ baselineskip = textht*1.5; { move right $1 } for i = 2 to $+ do { move to Here+(0,-baselineskip) - exec sprintf("{ `\"$%g \"' ljust }; ",i) } ] } - -define(`svg_comma',`svg_symbol(&`#'44;)') -leftparagraph(5.7*scale; baselineskip = 1.5*textht, - `dimension_(from A to B,0.3,svg_it(AB),20bp__)', - `dimension_(from C to B,,svg_it(X),16bp__)', - `dimension_(from C to A,0.3,svg_it(CA),14bp__,,->)', - `dimension_(from D to B,-0.3,"svg_it(DB)" ljust)', - `dimension_(from C to D chop dotrad_,,svg_it(T`'svg_sub(15)),15bp__)', + exec sprintf("{ `\"$%g \"' wid 4.5*scale ljust }; ",i) } ] } + +leftparagraph(1.7*scale; baselineskip = 1.5*textht, + `dimension_(from A to B,0.3,AB,20bp__)', + `dimension_(from C to B,,X,16bp__)', + `dimension_(from C to A,0.3,CA,14bp__,,->)', + `dimension_(from D to B,-0.3,"DB" ljust)', + `dimension_(from C to D chop dotrad_,,T`'svg_sub(15),15bp__)', `arcdimension_'svg_symbol(&`#'40;)`from C to D with .c at 0.5 \ between A and B'svg_comma`12bp__'svg_comma, - svg_ensp `svg_it(C) to svg_it(D)'svg_comma`34bp__'svg_symbol(&`#'41;) + svg_ensp `C to D'svg_comma`34bp__'svg_symbol(&`#'41;) ) with .nw at Q ] with .nw at 1st [].ne+(1.7*sk,0) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx index 91bc93f48e9..825c1d5cf4e 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx @@ -107,16 +107,29 @@ There are a number of other issues: They are subject to change: <ul> <li> - m4tt`'svg_font(</g>font-face,height,textoffset,dpic commands`'m4tt)</g>: - Change font face, size, and dpic textoffset parameter. + m4tt`'svg_font(</g>font-face,nominal size[:dptextratio],textoffset, + dpic commands`'m4tt)</g>: + Change font face, size, textratio and dpic textoffset parameters. + Change font face and dpic m4tt`'textht</g>, m4tt`'dptextratio</g>, + and m4tt`'textoffset</g> parameters. If arg4 is blank, the font is changed and requires m4tt`'command "</g>"</g> to cancel the font change. + <br> + Note: + Nominal height = text height in drawing units; actual height = + nominal ht x m4tt`'dptextratio</g>. + <br> Examples: <br> m4tt`'svg_font(Times)</g><br> + m4tt`'svg_font(Times,14bp__)</g><br> + m4tt`'svg_font(sans-serif,14bp__:0.71)</g><br> m4tt`'svg_font(Times,11bp__,1bp__,"text" at A)</g><br> m4tt`'svg_font(font-family="Times")</g><br> m4tt`'svg_font(font-family="Times" font-style="italic")</g><br> m4tt`'svg_font(style="font-family:Times; font-style:italic")</g> + <li>m4tt svgfontratio(</g>font name`'m4tt)</g>; + Reasonable m4tt`'dptextratio</g> value for common fonts, used + by m4tt`'svg_font</g>. <li>m4tt svg_tspan(</g>text attributes, text`'m4tt)</g>; e.g. m4tt`'svg_tspan(font-style="italic" font-size="75%",XYZ)</g> <li>m4tt svg_it(</g>text`'m4tt)</g>: for italics @@ -131,6 +144,13 @@ There are a number of other issues: subscript <li>m4tt svg_sup(</g>text, size percent, y displ, x displ`'m4tt)</g>: superscript + <li>m4tt svg_rot(</g>degrees, "text" [at position]`'m4tt)</g>: + Rotate text degrees (default 90) ccw. + Requires m4tt`'svg_rot_init(</g>filename`'m4tt)</g> and the source + must be processed twice. + <li>m4tt svg_rot_init(</g>filename`'m4tt)</g>: + filename is the basename of the output of + m4tt`'dpic -v filename.pic > filename.svg`'m4tt <li>m4tt svg_symbol(</g>text`'m4tt)</g>: allow quoted pound sign in text, e.g., m4tt`'svg_symbol(10&`#'176;)</g> produces 10° <li>m4tt svgLink(</g>URL, drawing object, m4tt[B])</g>: @@ -140,103 +160,63 @@ There are a number of other issues: arg 3 = B) <li>m4tt svgLinkString</g> as above but for strings attached to objects <li> Greek and other symbols: + +<table cellpadding="0" cellspacing="0" width="100%" > <table cellpadding="0" cellspacing="0" width="100%" > <tr> -<td width="7%"> m4tt svg_alpha</g> - <td align="left"> changecom(,)&`#'945;changecom(`#') -<td width="7%"> m4tt svg_beta</g> - <td align="left"> changecom(,)&`#'946;changecom(`#') -<td width="7%"> m4tt svg_chi</g> - <td align="left"> changecom(,)&`#'967;changecom(`#') -<td width="7%"> m4tt svg_comma</g> - <td align="left"> changecom(,)&`#'44;changecom(`#') -<td width="7%"> m4tt svg_Delta</g> - <td align="left"> changecom(,)&`#'916;changecom(`#') -<td width="7%"> m4tt svg_delta</g> - <td align="left"> changecom(,)&`#'948;changecom(`#') -<td width="7%"> m4tt svg_epsilon</g> - <td align="left"> changecom(,)&`#'949;changecom(`#') -<td width="7%"> m4tt svg_eta</g> - <td align="left"> changecom(,)&`#'951;changecom(`#') +<td width="8%"> m4tt svg_alpha</g> <td align="left"> changecom(,)&`#'945;changecom(`#') +<td width="8%"> m4tt svg_beta</g> <td align="left"> changecom(,)&`#'946;changecom(`#') +<td width="8%"> m4tt svg_Gamma</g> <td align="left"> changecom(,)&`#'915;changecom(`#') +<td width="8%"> m4tt svg_gamma</g> <td align="left"> changecom(,)&`#'947;changecom(`#') +<td width="8%"> m4tt svg_Delta</g> <td align="left"> changecom(,)&`#'916;changecom(`#') +<td width="8%"> m4tt svg_delta</g> <td align="left"> changecom(,)&`#'948;changecom(`#') +<td width="10%"> m4tt svg_epsilon</g> <td align="left"> changecom(,)&`#'949;changecom(`#') +<td width="8%"> m4tt svg_zeta</g> <td align="left"> changecom(,)&`#'950;changecom(`#') <tr> -<td width="7%"> m4tt svg_Gamma</g> - <td align="left"> changecom(,)&`#'915;changecom(`#') -<td width="7%"> m4tt svg_gamma</g> - <td align="left"> changecom(,)&`#'947;changecom(`#') -<td width="7%"> m4tt svg_iota</g> - <td align="left"> changecom(,)&`#'953;changecom(`#') -<td width="7%"> m4tt svg_kappa</g> - <td align="left"> changecom(,)&`#'954;changecom(`#') -<td width="7%"> m4tt svg_Lambda</g> - <td align="left"> changecom(,)&`#'923;changecom(`#') -<td width="7%"> m4tt svg_lambda</g> - <td align="left"> changecom(,)&`#'955;changecom(`#') -<td width="7%"> m4tt svg_micro</g> - <td align="left"> changecom(,)&`#'956;changecom(`#') -<td width="7%"> m4tt svg_mu</g> - <td align="left"> changecom(,)&`#'956;changecom(`#') +<td width="8%"> m4tt svg_eta</g> <td align="left"> changecom(,)&`#'951;changecom(`#') +<td width="8%"> m4tt svg_Theta</g> <td align="left"> changecom(,)&`#'920;changecom(`#') +<td width="8%"> m4tt svg_theta</g> <td align="left"> changecom(,)&`#'952;changecom(`#') +<td width="8%"> m4tt svg_iota</g> <td align="left"> changecom(,)&`#'953;changecom(`#') +<td width="8%"> m4tt svg_kappa</g> <td align="left"> changecom(,)&`#'954;changecom(`#') +<td width="8%"> m4tt svg_Lambda</g> <td align="left"> changecom(,)&`#'923;changecom(`#') +<td width="8%"> m4tt svg_lambda</g> <td align="left"> changecom(,)&`#'955;changecom(`#') +<td width="8%"> m4tt svg_mu</g> <td align="left"> changecom(,)&`#'956;changecom(`#') <tr> -<td width="7%"> m4tt svg_nu</g> - <td align="left"> changecom(,)&`#'957;changecom(`#') -<td width="7%"> m4tt svg_ohm</g> - <td align="left"> changecom(,)&`#'937;changecom(`#') -<td width="7%"> m4tt svg_Omega</g> - <td align="left"> changecom(,)&`#'937;changecom(`#') -<td width="7%"> m4tt svg_omega</g> - <td align="left"> changecom(,)&`#'969;changecom(`#') -<td width="7%"> m4tt svg_Phi</g> - <td align="left"> changecom(,)&`#'934;changecom(`#') -<td width="7%"> m4tt svg_phi</g> - <td align="left"> changecom(,)&`#'966;changecom(`#') -<td width="7%"> m4tt svg_Pi</g> - <td align="left"> changecom(,)&`#'928;changecom(`#') -<td width="7%"> m4tt svg_pi</g> - <td align="left"> changecom(,)&`#'960;changecom(`#') +<td width="8%"> m4tt svg_nu</g> <td align="left"> changecom(,)&`#'957;changecom(`#') +<td width="8%"> m4tt svg_Xi</g> <td align="left"> changecom(,)&`#'926;changecom(`#') +<td width="8%"> m4tt svg_xi</g> <td align="left"> changecom(,)&`#'958;changecom(`#') +<td width="8%"> m4tt svg_Pi</g> <td align="left"> changecom(,)&`#'928;changecom(`#') +<td width="8%"> m4tt svg_pi</g> <td align="left"> changecom(,)&`#'960;changecom(`#') +<td width="8%"> m4tt svg_rho</g> <td align="left"> changecom(,)&`#'961;changecom(`#') +<td width="8%"> m4tt svg_Sigma</g> <td align="left"> changecom(,)&`#'931;changecom(`#') +<td width="8%"> m4tt svg_sigma</g> <td align="left"> changecom(,)&`#'963;changecom(`#') <tr> -<td width="7%"> m4tt svg_Psi</g> - <td align="left"> changecom(,)&`#'936;changecom(`#') -<td width="7%"> m4tt svg_psi</g> - <td align="left"> changecom(,)&`#'968;changecom(`#') -<td width="7%"> m4tt svg_rho</g> - <td align="left"> changecom(,)&`#'961;changecom(`#') -<td width="7%"> m4tt svg_Sigma</g> - <td align="left"> changecom(,)&`#'931;changecom(`#') -<td width="7%"> m4tt svg_sigma</g> - <td align="left"> changecom(,)&`#'963;changecom(`#') -<td width="7%"> m4tt svg_tau</g> - <td align="left"> changecom(,)&`#'964;changecom(`#') -<td width="7%"> m4tt svg_Theta</g> - <td align="left"> changecom(,)&`#'920;changecom(`#') -<td width="7%"> m4tt svg_theta</g> - <td align="left"> changecom(,)&`#'952;changecom(`#') +<td width="8%"> m4tt svg_tau</g> <td align="left"> changecom(,)&`#'964;changecom(`#') +<td width="10%"> m4tt svg_upsilon</g> <td align="left"> changecom(,)&`#'965;changecom(`#') +<td width="8%"> m4tt svg_Phi</g> <td align="left"> changecom(,)&`#'934;changecom(`#') +<td width="8%"> m4tt svg_phi</g> <td align="left"> changecom(,)&`#'966;changecom(`#') +<td width="8%"> m4tt svg_chi</g> <td align="left"> changecom(,)&`#'967;changecom(`#') +<td width="8%"> m4tt svg_Psi</g> <td align="left"> changecom(,)&`#'936;changecom(`#') +<td width="8%"> m4tt svg_psi</g> <td align="left"> changecom(,)&`#'968;changecom(`#') +<td width="8%"> m4tt svg_Omega</g> <td align="left"> changecom(,)&`#'937;changecom(`#') <tr> -<td width="7%"> m4tt svg_upsilon</g> - <td align="left"> changecom(,)&`#'965;changecom(`#') -<td width="7%"> m4tt svg_Xi</g> - <td align="left"> changecom(,)&`#'926;changecom(`#') -<td width="7%"> m4tt svg_xi</g> - <td align="left"> changecom(,)&`#'958;changecom(`#') -<td width="7%"> m4tt svg_zeta</g> - <td align="left"> changecom(,)&`#'950;changecom(`#') -<td width="7%"> m4tt svg_lt</g> - <td align="left"> changecom(,)&`#'60;changecom(`#') -<td width="7%"> m4tt svg_gt</g> - <td align="left"> changecom(,)&`#'62;changecom(`#') -<td width="7%"> m4tt svg_leq</g> - <td align="left"> changecom(,)&`#'8804;changecom(`#') -<td width="7%"> m4tt svg_geq</g> - <td align="left"> changecom(,)&`#'8805;changecom(`#') +<td width="8%"> m4tt svg_omega</g> <td align="left"> changecom(,)&`#'969;changecom(`#') +<td width="8%"> m4tt svg_micro</g> <td align="left"> changecom(,)&`#'956;changecom(`#') +<td width="8%"> m4tt svg_ohm</g> <td align="left"> changecom(,)&`#'937;changecom(`#') +<td width="8%"> m4tt svg_lt</g> <td align="left"> changecom(,)&`#'60;changecom(`#') +<td width="8%"> m4tt svg_gt</g> <td align="left"> changecom(,)&`#'62;changecom(`#') +<td width="8%"> m4tt svg_leq</g> <td align="left"> changecom(,)&`#'8804;changecom(`#') +<td width="8%"> m4tt svg_geq</g> <td align="left"> changecom(,)&`#'8805;changecom(`#') +<td width="8%"> m4tt svg_prime</g> <td align="left"> changecom(,)&`#'8242;changecom(`#') <tr> -<td width="7%"> m4tt svg_prime</g> - <td align="left"> changecom(,)&`#'8242;changecom(`#') -<td width="7%"> m4tt svg_ensp</g> - <td align="left"> |changecom(,)&`#'8194;changecom(`#')| -<td width="7%"> m4tt svg_emsp</g> - <td align="left"> |changecom(,)&`#'8195;changecom(`#')| -<td width="7%"> m4tt svg_thinsp</g> - <td align="left"> |changecom(,)&`#'8201;changecom(`#')| -<td width="7%"> m4tt svg_backsl</g> - <td align="left"> changecom(,)&`#'92;changecom(`#') +<td width="8%"> m4tt svg_backsl</g> <td align="left"> changecom(,)&`#'92;changecom(`#') +<td width="8%"> m4tt svg_pound</g> <td align="left"> changecom(,)&`#'35;changecom(`#') +<td width="8%"> m4tt svg_comma</g> <td align="left"> changecom(,)&`#'44;changecom(`#') +<td width="8%"> m4tt svg_lparen</g> <td align="left"> changecom(,)&`#'40;changecom(`#') +<td width="8%"> m4tt svg_rparen</g> <td align="left"> changecom(,)&`#'41;changecom(`#') +<td width="8%"> m4tt svg_emsp</g> <td align="left"> |changecom(,)&`#'8195;changecom(`#')| +<td width="8%"> m4tt svg_ensp</g> <td align="left"> |changecom(,)&`#'8194;changecom(`#')| +<td width="8%"> m4tt svg_thinsp</g> <td align="left"> |changecom(,)&`#'8201;changecom(`#')| </table> </ul> @@ -277,6 +257,7 @@ cfig(JackSVG) cfig(ConnSVG) cfig(PconnSVG) cfig(HeadersSVG) +cfig(ConnectorsSVG) cfig(fetSVG) cfig(ujtSVG) cfig(thyristorSVG) @@ -285,7 +266,7 @@ cfig(TgateSVG) cfig(NportSVG) cfig(NLGSVG) cfig(WindingsSVG) -cfig(ex01.m4) +cfig(ex01SVG) cfig(TimerSVG) cfig(OptoisoSVG) cfig(MixerSVG) @@ -328,6 +309,7 @@ cfig(CanLogicSVG) cfig(AlogixSVG) cfig(ABlogixSVG) cfig(XORSVG) +cfig(paletteSVG) cfig(ex00SVG) cfig(controlSVG) cfig(GrayCodeSVG) @@ -355,6 +337,11 @@ cfig(ex15SVG) cfig(CountingSVG) cfig(CrowSVG) cfig(FlowSVG) + <!-- <p> + More flow-chart examples? Try + <a href="https://buraphakit.sourceforge.io/EFI/EFI_2019_S2_W13.shtml" + TARGET="_blank">here.</a> + </p> --> cfig(BtreeSVG) cfig(TtreeSVG) cfig(InclepsSVG) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/graysurfSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/graysurfSVG.m4 index 5427b62afc3..13c91aabc05 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/graysurfSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/graysurfSVG.m4 @@ -1,7 +1,7 @@ .PS # graysurfSVG.m4 threeD_init -copy "HOMELIB_/dpictools.pic" +NeedDpicTools Overall: [ [] diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/icsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/icsSVG.m4 index 9a1f40634a7..0733bbef646 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/icsSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/icsSVG.m4 @@ -1,9 +1,10 @@ divert(-1) - Macros defining some integrated circuits + Macros defining some integrated circuits and connectors define(`lg_pinsep',3*L_unit) logic pin separation in logic units define(`lg_chipwd',18*L_unit) default chip width +define(`overbar_',`{ line right last "".wid with .c at last "".n+(0,1bp__) }') `A sequence of pins along the east or west side of a chip: lg_pinseq(initial pin no,final pin no, @@ -15,19 +16,17 @@ define(`lg_pinseq',`for_($1,$2,1, define(`ic6116',`[ Chip: box wid_ lg_chipwd ht_ 15*lg_pinsep lg_pin(Chip.sw_+(0,lg_pinsep),GND,Pin12,w,12) lg_pin(Chip.sw_+(0,2*lg_pinsep),,Pin18,wN,18) - "svg_small(CS,75)" wid textht*1.5 at (Chip.w,last line) ljust - { line right last "".wid from last "".nw+(1,0)*textoffset } + "svg_small(CS,75)" wid textht*1.5 at (Chip.w,last line) ljust; overbar_ lg_pinseq(0,2,w,4,9+,D) lg_pinseq(3,7,w,4,10+,D) lg_pin(Chip.sw_+(0,13*lg_pinsep),,Pin21,w,21) "svg_small(R/W,75)" wid textht*2.0 at (Chip.w,last line) ljust - { line right last "".wid/2 from last "".n+(2,0)*textoffset } + { line right last "".wid/2 from last "".n+(0,1bp__) } lg_pin(Chip.sw_+(0,14*lg_pinsep),V`'svg_small(CC,75),Pin24,w,24) lg_pin(Chip.se_+(0,lg_pinsep),,Pin20,eN,20) - "svg_small(OE,75)" wid textht*1.5 at (Chip.e,last line) rjust - { line left last "".wid from last "".ne+(-1,0)*textoffset } + "svg_small(OE,75)" wid textht*1.5 at (Chip.e,last line) rjust; overbar_ lg_pinseq(0,7,e,3,8-,A) lg_pinseq(8,9,e,3,31-,A) @@ -39,17 +38,15 @@ define(`ic6502',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep lg_pin(Chip.sw_+(0,2*lg_pinsep),V`'svg_small(SS,75),Pin1,w,1) lg_pin(Chip.sw_+(0,4*lg_pinsep),,Pin34,w,34) "svg_small(R/W,75)" wid textht*2.0 at (Chip.w,last line) ljust - { line right last "".wid/2 from last "".n+(2,0)*textoffset } + { line right last "".wid/2 from last "".n+(0,1bp__) } lg_pinseq(0,7,w,6,33-,D) lg_pin(Chip.sw_+(0,15*lg_pinsep),,Pin40,wN,40) - "svg_small(RESET,75)" wid textht*3.8 at (Chip.w,last line) ljust - { line right last "".wid from last "".nw+(1,0)*textoffset } + "svg_small(RESET,75)" wid textht*3.8 at (Chip.w,last line) ljust; overbar_ lg_pin(Chip.sw_+(0,17*lg_pinsep),SYNC,Pin7,w,7) lg_pin(Chip.sw_+(0,19*lg_pinsep),,Pin6,wN,6) - "svg_small(NMI,75)" wid textht*2.1 at (Chip.w,last line) ljust - { line right last "".wid from last "".nw+(1,0)*textoffset } + "svg_small(NMI,75)" wid textht*2.1 at (Chip.w,last line) ljust; overbar_ lg_pin(Chip.sw_+(0,21*lg_pinsep),RDY,Pin2,w,2) lg_pin(Chip.sw_+(0,22*lg_pinsep),SO,Pin38,w,38) @@ -59,8 +56,7 @@ define(`ic6502',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep lg_pinseq(0,11,e,6,9+,A) lg_pinseq(12,15,e,6,10+,A) lg_pin(Chip.se+(0,23*lg_pinsep),,Pin4,eN,4) - "svg_small(IRQ,75)" wid textht*2.0 at (Chip.e,last line) rjust - { line left last "".wid from last "".ne+(-1,0)*textoffset } + "svg_small(IRQ,75)" wid textht*2.0 at (Chip.e,last line) rjust; overbar_ `$1']') define(`ic6522',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep @@ -68,8 +64,7 @@ define(`ic6522',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep lg_pin(Chip.sw_+(0,3*lg_pinsep),CS1,Pin24,w,24) lg_pin(Chip.sw_+(0,4*lg_pinsep),CK,Pin25,w,25) lg_pin(Chip.sw_+(0,5*lg_pinsep),,Pin23,wN,23) - "svg_small(CS2,75)" wid textht*2.2 at (Chip.w,last line) ljust - { line right last "".wid from last "".nw+(1,0)*textoffset } + "svg_small(CS2,75)" wid textht*2.2 at (Chip.w,last line) ljust; overbar_ lg_pin(Chip.sw_+(0,7*lg_pinsep),RS0(A0),Pin38,w,38) lg_pin(Chip.sw_+(0,8*lg_pinsep),RS1(A1),Pin37,w,37) @@ -78,11 +73,10 @@ define(`ic6522',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep lg_pinseq(0,7,w,12,33-,D) lg_pin(Chip.sw_+(0,21*lg_pinsep),,Pin22,w,22) "svg_small(R/W,75)" wid textht*2.0 at (Chip.w,last line) ljust - { line right last "".wid/2 from last "".n+(2,0)*textoffset } + { line right last "".wid/2 from last "".n+(0,1bp__) } lg_pin(Chip.sw_+(0,22*lg_pinsep),,Pin21,wN,21) - "svg_small(IRQ,75)" wid textht*2.0 at (Chip.w,last line) ljust - { line right last "".wid from last "".nw+(1,0)*textoffset } + "svg_small(IRQ,75)" wid textht*2.0 at (Chip.w,last line) ljust; overbar_ lg_pin(Chip.sw_+(0,23*lg_pinsep),V`'svg_small(CC,75),Pin20,w,20) lg_pinseq(0,7,e,1,10+,PB) @@ -90,20 +84,17 @@ define(`ic6522',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep lg_pinseq(0,7,e,12,2+,PA) lg_pinseq(1,2,e,19,41-,CA) lg_pin(Chip.se_+(0,23*lg_pinsep),,Pin34,eN,34) - "svg_small(RESET,75)" wid textht*3.8 at (Chip.e,last line) rjust - { line left last "".wid from last "".ne+(-1,0)*textoffset } + "svg_small(RESET,75)" wid textht*3.8 at (Chip.e,last line) rjust; overbar_ `$1']') define(`ic74LS138',`[ Chip: box wid_ lg_chipwd ht_ 11*lg_pinsep lg_pin(Chip.sw_+(0,lg_pinsep),GND,Pin8,w,8) lg_pin(Chip.sw_+(0,2*lg_pinsep),,Pin4,wN,4) - "svg_small(G2a,75)" wid textht*2.0 at (Chip.w,last line) ljust - { line right last "".wid from last "".nw+(1,0)*textoffset } + "svg_small(G2a,75)" wid textht*2.0 at (Chip.w,last line) ljust; overbar_ lg_pin(Chip.sw_+(0,3*lg_pinsep),,Pin5,wN,5) - "svg_small(G2b,75)" wid textht*2.0 at (Chip.w,last line) ljust - { line right last "".wid from last "".nw+(1,0)*textoffset } + "svg_small(G2b,75)" wid textht*2.0 at (Chip.w,last line) ljust; overbar_ lg_pin(Chip.sw_+(0,5*lg_pinsep),A,Pin1,w,1) lg_pin(Chip.sw_+(0,6*lg_pinsep),B,Pin2,w,2) @@ -114,4 +105,154 @@ define(`ic74LS138',`[ Chip: box wid_ lg_chipwd ht_ 11*lg_pinsep lg_pin(Chip.se_+(0,9*lg_pinsep),Y7,Pin7,eN,7) `$1']') + `ArduinoUno( wid,ht,pinlen )' +define(`ArduinoUno',`[ + define(`m4bwid',`ifelse(`$1',,`24*L_unit',`$1')')dnl + define(`m4bht',`ifelse(`$2',,`20*lg_pinsep',`$2')')dnl +# + + Connector: box wid m4bwid ht m4bht +# + plen = ifelse(`$4',,`2*L_unit',`$4') +# +Loopover_(`x',`ifelse(x,nul,, + `Pin`'eval(5+m4Lx): line left_ plen from Connector.nw-(0,(5+m4Lx)*lg_pinsep) + { "x" ljust at last line.start }')', + IOREF, RESET,`+`'3V3',`+`'5V', GND, GND, VIN, + nul, A0, A1, A2, A3, A4, A5) +# +Loopover_(`x',`ifelse(x,nul,, + `Pin`'eval(22-m4Lx): line right_ plen from Connector.ne-(0,m4Lx*lg_pinsep) + { "x" rjust at last line.start }')', + SCL, SDA, AREF, GND, D13, D12, ~D11, ~D10, ~D9, D8, + nul, D7, ~D6, ~D5, D4, ~D3, D2, TX D1, RX D0) +# + `$4'] ') + + `ArduinoLeonardo( wid,ht,pinlen )' +define(`ArduinoLeonardo',`[ + define(`m4bwid',`ifelse(`$1',,`24*L_unit',`$1')')dnl + define(`m4bht',`ifelse(`$2',,`20*lg_pinsep',`$2')')dnl +# + Connector: box wid m4bwid ht m4bht +# + plen = ifelse(`$4',,`2*L_unit',`$4') +# +Loopover_(`x',`ifelse(x,nul,, + `Pin`'eval(5+m4Lx): line left_ plen from Connector.nw-(0,(5+m4Lx)*lg_pinsep) + { "x" ljust at last line.start }')', + IOREF, RESET,`+`'3V3',`+`'5V', GND, GND, VIN, + nul, A0, A1, A2, A3, A4, A5) +# +Loopover_(`x',`ifelse(x,nul,, + `Pin`'eval(22-m4Lx): line right_ plen from Connector.ne-(0,m4Lx*lg_pinsep) + { "x" rjust at last line.start }')', + SCL, SDA, AREF, GND, + ~D13, D12, ~D11, ~D10, ~D9, D8, + nul, D7, ~D6, ~D5, D4, ~D3, D2, TX D1, RX D0) +# + `$4'] ') + + `RPi( wid,ht,pinlen )' +define(`RPi',`[ + define(`m4bwid',`ifelse(`$1',,`34*L_unit',`$1')')dnl + define(`m4bht',`ifelse(`$2',,`21*lg_pinsep',`$2')')dnl +# + GPIO: box wid m4bwid ht m4bht + plen = ifelse(`$4',,`6*L_unit',`$4') +# +define A_LeftGPIO { + exec sprintf("Pin%g: line left_ plen from GPIO.nw-(0,%g)",\ + 2*(`$'1)-1,(`$'1)*lg_pinsep) + { "`$'3" ljust at last line.start } + "`$'2" at last line.c above } +# +Loopover_(`x',`ifelse(x,nul,,`A_LeftGPIO(m4Lx,patsubst(x,;,`,'))')', + ;3V3, + 2;SDA1, 3;SCL1, 4;GPIO_GCLK, + ;GND, + 17;GPIO_GEN0, 27;GPIO_GEN2, 22;GPIO_GEN3, + ;3V3, + 10;SPI_MOSI, 9;SPI_MISO, 11;SPI_SCLK, + ;GND, + ;ID_SD, + 5;, 6;, 13;, 19;, 26;, + ;GND ) +# +define A_RightGPIO { + exec sprintf("Pin%g: line right_ plen from GPIO.ne-(0,%g)",\ + 2*(`$'1),(`$'1)*lg_pinsep) + { "`$'3" rjust at last line.start } + "`$'2" at last line.c above } +# +Loopover_(`x',`ifelse(x,nul,,`A_RightGPIO(m4Lx,patsubst(x,;,`,'))')', + ;5V, + ;5V, + ;GND, + 14;TXD0, 15;RXD0, 18;GPIO_GEN1, + ;GND, + 23;GPIO_GEN4, 24;GPIO_GEN5, + ;GND, + 25;GPIO_GEN6, 8;SPI_CEO_N, 7;SPI_CE1_N, + ;ID_SC, + ;GND, + 12;, + ;GND, + 16;, 20;, 21; ) +# + `$4'] ') + + `USB_C_Socket( wid, ht, pinlen )' +define(`USB_C_Socket',`[ + define(`m4bwid',`ifelse(`$1',,`18*L_unit',`$1')')dnl + define(`m4bht',`ifelse(`$2',,`14*lg_pinsep',`$2')')dnl +# + Base: box wid m4bwid ht m4bht rad 5/3*lg_pinsep + plen = ifelse(`$4',,`6*L_unit',`$4') +# + Loopover_(`x', + `B`'eval(13-m4Lx): dnl + line left_ plen from Base.n-(m4bwid/2,(m4Lx+0.5)*lg_pinsep) + {"x" ljust at last line.start}', + GND, RX1+, RX1-, VBUS, SBU2, D-, D+, CC2, VBUS, TX2-, TX2+, GND) +# + Loopover_(`x', + `A`'m4Lx: line right_ plen from Base.n+(m4bwid/2,-(m4Lx+0.5)*lg_pinsep) + {"x" rjust at last line.start}', + GND, TX1+, TX1-, VBUS, CC1, D+, D-, SBU1, VBUS, RX2-, RX2+, GND) +# + `$4']') + + `HDMI_micro( wid, ht, pinlen )' +define(`HDMI_micro',`[ + define(`m4bwid',`ifelse(`$1',,`16*L_unit',`$1')')dnl + define(`m4bht',`ifelse(`$2',,`19*lg_pinsep+m4bwid*2/3',`$2')')dnl +# + Base:[line up m4bht/2 then right m4bwid*2/3 \ + then right m4bwid/3 down m4bwid/3 \ + then down m4bht-2*m4bwid/3 then down m4bwid/3 left m4bwid/3 \ + then left m4bwid*2/3 then to Here] + plen = ifelse(`$4',,`6*L_unit',`$4') +# + Loopover_(`x', + `Pin`'m4Lx: line left_ plen from Base.nw-(0,m4bwid/3+(m4Lx-1/2)*lg_pinsep) + {"x" ljust at last line.start} + "m4Lx" at last line.c above', + HPD, UTILITY, D2+, D2_SH, D2-, D1+, D1_SH, D1-, D0+, D0_SH, + D0-, CLK+, CLK_SH, CLK-, CEC, GND, SCL, SDA, +5V) + line from Base.nw+(m4bwid*2/3-lg_pinsep,0) up plen + svg_rot(90,"21" at last line.c +(-2bp__,0)) + svg_rot(90,sprintf("SH2") at last line.start + (4bp__,-8bp__)) + line from Base.nw+(m4bwid*2/3-2*lg_pinsep,0) up plen + svg_rot(90,"20" at last line.c+(-2bp__,0)) + svg_rot(90,"SH1" at last line.start + (4bp__,-8bp__)) + line from Base.sw+(m4bwid*2/3-lg_pinsep,0) down plen + svg_rot(90,"23" at last line.c+(-2bp__,0)) + svg_rot(90,"SH4" at last line.start + (4bp__,14bp__)) + line from Base.sw+(m4bwid*2/3-2*lg_pinsep,0) down plen + svg_rot(90,"22" at last line.c+(-2bp__,0)) + svg_rot(90,"SH3" at last line.start + (4bp__,14bp__)) +# + `$4']') + divert(0)dnl diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/lcctSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/lcctSVG.m4 index 9994b323090..ba25e601726 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/lcctSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/lcctSVG.m4 @@ -1,7 +1,7 @@ .PS # lcctSVG.m4 maxpswid = 10 -log_init(svg_font(sans-serif,11bp__,1bp__)) +log_init(svg_font(sans-serif,11bp__,2bp__)) include(icsSVG.m4) textht = textht * 0.9 diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/paletteSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/paletteSVG.m4 index 2a26afdb991..2bad59ba93a 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/paletteSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/paletteSVG.m4 @@ -333,7 +333,7 @@ A:Gridbox( FlipFlop(D) ] with .nw at (0,0) -"A draft palette of elements for Inkscape using a 1 mm grid" \ +"A draft palette of a few elements for Inkscape using a 1 mm grid" \ ljust below at last [].sw command "</g>" # end font diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/recycleSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/recycleSVG.m4 index d6246cc9ab2..135f31414e3 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/recycleSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/recycleSVG.m4 @@ -1,7 +1,7 @@ .PS # recycle.m4 gen_init -copy "HOMELIB_`'dpictools.pic" +NeedDpicTools [ # Gradient fill and clipping are simply # done with PStricks or Tikz but the other diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx index f15d09b7c71..6bb5ab2029e 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx @@ -60,16 +60,28 @@ more basic. <ul> <ul> <li> - m4tt`'svg_font(</g>font-face,height,textoffset,dpic commands`'m4tt)</g>: - Change font face, size, and dpic textoffset parameter. + m4tt`'svg_font(</g>font-face,nominal size[:dptextratio],textoffset, + dpic commands`'m4tt)</g>: + Change font face and dpic m4tt`'textht</g>, m4tt`'dptextratio</g>, + and m4tt`'textoffset</g> parameters. If arg4 is blank, the font is changed and requires m4tt`'command "</g>"</g> to cancel the font change. + <br> + Note: + Nominal height = text height in drawing units; actual height = + nominal ht x m4tt`'dptextratio</g>. + <br> Examples: <br> m4tt`'svg_font(Times)</g><br> + m4tt`'svg_font(Times,14bp__)</g><br> + m4tt`'svg_font(sans-serif,14bp__:0.71)</g><br> m4tt`'svg_font(Times,11bp__,1bp__,"text" at A)</g><br> m4tt`'svg_font(font-family="Times")</g><br> m4tt`'svg_font(font-family="Times" font-style="italic")</g><br> m4tt`'svg_font(style="font-family:Times; font-style:italic")</g> + <li>m4tt svgfontratio(</g>font name`'m4tt)</g>; + Reasonable m4tt`'dptextratio</g> value for common fonts, used + by m4tt`'svg_font</g>. <li>m4tt svg_tspan(</g>text attributes, text`'m4tt)</g>; e.g. m4tt`'svg_tspan(font-style="italic" font-size="75%",XYZ)</g> <li>m4tt svg_it(</g>text`'m4tt)</g>: for italics @@ -84,6 +96,13 @@ more basic. subscript <li>m4tt svg_sup(</g>text, size percent, y displ, x displ`'m4tt)</g>: superscript + <li>m4tt svg_rot(</g>degrees, "text" [at position]`'m4tt)</g>: + Rotate text degrees (default 90) ccw. + Requires m4tt`'svg_rot_init(</g>filename`'m4tt)</g> and the source + must be processed twice. + <li>m4tt svg_rot_init(</g>filename`'m4tt)</g>: + filename is the basename of the output of + m4tt`'dpic -v filename.pic > filename.svg`'m4tt <li>m4tt svg_symbol(</g>text`'m4tt)</g>: allow quoted pound sign in text, e.g., m4tt`'svg_symbol(10&`#'176;)</g> produces 10° <li>m4tt svgLink(</g>URL, drawing object, m4tt[B])</g>: @@ -96,102 +115,61 @@ more basic. <table cellpadding="0" cellspacing="0" width="100%" > <tr> -<td width="7%"> m4tt svg_alpha</g> - <td align="left"> changecom(,)&`#'945;changecom(`#') -<td width="7%"> m4tt svg_beta</g> - <td align="left"> changecom(,)&`#'946;changecom(`#') -<td width="7%"> m4tt svg_chi</g> - <td align="left"> changecom(,)&`#'967;changecom(`#') -<td width="7%"> m4tt svg_comma</g> - <td align="left"> changecom(,)&`#'44;changecom(`#') -<td width="7%"> m4tt svg_Delta</g> - <td align="left"> changecom(,)&`#'916;changecom(`#') -<td width="7%"> m4tt svg_delta</g> - <td align="left"> changecom(,)&`#'948;changecom(`#') -<td width="7%"> m4tt svg_epsilon</g> - <td align="left"> changecom(,)&`#'949;changecom(`#') -<td width="7%"> m4tt svg_eta</g> - <td align="left"> changecom(,)&`#'951;changecom(`#') +<td width="8%"> m4tt svg_alpha</g> <td align="left"> changecom(,)&`#'945;changecom(`#') +<td width="8%"> m4tt svg_beta</g> <td align="left"> changecom(,)&`#'946;changecom(`#') +<td width="8%"> m4tt svg_Gamma</g> <td align="left"> changecom(,)&`#'915;changecom(`#') +<td width="8%"> m4tt svg_gamma</g> <td align="left"> changecom(,)&`#'947;changecom(`#') +<td width="8%"> m4tt svg_Delta</g> <td align="left"> changecom(,)&`#'916;changecom(`#') +<td width="8%"> m4tt svg_delta</g> <td align="left"> changecom(,)&`#'948;changecom(`#') +<td width="10%"> m4tt svg_epsilon</g> <td align="left"> changecom(,)&`#'949;changecom(`#') +<td width="8%"> m4tt svg_zeta</g> <td align="left"> changecom(,)&`#'950;changecom(`#') <tr> -<td width="7%"> m4tt svg_Gamma</g> - <td align="left"> changecom(,)&`#'915;changecom(`#') -<td width="7%"> m4tt svg_gamma</g> - <td align="left"> changecom(,)&`#'947;changecom(`#') -<td width="7%"> m4tt svg_iota</g> - <td align="left"> changecom(,)&`#'953;changecom(`#') -<td width="7%"> m4tt svg_kappa</g> - <td align="left"> changecom(,)&`#'954;changecom(`#') -<td width="7%"> m4tt svg_Lambda</g> - <td align="left"> changecom(,)&`#'923;changecom(`#') -<td width="7%"> m4tt svg_lambda</g> - <td align="left"> changecom(,)&`#'955;changecom(`#') -<td width="7%"> m4tt svg_micro</g> - <td align="left"> changecom(,)&`#'956;changecom(`#') -<td width="7%"> m4tt svg_mu</g> - <td align="left"> changecom(,)&`#'956;changecom(`#') +<td width="8%"> m4tt svg_eta</g> <td align="left"> changecom(,)&`#'951;changecom(`#') +<td width="8%"> m4tt svg_Theta</g> <td align="left"> changecom(,)&`#'920;changecom(`#') +<td width="8%"> m4tt svg_theta</g> <td align="left"> changecom(,)&`#'952;changecom(`#') +<td width="8%"> m4tt svg_iota</g> <td align="left"> changecom(,)&`#'953;changecom(`#') +<td width="8%"> m4tt svg_kappa</g> <td align="left"> changecom(,)&`#'954;changecom(`#') +<td width="8%"> m4tt svg_Lambda</g> <td align="left"> changecom(,)&`#'923;changecom(`#') +<td width="8%"> m4tt svg_lambda</g> <td align="left"> changecom(,)&`#'955;changecom(`#') +<td width="8%"> m4tt svg_mu</g> <td align="left"> changecom(,)&`#'956;changecom(`#') <tr> -<td width="7%"> m4tt svg_nu</g> - <td align="left"> changecom(,)&`#'957;changecom(`#') -<td width="7%"> m4tt svg_ohm</g> - <td align="left"> changecom(,)&`#'937;changecom(`#') -<td width="7%"> m4tt svg_Omega</g> - <td align="left"> changecom(,)&`#'937;changecom(`#') -<td width="7%"> m4tt svg_omega</g> - <td align="left"> changecom(,)&`#'969;changecom(`#') -<td width="7%"> m4tt svg_Phi</g> - <td align="left"> changecom(,)&`#'934;changecom(`#') -<td width="7%"> m4tt svg_phi</g> - <td align="left"> changecom(,)&`#'966;changecom(`#') -<td width="7%"> m4tt svg_Pi</g> - <td align="left"> changecom(,)&`#'928;changecom(`#') -<td width="7%"> m4tt svg_pi</g> - <td align="left"> changecom(,)&`#'960;changecom(`#') +<td width="8%"> m4tt svg_nu</g> <td align="left"> changecom(,)&`#'957;changecom(`#') +<td width="8%"> m4tt svg_Xi</g> <td align="left"> changecom(,)&`#'926;changecom(`#') +<td width="8%"> m4tt svg_xi</g> <td align="left"> changecom(,)&`#'958;changecom(`#') +<td width="8%"> m4tt svg_Pi</g> <td align="left"> changecom(,)&`#'928;changecom(`#') +<td width="8%"> m4tt svg_pi</g> <td align="left"> changecom(,)&`#'960;changecom(`#') +<td width="8%"> m4tt svg_rho</g> <td align="left"> changecom(,)&`#'961;changecom(`#') +<td width="8%"> m4tt svg_Sigma</g> <td align="left"> changecom(,)&`#'931;changecom(`#') +<td width="8%"> m4tt svg_sigma</g> <td align="left"> changecom(,)&`#'963;changecom(`#') <tr> -<td width="7%"> m4tt svg_Psi</g> - <td align="left"> changecom(,)&`#'936;changecom(`#') -<td width="7%"> m4tt svg_psi</g> - <td align="left"> changecom(,)&`#'968;changecom(`#') -<td width="7%"> m4tt svg_rho</g> - <td align="left"> changecom(,)&`#'961;changecom(`#') -<td width="7%"> m4tt svg_Sigma</g> - <td align="left"> changecom(,)&`#'931;changecom(`#') -<td width="7%"> m4tt svg_sigma</g> - <td align="left"> changecom(,)&`#'963;changecom(`#') -<td width="7%"> m4tt svg_tau</g> - <td align="left"> changecom(,)&`#'964;changecom(`#') -<td width="7%"> m4tt svg_Theta</g> - <td align="left"> changecom(,)&`#'920;changecom(`#') -<td width="7%"> m4tt svg_theta</g> - <td align="left"> changecom(,)&`#'952;changecom(`#') +<td width="8%"> m4tt svg_tau</g> <td align="left"> changecom(,)&`#'964;changecom(`#') +<td width="10%"> m4tt svg_upsilon</g> <td align="left"> changecom(,)&`#'965;changecom(`#') +<td width="8%"> m4tt svg_Phi</g> <td align="left"> changecom(,)&`#'934;changecom(`#') +<td width="8%"> m4tt svg_phi</g> <td align="left"> changecom(,)&`#'966;changecom(`#') +<td width="8%"> m4tt svg_chi</g> <td align="left"> changecom(,)&`#'967;changecom(`#') +<td width="8%"> m4tt svg_Psi</g> <td align="left"> changecom(,)&`#'936;changecom(`#') +<td width="8%"> m4tt svg_psi</g> <td align="left"> changecom(,)&`#'968;changecom(`#') +<td width="8%"> m4tt svg_Omega</g> <td align="left"> changecom(,)&`#'937;changecom(`#') <tr> -<td width="7%"> m4tt svg_upsilon</g> - <td align="left"> changecom(,)&`#'965;changecom(`#') -<td width="7%"> m4tt svg_Xi</g> - <td align="left"> changecom(,)&`#'926;changecom(`#') -<td width="7%"> m4tt svg_xi</g> - <td align="left"> changecom(,)&`#'958;changecom(`#') -<td width="7%"> m4tt svg_zeta</g> - <td align="left"> changecom(,)&`#'950;changecom(`#') -<td width="7%"> m4tt svg_lt</g> - <td align="left"> changecom(,)&`#'60;changecom(`#') -<td width="7%"> m4tt svg_gt</g> - <td align="left"> changecom(,)&`#'62;changecom(`#') -<td width="7%"> m4tt svg_leq</g> - <td align="left"> changecom(,)&`#'8804;changecom(`#') -<td width="7%"> m4tt svg_geq</g> - <td align="left"> changecom(,)&`#'8805;changecom(`#') +<td width="8%"> m4tt svg_omega</g> <td align="left"> changecom(,)&`#'969;changecom(`#') +<td width="8%"> m4tt svg_micro</g> <td align="left"> changecom(,)&`#'956;changecom(`#') +<td width="8%"> m4tt svg_ohm</g> <td align="left"> changecom(,)&`#'937;changecom(`#') +<td width="8%"> m4tt svg_lt</g> <td align="left"> changecom(,)&`#'60;changecom(`#') +<td width="8%"> m4tt svg_gt</g> <td align="left"> changecom(,)&`#'62;changecom(`#') +<td width="8%"> m4tt svg_leq</g> <td align="left"> changecom(,)&`#'8804;changecom(`#') +<td width="8%"> m4tt svg_geq</g> <td align="left"> changecom(,)&`#'8805;changecom(`#') +<td width="8%"> m4tt svg_prime</g> <td align="left"> changecom(,)&`#'8242;changecom(`#') <tr> -<td width="7%"> m4tt svg_prime</g> - <td align="left"> changecom(,)&`#'8242;changecom(`#') -<td width="7%"> m4tt svg_ensp</g> - <td align="left"> |changecom(,)&`#'8194;changecom(`#')| -<td width="7%"> m4tt svg_emsp</g> - <td align="left"> |changecom(,)&`#'8195;changecom(`#')| -<td width="7%"> m4tt svg_thinsp</g> - <td align="left"> |changecom(,)&`#'8201;changecom(`#')| -<td width="7%"> m4tt svg_backsl</g> - <td align="left"> changecom(,)&`#'92;changecom(`#') +<td width="8%"> m4tt svg_backsl</g> <td align="left"> changecom(,)&`#'92;changecom(`#') +<td width="8%"> m4tt svg_pound</g> <td align="left"> changecom(,)&`#'35;changecom(`#') +<td width="8%"> m4tt svg_comma</g> <td align="left"> changecom(,)&`#'44;changecom(`#') +<td width="8%"> m4tt svg_lparen</g> <td align="left"> changecom(,)&`#'40;changecom(`#') +<td width="8%"> m4tt svg_rparen</g> <td align="left"> changecom(,)&`#'41;changecom(`#') +<td width="8%"> m4tt svg_emsp</g> <td align="left"> |changecom(,)&`#'8195;changecom(`#')| +<td width="8%"> m4tt svg_ensp</g> <td align="left"> |changecom(,)&`#'8194;changecom(`#')| +<td width="8%"> m4tt svg_thinsp</g> <td align="left"> |changecom(,)&`#'8201;changecom(`#')| </table> + </ul> <li> Inkscape: It may be efficient to define elements by macro and to place them using a WYSIWYG graphics editor. A draft page intended diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/windows.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/windows.m4 new file mode 100644 index 00000000000..bc4527f36e8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/windows.m4 @@ -0,0 +1,12 @@ +divert(-1) +# windows.m4 +# This file is used if the CUSTOM=windows.m4 function is turned on in Makefile +define(`windows_') + +# To makd NeedDpicTools work, +# change the absolute Windows path to your installation directory: + +define(`NeedDpicTools',`if "dpictools" != "1" then { + copy "D:\Dwight\lib\dpictools.pic" } define(`dfitcurve__') ') + +divert(0)dnl diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/windows.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/windows.m4 index 1b2a904af06..bc4527f36e8 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/windows.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/windows.m4 @@ -1,7 +1,10 @@ divert(-1) -# This file is used if the CUSTOM= function is turned on in Makefile +# windows.m4 +# This file is used if the CUSTOM=windows.m4 function is turned on in Makefile +define(`windows_') -# Change the absolute Windows path to your installation directory: +# To makd NeedDpicTools work, +# change the absolute Windows path to your installation directory: define(`NeedDpicTools',`if "dpictools" != "1" then { copy "D:\Dwight\lib\dpictools.pic" } define(`dfitcurve__') ') 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 386844bc5c7..6b3d4fb3e48 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 2020.03.01 option -x for Fig 3.2 +# dpic version 2020.06.01 option -x for Fig 3.2 1200 2 6 0 0 3975 5025 6 0 0 3975 5025 @@ -184,8 +184,10 @@ Single 2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2 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 -5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 1075 1125 1025 1125 1075 1075 1125 1125 +6 1025 1075 1225 1175 +5 1 0 1 0 -1 0 -1 -1 0 0 1 0 0 1075 1125 1125 1125 1075 1075 1025 1125 5 1 0 1 0 -1 0 -1 -1 0 0 1 0 0 1175 1125 1125 1125 1175 1175 1225 1125 +-6 2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2 1125 975 1125 825 -6 |