summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-11-13 03:01:42 +0000
committerNorbert Preining <norbert@preining.info>2022-11-13 03:01:42 +0000
commit1b59c3c45170420996d629b296e2214933ee1add (patch)
tree34082741a3498a4d6ccbe007c7866ac855e7ef72 /graphics
parent28e13f4c64ab0caee7ce56d51e9be2b93611d580 (diff)
CTAN sync 202211130301
Diffstat (limited to 'graphics')
-rw-r--r--graphics/mcf2graph/CHANGELOG10
-rw-r--r--graphics/mcf2graph/README2
-rw-r--r--graphics/mcf2graph/mcf2graph.mp46
-rw-r--r--graphics/mcf2graph/mcf_exa_code.pdfbin78850 -> 78850 bytes
-rw-r--r--graphics/mcf2graph/mcf_exa_code.tex4
-rw-r--r--graphics/mcf2graph/mcf_exa_soc.mp6
-rw-r--r--graphics/mcf2graph/mcf_example.pdfbin449558 -> 449474 bytes
-rw-r--r--graphics/mcf2graph/mcf_example.tex4
-rw-r--r--graphics/mcf2graph/mcf_library.mcf12
-rw-r--r--graphics/mcf2graph/mcf_man_soc.mp12
-rw-r--r--graphics/mcf2graph/mcf_manual.pdfbin289236 -> 289192 bytes
-rw-r--r--graphics/mcf2graph/mcf_manual.tex22
-rw-r--r--graphics/mcf2graph/mcf_mplib_exa.pdfbin195837 -> 195740 bytes
-rw-r--r--graphics/mcf2graph/mcf_mplib_exa.tex4
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/changelog.tex19
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdfbin17645 -> 17645 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdfbin1584894 -> 1599964 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex130
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz.sty4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex24
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex166
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex40
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex4
23 files changed, 398 insertions, 111 deletions
diff --git a/graphics/mcf2graph/CHANGELOG b/graphics/mcf2graph/CHANGELOG
index d8a9090da3..a166130976 100644
--- a/graphics/mcf2graph/CHANGELOG
+++ b/graphics/mcf2graph/CHANGELOG
@@ -1,6 +1,14 @@
*******************************************************************************
- Changelog of mcf2graph software package by Akira Yamaji 2022-11-06
+ Changelog of mcf2graph software package by Akira Yamaji 2022-11-12
*******************************************************************************
+[ver. 4.90 / 2022-11-12]
+ -change syntax of fused ring
+ {a--b}=?n => a--b=?n (n:4,5,6)
+ {a---b}=?n => a---b=?n (n:5,6)
+ {a----b}=?6 => a----b=?6
+ -update MCF manual
+ -update mcf_library.mcf
+
[ver. 4.89 / 2022-11-06]
-change syntax of fused ring
(a,b)=?n => {a--b}=?n
diff --git a/graphics/mcf2graph/README b/graphics/mcf2graph/README
index 76578d6375..617ece4e82 100644
--- a/graphics/mcf2graph/README
+++ b/graphics/mcf2graph/README
@@ -1,7 +1,7 @@
********************************************************************************
mcf2graph : Convert Molecular Coding Format to graphics with MetaPost
Author : Akira Yamaji
- version : 4.89 2022-11-06
+ version : 4.90 2022-11-12
E-mail : mcf2graph@gmail.com
Located at : http://www.ctan.org/pkg/mcf2graph
********************************************************************************
diff --git a/graphics/mcf2graph/mcf2graph.mp b/graphics/mcf2graph/mcf2graph.mp
index 1961a2ee89..53db36ab09 100644
--- a/graphics/mcf2graph/mcf2graph.mp
+++ b/graphics/mcf2graph/mcf2graph.mp
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 4.89 Copyright (c) 2013-2022 Akira Yamaji
+% mcf2graph ver 4.90 Copyright (c) 2013-2022 Akira Yamaji
%
% Permission is hereby granted, free of charge, to any person obtaining a copy of this software
% and associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -33,7 +33,7 @@
% Set output MOL file (V3000) : mpost -s ahlength=6 FILENAME
% Set output report : mpost -s ahlength=7 FILENAME
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-message "* This is mcf2graph ver 4.89 2022.11.06";
+message "* This is mcf2graph ver 4.90 2022.11.12";
tracingstats:=1; prologues:=3; warningcheck:=0;
%-------------------------------------------------------------------------------------------------
newinternal string EN_;
@@ -364,10 +364,11 @@ def read_mcf(expr n)(text t)=
save nCP;
if unknown inside_MC::
save /,//,/*,*/,**,*/*,~,^,',`,<,>,:,=,\,\\,*\,\*,*\*,@,@$,$,&,&$,#,##,{,},|,||,_,CP,CA,
- inside_MC;
+ --,---,----,inside_MC;
| :=mark_adress; || :=reset_adress; ##:=reset_length; _:=Me;
\:=0; \\:=zero_dm; *\:=zero_wf; \*:=zero_zf; *\*:=zero_wv;
let = ==op_equ; let : ==op_col; let ^==op_hat; let ~==op_til; let > ==op_lth; let `==op_bqu;
+ let -- == bond__bond; let --- == bond___bond; let ---- == bond____bond;
def $==abs_adress enddef; def &$==&.$ enddef; def '==read_id enddef;
def {==read_number( enddef; def CP == com_par enddef; def CA == com_par_adr enddef;
let }==); let @$==jump_atom_abs; let < ==rot_angle; let @==jump_atom; let &==cyc_atom;
@@ -396,9 +397,8 @@ def read_mcf(expr n)(text t)=
enddef;
%-------------------------------------------------------------------------------------------------
vardef read_number(text t)=
- save --,---,----,:,','`;
- let : == from_until; let -- == bond__bond; let --- == bond___bond; let ---- == bond____bond;
- def ' == +0.5 enddef; def '` == +0.5` enddef; parts_int:=parts_int+1;
+ save :,','`;
+ let : == from_until; def ' == +0.5 enddef; def '` == +0.5` enddef; parts_int:=parts_int+1;
nA:=0;
for list==t::
if known list::
@@ -426,13 +426,13 @@ def fuse_ring(expr a,b) =
for i==1 upto b-2:: CP(_mk_bond,360 DIV b) endfor
CP(_com,_len_e) if a<=0:: CP(_cyc_eB,a-b+2) else:: CP(_cyc_eB,a) fi enddef;
%-------------------------------------------------------------------------------------------------
-def fuse_ring_bonds(expr a,b,c) =
- CP(_jp_bond,xpart(a)) CP(_rot_ang,180) CP(_com,_len_s)
+def fuse_ring_bonds(expr s,e,b,c) =
+ CP(_jp_bond,s) CP(_rot_ang,180) CP(_com,_len_s)
if b==6:: CP(_chg_len,1) for i==1 upto c-1:: CP(_mk_bond,60) endfor
ef b==5:: if c==2:: CP(_chg_len,1.25) CP(_mk_bond,80)
ef c==3:: CP(_chg_len,1.1) CP(_mk_bond,78) CP(_mk_bond,72) fi
ef b==4:: CP(_chg_len,1.225) CP(_mk_bond,105) fi
- CP(_com,_len_e) if ypart(a)<=0:: CP(_cyc_eB,ypart(a)-c+1) else:: CP(_cyc_eB,ypart(a)) fi
+ CP(_com,_len_e) if e<=0:: CP(_cyc_eB,e-c+1) else:: CP(_cyc_eB,e) fi
enddef;
%-------------------------------------------------------------------------------------------------
def fuse_ring_size(expr a,b,c) =
@@ -473,17 +473,17 @@ vardef change_bond(expr a,b) =
else::
if b==?6::
if (frac parts_com[a][i]==0)and(frac parts_par[a][i]==0)::
- fuse_ring_bonds((parts_com[a][i],parts_par[a][i]),6,4)
+ fuse_ring_bonds(parts_com[a][i],parts_par[a][i],6,4)
ef frac parts_par[a][i]==0::
- fuse_ring_bonds((floor parts_com[a][i],parts_par[a][i]),6,3)
- else:: fuse_ring_bonds((floor parts_com[a][i],floor parts_par[a][i]),6,2) fi
+ fuse_ring_bonds(floor parts_com[a][i],parts_par[a][i],6,3)
+ else:: fuse_ring_bonds(floor parts_com[a][i],floor parts_par[a][i],6,2) fi
ef b==?5::
if (frac parts_com[a][i]==0)and(frac parts_par[a][i]==0)::
- fuse_ring_bonds((parts_com[a][i],parts_par[a][i]),5,3)
+ fuse_ring_bonds(parts_com[a][i],parts_par[a][i],5,3)
ef frac parts_par[a][i]==0::
- fuse_ring_bonds((floor parts_com[a][i],floor parts_par[a][i]),5,2) fi
- ef b==?4:: fuse_ring_bonds((parts_com[a][i],parts_par[a][i]),4,2)
- ef b==Ph1:: fuse_ring_bonds((parts_com[a][i],parts_par[a][i]),6,4)
+ fuse_ring_bonds(floor parts_com[a][i],parts_par[a][i],5,2) fi
+ ef b==?4:: fuse_ring_bonds(parts_com[a][i],parts_par[a][i],4,2)
+ ef b==Ph1:: fuse_ring_bonds(parts_com[a][i],parts_par[a][i],6,4)
CA(_set_line,dl,-1) CA(_set_line,dl,-3)
ef b==Ph2:: fuse_ring_bonds((parts_com[a][i],parts_par[a][i]),6,4)
CA(_set_line,dl,-2) CA(_set_line,dl,-4) fi fi endfor
@@ -494,9 +494,21 @@ vardef change_bond(expr a,b) =
ef (b>=?6[11])and(b<=?6[15]):: fuse_ring_size(a,6,b-?6[11]+11)
ef (b>=?7[11])and(b<=?7[15]):: fuse_ring_size(a,7,b-?7[11]+11)
ef (b>=?8[11])and(b<=?8[15]):: fuse_ring_size(a,8,b-?8[11]+11)
- else:: fuse_ring(a,b-?3+3) fi fi
+ else:: fuse_ring(a,b-?3+3)
fi
fi
+ ef pair a::
+ if b==?6::
+ if (frac xpart a==0)and(frac ypart a==0):: fuse_ring_bonds(xpart a,ypart a,6,4)
+ ef frac ypart a==0:: fuse_ring_bonds(floor xpart a,ypart a,6,3)
+ else:: fuse_ring_bonds(floor xpart a,floor ypart a,6,2) fi
+ ef b==?5::
+ if (frac xpart a==0)and(frac ypart a==0):: fuse_ring_bonds(xpart a,ypart a,5,3)
+ ef frac ypart a==0:: fuse_ring_bonds(floor xpart a,ypart a,5,2) fi
+ ef b==?4:: fuse_ring_bonds(xpart a,ypart a,4,2)
+ fi
+ fi
+ fi
elseif color b:: color_list[incr cntC]:=b; CA(_set_colorB,cntC,a) fi
parts_cnt[parts_int]:=nC; parts_int fi
enddef;
diff --git a/graphics/mcf2graph/mcf_exa_code.pdf b/graphics/mcf2graph/mcf_exa_code.pdf
index 4e0f118ce4..585eb015d1 100644
--- a/graphics/mcf2graph/mcf_exa_code.pdf
+++ b/graphics/mcf2graph/mcf_exa_code.pdf
Binary files differ
diff --git a/graphics/mcf2graph/mcf_exa_code.tex b/graphics/mcf2graph/mcf_exa_code.tex
index a27bb71714..31b8ac14c8 100644
--- a/graphics/mcf2graph/mcf_exa_code.tex
+++ b/graphics/mcf2graph/mcf_exa_code.tex
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Print out mcf data list by A.Yamaji 2022.11.06
+% Print out mcf data list by A.Yamaji 2022.11.12
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% ** mcf2graph.mf must be version 4.89
+% ** mcf2graph.mf must be version 4.90
% ** use mcf_library.mcf
% ** typeset by LuaLaTeX(luamplib)
\documentclass{article}
diff --git a/graphics/mcf2graph/mcf_exa_soc.mp b/graphics/mcf2graph/mcf_exa_soc.mp
index d3d54052db..bb049b6b6f 100644
--- a/graphics/mcf2graph/mcf_exa_soc.mp
+++ b/graphics/mcf2graph/mcf_exa_soc.mp
@@ -1,8 +1,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format by Akira Yamaji 2022.11.06
+% Molecular Coding Format by Akira Yamaji 2022.11.12
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-input mcf2graph; %%% it must be version 4.89
-message "* mcf_exa_soc 2022.11.06";
+input mcf2graph; %%% it must be version 4.90
+message "* mcf_exa_soc 2022.11.12";
message "";
%------------------------------------------------------------------------------
%%%%sw_frame:=Outside;
diff --git a/graphics/mcf2graph/mcf_example.pdf b/graphics/mcf2graph/mcf_example.pdf
index 8fbbc5affe..f510fc9ec2 100644
--- a/graphics/mcf2graph/mcf_example.pdf
+++ b/graphics/mcf2graph/mcf_example.pdf
Binary files differ
diff --git a/graphics/mcf2graph/mcf_example.tex b/graphics/mcf2graph/mcf_example.tex
index 8ae368ba5f..e2c8fcae1e 100644
--- a/graphics/mcf2graph/mcf_example.tex
+++ b/graphics/mcf2graph/mcf_example.tex
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of MCF Typeset with LuaLaTeX(luamplib) by A.Yamaji 2022.11.06
+% Example of MCF Typeset with LuaLaTeX(luamplib) by A.Yamaji 2022.11.12
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% ** mcf2graph.mf must be version 4.89
+% ** mcf2graph.mf must be version 4.90
% ** use mcf_library.mcf
% ** typeset by LuaLaTeX(luamplib)
\documentclass{article}
diff --git a/graphics/mcf2graph/mcf_library.mcf b/graphics/mcf2graph/mcf_library.mcf
index 3235ad1292..bf01583d62 100644
--- a/graphics/mcf2graph/mcf_library.mcf
+++ b/graphics/mcf2graph/mcf_library.mcf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% molecular library file mcf_library.mcf by Akira Yamaji 2022.11.06
+% molecular library file mcf_library.mcf by Akira Yamaji 2022.11.12
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% tag1:var1;tag2:var2;tag3:var3 .....
% first character of line "%" comment out
@@ -706,7 +706,7 @@ Cat:biological;EN:Sesamine;MW:354.35;EXA:1
%------------------------------------------------------------------------------
Cat:biological;EN:Morphine;MW:285.343;EXA:1
:
-<30,Ph,{2,-4}=?6,{1---12}=?5,-1:O,-1=zb,
+<30,Ph,{2,-4}=?6,1---12=?5,-1:O,-1=zb,
@7,60~wf`0.75,70~si_`1.3,45,N!,&9~wb,15=dl,6:/OH,8^180:*/H,12:/*OH
;
%------------------------------------------------------------------------------
@@ -881,7 +881,7 @@ Cat:synthetic;EN:Chrysene;MW:228.3;EXA:-
%------------------------------------------------------------------------------
Cat:synthetic;EN:Pyrene;MW:202.25;EXA:-
:
-<30,Ph2,{6,4}=Ph,{16---7}=?6,-2=dl
+<30,Ph2,{6,4}=Ph,16---7=?6,-2=dl
;
%------------------------------------------------------------------------------
Cat:synthetic;EN:Coronene;MW:300.35;EXA:1
@@ -1180,7 +1180,7 @@ Cat:antibiotics;EN:Emamectine;MW:886.133;EXA:1
:
<24,?6,6=?5,3=dl,9:O,2:*/OH,3:/_,6:/*OH^-60,
@5,#1.04,6,//O,-60,O,60~wb,60,-60,60~wf,60,-60,60,60,60,-60,60,##,&7,
- {-1,-3,-7}=dl,{-11-- -10}=?6,@-2,?6,-6=wf,-1=zb,-5=dl,
+ {-1,-3,-7}=dl,-11--(-10)=?6,@-2,?6,-6=wf,-1=zb,-5=dl,
{-1,-6}:O,-3:*/_,@-2,\,*/_,!2,
17:/_,19:/*_,@18,\,O,!,?6`.7,-1:O,#.5,-2:*/_,-4:*/O!,##,
@-3,\,O,60,?6`.7,-5:O,#.5,-4:*/_,-3:/*NH!,-2:*/O!
@@ -1198,7 +1198,7 @@ Cat:antibiotics;EN:Spinosad;MW:731.968;EXA:2
Cat:antibiotics;EN:Natamycin;MW:665.733;EXA:1
:
<-90,#1,60,60,-60,60,-60,60,-60,60,-60,60,60,60,O,-60,
- 60,60,-60,60,-60,60,-60,60,60,-60,&1,##,{12--13}=?6,
+ 60,60,-60,60,-60,60,-60,60,60,-60,&1,##,12--13=?6,
{2,4,6,8,20}=dl,11=zb,23:O,-2:/*OH,-3:*/COOH,
18=?3,-1=wb,-2=wf,-1:O,22://O,24:*/_,{14^60,16}:*/OH,
@10,*\^15,O,90,?6`.7,-1:O,#.5,{-3,-5'}:*/OH,-4:/*NH2,-2:/*_
@@ -1880,7 +1880,7 @@ Cat:pesticide;EN:Pyrimethanil;MW:199.257;EXA:-
%------------------------------------------------------------------------------
Cat:pesticide;EN:Pyroquilon;MW:173.2;EXA:-
:
-<30,Ph,3=?6,10:N,9://O,{11_4}=?5
+<30,Ph,3=?6,10:N,9://O,11--4=?5
;
%------------------------------------------------------------------------------
Cat:pesticide;EN:Vinclozolin;MW:286.108;EXA:-
diff --git a/graphics/mcf2graph/mcf_man_soc.mp b/graphics/mcf2graph/mcf_man_soc.mp
index a2cc417f86..edb7d19b9f 100644
--- a/graphics/mcf2graph/mcf_man_soc.mp
+++ b/graphics/mcf2graph/mcf_man_soc.mp
@@ -1,9 +1,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% MCF file for mcf_manual.tex by Akira.Yamaji 2022.11.06
+% MCF file for mcf_manual.tex by Akira.Yamaji 2022.11.12
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-input mcf2graph; %% it must be version 4.89
+input mcf2graph; %% it must be version 4.90
% ** use library file 'mcf_library.mcf'
-message "mcf_man_soc 2022.11.06"; message "";
+message "mcf_man_soc 2022.11.12"; message "";
%------------------------------------------------------------------------
sw_mframe:=0;
sw_expand:=0;
@@ -461,9 +461,9 @@ beginfigm("EN:fused ring 3")
fsize:=(60mm,20mm);
fmargin:=(2mm,2mm);
sw_numbering:=Bond;
- MCat(0,1)(?6,{3,10}=?6,{16---4}=?6,{16,4}=dt,{17:19}=bd_r)
+ MCat(0,1)(?6,{3,10}=?6,16---4=?6,{16,4}=dt,{17:19}=bd_r)
add(defaultscale:=0.4; label("(1)",p0);)
- MCat(1,0)(?6,{3,10}=?6,{16---4}=?5,{16,4}=dt,{17,18}=bd_r)
+ MCat(1,0)(?6,{3,10}=?6,16---4=?5,{16,4}=dt,{17,18}=bd_r)
add(defaultscale:=0.4; label("(2)",p0);)
endfigm
%***********************************************************************
@@ -471,7 +471,7 @@ beginfigm("EN:fused ring 4")
fsize:=(60mm,20mm);
fmargin:=(2mm,2mm);
sw_numbering:=Bond;
- MC(<-30,?6,{3,10,15}=?6,{21----4}=?6,{21,4}=dt,{22,23}=bd_r)
+ MC(<-30,?6,{3,10,15}=?6,21----4=?6,{21,4}=dt,{22,23}=bd_r)
endfigm
%***********************************************************************
beginfigm("EN:Spiro ring ")
diff --git a/graphics/mcf2graph/mcf_manual.pdf b/graphics/mcf2graph/mcf_manual.pdf
index c407c4fd54..7d27863ba0 100644
--- a/graphics/mcf2graph/mcf_manual.pdf
+++ b/graphics/mcf2graph/mcf_manual.pdf
Binary files differ
diff --git a/graphics/mcf2graph/mcf_manual.tex b/graphics/mcf2graph/mcf_manual.tex
index 6588d356a0..514236f5b2 100644
--- a/graphics/mcf2graph/mcf_manual.tex
+++ b/graphics/mcf2graph/mcf_manual.tex
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format manual by Akira Yamaji 2022.11.06
+% Molecular Coding Format manual by Akira Yamaji 2022.11.12
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
%%%\usepackage{graphicx}
@@ -433,13 +433,13 @@ attached bond length
\begin{verbatim}
(Attached 2 bond)
-{4--11}=?6 : fuse 4/6 ring to B11..B4
-{4--11}=?5 : fuse 3/5 ring to B11..B4
-{4--11}=?4 : fuse 2/4 ring to B11..B4
+4--11=?6 : fuse 4/6 ring to B11..B4
+4--11=?5 : fuse 3/5 ring to B11..B4
+4--11=?4 : fuse 2/4 ring to B11..B4
-1:<30,?6,3=?6,{11--4}=?6
-2:<30,?6,3=?6,{11--4}=?5
-3:<30,?6,3=?6,{11--4}=?4
+1:<30,?6,3=?6,11--4=?6
+2:<30,?6,3=?6,11--4=?5
+3:<30,?6,3=?6,11--4=?4
\end{verbatim}
\MCFgraph
\vspace{-3mm}%
@@ -451,11 +451,11 @@ attached bond length
\begin{verbatim}
(Attached 3 bond)
-{16---4}=?6 : fuse 3/6 ring to B16..B4
-{16---4}=?5 : fuse 2/5 ring to B16..B4
+16---4=?6 : fuse 3/6 ring to B16..B4
+16---4=?5 : fuse 2/5 ring to B16..B4
1:?6,{3,10,16---4}=?6
-2:?6,{3,10}=?6,{16---4}=?5
+2:?6,{3,10}=?6,16---4=?5
\end{verbatim}
\MCFgraph
@@ -468,7 +468,7 @@ attached bond length
\begin{verbatim}
(Attached 4 bond)
-{21----4}=?6 : fuse 2/6 ring to B21..B4
+21----4=?6 : fuse 2/6 ring to B21..B4
<-30,?6,{3,10,15,21----4}=?6
diff --git a/graphics/mcf2graph/mcf_mplib_exa.pdf b/graphics/mcf2graph/mcf_mplib_exa.pdf
index f3677cd833..806e6b55ed 100644
--- a/graphics/mcf2graph/mcf_mplib_exa.pdf
+++ b/graphics/mcf2graph/mcf_mplib_exa.pdf
Binary files differ
diff --git a/graphics/mcf2graph/mcf_mplib_exa.tex b/graphics/mcf2graph/mcf_mplib_exa.tex
index e7cc265369..ed512ddabb 100644
--- a/graphics/mcf2graph/mcf_mplib_exa.tex
+++ b/graphics/mcf2graph/mcf_mplib_exa.tex
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2022.11.06
+% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2022.11.12
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% ** mcf2graph.mp must be version 4.89
+% ** mcf2graph.mp must be version 4.90
% ** use mcf_library.mcf
\documentclass{article}
%------------------------------------------------------------------------------
diff --git a/graphics/pgf/contrib/circuitikz/doc/changelog.tex b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
index a19eae619c..be5dc1e399 100644
--- a/graphics/pgf/contrib/circuitikz/doc/changelog.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
@@ -5,6 +5,25 @@ full list of changes.
\begin{itemize}
\item
+ Version 1.5.5 (2022-11-12)
+
+ New features for optoelectronic devices: a new component, arrow
+ styling, and anchors.
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Added styling of arrows on opto devices, thanks to a suggestion by
+ \href{https://github.com/circuitikz/circuitikz/issues/655}{Dr
+ Matthias Jung}
+ \item
+ Added Light-Dependent resistor shape (by Romano)
+ \item
+ Added \texttt{arrows} anchors to the opto-components
+ \item
+ Documentation updates (rotating and flipping for path components)
+ \end{itemize}
+\item
Version 1.5.4 (2022-09-09)
New components and enhancement for old ones in this version.
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
index 8ea75d8c2a..d8982740f9 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
index d8970028c9..4198c5a2dc 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
index d9ebe7a284..9302ccee3b 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
@@ -1385,6 +1385,25 @@ Several groups of components, on the other hand, have a special \texttt{scale} p
\end{circuitikz}
\end{LTXexample}
+Never use \texttt{scale}, \texttt{xscale} or~\texttt{yscale} in a path-style component (i.e., inside a \texttt{to[...]}) command.
+
+\paragraph{Mirroring and flipping path-style components}\label{sec:mirror-flip-path}
+
+To change the orientation of path-style components, \emph{never} use \texttt{xscale=-1} nor~\texttt{yscale=-1}. That will mess up the path completely. Use the \texttt{mirror} and \texttt{invert} options:
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}[N/.style={
+ font=\tiny\ttfamily, above}]
+ \draw (0,0) to [put] ++(0,2)
+ node[N]{no modifier};
+ \draw (1,0) to [put, mirror] ++(0,2)
+ node[N]{mirror};
+ \draw (2,0) to [put, invert] ++(0,2)
+ node[N]{invert};
+ \draw (3,0) to [put, mirror, invert] ++(0,2)
+ node[N]{both};
+\end{tikzpicture}
+\end{LTXexample}
+
\paragraph{Thickness of the lines}\label{sec:legacy-thickness} (globally)
The best way to alter the thickness of components is using styling, see section~\ref{sec:styling-thickness}. Alternatively, you can use ``legacy'' classes like \texttt{bipole}, \texttt{tripoles} and so on ---
@@ -1454,7 +1473,7 @@ Explanation of the parameters:\\
\subsubsection{Mirroring and flipping}\label{sec:mirroring-and-flipping}
-Mirroring and flipping of node components is obtained by using the \TikZ\ keys \texttt{xscale} and \texttt{yscale}. Notice that this parameters affect also text labels, so they need to be un-scaled by hand.
+Mirroring and flipping of node components is obtained by using the \TikZ\ keys \texttt{xscale} and \texttt{yscale}. Notice that this parameters affect also text labels, so they need to be un-scaled by hand. Notice that you \textbf{do not} use \texttt{xscale} or~\texttt{yscale} in a path-style component, see section~\ref{sec:mirror-flip-path} for that case.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[scale=0.7, transform shape]
@@ -2002,7 +2021,8 @@ If \texttt{americanresistors} option is active (or the style \texttt{[american r
\circuitdescbip[resistor]{R}{Resistor}{american resistor}
\circuitdescbip[vresistor]{vR}{Variable resistor}{variable american resistor}
\circuitdescbip[potentiometer]{pR}{Potentiometer}{american potentiometer}( wiper/0/0.3 )
- \circuitdescbip[resistivesens]{sR}{Resisitive sensor}{american resisitive sensor}( label/0/0.3 )
+ \circuitdescbip[resistivesens]{sR}{Resistive sensor}{american resistive sensor}( label/0/0.3 )
+ \circuitdescbip*[ldresistor]{ldR}{Ligth-Dependent resistor}{american light dependent resistor}(arrows/-45/0.3)
\end{groupdesc}
If instead \texttt{europeanresistors} option is active (or the style \texttt{[european resistors]} is used), the resistors, variable resistors and potentiometers are displayed as follows:
@@ -2012,13 +2032,14 @@ If instead \texttt{europeanresistors} option is active (or the style \texttt{[e
\circuitdescbip*[tgeneric]{vR}{Variable resistor}{variable european resistor}
\circuitdescbip*[genericpotentiometer]{pR}{Potentiometer}{european potentiometer}( wiper/0/0.3 )
\circuitdescbip*[thermistor]{sR}{Resistive sensor}{european resistive sensor}( label/0/0.3 )
+ \circuitdescbip*[ldgeneric]{ldR}{Ligth-Dependent resistor}{european light dependent resistor}(arrows/-45/0.3)
\ctikzset{resistor=american} % reset default
\end{groupdesc}
Other miscellaneous resistor-like devices:
\begin{groupdesc}
\circuitdescbip*{varistor}{Varistor}{}
- \circuitdescbip*[photoresistor]{phR}{Photoresistor}{photoresistor}
+ \circuitdescbip*[photoresistor]{phR}{Photoresistor}{photoresistor}(arrows/0/0.3)
\circuitdescbip*[thermistor]{thR}{Thermistor}{thermistor}
\circuitdescbip*[thermistorptc]{thRp}{PTC thermistor}{thermistor ptc}
\circuitdescbip*[thermistorntc]{thRn}{NTC thermistor}{thermistor ntc}
@@ -2096,17 +2117,19 @@ We can call \emph{modifiers} the elements that are added to the basic shape to e
Also you can change the start arrow with the corresponding \texttt{tunable start arrow} or \texttt{wiper start arrow} (the default value ``\texttt{default}'' is equivalent to \texttt{\{\}} for both, which means no arrow).
You can change that globally or locally, as ever. The tip specification is the one you can find in the \TikZ{} manual (``Arrow Tip Specifications'').
+For the \texttt{photoresistor} and the two ``flavors'' of the light-dependent resistor (\texttt{ldR}, american or european), the style of the arrows follow the \texttt{opto} commands as in the photodiodes and phototransistor: see~\ref{sec:opto-arrows}.
\begin{LTXexample}[varwidth]
- \begin{circuitikz}[american]
- % globally all the potentiometrs
- \ctikzset{wiper end arrow={Kite[open]}}
- \draw (0,0) to[tgeneric] ++(2,0)
- % set locally on this variable resistor
- to[vR, tunable end arrow={Stealth[red]},
- tunable start arrow={Bar}, invert] ++(0,-2)
- to[pR] ++(-2,0);
- \end{circuitikz}
+\begin{tikzpicture}[american]
+ % globally all the potentiometrs
+ \ctikzset{wiper end arrow={Kite[open]},
+ opto arrows/color=blue, opto end arrow={Triangle}}
+ \draw (0,0) to[tgeneric] ++(2,0) to[phR] ++(2,0)
+ % set locally on this variable resistor
+ to[vR, tunable end arrow={Stealth[red]},
+ tunable start arrow={Bar}, invert] ++(0,-2)
+ to[pR, mirror] ++(-4,0);
+\end{tikzpicture}
\end{LTXexample}
@@ -2334,9 +2357,9 @@ The package options \texttt{fulldiode}, \texttt{strokediode}, and \texttt{emptyd
\circuitdescbip*[emptyzdiode]{empty Zener diode}{Empty Zener diode}{zDo}
\circuitdescbip*[emptyzzdiode]{empty ZZener diode}{Empty ZZener diode}{zzDo}
\circuitdescbip*[emptytdiode]{empty tunnel diode}{Empty tunnel diode}{tDo}
- \circuitdescbip*[emptypdiode]{empty photodiode}{Empty photodiode}{pDo}
- \circuitdescbip*[emptylediode]{empty led}{Empty led}{leDo}
- \circuitdescbip*[emptylaserdiode]{empty laser diode}{Empty laser diode\footnotemark}{lasD}
+ \circuitdescbip*[emptypdiode]{empty photodiode}{Empty photodiode}{pDo}(arrows/-30/0.3)
+ \circuitdescbip*[emptylediode]{empty led}{Empty led}{leDo}(arrows/-30/0.3)
+ \circuitdescbip*[emptylaserdiode]{empty laser diode}{Empty laser diode\footnotemark}{lasD}(arrows/-30/0.3)
\footnotetext{Added by André Alves in \texttt{v1.4.4}}
\circuitdescbip*[emptyvarcap]{empty varcap}{Empty varcap}{VCo}
\circuitdescbip*[emptytvsdiode]{empty TVS diode}{Empty TVS diode, transorb\footnotemark}{tvsDo}
@@ -2349,9 +2372,9 @@ The package options \texttt{fulldiode}, \texttt{strokediode}, and \texttt{emptyd
\circuitdescbip[fullzdiode]{full Zener diode}{Full Zener diode}{zD*}
\circuitdescbip[fullzzdiode]{full ZZener diode}{Full ZZener diode}{zzD*}
\circuitdescbip[fulltdiode]{full tunnel diode}{Full tunnel diode}{tD*}
- \circuitdescbip[fullpdiode]{full photodiode}{Full photodiode}{pD*}
- \circuitdescbip[fulllediode]{full led}{Full led}{leD*}
- \circuitdescbip[fulllaserdiode]{full laser diode}{Full laser diode}{lasD*}
+ \circuitdescbip[fullpdiode]{full photodiode}{Full photodiode}{pD*}(arrows/-30/0.3)
+ \circuitdescbip[fulllediode]{full led}{Full led}{leD*}(arrows/-30/0.3)
+ \circuitdescbip[fulllaserdiode]{full laser diode}{Full laser diode}{lasD*}(arrows/-30/0.3)
\circuitdescbip[fullvarcap]{full varcap}{Full varcap}{VC*}
\circuitdescbip[fulltvsdiode]{full TVS diode}{Full TVS diode, transorb}{tvsD*}
\circuitdescbip[fullshdiode]{full Shockley diode}{Full Shockley diode}{shD*}
@@ -2366,9 +2389,9 @@ These shapes have no exact node-style counterpart, because the stroke line is bu
\circuitdescbip*[emptyzdiode]{stroke Zener diode}{Stroke Zener diode}{zD-}
\circuitdescbip*[emptyzzdiode]{stroke ZZener diode}{Stroke ZZener diode}{zzD-}
\circuitdescbip*[emptytdiode]{stroke tunnel diode}{Stroke tunnel diode}{tD-}
- \circuitdescbip*[emptypdiode]{stroke photodiode}{Stroke photodiode}{pD-}
- \circuitdescbip*[emptylediode]{stroke led}{Stroke led}{leD-}
- \circuitdescbip*[emptylaserdiode]{stroke laser diode}{Stroke laser diode}{lasD-}
+ \circuitdescbip*[emptypdiode]{stroke photodiode}{Stroke photodiode}{pD-}(arrows/-30/0.3)
+ \circuitdescbip*[emptylediode]{stroke led}{Stroke led}{leD-}(arrows/-30/0.3)
+ \circuitdescbip*[emptylaserdiode]{stroke laser diode}{Stroke laser diode}{lasD-}(arrows/-30/0.3)
\circuitdescbip*[emptyvarcap]{stroke varcap}{Stroke varcap}{VC-}
\end{groupdesc}
@@ -2457,7 +2480,7 @@ You can change the scale of the diodes by setting the key \texttt{diodes/scale}
\end{circuitikz}
\end{LTXexample}
-You can change the direction of the LEDs and photodiodes' arrows by using the binary keys \texttt{led arrows from cathode} and \texttt{pd arrows to cathode} (the default are \texttt{led arrows from anode} and \texttt{pd arrows to anode}), as you can see in the following example.
+\paragraph{Optical devices arrows}\label{sec:opto-arrows} You can change the direction of the LEDs and photodiodes' arrows by using the binary keys \texttt{led arrows from cathode} and \texttt{pd arrows to cathode} (the default are \texttt{led arrows from anode} and \texttt{pd arrows to anode}), as you can see in the following example.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
@@ -2481,6 +2504,51 @@ You can change the direction of the LEDs and photodiodes' arrows by using the bi
\end{circuitikz}
\end{LTXexample}
+Since version \texttt{1.5.5}\footnote{Thanks to the idea by \href{https://github.com/circuitikz/circuitikz/issues/655}{Dr. Matthias Jung on GitHub}.}, you can change the arrows used for LEDs, photodiodes and laser diodes with the generic arrows options shown in~\ref{sec:tunablearrows}, using the name \texttt{opto}, like in the following (overdone) example. Normally you want just to change the \texttt{end arrow}\dots
+
+As you can see, you can also have the option to globally change the color, relative thickness, and dash pattern by setting keys with the \verb!\ctikzset! command (or, like in the following example, directly in the node instantiation) under the \texttt{opto arrows} hierarchy. The available keys are:
+
+\begin{center}
+ \begin{tabular}{>{\ttfamily}l>{\ttfamily}lp{0.5\linewidth}}
+ \toprule
+ parameter & default & description \\
+ \midrule
+ relative thickness & 1.0 & multiply the class thickness \\
+ color & default & stroke color: \texttt{default} is the same as the component \\
+ dash & default & dash pattern: \texttt{default} means not to change the setting for the component; \texttt{none} means unbroken line; every other input is a dash pattern.\footnotemark \\
+ \bottomrule
+ \end{tabular}
+ \footnotetext{Follows the syntax of the pattern sequence \texttt{\textbackslash pgfsetdash} --- see \TikZ{} manual for details; phase is always zero. Basically you pass pairs of dash-length -- blank-length dimensions, see the examples.}
+\end{center}
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}
+\newcommand{\optos}{%
+ to[leD] ++(1.5,0) to[pD*] ++(1.5,0)
+ to[lasD] ++(1.5,0)}
+\begin{scope}
+ \draw (0,2) \optos;
+ \ctikzset{led arrows from cathode}
+ \ctikzset{pd arrows to cathode}
+ \ctikzset{opto arrows/.cd, color=red,
+ dash={{1pt}{1pt}}}
+ \draw (0,0) \optos;
+\end{scope}
+\begin{scope}[color=blue, yshift=-6cm]
+ \ctikzset{opto end arrow={Triangle[angle'=45]}}
+ \ctikzset{opto start arrow={Hooks[red]}}
+ \draw (0,4) \optos;
+ \ctikzset{opto arrows/color=black}
+ \ctikzset{opto arrows/relative thickness=2}
+ \draw (0,2) \optos;
+ \ctikzset{led arrows from cathode}
+ \ctikzset{pd arrows to cathode}
+ \draw (0,0) \optos;
+\end{scope}
+\end{tikzpicture}
+\end{LTXexample}
+
+
\subsection{Sources and generators}
Notice that source and generators are divided in three classes that can be styled independently: traditional battery symbols (class \texttt{batteries}), independent generators (class \texttt{sources}) and dependent generators (class \texttt{csources}). This is because they are often treated differently, and so you can choose to, for example, fill the dependent sources but not the independent ones.
@@ -3590,8 +3658,8 @@ To show that a device is optional, you can dash it. The inner symbol will be kep
\circuitdesc{npn, schottky base}{schottky npn}{}
\circuitdesc{pnp, schottky base}{schottky pnp}{}
\circuitdesc{npn, bodydiode}{npn}{}(body C in/60/0.2, body E in/-60/0.2,body C out/0/0.3, body E out/-0/0.3)
- \circuitdesc{npn,photo}{photo npn}{}( nobase/0/0.4 )
- \circuitdesc{pnp,photo}{photo pnp}{}
+ \circuitdesc{npn,photo}{photo npn}{}(nobase/0/0.4)
+ \circuitdesc{pnp,photo}{photo pnp}{}(arrows/180/0.1)
\circuitdesc{nigbt}{nigbt}{Q}
\circuitdesc{pigbt}{pigbt}{}(centergap/0/0.5)
\circuitdesc{Lnigbt}{Lnigbt}{Q}
@@ -3715,6 +3783,16 @@ If the option \texttt{arrowmos} is used (or after the command \verb!\ctikzset{tr
You can go back to the no-arrows mos with \texttt{noarrowmos} locally or with
\texttt{\textbackslash ctikzset\{tripoles/mos style/no arrows\}}.
+You can also change\footnote{Thanks to the idea by \href{https://github.com/circuitikz/circuitikz/issues/655}{Dr. Matthias Jung on GitHub}.} the type of the arrow for the ``light rays'' of the phototransistors with the generic arrows options shown in~\ref{sec:tunablearrows}, using the name \texttt{opto}, like in the following (overdone) example. Also the \texttt{opto arrows} styling options (see section~\ref{sec:opto-arrows}).
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}
+ \draw (0,2) node[npn, photo]{} ++(2,0) node[pnp, photo]{};
+ \ctikzset{opto end arrow={Triangle[angle'=60]}}
+ \ctikzset{opto arrows/.cd, color=red, dash={{1pt}{1pt}}}
+ \draw (0,0) node[npn, photo]{} ++(2,0) node[pnp, photo]{};
+\end{tikzpicture}
+\end{LTXexample}
\paragraph{Circles.} Since \texttt{1.2.6}, you can add a circle\footnote{Suggested by Matthias Jung \href{https://github.com/circuitikz/circuitikz/issues/442}{on GitHub}} to most of the transistor shapes --- with the exception of multi-terminal (\texttt{bjtnpn} and \texttt{bjtpnp}, where it would be awkward anyway) and graphene FETs. The circle is intended in some case as the component's housing, and used to distinguish discrete components from integrated ones.
@@ -4296,11 +4374,15 @@ Access to the gate and/or base nodes can be gained by naming the transistors wit
;\end{circuitikz}
\end{LTXexample}
+Transistor used in path are fully path-style components, so to flip and rotate them you should use \texttt{mirror} and \texttt{invert} as shown in section~\ref{sec:mirror-flip-path}.
+
Transistor paths have the possibility to use the poles syntax (see section~\ref{sec:bipole-nodes}) but they have \textbf{no} voltage, current, flow, annotation options.
Also, the positioning of the labels is very simple and is not foolproof for all rotations; if you need to control them more please name the node and position them by hand, or use the more natural node style for transistors.
The \texttt{name} property is available also for bipoles; this is useful mostly for triac, potentiometer and thyristor (see~\ref{sec:othertrip}).
+
+
\subsection{Electronic Tubes}
Electronic tubes, also known as vacuum tubes, control current flow between electrodes. They come in many different flavours.
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
index 8972832190..057df444f3 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
@@ -16,8 +16,8 @@
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
-\def\pgfcircversion{1.5.4}
-\def\pgfcircversiondate{2022/09/09}
+\def\pgfcircversion{1.5.5}
+\def\pgfcircversiondate{2022/11/12}
\DeclareRelease{0.4}{2012/12/20}{circuitikz-0.4-body.tex}
\DeclareRelease{v0.4}{2012/12/20}{circuitikz-0.4-body.tex}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
index 46ec314f57..5575b33a96 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
@@ -933,6 +933,30 @@
\ctikzset{diodes/scale/.initial=1.0}
\ctikzset{diodes/fill/.initial=none}
\ctikzset{diodes/thickness/.initial=none}
+% we define opto arrows style here because they are used also
+% in transistors
+\ctikzset{opto arrows/.is family}
+\ctikzset{opto arrows/relative thickness/.initial=1}
+\ctikzset{opto arrows/color/.initial=default}
+\ctikzset{opto arrows/dash/.initial=default}
+\def\pgf@circ@set@optoarrow@style{%
+ % You *must* be sure that this is called inside a \pgfscope!
+ \pgfsetlinewidth{\ctikzvalof{opto arrows/relative thickness}\pgflinewidth}
+ \edef\@@none{none}\edef\@@default{default}
+ \edef\@@tmp{\ctikzvalof{opto arrows/color}}
+ \ifx\@@tmp\@@default\else
+ \pgfsetcolor{\@@tmp}
+ \fi
+ \edef\@@tmp{\ctikzvalof{opto arrows/dash}}
+ \ifx\@@tmp\@@default\else
+ \ifx\@@tmp\@@none
+ \pgfsetdash{}{0pt}% solid line, override dash
+ \else
+ \expandafter\pgfsetdash\expandafter{\@@tmp}{0cm}
+ \fi
+ \fi
+ \pgfcirc@set@arrows{opto}{}{latexslim}
+ }
\ctikzset{batteries/scale/.initial=1.0}
\ctikzset{batteries/fill/.initial=none}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
index 8fd93c0873..7cf950c887 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
@@ -23,6 +23,7 @@
\pgf@circ@declare@family@arrows{wiper}
\pgf@circ@declare@family@arrows{switch}
\pgf@circ@declare@family@arrows{gto gate}
+\pgf@circ@declare@family@arrows{opto}
%>>>
@@ -49,6 +50,8 @@
\ctikzset{bipoles/generic potentiometer/width=#1}%
\ctikzset{bipoles/ageneric/width=#1}%
\ctikzset{bipoles/tgeneric/width=#1}%
+ \ctikzset{bipoles/ldresistor/width=#1}%
+ \ctikzset{bipoles/ldgeneric/width=#1}%
}}
\ctikzset{wiper pos/.code={%
\ctikzset{bipoles/potentiometer/wiper pos=#1}%
@@ -65,6 +68,9 @@
\ctikzset{bipoles/vresistor/width/.initial=.8}
\ctikzset{bipoles/resistivesens/height/.initial=.6}
\ctikzset{bipoles/resistivesens/width/.initial=.8}
+\ctikzset{bipoles/ldresistor/height/.initial=.8}
+\ctikzset{bipoles/ldresistor/width/.initial=.8}
+\ctikzset{bipoles/ldresistor/internal scale/.initial=.8}
% square resistors
\ctikzset{bipoles/photoresistor/height/.initial=.6}
\ctikzset{bipoles/photoresistor/height 2/.initial=.3}
@@ -96,6 +102,9 @@
\ctikzset{bipoles/memristor/height/.initial=.30}
\ctikzset{bipoles/memristor/wave height/.initial=.5}
\ctikzset{bipoles/memristor/width/.initial=.80}
+\ctikzset{bipoles/ldgeneric/height/.initial=.8}
+\ctikzset{bipoles/ldgeneric/width/.initial=.8}
+\ctikzset{bipoles/ldgeneric/internal scale/.initial=.8}
\newif\ifpgf@circuit@europeanresistor
\ctikzset{resistor/.is choice}
@@ -351,7 +360,9 @@
%% Photoresistor
\pgfcircdeclarebipolescaled{resistors}
-{}
+{% anchor for light arrows
+ \anchor{arrows}{\northeast\pgf@x=0.575\pgf@x\pgf@y=1.1\pgf@y}%
+}
{\ctikzvalof{bipoles/photoresistor/height 2}}
{photoresistor}
{\ctikzvalof{bipoles/photoresistor/height}}
@@ -364,7 +375,7 @@
\endpgfscope
\pgfscope
- \pgfsetarrowsend{latexslim}
+ \pgf@circ@set@optoarrow@style
\pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{-1.2\pgf@circ@res@down}}
\pgfusepath{draw}
@@ -524,6 +535,55 @@
\endpgfscope
}
+%% european style LDR
+\pgfcircdeclarebipolescaled{resistors}
+{% anchor for light arrows
+ \anchor{arrows}{\northeast\pgf@x=1.6\pgf@x\pgf@y=1.4\pgf@y}%
+ \savedmacro{\zigs}{\edef\zigs{\ctikzvalof{resistors/zigs}}}
+}
+{\ctikzvalof{bipoles/ldgeneric/height}}
+{ldgeneric}
+{\ctikzvalof{bipoles/ldgeneric/height}}
+{\ctikzvalof{bipoles/ldgeneric/width}}
+{%
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfscope
+ \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
+ \pgf@circ@draworfill
+ \endpgfscope
+ \pgfscope
+ % arrows
+ \pgf@circ@set@optoarrow@style
+ \pgfpathmoveto{\pgfpoint{1.4\pgf@circ@res@right}{1.4\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.8\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{1.6\pgf@circ@res@right}{1.2\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{1.0\pgf@circ@res@right}{0.6\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \endpgfscope
+ \edef\@@intscale{\ctikzvalof{bipoles/ldgeneric/internal scale}}%
+ \pgfmathsetmacro{\@@hscale}{0.5*\@@intscale}%
+ \pgftransformscale{\@@intscale}% the end of the bipole will deactivate it
+ % the generic will be reduced by @@intscale; let's undo the scaling to
+ % connect the leads to the end of the component.
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left/\@@intscale-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{+0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{+0pt}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right/\@@intscale+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{+0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{+0pt}}
+ \pgftransformationadjustments
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/ldgeneric/width}*\scaledRlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \pgfusepath{draw}
+ \pgfscope
+ % reset the up at the "generic" thing
+ \pgf@circ@res@up=\ctikzvalof{bipoles/generic/height}\pgf@circ@scaled@Rlen
+ \pgf@circ@res@up=0.5\pgf@circ@res@up
+ \pgf@circ@res@down=-\pgf@circ@res@up
+ \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+}%
+
%% Zig-zag resistors
\def\pgf@circ@zigzag#1{%
\divide \pgf@circ@res@step by \numexpr4*\zigs\relax
@@ -655,7 +715,51 @@
\pgfpathlineto{\pgfpoint{-.9\pgf@circ@res@other}{\pgf@circ@res@down}}
\pgfusepath{draw}
\endpgfscope
-}% %>>>
+}%
+
+%% american style LDR
+\pgfcircdeclarebipolescaled{resistors}
+{% anchor for light arrows
+ \anchor{arrows}{\northeast\pgf@x=1.6\pgf@x\pgf@y=1.4\pgf@y}%
+ \savedmacro{\zigs}{\edef\zigs{\ctikzvalof{resistors/zigs}}}
+ % \pgfcirc@border@extend@full{1.2}{1.2}{1.2}{1.2}
+}
+{\ctikzvalof{bipoles/ldresistor/height}}
+{ldresistor}
+{\ctikzvalof{bipoles/ldresistor/height}}
+{\ctikzvalof{bipoles/ldresistor/width}}
+{%
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfscope
+ \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
+ \pgf@circ@draworfill
+ \endpgfscope
+ \pgfscope
+ % arrows
+ \pgf@circ@set@optoarrow@style
+ \pgfpathmoveto{\pgfpoint{1.4\pgf@circ@res@right}{1.4\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.8\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{1.6\pgf@circ@res@right}{1.2\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{1.0\pgf@circ@res@right}{0.6\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \endpgfscope
+ \edef\@@intscale{\ctikzvalof{bipoles/ldresistor/internal scale}}%
+ \pgfmathsetmacro{\@@hscale}{0.5*\@@intscale}%
+ \pgftransformscale{\@@intscale}% the end of the bipole will deactivate it
+ % the zigzag will be reduced by @@intscale; let's undo the scaling to
+ % connect the leads to the end of the component.
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left/\@@intscale-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{+0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{+0pt}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right/\@@intscale+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{+0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{+0pt}}
+ \pgftransformationadjustments
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/ldresistor/width}*\scaledRlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \pgf@circ@zigzag{\@@hscale}
+}%
+
+
+%>>>
%% Paths for resistive components: generic, resistors and wires% %<<<
@@ -697,6 +801,12 @@
\pgfcirc@node@to@style{l}{thermistor}{european resistive sensor}{}
\pgfcirc@style@to@style{resistive sensor}{sR}
+\def\pgf@circ@ldresistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{ldgeneric}{#1}\else\pgf@circ@bipole@path{ldresistor}{#1}\fi}
+\pgfcirc@path@to@style{l}{ldresistor}{light dependent resistor}{}
+\pgfcirc@node@to@style{l}{ldresistor}{american light dependent resistor}{}
+\pgfcirc@node@to@style{l}{ldgeneric}{european light dependent resistor}{}
+\pgfcirc@style@to@style{light dependent resistor}{ldR}
+
\def\pgf@circ@potentiometer@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{genericpotentiometer}{#1}\else\pgf@circ@bipole@path{potentiometer}{#1}\fi}
\pgfcirc@path@to@style{l}{potentiometer}{potentiometer}{}
\pgfcirc@node@to@style{l}{potentiometer}{american potentiometer}{}
@@ -3434,6 +3544,8 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@up}}
\pgfusepath{draw}
}
+% the styling of optical arrows is defined in pgfcirc.define.tex because
+% they are common to phototransistors
%
% draw LED arrows
@@ -3441,7 +3553,7 @@
\def\pgf@circ@draw@ledarrows{%
\pgfsetlinewidth{\pgfstartlinewidth}
\pgf@circ@fill@strokecolor
- \pgfsetarrowsend{latexslim}
+ \pgf@circ@set@optoarrow@style
\ifpgf@led@fliparrows
\pgfpathmoveto{\pgfpoint{0pt}{0.8\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{-0.6\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
@@ -3464,20 +3576,20 @@
\def\pgf@circ@draw@pdarrows{%
\pgfsetlinewidth{\pgfstartlinewidth}
\pgf@circ@fill@strokecolor
- \pgfsetarrowsstart{latexslim}
+ \pgf@circ@set@optoarrow@style
\ifpgf@pd@fliparrows
- \pgfpathmoveto{\pgfpoint{0pt}{0.8\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{-0.6\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{-0.6\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{0.8\pgf@circ@res@up}}
\pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@right}{0.6\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0pt}{1.6\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{0pt}{1.6\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.6\pgf@circ@res@up}}
\pgfusepath{draw}
\else
- \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
\pgfusepath{draw}
\fi
}
@@ -3487,7 +3599,7 @@
\def\pgf@circ@draw@laserarrows{%
\pgfsetlinewidth{\pgfstartlinewidth}
\pgf@circ@fill@strokecolor
- \pgfsetarrowsend{latexslim}
+ \pgf@circ@set@optoarrow@style
\pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{1.1\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{-0.4\pgf@circ@res@right}{2.1\pgf@circ@res@up}}
\pgfusepath{draw}
@@ -3495,10 +3607,26 @@
\pgfpathlineto{\pgfpoint{0.2\pgf@circ@res@right}{2.1\pgf@circ@res@up}}
\pgfusepath{draw}
}
+
+\def\pgf@circ@generate@diode@saved@arrows#1#2#3#4#5{%
+ \savedanchor{\arrows}{%
+ \pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen
+ \pgf@ya=\ctikzvalof{bipoles/diode/height}\pgf@circ@scaled@Rlen
+ \pgf@xa=\ctikzvalof{bipoles/diode/width}\pgf@circ@scaled@Rlen
+ \pgf@x=.5\pgf@xa\pgf@y=.5\pgf@ya
+ \csname ifpgf@#5@fliparrows\endcsname
+ \pgf@x=#1\pgf@x\pgf@y=#2\pgf@y
+ \else
+ \pgf@x=#3\pgf@x\pgf@y=#4\pgf@y
+ \fi
+ }
+}
%% Black light emitting diode
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
\pgfcirc@border@extend@updown{1.8}{1}
+ \pgf@circ@generate@diode@saved@arrows{-0.2}{2.0}{1.0}{2.0}{led}
+ \anchor{arrows}{\arrows}
}
{\ctikzvalof{bipoles/diode/height}}
{fulllediode}
@@ -3519,6 +3647,8 @@
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
\pgfcirc@border@extend@updown{1.8}{1}
+ \pgf@circ@generate@diode@saved@arrows{-0.1}{2.2}{-0.1}{2.2}{pd}%pd or led dosen't matter
+ \anchor{arrows}{\arrows}
}
{\ctikzvalof{bipoles/diode/height}}
{fulllaserdiode}
@@ -3541,6 +3671,8 @@
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
\pgfcirc@border@extend@updown{1.8}{1}
+ \pgf@circ@generate@diode@saved@arrows{-0.2}{2.0}{1.0}{2.0}{pd}
+ \anchor{arrows}{\arrows}
}
{\ctikzvalof{bipoles/diode/height}}
{fullpdiode}
@@ -3709,6 +3841,8 @@
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
\pgfcirc@border@extend@updown{1.8}{1}
+ \pgf@circ@generate@diode@saved@arrows{-0.2}{2.0}{1.0}{2.0}{led}
+ \anchor{arrows}{\arrows}
}
{\ctikzvalof{bipoles/diode/height}}
{emptylediode}
@@ -3731,6 +3865,8 @@
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
\pgfcirc@border@extend@updown{1.8}{1}
+ \pgf@circ@generate@diode@saved@arrows{-0.1}{2.2}{-0.1}{2.2}{pd}%pd or led dosen't matter
+ \anchor{arrows}{\arrows}
}
{\ctikzvalof{bipoles/diode/height}}
{emptylaserdiode}
@@ -3755,6 +3891,8 @@
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
\pgfcirc@border@extend@updown{1.8}{1}
+ \pgf@circ@generate@diode@saved@arrows{-0.2}{2.0}{1.0}{2.0}{pd}
+ \anchor{arrows}{\arrows}
}
{\ctikzvalof{bipoles/diode/height}}
{emptypdiode}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
index 4887d89857..7b03c9b267 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
@@ -3993,8 +3993,16 @@
\northeast
\pgf@y=-\ctikzvalof{tripoles/#1/base height}\pgf@y
}
+ \anchor{arrows}{
+ \northeast
+ \pgf@circ@res@up = \pgf@y
+ \left
+ \pgf@circ@res@left = \pgf@x
+ \pgf@x=\ctikzvalof{tripoles/#1/base width}\pgf@circ@res@left
+ \advance\pgf@x by 0.6\pgf@circ@res@left
+ \pgf@y=0.2\pgf@circ@res@up
+ }
}{
-
% add the circle if requested (before everything else, so we can fill it)
\pgfcirc@transistorcircle
@@ -4114,24 +4122,20 @@
\ifpgf@circuit@bpt@drawphoto
\pgfscope
\pgf@circ@fill@strokecolor
- \pgfsetarrowsstart{latexslim}
- \pgfpathmoveto{\pgfpointadd{\pgfpoint
- {\ctikzvalof{tripoles/#1/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- {\pgfpoint{0.05\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
- \pgfpathlineto{\pgfpointadd{\pgfpoint
- {\ctikzvalof{tripoles/#1/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- {\pgfpoint{0.5\pgf@circ@res@left}{0.3\pgf@circ@res@up}}}
+ \pgf@circ@set@optoarrow@style
+ \pgfpathmoveto{\pgfpoint
+ {(0.5+\ctikzvalof{tripoles/#1/base width})*\pgf@circ@res@left}
+ {0.3\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {(0.05+\ctikzvalof{tripoles/#1/base width})*\pgf@circ@res@left}
+ {0.1\pgf@circ@res@up}}
\pgfusepath{draw}
- \pgfpathmoveto{\pgfpointadd{\pgfpoint
- {\ctikzvalof{tripoles/#1/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- {\pgfpoint{0.05\pgf@circ@res@left}{-0.1\pgf@circ@res@up}}}
- \pgfpathlineto{\pgfpointadd{\pgfpoint
- {\ctikzvalof{tripoles/#1/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- {\pgfpoint{0.5\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
+ \pgfpathmoveto{\pgfpoint
+ {(0.5+\ctikzvalof{tripoles/#1/base width})*\pgf@circ@res@left}
+ {0.1\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {(0.05+\ctikzvalof{tripoles/#1/base width})*\pgf@circ@res@left}
+ {-0.1\pgf@circ@res@up}}
\pgfusepath{draw}
\endpgfscope
\else
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
index e7b158d512..5743b9cfe3 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
@@ -10,8 +10,8 @@
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
-\def\pgfcircversion{1.5.4}
-\def\pgfcircversiondate{2022/09/09}
+\def\pgfcircversion{1.5.5}
+\def\pgfcircversiondate{2022/11/12}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]