168,169c168 < `resistor( linespec, cycles|E, chars, cycle wid) < arg2: E=default ebox (kept for compatibility) --- > `resistor( linespec, cycles, chars, cycle wid) 199c198,200 < { line from last line.start to tr_xy(-m4n,0)\ --- > TTB_s: tr_xy(-m4n,0) > TTB_e: tr_xy( m4n,0) > { line from last line.start to TTB_s\ 203,204c204 < then to tr_xy(m4n, 0) \ < then to last line.end --- > then to TTB_e then to last line.end 212c212,214 < { line from last line.start to tr_xy(-m4n,0)\ --- > TTB_s: tr_xy(-m4n,0) > TTB_e: tr_xy( m4n,0) > { line from last line.start to TTB_s\ 216,217c218 < then to tr_xy(m4n, 0) \ < then to last line.end --- > then to TTB_e then to last line.end 226c227,229 < { line from last line.start to tr_xy(-m4n,0)\ --- > TTB_s: tr_xy(-m4n,0) > TTB_e: tr_xy( m4n,0) > { line from last line.start to TTB_s \ 233,234c236 < then to tr_xy(m4n, 0) \ < then to last line.end --- > then to TTB_e then to last line.end 241a244 > TTB_s: Here 250a254 > TTB_e: Here 255c259,262 < `potentiometer(linespec, [E|cycles], --- > `potentiometer(linespec, options, > arg2= n number of body cycles > E draw a default ebox > type=E;wid=val;ht=val 258a266 > arg2=E for a default ebox 262,263c270 < `[R: resistor(`$1',ifinstr(`$2',E,,`$2'),ifinstr(`$2',E,E)) < Start: R.start; End: R.end --- > `[R: resistor(`$1',ifinstr(`$2',E,,`$2'),ifinstr(`$2',E,E)); Start: R.start; End: R.end 273a281,299 > `addtaps([<- | -> | <->], > fractional pos, length, fractional pos, length,...)' > define(`addtaps',` > ifelse(`$2',,`undefine(`m4tap_x')', > `ifdef(`m4tap_x',`define(`m4tap_x',incr(m4tap_x))', > `define(`m4tap_x',1) M4tap_w: last [].w_; M4tap_e: last [].e_ > M4tap_xy: (last [].wid_,last [].ht_)') > {define(`m4tapl',`ifelse(`$3',,`dimen_/3',`$3')')dnl > move to (`$2' between M4tap_w and M4tap_e) + vec_(0,sign(m4tapl)*M4tap_xy.y/2) > line ifelse(`$1',-,,`$1') to rvec_(0,m4tapl) > T`'m4tap_x: Here } > addtaps(`$1',shift(shift(shift($@))))')') > > `tapped(`two-terminal element',[<- | -> | <->], > fractional pos, length, fractional pos, length,...)' > define(`tapped',`[ $1 > Start: last line.start; End: last line.end; C: last line.c > addtaps(shift(@)) ]') > 326c352 < { line to rvec_(rp_len/2-((m4n-1)*m4c2t+m4ct)*m4di,0); round --- > { line to rvec_(rp_len/2-((m4n-1)*m4c2t+m4ct)*m4di,0); TTB_s: Here; round 332c358 < with .c at rvec_(vscal_(m4di,m4c2t,m4s2t)); round --- > with .c at rvec_(vscal_(m4di,m4c2t,m4s2t)); TTB_e: Here; round 339c365 < { line to rvec_(rp_len/2-m4wd/2,0); round --- > { line to rvec_(rp_len/2-m4wd/2,0); TTB_s: Here; round 348c374 < round; line to rvec_(rp_len/2-m4wd/2,0) }') --- > TTB_e: Here; round; line to rvec_(rp_len/2-m4wd/2,0) }') 354c380 < { line to rvec_((rp_len-m4wd)/2,0) --- > { line to rvec_((rp_len-m4wd)/2,0); TTB_s: Here 359c385 < line to rvec_((rp_len-m4wd)/2,0)} ') --- > TTB_e: Here; line to rvec_((rp_len-m4wd)/2,0)} ') 401c427 < { line to rvec_(rp_len/2-m4wd/2,0) --- > { line to rvec_(rp_len/2-m4wd/2,0); TTB_s: Here 407c433 < move to rvec_(m4wd,0) --- > move to rvec_(m4wd,0); TTB_e: Here 415c441 < { line to rvec_(rp_len/2-m4wd/2,0) --- > { line to rvec_(rp_len/2-m4wd/2,0); TTB_s: Here 427c453 < line to rvec_(rp_len/2-m4wd/2,0) } --- > TTB_e: Here; line to rvec_(rp_len/2-m4wd/2,0) } 450c476 < `{ line to rvec_(rp_len/2-m4h,0) --- > `{ line to rvec_(rp_len/2-m4h,0); TTB_s: Here 535,536c561,562 < line from rvec_(m4h,0) \ < to rvec_(rp_len/2,0)} ') --- > TTB_e: rvec_(m4h,0) > line from TTB_e to rvec_(rp_len/2,0)} ') 541c567 < `{ line to rvec_(rp_len/2-3/2*m4h,0) --- > `{ line to rvec_(rp_len/2-3/2*m4h,0); TTB_s: Here 548,549c574,575 < line from rvec_(m4h*3,0) \ < to rvec_(rp_len/2+3/2*m4h,0) } ') --- > TTB_e: rvec_(m4h*3,0) > line from TTB_e to rvec_(rp_len/2+3/2*m4h,0) } ') 557c583 < { line to rvec_(max(rp_len/2-m4r-m4w,0),0) --- > { line to rvec_(max(rp_len/2-m4r-m4w,0),0); TTB_s: Here 569c595 < line to rvec_(max(rp_len/2-m4r-m4w,0), 0) } --- > TTB_e: Here; line to rvec_(max(rp_len/2-m4r-m4w,0), 0) } 580c606 < {line to rvec_(rp_len/2-csdim_,0) --- > {line to rvec_(rp_len/2-csdim_,0); TTB_s: Here 596,597c622,623 < line from rvec_(2*csdim_,0) \ < to rvec_(rp_len/2+csdim_,0) } --- > TTB_e: rvec_(2*csdim_,0) > line from TTB_e to rvec_(rp_len/2+csdim_,0) } 608c634 < { line to rvec_(rp_len/2-m4wd/2,0) --- > { line to rvec_(rp_len/2-m4wd/2,0); TTB_s: Here 614,615c640,641 < line from rvec_(m4wd,0) \ < to rvec_(rp_len/2+m4wd/2,0) } --- > TTB_e: rvec_(m4wd,0) > line from TTB_e to rvec_(rp_len/2+m4wd/2,0) } 624a651 > TTB_s: Here 626a654 > TTB_e: Here 638c666 < {line to rvec_(max(0,rp_len/2-m4wd/2),0) --- > {line to rvec_(max(0,rp_len/2-m4wd/2),0); TTB_s: Here 642c670 < line to rvec_(m4wd+max(0,rp_len/2-m4wd/2),0)}') --- > TTB_e: Here; line to rvec_(m4wd+max(0,rp_len/2-m4wd/2),0)') 650c678,679 < move to rvec_(m4wd,0); line to rvec_(max(0,rp_len/2-m4wd/2),0)}') --- > move to rvec_(m4wd,0); TTB_e: Here > line to rvec_(max(0,rp_len/2-m4wd/2),0)') 655,656c684,685 < line to rvec_(max(0,rp_len/2-m4wd/2),0)dnl < ifelse(m4a,d,`; dot(at last line.start,,1)') }') --- > TTB_e: Here; line to rvec_(max(0,rp_len/2-m4wd/2),0)dnl > ifelse(m4a,d,`; dot(at last line.start,,1)') ') 659c688 < line to rvec_(m4wd+max(0,rp_len/2-m4wd/2),0)}') --- > TTB_e: rvec_(m4wd,0); line to rvec_(m4wd+max(0,rp_len/2-m4wd/2),0)') 666c695,696 < move to rvec_(m4wd,0); line to rvec_(max(0,rp_len/2-m4wd/2),0)}') --- > move to rvec_(m4wd,0); TTB_e: Here > line to rvec_(max(0,rp_len/2-m4wd/2),0)') 670,671c700,701 < move to rvec_(m4wd,0); line to rvec_(max(0,rp_len/2-m4wd/2),0)}') < {[box invis ht_ m4ht wid_ m4wd] at rvec_(rp_len/2,0)} --- > move to rvec_(m4wd,0); TTB_e: Here; line to rvec_(max(0,rp_len/2-m4wd/2),0)') > };{[box invis ht_ m4ht wid_ m4wd] at rvec_(rp_len/2,0)} 678c708 < { line to rvec_(max(0,rp_len/2-m4wd/2),0) --- > { line to rvec_(max(0,rp_len/2-m4wd/2),0); TTB_s: Here 690c720 < line to rvec_(max(0,rp_len/2-m4wd/2),0) } --- > TTB_e: Here; line to rvec_(max(0,rp_len/2-m4wd/2),0) } 698c728 < { line to rvec_(max(0,rp_len/2-m4wd/2),0) --- > { line to rvec_(max(0,rp_len/2-m4wd/2),0); TTB_s: Here 703,704c733,734 < line from rvec_(m4wd,0) \ < to rvec_(max(0,rp_len/2+m4wd/2),0) } --- > TTB_e: rvec_(m4wd,0) > line from TTB_e to rvec_(max(0,rp_len/2+m4wd/2),0) } 718,719c748,750 < line to rvec_(m4j,0) \ < then to rvec_(m4j,ifelse(`$2',R,-)m4h/2) \ --- > TTB_s: rvec_(m4j,0) > TTB_e: rvec_(m4j+m4h,0) > line to TTB_s then to rvec_(m4j,ifelse(`$2',R,-)m4h/2) \ 721,722c752 < then to rvec_(m4j+m4h,0) \ < then to rvec_(m4j*2+m4h,0) ', --- > then to TTB_e then to rvec_(m4j*2+m4h,0) ', 725c755 < line to rvec_(m4j,0) --- > line to rvec_(m4j,0); TTB_s: Here 731,732c761 < line to rvec_(m4j,0) < ') } --- > line to rvec_(m4j,0) ') } 739c768 < {line to rvec_(max(0,rp_len/2-m4h/2),0) --- > {line to rvec_(max(0,rp_len/2-m4h/2),0); TTB_s: Here 745,746c774,775 < {line from rvec_(m4h,0) \ < to rvec_(m4h+max(0,rp_len/2-m4h/2),0) --- > TTB_e: rvec_(m4h,0) > {line from TTB_e to rvec_(m4h+max(0,rp_len/2-m4h/2),0) 756c785 < define(`gap',`eleminit_(`$1') --- > define(`gap',`eleminit_(`$1'); TTB_s: last line.start; TTB_e: last line.end 766,767c795,797 < { arrow from last line.start to last line.end \ < chop lin_leng(last line)/2-arrowht/2 --- > TTB_s: last line.start+vec_(lin_leng(last line)-arrowht/2,0) > TTB_e: TTB_s+vec_(arrowht,0) > { arrow from TTB_s to TTB_e 904c934 < {line to rvec_(rp_len/2-m4h/2,0) chop 0 chop m4cs} --- > {line to rvec_(rp_len/2-m4h/2,0) chop 0 chop m4cs; TTB_s: Here} 918,919c948,949 < line from rvec_(m4h,0) \ < to rvec_(m4h/2+rp_len/2,0) chop m4cs chop 0 } --- > TTB_e: rvec_(m4h+m4cs,0) > line from TTB_e to rvec_(m4h/2+rp_len/2,0) } 932c962 < {line to rvec_(rp_len/2-dimen_/6,0) --- > {line to rvec_(rp_len/2-dimen_/6,0); TTB_s: Here 947,948c977,978 < { line from rvec_(rp_len/2+dimen_/6,0) \ < to rvec_(rp_len,0) --- > TTB_e: rvec_(rp_len/2+dimen_/6,0) > { line from TTB_e to rvec_(rp_len,0) 993,995c1023,1025 < { line to tr_xy(-4,0) < line from tr_xy(4,0) \ < to 2nd last line.end --- > { line to tr_xy(-4,0); TTB_s: Here > TTB_e: tr_xy(4,0) > line from TTB_e to 2nd last line.end 1109,1111c1139,1141 < {line to rvec_(max(0,rp_len/2-m4wd/2),0) < line from rvec_(m4wd,0) \ < to rvec_(0,m4wd/2) \ --- > {line to rvec_(max(0,rp_len/2-m4wd/2),0); TTB_s: Here > TTB_e: rvec_(m4wd,0) > line from TTB_e to rvec_(0,m4wd/2) \ 1113,1114c1143 < then to rvec_(m4wd,0) \ < then to rvec_(max(m4wd,rp_len/2+m4wd/2),0) } --- > then to TTB_e then to rvec_(max(m4wd,rp_len/2+m4wd/2),0) } 1120a1150,1151 > TTB_s: Here > TTB_e: rvec_(m4wd*5/4,0) 1125,1126c1156 < {line from rvec_(m4wd*5/4,0) \ < to rvec_(m4wd/4,m4wd/2) \ --- > {line from TTB_e to rvec_(m4wd/4,m4wd/2) \ 1128,1129c1158 < then to rvec_(m4wd*5/4,0) \ < then to rvec_(max(rp_len,m4wd*5/4),0) } --- > then to TTB_e then to rvec_(max(rp_len,m4wd*5/4),0) } 1249,1250c1278,1282 < { [ box invis ht_ m4dv+linethick pt__*sqrt(3) wid_ m4dh+linethick pt__ + m4dm < ] at rvec_(rp_len/2+m4dm/2,0) } --- > m4_dbw = m4dh+linethick pt__ + m4dm > TTB_s: rvec_(rp_len/2+m4dm/2-m4_dbw/2,0) > TTB_e: rvec_(rp_len/2+m4dm/2+m4_dbw/2,0) > { [ box invis ht_ m4dv+linethick pt__*sqrt(3) wid_ m4_dbw > ] at 0.5 between TTB_s and TTB_e } 1548a1581,1582 > TTB_s: last line.c-vec_((m4h+m4v/2)/2,0) > TTB_e: last line.c+vec_((m4h+m4v/2)/2,0) 1956c1990,1991 < End: line to rvec_(0,r); `$4'] with .Start at Here --- > line to rvec_(0,r) > End: last line.c; `$4'] with .Start at Here 2274c2309 < {line to rvec_(max(0,rp_len/2-m4wd/2),0)