From 2713ec666b0e53418a839b97c48e0a9234fe5c98 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 11 Oct 2022 03:01:16 +0000 Subject: CTAN sync 202210110301 --- graphics/mcf2graph/CHANGELOG | 7 +- graphics/mcf2graph/README | 4 +- graphics/mcf2graph/mcf2graph.mp | 97 +- graphics/mcf2graph/mcf_exa_code.pdf | Bin 79537 -> 78850 bytes graphics/mcf2graph/mcf_exa_code.tex | 5 +- graphics/mcf2graph/mcf_exa_soc.mp | 18 +- graphics/mcf2graph/mcf_example.pdf | Bin 450444 -> 449243 bytes graphics/mcf2graph/mcf_example.tex | 4 +- graphics/mcf2graph/mcf_library.mcf | 2125 ++++++++++---------- graphics/mcf2graph/mcf_man_soc.mp | 8 +- graphics/mcf2graph/mcf_manual.pdf | Bin 289199 -> 289188 bytes graphics/mcf2graph/mcf_manual.tex | 85 +- graphics/mcf2graph/mcf_mplib_exa.pdf | Bin 195580 -> 195490 bytes graphics/mcf2graph/mcf_mplib_exa.tex | 19 +- graphics/pgf/contrib/tikz-ext/README.md | 2 +- .../tikz-ext/tikz-ext-manual-en-calendar.tex | 100 + .../generic/tikz-ext/tikz-ext-manual-en-intro.tex | 31 + .../tikz-ext-manual-en-library-calendar-plus.tex | 81 + .../tikz-ext/tikz-ext-manual-en-library-misc.tex | 246 +++ .../tikz-ext-manual-en-library-node-families.tex | 124 ++ .../tikz-ext-manual-en-library-paths.arcto.tex | 110 + .../tikz-ext-manual-en-library-paths.ortho.tex | 199 ++ .../tikz-ext-manual-en-library-paths.timer.tex | 92 + .../tikz-ext-manual-en-library-patterns.images.tex | 52 + ...tikz-ext-manual-en-library-positioning-plus.tex | 183 ++ ...kz-ext-manual-en-library-topaths.arcthrough.tex | 63 + .../tikz-ext/tikz-ext-manual-en-library-trans.tex | 136 ++ .../tikz-ext/tikz-ext-manual-en-main-body.tex | 228 +++ .../tikz-ext/tikz-ext-manual-en-main-preamble.tex | 402 ++++ .../tikz-ext-manual-en-pgf-shapes-circlearrow.tex | 93 + ...z-ext-manual-en-pgf-shapes-circlecrosssplit.tex | 53 + .../tikz-ext-manual-en-pgf-shapes-heatmark.tex | 83 + .../tikz-ext-manual-en-pgf-shapes-rectround.tex | 58 + .../tikz-ext-manual-en-pgf-shapes-superellipse.tex | 105 + .../tikz-ext/tikz-ext-manual-en-pgf-trans.tex | 176 ++ .../doc/generic/tikz-ext/tikz-ext-manual.bib | 322 +++ .../doc/generic/tikz-ext/tikz-ext-manual.pdf | Bin 0 -> 534933 bytes .../doc/generic/tikz-ext/tikz-ext-manual.tex | 28 + .../tikz-ext/doc/tikz-ext-manual-en-calendar.tex | 82 - .../tikz-ext/doc/tikz-ext-manual-en-intro.tex | 31 - .../tikz-ext-manual-en-library-calendar-plus.tex | 81 - .../doc/tikz-ext-manual-en-library-misc.tex | 246 --- .../tikz-ext-manual-en-library-node-families.tex | 124 -- .../doc/tikz-ext-manual-en-library-paths.arcto.tex | 110 - .../doc/tikz-ext-manual-en-library-paths.ortho.tex | 185 -- .../doc/tikz-ext-manual-en-library-paths.timer.tex | 92 - .../tikz-ext-manual-en-library-patterns.images.tex | 52 - ...tikz-ext-manual-en-library-positioning-plus.tex | 183 -- ...kz-ext-manual-en-library-topaths.arcthrough.tex | 63 - .../doc/tikz-ext-manual-en-library-trans.tex | 136 -- .../tikz-ext/doc/tikz-ext-manual-en-main-body.tex | 204 -- .../doc/tikz-ext-manual-en-main-preamble.tex | 402 ---- .../tikz-ext-manual-en-pgf-shapes-circlearrow.tex | 93 - ...z-ext-manual-en-pgf-shapes-circlecrosssplit.tex | 53 - .../doc/tikz-ext-manual-en-pgf-shapes-heatmark.tex | 83 - .../tikz-ext-manual-en-pgf-shapes-rectround.tex | 58 - .../tikz-ext-manual-en-pgf-shapes-superellipse.tex | 105 - .../tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex | 176 -- .../pgf/contrib/tikz-ext/doc/tikz-ext-manual.bib | 299 --- .../pgf/contrib/tikz-ext/doc/tikz-ext-manual.pdf | Bin 525958 -> 0 bytes .../pgf/contrib/tikz-ext/doc/tikz-ext-manual.tex | 32 - .../pgf/contrib/tikz-ext/pgfcalendar-ext.code.tex | 327 --- graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.sty | 11 - graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.tex | 13 - .../pgflibraryext.shapes.circlearrow.code.tex | 66 - .../pgflibraryext.shapes.circlecrosssplit.code.tex | 292 --- .../pgflibraryext.shapes.heatmark.code.tex | 181 -- ...raryext.shapes.rectangleroundedcorners.code.tex | 318 --- .../pgflibraryext.shapes.superellipse.code.tex | 198 -- .../pgflibraryext.transformations.mirror.code.tex | 96 - .../tex/generic/tikz-ext/pgfcalendar-ext.code.tex | 370 ++++ .../pgflibraryext.shapes.circlearrow.code.tex | 66 + .../pgflibraryext.shapes.circlecrosssplit.code.tex | 292 +++ .../pgflibraryext.shapes.heatmark.code.tex | 181 ++ ...raryext.shapes.rectangleroundedcorners.code.tex | 318 +++ .../pgflibraryext.shapes.superellipse.code.tex | 198 ++ .../pgflibraryext.transformations.mirror.code.tex | 96 + .../tikz-ext/tikzlibraryext.calendar-plus.code.tex | 93 + .../generic/tikz-ext/tikzlibraryext.misc.code.tex | 251 +++ .../tikz-ext/tikzlibraryext.node-families.code.tex | 339 ++++ ...raryext.node-families.shapes.geometric.code.tex | 38 + .../tikz-ext/tikzlibraryext.paths.arcto.code.tex | 326 +++ .../tikz-ext/tikzlibraryext.paths.ortho.code.tex | 692 +++++++ .../tikz-ext/tikzlibraryext.paths.timer.code.tex | 188 ++ .../tikzlibraryext.patterns.images.code.tex | 60 + .../tikzlibraryext.positioning-plus.code.tex | 262 +++ .../tikzlibraryext.topaths.arcthrough.code.tex | 50 + .../tikzlibraryext.transformations.mirror.code.tex | 130 ++ .../tex/latex/tikz-ext/pgfcalendar-ext.sty | 11 + .../tex/plain/tikz-ext/pgfcalendar-ext.tex | 13 + .../tikz-ext/tikzlibraryext.calendar-plus.code.tex | 93 - .../contrib/tikz-ext/tikzlibraryext.misc.code.tex | 251 --- .../tikz-ext/tikzlibraryext.node-families.code.tex | 339 ---- ...raryext.node-families.shapes.geometric.code.tex | 38 - .../tikz-ext/tikzlibraryext.paths.arcto.code.tex | 104 - .../tikz-ext/tikzlibraryext.paths.ortho.code.tex | 681 ------- .../tikz-ext/tikzlibraryext.paths.timer.code.tex | 188 -- .../tikzlibraryext.patterns.images.code.tex | 60 - .../tikzlibraryext.positioning-plus.code.tex | 262 --- .../tikzlibraryext.topaths.arcthrough.code.tex | 50 - .../tikzlibraryext.transformations.mirror.code.tex | 130 -- 101 files changed, 8151 insertions(+), 7750 deletions(-) create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-calendar.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-intro.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-calendar-plus.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-misc.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-node-families.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-paths.arcto.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-paths.ortho.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-paths.timer.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-patterns.images.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-positioning-plus.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-topaths.arcthrough.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-trans.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-main-body.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-main-preamble.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlearrow.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlecrosssplit.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-heatmark.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-rectround.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-superellipse.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-trans.tex create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual.bib create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual.pdf create mode 100644 graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-calendar.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-intro.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-calendar-plus.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-misc.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-node-families.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.arcto.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.ortho.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.timer.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-patterns.images.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-positioning-plus.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-topaths.arcthrough.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-trans.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-body.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-preamble.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-circlearrow.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-circlecrosssplit.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-heatmark.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-rectround.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-superellipse.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.bib delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.pdf delete mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.sty delete mode 100644 graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.circlecrosssplit.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.heatmark.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.rectangleroundedcorners.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.superellipse.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/pgflibraryext.transformations.mirror.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgfcalendar-ext.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.circlecrosssplit.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.heatmark.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.rectangleroundedcorners.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.superellipse.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.transformations.mirror.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.calendar-plus.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.misc.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.node-families.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.node-families.shapes.geometric.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.paths.arcto.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.paths.ortho.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.paths.timer.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.patterns.images.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.positioning-plus.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.topaths.arcthrough.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.transformations.mirror.code.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/latex/tikz-ext/pgfcalendar-ext.sty create mode 100644 graphics/pgf/contrib/tikz-ext/tex/plain/tikz-ext/pgfcalendar-ext.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/tikzlibraryext.calendar-plus.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/tikzlibraryext.misc.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/tikzlibraryext.node-families.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/tikzlibraryext.node-families.shapes.geometric.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/tikzlibraryext.paths.arcto.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/tikzlibraryext.paths.ortho.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/tikzlibraryext.paths.timer.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/tikzlibraryext.patterns.images.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/tikzlibraryext.positioning-plus.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/tikzlibraryext.topaths.arcthrough.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/tikzlibraryext.transformations.mirror.code.tex (limited to 'graphics') diff --git a/graphics/mcf2graph/CHANGELOG b/graphics/mcf2graph/CHANGELOG index cab0e24d66..a5160a5a14 100644 --- a/graphics/mcf2graph/CHANGELOG +++ b/graphics/mcf2graph/CHANGELOG @@ -1,6 +1,11 @@ ******************************************************************************* - Changelog of mcf2graph software package by Akira Yamaji 2022-08-22 + Changelog of mcf2graph software package by Akira Yamaji 2022-10-10 ******************************************************************************* +[ver. 4.88 / 2022-10-10] + -change format of mcf_library.mcf + -update MCF manual,example + -update mcf_library.mcf + [ver. 4.87 / 2022-08-22] -change format of mcf_library.mcf -change output file name diff --git a/graphics/mcf2graph/README b/graphics/mcf2graph/README index 3596c877de..bbeb4dcb83 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.87 2022-08-22 + version : 4.88 2022-10-10 E-mail : mcf2graph@gmail.com Located at : http://www.ctan.org/pkg/mcf2graph ******************************************************************************** @@ -48,7 +48,7 @@ (11) >mpost -s ahlength=7 filename => output report file 4. License - mcf2graph ver 4.87 Copyright (c) 2013-2022 Akira Yamaji + mcf2graph ver 4.88 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 diff --git a/graphics/mcf2graph/mcf2graph.mp b/graphics/mcf2graph/mcf2graph.mp index a5c880ed0b..729be297d0 100644 --- a/graphics/mcf2graph/mcf2graph.mp +++ b/graphics/mcf2graph/mcf2graph.mp @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 4.87 Copyright (c) 2013-2022 Akira Yamaji +% mcf2graph ver 4.88 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.87 2022.08.22"; +message "* This is mcf2graph ver 4.88 2022.10.10"; tracingstats:=1; prologues:=3; warningcheck:=0; %------------------------------------------------------------------------------------------------- newinternal string EN_; @@ -185,13 +185,13 @@ def beginfigm(text s)= save ',mc,f_ext,blen,ext,add,ang_br,fw_n,bw_n,at_colon,info_cnt,group_num,bond_cntA,warning_cnt, hideH,hideH_cnt,filter_s,mc_indent,cntM,cntA,cntB,minX,minY,maxX,maxY,posA,posM,lineB, sB,eB,angB,angA,lenB,angX,numS,sumA,bond_num,wdM,htM,chargeA,addA,add_rot,cal_FM,cal_MW, - cal_MI,inf_Cat,inf_NO,inf_EN,inf_JN,inf_FM,inf_CAS,inf_USE,inf_EXA,inf_EXB,inf_MW, - mol_pic,sC,sI,sS,sT,sV,color_list,unit_cnt,f_end,semic_cnt,f_match,var_n,tag_a,var_a; - numeric mc_indent[],hideH[],lineB[],sB[],eB[],angB[],angA[],lenB[],angX[],strA[],sumA[], - bond_num[],wdM[],htM[],chargeA[],addA[],add_rot[]; + cal_MI,inf_Cat,inf_NO,inf_EN,inf_JN,inf_FM,inf_CAS,inf_USE,inf_EXA,inf_EXB,inf_MW,mol_pic, + sC,sI,sS,sT,sV,color_list,unit_cnt,f_end,semic_cnt,f_match,var_n,tag_a,var_a; + numeric mc_indent[],op_indent[],ex_indent[],ad_indent[],hideH[],lineB[],sB[],eB[],angB[],angA[], + lenB[],angX[],strA[],sumA[],bond_num[],wdM[],htM[],chargeA[],addA[],add_rot[]; pair posA[],posM[][]; - string mc[],tag_a[],var_a[],mc,filter_s,cal_FM,cal_MW,cal_MI,inf_Cat,inf_NO,inf_EN,inf_JN, - inf_FM,inf_CAS,inf_USE,inf_EXA,inf_EXB,inf_MW,sC,sI,sS,sT,sV; + string mc[],ex[],ad[],op[],tag_a[],var_a[],mc,ex,ad,op,filter_s,cal_FM,cal_MW,cal_MI,inf_Cat, + inf_NO,inf_EN,inf_JN,inf_FM,inf_CAS,inf_USE,inf_EXA,inf_EXB,inf_MW,sC,sI,sS,sT,sV,firstc; picture mol_pic[]; color color_list[]; %------------------------------------------------------------------------------------------------ @@ -200,17 +200,22 @@ def beginfigm(text s)= let ext=ext_to_fig; let add=add_to_molecule; def '=read_ud enddef; %------------------------------------------------------------------------------------------------ inf_NO:=inf_EN:=inf_JN:=inf_MW:=inf_FM:=inf_CAS:=inf_Cat:=inf_EXA:=inf_EXB:="-"; - mc:=temps:=cal_MW:=cal_MI:=cal_FM:=filter_s:=""; file_input:=default_library; + mc:=ex:=ad:=op:=temps:=cal_MW:=cal_MI:=cal_FM:=filter_s:=""; file_input:=default_library; %------------------------------------------------------------------------------------------------ parts_num:=parts_usr_start; parts_int:=parts_int_start; - fig_num:=fig_num+1; f_ext:=cntM:=mc_row:=info_cnt:=f_EOF:=0; + fig_num:=fig_num+1; f_ext:=cntM:=mc_row:=ex_row:=ad_row:=op_row:=info_cnt:=f_EOF:=0; %------------------------------------------------------------------------------------------------ for list=s: - at_colon:=scan_c(":",list); - if at_colon=1: - fw_n:=scan_char(" ",list,1,2); bw_n:=scan_char(" ",list,-1,2); - mc_indent[incr mc_row]:=fw_n-2; - mc[mc_row]:=substring(fw_n-1,bw_n) of list; mc:=mc&mc[mc_row]; + at_colon:=scan_c(":",list); firstc:=subc(1,list); + fw_n:=scan_char(" ",list,1,2); bw_n:=scan_char(" ",list,-1,2); + if firstc=":": mc_indent[incr mc_row]:=fw_n-2; + mc[mc_row]:=substring(fw_n-1,bw_n) of list; mc:=mc&mc[mc_row]; + ef firstc="*": ex_indent[incr ex_row]:=fw_n-2; + ex[ex_row]:=substring(fw_n-1,bw_n) of list; ex:=ex&ex[ex_row]; + ef firstc="+": ad_indent[incr ad_row]:=fw_n-2; + ad[ad_row]:=substring(fw_n-1,bw_n) of list; ad:=ad&ad[ad_row]; + ef firstc="=": op_indent[incr op_row]:=fw_n-2; + op[op_row]:=substring(fw_n-1,bw_n) of list; op:=op&op[op_row]; ef at_colon>=1: info_s[incr info_cnt]:=list; sT:=substring(0,at_colon-1) of list; sV:=substring(at_colon,length(list)) of list; @@ -292,29 +297,31 @@ def pickup_data_unit(expr t,v,f)= f_end:=unit_cnt:=semic_cnt:=f_match:=inf_num:=0; if t="n": var_n:=scantokens(v); fi forever: - sS:=readfrom file_input; if sS=EOF: f_EOF:=1; fi exitif f_EOF=1; - if subc(1,sS)="%": - ef subc(1,sS)="+": + temps:=readfrom file_input; if temps=EOF: f_EOF:=1; fi exitif f_EOF=1; firstc:=subc(1,temps); + if firstc="%": + ef (firstc=":")or(firstc="="): + if firstc=":": nF:=1; ef firstc="=": nF:=2; fi unit_cnt:=unit_cnt+1; if v="*": f_match:=1; ef t="n": if unit_cnt=var_n: f_match:=1; fi fi if f_match=1: forever: - sS:=readfrom file_input; - if sS=EOF: f_EOF:=1; fi exitif f_EOF=1; exitif subc(1,sS)="+"; - if subc(1,sS)<>"%": - fw_n:=scan_char(" ",sS,1,1); mc_indent[incr mc_row]:=fw_n-1; - mc[mc_row]:=substring(fw_n-1,length(sS)) of sS; mc:=mc&mc[mc_row]; fi + sS:=readfrom file_input; firstc:=subc(1,sS); nS:=length(sS); + if sS=EOF: f_EOF:=1; fi exitif f_EOF=1; exitif firstc=";"; + if firstc=":": nF:=1; ef firstc="=": nF:=2; ef firstc="*": nF:=3; ef firstc="+": nF:=4; + else: fw_n:=scan_char(" ",sS,1,1)-1; temps:=substring(fw_n,nS) of sS; + if nF=1: mc_indent[incr mc_row]:=fw_n; mc[mc_row]:=temps; mc:=mc&mc[mc_row]; + ef nF=2: op_indent[incr op_row]:=fw_n; op[op_row]:=temps; op:=op&op[op_row]; + ef nF=3: ex_indent[incr ex_row]:=fw_n; ex[ex_row]:=temps; ex:=ex&ex[ex_row]; + ef nF=4: ad_indent[incr ad_row]:=fw_n; ad[ad_row]:=temps; ad:=ad&ad[ad_row]; fi fi endfor for i=1 upto inf_num: - if known scantokens("inf_"&tag_a[i]): scantokens("inf_"&tag_a[i]):=var_a[i]; fi - endfor + if known scantokens("inf_"&tag_a[i]): scantokens("inf_"&tag_a[i]):=var_a[i]; fi endfor f_end:=1; else: - forever: - sS:=readfrom file_input; if sS=EOF: f_EOF:=1; fi exitif f_EOF=1; exitif subc(1,sS)="+"; - endfor + forever: sS:=readfrom file_input; + if sS=EOF: f_EOF:=1; fi exitif f_EOF=1; exitif subc(1,sS)=";"; endfor fi else: - inf_num:=split_str(sS,";")(arg_s); + inf_num:=split_str(temps,";")(arg_s); for i=1 upto inf_num: get_tag_var(arg_s[i])(tag_a[i],var_a[i]); if t=tag_a[i]: if v=var_a[i]: f_match:=1; fi fi endfor @@ -553,12 +560,12 @@ enddef; %------------------------------------------------------------------------------------------------- def add_to_molecule(text t)= begingroup - save w,h,n,l,p,am,aw,A,B,plus,minus,lonepair,__,**,=>,<<,/*; + save w,h,n,l,p,am,aw,A,B,plus,minus,lonepair,wave_line,__,**,=>,<<,/*; numeric A[]dir,B[]up,A[]ang,B[]ang; pair __,p[],A[],B[]s,B[]e,B[]m,A[]up,A[]left,A[]right,A[]down,B[]up,B[]left,B[]right,B[]down; path B[]; def plus = circled_plus_add enddef; def minus = circled_minus_add enddef; - def lonepair = lone_pair_add enddef; + def lonepair = lone_pair_add enddef; def wave_line = wave_line_add enddef; ext_setup; w:=mol_wd; h:=mol_ht; l:=blen; aw:=atom_wd; p0:=(minX,minY); lonepairdiam:=0.3aw; lonepairspace:=.7aw; circlediam:=.6aw; circlepen:=.2; @@ -595,6 +602,10 @@ vardef circled_minus_add= nA:=circlediam; nB:=circlepen; vardef lone_pair_add expr n= image(draw (0,0) wpcs lonepairdiam; draw ((0,lonepairspace) rotated n) wpcs lonepairdiam;) enddef; +%------------------------------------------------------------------------------------------------- +vardef wave_line_add expr n= + image() +enddef; %================================================================================================= def MCat(expr w,h)(text t)= save_mposition:=mposition; mposition:=(w,h); MC(t) mposition:=save_mposition; enddef; @@ -966,10 +977,9 @@ def draw_bond(expr n)= ef nL=zf: wz_put(Ls,sfrt(Le,ww,ap),sfrt(Le,ww,am)); ef nL=zb: wz_put(Le,sfrt(Ls,ww,am),sfrt(Ls,ww,ap)); ef nL=dt: for i=0 step .75hash_gap/lenL until 1: drawdot i[Ls,Le]; endfor - ef nL=wv: nA:=3bond_pen_wd; nB:=lenL/nA; - draw Le for i=1 upto nB: - ..controls(((i-.5)/nB)[sfrt(Le,nA,iif(odd(i),ap,am)),sfrt(Ls,nA,iif(odd(i),ap,am))]) - ..(i/nB)[Le,Ls] endfor ..Ls; + ef nL=wv: nA:=.4bondgap; nB:=round(lenL/nA); + draw Ls for i=1 upto nB: ..controls(point (i-.5)/nB of sfrt(zA,nA,iif(odd i,ap,am))) + ..point i/nB of zA endfor ef nL=wf_r: filldraw Ls--sfrt(Le,.35ww,am)--sfrt(Le,.35ww,ap)--cycle wpcs .05ww; ef nL=wb_r: filldraw sfrt(Ls,.35ww,am)--Le--sfrt(Ls,.35ww,ap)--cycle wpcs .05ww; ef nL=bd_r: draw zA wpcs .65bondgap; @@ -1013,15 +1023,12 @@ def draw_bond(expr n)= if f_col=1: drawoptions(); fi enddef; %------------------------------------------------------------------------------------------------ -def wz_put(expr a,b,c)= - for i=0 upto lenL/hash_gap: - nA:=hash_gap*i/lenL; nD:=(hash_gap*i+ratio_hash_black*hash_gap)/lenL; - if nD>((lenL-hash_gap)/lenL): nD:=1; fi - fill nA[b,a]--nA[c,a]--nD[c,a]--nD[b,a]--cycle; endfor enddef; +def wz_put(expr a,b,c)= nB:=round(lenL/hash_gap); + for i=1 upto nB: nA:=i/nB; if i=1: nD:=0; else: nD:=(i-ratio_hash_black)/nB; fi + fill nD[a,b]--nD[a,c]--nA[a,c]--nA[a,b]--cycle; endfor enddef; %------------------------------------------------------------------------------------------------ -def bz_put(expr a,b,c,d)= - for i=0 upto lenL/hash_gap: - nA:=hash_gap*i/lenL; nD:=(hash_gap*i+ratio_hash_black*hash_gap)/lenL; +def bz_put(expr a,b,c,d)= nB:=round(lenL/hash_gap); + for i=0 upto nB-1: nA:=i/nB; nD:=nA+ratio_hash_black/nB; fill nA[b,a]--nA[d,c]--nD[d,c]--nD[b,a]--cycle; endfor enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def char_size_set(expr w,h)(expr s)= @@ -1588,7 +1595,7 @@ def mc_query(text s)= temps:=readfrom file_input; exitif temps=EOF; if subc(1,temps)<>"%": line_s[unit_cnt][incr unit_row]:=temps; - if (substring(0,2) of temps)="+-": + if subc(1,temps)=";": row_cnt[unit_cnt]:=unit_row; f_mcf:=unit_row:=0; filter_n:=1; for i=1 upto filter_cnt: filter_p[i]:=0; endfor sort_s:=""; @@ -1609,7 +1616,7 @@ def mc_query(text s)= for i=1 upto filter_cnt: if filter_p[i]=0: filter_n:=0; fi endfor info_cnt:=0; lib_unit_cnt:=lib_unit_cnt+1; if filter_n=1: if key_s<>"": sort_tbl[unit_cnt]:=sort_s; fi unit_cnt:=unit_cnt+1; fi - ef subc(1,temps)="+": f_mcf:=1; mc_row:=1; + ef (subc(1,temps)=":")or(subc(1,temps)="="): f_mcf:=1; mc_row:=1; ef subc(1,temps)<>"%": if f_mcf=1: mc_row:=mc_row+1; else: info_cnt:=split_str(temps,";")(arg_s); fi fi fi diff --git a/graphics/mcf2graph/mcf_exa_code.pdf b/graphics/mcf2graph/mcf_exa_code.pdf index e172c0175f..b0efde435d 100644 Binary files a/graphics/mcf2graph/mcf_exa_code.pdf and b/graphics/mcf2graph/mcf_exa_code.pdf differ diff --git a/graphics/mcf2graph/mcf_exa_code.tex b/graphics/mcf2graph/mcf_exa_code.tex index 73b13f6f19..7500dcfdf3 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.08.22 +% Print out mcf data list by A.Yamaji 2022.10.10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% ** mcf2graph.mf must be version 4.87 +% ** mcf2graph.mf must be version 4.88 % ** use mcf_library.mcf % ** typeset by LuaLaTeX(luamplib) \documentclass{article} @@ -78,6 +78,7 @@ \begin{mplibcode}% %%%%%% beginfigm("t:EXA","v+:*") %%%%%% beginfigm("t:EXA","v+:1") +%%%%%% beginfigm("t:EXA","v+:9") beginfigm("t:EXA","v+:2") if mc_check(mc)=0: MC(scantokens(mc)) diff --git a/graphics/mcf2graph/mcf_exa_soc.mp b/graphics/mcf2graph/mcf_exa_soc.mp index 23fd6742a2..4757efc670 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.08.22 +% Molecular Coding Format by Akira Yamaji 2022.10.10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -input mcf2graph; %%% it must be version 4.87 -message "* mcf_exa_soc 2022.08.22"; +input mcf2graph; %%% it must be version 4.88 +message "* mcf_exa_soc 2022.10.10"; message ""; %------------------------------------------------------------------------------ %%%%sw_frame:=Outside; @@ -15,7 +15,7 @@ tag1:="J"; tag2:="C"; tag3:="fm"; tag4:="mw"; tag5:="EN"; tag6:="MW"; %% outputformat:="png"; hppp:=vppp:=0.1; outputtemplate:="p%3c-%{EN_}.png"; %% outputformat:="svg"; outputtemplate:="s%3c-%{EN_}.svg"; %------------------------------------------------------------------------------ -%ext(defaultfont:=mpfont; defaultscale:=.3; label.rt(inf_EN,(0,0));) +%ext(defaultscale:=.3; label.rt(inf_EN,(0,0));) %------------------------------------------------------------------------------ %sw_output:=Fig+Info; %ext(defaultfont:=mpfont; defaultscale:=.3; @@ -35,8 +35,16 @@ forever: %%%% beginfigm("f:mcf_library","v+:*") % 'mcf_library.mcf'(default) %%%% beginfigm("f:temp","v+:*") % use query output 'temp.mcf' %%%% beginfigm("v+:*") % select all +%%%% beginfigm("t:EXA","v+:1","* defaultscale:=.3; label.rt(inf_EN,(0,0));") +%%%% beginfigm("t:EXA","v+:1","+ defaultscale:=.5; label(decimal(fig_num),p0);") +%%%% beginfigm("t:EXA","v+:1","= sw_frame:=Outside;") beginfigm("t:EXA","v+:1") % 'v+:1': select EXA=1 - if f_EOF=0: if mc_check(mc)=0: MC(scantokens(mc)) fi fi + if f_EOF=0: + if op_row>=1: scantokens(op) fi + if mc_check(mc)=0: MC(scantokens(mc)) fi + if ex_row>=1: ext(scantokens(ex)) fi + if ad_row>=1: add(scantokens(ad)) fi + fi endfigm exitif f_EOF=1; % exit if file end endfor diff --git a/graphics/mcf2graph/mcf_example.pdf b/graphics/mcf2graph/mcf_example.pdf index 7f98f432f3..fd1caad561 100644 Binary files a/graphics/mcf2graph/mcf_example.pdf and b/graphics/mcf2graph/mcf_example.pdf differ diff --git a/graphics/mcf2graph/mcf_example.tex b/graphics/mcf2graph/mcf_example.tex index 0ccfa64654..8d5ea965f0 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.08.22 +% Example of MCF Typeset with LuaLaTeX(luamplib) by A.Yamaji 2022.10.10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% ** mcf2graph.mf must be version 4.87 +% ** mcf2graph.mf must be version 4.88 % ** 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 0e9ee8f4c2..61909067d0 100644 --- a/graphics/mcf2graph/mcf_library.mcf +++ b/graphics/mcf2graph/mcf_library.mcf @@ -1,1129 +1,1154 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% molecular library file mcf_library.mcf by Akira Yamaji 2022.08.22 +% molecular library file mcf_library.mcf by Akira Yamaji 2022.10.10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % tag1:var1;tag2:var2;tag3:var3 ..... % first character of line "%" comment out -% first character of line "+" start,stop MCF +% first character of line ":" start MCF +% first character of line "=" start parameter setting +% first character of line "*" start ext(...) +% first character of line "+" start add(...) +% first character of line ";" stop MCF % Cat = Category,EN = Name,MW = Molecular weight %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Cat:Category;EN:Example;MW:100.00;EXA:% += + sw_frame:=Atom; +: +<30,?6,3=?5,{1,3,5,9}=dl,{2,6,9}:N,5:/NH2,7:NH +* + defaultscale:=.5; + label.bot(decimal(fig_num)&":"&inf_EN,(.5w,0)); ++ + defaultscale:=.3; + label.bot("A2",A2) withcolor red; + label.top("A6",A6) withcolor red; + label.top("A9",A9) withcolor red; +; %============================================================================== % molecular data for mcf_example.tex EXA:1[155] EXA:2[7] %============================================================================== Cat:biological;EN:Adenine;MW:135.13;EXA:1 -+ +: <30,?6,3=?5,{1,3,5,9}=dl,{2,6,9}:N,5:/NH2,7:NH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Guanine;MW:151.13;EXA:1 -+ +: <30,?6,3=?5,{1,3,9}=dl,{2,9}:N,{6,7}:NH,5://O,1:/NH2 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Cytosine;MW:111.10;EXA:1 -+ +: <30,?6,{4,6}=dl,4:N,3://O,2:NH,5:/NH2 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Thymine;MW:126.11;EXA:1 -+ +: <30,?6,3=dl,{2,6}:NH,{1,5}://O,4:/_ -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Uracil;MW:112.09;EXA:1 -+ +: <30,?6,6=dl,{3,5}://O,{2,4}:NH -+ +; %== Amino acid ================================================================ Cat:biological;EN:Glycine;MW:75.07;EXA:- -+ +: <30,NH2,!2,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Glycine;MW:75.07;EXA:- -+ +: <30,NH2,!2,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Alanine;MW:89.10;EXA:- -+ +: <30,NH2,!~wb,?!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Valine;MW:117.15;EXA:- -+ +: <30,NH2,!~wb,/?!,!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Leucine;MW:131.16;EXA:1 -+ +: <30,NH2,!~wb,/!?!,!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Isoleucine;MW:131.16;EXA:- -+ +: <30,NH2,!~wb,/'(/*_,!2),!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Serine;MW:105.09;EXA:- -+ +: <30,NH2,!~wb,/!OH,!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Threonine;MW:119.12;EXA:- -+ +: <30,NH2,!~wb,/'(/_,!~wf,OH),!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Cysteine;MW:121.16;EXA:- -+ +: <30,NH2,!~wb,/!SH,!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Methionine;MW:149.21;EXA:- -+ +: <30,NH2,!~wb,/'(!2,S,!),!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Phenylalanine;MW:165.19;EXA:- -+ +: <30,NH2,!~wb,/!Ph,!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Tyrosine;MW:181.19;EXA:- -+ +: <30,NH2,!~wb,/'(!Ph,-3:/OH),!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Triptophan;MW:204.21;EXA:- -+ +: <30,NH2,!~wb,!,COOH,@2,\,!,<24,|,?5,{2',5}=dl,2=Ph,4:NH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Proline;MW:115.13;EXA:- -+ +: <18,?5,3:NH,4:*/COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Glutamine;MW:146.15;EXA:- -+ +: <30,NH2,!~wb,!,COOH,@2,\`1,!`1,!,//O,!,NH2 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Asparagine;MW:132.12;EXA:- -+ +: <30,NH2,!~wb,/'(!,//O,!,NH2),!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Aspartic acid;MW:133.10;EXA:- -+ +: <30,NH2,!~wb,/!COOH,!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Glutamic acid;MW:147.13;EXA:- -+ +: <30,NH2,!~wb,/'(!2,COOH),!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Lysine;MW:146.19;EXA:- -+ +: <30,NH2,!~wb,/'(!4,NH2),!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Arginine;MW:174.21;EXA:- -+ +: <30,NH2,!~wb,!,COOH,@2,\`1,!`1,!2,NH,!,//NH,!,NH2 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Hystidine;MW:155.16;EXA:- -+ +: <30,NH2,!~wb,!,COOH,@2,\,!,|,?5,{1,3}=dl,3:N,5:NH -+ +; %============================================================================== Cat:biological;EN:L-DOPA;MW:197.19;EXA:- -+ +: <30,NH2,!~wb,!,COOH,@2,\,!,Ph,{-3,-4}:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Ornithine;MW:132.16;EXA:- -+ +: <30,NH2,!~wb,/'(!3,NH2),!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Citrulline;MW:175.2;EXA:- -+ +: <30,NH2,!~wb,/'(!3,NH,!,//O,!,NH2),!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:GABA;MW:103.12;EXA:- -+ +: <30,NH2,!4,COOH -+ +; %============================================================================== Cat:biological;EN:Citrate;MW:192.12;EXA:- -+ +: <30,COOH,!,!2`1.2,!,COOH,@-4`1,\,COOH,4:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:cis-Aconitate;MW:174.11;EXA:- -+ +: <30,COOH,!2,!!,!,COOH,@-4`1,\,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Isocitrate;MW:192.12;EXA:- -+ +: <30,COOH,!4,COOH,@-3,\`1,COOH,4:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Oxalosuccinate;MW:190.11;EXA:- -+ +: <30,COOH,!,!2`1.2,//O,!,COOH,@-4,\`1,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:alfa-Ketoglutarate;MW:146.1;EXA:- -+ +: <30,COOH,!3,//O,!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Succinate;MW:118.09;EXA:- -+ +: <30,COOH,!3,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Fumarate;MW:116.07;EXA:- -+ +: <30,COOH,!,!!,!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Malate;MW:132.07;EXA:- -+ +: <30,COOH,!3,COOH,3:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Oxaloacetate;MW:132.07;EXA:- -+ +: <30,COOH,!,//O,!2,COOH -+ +; %============================================================================== Cat:biological;EN:Glucose 1;MW:180.16;EXA:1 -+ +: <30,?6,5:O,2:*/OH,{1,3}:/*OH,4:*/*OH,6:*/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Glucose 2;MW:180.16;EXA:1 -+ +: <-30,OH,!2,*/OH,!,/*OH,!,/*OH,!,/*OH,!,//O,!,H -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:D-Glucose;MW:180.16;EXA:1 -+ +: hexose_hp,#.5,{1^$-90,2^$90,3^$-90,4^$-90}:/OH,6^$90:/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Fructose 1;MW:180.16;EXA:1 -+ +: <30,OH,!2,/*OH,!,*/OH,!,*/OH,!,//O,!2,OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Fructose 2;MW:180.16;EXA:1 -+ +: <-18,?5,5:O,1^-48:*/*!OH,1^48:/OH,{2',3}:*/OH,4:/*!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:D-Fluctose;MW:180.16;EXA:1 -+ +: Pyranose_hp,#.5,1^$-90:/OH,{2^$-90,3^$90}:/OH,{1^$90,4^$-90}:/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:D-Galactose;MW:180.16;EXA:1 -+ +: hexose_hp,#.5,{1^$90,2^$90,3^$-90,4^$-90}:/OH,6^$90:/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:D-Mannose;MW:180.16;EXA:1 -+ +: hexose_hp,#.5,{1^$-90,2^$90,3^$90,4^$-90}:/OH,6^$90:/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:L-Fucose;MW:164.16;EXA:1 -+ +: hexose_hp,#.5,{1^$-90,,2^$-90,3^$90,4^$90}:/OH,6^$-90:/_ -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:D-Ribose;MW:150.13;EXA:1 -+ +: Pyranose_hp,#.5,{2^$-90,3^$-90,4^$90}:/OH,1^$90:/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:D-Deoxyribose;MW:134.13;EXA:1 -+ +: Pyranose_hp,#.5,{2^$-90,4^$90}:/OH,1^$90:/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:D-Glucosamine;MW:179.17;EXA:1 -+ +: hexose_hp,#.5,{1^$-90,2^$90,4^$-90}:/OH,3^$-90:/NH2,6^$90:/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:N-acetyl-Glucosamine;MW:221.21;EXA:1 -+ +: hexose_hp,#.5,{1^$-90,2^$90,4^$-90}:/OH,3^$-90>lr:/NHCO!,6^$90:/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Glucuronic acid;MW:194.14;EXA:1 -+ +: hexose_hp,#.5,{1^$-90,2^$90,3^$-90,4^$-90}:/OH,6^$90:/COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Maltose;MW:342.3;EXA:1 -+ +: hexose_hp,#.5,{1^$-90,2^$90,3^$-90}:/OH,6^$90:/!OH,##, @4,$-50~arc_lb`1,O,$50~arc_br`1,<$0, |,hexose_hp,#.5,{2^$90,3^$-90,4^$-90}:/OH,6^$90:/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Sucrose;MW:342.3;EXA:1 -+ +: hexose_hp,#.5,{1^$-90,2^$90,3^$-90}:/OH,6^$90:/!OH,##, @4,$-50~arc_lb`1,O,$50~arc_br`1,<$0, |,#1.4,-35~wf_r,35~bd_r`1,30~wb_r,130`1.66,O,&1,##, #.5,{2^$-90,3^$90}:/OH,{1^$90,4^$-90}:/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Lactose;MW:342.3;EXA:1 -+ +: hexose_hp,#.5,{1^$90,2^$90,3^$-90}:/OH,6^$90:/!OH,##, @4,$0~arc_ltr,O,$0~arc_lbr, |,hexose_hp,#.5,{2^$90,3^$-90,4^$-90}:/OH,6^$90:/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Cellobiose;MW:342.3;EXA:1 -+ +: hexose_hp,#.5,{1^$-90,2^$90,3^$-90}:/OH,6^$90:/!OH,##, @4,$0~arc_lbr,O,$0~arc_ltr, |,hexose_hp,#.5,{2^$90,3^$-90,4^$-90}:/OH,6^$90:/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Trehalose;MW:342.3;EXA:1 -+ +: hexose_hp,#.5,{1^$-90,2^$90,3^$-90}:/OH,6^$90:/!OH,##, @4,@(1,0),|,hexose_hp,#.5,{1^$-90,2^$90,3^$-90}:/OH,6^$90:/!OH,##, ||,@4,$-37~arc_lb`3.25,O,&10~arc_br -+ +; %============================================================================== Cat:biological;EN:Geraniol;MW:154.25;EXA:1 -+ +: <30,!8,OH,{2,6}=dr,{2,6}:/_ -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Limonene;MW:136.24;EXA:- -+ +: <30,?6,2=dl,2:/_,@5,*\,/_,!! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:l-Menthol;MW:156.27;EXA:1 -+ +: <30,?6,2:/*?!,5:*/_,3:*/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Allicin;MW:162.28;EXA:1 -+ +: <-30,!!,!2,SO,!,S,!2,!! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Benzoic acid;MW:122.12;EXA:- -+ +: <30,Ph,3:/COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Gallic acid;MW:170.12;EXA:- -+ +: <30,Ph,3:/COOH,{1,5,6}:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Salicylic acid;MW:138.12;EXA:- -+ +: <30,Ph,3:/COOH,4:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Cinnamic acid;MW:148.16;EXA:- -+ +: <30,Ph,@3,\,!!,!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Cinnamaldehyde;MW:132.16;EXA:- -+ +: <30,Ph,@3,\,!!,!,CHO -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Caffeic acid;MW:180.16;EXA:1 -+ +: <30,Ph,{1,6}:/OH,@3,\,!!,!,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Vanillin;MW:152.15;EXA:1 -+ +: <30,Ph,2:/OH,3:/O!,5:/CHO -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Stearic acid;MW:284.48;EXA:1 -+ +: <30,!17,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Linoleic acid;MW:280.45;EXA:1 -+ +: <30,!5,-30,-30,!,-30,-30,!7,COOH,{6,9}=dr -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Sphingosine;MW:299.50;EXA:1 -+ +: <30,!18,OH,14=dr,-3:*/OH,-2:/*NH2 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Tocopherol;MW:430.717;EXA:1 -+ +: <30,Ph,3=?6,7:O,{1,2,5}:/_,8:/*_^60,6:/OH,@8,\,|,!12,{4,8}:/*_,12:/_ -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Thiamine;MW:265.35;EXA:1 -+ +: <30,Ph,4:/NH2,@3,\`1,!,<-12,?5,{-1,-4}=dl,{1,5,8}:N,11:S,{6,9}:/_, @-3,\^-12,!2,OH,8:p_^72 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Riboflavin;MW:376.37;EXA:1 -+ +: <30,Ph,{3,9}=?6,{8,16}=dl,{7,10,14}:N,12:NH,{11,13}://O,{1,6}:/_, @10,\`1.5,!,*/OH,!,/*OH,!,*/OH,!2,OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Nicotinic acid;MW:123.11;EXA:1 -+ +: <30,Ph,2:N,4:/COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Nicotinamide;MW:122.12;EXA:1 -+ +: <30,Ph,2:N,4:/CONH2 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Pantothenic acid;MW:219.23;EXA:1 -+ +: <30,OH,!8,COOH,3:??,4^35:/*H,4^-20:*/OH,5://O,6:NH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Pyridoxine;MW:169.18;EXA:1 -+ +: <30,Ph,2:N,3:/_,4:/OH,{5,6}:/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Biotin;MW:244.31;EXA:1 -+ +: <18,?5,4=?5,2:S,{6,8}:NH,7://O,{4^-54,5^54}:*/H, @3,\*^-12,!4,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Folic acid;MW:441.3975;EXA:1 -+ +: <30,?6,3=Ph2,1=dl,{2,7,10}:N,6:NH,5://O,1:/NH2, @9,\,!,NH,!,Ph,@-3,\,//O,!,NH,!,/*COOH,!3,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Carotene;MW:536.8726;EXA:1 -+ +: <30,?6,4=dl,3:??,5:/_, @4,\,|,!18,{1,3,5,7,9,11,13,15,17}=dr,{3,7,12,16}:/_,?6,-6=dl,-5:/_,-1:?? -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Adrenalin;MW:183.21;EXA:1 -+ +: <30,Ph,{1,6}:/OH,@4,\,*/OH,!2,NH,! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Caffeine;MW:194.194;EXA:1 -+ +: <30,?6,3=dl,{1,5}://O,-4=?5,-3=dl,7:N,{2,6,9}:N! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Nicotine;MW:162.23;EXA:1 -+ +: <30,Ph,2:N,@4,\,?5,8:N! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Capsaicin;MW:305.418;EXA:1 -+ +: <30,Ph,1:/OH,6:/O!,@4,\,!,NH,!,//O,!7,?!,-3=dl -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Gibberellin A3;MW:346.379;EXA:1 -+ +: <18,?5,3=?7,5=?6[12],@8,160`1.3,&3,13=dl,6=wf,8=wb, @5,40~zf`1,O,50,//O^180,&14~zb,2:/COOH,7://_,{13,8'}:*/OH,14:*/_,{1,4}:*/H^60 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Cholesterol;MW:386.664;EXA:1 -+ +: <30,?6,{-4,-2}=?6,-4=?5,7=dl, 1:*/OH,{4,12}:*/_^60,{9'^60,10^180,11^-60,-1^-60}:/*H,@-1,17,/*_,!4,?! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Resveratrol;MW:228.24;EXA:1 -+ +: <30,Ph,@4,\,!!,!,Ph,{2,6,-3}:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Glutathione;MW:307.33;EXA:1 -+ +: <-30,COOH,!,/*NH2,!3,//O,!,NH,!,*/!SH,!,//O,!,NH,!2,COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Trenbolone;MW:270.37;EXA:1 -+ +: <30,?6,{3,10}=?6,13=?5,{2,11,15}=dl,1://O,12:*/_^60,-1:/*OH,{9^60,11'^-60}:*/H -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Luciferin;MW:280.33;EXA:1 -+ +: <30,Ph,3=?5,@8,\,?5,{9,16}=dl,{9,14}:N,{7,11}:S,1:/OH,-2:*/COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Chlorophyll a;MW:893.509;EXA:1 -+ +: <-36,#1,?5,@3,\,54,?5,@-2,\,54,?5,@-2,\,54,?5,@-2,\,&5,@6,22,70,&8,##, {4,6,8,10,14,16,18,21,23,27}=dl,@4,\`1.48~vf,Mg,&17~vb,@11,&27,@27,&23, {4,11,17,23}:N,{1~zf,9,15,21}:/_,14:/!,20:/!!,25:/*COO!,26://O, @2,*\^-6,!2,//O,!,O,!2,!!,|,!13,{1,5,9,13}:/_ -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Alizarin;MW:240.21;EXA:1 -+ +: <30,Ph,3=?6,-3=Ph2,{7,10}://O,{13,14}:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Indigo;MW:262.26;EXA:1 -+ +: <30,Ph,3=?5,@-2,\\,?5,-3=Ph2,{7,14}:NH,{9,11}://O -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:6,6'-dibromoindigo;MW:420.0549;EXA:1 -+ +: <30,Ph,3=?5,@-2,\\,?5,-3=Ph2,{7,14}:NH,{9,11}://O,{1,-2}:/Br -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Carminic Acid;MW:492.39;EXA:1 -+ +: <30,Ph,3=?6,-3=Ph2,{7,10}://O,{2,5,6,13}:/OH,11:/_,12:/COOH, @1,\~wb`1,?6,-5:O,{-1,-2',-3}:/*OH,-4:*/!OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Curcumin;MW:368.38;EXA:1 -+ +: <30,Ph,@3,\,!7,Ph,{8,13}=dr,{9,11}://O,{6,-3}:/OH,{5,-4}:/O! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Berberine;MW:336.36;EXA:1 -+ +: <30,Ph,3=Ph,-3=?6,-2=Ph2,-3=?5,8:N,8:p_^60,{-1,-3}:O,{1>vt,2}:/!OH -+ +; %============================================================================== Cat:biological;EN:Apigenin;MW:270.24;EXA:- -+ +: <30,Ph,3=?6,9=dl,10:O,7://O,@9,\,Ph,{2,6,14}:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Luteolin;MW:286.24;EXA:- -+ +: <30,Ph,3=?6,9=dl,10:O,7://O,@9,\,Ph,{2,6,14,15}:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Flavone;MW:222.24;EXA:1 -+ +: <30,Ph,3=?6,9=dl,10:O,7://O,9:/Ph, -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Isoflavone;MW:222.24;EXA:- -+ +: <30,Ph,3=?6,9=dl,10:O,7://O,8:/Ph, -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Flavanone;MW:224.25;EXA:- -+ +: <30,Ph,3=?6,10:O,7://O,9:/Ph, -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Flavonol;MW:238.24;EXA:1 -+ +: <30,Ph,3=?6,9=dl,10:O,7://O,8:/OH,9:/Ph, -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Cianidanol;MW:290.27;EXA:1 -+ +: <30,Ph,3=?6,@8,*\,Ph,7:O,{1,5,9~zf,13,14}:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Quercetin;MW:302.24;EXA:1 -+ +: <30,Ph,3=?6,@9,\,Ph,9=dl,10:O,7://O,{2,6,8,13,14}:/OH -+ +; %============================================================================== Cat:biological;EN:Limonin;MW:470.518;EXA:1 -+ +: <30,?6,{-3,-4}=?6,-5=?3,-2=wf,-1=wb,6=?5,-4=?6,-5=wf,{13,15,17,20}:O, {3,12,21}://O,{4^60,8'^60}:*/_,18:??,{1^60,5^180,16^60}:/*H, @14,\*,|,?5,{1,4}=dl,3:O -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Cromolyn;MW:468.37;EXA:1 -+ +: <30,Ph,|,-1=?6,3=dl,1:O,4://O,2:/COOH, @$2,\,O,!2,/OH,!2,O,60,Ph,|,-5=?6,3=dl,4:O,1://O,3:/COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Emetine;MW:480.649;EXA:1 -+ +: <30,Ph,{-4,-4}=?6,8:N,{1,6}:/O!,-2:/*!,{7^-60,12^-60}:/*H, @-3,\,!~zb,<-60,|,?6,5=dl,2:NH,-6^-60:*/H,|,-2=?6,{2,4}=dl,{-2,-3}:/O! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Acronycine;MW:321.376;EXA:1 -+ +: <30,Ph,|,-4=?6,1:N!,4://O,-3=Ph2,-1:/O!,|,-4=?6,2=dl,4:O,3:?? -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Piperine;MW:285.343;EXA:1 -+ +: <30,Ph,-1=?5,{-1,-3}:O,@4,\,!!,!,!!,!,//O,!,?6,-6:N -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Febrifugine;MW:301.34;EXA:1 -+ +: <30,Ph,3=?6,@9,8=dl,\,!2,!~zb,?6,{7,9}:N,-5:NH,{10,12}://O,-1:*/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Hypericin;MW:504.44;EXA:1 -+ +: <30,Ph,{-4,-3,(11,4),(16',17),19,(23',24),(22,29)}=?6, {12,14,16,17,22',24,26,28,33,35}=dl, {7,25}://O,{13,26}:/_, {2,6,11,21,23,28}:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Camphor;MW:152.23;EXA:1 -+ +: #1,15,-30,90,90,30,##,&1,@2,0~si_`1.6,&5,{-1^45,-1^-65,5^-45}:/_,4://O -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Sparteine;MW:234.3803;EXA:1 -+ +: <30,?6,3=?6,9=wf,10=wb,@8,#1,60,60,N,60,##,&10,-3=?6,3:N,{4^60,11'^-60}:*/H -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Mitomycine C;MW:334.332;EXA:1 -+ +: <30,?6,{3,6}=dl,{2,5}://O,1:/_,-4=?5,-3:N, 6:/NH2,,-3=?5,-2=?3,-1=wb,-2=wf,-1:NH,8:/*O!^35,@$9,\,!,O,60,//O,!,NH2 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Podophyllotoxin;MW:414.41;EXA:1 -+ +: <0,?5,{2,5}:O,-3=Ph2,-3=?6,-3=?5,-2:O,-1=wb,-3://O, @10,\*,Ph,{-2,-3,-4}:/O!,13:/*OH,{11^-60,12'^60}:*/H -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Warfarin;MW:308.333;EXA:1 -+ +: <30,Ph,3=?6,8=dl,10:O,7:/OH,9://O,@8,\,/Ph`1,60,!,//O,! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Genistein;MW:270.24;EXA:1 -+ +: <30,Ph,3=?6,9=dl,10:O,{2,6}:/OH,7://O,@8,\,Ph,-3:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Baicalein;MW:270.24;EXA:1 -+ +: <30,Ph,3=?6,9=dl,10:O,{1,2,6}:/OH,7://O,@8,\,Ph -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Reserpine;MW:608.688;EXA:1 -+ +: <54,Ph,-4=?5,{-2,-4,-3}=?6,9=dl,11:N,7:NH,{10'^-60,15^-60,16^60}:/*H, @20,*\,O,!,//O,!,Ph,{-2,-3,-4,1,19~zf>rl}:/O!,18:*/COO!>lr -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Rotenone;MW:394.423;EXA:1 -+ +: <-60,?5,{-3,-2,-3,-4}=?6,{3',7,9,17',-2,-4}=dl, {2,13,16}:O,10://O,{11^-60,12^60}:*/H,{-2,-3}:/O!,@1,*\,/_,!! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Pyrethrin I;MW:328.452;EXA:1 -+ +: <30,?3,{3^35,3'^-35}:*/_,@1,*\,!!,?!, @2,\*,//O,!,O,-36~zb,|,?5,-2=dl,-1:/_,-3://O,@-2,\,!4,{-1,-3}=dl -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Oseltamivir;MW:312.40;EXA:1 -+ +: <30,?6,3=dl,6:*/NH2,@1,\*,NH,!,//O,!,@2,*\,O,!,/!,!2,@4,\,//O,!,O,!2 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Paclitaxel;MW:853.918;EXA:1 -+ +: ?6,5=dl,@3,#1,36,45,45,45,45,##,&5,-4=?6,-4=?4,-1=wb,-3=wf,-1:O, 4:??,6:/_,{3^-60,15}:*/OH,8:/*H^-60,9:*/_^60,10://O, @1,\,O,!,//O,!,*/OH,!,/Ph,60~wf,NH,-60,//O,60,Ph, @7,\*,O,-45,//O,60,Ph,{11>rl,12'^-15>lr}:*/OCO! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Mevastatin;MW:390.52;EXA:1 -+ +: <30,?6,2=dl,4:*/H^60,-4=?6,-4=dl,9:*/_, @10,*\,!,60~wb,?6,6:O,-2://O,-4:/*OH,@5,\*,O,60,//O,!,*/_,!2 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Sesamine;MW:354.35;EXA:1 -+ +: <54,?5,1=?5,{4,7}:O,{1^-54,2^54}:*/H,{5,8}:*/'(Ph,4=?5,7:O,9:O)^-12 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Morphine;MW:285.343;EXA:1 -+ +: <30,Ph,{2,-4}=?6,(1,12)=?5[2],-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 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Quinine;MW:324.424;EXA:1 -+ +: <30,Ph,3=Ph,7:N,6:/O!, @10,\,*/OH,/*H^-60,!,|,?6,2:N,1:*/H^60,@4,*\,!!,@2,165~zf,60,&5~zb -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Atoropin;MW:289.375;EXA:1 -+ +: <30,O,!,//O,!2,Ph,@$1,\~zb^-60,|,?7`1.1,@6,*\^190`1.25,N!,&3~wb,$3:/!OH~wv -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Colchicine;MW:399.443;EXA:1 -+ +: <30,Ph,{1,2,6}:/O!,{-4,-5}=?7,{-1,-4,-6}=dl,-2://O,-3:/O!,9:/NHCO! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Lycorine;MW:287.315;EXA:1 -+ +: <30,Ph,{-4,-2}=?6,{6,(9,12)}=?5,13=dl,8:N,{15,17}:O, {9'^180,10^60}:*/H,{13,14'}:*/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Ibotenic acid;MW:158.113;EXA:1 -+ +: <18,?5,4=dl,3:O,2:NH,1://O,@4,-24,/NH2,!COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Illudin S;MW:264.3;EXA:1 -+ +: <30,?6,3=?5,6:**?3,{4,7}=dl,2://O,5:/_, {1^35,8^35}:*/_,{1'^-35,9}:*/OH,8:/*!OH^-35 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Muscarine;MW:174.26;EXA:1 -+ +: <18,?5,2:O,1:*/_,5:/*OH,@3,*\,48,N,??,p_^180,! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Psilocybin;MW:284.248;EXA:1 -+ +: <30,Ph,3=?5,8=dl,9:NH,@2,\,O,-60,P,//O^-45,/OH^45,90,OH,@7,\,!,-60,N?! -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Tetrodotoxine;MW:319.27;EXA:1 -+ +: #1,<60,-90,60,-30`1.15,150,60,&1,@3,-135,60,-30`1.15,150,&4, @10,\,O,60`1.33,60,&($3)~si_,@8,-15~si_,O,&12,##, - @9,45,-60,OH,1^120://NH,{5~zf^-15,7,9^-75,12,13~zf}:/OH,{2,6^180}:NH -+ + @9,45,-60,OH,1^120://NH,{5~zf^-15,7,9^-75,12,13~zf}:/OH,2:NH,6^180:NH +; %------------------------------------------------------------------------------ Cat:biological;EN:Aflatoxin B1;MW:312.27;EXA:1 -+ +: <30,Ph,6=?6,-2=?5,4=?5,-2=?5,{-2,10}=dl,{7,14,17}:O, 2:/O!,{8,11}://O,{15^-54,16^54}:*/H -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Aflatoxin B2;MW:314.3;EXA:- -+ +: <30,Ph,6=?6,-2=?5,4=?5,-2=?5,10=dl,{7,14,17}:O, 2:/O!,{8,11}://O,{15^-54,16^54}:*/H -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Aflatoxin G1;MW:328.27;EXA:2 -+ +: <30,Ph,6=?6,-2=?6,4=?5,-2=?5,{-2,10}=dl,{7,12,15,18}:O, 2:/O!,{8,11}://O,{16^-54,17^54}:*/H -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Aflatoxin G2;MW:330.29;EXA:- -+ +: <30,Ph,6=?6,-2=?6,4=?5,-2=?5,10=dl,{7,12,15,18}:O, 2:/O!,{8,11}://O,{16^-54,17^54}:*/H -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Aflatoxin M1;MW:328.3;EXA:- -+ +: <30,Ph,6=?6,-2=?5,4=?5,-2=?5,{-2,10}=dl,{7,14,17}:O, 2:/O!,{8,11}://O,15^-54:*/H,16^54:*/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Aflatoxin M2;MW:330.29;EXA:- -+ +: <30,Ph,6=?6,-2=?5,4=?5,-2=?5,10=dl,{7,14,17}:O, 2:/O!,{8,11}://O,15^-54:*/H,16^54:*/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Ochratoxin A;MW:403.813;EXA:1 -+ +: <30,Ph,@4,\,!,/*COOH,!`1.2,NH,!`1.2,//O,!, Ph,-2:/Cl,-5:/OH,-4=?6,-3:O,-2:*/_,-4://O -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Deoxynivalenol;MW:296.32;EXA:1 -+ +: <30,?6,3=?6,5=dl,1://O,6:/_,-1:O,{4'^60,-2}:*/H,7^30:*/_,@7,72`.9,80`1.3,&9, @8,?3,-3=wf_,-1=si_,-1:O,{2,12^18}:/*OH,3:/*!OH^-60`1 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Patulin;MW:154.12;EXA:1 -+ +: <30,?6,3=?5,{2,10}=dl,{6,7}:O,5:/OH,8://O -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Citrinin;MW:250.247;EXA:1 -+ +: <30,?6,3=?6,{2,5,11}=dl,9:O,1://O,2:/_,{7,8'}:*/_,5:/OH,6:/COOH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Zearalenone;MW:318.364;EXA:1 -+ +: <30,Ph,@3,#1,\,!5,60,60,!4,&4,##,{1,5,8}=dl,17:O,16:*/_,{1,5}:/OH,{12,18}://O -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Fumonisin B1;MW:721.83;EXA:1 -+ +: <30,!19,@6,*\,O,!,//O,!2,/COOH,!2,COOH,@7,\*`1.2,O,!,//O,!2,/COOH,!2,COOH, {5,9}:/*_,{11,16,18'}:*/OH,19:/*NH2 -+ +; %============================================================================== Cat:synthetic;EN:Benzene;MW:78.11;EXA:- -+ +: <30,Ph -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Phenol;MW:94.11;EXA:- -+ +: <30,Ph,3:/OH -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Aniline;MW:93.13;EXA:- -+ +: <30,Ph,3:/NH2 -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Picric acid;MW:229.10;EXA:- -+ +: <30,Ph,{1,3,5}:/NO2,2:/OH -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Hexaphenylbenzene;MW:534.6876;EXA:1 -+ +: <30,Ph,{1,2,3,4,5,6}:/Ph -+ +; %============================================================================== Cat:synthetic;EN:Naphthalene;MW:128.17;EXA:- -+ +: <30,Ph,3=Ph -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Anthracene;MW:178.23;EXA:- -+ +: <30,Ph,{3,6}=Ph -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Phenanthrene;MW:178.23;EXA:- -+ +: <30,Ph,{4,6}=Ph -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Naphthacene;MW:228.3;EXA:- -+ +: <30,Ph,{6,3,-3}=Ph -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Chrysene;MW:228.3;EXA:- -+ +: <30,Ph2,{6,4,-4}=Ph -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Pyrene;MW:202.25;EXA:- -+ +: <30,Ph2,{6,4}=Ph,(16,7)=?6[3],-2=dl -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Coronene;MW:300.35;EXA:1 -+ +: <30,Ph,{1,(11,2),(15,3),(19,4),(23,5),(27',7)}=?6, {9,12,14,17,20,22,25,28,30}=dl -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Kekulene;MW:600.7;EXA:1 -+ +: <30,?6,{3,-3,-2,-3,-2,-3,-2,-3,-2,-3,(-2',5'),(5',-4')}=?6, {1,5',7,9,11,13,17,19,21,23,27,29,31,33,37,39,41,43,47,49,51,53,57,60}=dl -+ +; %============================================================================== Cat:synthetic;EN:12-Crown-4;MW:176.21;EXA:- -+ +: <-180,O,30,60,60,O,-30,60,60,O,-30,60,60,O,-30,60,&1 -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:15-Crown-5;MW:220.26;EXA:2 -+ +: <-180,O,48,60,60,O,-48,60,60,O,-48,60,60,O,-48,60,60,O,-48,60,&1 -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:18-Crown-6;MW:264.32;EXA:1 -+ +: <-180,O,60,60,60,O,-60,60,60,O,-60,60,60,O,-60,60,60,O,-60,60,60,O,-60,60,&1 -+ +; %============================================================================== Cat:synthetic;EN:Porphyrin;MW:310.4;EXA:1 -+ +: <9,#1,?5,@3,\,54,?5,@-2,\,54,?5,@-2,\,54,?5,@-2,\,&5,##, {1,4,6,8,10,14,16,18,21,23,27}=dl,{4,17}:N,{11,23}:NH -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Sulflower;MW:448.69;EXA:1 -+ +: <67.5,?8,{1,3,5,7}=?5,@11,30`1.15,&12,@14,30`1.15,&15, @17,30`1.15,&18,@20,30`1.15,&9,{9,12,13,16,17,20,21,24}=dl, {10,13,16,19,21,22,23,24}:S -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Arsphenamine x5;MW:915.2;EXA:1 -+ +: <18,?5,{1,2,3,4,5}:As,{1,2,3,4,5}:/'(Ph,3:/NH2,4:/OH) -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Melamine;MW:126.12;EXA:1 -+ +: <30,Ph,{2,4,6}:N,{1,3,5}:/NH2 -+ +; %============================================================================== Cat:synthetic;EN:Tartrazine;MW:534.3;EXA:1 -+ +: <30,Ph,1:/SO3Na,@4,\,N,!!,N,!,<-12,?5,{-2,-5}=dl,{-2,-3}:N,-1:/COONa,-4:/OH, @-3,-12,Ph,-3:/SO3Na -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Erythrosine;MW:835.9;EXA:1 -+ +: <30,Ph,{3,9}=?6,{8,13,16}=dl,10:O,-2://O,{1,5,12,14}:/I,@7,\,Ph,-1:/COOH,6:/OH -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Sudan red 1;MW:248.28;EXA:1 -+ +: <30,Ph,1=Ph,4:/OH,@3,\,N,!!,N,!,Ph -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Basic blue 1;MW:319.86;EXA: -+ +: <30,Ph,3=Ph,6=Ph,2:S,5:N,{8,13}:/N?!,2:p_,@2,@(3.5,1.5),Cl,n_^15 -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Disperse violet 1;MW:238.25;EXA:1 -+ +: <30,Ph,3=?6,-3=dr,9=Ph,{7,10}://O,{-1,-4}:/NH2 -+ +; %------------------------------------------------------------------------------ Cat:synthetic;EN:Vat blue 1;MW:262.27;EXA:1 -+ +: <30,Ph,3=?5,@8,\\,?5,-3=dr,-3=Ph,{7,14}:NH,{9,11}://O -+ +; %============================================================================== Cat:antibiotics;EN:Amoxicillin;MW:365.4042;EXA:1 -+ +: <45,?4,-3=?5,2:N,7:S,3^45:/*H,1://O^15,5:/*COOH^-18,6:??, @4,*\^15,NH,!,//O,!,*/NH2,!,Ph,-3:/OH -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Ampicillin;MW:349.405;EXA:1 -+ +: <45,?4,-3=?5,2:N,7:S,3^45:/*H,1://O^15,5:/*COOH^-18,6:??, @4,*\^15,NH,!,//O,!,/*NH2,!,Ph -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Penicillin G;MW:334.4;EXA:1 -+ +: <45,?4,-3=?5,2:N,7:S,3^45:/*H,1://O^15,5:/*COOH^-18,6:??, @4,*\^15,NH,!,//O,!2,Ph -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Penicillin V;MW:350.3895;EXA:1 -+ +: <45,?4,-3=?5,2:N,7:S,3^45:/*H,1://O^15,5:/*COOH^-18,6:??, @4,*\^15,NH,!,//O,!2,O,!,Ph -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Mecillinam;MW:325.4264;EXA:1 -+ +: <45,?4,-3=?5,2:N,7:S,3^45:/*H,1://O^15,5:/*COOH^-18,6:??, @4,*\^15,N,!!,!,?7,-7:N -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Nafcillin;MW:414.4748;EXA:1 -+ +: <45,?4,-3=?5,2:N,7:S,3^45:/*H,1://O^15,5:/*COOH^-18,6:??, @4,*\^15,NH,!,//O,!,Ph,-2=Ph,-9:/O!2 -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Oxacillin;MW:401.4363;EXA:1 -+ +: <45,?4,-3=?5,2:N,7:S,3^45:/*H,1://O^15,5:/*COOH^-18,6:??, @4,*\^15,NH,!,//O,!,<-24,?5,{-2,-5}=dl,-2:N,-3:O,-4:/_,@-1,-24,Ph -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Cloxacillin;MW:435.8813;EXA:1 -+ +: <45,?4,-3=?5,2:N,7:S,3^45:/*H,1://O^15,5:/*COOH^-18,6:??, @4,*\^15,NH,!,//O,!,<-24,?5,{-2,-5}=dl,-2:N,-3:O,-4:/_,@-1,-24,Ph,-5:/Cl -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Dicloxacillin;MW:470.3264;EXA:1 -+ +: <45,?4,-3=?5,2:N,7:S,3^45:/*H,1://O^15,5:/*COOH^-18,6:??, @4,*\^15,NH,!,//O,!,<-24,?5,{-2,-5}=dl,-2:N,-3:O,-4:/_, @-1,-24,Ph,{-1,-5}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Cefalexin;MW:347.3889;EXA:1 -+ +: <45,?4,-3=?6,-4=dl,2:N,8:S,3^45:/*H,1://O^15,5:/*COOH,6:/_, @4,*\^15,NH,!,//O,!,*/NH2,!,Ph -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Cefalonium;MW:458.5107;EXA:1 -+ +: <45,?4,-3=?6,-4=dl,2:N,8:S,3^45:/*H,1://O^15,@5,\*,//O,!,O,n_^40, @4,*\^15,NH,!,//O,!2,?5,{-1,-3}=dl,-4:S, @6,\,!,|,Ph,1:N,1:p_^180,@4,\,//O,!,NH2 -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Cefazorin;MW:454.51;EXA:1 -+ +: <45,?4,-3=?6,-4=dl,2:N,8:S,3^45:/*H,1://O^15,5:/*COOH, @4,*\^15,NH,!,//O,!2,?5,{-2,-4}=dl,{-1,-2,-3,-5}:N, @6,\,!,S,!,?5,{-3,-5}=dl,-1:S,-2:/_,{-3,-4}:N -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Cefoperazone;MW:645.67;EXA:1 -+ +: <45,?4,-3=?6,-4=dl,2:N,8:S,3^45:/*H,1://O^15,5:/*COOH, @4,*\^15,NH,!,//O,!2,NH,!,//O,!,?6,{-3,-6}:N,{-4,-5}://O,-3:/!, @6,\,!,S,!,?5,{-3,-5}=dl,-1:/_,{-1,-2,-3,-4}:N, @11,\*,Ph,-3:/OH -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Cefquinome;MW:528.6;EXA:1 -+ +: <45,?4,-3=?6,-4=dl,2:N,8:S,3^45:/*H,1://O^15,@5,\*,//O,!,O,n_^40, @4,*\^15,NH,!,//O,!,//'(N,!,O,!),!,?5,{-2,-5}=dl,-3:S,-1:N,-2:/NH2, @6,\,!,Ph,-2=?6,-10:N,-10:p_^180 -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Ceftiofur;MW:523.5626;EXA:- -+ +: <45,?4,-3=?6,-4=dl,2:N,8:S,3^45:/*H,1://O^15,5:/*COOH, @4,*\^15,NH,!,//O,!,//'(N,!,O,!),!,?5,{-2,-5}=dl,-3:S,-1:N,-2:/NH2, @6,\,!,S,!,//O,!,?5,{-1,-3}=dl,-4:O -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Cefuroxime;MW:424.3852;EXA:1 -+ +: <45,?4,-3=?6,-4=dl,2:N,8:S,3^45:/*H,1://O^15,5:/*COOH, @4,*\^15,NH,!,//O,!,//'(N,!,O,!),!,?5,{-1,-3}=dl,-4:O,@6,\,!,O,!,//O,!,NH2 -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Apramycin;MW:539.58;EXA:1 -+ +: <30,?6,-4=?6,{2,10}:O,@1,\*,O,60~zb,?6,@9,\*,O,-60~zb,?6,-5:O, {7,13,14',-1',-2}:*/OH,{6',15,17,-3'}:*/NH2,8:*/NH!^-20, -4:*/!OH,{3'^-60,4^60}:*/H -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Gentamycin;MW:477.596;EXA:1 -+ +: <-30,?6,@1,\*,O,0~zb,?6,-5:O,@5,\*,O,0~zb,?6,-5:O,{2,4,20'}:*/NH2,6:*/OH, 11:*/OH^-35,11:/*_^35,12:*/NH!,13:/*OH,17:/'(*/_,!NH!) -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Kanamycin;MW:484.499;EXA:1 -+ +: <-30,?6,@1,\*,O,0~zb,?6,-5:O,@5,\,O,0,?6,-5:O, {2,4,12}:*/NH2,{6',11,13,18,19',20}:/*OH,10:*/!OH,17:*/!NH2 -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Neomycin;MW:614.644;EXA:1 -+ +: <30,?6,3:O,2:/*!NH2,{1,6'}:*/OH,5:*/NH2, @4,*\,O,!~wb,?6,{-3,-5^15}:/*NH2,-2:*/OH^-15, @-1,\*,O,-72~wb,?5,-4:O,-1:/*OH>vt,-3:*/!OH>vt, @-2,\*^-24,O,-60~zb,?6,-5:O,-1:/*NH2,{-2,-3'}:*/OH,-4:/*!NH2>60 -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Streptmycin;MW:581.574;EXA:1 -+ -<54,?5,3:O,4:/*_,5:/OH^35,@1,\*,O,-24~wb,?6,-5:O,@2,*\,O,24~zb,?6, +: +<54,?5,3:O,4:/*_,5:/OH^45,@1,\*,O,-24~wb,?6,-5:O,@2,*\,O,24~zb,?6, @5,-48,!!,O,{10,11',15,16',18'}:*/OH,9:/*!OH,12:*/NH!, @17,*\^-18,NH,!,//NH,!,NH2,@19,*\,NH,!,//NH,!,NH2 -+ +; +%------------------------------------------------------------------------------ +Cat:antibiotics;EN:Streptmycin_H2O;MW:599.574;EXA:- +: +<54,?5,3:O,4:/*_,5:/OH^60,@1,\*,O,-24~wb,?6,-5:O,@2,*\,O,24~zb,?6, + @5,-18,/OH^15,45,OH,{10,11',15,16',18'}:*/OH,9:/*!OH,12:*/NH!, + @17,*\^-18,NH,!,//NH,!,NH2,@19,*\,NH,!,//NH,!,NH2 +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:dihydro-Streptmycin;MW:583.574;EXA:1 -+ +: <54,?5,3:O,4:/*_,5:/!OH^-48,5:/*OH^35,@1,\*,O,-24~wb,?6,-5:O,@2,*\,O,24~zb,?6, {10,11',15,16',18'}:*/OH,9:/*!OH,12:*/NH!, @17,*\^-18,NH,!,//NH,!,NH2,@19,*\,NH,!,//NH,!,NH2 -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Spectinomycin;MW:332.35;EXA:1 -+ +: <30,?6,{3,9}=?6,7=zf,11=wb,{7,10,14}:O,9^60:*/H,11://O,{1,5',8^-60}:*/OH, 13:/*_,{2,6}:*/NH! -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Tobramycin;MW:467.51;EXA:1 -+ +: <-30,?6,@1,\*,O,0~zb,?6,-5:O,@5,\,O,0,?6,-5:O, {2,4,12,20'}:*/NH2,{6',11,13,18}:/*OH,10:*/!OH,17:*/!NH2 -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Spiramycin;MW:843.1;EXA:1 -+ +: <-90,#1,60,60,-60,60,60,-60,60,60,-60,60,60,60,-60,60,-60,&1,##, {12,14}=dl,2:O,{1,10^-30}:/*_,5:/*OH,3://O,6:/*O!>vt, @-6,\*^-30,O,!~wb,?6`.7,-5:O,#.5,-3:/*N?!,-4:*/_,##, @7,\*,O,0~wb,?6`.7,-5:O,#.5,-2:*/N?!,-1:/*OH,-4:*/_,##, @-3,\*`1,O,60~wb,?6`.7,-5:O,#.5,{-2^35,-3}:*/OH,{-2^-35,-4}:/*_,##, @8,\*,!,!!,O -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Neospiramycin;MW:698.9;EXA:1 -+ +: <-90,#1,60,60,-60,60,60,-60,60,60,-60,60,60,60,-60,60,-60,&1,##, {12,14}=dl,2:O,{1,10^-30}:/*_,5:/*OH,3://O,6:/*O!>vt, @-6,\*^-30,O,!~wb,?6`.7,-5:O,#.5,-3:/*N?!,-4:*/_,##, @7,\*,O,0~wb,?6`.7,-5:O,#.5,-2:*/N?!,-4:*/_,{-1,-3}:/*OH,##, @8,\*,!,!!,O -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Josamycin;MW:827.995;EXA:1 -+ +: <-90,#1,60,60,-60,60,60,-60,60,60,-60,60,60,60,-60,60,-60,&1,##, {12,14}=dl,2:O,1:/*_,3://O,10:/*_,6:/*O!>vt,-6:/*OH, @5,\*^-25,O,!,//O,!, @@ -1131,1684 +1156,1684 @@ Cat:antibiotics;EN:Josamycin;MW:827.995;EXA:1 @-3,\*`1,O,60~wb,?6`.7,-5:O,#.5,-2^35:*/OH,{-2^-35,-4}:/*_,##, @-3,*\,O,60,//O,60,-60,/_,!, @8,\*,!,!!,O -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Leucomycin A5;MW:771.942;EXA:1 -+ +: <-90,#1,60,60,-60,60,60,-60,60,60,-60,60,60,60,-60,60,-60,&1,##, {12,14}=dl,2:O,1:/*_,3://O,10:/*_,6:/*O!>vt,-6:/*OH,5:/*OH, @7,\*,O,0~wb,?6`.7,-5:O,#.5,-2:*/N?!,-1:/*OH,-4:*/_,##, @-3,\*`1,O,60~wb,?6`.7,-5:O,#.5,-2^35:*/OH,{-2^-35,-4}:/*_,##, @-3,*\,O,60,//O,60,-60,60, @8,\*,!,!!,O -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Erythromycin;MW:733.93;EXA:1 -+ +: <30,#1,<-120,60,60,60,-60,60,60,-60,60,60,60,-60,60,60,##,&1, 14:O,13:/*Et,{1,9}://O,{2',4,6^-35,8,10',12^35}:/*_, {6^35,11,12^-35}:*/OH, @$3,\*,O,30~zb,|,?6`.7,6:O,#.5,{5~wf,3^35}:/_,4:/*OH,3^-35:/*O!,##, @$5,\*^30`1.7,O,!~zb,|,?6`.7,6:O,#.5,5:/*_,2:*/OH,3:/*N?! -+ +; %------------------------------------------------------------------------------ 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,-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! -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Spinosad;MW:731.968;EXA:2 -+ +: <30,#1,<-120,60,60,-60,60,60,60,-60,60,60,60,-60,&1,##, 5=?5,-1=dl,{-2^60,-3^-35}:/*H,-3=?6,-4=dl, {-1^35,-2'^-60}:*/H,-2=?5,2:O,{3^25,7^-25}://O,1:*/!, @-2,\*,O,66~zb,?6`.7,-1:O,#.5,-2:*/_,{-3',-4,-5}:*/O!,8:*/_,5^-65:*/H,##, @9,\*,O,!~zb,|,?6`.7,6:O,#.5,5:/*_,4:*/N?! -+ +; %------------------------------------------------------------------------------ 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, {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:/*_ -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Tylocin;MW:916.10;EXA:1 -+ +: <-90,#1,60,60,-60,60,60,-60,60,60,-60,60,60,60,-60,60,-60,&1,##, {12,14}=dl,2:O,1:/*!,5:/*OH,3://O,10:/*_,6:/*_,-6://O,-3:/_, @-1,*\,-60,O,0~wb,?6`.7,-5:O,#.5,-3:/*OH,-4:*/_,{-1,-2}:/*O!,##, @7,\*,O,0~wb,?6`.7,-5:O,#.5,-2:*/N?!,-1:/*OH,-4:*/_,##, @-3,\*`1,O,60~wb,?6`.7,-5:O,#.5,{-2^35,-3}:*/OH,{-2^-35,-4}:/*_,##, @8,\*,!,!!,O -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Tilmicosin;MW:869.133;EXA:1 -+ +: <-90,#1,60,60,-60,60,60,-60,60,60,-60,60,60,60,-60,60,-60,&1,##, {12,14}=dl,2:O,1:/*!,5:/*OH,{3,11}://O,{6,10}:/*_,14:/_, @-1,*\,-60,O,0~zb,?6`.7,-5:O,#.5,{-1,-2}:*/O!,-3:*/OH,-4:/*_,##, @7,\*,O,0,?6`.7,-5:O,#.5,-2:*/N?!,{-1,-3}:/*OH,-4:*/_,##, @8,\*,!2,?6`.7,-6:N,#.5,{-2,-4}:*/_ -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Mirosamicin;MW:727.8791;EXA:1 -+ +: <-90,#1,60,60,-60,60,60,-60,60,60,-60,60,60,60,-60,60,-60,&1,##, @8,\*,O,0,?6`.7,-5:O,#.5,-2:*/N?!,-1:/*OH,-4:*/_,##, {5,13}=dl,15=?3,-2=wf,-1=wb,-1:O,3:O,2:/*!,{4,12}://O,{7,9,11'}:*/_,1:/*OH^-80, @1,*\,!,O,!~wb,?6`.7,-5:O,#.5,-3:/*OH,-4:*/_,{-1,-2}:/O! -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Chlortetracyclin;MW:478.88;EXA:1 -+ +: <30,Ph,{-4,-3,-3}=?6,{16,19}=dl,{10,18}://O,7:*/_^-35,2:/Cl, {5,7~zf^35,13~wf^60,14,16}:/OH,15:*/N?!,17:/CONH2 -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Oxytetracyclin;MW:460.434;EXA:1 -+ +: <30,Ph,{-4,-3,-3}=?6,{16,19}=dl,{10,18}://O,7:*/_^-35,11:*/OH, {5,7~zf^35,13~wf^60,14,16}:/OH,15:*/N?!,17:/CONH2 -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Tetracyclin;MW:444.435;EXA:1 -+ +: <30,Ph,{-4,-3,-3}=?6,{16,19}=dl,{10,18}://O,7:*/_^-35, {5,7~zf^35,13~wf^60,14,16}:/OH,15:*/N?!,17:/CONH2 -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Doxycyclin;MW:444.43;EXA:1 -+ +: <30,Ph,{-4,-3,-3}=?6,{16,19}=dl,{10,18}://O,7:*/_, {5,13~wf^60,11~wf,14,16}:/OH,15:*/N?!,@17,\,//O,!,NH2 -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Tiamulin;MW:493.74;EXA:1 -+ +: <-45.5,?8,-3=?5,@8,#.8,-210~zf,/_^60,45,56,##,&6~zb, {3^-45,5,8}:*/_,@3,\*^30,!~dl,4:/*OH,11://O,7:*/H^60, @1,15,O,!,//O,!2,S,60,60,-60,N!2,60,-60 -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Rifampicin;MW:822.94;EXA:1 -+ +: <30,Ph,6:/_^30,5:/OH,-6=?5,-3:O,-8=?6,{-2,-4}=dl,{-1,-4}:/OH, #1,@-2,\,NH,60,-60,60~dl,60,60~dl,-60, 60,-60,60,60,-60,60,-53,66,-53~dl,66`1.2,O,##,&$8, ||,{9,15}://O,16:/_,{20,24^30}:*/_,{21,23}:/*OH,{8^60,22,26^30}:/*_, -4:/*O!,@-6,-30,O,!,//O,!,@$11,\,!!,N,!,|,?6,1:N,4:N! -+ +; %============================================================================== Cat:pesticide;EN:BHC;MW:290.83;EXA:- -+ +: <30,?6,{1,2',3,4,5',6}:*/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:pp-DDT;MW:354.49;EXA:- -+ +: <30,Ph,6:/Cl,@3,\,/CCl3,!,Ph,-3:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:op-DDT;MW:354.49;EXA:- -+ +: <30,Ph,4:/Cl,@3,\,/CCl3,!,Ph,-3:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:pp-DDD;MW:320;EXA:- -+ +: <30,Ph,6:/Cl,@3,\,/CCl2,!,Ph,-3:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:pp-DDE;MW:318;EXA:- -+ +: <30,Ph,6:/Cl,@3,\,//CCl2,!,Ph,-3:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:EPN;MW:323.303;EXA:- -+ +: <30,!2,O,!,P,//S,/Ph^170,!,O,!,Ph,-3:/NO2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:XMC;MW:179.2;EXA:- -+ +: <30,Ph,{1,5}:/_,@3,\,O,!,//O,!,NH,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Acrinathrin;MW:541.45;EXA:- -+ +: <-30,?3,{2^-35,2'^35}:*/_, @1,\,!~dl,!,//O,!,O,!,/CF3,!,CF3,@3,\,//O,!,O,!,/CN,!,Ph,-4:/OPh>rl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Azaconazole;MW:300.139;EXA:- -+ +: <30,Ph,{4,6}:/Cl,@3,\,!2,?5,{-2,-4}=dl,{-2,-4,-5}:N,@7,?5,{-1,-4}:O -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Acetochlor;MW:269.769;EXA:- -+ +: <30,Ph,2:/_,4:/!,@3,\,N,!2,O,!2,@7,\,//O,!2,Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Atrazine;MW:215.7;EXA:- -+ +: <30,Ph,{2,4,6}:N,5:/Cl,1:/NH!2,@3,\,NH,!?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Anilofos;MW:367.9;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,S,!2,//O,!,N,/?!,!,Ph,-3:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Alachrol;MW:269.8;EXA:- -+ +: <-30,!,O,!2,N,!,//O,!2,Cl,@4,\,|,Ph,{2,6}:/! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Isazofos;MW:313.74;EXA:- -+ +: <30,!2,O,!,P,//S,/O!2^160>rl,!,O,!,|,?5,{2,5}=dl,{2,4,5}:N,4:/Cl,3:/?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Isoprcarb;MW:193.246;EXA:- -+ +: <30,Ph,2:/?!,@3,\,O,!,//O,!,NH,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Isoprothiolane;MW:290.4;EXA:- -+ +: <30,!?!,O,!,//O,!2,//O,!,O,!?!,@5,\\,|,?5,{2,5}:S -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Iprobenfos;MW:288.34;EXA:- -+ +: <30,!?!,O,!,P,//O,/O!?!^170,!,S,!2,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Uninnazole-P;MW:291.779;EXA:- -+ +: <30,Ph,6:/Cl,@3,\,!~dl,!,/OH,!,??!,@8,\,|,?5,{2,4}=dl,{1,2,4}:N -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Esprocarb;MW:265.4;EXA:- -+ +: <30,Ph,@3,\,!,S,!,//O,!,N,/!,!,/?!,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Ethalfluralin;MW:333.3;EXA:- -+ +: <30,Ph,{1,3}:/NO2,5:/CF3,@2,\`1.1,/!,N,!2,/_,!! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Ethion;MW:384.46;EXA:- -+ +: <30,!2,O,!,P,//S,/O!2^160>rl,!,S,!2,S,!,P,//S,/O!2^200>lr,!,O,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Edifenphos;MW:310.37;EXA:- -+ +: <30,Ph,@3,\,O,!,P,//S,/O!2>rl^160,!,S,!,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Ethofenprox;MW:376.5;EXA:- -+ +: <30,Ph,@5,\,O,!,Ph,@10,\,O,!3,??,!,Ph,-3:/O!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Ethoprophos;MW:242.33;EXA:- -+ +: <-30,!3,S,!,P,//O,/S!3^160>rl,!,O,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Ethrimfos;MW:292.29;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,O,!,|,Ph,{2,4}:N,5:/!,3:/O!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Endrin;MW:380.91;EXA:- -+ +: <30,?6`1.3,3=?6,6=dl,9=?3,-1:O, @2,210~wf`1.5,&5~wb,@7,210~zf`1.5,&10~zb,{1,2,5,6,12^-210,12^-150}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Oxadiazon;MW:345.2;EXA:- -+ +: <30,Ph,{4,6}:/Cl,1:/O!?!,@3,\,|,?5,2=dl,{1,2}:N,4:O,5://O,3:/??! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Oxadixyl;MW:278.3;EXA:- -+ +: <30,Ph,{2,4}:/_,@3,\,N,!1,//O,!2,O,!,@7,\,|,?5,1:N,2:O,5://O -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Oxyfluorfen;MW:361.701;EXA:- -+ +: <30,Ph,6:/CF3,4:/Cl,@3,\,O,!,Ph,-3:/NO2,@-4,\,O,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cadusafos;MW:270.386;EXA:- -+ +: <-30,!2,?!,S,!,P,//O,/O!2^160>rl,!,S,!?,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cafenstrole;MW:350.4;EXA:- -+ +: <30,Ph,{2,4,6}:/_,@3,\,SOO,!,|,?5,{2,5}=dl,{2,4,5}:N,@-2,\,//O,!,N,/!,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Carfentrazone-ethyl;MW:412.19;EXA:- -+ +: <30,Ph,4:/F,6:/Cl,@1,\,!,/Cl,!,//O,!,O,!2, @3,\,|,?5,4=dl,{1,3,5}:N,-4://O,-3:/CF2,-2:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Carboxin;MW:235.301;EXA:- -+ +: <30,?6,3=dl,2:S,5:O,4:/_,@3,\,//O,!,NH,!,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Quinalphos;MW:298.30;EXA:- -+ +: <30,!,O,!2,P,//S,/O!2^160>rl,!,O,!,|,Ph,3=Ph,{2,5}:N -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Quinoxyfen;MW:308.13;EXA:- -+ +: <30,Ph,4=Ph,10:N,{2,6}:/Cl,@7,\,O,!,|,Ph,4:/F -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Quitozene;MW:295.3;EXA:- -+ +: <30,Ph,{1,2,3,4,6}:/Cl,5:/NO2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Kresoxim-Methyl;MW:313.348;EXA:- -+ +: <30,Ph,@3,\,/COO!,!!,N,!,O,!,@4,\,!,O,!,Ph,-1:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Clomazone;MW:239.7;EXA:- -+ +: <30,Ph,2:/Cl,@3,\,!,|,?5,1:N,2:O,-2:??,-1://O -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Chlorpyrifos;MW:350.59;EXA:- -+ +: <30,!2,O,!,P,//S,/O!2^160>rl,!,O,!,|,Ph,6:N,{2,4,5}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Chlorpyrifos-methyl;MW:322.53;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160>rl,!,O,!,|,Ph,6:N,{2,4,5}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Chlorfenapyr;MW:407.62;EXA:- -+ +: <18,?5,3=dl,5=dl,2:N,4:/CN,5:/Br,1:/CF3,@2,\,!,O,!2,@3,\,Ph,-3:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Chlorfenson;MW:303.153;EXA:- -+ +: <30,Ph,@3,\,O,!,SOO,!,Ph,{6,12}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Chlorfenvinphos;MW:359.58;EXA:- -+ +: <30,!2,O,!,P,//O,/O!2^160>rl,!,O,!,!!,!,Cl,@6,\`1,|,Ph,{2,4}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Chlorpropham;MW:213.7;EXA:- -+ +: <30,Ph,6:/Cl,@4,\,NH,!,//O,!,O,!?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Chlorbenside;MW:269.183;EXA:- -+ +: <30,Ph,@3,\,S,!2,Ph,{6,12}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Chlorobenzilate;MW:325.2;EXA:- -+ +: <30,Ph,@3,\,/OH^-35,/COO!2^30>lr,!,Ph,{6,11}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Chlorantraniliprole;MW:483.15;EXA:- -+ +: <30,Ph,@5,\,//O,60,NH,!,@4,\,NH,!,//O,!,<24,?5,{-1,-3}=db,{-3,-4}:N,-2:/Br, @-4,24,Ph,-5:N,-1:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Azoxystrobin;MW:403.4;EXA:- -+ +: <30,Ph,2:/OH,@3,\,O,!,Ph,{-1,-3}:N,@-4,\,O,!,Ph,@-5,\,/O!,!,//O,!,O! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Thiuram;MW:240.43;EXA:- -+ +: <30,!,N!,!,//S,!,S,!,S,!,//S,!,N!,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Probenazole;MW:223.25;EXA:- -+ +: <12,Ph,3=?5,9=dl,7:S,8:N,{7^35,7^-35}://O,@9,\,O,!2,!! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Penflufen;MW:317.41;EXA:- -+ +: <30,Ph,@3,\,NH,!,//O,!,?5,{-1,-4}=db,{-2,-3}:N,{-2,-4}:/_,-1:/F,@4,\,/_,60,!?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:MCPA;MW:200.62;EXA:- -+ +: <30,Ph,1:/Cl,5:/_,@4,\,O,!2,COOH -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Asulam;MW:230.2;EXA:- -+ +: <30,Ph,@3,\,SOO,!,NH,!,//O,!,O! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Imazasulfuron;MW:412.81;EXA:- -+ +: <-11.8,?6,3=?5,{1,5,7,9}=db,-3:N,8:/Cl, @-1,\,SOO,!,NH,!,//O,!,NH,!,Ph,{-1,-5}:N,{-3,-5}:/O! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Triaziflam;MW:333.4;EXA:- -+, +:, <30,Ph,{2,6}:/_,@4,\,O,!2,?!,NH,!,Ph,{-1,-3,-5}:N,-2:/NH2,@-4,\,??,!,F -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Trichlopyr;MW:256.47;EXA:- -+, +:, <30,Ph,2:N,{1,4,6}:/Cl,@3,\,O,!2,COOH -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Halosulfuron-methyl;MW:434.82;EXA:- -+, +:, <6,?5,{3,5}=db,{1,2}:N,5:/Cl,@3,\,SOO,!,NH,!,//O,!,NH,!,Ph,@4,\,//O,!,O,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Flupoxam;MW:460.8;EXA:2 -+ +: <30,Ph,4:/Cl,@1,\,?5,{-2,-4}=db,{-2,-4,-5}:N,-1:/Ph,@-3,\,//O,!,NH2, @3,\,!,O,!,/F^35,/F^-35,!,CF3 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cyanazine;MW:240.7;EXA:- -+ +: <30,Ph,{2,4,6}:N,5:/Cl,1:/NH!2,@3,\,NH,!,??,!,CN -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cyanophos;MW:243.22;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,O,!,|,Ph,4:/CN -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Diethofencarb;MW:267.3;EXA:- -+ +: <30,Ph,@4,\,NH,!,//O,!,O,!?!,{1,6}:/O!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Dichlofenthion;MW:315.2;EXA:- -+ +: <30,!2,O,!,P,//S,/O!2^160>rl,!,O,!,|,Ph,{2,4}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Diclofop-methyl;MW:341.2;EXA:- -+ +: <30,Ph,{4,6}:/Cl,@3,\,O,!,Ph,@-4,\,O,!?!,COO! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cyhalothrin;MW:449.86;EXA:- -+ +: <-30,?3,{2^-35,2'^35}:*/_,@1,\,!~dl,/CF3,!,Cl, @3,\,//O,!,O,!,/CN,!,Ph,-4:/OPh>rl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cyhalofop-Buthyl;MW:357.381;EXA:- -+ +: <30,Ph,1:/CN,4:/F,@3,\,O,!,|,Ph,@-3,\,O,!?!,//O,!,O,!4 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Diphenamid;MW:239.3;EXA:- -+ +: <30,Ph,@3,\,!,Ph,@-5,\,//O,!,N,?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cyfluthrin;MW:434.3;EXA:- -+ +: <-30,?3,{2^-35,2'^35}:*/_, @1,\,!~dl,/Cl,!,Cl,@3,\,//O,!,O,!,/CN,!,Ph,-3:/F,-4:/OPh>rl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Diflufenican;MW:394.29;EXA:- -+ +: <30,Ph,{1,5}:/F,@4,\,NH,!,//O,!,Ph,6:N,@-5,\,O,!,Ph,-3:/CF3 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cyproconazole;MW:291.8;EXA:- -+ +: <30,?3,@2,\,?!,/OH^30,-90,!,|,<-18,?5,{2,4}=dl,{1,3,5}:N,@$5,-30,Ph,-3:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cypermethrin;MW:416.3;EXA:- -+ +: <-30,?3,{2^-35,2'^35}:*/_, @1,\,!~dl,/Cl,!,Cl,@3,\,//O,!,O,!,/CN,!,Ph,-4:/OPh>rl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Simazine;MW:201.7;EXA:- -+ +: <30,Ph,{2,4,6}:N,5:/Cl,1:/NH!2,3:/NH!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Dimethametryn;MW:255.4;EXA:- -+ +: <30,Ph,{2,4,6}:N,5:/S!,1:/NH!2,@3,\,NH,!?!,?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Dimethylvinphos;MW:331.52;EXA:- -+ +: <-30,!,O,!,P,//O,/O!^160,!,O,!,!~dl,!,Cl,@5,\`1,Ph,{-5,-3}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Dimethenamid;MW:275.8;EXA:- -+ +: <-6,?5,{3,5}=dl,2:S,{3,5}:/_,@4,\,N,!,//O,!2,Cl,@6,\,?!2,O,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Dimethoate;MW:229.25;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,S,!2,//O,!,NH,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Simetryn;MW:213.3;EXA:- -+ +: <30,Ph,{2,4,6}:N,5:/S!,{1,3}:/NH!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Dimepiperate;MW:263.4;EXA:- -+ +: <30,Ph,@3,\,??,!,S,!,//O,!,|,?6,1:N -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Diazinon;MW:304.35;EXA:- -+ +: <30,!2,O,!,P,//S,/O!2^160>rl,!,O,!,|,Ph,{4,6}:N,5:/_,3:/?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Thiobencarb;MW:257.776;EXA:- -+ +: <30,Ph,1:/Cl,@4,\,!,S,!,//O,!,N,/!,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Thiometon;MW:246.34;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,S,!3,S,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Thifluzamide;MW:528.08;EXA:- -+ +: <-12,?5,{3,5}=dl,2:S,5:N,3:/CF3,1:/_, @4,\,//O,!,NH,!,<6,|,Ph,{2,6}:/Br,@-3,\,O,!,CF3 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Dieldrin;MW:380.895;EXA:- -+ +: <30,?6`1.2,3=?6,6=dl,9=?3,-1:O,@2,148~wf`1.4,&5~wb, @7,*\^145`1.3,&10~zb,{1,2,5,6,12^-210,12^-150}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Aldrin;MW:364.908;EXA:- -+ +: <30,?6`1.3,3=?6,{6,9}=dl, @2,210~wf`1.5,&5~wb,@7,210~zf`1.5,&10~zb,{1,2,5,6,11^-210,11^-150}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Tecnazene;MW:260.879;EXA:- -+ +: <30,Ph,{1,3,4,6}:/Cl,5:/NO2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Tetrachlorvinfos;MW:365.97;EXA:- -+ +: <-30,!,O,!,P,//O,/O!^160,!,O,!,!!,!,Cl,@5,\`1,|,Ph,{2,4,5}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Tetraconazole;MW:372.14;EXA:- -+ +: <-6,?5,{2,5}=dl,{1,2,4}:N,@4,\,!3,O,!,/F^35,/F^-35,!,CF2,@7,\,|,Ph,{4,6}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Tetradifon;MW:356.038;EXA:- -+ +: <30,Ph,@3,\,SOO,!,Ph,{6,10,11,13}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Thenylchlor;MW:323.835;EXA:- -+ +: <6,?5,{2,5}=dl,4:S,2:/O!,@3,\,!,N,!,//O,!2,Cl,@7,-15,Ph,{-1,-5}:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Tebuconazole;MW:307.8;EXA:- -+ +: <36,?5,{1,4}=dl,{1,3,5}:N,@3,30,!4,Ph,-3:/Cl,7^-30:/??!,7^30:/OH -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Tebufenpyrad;MW:333.86;EXA:- -+ +: <6,?5,{3,5}=dl,{1,2}:N,4:/Cl,5:/!,2:/_,@3,\,//O,!,NH,!2,Ph,-3:/??! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Tefluthrin;MW:418.736;EXA:- -+ +: <-30,?3,{2^-35,2'^35}:*/_,@1,\,!!,/CF3,!,Cl, @3,\,//O,!,O,!2,|,Ph,{2,3,5,6}:/F,4:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Terbutryn;MW:241.4;EXA:- -+ +: <30,Ph,{2,4,6}:N,5:/S!,1:/NH!2,@3,\,NH,!,??! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Terbufos;MW:288.42;EXA:- -+ +: <30,!2,O,!,P,//S,/O!2^160>rl,!,S,!2,S,!,??! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Triadimefon;MW:293.8;EXA:- -+ +: <30,Ph,6:/Cl,@3,\,O,!2,//O,!,??!,@8,\,|,?5,{2,4}=dl,{1,2,4}:N -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Triazophos;MW:313.31;EXA:- -+ +: <30,!2,O,!,P,//S,/O!2^160>rl,!,O,!,<-12,|,?5,{2,5}=dl,{2,4,5}:N,4:/Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Triallate;MW:304.7;EXA:- -+ +: <-30,!?!,N,/?!,!,//O,!,S,!2,/Cl,!!,/Cl,!,Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Tribufos;MW:314.50;EXA:- -+ +: <30,!4,S,!,P,//O,/'(S,!4)^160>rl,!,S,!4 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Tolclofos-methyl;MW:301.13;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,O,!,|,Ph,{2,6}:/Cl,4:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Trifluralin;MW:335.3;EXA:- -+ +: <30,Ph,{1,3}:/NO2,5:/CF3,@2,\,N,/!2,!3 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Napropamide;MW:271.4;EXA:- -+ +: <-30,Ph,4=Ph,@10,\,O,!,??,!,//O,!,N,/!,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Nitrothal-isopropyl;MW:295.3;EXA:- -+ +: <30,Ph,5:/NO2,@1,\,//O,!,O,!?!,@3,\,//O,!,O,!?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Norflurazon;MW:303.7;EXA:- -+ +: <30,?6,{1,5}=dl,{4,5}:N,1:/NH!,3://O,2:/Cl,@4,\,Ph,-4:/CF3 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Paclobutrazole;MW:293.795;EXA:- -+ +: <30,Ph,6:/Cl,@3,\,!2,/OH,!,??!,@8,\,|,?5,{2,4}=dl,{1,2,4}:N -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Picolinafen;MW:376.331;EXA:- -+ +: <30,Ph,5:/CF3,@3,\,O,!,|,|,Ph,2:N,@3,\,//O,!,NH,!,|,Ph,4:/F -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Bitertanol;MW:337.4;EXA:- -+ +: <30,Ph,@3,\,Ph,@-3,\,O,!2,/OH,!,??!,@14,\,|,?5,{2,4}=dl,{1,2,4}:N -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Bifenox;MW:342.14;EXA:- -+ +: <30,Ph,{4,6}:/Cl,@3,\,O,!,Ph,-4:/COO!,-3:/NO2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Bifenthrin;MW:422.88;EXA:- -+ +: <-30,?3,{2^-35,2'^35}:*/_, @1,\,!~dl,/Cl,!,CF3,@3,\,//O,!,O,!,-60,Ph,-1:/_,-2:/Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Piperophos;MW:353.48;EXA:- -+ +: <-30,!3,O,!,P,//S,/O!?!^160>rl,!,S,!2,//O,!,|,?6,1:N,6:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pyraclofos;MW:360.80;EXA:- -+ +: <30,!2,O,!,P,//O,/S!3^160>rl,!,O,!, <-12,|,?5,{1,4}=dl,{3,4}:N,@-3,-12,|,Ph,4:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pyrazophos;MW:373.37;EXA:- -+ +: <30,!2,O,!,P,//S,/O!2^160>rl,!,O,!, |,?5,3=?6,{2,5,7,9}=dl,{4,5,6}:N,7:/_,-2:/COO!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pyraflufen-ethyl;MW:413.174;EXA:- -+ +: <30,Ph,6:/Cl,4:/F,@3,\,|,?5,{1,4}=dl,{2,3}:N,-3:/_,5:/Cl, @-2,\,O,!,/F,!,F,@$1,\,O,!2,//O,!,O,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pyridaben;MW:364.9;EXA:- -+ +: <30,?6,{2,4}=dl,{5,6}:N,6:/??!,1://O,2:/Cl,@-4,\,S,!2,|,Ph,4:/??! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pyridaphenthion;MW:340.34;EXA:- -+ +: <30,!2,O,!,P,//S,/O!2^160>rl,!,O,!,|,?6,{1,5}=dl,{2,3}:N,4://O,3:/Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pyributicarb;MW:330.4;EXA:- -+ +: <30,Ph,5:/??!,@3,\,//O,!,S,!,N,?!,|,Ph,2:N,3:/O! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pyriproxyfen;MW:321.5;EXA:- -+ +: <30,Ph,@5,\,O,!,Ph,@-3,\,O,!2,?!,O,-60,|,Ph,2:N -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pyriminobac-Methyl;MW:361.354;EXA:- -+ +: <30,Ph,2:/OCO!,@5,\,/_,!!,N,!,O,!,@3,\,O,!,|,Ph,{2,6}:N,{3,5}:/O! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pirimiphos-methyl;MW:305.333;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,O,!,|,Ph,{2,4}:N,5:/_,@-4,\,N,/!,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pyrimethanil;MW:199.257;EXA:- -+ +: <30,Ph,@3,\,NH,!,|,Ph,{2,6}:N,{3,5}:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pyroquilon;MW:173.2;EXA:- -+ +: <30,Ph,3=?6,10:N,9://O,(11,4)=?5 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Vinclozolin;MW:286.108;EXA:- -+ +: <36,?5,3:N,5:O,{2,4}://O,1:/_^54,@1,-30,!!,@3,\,|,Ph,{3,5}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fipronil;MW:437.2;EXA:- -+ +: <30,Ph,{2,4}:/Cl,6:/CF3,@3,\,|,?5,{2,4}=dl,{1,2}:N,3:/CN,5:/NH2, @-2,\,S,//O,!,CF3 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fenomiphos;MW:303.36;EXA:- -+ +: <30,!2,O,!,P,//O,/NH!?!^160,!,O,!,|,Ph,3:/_,4:/S! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fenarimol;MW:331.2;EXA:- -+ +: <30,Ph,@3,\,!,Ph,{4,11}:/Cl,7:/OH^30,@7,-30,|,Ph,{3,5}:N -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fenitrothion;MW:277.23;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,O,!,|,Ph,3:/_,2:/NO2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fenothiocarb;MW:253.4;EXA:- -+ +: <30,Ph,@3,\,O,!5,S,!,//O,!,N,?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fensulfothion;MW:308.35;EXA:- -+ +: <30,!2,O,!,P,//S,/O!2^160>rl,!,O,!,|,Ph,@-3,\,S,//O,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fenthion;MW:278.33;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,O,!,|,Ph,3:/_,4:/S! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Phenthoate;MW:320.358;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,S,!,/Ph,!,//O,!,O,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fenvalerate;MW:419.91;EXA:- -+ +: <30,Ph,6:/Cl,@3,\,/?!,!,//O,!,O,!,/CN,!,Ph,@-4,\,O,-60,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fenpropathrin;MW:349.4;EXA:- -+ +: <-30,?3,{1^35,2^-35}:*/_,{1^-35,2^35}:/*_, @3,\,//O,!,O,!,/CN,!,Ph,@-4,\,O,-60,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fenpropimorph;MW:303.49;EXA:- -+ +: <30,?6,3:N,6:O,{1,5}:*/_,@3,\,!?,!2,|,Ph,4:/??! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Phthalide;MW:271.9;EXA:- -+ +: <30,Ph,3=?5,8:O,9://O,{1,2,5,6}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Butachlor;MW:311.85;EXA:- -+ +: <30,!4,O,!2,N,!,//O,!2,Cl,@7,\,Ph,{-1,-5}:/! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Butamifos;MW:332.36;EXA:- -+ +: <-30,!2,?!,NH,!,P,//S,/O!2^170>rl,!,O,!,|,Ph,2:/NO2,5:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Bupirimate;MW:316.42;EXA:- -+ +: <30,Ph,{4,6}:N,1:/_,@3,\,O,!,SOO,!,N,?!,2:/!3,@5,\,NH,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Buprofezin;MW:305.4;EXA:- -+ +: <-30,?6,{1,5}:N,1:/Ph,3:S,6://O,5:/?!,@4,\~dm,N,!,??! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Flamprop-methyl;MW:335.8;EXA:- -+ +: <30,Ph,1:/Cl,6:/F,@3,\,N,!?!,//O,!,O,!,@7,\,//O,-60,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fluacrypyrim;MW:426.392;EXA:- -+ +: <30,Ph,{4,6}:N,1:/CF3,5:/O!?!,@3,\,O,!2,Ph,@-1,\,|,!!,!,O,!,1:/COO! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fluquinconazole;MW:376.2;EXA:- -+ +: <30,Ph,3=?6,8=dl,{7,9}:N,6:/F,10://O,@8,\, |,?5,{2,4}=dl,{1,3,5}:N,@$9,\,|,Ph,{4,6}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fludioxonil;MW:248.2;EXA:- -+ +: <30,Ph,5=?5,{7,9}:O,{8^-40,8^40}:/F,@4,\,|,?5,{2,5}=dl,-2:NH,-4:/CN -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Flucythrinate;MW:451.5;EXA:- -+ +: <30,Ph,@6,\,O,!,/F,!,F,@3,\,/?!,!,//O,!,O,!,/CN,!,Ph,@-4,\,O,-60,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Flutolanil;MW:323.3;EXA:- -+ +: <30,Ph,2:/CF3,@3,\,//O,!,NH,!,Ph,-1:/O!?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fluvalinate;MW:502.92;EXA:- -+ +: <30,Ph,5:/Cl,1:/CF3,@4,\,NH,!,/?!,!,//O,!,O,!,/CN,!,Ph,@-4,\,O,-60,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Flumioxazin;MW:354.337;EXA:- -+ +: <30,Ph,6:/F,3=?6,-1:O,-4:N,-3://O,@-4,\,!,!!!, @1,\,|,?5,3=?6,3=dr,1:N,{2,5}://O -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pretilachlor;MW:311.85;EXA:- -+ +: <30,Ph,{2,4}:/!,@3,\,N,!3,O,!3,@$7,\,//O,!2,Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Procymidone;MW:284.136;EXA:- -+ +: ?6,1:N,@3,&5,{2,6}://O,{3,5}:/_,@1,\,|,Ph,{3,5}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Prothyophos;MW:329.18;EXA:- -+ +: <-30,!3,O,!,P,//S,/O!2^160>rl,!,O,!,|,Ph,{2,4}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Propachlor;MW:211.689;EXA:- -+ +: <30,Ph,@3,\,N,/?!,!,//O,!2,Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Propazine;MW:229.7;EXA:- -+ +: <30,Ph,{2,4,6}:N,5:/Cl,{1,3}:/NH!?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Propanil;MW:218.077;EXA:- -+ +: <30,Ph,{1,6}:/Cl,@3,\,NH,!,//O,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Propaphos;MW:304.343;EXA:- -+ +: <-30,!3,O,!,P,//O,/O!3^160>rl,!,O,!,|,Ph,4:/S! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Propyzamide;MW:256.1;EXA:- -+ +: <30,Ph,{1,5}:/Cl,@3,\,//O,!,NH,!,??,!,!!! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Propiconazole;MW:342.22;EXA:- -+ +: <30,Ph,{4,6}:/Cl,@3,\,!2,|,?5,{2,4}=dl,{1,2,4}:N,@$7,?5,{-1,-4}:O,-3:/!2^-15 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Prohydrojasmon;MW:254.37;EXA:- -+ +: <18,?5,2://O,3:*\^-12,!4,@4,\*,!,//O,!,O,!3 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Profenofos;MW:373.6;EXA:- -+ +: <30,!2,O,!,P,//S,/O!3^160>rl,!,O,!,|,Ph,2:/Cl,4:/Br -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Bromacil;MW:261.119;EXA:- -+ +: <30,?6,6=dl,3:N,1:/Br,{2,4}://O,5:NH,6:/_,3:/?!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Prometryn;MW:241.4;EXA:- -+ +: <30,Ph,{2,4,6}:N,5:/S!,{1,3}:/NH!?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Bromobutide;MW:312.2;EXA:- -+ +: <30,Ph,@3,\,??,!,NH,!,//O,!,/Br,!,??! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Bromophos;MW:365.99;EXA:- -+ +: <-30,!,O,!, P,//S,/O!^160,!,O,!,|,Ph,{3,6}:/Cl,4:/Br -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Bromopropylate;MW:428.12;EXA:- -+ +: <30,Ph,@3,\,!,Ph,{6,11}:/Br,7:/OH^-45,@7,30,//O,!,O,-60,?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Hexaconazole;MW:314.2;EXA:- -+ +: <36,?5,{1,4}=dl,{1,3,5}:N,@3,30,!5,-4^30:/OH,@-5,-30,|,Ph,{4,6}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Hexazinone;MW:252.31;EXA:- -+ +: <30,?6,3=dl,{2,4,6}:N,2:/_,{1,5}://O,6:/?6,3:/N?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Benalaxyl;MW:325.4;EXA:- -+ +: <30,Ph,@3,\,!,//O,!,N,!?!,//O,!,O,!,@-5,\,|,Ph,{2,6}:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Benoxacor;MW:260.1;EXA:- -+ +: <90,Ph,3=?6,7:N,10:O,8:/_,@7,\,//O,!,/Cl,!,Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Heptachlor;MW:373.35;EXA:- -+ +: <30,?6`1.3,3=?5,{6,8}=dl,@2,210~wf`1.5,&5~wb,{1,2,5,6,9,10^-210,10^-150}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Permethrin;MW:391.30;EXA:- -+ +: <-30,?3,{2^-35,2'^35}:*/_,@1,\,!~dl,/Cl,!,Cl, @3,\,//O,!,O,!2,Ph,@-4,\,O,-60,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Penconazole;MW:284.184;EXA:- -+ +: <30,Ph,{4,6}:/Cl,@3,\,/!2,!2,|,<30,?5,{2,4}=dl,{1,2,4}:N -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pendimethalin;MW:281.3;EXA:- -+ +: <30,Ph,{3,5}:/NO2,{1,2}:/_,@4,\,NH,!?,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Benfluralin;MW:335.3;EXA:- -+ +: <30,Ph,{1,3}:/NO2,5:/CF3,@2,\,N,/!,!4 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Benfuresate;MW:256.3;EXA:- -+ +: <30,Ph,3=?5,7:O,9:??,@6,\,O,!,SOO,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Bensulide;MW:397.5;EXA:- -+ +: <30,!?!,O,!,P,//S,/O!?!^160>rl,!,S,!3,NH,!,SOO,!,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Phosalone;MW:367.80;EXA:- -+ +: <30,!2,O,!,P,//S,/O!2^160>rl,!,S,!2,|,?5,4=Ph,4=dr,1:N,2://O,3:O,8:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Phosmet;MW:317.32;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,S,!2,|,?5,3=Ph2,1:N,{2,5}://O -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Phorate;MW:260.4;EXA:- -+ +: <30,!2,O,!,P,//S,!,S,!2,S,!2,4^160>rl:/O!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Malathion;MW:330.35;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,S,!2,//O,!,O,!2,@5,\`1,!,//O,!,O,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Myclobutanil;MW:288.8;EXA:- -+ +: <36,?5,{1,4}=dl,{1,3,5}:N,@3,30,!5,7:/CN^30,@7,-30,|,Ph,4:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Methidathion;MW:302.32;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,S,!2,|,?5,4=dl,{1,5}:N,3:S,2://O,4:/O! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Methoxychlor;MW:345.644;EXA:- -+ +: <30,Ph,@3,\,!,Ph,{6,11}:/O!,7:/CCl3 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Metolachlor;MW:283.8;EXA:- -+ +: <30,Ph,5:/!,3:/_,@4,\,N,!,//O,!2,Cl,@7,\,?!2,O,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Mevinphos;MW:224.15;EXA:- -+ +: <-30,!,O,!,P,//O,/O!^160,!,O,!?,!!,!,//O,!,O,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Mefenacet;MW:298.4;EXA:- -+ +: <12,Ph,3=?5,9=dl,9:N,7:S,@8,\,O,!2,//O,!,N,?!,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Mefenpyr-diethyl;MW:373.23;EXA:- -+ +: <18,?5,5=dl,{4,5}:N,3^65:/_,{1^12,3^-12}:/COO!2,@4,-24,|,Ph,{4,6}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Mepronil;MW:269.3;EXA:- -+ +: <30,Ph,2:/_,@3,\,//O,!,NH,!,|,Ph,5:/O!?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Molinate;MW:187.3;EXA:- -+ +: <47,?7,3:N,@3,\,//O,!,S,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Resmethrin;MW:338.4;EXA:- -+ +: <-30,?3,{2^-35,2'^35}:*/_,@1,\,!!,?!,@3,\,//O,!,O,!2, |,?5,{3,5}=dl,2:O,@3,\,!,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Lenacil;MW:234.3;EXA:- -+ +: <30,?6,3=?5,3=dl,6:N,2:NH,{1,5}://O,6:/?6 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Halfenprox;MW:477.4;EXA:- -+ +: <30,Ph,@6,\,O,!,/F^35,/F^-35,!,Br,@3,\,!,??,!,O,!2,Ph,@-2,\,O,60,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Paraquat;MW:257.16;EXA:- -+ +: Ph,@4,\,Ph,{1,10}:N!,1:p_^-90,10:p_^90,@1,@(0,1.2),Cl,n_^15, @10,@(0,1.2),Cl,n_^15 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Oxine-Copper;MW:351.852;EXA:- -+ +: Ph,4:N,5=Ph,@-4,\,O,-60,<90,Cu,-90,O,60,|,Ph,5=Ph,10:N,||,@4,&12~vf,@23,&12~vf -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Endosulfan;MW:406.904;EXA:- -+ +: <26,?7,7=?6[13],@11,208~wf`1.45,&8~wb,10=dl,{3,5}:O,4:S,4://O, {8,9,10,11,12^-210,12^-150}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Uniconazole-P;MW:291.779;EXA:- -+ +: <30,Ph,6:/Cl,@3,\,!~dl,!,/OH,!,??!,@8,\,|,?5,{2,4}=dl,{1,2,4}:N -+ +; %****************************************************************************** Cat:pesticide;EN:Azinphos-methyl;MW:317.318;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,S,!2,|,?6,-3=?6,{2,4,8,10}=dl,{1:3}:N,6://O -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Azoxystorbin;MW:403.394;EXA:- -+ +: <30,Ph,2:/CN,@3,\,O,!,Ph,{-1,-3}:N,@-4,\,O,!,Ph,@-5,\,//!O!,!,//O,!,O,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Aramite;MW:334.859;EXA:- -+ +: <30,Ph,6:/??!,@3,\,O,!2,?!,O,!,S,//O,!,O,!3,Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Aldicarb;MW:190.3;EXA:- -+ +: <-30,!,S,!,??,!,!!,N,!,O,!,//O,!,NH,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Aldoxycarb;MW:222.3;EXA:- -+ +: <30,!,//O,!,NH,!,O,!,N,!!,!,??,!,SOO,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Isoxaflutole;MW:359.319;EXA:- -+ +: <30,Ph,6:/CF3,@4,\,SOO,!,@3,\`1,//O,!`1,<-12,|,?5,{1,4}=dl,3:O,4:N,2:/?3 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Iprovalicarb;MW:320.4;EXA:- -+ +: <30,Ph,6:/_,@3,\,!?!,NH,!,//O,!,??,!,NH,!,//O,!,O,!?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Imazalil;MW:297.2;EXA:- -+ +: <-30,!2,O,!2,!!,@1,60,|,?5,{2,4}=dl,{1,3}:N,@$2,\,|,Ph,{4,6}:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Imidacloprid;MW:255.662;EXA:- -+ +: <30,Ph,1:N,6:/Cl,@3,\,!,|,?5,1:N,3:NH,@2,\\,N,!,NO2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Indanofan;MW:340.80;EXA:- -+ +: <30,Ph,3=?5,{7,9}://O,8^55>lr:/!,@8,-30,!2,|,Ph,5:/Cl,||,@11,?3,-2:O -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Indoxacarb;MW:527.837;EXA:- -+ +: <-6,Ph,3=?5,9=?6,15=dl,10:O,{12,13}:N,1:/Cl,8`1^-54:/COO!, @12,\,//O,!,N,/COO!,!,Ph,@-3,\,O,!,CF3 -+ +; Cat:pesticide;EN:Oxamyl;MW:219.3;EXA:- -+ +: <-30,!,N,?!,//O,!,/S!,!!,N,!,O,!,//O,!,NH,! -+ +; Cat:pesticide;EN:Oryzalin;MW:346.4;EXA:- -+ +: <30,Ph,{1,3}:/NO2,@5,\,SOO,!,NH2,@2,\,/!2,N,!3 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Carbaryl;MW:201.22;EXA:- -+ +: <30,Ph,5=Ph,@4,\,//O,!,O,!,NH,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Carpropamid;MW:334.665;EXA:- -+ +: <-30,?3,1:/_,{2^-35,2'^35}:*/Cl,3^70:/!,@3,\,//O,!,NH,!?!,Ph,-3:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cumyluron;MW:302.802;EXA:- -+ +: <30,Ph,@4,\,??,!,NH,!,//O,!,NH,!2,|,Ph,6:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cloquintocet-methyl;MW:335.83;EXA:- -+ +: <90,Ph,4=Ph,2:N,10:/Cl,@7,\,O,!2,//O,!,O,!?,!5 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Clotianidin;MW:249.673;EXA:- -+ +: <6,?5,{3,5}=dl,2:S,5:N,1:/Cl,@3,\,!,NH,!,/NH!,!!,N,!,NO2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Chromafenozide;MW:394.515;EXA:- -+ +: <30,?6,3=?6,5:O,{7,9,11}=dl,7:/_,@8,\,//O,!,NH,!,N,/??!,!,//O,!,|,Ph,{3,5}:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Clomeprop;MW:324.2;EXA:- -+ +: <30,Ph,{4,6}:/Cl,5:/_,@3,\,O,!?!,//O,!,NH,!,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Chloridazon;MW:221.6;EXA:- -+ +: <30,?6,{3,4}:N,{2,6}=dl,5://O,1:/NH2,6:/Cl,4:/Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Chloroxuron;MW:290.745;EXA:- -+ +: <30,Ph,6:/Cl,@3,\,O,!,Ph,@-3,\,NH,!,//O,!,N,?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cyazofamid;MW:324.783;EXA:- -+ +: <18,?5,{2,5}=dl,{2,4}:N,1:/Cl,3:/CN,@4,\,SOO,!,N,?!,@5,\,Ph,-3:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Diuron;MW:233.1;EXA:- -+ +: <30,Ph,{1,6}:/Cl,@3,\,NH,!,//O,!,N,?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cyflufenamid;MW:412.36;EXA:- -+ +: <30,Ph,4^20:/CF3,{1,2}:/F,@3,\,!,NH,!,//O,!2,Ph,@-10,\\,N,!,<-12,O,!2,?3 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Diflubenzuron;MW:310.7;EXA:- -+ +: <30,Ph,{2,4}:/F,@3,\,//O,!,NH,!,//O,!,NH,!,Ph,-3:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Cyprodinil;MW:225.295;EXA:- -+ +: <30,Ph,{2,4}:N,5:/_,1:/?3,@3,\,NH,!,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Simeconazole;MW:293.417;EXA:- -+ +: <36,?5,{1,3,5}:N,{1,4}=dl,@3,30,!,/OH^30,!2,Si,??!,@7,-30,Ph,-3:/F -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Dimethirimol;MW:209.29;EXA:- -+ +: <30,?6,{3,5}=dl,1://O,2:NH,3:/N?!,4:N,5:/_,6:/??! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Dimethomorph;MW:387.86;EXA:- -+ +: <30,?6,1:O,4:N,@4,\,//O,!,!!`1,!,|,Ph,{4,5}:/O!,||,@9,\,Ph,-3:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Silafluofen;MW:408.588;EXA:- -+ +: <30,Ph,@5,\,O,!,Ph,-1:/F,@10,\,!3,Si,??,!,Ph,-3:/O!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Di-allate;MW:270.212;EXA:- -+ +: <-30,!?!,N,!,//O,!,S,!2,!!,!,Cl,3:/?!,7:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Daimuron;MW:268.4;EXA:- -+ +: <30,Ph,@4,\,??,!,NH,!,//O,!,NH,!,Ph,-3:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Thiacloprid;MW:252.72;EXA:- -+ +: <30,Ph,1:N,6:/Cl,@3,\,!,<-12,|,?5,1:N,3:S,@-4,\\,N,!,CN -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Thiabendazole;MW:201.247;EXA:- -+ +: <30,Ph,3=?5,8=dl,9:NH,7:N,@8,\,|,?5,{1,4}=dl,3:S,5:N -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Thiamethoxam;MW:291.71;EXA:- -+ +: <30,?6,2:O,{4,6}:N,6:/_,@5,\\,N,!,NO2,@4,\,!,|,?5,{1,3}=dl,3:N,5:S,4:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Tebuthiuron;MW:228.3;EXA:- -+ +: <18,?5,{3,5}=dl,{4,5}:N,2:S,1:/??!,@3,\,N,?!,//O,!,NH,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Tebufenozide;MW:352.5;EXA:- -+ +: <30,Ph,6:/!,@3,\,//O,!,NH,!,N,/??!,!,//O,!,|,Ph,{3,5}:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Teflubenzuron;MW:381.1;EXA:- -+ +: <30,Ph,{2,4}:/F,@3,\,//O,!,NH,!,//O,!,NH,!,|,Ph,{3,5}:/Cl,{4,6}:/F -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Tridemorph;MW:297.5;EXA:- -+ +: <30,?6,3:N,6:O,{1,5}:/_,3:/!12 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Triflumuron;MW:358.701;EXA:- -+ +: <30,Ph,4:/Cl,@3,\,//O,!,NH,!,//O,!,NH,!,|,Ph,@5,\,O,!,CF3 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Naproanilide;MW:291.35;EXA:- -+ +: <30,Ph,4=Ph,@8,\,O,!?!,//O,!,NH,!,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Novaluron;MW:492.706;EXA:- -+ +: <30,Ph,{2,4}:/F,@3,\,//O,!,NH,!,//O,!,NH,!, Ph,-4:/Cl,@-3,\,O,!,/F^-35,/F^35,!,/F,!,O,!,CF3 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pyraclostrobin;MW:387.817;EXA:- -+ +: <30,Ph,@3,\,!,O,!,<12,|,?5,{2,5}=dl,{4,5}:N, @4,12,Ph,-3:/Cl,||,@2,\,N,/O!,!,COO! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pirimicarb;MW:238.291;EXA:- -+ +: <30,Ph,{1,5}:N,{2,3}:/_,6:/N?!,@4,\,O,!,//O,!,N,?! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fenoxycarb;MW:301.35;EXA:- -+ +: <30,Ph,@5,\,O,!,Ph,@-3,\,O,!3,NH,!,//O,!,O,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fenobucarb;MW:207.3;EXA:- -+ +: <30,Ph,5:/?!2,@4,\,O,!,//O,!,NH! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Ferimzone;MW:254.337;EXA:- -+ +: <30,Ph,4:/_,@3,\,/_,!!,N,!,NH,!,|,Ph,{2,6}:N,{3,5}:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fenamidone;MW:311.403;EXA:- -+ +: <18,?5,4=dl,{3,5}:N,2://O,@3,\,NH,!,Ph,4:/S!,1^52:*/_,1^-48:/*Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fenpyroximate;MW:421.49;EXA:- -+ +: <-6,?5,{3,5}=db,{1,2}:N,{2,5}:/_,@3,-15,O,!,Ph, @4,\,!!,N,!,O,!2,|,Ph,@4,\,//O,-60,O,!4 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Phenmedipham;MW:300.32;EXA:- -+ +: <30,Ph,5:/_,@3,\,NH,!,//O,!,O,!,Ph,@-4,\,NH,!,//O,!,O! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Butafenacil;MW:474.817;EXA:- -+ +: <30,?6,6=dl,{3,5}:N,{2,4}://O,5:/_,6:/CF3, @3,\,Ph,-3:/Cl,@-2,\,//O,!,O,!,??,!,//O,!,O,!2,!! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Flufenacet;MW:363.331;EXA:- -+ +: <6,?5,{2,5}=dl,{1,2}:N,4:S,5:/CF3,@3,\,O,!,-60,//O,!,N,/?!,!,|,Ph,4:/F -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Flufenoxuron;MW:488.77;EXA:- -+ +: <30,Ph,{2,4}:/F,@3,\,//O,!,NH,!,//O,!,NH,!,Ph,-1:/F,@-3,\,O,!,|,Ph,4:/CF3,6:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Fluridone;MW:329.3;EXA:- -+ +: <30,?6,{3,6}=dl,2:N,2:/_,5://O,@4,\,Ph,-4:/CF3,6:/Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Propaquizafop;MW:443.884;EXA:- -+ +: <90,Ph,3=?6,{8,10}=dl,{7,10}:N,1:/Cl, @8,\,O,!,|,Ph,@4,\,O,|,!2,//O,!,O,!,-60,!,O,-60,N,-60~dr,!,{2,9}:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Hexaflumuron;MW:461.14;EXA:- -+ +: <30,Ph,{2,4}:/F,@3,\,//O,!,NH,!,//O,!,NH,!, |,Ph,{3,5}:/Cl,@4,\,O,!,/F^-35,/F^35,!,/F,!,F -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Hexathiazox;MW:352.877;EXA:- -+ +: <30,?6,@3,\,NH,!,//O,!,<-24,|,?5,1:N,3:S,2://O,5:/_,@4,\,Ph,-3:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pencycuron;MW:328.84;EXA:- -+ +: <30,Ph,6:/Cl,@3,\,!,N,/?5,!,//O,!,NH,!,Ph -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Bendiocarb;MW:223.228;EXA:- -+ +: <30,Ph,5=?5,{7,9}:O,8:??,@4,\,O,!,//O,!,NH! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Pentoxazone;MW:353.774;EXA:- -+ +: <66,?5,5://?!,1:O,3:N,{2,4}://O,@3,\,|,Ph,4:/Cl,6:/F,@3,\,O,!,?5 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Boscalid;MW:343.21;EXA:- -+ +: <30,Ph,5:N,4:/Cl,@3,\,//O,!,NH,!,Ph,@-1,\,Ph,-3:/Cl -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Methabenzthiazuron;MW:221.3;EXA:- -+ +: Ph,3=?5,9=dl,7:S,9:N,@8,\,N,?!,//O,!,NH,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Methoxyfenozide;MW:368.48;EXA:- -+ +: <30,Ph,2:/_,1:/O!,@3,\,//O,!,NH,!,N,/??!,!,//O,!,|,Ph,{3,5}:/_ -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Monolinuron;MW:214.6;EXA:- -+ +: <30,Ph,6:/Cl,@3,\,NH,!,//O,!,N,?!,O,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Lactofen;MW:461.78;EXA:- -+ +: <30,Ph,4:/Cl,6:/CF3,@3,\,O,!,Ph,-3:/NO2,@-4,\,//O,!,O,!?!,//O,!,O,!2 -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Linuron;MW:249.1;EXA:- -+ +: <30,Ph,{1,6}:/Cl,@3,\,NH,!,//O,!,N,?!,O,! -+ +; %------------------------------------------------------------------------------ Cat:pesticide;EN:Lufenuron;MW:511.15;EXA:- -+ +: <30,Ph,{2,4}:/F, @3,\,//O,!,NH,!,//O,!,NH,!,Ph,{-1,-4}:/Cl,@-3,\,O,!,/F^35,/F^-35,!,/F,!,CF3 -+ +; %****************************************************************************** Cat:antibacterial;EN:Sulfacetamide;MW:214.239;EXA:- -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,//O,! -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sulfatiazole;MW:255.31;EXA:- -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,?5,{1,3}=dl,2:N,5:S -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Chlopidol;MW:192.039;EXA:- -+ +: <30,Ph,{1,3}:/_,2:N,{4,6}:/Cl,5:/OH -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sulfadiadine;MW:250.276;EXA:1 -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,Ph,{2,6}:N -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Levamisole;MW:204.29;EXA:- -+ +: ?5,3=?5,6=dl,2:S,{4,6}:N,@7,\,Ph -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:5-(Propylsulphonyl)-1-H-Benzimidazole-2-Amine;MW:239.29;EXA:- -+ +: <30,Ph,3=?6,8=dl,7:N,9:NH,6:/S!3,8:/NH2 -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sulfapyrizine;MW:249.288;EXA:- -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,Ph,6:N -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Marbofloxacin;MW:362.361;EXA:- -+ +: <30,Ph,{3,(2,7)}=?6,9=dl,6:/F,{7,13}:N,11:O,9:/COOH,10://O,13:/_, @1,\,|,?6,{1,4}:N,4:/_ -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sulfamerazine;MW:264.303;EXA:- -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,Ph,{2,6}:N,3:/_ -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Trimethoprim;MW:290.323;EXA:- -+ +: <30,Ph,{1,5}:N,{2,6}:/NH2,@3,\,!,|,Ph,{3,4,5}:/O! -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Ofloxacin;MW:361.373;EXA:- -+ +: <30,Ph,{3,(2,7)}=?6,9=dl,7:N,11:O, 6:/F,9:/COOH,10://O,13:/_,@1,\,|,?6,{1,4}:N,4:/_ -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Ciprofloxacin;MW:331.347;EXA:- -+ +: <30,Ph,-4=?6,9=dl,7:N,6:/F,7:/?3,9:/COOH,10://O,@1,\,|,?6,1:N,4:NH -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Enrofloxacin;MW:359.401;EXA:- -+ +: <30,Ph,-4=?6,9=dl,7:N,6:/F,7:/?3,9:/COOH,10://O,@1,\,|,?6,{1,4}:N,4:/! -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Danofloxacin;MW:357.385;EXA:- -+ +: <30,Ph,-4=?6,9=dl,7:N,6:/F,7:/?3,9:/COOH,10://O, @1,\,|,?6,@2,-200`1.1,&5,{1,4}:N,4:*/_ -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Ormetoprim;MW:274.324;EXA:- -+ +: <30,Ph,{1,5}:N,{2,6}:/NH2,@3,\,!,|,Ph,2:/_,{4,5}:/O! -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sulfadimidine;MW:278.33;EXA:- -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,Ph,{2,4}:N,{3,5}:/_ -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Orbifloxacin;MW:395.382;EXA:- -+ +: <30,Ph,-4=?6,9=dl,7:N,{2,5,6}:/F,7:/?3,9:/COOH,10://O, @1,\,|,?6,1:N,{3,5}:*/_,4:NH -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sulfamethoxypyridazine;MW:280.302;EXA:- -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,Ph,{5,6}:N,4:/O! -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sarafloxacin;MW:385.371;EXA:- -+ +: <30,Ph,3=?6,9=dl,7:N,6:/F,9:/COOH,10://O,@1,\,?6,-6:N,-3:NH,@7,\,Ph,-3:/F -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Difloxacin;MW:399.398;EXA:- -+ +: <30,Ph,-4=?6,9=dl,7:N,6:/F,9:/COOH,10://O,@1,\,|,?6,{1,4}:N,4:/_, ||,@7,\,Ph,-3:/F -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sulfamonomethoxine;MW:280.302;EXA:- -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,Ph,{2,4}:N,3:/O! -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sulfachlorpyridazine;MW:284.723;EXA:- -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,Ph,{5,6}:N,4:/Cl -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sulfadoxine;MW:310.328;EXA:- -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,Ph,{4,6}:N,{2,3}:/O! -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sulfamethoxazole;MW:253.276;EXA:- -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,?5,{2,5}=dl,4:O,5:N,3:/_ -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Pirimethamin;MW:248.714;EXA:- -+ +: <30,Ph,6:/Cl,@3,\,Ph,{-2,-4}:N,-1:/!,{-3,-5}:/NH2 -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Oxibendazole;MW:249.27;EXA:- -+ +: <30,Ph,-4=?5,9=dl,7:NH,9:N,1:/O!3,@8,\,NH,!,COOH -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Oxolinic acid;MW:261.233;EXA:- -+ +: <30,Ph,3=?6,6=?5,9=dl,7:N,{11,13}:O,10://O,7:/!,9:/COOH -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sulfabenzamide;MW:276.31;EXA:- -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,//O,!,Ph -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Ethopabate;MW:237.255;EXA:- -+ +: <30,Ph,1:/NHCO!,3:/O!2,4:/COO! -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sulfadimethoxine;MW:310.33;EXA:- -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,Ph,{2,4}:N,{3,5}:/O! -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Sulfaquinoxaline;MW:300.337;EXA:- -+ +: <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,Ph,3=Ph,{2,5}:N -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Nalidixic acid;MW:232.239;EXA:- -+ +: <30,Ph,3=?6,9=dl,{5,10}:N,6:/_,7://O,8:/COOH,10:/! -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Flubendazole;MW:313.288;EXA:- -+ +: <30,Ph,-4=?5,9=dl,7:NH,9:N,@1,\,O,!,Ph,@8,\,NH,!,COO! -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Flumequine;MW:261.225;EXA:- -+ +: <30,Ph,{3,(2,7)}=?6,9=dl,7:N,6:/F,9:/COOH,10://O,13:/_ -+ +; %------------------------------------------------------------------------------ 34;Cat:antibacterial;EN:Sulfanitran;MW:335.334;EXA:- -+ +: <30,Ph,@1,\,NH,!,//O,!,@4,\,SOO,!,NH,!,|,Ph,4:/NO2 -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Xylazine;MW:220.334;EXA:- -+ +: <30,?6,3=dl,2:S,4:N,@3,\,NH,!,|,Ph,{2,6}:/_ -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Famphur;MW:325.3;EXA:- -+ +: <-30,!,O,!,P,//S,/O!^160,!,O,!,Ph,@-3,\,SOO,!,N!,! -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Lincomycin;MW:406.54;EXA:- -+ +: <6,?5,5:N,5:*/_,2:*/!2, @3,\*,//O,!,NH,!,!~wb,?6,-1:O,{-3',-4,-5}:*/OH,-2:/*S!,@8,-30,/_,60,OH -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:2-acethylamino-5-nitrothiazole;MW:187.178;EXA:- -+ +: <18,?5,{2,5}=dl,2:N,4:S,3:/NHCO!,5:/NO2 -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Chlorsulron;MW:357.77;EXA:- -+ +: <30,Ph,6:/NH2,@1,\,SOO,!,NH2,@3,\,SOO,!,NH2,@4,\,/Cl,60~dl,/Cl,!,Cl -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Florfenicol;MW:358.21;EXA:- -+ +: <30,Ph,@1,\,SOO,!,@4,\,/OH,!,/!F,!,NH,!,//O,!,/Cl,!,Cl -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Thiamphenicol;MW:355;EXA:- -+ +: <30,Ph,@1,\,SOO,!,@4,\,/OH,!,/!OH,!`1.1,NH,!`1.1,//O,!,/Cl,!,Cl -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Oxadiargyl;MW:341.19;EXA:- -+ +: <30,Ph,{1,3}:/Cl,6:/'(O,!2,!!!),@4,\,|,?5,2=dl,{1,2}:N,4:O,5://O,3:/??! -+ +; %------------------------------------------------------------------------------ Cat:antibacterial;EN:Oxaziclomefone;MW:376.277;EXA:- -+ +: <30,?6,6=dl,4:N,2:O,1:/_,5://O,6:/Ph,@4,\,??,!,|,Ph,{3,5}:/Cl -+ +; %****************************************************************************** Cat:biological;EN:Okadaic acid;MW:805.00;EXA:2 -+ +: <30,?6,@4,?6,@-4,\,!3,<-12,?5,@-3,<-12,?6,-3=?6,@-3,*\,!3, ?6,@-4,?6,@6,\,!,/*_^-40,*/OH^20,!,//O,!1,OH, 3=wb,11=dl,15=dr,17=wf,19=wf,38=wb,{5,7,16,24,25,33,42}:O, 32:*/H^60,10:/_,{12,31,37'}:*/_,27://_,28:/OH,{3,29}:/*OH -+ +; %------------------------------------------------------------------------------ Cat:antibiotics;EN:Vancomycin;MW:1449.25;EXA:2 -+ +: <-30,#1,!12,{1,3,12}=zf,7=wf,60,60,Ph,@-3,\,O,!,Ph,@-4,\,O,!,Ph,@-3,\,&1, @7,&26,@$1,60,60,NH,60,-60,Ph,@-1,\,Ph,@-2,&4,##, {36,3^40,6,9,12}://O,{2,5,8,11}:NH,{1,4^180,7'^-60,10'^60,14'^60,35^-60}:*/H, @@ -2816,10 +2841,10 @@ Cat:antibiotics;EN:Vancomycin;MW:1449.25;EXA:2 @10,*\^-60,60,//O,!,NH2,@13,*\,NH,!,//O,!,/??!,*/H^60,!~zf,NH,!, @23,\,O,!~zf,|,?6`.7,2:O,3^10:*/!OH,{4',5}:*/OH, @-1,\*,O,!~wb,|,?6`.7,6:O,{3'^35,5}:*/_,3^-35:/NH2,4:/*OH, -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Maitotoxin;MW:3425.86;EXA:2 -+ +: <55.8,?6,-4=?7 ,{-4,-3,-3,-3}=?6,@-3,\,!3,?6,{-4,-3,-3,-3}=?6,@-3,\,?6,-3=?6, @-3,\,!3,60,<-30,?6,-3=?6,@-3,30,<30,?6,{-3,-3}=?6,-3=?7,{-4,-3,-3}=?6, @-2,\,?6,-3=?6,-3=?7,{-3,-3}=?6,-3=?8,-3=dl,{-5,-3,-3,-3}=?6, @@ -2835,5 +2860,5 @@ Cat:biological;EN:Maitotoxin;MW:3425.86;EXA:2 @6,\,O,30,SO3Na, @$36,-45~zf,O,30,SO3Na, @$150,\,|,!7,{1,2}:/*OH,4:*/_,5:/*_,7=dl -+ +; %------------------------------------------------------------------------------ diff --git a/graphics/mcf2graph/mcf_man_soc.mp b/graphics/mcf2graph/mcf_man_soc.mp index 7eef412e3e..2443a83c70 100644 --- a/graphics/mcf2graph/mcf_man_soc.mp +++ b/graphics/mcf2graph/mcf_man_soc.mp @@ -1,13 +1,13 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% MCF file for mcf_manual.tex by Akira.Yamaji 2022.08.22 +% MCF file for mcf_manual.tex by Akira.Yamaji 2022.10.10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -input mcf2graph; %% it must be version 4.87 +input mcf2graph; %% it must be version 4.88 % ** use library file 'mcf_library.mcf' -message "mcf_man_soc 2022.08.22"; message ""; +message "mcf_man_soc 2022.10.10"; message ""; %------------------------------------------------------------------------ sw_mframe:=0; sw_expand:=0; -%%ext(defaultscale:=.5; label.bot(decimal(char_num)&":"&inf_EN,(.5w,0));) +%%ext(defaultscale:=.5; label.bot(decimal(fig_num)&":"&inf_EN,(.5w,0));) %*********************************************************************** fsize:=(40mm,25mm); blength:=6mm; diff --git a/graphics/mcf2graph/mcf_manual.pdf b/graphics/mcf2graph/mcf_manual.pdf index bc2657e39f..24bd35cb07 100644 Binary files a/graphics/mcf2graph/mcf_manual.pdf and b/graphics/mcf2graph/mcf_manual.pdf differ diff --git a/graphics/mcf2graph/mcf_manual.tex b/graphics/mcf2graph/mcf_manual.tex index f6e773eb33..a756a684e1 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.08.22 +% Molecular Coding Format manual by Akira Yamaji 2022.10.10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} %%%\usepackage{graphicx} @@ -1553,60 +1553,61 @@ bye \subsection{Molecular library file} \begin{verbatim} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% molecular library file mcf_library.mcf by Akira Yamaji 2022.08.21 +% molecular library file mcf_library.mcf by Akira Yamaji 2022.10.10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % tag1:var1;tag2:var2;tag3:var3 ..... % first character of line "%" comment out -% first character of line "+" start,stop MCF +% first character of line ":" start MCF +% first character of line ";" stop MCF +% first character of line "=" start parameter setting +% first character of line "*" start ext(...) +% first character of line "+" start add(...) % Cat = Category,EN = Name,MW = Molecular weight %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%============================================================================== -% molecular data for mcf_example.tex EXA:1[155] EXA:2[7] +Cat:Category;EN:Example;MW:100.00;EXA:% += + sw_frame:=Atom; +: +<30,?6,3=?5,{1,3,5,9}=dl,{2,6,9}:N,5:/NH2,7:NH +* + defaultscale:=.5; + label.bot(decimal(fig_num)&":"&inf_EN,(.5w,0)); ++ + defaultscale:=.3; + label.bot("A2",A2) withcolor red; + label.top("A6",A6) withcolor red; + label.top("A9",A9) withcolor red; +; %============================================================================== Cat:biological;EN:Adenine;MW:135.13;EXA:1 -+ +: <30,?6,3=?5,{1,3,5,9}=dl,{2,6,9}:N,5:/NH2,7:NH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Guanine;MW:151.13;EXA:1 -+ +: <30,?6,3=?5,{1,3,9}=dl,{2,9}:N,{6,7}:NH,5://O,1:/NH2 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Cytosine;MW:111.10;EXA:1 -+ +: <30,?6,{4,6}=dl,4:N,3://O,2:NH,5:/NH2 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Thymine;MW:126.11;EXA:1 -+ +: <30,?6,3=dl,{2,6}:NH,{1,5}://O,4:/_ -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Uracil;MW:112.09;EXA:1 -+ +: <30,?6,6=dl,{3,5}://O,{2,4}:NH -+ +; %== Amino acid ================================================================ Cat:biological;EN:Glycine;MW:75.07;EXA:- -+ -<30,NH2,!2,COOH -+ -%------------------------------------------------------------------------------ -Cat:biological;EN:Glycine;MW:75.07;EXA:- -+ +: <30,NH2,!2,COOH -+ -%------------------------------------------------------------------------------ -Cat:biological;EN:L-Alanine;MW:89.10;EXA:- -+ -<30,NH2,!~wb,?!,COOH -+ -%------------------------------------------------------------------------------ -Cat:biological;EN:L-Valine;MW:117.15;EXA:- -+ -<30,NH2,!~wb,/?!,!,COOH -+ +; %------------------------------------------------------------------------------ \end{verbatim} %------------------------------------------------------------------------------ @@ -1647,31 +1648,31 @@ mc_query("Cat=biological","MW>=285","MW<=290","a:EN"); % Sort key : EN (ascending) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Cat:biological;EN:Atoropin;MW:289.375;EXA:1 -+ +: <30,O,!,//O,!2,Ph,@$1,\~zb^-60,|,?7`1.1,@6,*\^190`1.25,N!,&3~wb,$3:/!OH~wv -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Luteolin;MW:286.24;EXA:- -+ +: <30,Ph,3=?6,9=dl,10:O,7://O,@9,\,Ph,{2,6,14,15}:/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Lycorine;MW:287.315;EXA:1 -+ +: <30,Ph,{-4,-2}=?6,{6,(9,12)}=?5,13=dl,8:N,{15,17}:O, {9'^180,10^60}:*/H,{13,14'}:*/OH -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Morphine;MW:285.343;EXA:1 -+ +: <30,Ph,{2,-4}=?6,(1,12)=?5[2],-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 -+ +; %------------------------------------------------------------------------------ Cat:biological;EN:Piperine;MW:285.343;EXA:1 -+ +: <30,Ph,-1=?5,{-1,-3}:O,@4,\,!!,!,!!,!,//O,!,?6,-6:N -+ +; %------------------------------------------------------------------------------ \end{verbatim} %------------------------------------------------------------------------------ diff --git a/graphics/mcf2graph/mcf_mplib_exa.pdf b/graphics/mcf2graph/mcf_mplib_exa.pdf index f1afb95eba..749c4ce4f6 100644 Binary files a/graphics/mcf2graph/mcf_mplib_exa.pdf and b/graphics/mcf2graph/mcf_mplib_exa.pdf differ diff --git a/graphics/mcf2graph/mcf_mplib_exa.tex b/graphics/mcf2graph/mcf_mplib_exa.tex index 81801ae47a..7106de782c 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.08.22 +% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2022.10.10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% ** mcf2graph.mp must be version 4.87 +% ** mcf2graph.mp must be version 4.88 % ** use mcf_library.mcf \documentclass{article} %------------------------------------------------------------------------------ @@ -85,7 +85,7 @@ beginfigm("EN:Paclitaxel","MW:853.918", ": @7,\*,O,-45,//O,60,Ph,11:*/OCO!>rl,12:/*OCO!^-15>lr ") %--------------------------------------------------------------------- fsize:=(140mm,30mm); - if mc_check(mc)=0: MCat(0,0.5)(scantokens(mc)) + if mc_check(mc)=0: MCat(0,0.5)(scantokens(mc)) sw_numbering:=Atom; MCat(0.6,0.5)(scantokens(mc)) sw_numbering:=Bond; MCat(1,0.5)(scantokens(mc)) fi @@ -113,9 +113,10 @@ endfigm \noindent% ( read library file ) \begin{verbatim} -beginfigm("f:mcf_library.mcf","t:EN","v:Chlorophyll a","NO:-") - sw_output:=Fig+Calc+Mcode; %%%% output temp-mc.aux %%%% - fsize:=(100mm,30mm); +beginfigm("f:mcf_library.mcf","t:EN","v:Chlorophyll a","NO:-", + "= sw_output:=Fig+Calc+Mcode;", + "= fsize:=(100mm,30mm);") + if op_row>=1: scantokens(op) fi if mc_check(mc)=0: MC(scantokens(mc)) VerbatimTeX("\gdef\EN{"&inf_EN&"}\gdef\MW{"&inf_MW&"}"); @@ -128,8 +129,10 @@ endfigm \end{verbatim} %------------------------------------------------------------------------------------ \begin{mplibcode} -beginfigm("f:mcf_library.mcf","t:EN","v:Chlorophyll a","NO:-") - sw_output:=Fig+Calc+Mcode; fsize:=(100mm,30mm); +beginfigm("f:mcf_library.mcf","t:EN","v:Chlorophyll a","NO:-", + "= sw_output:=Fig+Calc+Mcode;", + "= fsize:=(100mm,30mm);") + if op_row>=1: scantokens(op) fi if mc_check(mc)=0: MC(scantokens(mc)) VerbatimTeX("\gdef\EN{"&inf_EN&"}\gdef\MW{"&inf_MW&"}"); diff --git a/graphics/pgf/contrib/tikz-ext/README.md b/graphics/pgf/contrib/tikz-ext/README.md index bee9e3512a..33ec46d366 100644 --- a/graphics/pgf/contrib/tikz-ext/README.md +++ b/graphics/pgf/contrib/tikz-ext/README.md @@ -30,7 +30,7 @@ These are * `ext.shapes.circlecrosssplit` * `ext.shapes.heatmark` * `ext.shapes.rectangleroundedcorners` - * `ext.shapes.superellopse` + * `ext.shapes.superellipse` These were developed in response to questions on tex.stackexchange.com. Some of these can be find by searching for my [user id](https://tex.stackexchange.com/search?q=user%3A16595+%22my+library%22). \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-calendar.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-calendar.tex new file mode 100644 index 0000000000..09bd261a21 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-calendar.tex @@ -0,0 +1,100 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Calendar: Weeknumbers and more conditionals} +\label{sec:calendar} +\begin{package}{calendar-ext} + This package adds week numbers and more conditionals to the \pgfname\space package |pgfcalendar|. + (Despite the code example above, this package is not set up to work with Con\TeX t.) + \inspiration{WeekNum-Q,CalCond-Q,CalFullWeek-Q}{WeekNum-A,CalCond-A,CalFullWeek-A} +\end{package} + +%This package extends the |pgfcalendar| package. + +\begin{multicols}{2} + +\subsection{Extensions} + +The following tests are added. +\begin{itemize} +\itemcalendaroption{Jan} This test is passed by all dates that are in the month of January. +\itemcalendaroption{Feb} as above. +\itemcalendaroption{Mar} as above. +\itemcalendaroption{Apr} as above. +\itemcalendaroption{May} as above. +\itemcalendaroption{Jun} as above. +\itemcalendaroption{Jul} as above. +\itemcalendaroption{Aug} as above. +\itemcalendaroption{Sep} as above. +\itemcalendaroption{Oct} as above. +\itemcalendaroption{Nov} as above. +\itemcalendaroption{Dec} as above. +\itemcalendaroption{leap year}\opt{|=|\meta{year}} + This test checks whether the given year is a leap year. If + \meta{year} is omitted, it checks the year of the current date. +\itemcalendaroption{and}|=|\marg{tests} + This test passes when all \meta{tests} pass. +\itemcalendaroption{not}|=|\marg{tests} + This test passes when \meta{tests} do not pass. +\itemcalendaroption{week of month}|=|\meta{num} + This test passes when the date is in \meta{num}th week of the month. + The first week of the month start at day~1 and ends with day~7. +\itemcalendaroption{week of month'}|=|\meta{num} + As above but counts from the last day of the month. + For a month with 31~days, this means the ``1st'' week starts at day~25 and ends with day~31. +\itemcalendaroption{calendar week of month}|=|\meta{num} + This test passes when the date is in \meta{num}th calendar week of the month. + The first week starts at the first day of the month and ends at the next Sunday. +\itemcalendaroption{calendar week of month'}|=|\meta{num} + As above but counts from the last day of the month. +\begin{codeexample}[width=5cm,preamble=\usetikzlibrary{ext.calendar-plus}] +\tikz + \calendar[ + dates=2022-10-01 to 2022-10-31, + week list] + if (week of month=2) [red] + if (calendar week of month'=2) [blue]; +\end{codeexample} +\itemcalendaroption{yesterday}|=|\marg{tests} + This test passes when the previous day passes \meta{tests}. +\itemcalendaroption{week}|=|\meta{num} + This test passes when the current week of the year equals \marg{num}. +\end{itemize} +The shorthands for |d-| and |m-| are slightly changed so that they are +expandable. This makes it possible to use these shorthands inside of \pgfname math. +The shorthands for the week (see section~\ref{calendar:weeknumbering}) +are added. These are +\begin{itemize} +\item |n-| (shortest numerical representation), +\item |n=| (shortest but added horizontal space) and +\item |n0| (leading zero when below 10). +\end{itemize} + +\subsection{Week numbering (ISO~8601)} +\label{calendar:weeknumbering} +\begin{command}{\pgfcalendarjulianyeartoweek\marg{Julian day}\marg{year}\marg{week counter}} + This command calculates the week for the \meta{Julian day} of \meta{year}. + The \meta{week counter} must be a \TeX\space counter. + + The calculation follows the rule of ISO~8601 where the first week has that + year's first Thursday in it. +\end{command} + +Inside of |\pgfcalendar|\indexCommandO\pgfcalendar the command |\pgfcalendarcurrentweek| will be available. +\begin{command}{\pgfcalendarcurrentweek} + This command returns the current week number (always two digits -- use shorthand |n.| + to strip the leading zero). +\end{command} + +Inside of |\ifdate|\indexCommandO\ifdate the command |\pgfcalendarifdateweek| will be available. +\begin{command}{\pgfcalendarifdateweek} + This command returns the week number (always two digits). +\end{command} +\end{multicols} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-intro.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-intro.tex new file mode 100644 index 0000000000..f9468175cb --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-intro.tex @@ -0,0 +1,31 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\part{Introduction} +\begin{multicols}{2} +\section{Usage} +This package is called |tikz-ext|, however, +one can't load it via |\usepackage|.% +\footnote{Except for \texttt{calendar-ext} of section~\ref{sec:calendar}.} +Instead, this package consists of multiple +\pgfname\space and \tikzname\space libraries +which are loaded by either |\usepgflibrary| or |\usetikzlibrary|. + +\section{Why do we need it?} +Since I have been answering questions on +\hyperlink{https://tex.stackexchange.com}{TeX.sx} +I've noticed that some questions come up again and again, +every time with a slightly different approach on how to solve them. + +I don't like reinventing the wheel which is why I've gathered +the solutions of my answers in this package. + +\section{Having problems?} +Don't hesitate to open an issue on GitHub. +\end{multicols} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-calendar-plus.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-calendar-plus.tex new file mode 100644 index 0000000000..bdfd225f3c --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-calendar-plus.tex @@ -0,0 +1,81 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Calendar} +\begin{tikzlibrary}{ext.calendar-plus} + This library extends the \tikzname\space library \referenceLibraryandIndexO{calendar}. + \inspiration{WeekNum-Q,CalCond-Q,CalMath-Q}{WeekNum-A,CalCond-A,CalMath-A} +\end{tikzlibrary} + +\begin{multicols}{2} + +\subsection{Value-keys and nestable \texttt{if} key} + +The values of following keys are originally stored in some macros that are not +accessible by the user. These are now simple value-keys. +The |@|-protected macros are still available, of course. + +\begin{key}{/tikz/day xshift (initially 3ex)} +\end{key} +\begin{key}{/tikz/day yshift (initially 3.5ex)} +\end{key} +\begin{key}{/tikz/month xshift (initially 9ex)} +\end{key} +\begin{key}{/tikz/month yshift (initially 9ex)} +\end{key} + +It is now also possible to nest |/tikz/if| occurrences. +\begin{key}{/tikz/if=|(|\meta{conditions}|)|\meta{code or options}\opt{|else|\meta{else code or options}}} +\end{key} + +\subsection{\pgfname math functions} +\begin{math-function}{weeksinmonthofyear(\mvar{first weekday}, \mvar{month}, \mvar{year})} +\mathcommand + Returns the number of (partial) weeks in the month \mvar{month} of year \mvar{year} + when this month begins on a \mvar{first weekday}. +\end{math-function} +\begin{math-function}{lastdayinmonthofyear(\mvar{month}, \mvar{year})} +\mathcommand + Returns the last day (28, 29, 30 or 31) of month \mvar{month} of year \mvar{year}. +\end{math-function} + +\subsection{Week numbering (ISO~8601)} + +The actual week number algorithm is implemented by the |pgfcalendar-ext| package/module in section~\ref{calendar:weeknumbering}. +\begin{key}{/tikz/week code=\meta{code}} + Works like |/tikz/day code| or |/tikz/month code|, only for weeks.\indexKeyO{day code}\indexKeyO{month code} +\end{key} + +\begin{key}{/tikz/week text=\meta{text}} + Works like |/tikz/day text| or |/tikz/month text|, only for weeks.\indexKeyO{day text}\indexKeyO{month text} +\end{key} + +\begin{stylekey}{/tikz/every week} + Works like |/tikz/every day| or |/tikz/every month|, only for weeks.\indexKeyO{every day}\indexKeyO{every month} +\end{stylekey} + +\begin{stylekey}{/tikz/week label left} + Places the week label to the left of the first day of the month. (For + |week list| and |month list| where a week does not start on a Monday, the + position is chosen ``as if'' the week had started on a Monday -- which is + usually exactly what you want.) + % +\begin{codeexample}[preamble={\usetikzlibrary{ext.calendar-plus}}] +\tikz + \calendar [week list, month label above centered, + dates=2022-07-01 to 2022-07-31, + week label left, + every week/.append style={gray!50!black,font=\sffamily}]; +\end{codeexample} + % +\end{stylekey} + +\end{multicols} +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-misc.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-misc.tex new file mode 100644 index 0000000000..163097e6a1 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-misc.tex @@ -0,0 +1,246 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{And a little bit more} +\begin{tikzlibrary}{ext.misc} + This library adds miscellaneous utilities to \pgfname math, \pgfname\space or \tikzname. + \inspiration{FullArc-Q,ForeachUse-Q}{FullArc-A,ForeachUse-A} +\end{tikzlibrary} + +\subsection{\pgfname math} + +\begin{multicols}{2} +\pgfkeys{/codeexample/every codeexample/.append style={width=3cm}} +\subsubsection{Postfix operator \texttt{R}} + +Similar to |\segments[]| in PSTricks, the postfix operator |R| allows the user +to use an arbitrary number of segments of a circle to be used instead of an angle. + +\begin{key}{/tikz/full arc=\meta{num} (default |{}|)} + The number \meta{num} of segments will be set up. + Using |full arc| with an empty value disables the segmentation and |1R| equals $1^\circ$. + + The given value \meta{num} is evaluated when the key is used and doesn't change when + \meta{num} contains variables that change. +\end{key} +The |R| operator can then be used. +\begin{math-operator}{R}{postfix}{fullarc} + Multiplies \mvar{x} with $\frac{360}{\meta{num}}$. +\end{math-operator} + +\subsubsection{Functions} + +\begin{math-function}{strrepeat("\mvar{Text}", \mvar{x})} +\mathcommand + Returns a string with \mvar{Text} repeated \mvar{x} times. + +\begin{codeexample}[] +\pgfmathparse{strrepeat("foo", 5)} +\pgfmathresult +\end{codeexample} +\end{math-function} + +\begin{math-function}{isInString("\mvar{String}", "\mvar{Text}")} +\mathcommand + Returns |1| (true) if \mvar{Text} contains \mvar{String}, + otherwise |0| (false). + +\begin{codeexample}[] +\pgfmathparse{isInString("foo", "bar")} +\pgfmathresult \ and\ +\pgfmathparse{isInString("foo", "foobar")} +\pgfmathresult +\end{codeexample} +\end{math-function} + +\begin{math-function}{strcat("\mvar{Text A}", "\mvar{Text B}", …)} +\mathcommand + Returns the concatenation of all given parameters. + +\begin{codeexample}[] +\pgfmathparse{strcat("blue!", int(7*3), "!green")} +\pgfmathresult +\end{codeexample} +\end{math-function} + + +\begin{math-function}{isEmpty("\mvar{Text}")} +\mathcommand + Returns |1| (true) if \mvar{Text} is empty, otherwise |0| (false). + % +\begin{codeexample}[] +\pgfmathparse{isEmpty("foo")} \pgfmathresult\ and\ +\pgfmathparse{isEmpty("")} \pgfmathresult\ and\ +\def\emptyText{} +\pgfmathparse{isEmpty("\emptyText")} \pgfmathresult +\end{codeexample} +\end{math-function} + +\begin{math-function}{atanXY(\mvar{x},\mvar{y})} +\mathcommand + Arctangent of $\mvar y\div \mvar x$ in degrees. This also takes into account the quadrant. + This is just a argument-swapped version of |atan2|\indexMathFunctionO{atan2} which makes it easier to use + the |\p| commands of the |calc|\indexLibraryO{calc} library. + % +\begin{codeexample}[] +\pgfmathparse{atanXY(3,4)} \pgfmathresult +\end{codeexample} +\end{math-function} +\begin{math-function}{atanYX(\mvar{y},\mvar{x})} +\mathcommand + Arctangent of $y\div x$ in degrees. This also takes into account the quadrant. +\begin{codeexample}[] +\pgfmathparse{atanYX(4,3)} \pgfmathresult +\end{codeexample} +\end{math-function} + +\subsubsection{Functions: using coordinates} +The following functions can only be used with \pgfname\space and/or \tikzname. +Since the arguments are usually plain text (and not numbers) one has to wrap +them in |"|. +\begin{math-function}{anglebetween("\mvar{p1}", "\mvar{p2}")}\mathcommand + Return the angle between the centers of the nodes \mvar{p1} and \mvar{p2}. +\end{math-function} +\begin{math-function}{qanglebetween("\mvar{p}")}\mathcommand + Return the angle between the origin and the center of the node \mvar{p}. +\end{math-function} +\begin{math-function}{distancebetween("\mvar{p1}", "\mvar{p2}")}\mathcommand + Return the distance (in pt) between the centers of the nodes \mvar{p1} and \mvar{p2}. +\end{math-function} +\begin{math-function}{qdistancebetween("\mvar{p}")}\mathcommand + Return the distance (in pt) between the origin and the center of the node \mvar{p}. +\end{math-function} + +\end{multicols} + +\begin{codeexample}[width=6cm,preamble=\usetikzlibrary{calc,ext.misc,through}] +\begin{tikzpicture} +\path (0,0) coordinate (A) + (0:4) coordinate (B) +(75:4) coordinate (C); +\draw (A) -- (B) -- (C) -- cycle; +\foreach \cnt in {1,...,4}{ + \pgfmathsetmacro\triA{distancebetween("B","C")} + \pgfmathsetmacro\triB{distancebetween("C","A")} + \pgfmathsetmacro\triC{distancebetween("A","B")} + \path (barycentric cs:A=\triA,B=\triB,C=\triC) coordinate (M) + node [draw, circle through=($(A)!(M)!(C)$)] (M) {}; + \draw ($(C)-(A)$) coordinate (vecB) + (M.75-90) coordinate (@) + (intersection of @--[shift=(vecB)]@ and B--C) coordinate (C) -- + (intersection of @--[shift=(vecB)]@ and B--A) coordinate (A);} +\end{tikzpicture} +\end{codeexample} +\pagebreak +\subsection{\pgfname keys} +% +\begin{multicols}{2} +% +\subsubsection{Conditionals} + +\begin{key}{/utils/if=\meta{cond}\meta{true}\opt{\meta{false}}} + This key checks the conditional \meta{cond} and applies the styles \meta{true} + if \meta{cond} is true, otherwise \meta{false}. + \meta{cond} can be anything that \pgfname math understands. + + As a side effect on how \pgfname keys parses argument, the \meta{false} argument is + actually optional. +\end{key} + +The following keys use \TeX' macros |\if|, |\ifx|, |\ifnum| and |\ifdim| for faster +executions. + +\begin{key}{/utils/TeX/if=\meta{token A}\meta{token B}\meta{true}\opt{\meta{false}}} + This key checks via |\if| if \meta{token A} matches \meta{token B} + and applies the styles \meta{true} if it does, otherwise \meta{false}. + + As a side effect on how \pgfname keys parses argument, the \meta{false} argument is + actually optional. +\end{key} + +\begin{key}{/utils/TeX/ifx=\meta{token A}\meta{token B}\meta{true}\opt{\meta{false}}} + As above. +\end{key} + +\begin{key}{/utils/TeX/ifnum=\meta{num cond}\meta{true}\\opt{\meta{false}}} + This key checks |\ifnum|\meta{num cond} + and applies the styles \meta{true} if true, otherwise \meta{false}. + A delimiting |\relax| will be inserted after \meta{num cond}. + + As a side effect on how \pgfname keys parses argument, the \meta{false} argument is + actually optional. +\end{key} + +\begin{key}{/utils/TeX/ifdim=\meta{dim cond}\meta{true}\opt{\meta{false}}} + As above. +\end{key} + +\begin{key}{/utils/TeX/ifempty=\meta{Text}\meta{true}\opt{\meta{false}}} + This checks whether \meta{Text} is empty and applies styles \meta{true} if true, + otherwise \meta{false}. +\end{key} + + +\subsubsection{Handlers} + +While already a lot of values given to keys are evaluated by \pgfname math at some point, +not all of them are. + +\begin{handler}{{.pgfmath}|=|\meta{eval}} + This handler evaluates \meta{eval} before it is handed to the key. +\end{handler} + +\begin{handler}{{.pgfmath int}|=|\meta{eval}} + As above but truncates the result. +\end{handler} + +\begin{handler}{{.pgfmath strcat}|=|\meta{eval}} + As above but uses the |strcat| function. + + In the example below, one could have used the |/pgf/foreach/evaluate| key from |\foreach|. +\begin{codeexample}[width=3.7cm,preamble=\usetikzlibrary{misc}] +\tikz\foreach \i in {0,10,...,100} +\draw[ + line width=+.2cm, + color/.pgfmath strcat={"red!",sqrt(\i)*10,"!blue"} +] + (0,\i/50) -- +(right:3); +\end{codeexample} +\end{handler} + +\begin{handler}{{.List}|=|\meta{\meta{e1}, \meta{e2}, \dots, \meta{en}}} + This handler evaluates the given list with |\foreach| and concatenates the element and + the result is then given to the used key. +\end{handler} +\end{multicols} +\begin{codeexample}[width=6cm,preamble=\usetikzlibrary{fit,ext.misc}] +\begin{tikzpicture}[nodes={draw, dashed, inner sep=+10pt}] + \foreach \point [count=\cnt] in {(0,0), (0,2), (2,0), (2,2), (3,3), (-1,-1)} + \fill \point circle[radius=.1] coordinate (point-\cnt); + \node[gray, fit/.List={(point-1),(point-...),(point-4)}] {}; + \node[red, fit/.List={(point-1),(point-...),(point-5)}] {}; + \node[blue, fit/.List={(point-1),(point-...),(point-6)}] {}; +\end{tikzpicture} +\end{codeexample} + +\subsection{\pgfname for} + +Instead of |\foreach \var in {start, start + delta, ..., end}| one can use +|\foreach \var[use int=start to end step delta]|. + +\begin{key}{/pgf/foreach/use int=\meta{start}|to|\meta{end}\opt{|step|\meta{delta}}} +The values \meta{start}, \meta{end} and \meta{delta} are evaluates by \pgfname math at initialization. +The part |step |\meta{delta} is optional (\meta{delta} = 1). +\end{key} + +\begin{key}{/pgf/foreach/use float=\meta{start}|to|\meta{end}\opt{|step|\meta{delta}}} +Same as above, however the results are not truncated. +\end{key} + +%TODO: edges to and edges through +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-node-families.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-node-families.tex new file mode 100644 index 0000000000..d4b274511c --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-node-families.tex @@ -0,0 +1,124 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\section{Node Families} +\begin{tikzlibrary}{ext.node-families} + With this library the user can instruct multiple nodes to have the same + width, height, text width, text height or text width. + This uses the hook \referenceKeyandIndexO{execute at end picture} to write the nodes' + measurements to the \filetype{aux} file. + + Unfortunately, this does not work with the |external| library.\indexLibraryO{external}% + \footnote{First of all, I can't figure out how to use the \textsc{aux} file during externalization since it gets written to the \textsc{log} instead. + And then there's the question about how \texttt{external} would notice the need to export the picture again until it's stable \dots} + + \inspiration{NodeFam-Q}{NodeFam-A} + +\end{tikzlibrary} + +Before we get to the interesting keys, a common prefix can be set for the families' names. +Initially this is |\pgfpictureid-| so that families of different pictures don't interact. +\begin{key}{/tikz/node family/prefix=\meta{prefix}(initially \string\pgfpictureid-)} +The family names are prefixed with the value of |/tikz/node family/prefix|. +\end{key} + +\subsection{Text Box} +\label{ssec:nf-text} +The following keys~-- when setup, see below~-- work with every shape with one single node part.% +\footnote{Technically, it will also work with shapes with multiple node parts but it will only affect the main node part.} +Initially though, only \referenceShapeandIndexO{circle} and \referenceShapeandIndexO{rectangle} are set up that way. +\begin{key}{/tikz/node family/text height=\meta{name} (initially \{\})} +Nodes with the same \meta{name} will have the same text height. +An empty \meta{name} disables the evaluation by the library. +\end{key} + +\begin{key}{/tikz/node family/text depth=\meta{name} (initially \{\})} +Nodes with the same \meta{name} will have the same text depth. +An empty \meta{name} disables the evaluation by the library. +\end{key} + +\begin{key}{/tikz/node family/text width=\meta{name} (initially \{\})} +Nodes with the same \meta{name} will have the same text width. +An empty \meta{name} disables the evaluation by the library. +\end{key} + +\begin{key}{/tikz/node family/text=\meta{name}} +Sets |text height|, |text depth| and |text width|. +\end{key} + +Since the width of the node's content's box is setup much earlier, +the previous key only extends the width of that box which would make the text +seem as if it where aligned to the left. +With |text width family align| this can changed. +\begin{key}{/tikz/node family/text width align=\meta{alignment}(initially center)} +\meta{alignment} is one of |left|, |center| or |right|. + +\begin{codeexample}[preamble=\usetikzlibrary{positioning,ext.node-families},/tikz/node distance=.5cm] +\tikzexternaldisable % ext.node-families does not work with active externalization +\begin{tikzpicture}[nodes={rectangle, draw, node family={text width=manual, text width align=right}}] +\node (a) {Foo}; +\node[below=of a] (b) {Foobar}; +\end{tikzpicture} +\end{codeexample} +\end{key} + +\begin{key}{/tikz/node family/setup shape=\meta{shape}} +This adds instructions to the \meta{shape}'s definition which +adjust the text box's dimensions according to the family. + +This should be only used once per shape. +\end{key} + +\subsection{Minimum Width/Height} +While the keys of the previous subsection work well enough for nodes of the same shape +(and the same |inner sep|s), for different node shapes the text box dimensions will be used +differently for the node's total dimension. + +For this, the following keys are necessary. +When one of the keys are used the values of |minimum width| and/or |minimum height| are set to |nf_width| or |nf_height| respectively. +\begin{key}{/tikz/node family/width=\meta{name} (initially \{\})} +Nodes with the same \meta{name} will have the same \referenceKeyandIndexO[/pgf/]{minimum width}. +An empty \meta{name} disables the evaluation by the library. +\begin{codeexample}[preamble=\usetikzlibrary{positioning,ext.node-families},/tikz/node distance=.5cm] +\tikzexternaldisable % ext.node-families does not work with active externalization +\begin{tikzpicture}[nodes={rectangle, draw, node family/width=manual}] +\node (a) {Foo}; +\node[below=of a] (b) {Foobar}; +\end{tikzpicture} +\end{codeexample} +\end{key} +\begin{key}{/tikz/node family/height=\meta{name} (initially \{\})} +Nodes with the same \meta{name} will have the same \referenceKeyandIndexO[/pgf/]{minimum height}. +An empty \meta{name} disables the evaluation by the library. +\end{key} +\begin{key}{/tikz/node family/size=\meta{name}} +Sets both |height| and |width|. +\end{key} + +\clearpage +\subsection{More shapes that support the keys \texttt{width} and \texttt{height}} +\begin{tikzlibrary}{ext.node-families.shapes.geometric} + This library adds support for the keys \referenceKeyandIndex[/tikz/node family/]{width} and + \referenceKeyandIndex[/tikz/node family/]{height} for the shapes of + the \pgfname\space library \referenceLibraryandIndexO{shapes.geometric}. + + \inspirationQ{NodeFam-Ellipse} +\end{tikzlibrary} +The shapes are also setup for the keys from subsection~\ref{ssec:nf-text}. + +\begin{codeexample}[width=9cm,preamble=\usetikzlibrary{ext.node-families.shapes.geometric}] +\tikzexternaldisable % ext.node-families does not work with active externalization +\begin{tikzpicture} +\foreach \cnt[count=\Cnt] in {a,...,h} + \node[draw, diamond, node family/text=aTOh] (\cnt) + at (right:\Cnt) {\cnt}; +\draw[help lines] (a.south) -- (h.south) (a.north) -- (h.north) (a.base-|a.west) -- (h.base-|h.east); +\end{tikzpicture} +\end{codeexample} +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-paths.arcto.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-paths.arcto.tex new file mode 100644 index 0000000000..8ed660b3a3 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-paths.arcto.tex @@ -0,0 +1,110 @@ +% !TeX root = tikz-ext-manual.tex +% !TeX spellcheck = en_US +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Arc \emph{to} a point} +\label{library:paths.arcto} + +\begin{tikzlibrary}{ext.paths.arcto} + This library adds the new path operation |arc to| that specifies an arc \emph{to} a point~-- + without the user having to specify any angles. +\end{tikzlibrary} + +\begin{codeexample}[width=.5\linewidth,preamble=\usetikzlibrary{ext.paths.arcto}] +\begin{tikzpicture}[ultra thick,dot/.style={label={#1}}] +\coordinate[dot=below left:$a$] (a) at (0,0); +\coordinate[dot=above right:$b$] (b) at (2,3); +\begin{scope}[ + radius=3, + nodes={ + shape=circle, + fill=white, + fill opacity=.9, + text opacity=1, + inner sep=+0pt, + sloped, + allow upside down + }] +\draw[blue] (a) arc to[] + node[near start] {.25} node {.5} node[near end] {.75} (b); +\draw[red] (a) arc to[clockwise] + node[near start] {.25} node {.5} node[near end] {.75} (b); +\draw[blue!50] (a) arc to[large] + node[near start] {.25} node {.5} node[near end] {.75} (b); +\draw[red!50] (a) arc to[large, clockwise] + node[near start] {.25} node {.5} node[near end] {.75} (b); +\end{scope} + +\fill[radius=2pt] (a) circle[] (b) circle[]; +\end{tikzpicture} +\end{codeexample} + +\begin{pathoperation}{arc to}{\opt{\oarg{options}}\meta{coordinate or cycle}} +When this operation is used, the path gets extended by an arc that goes through +the current point and \meta{coordinate}. + +For two points there exist two circles or four arcs that go through or connect +these two points. Which one of these is constructed is determined by the following +options that can be used inside of \meta{options}. + +\begin{stylekey}{/tikz/arc to/clockwise} + This constructs an arc that goes clockwise. +\end{stylekey} + +\begin{stylekey}{/tikz/arc to/counter clockwise} + This constructs an arc that goes counter clockwise. + + This is the default. +\end{stylekey} + +\begin{stylekey}{/tikz/arc to/large} + This constructs an arc whose angle is larger than $180^\circ$. +\end{stylekey} + +\begin{stylekey}{/tikz/arc to/small} + This constructs an arc whose angle is smaller than $180^\circ$. +\end{stylekey} + +\begin{key}{/tikz/arc to/rotate=\meta{degree}} + Rotates the arc by \meta{degree}. + This is only noticeable when |x radius| and |y radius| are different. +\end{key} + +\begin{key}{/tikz/arc to/x radius=\meta{value}} + This forwards the \meta{value} to \referenceKeyandIndexO{x radius}. + Its \meta{value} is used for the radius of the arc. +\end{key} + +\begin{key}{/tikz/arc to/y radius=\meta{value}} + This forwards the \meta{value} to \referenceKeyandIndexO{y radius}. + Its \meta{value} is used for the radius of the arc. +\end{key} + +\begin{key}{/tikz/arc to/radius=\meta{value}} + This forwards the \meta{value} to both |/tikz/x radius| and |/tikz/y radius|. + Its \meta{value} is used for radius of the arc. +\end{key} + +\begin{stylekey}{/tikz/every arc to} + After |/tikz/every arc| this will also be applied before any \meta{options} are set. +\end{stylekey} + +It should be noted that this uses |\pgfpatharcto| for which the \tikzname\space manual warns:\indexCommandO\pgfpatharcto +\begin{quote}\itshape + The internal computations necessary for this command are numerically very unstable. + In particular, the arc will not always really end at the \meta{target coordinate}, + but may be off by up to several points. + A more precise positioning is currently infeasible due to \TeX's numerical weaknesses. + The only case it works quite nicely is when the resulting angle is a multiple of $90^\circ$. +\end{quote} + +The |arc to| path operation will also work only in the |canvas| coordinate system. +The lengths of the vectors $(1, 0)$ and $(0, 1)$ will be used for the calculation of the radii +but no further consideration is done. +\end{pathoperation} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-paths.ortho.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-paths.ortho.tex new file mode 100644 index 0000000000..ba78f47dcb --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-paths.ortho.tex @@ -0,0 +1,199 @@ +% !TeX root = tikz-ext-manual.tex +% !TeX spellcheck = en_US +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{More Horizontal and Vertical Lines} +\label{library:paths.ortho} + +\begin{tikzlibrary}{ext.paths.ortho} + This library adds new path specifications \verb!|-|!, \verb!-|-! as well as + |r-ud|, |r-du|, |r-lr| and |r-rl|. +\end{tikzlibrary} + +\subsection{Zig-Zag} +Similar to the path operations \verb!|-! and \verb!-|! this library adds\indexPathOperationO{\protect\pgfmanualbar-}\indexPathOperationO{-\protect\pgfmanualbar} +the path operations \verb!|-|! and \verb!-|-!. +{\catcode`\|=12 +\begin{pathoperation}[noindex]{|-|}{\opt{\oarg{options}}\meta{coordinate or cycle}} + \index{---1@\protect\texttt{\protect\pgfmanualbar-\protect\pgfmanualbar} path operation}% + \index{Path operations!---1@\protect\texttt{\protect\pgfmanualbar-\protect\pgfmanualbar}}% + \pgfmanualpdflabel[\catcode`\|=12 ]{|-|}{}% + This operation means ``first vertical, then horizontal and then vertical again''. +\end{pathoperation} +\begin{pathoperation}[noindex]{-|-}{\opt{\oarg{options}}\meta{coordinate or cycle}} + \index{--1@\protect\texttt{-\protect\pgfmanualbar-} path operation}% + \index{Path operations!--1@\protect\texttt{-\protect\pgfmanualbar-}}% + \pgfmanualpdflabel[\catcode`\|=12 ]{-|-}{}% + This operation means ``first horizontal, then vertical and then horizontal again''. +\end{pathoperation} +} +\begin{key}{/tikz/ortho/ratio=\meta{ratio} (initially 0.5)} + This sets the ratio for the middle part of the Zig-Zag connection. + + For values $\meta{ratio} < 0$ and $\meta{ratio} > 1$ the Zig-Zag lines will + look more like Zig-Zig lines. +\begin{codeexample}[preamble=\usetikzlibrary{paths.ortho}] +\begin{tikzpicture}[very thick, rounded corners] +\draw[help lines] (-.25, -1.25) grid (2.25, 1.25); +\draw (0, 0) -|- (2, 1) -- + (2, 0) -|-[ratio=.25] (0,-1) -- cycle; +\end{tikzpicture} +\end{codeexample} +\end{key} +%TODO: hvvh/distance needs fixing, maybe? +\begin{key}{/tikz/ortho/distance=\meta{distance}} + This sets the distance between the start point + and the middle part of the Zig-Zag connection. + + For values $\meta{distance} < 0$ the distance will be used for the target coordinate. +\begin{codeexample}[width=8cm,preamble=\usetikzlibrary{ext.paths.ortho}] +\begin{tikzpicture}[very thick,-latex] +\draw[help lines,-] (-.25, -.25) grid (5.25, 3.25); +\draw (0, 0) -|-[distance= .5cm] ++(2, 1); +\draw (0, 2) -|-[distance=-.5cm] ++(2, 1); + +\tikzset{xshift=3cm} +\draw (2, 1) -|-[distance= .5cm] ++(-2, -1); +\draw (2, 3) -|-[distance=-.5cm] ++(-2, -1); +\end{tikzpicture} +\end{codeexample} +\end{key} +\begin{key}{/tikz/ortho/from center=\opt{\meta{true or false}} (default true)} + When nodes get connected the placement of the middle part of the Zig-Zag + and the Zig-Zig (see below) connections will be calculated from the border + of these nodes. + The middle part of the connections can be calculated from the nodes' center + if this key is set to |true|. +\end{key} + +New timers are setup for both the Zig-Zag and the Zig-Zig connections, +these can be configured through the following keys. +\begin{codeexample}[width=8cm,preamble=\usetikzlibrary{paths.ortho}] +\tikz \draw (0,0) -|- (2,3) + foreach \p in {0.0, 0.25, 0.5, 0.75, 1.0}{ + node [pos=\p] {\p}}; +\end{codeexample} +\begin{key}{/tikz/ortho/spacing=\meta{number} (initially 4)} + Unless $\meta{number} = 0$ is set + \begin{itemize} + \item |pos = 0| will be at the start,\indexKeyO{pos} + \item |pos = 1| will be at the end, + \item |pos = |$\frac{1}{\meta{number}}$ will be at the first kink, + \item |pos = |$\frac{\meta{number}-1}{\meta{number}}$ will be at the second kink and + \item |pos = .5| will be in the middle of the middle part of the connection. + \end{itemize} + + If $\meta{number} = 0$ then + \begin{itemize} + \item |pos = -1| will be at the start, + \item |pos = 2| will be at the end, + \item |pos = 0| will be at the first kink, + \item |pos = 1| will be at the second kink and + \item |pos = .5| will still be in the middle of the middle part of the connection. + \end{itemize} +\end{key} +\begin{key}{/tikz/ortho/middle 0 to 1} + This is an alias for |spacing = 0|. +\end{key} + +\subsection{Zig-Zig} +\begin{pathoperation}{r-ud}{\opt{\oarg{options}}\meta{coordinate or cycle}} + This operation means ``first up, then horizontal and then down''. + \begin{key}{/tikz/ortho/ud distance=\meta{length} (initially .5cm)} + This sets the distance between the start and the horizontal line to \meta{length}. + \end{key} +\end{pathoperation} +\begin{pathoperation}{r-du}{\opt{\oarg{options}}\meta{coordinate or cycle}} + This operation means ``first down, then horizontal and then up''. + \begin{key}{/tikz/ortho/du distance=\meta{length} (initially .5cm)} + This sets the distance between the start and the horizontal line to \meta{length}. + \end{key} +\end{pathoperation} +\begin{pathoperation}{r-lr}{\opt{\oarg{options}}\meta{coordinate or cycle}} + This operation means ``left down, then vertical and then right''. + \begin{key}{/tikz/ortho/lr distance=\meta{length} (initially .5cm)} + This sets the distance between the start and the vertical line to \meta{length}. + \end{key} +\end{pathoperation} +\begin{pathoperation}{r-rl}{\opt{\oarg{options}}\meta{coordinate or cycle}} + This operation means ``first right, then vertical and then down''. + \begin{key}{/tikz/ortho/rl distance=\meta{length} (initially .5cm)} + This sets the distance between the start and the vertical line to \meta{length}. + \end{key} +\end{pathoperation} + +All distances can be set with on key. +\begin{key}{/tikz/ortho/udlr distance=\meta{length}} + Sets all the previous distances to the same value \meta{length}. +\end{key} + +\subsection{Even more Horizontal and Vertical Lines} + +The following keys can be used to access vertical and horizontal line path operations. +\begin{stylekey}{/tikz/horizontal vertical} + This installs \verb!to path = -| (\tikztotarget) \tikztonodes!\indexKeyO{to path} + that can be used with the path operations |to| or |edge|. +\end{stylekey} +\begin{stylekey}{/tikz/vertical horizontal} + This installs \verb!to path = |- (\tikztotarget) \tikztonodes! + that can be used with the path operations |to| or |edge|. +\end{stylekey} +\begin{stylekey}{/tikz/horizontal vertical horizontal} + This installs \verb!to path = -|- (\tikztotarget) \tikztonodes! + that can be used with the path operations |to| or |edge|. +\end{stylekey} +\begin{stylekey}{/tikz/vertical horizontal vertical} + This installs \verb!to path = |-| (\tikztotarget) \tikztonodes! + that can be used with the path operations |to| or |edge|. +\end{stylekey} + +When connecting rectangular nodes, these keys could be useful as well. +They all need to be given to a |to| or |edge| path operation. +\begin{stylekey}{/tikz/only vertical second=\opt{\meta{length}} (default 0pt)} +This draws a vertical line from the start point to the target point so that +it connects to the target point in the center (or at its border in case it is a node). + +The optional \meta{length} can be used to shift the line orthogonally to its direction. +\end{stylekey} +\begin{stylekey}{/tikz/only horizontal second=\opt{\meta{length}} (default 0pt)} +This draws a horizontal line from the start point to the target point so that +it connects to the target point in the center (or at its border in case it is a node). + +The optional \meta{length} can be used to shift the line orthogonally to its direction. +\end{stylekey} +\begin{stylekey}{/tikz/only vertical first=\opt{\meta{length}} (default 0pt)} +This draws a vertical line from the start point to the target point so that +it connects to the start point in the center (or at its border in case it is a node). + +The optional \meta{length} can be used to shift the line orthogonally to its direction. +\end{stylekey} +\begin{stylekey}{/tikz/only horizontal first=\opt{\meta{length}} (default 0pt)} +This draws a horizontal line from the start point to the target point so that +it connects to the start point in the center (or at its border in case it is a node). + +The optional \meta{length} can be used to shift the line orthogonally to its direction. +\end{stylekey} + +\pagebreak +Since all previous key are rather cumbersome, one can install shortcuts for these. +\begin{stylekey}{/tikz/ortho/install shortcuts} +Installs the following shortcuts:\\ +{\ttfamily +\begin{tabular}{l@{\hspace{.5em}${}\to{}$\hspace{.5em}}l} + \pgfmanualbar- & vertical horizontal \\ + -\pgfmanualbar & horizontal vertical \\ + -\pgfmanualbar- & horizontal vertical horizontal \\ + \pgfmanualbar-\pgfmanualbar & vertical horizontal vertical \\ + \pgfmanualbar* & only vertical first \\ + *\pgfmanualbar & only vertical second \\ + \pgfmanualbar* & only vertical first \\ + *\pgfmanualbar & only vertical second +\end{tabular} +} +\end{stylekey} diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-paths.timer.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-paths.timer.tex new file mode 100644 index 0000000000..595a647917 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-paths.timer.tex @@ -0,0 +1,92 @@ +% !TeX root = tikz-ext-manual.tex +% !TeX spellcheck = en_US +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Extending the Path Timers} +\label{library:timer} + +\begin{tikzlibrary}{ext.paths.timer} + This library adds timers to the path specifications |rectangle|, |parabola|, |sin| and |cos|. + + \inspiration{TimerRect-Q,TimerPara-Q}{TimerRect-A,TimerPara-A} +\end{tikzlibrary} + +In \tikzname, the path specification |rectangle|, |parabola|, |sin| and |cos| do not provide +their own timer, i.\,e. a node placing algorithm that is dependent on the actual path. +For |rectangle| the timer of the straight line between the rectangle's corners is used, for +the other paths, nodes, coordinates, pics, etc. are placed on the last coordinate. + +This library allows this. + +\subsection{Rectangle} +\indexPathOperationO{rectangle} + +For the |rectangle| path operator, the timer starts with |pos = 0| (= |at start|) from\indexKeyO{pos} +the starting coordinate in a counter-clockwise direction along the rectangle. +The corners will be at positions 0.0, 0.25, 0.5, 0.75 and 1.0. + +\begin{codeexample}[width=10cm,preamble=\usetikzlibrary{ext.paths.timer}] +\begin{tikzpicture}[scale=2, every pin edge/.style={latex-, gray}] +\coordinate [label=above right:Target] (A) at (0,0); +\coordinate [label=below left:Start] (B) at (1,2); +\draw[->, help lines] ([shift=(50:.3 and .75)] .5,1) + arc[start angle=50, delta angle=340, x radius=.3, y radius=.75]; +\draw (B) rectangle (A) + foreach \pos/\ang in {at start/60, very near start/90, near start/180, pos=.375/180, + midway/180, pos=.625/270, near end/0, very near end/0, at end/0}{ + node[pin=\ang:\pos, style/.expanded=\pos]{}}; +\end{tikzpicture} +\end{codeexample} + +\subsection{Parabola} +\indexPathOperationO{parabola}% + +For the |parabola| path operator the timer is similar to the |.. controls ..| operator. + +The position 0.5 will lie at the |bend|. +\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{ext.paths.timer}] +\begin{tikzpicture} +\draw[help lines] (-2.25, -1.25) grid (2.25, 3.25); +\draw ( 2,-1) parabola bend (0,0) (-1,3); +\draw[ultra thick] (-2,-1) parabola bend (0,0) ( 1,3) + foreach \pos in {1,...,4,6,7,...,9}{ + node[ + pos=.\pos, sloped, fill=white, font=\small, inner sep=+0pt + ] {\pos} + }; +\end{tikzpicture} +\end{codeexample} + +If no |bend| is specified half the positions will collapse into one end of the curve. + +\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{ext.paths.timer}] +\begin{tikzpicture}[every pin edge/.style={latex-, shorten <=1pt, gray}] +\draw (-2,-2) parabola (1,0) + foreach \pos in {0, 1, ..., 10} { + node [pos=\pos/10, pin={[anchor=-18*\pos+90]-18*\pos+270:\pos}]{} + }; +\end{tikzpicture} +\end{codeexample} + +\subsection{Sine/Cosine} +\indexPathOperationO{sin}\indexPathOperationO{cos}% + +The |sin| and |cos| path operators also allow placing of nodes along their paths. + +\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{ext.paths.timer}] +\begin{tikzpicture}[mark nodes on line/.style={insert path={ + foreach \pos in {1, ..., 9} {node[ + sloped, fill=white, font=\small, inner sep=+0pt, pos=\pos/10] {\pos}}}}] +\draw[help lines] (-2.1,-2.1) grid (2.1,0.1); +\draw (-2,-2) sin (1,0) [mark nodes on line]; +\draw[shift=(0:1)](-2,-2) cos (1,0) [mark nodes on line]; +\end{tikzpicture} +\end{codeexample} + +\endinput diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-patterns.images.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-patterns.images.tex new file mode 100644 index 0000000000..c3c38a8517 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-patterns.images.tex @@ -0,0 +1,52 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\clearpage +\section{Using Images as a Pattern} +\label{library:patterns.images} + +\begin{tikzlibrary}{ext.patterns.images} + This library allows to use an image to be used as a repeating pattern for a path. + + \inspiration{Pattern-Q}{Pattern-A} +\end{tikzlibrary} + +With this library arbitrary images (or indeed PDF documents) can be used as +a repeating pattern for the background of a path. + +This is a two-step process: +\begin{enumerate} +\item Declaring an image as an ``image-pattern''. +\item Using the ``image-pattern''. +\end{enumerate} + +\begin{command}{\pgfsetupimageaspattern\oarg{options}\marg{name}\marg{image}} +\end{command} + +\begin{key}{/tikz/image as pattern=\meta{options} (default \{\})} + +\begin{codeexample}[preamble=\usetikzlibrary{ext.patterns.images,shapes.geometric}] +\pgfsetupimageaspattern[width=.5cm]{grid}{example-image-1x1} +\tikz \node[star, minimum size=3cm, draw, + image as pattern={name=grid,options={left, bottom, y=-.5cm, rotate=45}}] {}; +\end{codeexample} +\end{key} + +\begin{key}{/tikz/image as pattern/name=\meta{name}} +Specifies the name of the ``image-pattern'' to be used. +\end{key} + +\begin{stylekey}{/tikz/image as pattern/option} +Options that will be used by the internal |\pgftext|,\indexCommandO{\pgftext} +only keys from |/pgf/text| should be used.\indexKeyO[/pgf/]{text} +\end{stylekey} + +\begin{stylekey}{/tikz/image as pattern/options=\meta{style}} +Appends style |/tikz/image as pattern/option|. +\end{stylekey} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-positioning-plus.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-positioning-plus.tex new file mode 100644 index 0000000000..56c81376aa --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-positioning-plus.tex @@ -0,0 +1,183 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\clearpage +\section{Positioning Plus} +\label{library:positioning-plus} +\tikzsetnextfilename{posplus} +\begin{tikzlibrary}{ext.positioning-plus} + With the help of the \referenceLibraryandIndexO{positioning} and the \referenceLibraryandIndexO{fit} library this extends the placement of nodes. +\end{tikzlibrary} + +\subsection{Useful corner anchors} +The anchors |corner north east|, |corner north west|, |corner south west| and |corner south east| +are defined as ``generic anchors'', i.\,e. they are defined for all shapes. +This is mostly useful for the placement of circular shapes. +\begin{stylekey}{/tikz/corner above left=\opt{\meta{specification}} (default 0pt)} + Similar as \referenceKeyandIndexO{above left} of the \tikzname\space library |positioning| + but uses the |corner north west| anchor. +\end{stylekey} +\begin{stylekey}{/tikz/corner below left=\opt{\meta{specification}} (default 0pt)} + Similar as \referenceKeyandIndexO{below left} of the \tikzname\space library |positioning| + but uses the |corner south west| anchor. +\end{stylekey} +\begin{stylekey}{/tikz/corner above right=\opt{\meta{specification}} (default 0pt)} + Similar as \referenceKeyandIndexO{above right} of the \tikzname\space library |positioning| + but uses the |corner north east| anchor. +\end{stylekey} +\begin{stylekey}{/tikz/corner below right=\opt{\meta{specification}} (default 0pt)} + Similar as \referenceKeyandIndexO{below right} of the \tikzname\space library |positioning| + but uses the |corner south east| anchor. +\end{stylekey} + +\begin{codeexample}[width=.6\linewidth,preamble=\usetikzlibrary{ext.positioning-plus}] +\Huge +\begin{tikzpicture} +\node[name=s,shape=circle,shape example] + {Circle\vrule width 1pt height 2cm}; +\foreach \anchor/\placement in { + north west/above left, north/above, north east/above right, + west/left, center/above, east/right, + mid west/right, mid/above, mid east/left, + base west/left, base/below, base east/right, + south west/below left, south/below, south east/below right, + text/left, 10/right, 130/above} + \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} + node[\placement] {\scriptsize\texttt{(s.\anchor)}}; +\draw (s.corner north west) rectangle (s.corner south east); +\foreach \anchor/\placement in { + corner north west/above left, corner north east/above right, + corner south west/below left, corner south east/below right} + \draw[red,shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} + node[\placement] {\scriptsize\texttt{(s.\anchor)}}; +\end{tikzpicture} +\end{codeexample} + +\subsection{Useful placement keys for vertical and horizontal alignment} +\begin{stylekey}{/tikz/north left=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{left} but aligns the nodes at their |north| border. + + This is basically the same as |left=of reference.north west, anchor=north east|. + % +\begin{codeexample}[preamble=\usetikzlibrary{ext.positioning-plus}] +\begin{tikzpicture}[nodes=draw] +\node[minimum height=2cm] (a) {}; +\node[minimum height=3cm, north right=of a] {}; +\end{tikzpicture} +\end{codeexample} +\end{stylekey} +\begin{stylekey}{/tikz/north right=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{right} but aligns the nodes at their |north| border. + + This is basically the same as |left=of reference.north east, anchor=north west|. +\end{stylekey} +\begin{stylekey}{/tikz/south left=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{left} but aligns the nodes at their |south| border. + + This is basically the same as |left=of reference.south west, anchor=south east|. +\end{stylekey} +\begin{stylekey}{/tikz/south right=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{right} but aligns the nodes at their |south| border. + + This is basically the same as |left=of reference.south east, anchor=south west|. +\end{stylekey} +\begin{stylekey}{/tikz/west above=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{above} but aligns the nodes at their |west| border. + + This is basically the same as |left=of reference.north west, anchor=south west|. +\end{stylekey} +\begin{stylekey}{/tikz/west below=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{below} but aligns the nodes at their |west| border. + + This is basically the same as |left=of reference.south west, anchor=north west|. +\end{stylekey} +\begin{stylekey}{/tikz/east above=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{above} but aligns the nodes at their |east| border. + + This is basically the same as |left=of reference.north east, anchor=south east|. +\end{stylekey} +\begin{stylekey}{/tikz/east below=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{below} but aligns the nodes at their |east| border. + + This is basically the same as |left=of reference.south east, anchor=north east|. +\end{stylekey} + +The same exist for the recently introduces corner anchors, too. +\begin{stylekey}{/tikz/corner north left=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/north left| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner north right=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/north right| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner south left=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/south left| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner south right=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/south right| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner west above=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/west above| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner west below=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/west below| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner east above=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/east above| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner east below=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/east below| but uses the new corner anchors. +\end{stylekey} + +While the \meta{specification} of all these keys still accept the same form as with \tikzname, +the |ext.positioning-plus| library extends this even more. + +The specification after |of| can contain a list of coordinates +(like the |fit| key of the |fit| library). +This means that the new node will be placed in relation to a rectangular bounding box +that fits around all this nodes in the list. + +If this list is prefixed with \verb!|!, |-| or |+|, +the new node will also have the same height (\verb!|!), +the same width (|-|) or both as this bounding box. + +\begin{codeexample}[preamble=\usetikzlibrary{ext.positioning-plus}] +\begin{tikzpicture}[nodes=draw] +\node (A) {A}; +\node[below=of A] (BCD) {BCD}; +\node[right=of |(A)(BCD)] (c) {}; +\node[below=.5:of -(A)(BCD)] (d) {}; +\draw[help lines] (BCD.south west) -- (c.south east) + (BCD.north east) -- (d.south east); +\end{tikzpicture} +\end{codeexample} + +This functionality is also available without the placement: +\begin{stylekey}{/tikz/fit bounding box=\meta{list of coordinates}} + Creates a rectangular node with the name |fit bounding box| that encompasses + the \meta{list of coordinates}. +\end{stylekey} +\begin{stylekey}{/tikz/span vertical=\meta{list of coordinates}} + Creates a rectangular node with the name |fit bounding box| that encompasses + the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf]{minimum height} to + the height of this bounding box. +\end{stylekey} +\begin{stylekey}{/tikz/span horizontal=\meta{list of coordinates}} + Creates a rectangular node with the name |fit bounding box| that encompasses + the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf]{minimum width} to + the width of this bounding box. +\end{stylekey} +\begin{stylekey}{/tikz/span=\meta{list of coordinates}} + Is a combination of |/tikz/span vertical| and |/tikz/span horizontal|. +\end{stylekey} + +As you maybe noticed in the example above, the \meta{specification} also allows a prefix +delimited by |:| which the |node distance| will be multiplied to with for the placement.% +\footnote{This is probably more useful when \referenceKeyandIndexO{on grid} is used.} + +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-topaths.arcthrough.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-topaths.arcthrough.tex new file mode 100644 index 0000000000..1d9e5ba9df --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-topaths.arcthrough.tex @@ -0,0 +1,63 @@ +% !TeX root = tikz-ext-manual.tex +% !TeX spellcheck = en_US +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Arcs through Three Points} +\label{library:topaths.arcthrough} +\begin{tikzlibrary}{ext.topaths.arcthrough} + This library allows to use an arc defined by three points. +\end{tikzlibrary} + +\begin{codeexample}[width=10cm,preamble=\usetikzlibrary{ext.topaths.arcthrough}] +\begin{tikzpicture} +\coordinate[label=above right:$A$] (A) at ( 3, 1); +\coordinate[label=above:$B$] (B) at ( 1, 2); +\coordinate[label=below left:$C$] (C) at (-2,-2); + +\draw[ultra thick, draw=green, fill=green!50] + (B) to[arc through={clockwise,(A)}] (C) + -- (arc through center) -- cycle; +\draw[ultra thick, draw=blue, fill=blue!50] + (B) to[arc through=(A)] (C) + -- (arc through center) -- cycle; + +\foreach \p in {A,B,C, arc through center} \fill[red] (\p) circle[radius=2pt]; +\end{tikzpicture} +\end{codeexample} + +This can only by used for circles in the |canvas| coordinate system. + +\begin{multicols}{2} +\begin{key}{/tikz/arc through/through=\meta{coordinate} (initially {(0,0)})} + The coordinate on the circle that defines~-- together with the + starting and target point~-- a circle. +\end{key} + +\begin{key}{/tikz/arc through/center suffix=\meta{suffix} (initially {})} + The |arc through| will define a coordinate named |arc through center|\meta{suffix} + so that it can be referenced later. +\end{key} + +\begin{key}{/tikz/arc through/clockwise} + The resulting arc will go clockwise from the starting point to the target point. + This will not necessarily go through the |through| point. +\end{key} + +\begin{key}{/tikz/arc through/counter clockwise} + The resulting arc will go counter clockwise from the starting point to the target point. + This will not necessarily go through the |through| point. +\end{key} + +\begin{key}{/tikz/arc through=\meta{key-value}} + This key should be used with |to|\indexPathOperationO{to} or |edge|\indexPathOperationO{edge}. + A parameter other than |center suffix|, |clockwise| or |counter clockwise| will + be assumed to be the |through| coordinate. +\end{key} +\end{multicols} +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-trans.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-trans.tex new file mode 100644 index 0000000000..97011bc4d0 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-library-trans.tex @@ -0,0 +1,136 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\clearpage +\section{Mirror, Mirror on the Wall} +\label{library:mirror} + +\begin{tikzlibrary}{ext.transformations.mirror} + This library adds more transformations to \tikzname. +\end{tikzlibrary} + +As explained in section~\ref{pgflibrary:transformations}, there are two approaches to setting a mirror transformation. +As with the commands in \pgfname, we'll be using a lowercase |m| for the reflection matrix and an uppercase |M| for the built-in approach. + +\subsection{Using the reflection matrix} + +\begin{codeexample}[width=.4\linewidth,preamble=\usetikzlibrary{shapes.geometric,ext.transformations.mirror}] +\begin{tikzpicture}[line join=round, thick, reg poly/.style={ + shape=regular polygon, regular polygon sides={#1}}] +\node[reg poly=5, minimum size=+2cm, draw, very thick] (a) {}; +\foreach \i[evaluate={\col=(\i-1)/.04}] in {1,...,5} + \node [mirror=(a.corner \i)--(a.side \i), transform shape, + reg poly=5, minimum size=+2cm, draw=red!\col!blue] {}; +\end{tikzpicture} +\end{codeexample} + +\begin{key}{/tikz/xmirror=\meta{value or coordinate} (default 0pt)} + Sets up a transformation that mirrors along a horizontal line that goes through point $(\text{\meta{value}}, 0)$ or \meta{coordinate}. + +\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25); +\draw[xmirror=(m),-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{key} + +\begin{key}{/tikz/ymirror=\meta{value or coordinate} (default 0pt)} + Sets up a transformation that mirrors along a vertical line that goes through point $(0, \text{\meta{value}})$ or \meta{coordinate}. +\end{key} + + +\begin{key}{/tikz/mirror x=\meta{coordinate} (default {(0,0)})} + Similar to |/tikz/xmirror|, this however uses the |xyz| coordinate system instead of the |canvas| system. +\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}] +\begin{tikzpicture}[x=.5cm, y=(45:1cm)] + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25); + +\draw[ xmirror=(m), -latex, red, dotted] (0,0) .. controls (.5,1) .. (1,1); +\draw[mirror x=(m), -latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{key} + +\begin{key}{/tikz/mirror y=\meta{coordinate} (default {(0,0)})} + Similar to |/tikz/ymirror|, this however uses the |xyz| coordinate system instead of the |canvas| system. +\end{key} + + +\begin{key}{/tikz/mirror=\meta{point A}|--|\meta{point B}} + Sets up a transformation that mirrors along a line that goes through \meta{point A} and \meta{point B}. + + When only \meta{point A} is given that line goes through \meta{point A} and the origin. +\end{key} + +\subsection{Using built-in transformations} + +\begin{codeexample}[width=.4\linewidth,preamble=\usetikzlibrary{shapes.geometric,ext.transformations.mirror}] +\begin{tikzpicture}[line join=round, thick, reg poly/.style={ + shape=regular polygon, regular polygon sides={#1}}] +\node[reg poly=5, minimum size=+2cm, draw, very thick] (a) {}; +\foreach \i[evaluate={\col=(\i-1)/.04}] in {1,...,5} + \node [Mirror=(a.corner \i)--(a.side \i), transform shape, + reg poly=5, minimum size=+2cm, draw=red!\col!blue] {}; +\end{tikzpicture} +\end{codeexample} + +\begin{key}{/tikz/xMirror=\meta{value or coordinate} (default 0pt)} + Sets up a transformation that mirrors along a horizontal line that goes through point $(\text{\meta{value}}, 0)$ or \meta{coordinate}. + +\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25); +\draw[xMirror=(m),-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{key} + +\begin{key}{/tikz/yMirror=\meta{value or coordinate} (default 0pt)} + Sets up a transformation that mirrors along a vertical line that goes through point $(0, \text{\meta{value}})$ or \meta{coordinate}. +\end{key} + + +\begin{key}{/tikz/Mirror x=\meta{coordinate} (default {(0,0)})} + Similar to |/tikz/xMirror|, this however uses the |xyz| coordinate system instead of the |canvas| system. +\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}] +\begin{tikzpicture}[x=.5cm, y=(45:1cm)] + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25); + +\draw[ xMirror=(m), -latex, red, dotted] (0,0) .. controls (.5,1) .. (1,1); +\draw[Mirror x=(m), -latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{key} + +\begin{key}{/tikz/Mirror y=\meta{coordinate} (default {(0,0)})} + Similar to |/tikz/yMirror|, this however uses the |xyz| coordinate system instead of the |canvas| system. +\end{key} + + +\begin{key}{/tikz/Mirror=\meta{point A}\opt{|--|\meta{point B}}} + Sets up a transformation that mirrors along a line that goes through \meta{point A} and \meta{point B}. + + When only \meta{point A} is given that line goes through \meta{point A} and the origin. +\end{key} + +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-main-body.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-main-body.tex new file mode 100644 index 0000000000..fd071e009e --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-main-body.tex @@ -0,0 +1,228 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\newcommand*\tikzextname{Ti\textit kZ-Extensions} +\newcommand*\tikzextversion{0.4} +\begin{document} +{\colorlet{blue}{black}% links shall be black +\title{\bfseries The \tikzextname\space Package\\ + \large Manual for version \tikzextversion\\[1mm] +\large\href{https://github.com/Qrrbrbirlbel/tikz-extensions} + {\texttt{https://github.com/Qrrbrbirlbel/tikz-extensions}} +\author{Qrrbrbirlbel}} + +\maketitle +\label{table-of-contents} + +\tableofcontents +} +\include{tikz-ext-manual-en-intro} + +\part{\tikzname\space Libraries} +\label{part:tikz} + +These libraries only work with \tikzname. +\vspace{1em} +\begin{center}\tikzsetnextfilename{main-cover} +\begin{tikzpicture}[ + very thick, + scale=2.7, + grow cyclic, + level distance=1cm, + level/.style={ + level distance/.expanded=\ifnum#1>1 \tikzleveldistance/1.5\else\tikzleveldistance\fi, + nodes/.expanded={\ifodd#1 fill\else fill=none\fi} + }, + level 1/.style={sibling angle=120}, + level 2/.style={sibling angle=90}, + level 3/.style={sibling angle=90}, + level 4/.style={sibling angle=45}, + nodes={circle,draw,inner sep=+0pt, minimum size=+5pt}, + ] +\path[rotate=30] + node {} + child foreach \cntI in {1,...,3} { + node {} + child foreach \cntII in {1,...,2} { + node {} + child foreach \cntIII in {1,...,2} { + node {} + child foreach \cntIV in {1,...,2} { + node {} + child foreach \cntV in {1,...,2} {} + } + } + } + }; +\end{tikzpicture} +\end{center} + +\tikzsetfigurename{calendar-plus} \include{tikz-ext-manual-en-library-calendar-plus} +\tikzsetfigurename{node-families} \include{tikz-ext-manual-en-library-node-families} +\tikzsetfigurename{paths.arcto} \include{tikz-ext-manual-en-library-paths.arcto} +\tikzsetfigurename{paths.ortho} \include{tikz-ext-manual-en-library-paths.ortho} +\tikzsetfigurename{paths.timer} \include{tikz-ext-manual-en-library-paths.timer} +\tikzsetfigurename{patterns.images} \include{tikz-ext-manual-en-library-patterns.images} +\tikzsetfigurename{positioning-plus} +\include{tikz-ext-manual-en-library-positioning-plus} +\tikzsetfigurename{topaths.arcthrough} +\include{tikz-ext-manual-en-library-topaths.arcthrough} +\tikzsetfigurename{trans} +\include{tikz-ext-manual-en-library-trans} + +\part{\pgfname\space Libraries} +\label{part:pgf} +These libraries (should) work with both \pgfname\space and \tikzname. + +\begin{center}\tikzsetnextfilename{main-graph} +\begin{codeexample}[width=10cm,preamble=% + \usetikzlibrary{graphs,graphdrawing,ext.misc} \usegdlibrary{force}] +\tikzset{ + mynode/.style={ + circle, minimum size=10mm, draw, densely dashdotted, thick, + decide color/.expand once=#1}, + decide color/.style 2 args={ + /utils/TeX/if=c#1 + {/utils/TeX/ifnum={#2<5}{bluelight}{bluedark}} + {/utils/TeX/ifnum={#2<8}{light}{dark}}}, + light/.style={fill=gray!20}, bluelight/.style={fill=blue!10}, + dark/.style ={fill=gray!60}, bluedark/.style ={fill=blue!30}} +\tikz\graph[ + spring electrical layout, vertical=c2 to p13, + node distance=1.5cm, typeset=$n_{\tikzgraphnodetext}$, + nodes={mynode=\tikzgraphnodetext}] { + % outer ring + c2 -- {p1, p11, p6}; + p1 -- {p8, c6, p11}; + p8 -- {p3, p10, c6}; + p3 -- {p13, p15, p10}; + p13 -- {p15, c7}; + c7 -- {c3, c4, p15}; + c3 -- {p14, c4}; + p14 -- {p7, c4}; + p7 -- {p9, p2, c4}; + p9 -- {c5, p12, p2}; + c5 -- {c1, p4, p12}; + c1 -- {p6, p4}; + p6 -- {p11, p4}; + % inner ring + p11 -- {c6, p12, p4}; + p5 -- {c6 -- {p10, p12}, p10 -- p15, p15 -- c4, c4 -- p2, p2 -- p12, p12 -- p4}; +}; +\end{codeexample} +\end{center} + +\tikzsetfigurename{PGF.trans}\include{tikz-ext-manual-en-pgf-trans} +\tikzsetfigurename{PGF.shapes}% +\include{tikz-ext-manual-en-pgf-shapes-circlearrow} +\include{tikz-ext-manual-en-pgf-shapes-circlecrosssplit} +\include{tikz-ext-manual-en-pgf-shapes-heatmark} +\include{tikz-ext-manual-en-pgf-shapes-rectround} +\include{tikz-ext-manual-en-pgf-shapes-superellipse} +\part{Utilities} + +\label{part:misc} +\vfill\tikzsetnextfilename{main-misc} +\begin{codeexample}[width=6cm, preamble=\usetikzlibrary{ext.misc}] +\begin{tikzpicture}[ + declare function={bigR(\n)=smallR+.05*\n;}, + declare constant={smallR=1; segments=20;}, + full arc=segments] +\foreach \iN[evaluate={\endRadius=bigR(\iN+1);}, use int=0 to segments-1] + \filldraw[fill=gray!50] (\iN R:\endRadius) + arc [radius=\endRadius, start angle=\iN R, delta angle=+1R] -- (\iN R+1R:smallR) + arc [radius=smallR, end angle=\iN R, delta angle=-1R] -- cycle; + +\node {$\phi^2$}; +\node at (north west:{sqrt 2 * bigR(segments/2)}) {$\{\Omega\}_{i=1}^n$}; +\node[rotate=-.5R, right] at (-.5R: bigR segments) {$\partial \varphi$}; + +\tikzset{yshift=-5cm, declare constant={segments=25;}, full arc=segments} +\filldraw[fill=gray!50] (right:smallR) + \foreach \iN[evaluate={\endRadius=bigR(\iN+1);}, use int=0 to segments-1] { + -- (\iN R:\endRadius) arc[radius=\endRadius, start angle=\iN R, delta angle=1R]} + -- (right:smallR) arc[radius=smallR, start angle=0, delta angle=-360]; + +\node {$\phi^2$}; +\node at (north west:{sqrt 2 * bigR(segments/2)}) {$\{\Omega\}_{i=1}^n$}; +\node[rotate=-.5R, right] at (-.5R: bigR segments) {$\partial \varphi$}; +\end{tikzpicture} +\end{codeexample} +\vfill + +\tikzsetfigurename{misc.calendar}\include{tikz-ext-manual-en-calendar} +\tikzsetfigurename{misc.misc}\include{tikz-ext-manual-en-library-misc} + +%%% END +\newcommand*{\addTikz}[1]{Added \tikzname\space library \texttt{ext.#1}.} +\newcommand*{\addPGF}[1]{Added \pgfname\space library \texttt{ext.#1}.} +\newcommand*{\addShape}[2][]{Added shape \texttt{\ifx\\#1\\#2\else#1\fi}\\(\pgfname\space library \texttt{ext.shapes.#2}).} +\part{Changelog, Index \& References} +\section*{Changelog}\addcontentsline{toc}{section}{Changelog} +\begin{multicols}{2}\raggedright +\noindent +Version 0.4 +\begin{itemize} +\item CTAN version of 0.3.1 +\end{itemize} +Version 0.3.1 +\begin{itemize} +\item Fixed |ext.paths.ortho| keys |only vertical first| and |only horizontal first|. +\item Moved all (except the |to path|s) to namespace |/tikz/ortho|. + |/tikz/hvvh| and |/tikz/udlr| are considered deprecated. +\item Fixed |\pgfcalendarjulianyeartoweek|. +\item Added more calendar tests. +\item Added directory structure. +\end{itemize} +Version 0.3 +\begin{itemize} +\item \addShape[circle arrow]{circlearrow} +\item \addShape[circle cross split]{circlecrosssplit} +\item \addShape{heatmark} +\item \addShape[rectangle with rounded corners]{rectangleroundedcorners} +\item \addShape{superellipse} +\item \addTikz{node-families.shapes.geometric} +\item Fixed |ext.node-families|' key |size|. +\item Renamed internal macros to use custom namespace starting with |\tikzext@|. +\item Added some references. +\end{itemize} +Version 0.2 +\begin{itemize} +\item \addTikz{positioning-plus} +\item \addTikz{node-families} +\end{itemize} +Version 0.1 +\begin{itemize} +\item \addTikz{calendar-plus} +\item \addTikz{misc} +\item \addTikz{paths.arcto} +\item \addTikz{paths.ortho} +\item \addTikz{paths.timer} +\item \addTikz{patterns.images} +\item \addTikz{topaths.arcthrough} +\item \addTikz{transformations.mirror} +\item \addPGF{transformations.mirror} +\end{itemize} +\end{multicols} +\printindex + +\makeatletter +\def\url#1{% + \in@{/16595}{#1}% + \ifin@ + \hyper@linkurl{\expandafter\Hurl\expandafter{\strip@url#1\relax}}{#1}% + \else + \hyper@linkurl{\Hurl{#1}}{#1}% + \fi +} +\def\strip@url#1/16595\relax{#1} +\makeatother +\printbibliography[heading=bibintoc] +%\typeout{Examples: \the\codeexamplecount}% +\end{document} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-main-preamble.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-main-preamble.tex new file mode 100644 index 0000000000..494d63e012 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-main-preamble.tex @@ -0,0 +1,402 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\usepackage[version=latest]{pgf} + +\usepackage{xkeyval,calc,listings,tikz,fp} + +\usepackage{imakeidx} +\makeindex + +%%% Bibliography +\usepackage{csquotes} +\usepackage[backend=biber,style=numeric,backref]{biblatex} +\addbibresource{tikz-ext-manual.bib} + +\usepackage{hyperref} +\hypersetup{% + colorlinks=true, % use true to enable colors below: + linkcolor=blue,%red, + filecolor=blue,%magenta, + urlcolor=blue,%cyan, + citecolor=blue, + pdfborder=0 0 0, +} + +\usepackage[a4paper,left=2.25cm,right=2.25cm,top=2.5cm,bottom=2.5cm,nohead,columnsep=1cm]{geometry} +\usepackage{amsmath,amssymb} +\usepackage{xxcolor} +\usepackage{pifont} + +\usepackage[T1]{fontenc} +% Promote `Missing character` reports to full errors +% require texlive 2021 or above +\tracinglostchars=3 + +\input{pgfmanual-en-macros} + +\usepackage{unicode-math} +\setmathfont[Scale=MatchUppercase]{libertinusmath-regular.otf} +\usepackage[ttscale=.85]{libertine} +\setmonofont[Scale=0.8]{Bitstream Vera Sans Mono} + +\makeatletter +\renewcommand*\l@section[2]{% + \ifnum \c@tocdepth >\z@ + \addpenalty\@secpenalty + \addvspace{1.0em \@plus\p@}% + \setlength\@tempdima{2.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \endgroup + \fi} +\renewcommand*\l@subsection{\@dottedtocline{2}{2.5em}{3.3em}} +\renewcommand*\l@subsubsection{\@dottedtocline{3}{5.8em}{4.2em}} +\def\@pnumwidth{2.2em} +\makeatother + +% Global styles: +\tikzset{ + every plot/.style={prefix=plots/pgf-}, + shape example/.style={ + color=black!30, + draw, + fill=yellow!30, + line width=.5cm, + inner xsep=2.5cm, + inner ysep=0.5cm} +} + +% Detect changed labels +% by David Carlisle https://tex.stackexchange.com/a/169245 +\makeatletter +\def\@testdef#1#2#3{% + \def\reserved@a{#3}% + \expandafter\ifx\csname #1@#2\endcsname\reserved@a\else + \typeout{^^JLabel `#2' changed:^^J\meaning\reserved@a^^J\expandafter\meaning\csname #1@#2\endcsname^^J}% + \@tempswatrue + \fi} +\makeatother + +\usetikzlibrary{ + ext.calendar-plus, + ext.misc, + ext.node-families, + ext.node-families.shapes.geometric, + ext.paths.arcto, + ext.paths.ortho, + ext.paths.timer, + ext.patterns.images, + ext.positioning-plus, + ext.shapes.heatmark, + ext.shapes.circlearrow, + ext.shapes.circlecrosssplit, + ext.shapes.rectangleroundedcorners, + ext.shapes.superellipse, + ext.topaths.arcthrough, + ext.transformations.mirror, + % + calc, + fit, + matrix, + shapes.geometric, + through, + trees, +} + +%% needs Lua! +\usetikzlibrary{graphs,graphdrawing} +\usegdlibrary{force} + +\makeatletter +\def\endofcodeexample#1{% original from tex/latex/pgf/doc/pgfmanual-en-macros.tex by Till Tantau et al + \endgroup% + \ifpgfmanual@setup@code% + \gdef\pgfmanual@do@this{% + {% + \returntospace% + \commenthandler% + \xdef\code@temp{#1}% removes returns and comments + }% + \edef\pgfmanualmcatcode{\the\catcode`\^^M}% + \catcode`\^^M=9\relax% + \expandafter\scantokens\expandafter{\code@temp}% + \catcode`\^^M=\pgfmanualmcatcode% + }% + \fi% + \ifcode@hidden\else + \ifcode@execute% + \setbox\codeexamplebox=\hbox{% + \ifx\code@render\pgfutil@empty% + {% + {% + \returntospace% + \commenthandler% + \xdef\code@temp{#1}% removes returns and comments + }% + \catcode`\^^M=9% + \colorbox{graphicbackground}{\color{black}\ignorespaces% + \code@pre\expandafter\scantokens\expandafter{\code@temp\ignorespaces}\code@post\ignorespaces}% + }% + \else% + \global\let\code@temp\code@render% + \colorbox{graphicbackground}{\color{black}\ignorespaces% + \code@render}% + \fi% + }% + \ifx\code@animation@list\pgfutil@empty% + \else% + \setbox\codeexampleboxanim=\vbox{% + \rightskip0pt\leftskip0pt plus1filll% + \ifdim\wd\codeexamplebox>\codeexamplewidth% + \else% + \hsize\codeexamplewidth% + \advance\hsize by2cm% + \fi% + \leavevmode\catcode`\^^M=9% + \foreach \pgfmanualtime/\pgfmanualtimehow in\code@animation@list{% + \setbox\codeexampleboxanim=\hbox{\colorbox{animationgraphicbackground}{% + \tikzset{make snapshot of=\pgfmanualtime}% + \scalebox{\pgfmanualanimscale}{\color{black}\ignorespaces% + \code@animation@pre\expandafter\scantokens\expandafter{\code@temp\ignorespaces}\code@animation@post\ignorespaces}% + }}% + \space\raise4pt\hbox to0pt{\vrule width0pt height1em\hbox + to\wd\codeexampleboxanim{\hfil\scriptsize$t{=}\pgfmanualtimehow \mathrm s$\hfil}\hss}% + \lower\ht\codeexampleboxanim\box\codeexampleboxanim\hfil\penalty0\hskip0ptplus-1fil% + }% + }% + \setbox\codeexampleboxanim=\hbox{\hbox{}\hskip-2cm\box\codeexampleboxanim}% + \fi% + \ifdim\wd\codeexamplebox>\codeexamplewidth% + \def\code@start{\par}% + \def\code@flushstart{}\def\code@flushend{}% + \def\code@mid{\parskip2pt\par\noindent}% + \def\code@width{\linewidth-6pt}% + \def\code@end{}% + \else% + \def\code@start{% +% \linewidth=\textwidth% removed this line + \parshape \@ne 0pt \linewidth + \leavevmode% + \hbox\bgroup}% + \def\code@flushstart{\hfill}% + \def\code@flushend{\hbox{}}% + \def\code@mid{\hskip6pt}% + \def\code@width{\linewidth-12pt-\codeexamplewidth}% + \def\code@end{\egroup}% + \fi% + \code@start% + \noindent% + \begin{minipage}[t]{\codeexamplewidth}\raggedright + \hrule width0pt% + \footnotesize\vskip-1em% + \code@flushstart\box\codeexamplebox\code@flushend% + \vskip0pt% + \leavevmode% + \box\codeexampleboxanim% + \vskip-1ex + \leavevmode% + \end{minipage}% + \else% + \def\code@mid{\par} + \def\code@width{\linewidth-6pt} + \def\code@end{} + \fi% + \code@mid% + \ifpgfmanual@multipage@code% + {% + \pgfkeysvalueof{/codeexample/prettyprint/base color}% + \pgfmanualdolisting{#1}% + }% + \else% + \colorbox{codebackground}{% + \pgfkeysvalueof{/codeexample/prettyprint/base color}% + \begin{minipage}[t]{\code@width}% + \pgfmanualdolisting{#1}% + \end{minipage}}% + \fi% + \code@end% + \par% + \medskip + \fi + \endcodeexample\endgroup% +} + +\newenvironment{pathoperation'}[3][]{ + \begin{pgfmanualentry} + \def\pgfmanualtest{#1}% + \pgfmanualentryheadline{% + \ifx\pgfmanualtest\@empty% + \pgfmanualpdflabel{#2}{}% + \fi% + %\textcolor{gray}{{\ttfamily\char`\\path}\ \ \dots} + %\declare{\texttt{\noligs{#2}}}#3\ \textcolor{gray}{\dots\texttt{;}} + }% + \ifx\pgfmanualtest\@empty% + \index{#2@\protect\texttt{#2} path operation}% + \index{Path operations!#2@\protect\texttt{#2}}% + \fi% + \pgfmanualbody +} +{ + \end{pgfmanualentry} +} +\makeatother + +\usepackage{paracol} + +%% normal references +\newcommand*{\indexLibrary}[1]{% + \index{#1@\protect\texttt{#1} library}% + \index{Libraries!#1@\protect\texttt{#1}}% +} +\newcommand*{\indexMathFunction}[1]{% + \index{#1@\protect\texttt{#1} math function}% + \index{Math functions!#1@\protect\texttt{#1}}% +} +\newcommand*{\indexShape}[1]{% + \index{#1@\protect\texttt{#1} shape}% + \index{Shapes!#1@\protect\texttt{#1}}% +} +\newcommand*{\indexHandler}[1]{% + \index{\gobble#1@\protect\texttt{#1} handler}% + \index{Key handlers!#1@\protect\texttt{#1}} +} +\newcommand*{\indexKey}[2][/tikz/]{% +\begingroup + \def\mykey{#1#2}% + \def\mypath{}% + \gdef\myname{}% + \firsttimetrue + \decompose#1#2/\nil +\endgroup +} +\newcommand*{\indexPathOperation}[1]{% + \index{#1@\protect\texttt{#1} path operation}% + \index{Path operations!#1@\protect\texttt{#1}}% +} + +%% references to original +\newcommand*{\indexLibraryO}[1]{% + \index{#1@\originalprefix\protect\texttt{\original{#1}} library\originalsuffix}% + \index{Libraries!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% +} +\newcommand*{\indexMathFunctionO}[1]{% + \index{#1@\protect\texttt{\original{#1}} math function\originalsuffix}% + \index{Math functions!#1@\protect\texttt{\original{#1}}\originalsuffix}% +} +\newcommand*{\indexShapeO}[1]{% + \index{#1@\originalprefix\protect\texttt{\original{#1}} shape\originalsuffix}% + \index{Shapes!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% +} +\newcommand*{\indexHandlerO}[1]{% + \index{\gobble#1@\originalprefix\protect\texttt{\original{#1}} handler\originalsuffix}% + \index{Key handlers!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix} +} +\newcommand*{\indexKeyO}[2][/tikz/]{%TODO + \begingroup\let\decomposetoodeep\decomposetoodeepO + \def\mykey{#1#2}% + \def\mypath{}% + \gdef\myname{}% + \firsttimetrue + \decomposeO#1#2/\nil + \endgroup +} +\def\decomposetoodeepO#1/#2/\nil{% + % avoid too-deep nesting in index + \index{#1/#2@\originalprefix\protect\texttt{\original{#1/#2}} key\originalsuffix}% + \index{\mypath#1/#2@\originalprefix\protect\texttt{\original{#1/#2}}\originalsuffix}% + \decomposefindlast/#1/#2/\nil% +} +\def\decomposeO/#1/#2\nil{% + \def\test{#2}% + \ifx\test\empty% + % aha. + \index{#1@\originalprefix\protect\texttt{\original{#1}} key\originalsuffix}% + \index{\mypath#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% + \gdef\myname{#1}% + \pgfmanualpdflabel{#1}{} + \else% + \advance\pgfmanualdecomposecount by1\relax% + \ifnum\pgfmanualdecomposecount>2\relax% + \decomposetoodeepO#1/#2\nil% + \else% + \iffirsttime% + \begingroup% + % also make a pdf link anchor with full key path. + \def\hyperlabelwithoutslash##1/\nil{% + \pgfmanualpdflabel{##1}{}% + }% + \hyperlabelwithoutslash/#1/#2\nil% + \endgroup% + \def\mypath{#1@\protect\texttt{/#1/}!}% + \firsttimefalse% + \else% + \expandafter\def\expandafter\mypath\expandafter{\mypath#1@\protect\texttt{#1/}!}% + \fi% + \def\firsttime{}% + \decomposeO/#2\nil% + \fi% + \fi% +} +\newcommand*{\indexPathOperationO}[1]{% + \index{#1@\originalprefix\protect\texttt{\original{#1}} path operation\originalsuffix}% + \index{Path operations!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% +} + +\newcommand*{\indexCommandO}[1]{% + \removeats{#1}% + \index{\strippedat @\originalprefix\protect\texttt{\original{\protect\string\protect#1}}\originalsuffix}% +} + +\newcommand*{\referenceKeyandIndexO}[2][/tikz/]{\texttt{#1#2}\indexKeyO[#1]{#2}} +\newcommand*{\referenceKeyandIndex}[2][/tikz/]{\texttt{#1#2}\indexKey[#1]{#2}} +\newcommand*{\referenceShapeandIndex}[1]{\texttt{#1}\indexShape{#1}} +\newcommand*{\referenceShapeandIndexO}[1]{\texttt{#1}\indexShapeO{#1}} +\newcommand*{\referenceLibraryandIndexO}[1]{\texttt{#1}\indexLibraryO{#1}} + +\colorlet{originalindex}{gray} +\newcommand*{\original}[1]{\textcolor{originalindex}{#1}} +\newcommand*{\originalsuffix}{}%\textsuperscript{\textdagger}}%\normalsize +\newcommand*{\originalprefix}{}%\footnotesize + +%\newcommand*{\original}[1]{\textcolor{originalindex}{#1}} +%\newcommand*{\original}[1]{#1}%\textcolor{originalindex}{#1}} +%\newcommand*{\originalsuffix}{}%\textsuperscript{\color{blue}\tikzname}} +%\DeclareRobustCommand*{\originalprefix}{\smash{\footnotesize\llap{\textbullet\space}}} + +\newcommand*{\filetype}[1]{\textsc{#1}} + +\makeatletter +\def\index@prologue{\section*{Index}\addcontentsline{toc}{section}{Index} + This index contains automatically generated entries as well as {\originalprefix\original{references}\originalsuffix} to + original functionalities of \pgfname/\tikzname. + \bigskip +} +\makeatother + +\DeclareMathOperator{\sgn}{sgn} + +\newenvironment{implementation}{% + \noindent\rule[.5ex]{\linewidth}{.4pt}\par + \paragraph*{Notes on Implementation:}\par% + \small + \begin{quotation}% +}{\end{quotation}} + +\newcommand*{\inspiration}[2]{% + \par\textbf{Q\,\&\,A:} \cite{#1} \& \cite{#2}\par +} +\newcommand*\inspirationQ[1]{\par\textbf{Q:} \cite{#1}} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlearrow.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlearrow.tex new file mode 100644 index 0000000000..e26711bb35 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlearrow.tex @@ -0,0 +1,93 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\section{Shape: Circle Arrow} +\begin{pgflibrary}{ext.shapes.circlearrow} + A circular shape named |circle arrow| that has an arc as its background path that can have an arrow tip. + \inspiration{ShapeCircleArrow-Q}{ShapeCircleArrow-A} +\end{pgflibrary} +\begin{shape}{circle arrow} + This shape is an arrow whose path is an arc -- defined very similar to the |arc|% + \indexPathOperationO{arc} path operation -- that can possibly be customized with + arrow tips. + + \begin{key}{/pgf/circle arrow start angle=\meta{start angle} (initially \{\})} + Sets the start angle. + \end{key} + \begin{key}{/pgf/circle arrow end angle=\meta{end angle} (initially \{\})} + Sets the end angle. + \end{key} + \begin{key}{/pgf/circle arrow delta angle=\meta{delta angle} (initially \{\})} + Sets the delta angle. + \end{key} + \begin{key}{/pgf/circle arrow arrows=% + \meta{start arrow tip specification}-\meta{end arrow tip specification} (initially -)} + The specification will be forwarded to |\pgfsetarrows|\indexCommandO{\pgfsetarrows}. + \end{key} + + A few handful styles are pre-defined. + \begin{key}{/pgf/circle arrow turn left north} + Sets |circle arrow start angle = 100|, |circle arrow delta angle = 340| + and |circle arrow arrows = ->|. + \end{key} + \begin{key}{/pgf/circle arrow turn left east} + As above but |circle arrow start angle = 10|. + \end{key} + \begin{key}{/pgf/circle arrow turn left west} + As above but |circle arrow start angle = 280|. + \end{key} + \begin{key}{/pgf/circle arrow turn left south} + As above but |circle arrow start angle = 190|. + \end{key} + \begin{key}{/pgf/circle arrow turn right north} + Sets |circle arrow start angle = 100|, |circle arrow delta angle = 340| + and |circle arrow arrows = <-|. + \end{key} + \begin{key}{/pgf/circle arrow turn right east} + As above but |circle arrow start angle = 10|. + \end{key} + \begin{key}{/pgf/circle arrow turn right west} + As above but |circle arrow start angle = 280|. + \end{key} + \begin{key}{/pgf/circle arrow turn right south} + As above but |circle arrow start angle = 190|. + \end{key} + +{\catcode`\|=12 +\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.circlearrow,matrix}] +\begin{tikzpicture} +\matrix[matrix of nodes, draw=none, row sep=1em, column sep=1em, + every node/.style={draw=gray, shape=circle arrow, ultra thick, inner sep=1em} +] (m) { + |[circle arrow turn left north]| & |[circle arrow turn left east]| \\ + |[circle arrow turn left west]| & |[circle arrow turn left south]| \\ + |[circle arrow turn right north]| & |[circle arrow turn right east]| \\ + |[circle arrow turn right west]| & |[circle arrow turn right south]| \\ +}; +\end{tikzpicture} +\end{codeexample} +} +\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.circlearrow},width=16cm] +\begin{tikzpicture}\Huge +\node[name=s, shape=circle arrow, + circle arrow turn left west, shape example] + {Circle Arrow\vrule width 1pt height 2cm}; +\foreach \anchor/\placement in + {north west/above left, north/above, north east/above right, + west/left, center/above, east/right, + mid west/right, mid/above, mid east/left, + base west/left, base/below, base east/right, + south west/below left, south/below, south east/below right, + text/left, 10/right, 130/above} + \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} + node[\placement] {\scriptsize\texttt{(s.\anchor)}}; +\end{tikzpicture} +\end{codeexample} +\end{shape} +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlecrosssplit.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlecrosssplit.tex new file mode 100644 index 0000000000..e7b2b9ba5a --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-circlecrosssplit.tex @@ -0,0 +1,53 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\section{Shape: Circle Cross Split} +\begin{pgflibrary}{ext.shapes.circlecrosssplit} + A circular shape with four parts that can be individually filled. + \inspiration{ShapeSplitCircle-Q}{ShapeSplitCircle-A} +\end{pgflibrary} +\begin{shape}{circle cross split} +This shape has four node parts that are placed near the center of a circle. + +\begin{key}{/pgf/circle cross split part fill=\marg{list} (initially none)} +Sets the custom fill color for each node part shape. +The items in \meta{list} should be separated by commas +(so if there is more than one item in \meta{list}, it must be surrounded by braces). +If \meta{list} has less entries than node parts, +then the remaining node parts use the color from the last entry in the list. +This key will automatically set |/pgf/circle cross split uses custom fill|. +\end{key} +\begin{key}{/pgf/circle cross split uses custom fill=\opt{\meta{boolean}} (default true)} +This enables the use of a custom fill for each of the node parts +(including the area covered by the |inner sep|). +The background path for the shape should not be filled (e.\,g., in \tikzname, +the |fill| option for the node must be implicitly or explicitly set to |none|). +Internally, this key sets the \TeX-if |\ifpgfcirclecrosssplitcustomfill| appropriately. +\end{key} +\begin{codeexample}[preamble=\usepgflibrary{ext.shapes.circlecrosssplit}] +\begin{tikzpicture}\Huge +\node[name=s, shape=circle cross split, shape example, inner xsep=1.5cm, fill=none, + circle cross split part fill={green,blue,red,yellow!90!black}] + {\nodepart{text}text\nodepart{two}two + \nodepart{three}three\nodepart{four}four}; +\foreach \anchor/\placement in + {north west/above left, north/above, north east/above right, + west/left, center/left, east/right, + mid west/right, mid/left, mid east/left, + base west/left, base/left, base east/right, +lower base west/left, lower base/below, lower base east/right, + lower mid west/left, lower mid/above, lower mid east/right, + south west/below left, south/below, south east/below right, + text/below, 10/right, 130/above, two/left, three/left, four/left} + \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} + node[\placement] {\scriptsize\texttt{(s.\anchor)}}; +\end{tikzpicture} +\end{codeexample} +\end{shape} +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-heatmark.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-heatmark.tex new file mode 100644 index 0000000000..fa13cb0000 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-heatmark.tex @@ -0,0 +1,83 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\section{Shape: Heatmark} +\begin{pgflibrary}{ext.shapes.heatmark} + A circular shape that has customizable rings around it. + \inspiration{ShapeHeat-Q}{ShapeHeat-A} +\end{pgflibrary} + +\begin{shape}{heatmark} + \begin{key}{/pgf/heatmark arcs=\meta{arcs num} (initially 3)} + Sets the number of arc around the circle to \meta{arcs num}. + \end{key} + \begin{key}{/pgf/heatmark arc width=\meta{arc width} (initially 4pt)} + Sets the width of the rings around the circle to \meta{arc width}. + \end{key} + \begin{key}{/pgf/heatmark arc sep=\meta{sep length} (initially 1pt)} + Sets the whitespace between the rings to \meta{sep length}. + \end{key} + \begin{key}{/pgf/heatmark arc rings=\meta{rings num} (initially 3)} + Sets the number of rings around the circle to \meta{rings num} + \end{key} + \begin{key}{/pgf/heatmark arc sep angle=\meta{sep angle} (initially 20)} + Sets the whitespace angle between the arcs in one ring to \meta{sep angle}. + \end{key} + \begin{key}{/pgf/heatmark inner opacity=\meta{inner opacity} (initially 0.8)} + Sets the opacity of the inner ring to \meta{inner opacity}. + \end{key} + \begin{key}{/pgf/heatmark outer opacity=\meta{low opacity} (initially 0.2)} + Sets the opacity of the outer ring to \meta{outer opacity}. + + The opacity of the rings between the outer and the inner ring will be interpolated by these two opacities. + \end{key} + +This shape takes the value of |/pgf/shape border rotate|% +\indexKeyO[/pgf/]{shape border rotate} into consideration. + +For every ring and for every arc the following styke keys are tried. +\begin{stylekey}{/pgf/heatmark ring \meta{ring number}} +\end{stylekey} +\begin{stylekey}{/pgf/heatmark arc \meta{arc number}} +\end{stylekey} +\begin{stylekey}{/pgf/heatmark ring \meta{ring number} arc \meta{arc number}} +\end{stylekey} + +The \pgfname shape is setup in a way that even \tikzname\space +styles can be used with a little bit work: +\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.heatmark}] +\tikz[ + shape border rotate=90, + /pgf/heatmark ring 1/.append style={/tikz/fill=green}, + /pgf/heatmark arc 1/.append style={/tikz/fill=blue}, + /pgf/heatmark ring 2 arc 2/.append style={/tikz/fill=yellow!70!black} +] \node[heatmark, fill=red] (n) {100}; +\end{codeexample} + +It is best to use this shape with no actual border (|draw = none|) and the |outer sep| set to zero. +\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.heatmark},width=16cm] +\begin{tikzpicture}\Huge +\node[name=s, shape=heatmark, shape example, + fill=blue!25, draw=none, outer sep=0pt] + {Heatmark\vrule width 1pt height 2cm}; +\foreach \anchor/\placement in + {north west/above left, north/above, + north east/above right, + west/left, center/above, east/right, + mid west/right, mid/above, mid east/left, + base west/left, base/below, base east/right, + south west/below left, south/below, + south east/below right, + text/left, 10/right, 130/above} + \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} + node[\placement] {\scriptsize\texttt{(s.\anchor)}}; +\end{tikzpicture} +\end{codeexample} +\end{shape} +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-rectround.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-rectround.tex new file mode 100644 index 0000000000..78bab76925 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-rectround.tex @@ -0,0 +1,58 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Shape: Rectangle with Rounded Corners} +\begin{pgflibrary}{ext.shapes.rectangleroundedcorners} + A rectangle with rounded corners. +\end{pgflibrary} + +\begin{shape}{rectangle with rounded corners} +This library provides a |rectangle with rounded corners| where every corner can have a different radius. + +\begin{key}{/pgf/rectangle with rounded corners north west radius=\meta{dimen} (initially .5\string\pgflinewidth)} + Sets the north west radius to \meta{dimen}. +\end{key} +\begin{key}{/pgf/rectangle with rounded corners north east radius=\meta{dimen} (initially .5\string\pgflinewidth)} + Sets the north east radius to \meta{dimen}. +\end{key} +\begin{key}{/pgf/rectangle with rounded corners south west radius=\meta{dimen} (initially .5\string\pgflinewidth)} + Sets the south west radius to \meta{dimen}. +\end{key} +\begin{key}{/pgf/rectangle with rounded corners south east radius=\meta{dimen} (initially .5\string\pgflinewidth)} + Sets the south east radius to \meta{dimen}. +\end{key} +\begin{key}{/pgf/rectangle with rounded corners radius=\meta{dimen}} + Sets all radii to \meta{dimen}. +\end{key} + +\begin{codeexample}[preamble=\usepgflibrary{ext.shapes.rectangleroundedcorners}] +\begin{tikzpicture}\Huge +\node[name=s, shape=rectangle with rounded corners, shape example, + rectangle with rounded corners north west radius=10pt, + rectangle with rounded corners north east radius=20pt, + rectangle with rounded corners south west radius=30pt, + rectangle with rounded corners south east radius=40pt] {Rectangle with rounded corners\vrule width 1pt height 2cm}; +\foreach \anchor/\placement in + {north west/above left, north/above, north east/above right, + west/left, center/above, east/right, + mid west/right, mid/above, mid east/left, + base west/left, base/below, base east/right, + south west/below left, south/below, south east/below right, + text/below, 10/right, 130/above, + north west center/below right, north east center/left, + south west center/above right, south east center/left, + below north west/left, above south west/left, above south east/right, below north east/right, + right north west/above, right south west/below, left south east/below, left north east/above} + \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} + node[\placement] {\scriptsize\texttt{(s.\anchor)}}; +\end{tikzpicture} +\end{codeexample} +\end{shape} +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-superellipse.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-superellipse.tex new file mode 100644 index 0000000000..580ef0d93f --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-shapes-superellipse.tex @@ -0,0 +1,105 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Shape: Superellipse} +\begin{pgflibrary}{ext.shapes.superellipse} + Shape in the form of a ``superellipse''. + \inspiration{ShapeSuperEllipse-Q}{ShapeSuperEllipse-A} +\end{pgflibrary} + +\begin{shape}{superellipse} +This shape is defined by formula +\begin{equation*} + \biggl|\frac x{r_x}\biggr|^m + \biggl|\frac y{r_y}\biggr|^n = 1 +\end{equation*} +and will be plotted by +\begin{align*} + x(t) &= |\cos t|^{\frac 2m} \cdot r_x \sgn(\cos t) \\ + y(t) &= |\sin t|^{\frac 2n} \cdot r_y \sgn(\sin t) \\ +\end{align*} +where $r_x$ is half the node's width and $r_y$ is half the node's height. + +\begin{key}{/pgf/superellipse x exponent=\meta{x exponent}(initially 2.5)} +This sets $m$. +\end{key} +\begin{key}{/pgf/superellipse y exponent=\meta{y exponent}(initially 2.5)} +This sets $n$. +\end{key} +\begin{key}{/pgf/superellipse step=\meta{step}(initially 5)} +This specifies the step of the underlying plot handler. +The smaller \meta{step} is, the slower computation will be. + +Sensible values for \meta{step} are integer dividers of 90, i.\,e. +2, 3, 5, 6, 9, 10, 15, 18, 30 and 45. +\end{key} +\begin{key}{/pgf/superellipse exponent=\meta{exponent}} + Sets both |superellipse x exponent| and |superellipse y exponent| to \meta{exponent}. +\end{key} + +\paragraph{Notes on Implementation} +For implementing this shape, additional mathematical functions were declared. +\begin{math-function}{superellipsex(\mvar{t}, \mvar{2/m}, \mvar{$r_x$})} +\mathcommand +Returns the $x$ value on a point of the superellipse with its center on the origin following +\begin{equation*} + x = r_x\cos^{2/m} t +\end{equation*} +for values of $0 \leq t \leq 90$. +\end{math-function} +\begin{math-function}{superellipsey(\mvar{t}, \mvar{2/n}, \mvar{$r_y$})} +\mathcommand +Returns the $y$ value on a point of the superellipse with its center on the origin following +\begin{equation*} + y = r_y\cos^{2/n} t +\end{equation*} +for values of $0 \leq t \leq 90$. +\end{math-function} + +Both \pgfname math functions can be used at once with the following macro. +\begin{command}{\pgfmathsuperellipseXY\marg{t}\marg{2/m}\marg{2/n}\marg{a}\marg{b}} +Returns the $x$ value (in |\pgfmathresultX|) and the $y$ value (in |\pgfmathresultY|) of the superellipse with its center on the origin following +\begin{align*} + x & = a\cos^{2/m} t \\ + y & = b\cos^{2/n} t +\end{align*} +for values of $0 \leq t \leq 90$. + +Note: all arguments must be a valid number since they will not be parsed by \pgfname math. +\end{command} + +And additional internal macro was defined following the original naming scheme. +\def\temp{\begin{command}}% +\expandafter\temp\expandafter{\csname pgfutil@prefix@macrotomacro\endcsname\marg{macro 1}\marg{macro 2}} +Adds the once-expansion of \meta{macro 2} in front of \meta{macro 1}. +\end{command} + +\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.superellipse}] +\begin{tikzpicture}[superellipse step=1]\Huge +\node[name=s,shape=superellipse,shape example] {Superellipse\vrule width 1pt height 2cm}; +\foreach \anchor/\placement in + {north west/above left, north/above, north east/above right, + west/left, center/above, east/right, + mid west/right, mid/above, mid east/left, + base west/left, base/below, base east/right, + south west/below left, south/below, south east/below right, + text/left, 10/right, 130/above} + \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} + node[\placement] {\scriptsize\texttt{(s.\anchor)}}; +\end{tikzpicture} +\end{codeexample} +% +\begin{codeexample}[width=8cm,preamble=\usetikzlibrary{ext.shapes.superellipse}] +\begin{tikzpicture}[minimum width=1cm, minimum height=3cm] +\foreach \xe/\ye[count=\i] in {.5/.5, 1/1, 2/2, 3/3, .5/5} + \node[draw, superellipse, superellipse x exponent=\xe, superellipse y exponent=\ye] at (1.5*\i,0) {}; +\end{tikzpicture} +\end{codeexample} +\end{shape} +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-trans.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-trans.tex new file mode 100644 index 0000000000..ccd378a6e7 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual-en-pgf-trans.tex @@ -0,0 +1,176 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Transformations: Mirroring} +\label{pgflibrary:transformations} + +\begin{purepgflibrary}{ext.transformations.mirror} + This library adds mirror transformations to \pgfname. +\end{purepgflibrary} + +Two approaches to mirror transformation exist: +\begin{enumerate} +\item Using the reflection matrix (see left column). + + This depends on |\pgfpointnormalised|\indexCommandO\pgfpointnormalised which involves + the sine\indexMathFunctionO{sin} and the cosine\indexMathFunctionO{cos} functions of \pgfname math. + +\item Using built-in transformations (see right column). + + This depends on |\pgfmathanglebetweenpoints|\indexCommandO\pgfmathanglebetweenpoints which + involves the arctangent (|atan2|\indexMathFunctionO{atan2}) function of \pgfname math. +\end{enumerate} + +Which one is better? I don't know. +Choose one you're comfortable with. + +\begin{paracol}{2} + +\subsection{Using the reflection matrix} + +The following commands use the reflection matrix that sets the transformation matrix following +\begin{equation*} + A = \frac{1}{\Vert\vec l\Vert^2} \begin{bmatrix} + l_x^2-l_y^2 & 2l_xl_y \\ + 2l_xl_y & l_y^2-l_x^2\\ + \end{bmatrix}. +\end{equation*} + +\switchcolumn% > + +\stepcounter{subsection} +\subsection{Using built-in transformations} + +The following commands use a combination of shifting, rotating, $-1$ scaling, +rotating back and shifting back to reach the mirror transformation. + +The commands are named the same as on the left side, +only the |m| in |mirror| is capitalized. + +\switchcolumn*% < + +\begin{command}{\pgftransformxmirror\marg{value}} + Sets up a transformation that mirrors along a vertical line that goes through point $(\text{\meta{value}}, 0)$. + +\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (1.5, -.25) -- (1.5, 1.25); +\pgftransformxmirror{1.5} + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{command} + +\switchcolumn% > + +\begin{command}{\pgftransformxMirror\marg{value}} + Sets up a transformation that mirrors along a vertical line that goes through point $(\text{\meta{value}}, 0)$. + +\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (1.5, -.25) -- (1.5, 1.25); +\pgftransformxMirror{1.5} + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{command} + +\switchcolumn*% < + +\begin{command}{\pgftransformymirror\marg{value}} + Sets up a transformation that mirrors along a horizontal line that goes through point $(0, \text{\meta{value})}$. +\end{command} + +\begin{command}{\pgftransformmirror\marg{point A}\marg{point B}} + Sets up a transformation that mirrors along the line that goes through \meta{point A} and \meta{point B}. + +\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-.25, -2.25) grid (2.5, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (0, -1) -- (2, 0); +\pgftransformmirror{\pgfpointxy{0}{-1}} + {\pgfpointxy{2}{ 0}} + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{command} + +\switchcolumn% > + +\begin{command}{\pgftransformyMirror\marg{value}} + Sets up a transformation that mirrors along a horizontal line that goes through point $(0, \text{\meta{value})}$. +\end{command} + +\begin{command}{\pgftransformMirror\marg{point A}\marg{point B}} + Sets up a transformation that mirrors along the line that goes through \meta{point A} and \meta{point B}. + +\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-.25, -2.25) grid (2.5, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (0, -1) -- (2, 0); +\pgftransformMirror{\pgfpointxy{0}{-1}} + {\pgfpointxy{2}{ 0}} + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{command} + +\switchcolumn*% < + +\begin{command}{\pgfqtransformmirror\marg{point A}} + Sets up a transformation that mirrors along the line that goes through the origin and \meta{point A}. + +\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-.25, -.25) grid (2.25, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (0, 0) -- (2, 1); +\pgfqtransformmirror{\pgfpointxy{2}{1}} + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{command} + +\switchcolumn + +\begin{command}{\pgfqtransformMirror\marg{point A}} + Sets up a transformation that mirrors along the line that goes through the origin and \meta{point A}. + +\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-.25, -.25) grid (2.25, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (0, 0) -- (2, 1); +\pgfqtransformMirror{\pgfpointxy{2}{1}} + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{command} + +\end{paracol} +\endinput diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual.bib b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual.bib new file mode 100644 index 0000000000..5a13e91d41 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual.bib @@ -0,0 +1,322 @@ +' +@Misc{NodeFam-Q, + author = {Holene}, + month = apr, + title = {Dependent node size in {TikZ}}, + year = {2017}, + file = {Snapshot:https\://tex.stackexchange.com/questions/107227/dependent-node-size-in-tikz/121054#121054:text/html}, + url = {https://tex.stackexchange.com/q/107227/16595}, + urldate = {2022-09-24}, +} + +@Misc{NodeFam-A, + author = {Qrrbrbirlbel}, + month = jun, + title = {Answer to \enquote{{Dependent} node size in {TikZ}}}, + year = {2013}, + file = {Snapshot:https\://tex.stackexchange.com/questions/107227/dependent-node-size-in-tikz/121054#121054:text/html}, + url = {https://tex.stackexchange.com/a/121054/16595}, + urldate = {2022-09-24}, +} + +' +@Misc{TimerRect-Q, + author = {CrazyArm}, + month = apr, + title = {Is {It} {Possible} to {Combine} {TikZ} {Distance} and {Line}-{To} {Operations}?}, + year = {2013}, + file = {Snapshot:https\://tex.stackexchange.com/questions/106558/is-it-possible-to-combine-tikz-distance-and-line-to-operations/106571#106571:text/html}, + url = {https://tex.stackexchange.com/q/106558/16595}, + urldate = {2022-09-24}, +} + +@Misc{TimerRect-A, + author = {Qrrbrbirlbel}, + month = apr, + title = {Answer to \enquote{{Is} {It} {Possible} to {Combine} {TikZ} {Distance} and {Line}-{To} {Operations}?}}, + year = {2013}, + file = {Snapshot:https\://tex.stackexchange.com/questions/106558/is-it-possible-to-combine-tikz-distance-and-line-to-operations/106571#106571:text/html}, + shorttitle = {Answer to "{Is} {It} {Possible} to {Combine} {TikZ} {Distance} and {Line}-{To} {Operations}?}, + url = {https://tex.stackexchange.com/a/106571/16595}, + urldate = {2022-09-24}, +} + +' +@Misc{TimerPara-Q, + author = {cis}, + month = may, + title = {{TikZ}: {How} to place a coordinate at parabola-path-position?}, + year = {2020}, + file = {Snapshot:https\://tex.stackexchange.com/questions/543251/tikz-how-to-place-a-coordinate-at-parabola-path-position/621012#621012:text/html}, + shorttitle = {{TikZ}}, + url = {https://tex.stackexchange.com/q/543251/16595}, + urldate = {2022-09-24}, +} + +@Misc{TimerPara-A, + author = {Qrrbrbirlbel}, + month = nov, + title = {Answer to \enquote{{TikZ}: {How} to place a coordinate at parabola-path-position?}}, + year = {2021}, + file = {Snapshot:https\://tex.stackexchange.com/questions/543251/tikz-how-to-place-a-coordinate-at-parabola-path-position/621012#621012:text/html}, + shorttitle = {Answer to "{TikZ}}, + url = {https://tex.stackexchange.com/a/621012/16595}, + urldate = {2022-09-24}, +} + +' +@Misc{Pattern-Q, + author = {knut}, + month = mar, + title = {{TikZ}: {Define} pattern with reference to external picture}, + year = {2013}, + file = {Snapshot:https\://tex.stackexchange.com/questions/103980/tikz-define-pattern-with-reference-to-external-picture/107144#107144:text/html}, + shorttitle = {{TikZ}}, + url = {https://tex.stackexchange.com/q/103980/16595}, + urldate = {2022-09-24}, +} + +@Misc{Pattern-A, + author = {Qrrbrbirlbel}, + month = apr, + title = {Answer to \enquote{{TikZ}: {Define} pattern with reference to external picture}}, + year = {2013}, + file = {Snapshot:https\://tex.stackexchange.com/questions/103980/tikz-define-pattern-with-reference-to-external-picture/107144#107144:text/html}, + shorttitle = {Answer to "{TikZ}}, + url = {https://tex.stackexchange.com/a/107144/16595}, + urldate = {2022-09-24}, +} + +' +@Misc{WeekNum-Q, + author = {Fence}, + month = nov, + title = {Add week day to calendar}, + year = {2019}, + file = {Snapshot:https\://tex.stackexchange.com/questions/517338/add-week-day-to-calendar/651888#651888:text/html}, + url = {https://tex.stackexchange.com/q/517338/16595}, + urldate = {2022-09-24}, +} + +@Misc{WeekNum-A, + author = {Qrrbrbirlbel}, + month = jul, + title = {Answer to \enquote{{Add} week day to calendar}}, + year = {2022}, + file = {Snapshot:https\://tex.stackexchange.com/questions/517338/add-week-day-to-calendar/651888#651888:text/html}, + url = {https://tex.stackexchange.com/a/651888/16595}, + urldate = {2022-09-24}, +} + +' +@Misc{CalCond-Q, + author = {healyp}, + month = oct, + title = {{TikZ} calendar and conditional tests}, + year = {2013}, + file = {Snapshot:https\://tex.stackexchange.com/questions/140948/tikz-calendar-and-conditional-tests/141027#141027:text/html}, + url = {https://tex.stackexchange.com/q/140948/16595}, + urldate = {2022-09-24}, +} + +@Misc{CalCond-A, + author = {Qrrbrbirlbel}, + month = oct, + title = {Answer to \enquote{{TikZ} calendar and conditional tests}}, + year = {2013}, + file = {Snapshot:https\://tex.stackexchange.com/questions/140948/tikz-calendar-and-conditional-tests/141027#141027:text/html}, + url = {https://tex.stackexchange.com/a/141027/16595}, + urldate = {2022-09-24}, +} + +' +@Misc{CalMath-Q, + author = {cis}, + month = dec, + title = {{TikZ} / calendar: {Set} the height of a monthly calendar}, + year = {2018}, + file = {Snapshot:https\://tex.stackexchange.com/questions/464589/tikz-calendar-set-the-height-of-a-monthly-calendar/653146#653146:text/html}, + shorttitle = {{TikZ} / calendar}, + url = {https://tex.stackexchange.com/q/464589/16595}, + urldate = {2022-09-24}, +} + +@Misc{CalMath-A, + author = {Qrrbrbirlbel}, + month = aug, + title = {Answer to \enquote{{TikZ} / calendar: {Set} the height of a monthly calendar}}, + year = {2022}, + file = {Snapshot:https\://tex.stackexchange.com/questions/464589/tikz-calendar-set-the-height-of-a-monthly-calendar/653146#653146:text/html}, + shorttitle = {Answer to "{TikZ} / calendar}, + url = {https://tex.stackexchange.com/a/653146/16595}, + urldate = {2022-09-24}, +} + +' +@Misc{FullArc-Q, + author = {Peter, Anthony}, + month = apr, + title = {A rather difficult ring like picture to be drawn}, + year = {2017}, + file = {Snapshot:https\://tex.stackexchange.com/questions/144293/a-rather-difficult-ring-like-picture-to-be-drawn/144297#144297:text/html}, + url = {https://tex.stackexchange.com/q/144293/16595}, + urldate = {2022-09-24}, +} + +@Misc{FullArc-A, + author = {Qrrbrbirlbel}, + month = nov, + title = {Answer to "{A} rather difficult ring like picture to be drawn"}, + year = {2013}, + file = {Snapshot:https\://tex.stackexchange.com/questions/144293/a-rather-difficult-ring-like-picture-to-be-drawn/144297#144297:text/html}, + url = {https://tex.stackexchange.com/a/144297/16595}, + urldate = {2022-09-24}, +} + +' +@Misc{NodeFam-Ellipse, + author = {nkk}, + month = jun, + title = {How to prevent tikz custom node fill from covering the text when using node-families library}, + year = {2019}, + file = {Snapshot:https\://tex.stackexchange.com/questions/494862/how-to-prevent-tikz-custom-node-fill-from-covering-the-text-when-using-node-fami:text/html}, + url = {https://tex.stackexchange.com/q/494862/16595}, + urldate = {2022-09-24}, +} + +' +@Misc{ShapeHeat-Q, + author = {boje}, + month = may, + title = {Heatmap over country like {Google} {Map}}, + year = {2013}, + file = {Snapshot:https\://tex.stackexchange.com/questions/112929/heatmap-over-country-like-google-map/113004#113004:text/html}, + url = {https://tex.stackexchange.com/q/112929/16595}, + urldate = {2022-09-24}, +} + +@Misc{ShapeHeat-A, + author = {Qrrbrbirlbel}, + month = may, + title = {Answer to \enquote{{Heatmap} over country like {Google} {Map}}}, + year = {2013}, + file = {Snapshot:https\://tex.stackexchange.com/questions/112929/heatmap-over-country-like-google-map/113004#113004:text/html}, + url = {https://tex.stackexchange.com/a/113004/16595}, + urldate = {2022-09-24}, +} + +' +@Misc{ShapeSplitCircle-Q, + author = {Marco}, + month = apr, + title = {{TikZ} - {Four} {Colored} {Circle} {Split}}, + year = {2017}, + file = {Snapshot:https\://tex.stackexchange.com/questions/121686/tikz-four-colored-circle-split/121767#121767:text/html}, + url = {https://tex.stackexchange.com/q/121686/16595}, + urldate = {2022-09-24}, +} + +@Misc{ShapeSplitCircle-A, + author = {Qrrbrbirlbel}, + month = jun, + title = {Answer to \enquote{{TikZ} - {Four} {Colored} {Circle} {Split}}}, + year = {2013}, + file = {Snapshot:https\://tex.stackexchange.com/questions/121686/tikz-four-colored-circle-split/121767#121767:text/html}, + url = {https://tex.stackexchange.com/a/121767/16595}, + urldate = {2022-09-24}, +} + +' +@Online{ShapeSuperEllipse-Q, + author = {somenxavier}, + file = {Snapshot:https\://tex.stackexchange.com/questions/649144/an-oval-surrounded-a-long-text-inside-in-tikz-equivalent-cover-background-of/654759#654759:text/html}, + month = aug, + title = {An oval surrounded a *long text* inside in {TikZ} [equivalent cover background of {METAFUN}]}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/q/649144/16595}, + urldate = {2022-09-24}, + year = {2022}, +} + +@Online{ShapeSuperEllipse-A, + author = {Qrrbrbirlbel}, + file = {Snapshot:https\://tex.stackexchange.com/questions/649144/an-oval-surrounded-a-long-text-inside-in-tikz-equivalent-cover-background-of/654759#654759:text/html}, + month = aug, + title = {Answer to \enquote{An oval surrounded a *long text* inside in {TikZ} [equivalent cover background of {METAFUN}]}}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/a/654759/16595}, + urldate = {2022-09-24}, + year = {2022}, +} + +' +@Online{ShapeCircleArrow-Q, + author = {projetmbc}, + file = {Snapshot:https\://tex.stackexchange.com/questions/95221/tikz-circled-arrow/95263#95263:text/html}, + month = jan, + title = {{TikZ} - \enquote{Circled} arrow}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/q/95221/16595}, + urldate = {2022-09-24}, + year = {2013}, +} + +@Online{ShapeCircleArrow-A, + author = {Qrrbrbirlbel}, + file = {Snapshot:https\://tex.stackexchange.com/questions/95221/tikz-circled-arrow/95263#95263:text/html}, + month = jan, + title = {Answer to \enquote{{TikZ} - \enquote{Circled} arrow}}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/a/95263/16595}, + urldate = {2022-09-24}, + year = {2013}, +} + +' +@Online{ForeachUse-Q, + author = {Bar, Foo}, + file = {Snapshot:https\://tex.stackexchange.com/questions/110962/how-to-use-declared-tikz-functions-in-foreach-condition/110996#110996:text/html}, + month = apr, + title = {How to use declared {TikZ} functions in {\textbackslash}foreach condition?}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/q/110962/16595}, + urldate = {2022-09-24}, + year = {2013}, +} + +@Online{ForeachUse-A, + author = {Qrrbrbirlbel}, + file = {Snapshot:https\://tex.stackexchange.com/questions/110962/how-to-use-declared-tikz-functions-in-foreach-condition/110996#110996:text/html}, + month = apr, + shorttitle = {Answer to "How to use declared {TikZ} functions in {\textbackslash}foreach condition?}, + title = {Answer to \enquote{How to use declared {TikZ} functions in {\textbackslash}foreach condition?}}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/a/110996/16595}, + urldate = {2022-09-24}, + year = {2013}, +} + +' +@Online{CalFullWeek-Q, + author = {jd6}, + file = {Snapshot:https\://tex.stackexchange.com/questions/576673/full-weeks-in-tikz-calendar/660335#660335:text/html}, + month = dec, + title = {Full weeks in Tikz Calendar}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/q/576673/16595}, + urldate = {2022-10-09}, + year = {2020}, +} + +@Online{CalFullWeek-A, + author = {Qrrbrbirlbel}, + file = {Snapshot:https\://tex.stackexchange.com/questions/576673/full-weeks-in-tikz-calendar/660335#660335:text/html}, + month = oct, + title = {Answer to \enquote{Full weeks in Tikz Calendar}}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/a/660335/16595}, + urldate = {2022-10-09}, + year = {2022}, +} + +@Comment{jabref-meta: databaseType:bibtex;} diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual.pdf b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual.pdf new file mode 100644 index 0000000000..f4a31a8c6a Binary files /dev/null and b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual.pdf differ diff --git a/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual.tex b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual.tex new file mode 100644 index 0000000000..253944ca7d --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/generic/tikz-ext/tikz-ext-manual.tex @@ -0,0 +1,28 @@ +% !TeX TS-program = lualatex +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% arara: lualatex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\documentclass[a4paper,doc2,landscape]{ltxdoc} +\input{tikz-ext-manual-en-main-preamble.tex} +\usetikzlibrary{external} + \tikzexternalize[ + prefix=tikz/, +% mode=convert with system call, + %mode=list and make, + %mode=list only,export=true,% simply skips EVERY picture -> good for debugging the text. + ] + \tikzexternalenable +% \tikzexternaldisable + \tikzifexternalizing{ + \pgfkeys{/pdflinks/codeexample links=false} + }{} + +\input{tikz-ext-manual-en-main-body.tex} diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-calendar.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-calendar.tex deleted file mode 100644 index 4f2300a458..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-calendar.tex +++ /dev/null @@ -1,82 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\section{Calendar: Weeknumbers and more conditionals} -\label{sec:calendar} -\begin{package}{calendar-ext} - This package adds week numbers and more conditionals to the \pgfname\space package |pgfcalendar|. - (Despite the code example above, this package is not set up to work with Con\TeX t.) - \inspiration{WeekNum-Q,CalCond-Q}{WeekNum-A,CalCond-A} -\end{package} - -%This package extends the |pgfcalendar| package. - -\begin{multicols}{2} - -\subsection{Extensions} - -The following tests are added. -\begin{itemize} -\itemcalendaroption{Jan} This test is passed by all dates that are in the month of January. -\itemcalendaroption{Feb} as above. -\itemcalendaroption{Mar} as above. -\itemcalendaroption{Apr} as above. -\itemcalendaroption{May} as above. -\itemcalendaroption{Jun} as above. -\itemcalendaroption{Jul} as above. -\itemcalendaroption{Aug} as above. -\itemcalendaroption{Sep} as above. -\itemcalendaroption{Oct} as above. -\itemcalendaroption{Nov} as above. -\itemcalendaroption{Dec} as above. -\itemcalendaroption{leap year}\opt{|=|\meta{year}} - This test checks whether the given year is a leap year. If - \meta{year} is omitted, it checks the year of the current date. -\itemcalendaroption{and}|=|\marg{tests} - This test passes when all \meta{tests} pass. -\itemcalendaroption{not}|=|\marg{tests} - This test passes when \meta{tests} do not pass. -\itemcalendaroption{yesterday}|=|\marg{tests} - This test passes when the previous day passes \meta{tests}. -\itemcalendaroption{week}|=|\meta{num} - This test passes when the current week of the year equals \marg{num}. -\end{itemize} - -The shorthands for |d-| and |m-| are slightly changed so that they are -expandable. This makes it possible to use these shorthands inside of \pgfname math. -The shorthands for the week (see section~\ref{calendar:weeknumbering}) -are added. These are -\begin{itemize} -\item |n-| (shortest numerical representation), -\item |n=| (shortest but added horizontal space) and -\item |n0| (leading zero when below 10). -\end{itemize} - -\subsection{Week numbering (ISO~8601)} -\label{calendar:weeknumbering} -\begin{command}{\pgfcalendarjulianyeartoweek\marg{Julian day}\marg{year}\marg{week counter}} - This command calculates the week for the \meta{Julian day} of \meta{year}. - The \meta{week counter} must be a \TeX\space counter. - - The calculation follows the rule of ISO~8601 where the first week has that - year's first Thursday in it. -\end{command} - -Inside of |\pgfcalendar|\indexCommandO\pgfcalendar the command |\pgfcalendarcurrentweek| will be available. -\begin{command}{\pgfcalendarcurrentweek} - This command returns the current week number (always two digits -- use shorthand |n.| - to strip the leading zero). -\end{command} - -Inside of |\ifdate|\indexCommandO\ifdate the command |\pgfcalendarifdateweek| will be available. -\begin{command}{\pgfcalendarifdateweek} - This command returns the week number (always two digits). -\end{command} -\end{multicols} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-intro.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-intro.tex deleted file mode 100644 index f9468175cb..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-intro.tex +++ /dev/null @@ -1,31 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\part{Introduction} -\begin{multicols}{2} -\section{Usage} -This package is called |tikz-ext|, however, -one can't load it via |\usepackage|.% -\footnote{Except for \texttt{calendar-ext} of section~\ref{sec:calendar}.} -Instead, this package consists of multiple -\pgfname\space and \tikzname\space libraries -which are loaded by either |\usepgflibrary| or |\usetikzlibrary|. - -\section{Why do we need it?} -Since I have been answering questions on -\hyperlink{https://tex.stackexchange.com}{TeX.sx} -I've noticed that some questions come up again and again, -every time with a slightly different approach on how to solve them. - -I don't like reinventing the wheel which is why I've gathered -the solutions of my answers in this package. - -\section{Having problems?} -Don't hesitate to open an issue on GitHub. -\end{multicols} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-calendar-plus.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-calendar-plus.tex deleted file mode 100644 index bdfd225f3c..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-calendar-plus.tex +++ /dev/null @@ -1,81 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\section{Calendar} -\begin{tikzlibrary}{ext.calendar-plus} - This library extends the \tikzname\space library \referenceLibraryandIndexO{calendar}. - \inspiration{WeekNum-Q,CalCond-Q,CalMath-Q}{WeekNum-A,CalCond-A,CalMath-A} -\end{tikzlibrary} - -\begin{multicols}{2} - -\subsection{Value-keys and nestable \texttt{if} key} - -The values of following keys are originally stored in some macros that are not -accessible by the user. These are now simple value-keys. -The |@|-protected macros are still available, of course. - -\begin{key}{/tikz/day xshift (initially 3ex)} -\end{key} -\begin{key}{/tikz/day yshift (initially 3.5ex)} -\end{key} -\begin{key}{/tikz/month xshift (initially 9ex)} -\end{key} -\begin{key}{/tikz/month yshift (initially 9ex)} -\end{key} - -It is now also possible to nest |/tikz/if| occurrences. -\begin{key}{/tikz/if=|(|\meta{conditions}|)|\meta{code or options}\opt{|else|\meta{else code or options}}} -\end{key} - -\subsection{\pgfname math functions} -\begin{math-function}{weeksinmonthofyear(\mvar{first weekday}, \mvar{month}, \mvar{year})} -\mathcommand - Returns the number of (partial) weeks in the month \mvar{month} of year \mvar{year} - when this month begins on a \mvar{first weekday}. -\end{math-function} -\begin{math-function}{lastdayinmonthofyear(\mvar{month}, \mvar{year})} -\mathcommand - Returns the last day (28, 29, 30 or 31) of month \mvar{month} of year \mvar{year}. -\end{math-function} - -\subsection{Week numbering (ISO~8601)} - -The actual week number algorithm is implemented by the |pgfcalendar-ext| package/module in section~\ref{calendar:weeknumbering}. -\begin{key}{/tikz/week code=\meta{code}} - Works like |/tikz/day code| or |/tikz/month code|, only for weeks.\indexKeyO{day code}\indexKeyO{month code} -\end{key} - -\begin{key}{/tikz/week text=\meta{text}} - Works like |/tikz/day text| or |/tikz/month text|, only for weeks.\indexKeyO{day text}\indexKeyO{month text} -\end{key} - -\begin{stylekey}{/tikz/every week} - Works like |/tikz/every day| or |/tikz/every month|, only for weeks.\indexKeyO{every day}\indexKeyO{every month} -\end{stylekey} - -\begin{stylekey}{/tikz/week label left} - Places the week label to the left of the first day of the month. (For - |week list| and |month list| where a week does not start on a Monday, the - position is chosen ``as if'' the week had started on a Monday -- which is - usually exactly what you want.) - % -\begin{codeexample}[preamble={\usetikzlibrary{ext.calendar-plus}}] -\tikz - \calendar [week list, month label above centered, - dates=2022-07-01 to 2022-07-31, - week label left, - every week/.append style={gray!50!black,font=\sffamily}]; -\end{codeexample} - % -\end{stylekey} - -\end{multicols} -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-misc.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-misc.tex deleted file mode 100644 index 163097e6a1..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-misc.tex +++ /dev/null @@ -1,246 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\section{And a little bit more} -\begin{tikzlibrary}{ext.misc} - This library adds miscellaneous utilities to \pgfname math, \pgfname\space or \tikzname. - \inspiration{FullArc-Q,ForeachUse-Q}{FullArc-A,ForeachUse-A} -\end{tikzlibrary} - -\subsection{\pgfname math} - -\begin{multicols}{2} -\pgfkeys{/codeexample/every codeexample/.append style={width=3cm}} -\subsubsection{Postfix operator \texttt{R}} - -Similar to |\segments[]| in PSTricks, the postfix operator |R| allows the user -to use an arbitrary number of segments of a circle to be used instead of an angle. - -\begin{key}{/tikz/full arc=\meta{num} (default |{}|)} - The number \meta{num} of segments will be set up. - Using |full arc| with an empty value disables the segmentation and |1R| equals $1^\circ$. - - The given value \meta{num} is evaluated when the key is used and doesn't change when - \meta{num} contains variables that change. -\end{key} -The |R| operator can then be used. -\begin{math-operator}{R}{postfix}{fullarc} - Multiplies \mvar{x} with $\frac{360}{\meta{num}}$. -\end{math-operator} - -\subsubsection{Functions} - -\begin{math-function}{strrepeat("\mvar{Text}", \mvar{x})} -\mathcommand - Returns a string with \mvar{Text} repeated \mvar{x} times. - -\begin{codeexample}[] -\pgfmathparse{strrepeat("foo", 5)} -\pgfmathresult -\end{codeexample} -\end{math-function} - -\begin{math-function}{isInString("\mvar{String}", "\mvar{Text}")} -\mathcommand - Returns |1| (true) if \mvar{Text} contains \mvar{String}, - otherwise |0| (false). - -\begin{codeexample}[] -\pgfmathparse{isInString("foo", "bar")} -\pgfmathresult \ and\ -\pgfmathparse{isInString("foo", "foobar")} -\pgfmathresult -\end{codeexample} -\end{math-function} - -\begin{math-function}{strcat("\mvar{Text A}", "\mvar{Text B}", …)} -\mathcommand - Returns the concatenation of all given parameters. - -\begin{codeexample}[] -\pgfmathparse{strcat("blue!", int(7*3), "!green")} -\pgfmathresult -\end{codeexample} -\end{math-function} - - -\begin{math-function}{isEmpty("\mvar{Text}")} -\mathcommand - Returns |1| (true) if \mvar{Text} is empty, otherwise |0| (false). - % -\begin{codeexample}[] -\pgfmathparse{isEmpty("foo")} \pgfmathresult\ and\ -\pgfmathparse{isEmpty("")} \pgfmathresult\ and\ -\def\emptyText{} -\pgfmathparse{isEmpty("\emptyText")} \pgfmathresult -\end{codeexample} -\end{math-function} - -\begin{math-function}{atanXY(\mvar{x},\mvar{y})} -\mathcommand - Arctangent of $\mvar y\div \mvar x$ in degrees. This also takes into account the quadrant. - This is just a argument-swapped version of |atan2|\indexMathFunctionO{atan2} which makes it easier to use - the |\p| commands of the |calc|\indexLibraryO{calc} library. - % -\begin{codeexample}[] -\pgfmathparse{atanXY(3,4)} \pgfmathresult -\end{codeexample} -\end{math-function} -\begin{math-function}{atanYX(\mvar{y},\mvar{x})} -\mathcommand - Arctangent of $y\div x$ in degrees. This also takes into account the quadrant. -\begin{codeexample}[] -\pgfmathparse{atanYX(4,3)} \pgfmathresult -\end{codeexample} -\end{math-function} - -\subsubsection{Functions: using coordinates} -The following functions can only be used with \pgfname\space and/or \tikzname. -Since the arguments are usually plain text (and not numbers) one has to wrap -them in |"|. -\begin{math-function}{anglebetween("\mvar{p1}", "\mvar{p2}")}\mathcommand - Return the angle between the centers of the nodes \mvar{p1} and \mvar{p2}. -\end{math-function} -\begin{math-function}{qanglebetween("\mvar{p}")}\mathcommand - Return the angle between the origin and the center of the node \mvar{p}. -\end{math-function} -\begin{math-function}{distancebetween("\mvar{p1}", "\mvar{p2}")}\mathcommand - Return the distance (in pt) between the centers of the nodes \mvar{p1} and \mvar{p2}. -\end{math-function} -\begin{math-function}{qdistancebetween("\mvar{p}")}\mathcommand - Return the distance (in pt) between the origin and the center of the node \mvar{p}. -\end{math-function} - -\end{multicols} - -\begin{codeexample}[width=6cm,preamble=\usetikzlibrary{calc,ext.misc,through}] -\begin{tikzpicture} -\path (0,0) coordinate (A) + (0:4) coordinate (B) +(75:4) coordinate (C); -\draw (A) -- (B) -- (C) -- cycle; -\foreach \cnt in {1,...,4}{ - \pgfmathsetmacro\triA{distancebetween("B","C")} - \pgfmathsetmacro\triB{distancebetween("C","A")} - \pgfmathsetmacro\triC{distancebetween("A","B")} - \path (barycentric cs:A=\triA,B=\triB,C=\triC) coordinate (M) - node [draw, circle through=($(A)!(M)!(C)$)] (M) {}; - \draw ($(C)-(A)$) coordinate (vecB) - (M.75-90) coordinate (@) - (intersection of @--[shift=(vecB)]@ and B--C) coordinate (C) -- - (intersection of @--[shift=(vecB)]@ and B--A) coordinate (A);} -\end{tikzpicture} -\end{codeexample} -\pagebreak -\subsection{\pgfname keys} -% -\begin{multicols}{2} -% -\subsubsection{Conditionals} - -\begin{key}{/utils/if=\meta{cond}\meta{true}\opt{\meta{false}}} - This key checks the conditional \meta{cond} and applies the styles \meta{true} - if \meta{cond} is true, otherwise \meta{false}. - \meta{cond} can be anything that \pgfname math understands. - - As a side effect on how \pgfname keys parses argument, the \meta{false} argument is - actually optional. -\end{key} - -The following keys use \TeX' macros |\if|, |\ifx|, |\ifnum| and |\ifdim| for faster -executions. - -\begin{key}{/utils/TeX/if=\meta{token A}\meta{token B}\meta{true}\opt{\meta{false}}} - This key checks via |\if| if \meta{token A} matches \meta{token B} - and applies the styles \meta{true} if it does, otherwise \meta{false}. - - As a side effect on how \pgfname keys parses argument, the \meta{false} argument is - actually optional. -\end{key} - -\begin{key}{/utils/TeX/ifx=\meta{token A}\meta{token B}\meta{true}\opt{\meta{false}}} - As above. -\end{key} - -\begin{key}{/utils/TeX/ifnum=\meta{num cond}\meta{true}\\opt{\meta{false}}} - This key checks |\ifnum|\meta{num cond} - and applies the styles \meta{true} if true, otherwise \meta{false}. - A delimiting |\relax| will be inserted after \meta{num cond}. - - As a side effect on how \pgfname keys parses argument, the \meta{false} argument is - actually optional. -\end{key} - -\begin{key}{/utils/TeX/ifdim=\meta{dim cond}\meta{true}\opt{\meta{false}}} - As above. -\end{key} - -\begin{key}{/utils/TeX/ifempty=\meta{Text}\meta{true}\opt{\meta{false}}} - This checks whether \meta{Text} is empty and applies styles \meta{true} if true, - otherwise \meta{false}. -\end{key} - - -\subsubsection{Handlers} - -While already a lot of values given to keys are evaluated by \pgfname math at some point, -not all of them are. - -\begin{handler}{{.pgfmath}|=|\meta{eval}} - This handler evaluates \meta{eval} before it is handed to the key. -\end{handler} - -\begin{handler}{{.pgfmath int}|=|\meta{eval}} - As above but truncates the result. -\end{handler} - -\begin{handler}{{.pgfmath strcat}|=|\meta{eval}} - As above but uses the |strcat| function. - - In the example below, one could have used the |/pgf/foreach/evaluate| key from |\foreach|. -\begin{codeexample}[width=3.7cm,preamble=\usetikzlibrary{misc}] -\tikz\foreach \i in {0,10,...,100} -\draw[ - line width=+.2cm, - color/.pgfmath strcat={"red!",sqrt(\i)*10,"!blue"} -] - (0,\i/50) -- +(right:3); -\end{codeexample} -\end{handler} - -\begin{handler}{{.List}|=|\meta{\meta{e1}, \meta{e2}, \dots, \meta{en}}} - This handler evaluates the given list with |\foreach| and concatenates the element and - the result is then given to the used key. -\end{handler} -\end{multicols} -\begin{codeexample}[width=6cm,preamble=\usetikzlibrary{fit,ext.misc}] -\begin{tikzpicture}[nodes={draw, dashed, inner sep=+10pt}] - \foreach \point [count=\cnt] in {(0,0), (0,2), (2,0), (2,2), (3,3), (-1,-1)} - \fill \point circle[radius=.1] coordinate (point-\cnt); - \node[gray, fit/.List={(point-1),(point-...),(point-4)}] {}; - \node[red, fit/.List={(point-1),(point-...),(point-5)}] {}; - \node[blue, fit/.List={(point-1),(point-...),(point-6)}] {}; -\end{tikzpicture} -\end{codeexample} - -\subsection{\pgfname for} - -Instead of |\foreach \var in {start, start + delta, ..., end}| one can use -|\foreach \var[use int=start to end step delta]|. - -\begin{key}{/pgf/foreach/use int=\meta{start}|to|\meta{end}\opt{|step|\meta{delta}}} -The values \meta{start}, \meta{end} and \meta{delta} are evaluates by \pgfname math at initialization. -The part |step |\meta{delta} is optional (\meta{delta} = 1). -\end{key} - -\begin{key}{/pgf/foreach/use float=\meta{start}|to|\meta{end}\opt{|step|\meta{delta}}} -Same as above, however the results are not truncated. -\end{key} - -%TODO: edges to and edges through -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-node-families.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-node-families.tex deleted file mode 100644 index d4b274511c..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-node-families.tex +++ /dev/null @@ -1,124 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\section{Node Families} -\begin{tikzlibrary}{ext.node-families} - With this library the user can instruct multiple nodes to have the same - width, height, text width, text height or text width. - This uses the hook \referenceKeyandIndexO{execute at end picture} to write the nodes' - measurements to the \filetype{aux} file. - - Unfortunately, this does not work with the |external| library.\indexLibraryO{external}% - \footnote{First of all, I can't figure out how to use the \textsc{aux} file during externalization since it gets written to the \textsc{log} instead. - And then there's the question about how \texttt{external} would notice the need to export the picture again until it's stable \dots} - - \inspiration{NodeFam-Q}{NodeFam-A} - -\end{tikzlibrary} - -Before we get to the interesting keys, a common prefix can be set for the families' names. -Initially this is |\pgfpictureid-| so that families of different pictures don't interact. -\begin{key}{/tikz/node family/prefix=\meta{prefix}(initially \string\pgfpictureid-)} -The family names are prefixed with the value of |/tikz/node family/prefix|. -\end{key} - -\subsection{Text Box} -\label{ssec:nf-text} -The following keys~-- when setup, see below~-- work with every shape with one single node part.% -\footnote{Technically, it will also work with shapes with multiple node parts but it will only affect the main node part.} -Initially though, only \referenceShapeandIndexO{circle} and \referenceShapeandIndexO{rectangle} are set up that way. -\begin{key}{/tikz/node family/text height=\meta{name} (initially \{\})} -Nodes with the same \meta{name} will have the same text height. -An empty \meta{name} disables the evaluation by the library. -\end{key} - -\begin{key}{/tikz/node family/text depth=\meta{name} (initially \{\})} -Nodes with the same \meta{name} will have the same text depth. -An empty \meta{name} disables the evaluation by the library. -\end{key} - -\begin{key}{/tikz/node family/text width=\meta{name} (initially \{\})} -Nodes with the same \meta{name} will have the same text width. -An empty \meta{name} disables the evaluation by the library. -\end{key} - -\begin{key}{/tikz/node family/text=\meta{name}} -Sets |text height|, |text depth| and |text width|. -\end{key} - -Since the width of the node's content's box is setup much earlier, -the previous key only extends the width of that box which would make the text -seem as if it where aligned to the left. -With |text width family align| this can changed. -\begin{key}{/tikz/node family/text width align=\meta{alignment}(initially center)} -\meta{alignment} is one of |left|, |center| or |right|. - -\begin{codeexample}[preamble=\usetikzlibrary{positioning,ext.node-families},/tikz/node distance=.5cm] -\tikzexternaldisable % ext.node-families does not work with active externalization -\begin{tikzpicture}[nodes={rectangle, draw, node family={text width=manual, text width align=right}}] -\node (a) {Foo}; -\node[below=of a] (b) {Foobar}; -\end{tikzpicture} -\end{codeexample} -\end{key} - -\begin{key}{/tikz/node family/setup shape=\meta{shape}} -This adds instructions to the \meta{shape}'s definition which -adjust the text box's dimensions according to the family. - -This should be only used once per shape. -\end{key} - -\subsection{Minimum Width/Height} -While the keys of the previous subsection work well enough for nodes of the same shape -(and the same |inner sep|s), for different node shapes the text box dimensions will be used -differently for the node's total dimension. - -For this, the following keys are necessary. -When one of the keys are used the values of |minimum width| and/or |minimum height| are set to |nf_width| or |nf_height| respectively. -\begin{key}{/tikz/node family/width=\meta{name} (initially \{\})} -Nodes with the same \meta{name} will have the same \referenceKeyandIndexO[/pgf/]{minimum width}. -An empty \meta{name} disables the evaluation by the library. -\begin{codeexample}[preamble=\usetikzlibrary{positioning,ext.node-families},/tikz/node distance=.5cm] -\tikzexternaldisable % ext.node-families does not work with active externalization -\begin{tikzpicture}[nodes={rectangle, draw, node family/width=manual}] -\node (a) {Foo}; -\node[below=of a] (b) {Foobar}; -\end{tikzpicture} -\end{codeexample} -\end{key} -\begin{key}{/tikz/node family/height=\meta{name} (initially \{\})} -Nodes with the same \meta{name} will have the same \referenceKeyandIndexO[/pgf/]{minimum height}. -An empty \meta{name} disables the evaluation by the library. -\end{key} -\begin{key}{/tikz/node family/size=\meta{name}} -Sets both |height| and |width|. -\end{key} - -\clearpage -\subsection{More shapes that support the keys \texttt{width} and \texttt{height}} -\begin{tikzlibrary}{ext.node-families.shapes.geometric} - This library adds support for the keys \referenceKeyandIndex[/tikz/node family/]{width} and - \referenceKeyandIndex[/tikz/node family/]{height} for the shapes of - the \pgfname\space library \referenceLibraryandIndexO{shapes.geometric}. - - \inspirationQ{NodeFam-Ellipse} -\end{tikzlibrary} -The shapes are also setup for the keys from subsection~\ref{ssec:nf-text}. - -\begin{codeexample}[width=9cm,preamble=\usetikzlibrary{ext.node-families.shapes.geometric}] -\tikzexternaldisable % ext.node-families does not work with active externalization -\begin{tikzpicture} -\foreach \cnt[count=\Cnt] in {a,...,h} - \node[draw, diamond, node family/text=aTOh] (\cnt) - at (right:\Cnt) {\cnt}; -\draw[help lines] (a.south) -- (h.south) (a.north) -- (h.north) (a.base-|a.west) -- (h.base-|h.east); -\end{tikzpicture} -\end{codeexample} -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.arcto.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.arcto.tex deleted file mode 100644 index 8ed660b3a3..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.arcto.tex +++ /dev/null @@ -1,110 +0,0 @@ -% !TeX root = tikz-ext-manual.tex -% !TeX spellcheck = en_US -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\section{Arc \emph{to} a point} -\label{library:paths.arcto} - -\begin{tikzlibrary}{ext.paths.arcto} - This library adds the new path operation |arc to| that specifies an arc \emph{to} a point~-- - without the user having to specify any angles. -\end{tikzlibrary} - -\begin{codeexample}[width=.5\linewidth,preamble=\usetikzlibrary{ext.paths.arcto}] -\begin{tikzpicture}[ultra thick,dot/.style={label={#1}}] -\coordinate[dot=below left:$a$] (a) at (0,0); -\coordinate[dot=above right:$b$] (b) at (2,3); -\begin{scope}[ - radius=3, - nodes={ - shape=circle, - fill=white, - fill opacity=.9, - text opacity=1, - inner sep=+0pt, - sloped, - allow upside down - }] -\draw[blue] (a) arc to[] - node[near start] {.25} node {.5} node[near end] {.75} (b); -\draw[red] (a) arc to[clockwise] - node[near start] {.25} node {.5} node[near end] {.75} (b); -\draw[blue!50] (a) arc to[large] - node[near start] {.25} node {.5} node[near end] {.75} (b); -\draw[red!50] (a) arc to[large, clockwise] - node[near start] {.25} node {.5} node[near end] {.75} (b); -\end{scope} - -\fill[radius=2pt] (a) circle[] (b) circle[]; -\end{tikzpicture} -\end{codeexample} - -\begin{pathoperation}{arc to}{\opt{\oarg{options}}\meta{coordinate or cycle}} -When this operation is used, the path gets extended by an arc that goes through -the current point and \meta{coordinate}. - -For two points there exist two circles or four arcs that go through or connect -these two points. Which one of these is constructed is determined by the following -options that can be used inside of \meta{options}. - -\begin{stylekey}{/tikz/arc to/clockwise} - This constructs an arc that goes clockwise. -\end{stylekey} - -\begin{stylekey}{/tikz/arc to/counter clockwise} - This constructs an arc that goes counter clockwise. - - This is the default. -\end{stylekey} - -\begin{stylekey}{/tikz/arc to/large} - This constructs an arc whose angle is larger than $180^\circ$. -\end{stylekey} - -\begin{stylekey}{/tikz/arc to/small} - This constructs an arc whose angle is smaller than $180^\circ$. -\end{stylekey} - -\begin{key}{/tikz/arc to/rotate=\meta{degree}} - Rotates the arc by \meta{degree}. - This is only noticeable when |x radius| and |y radius| are different. -\end{key} - -\begin{key}{/tikz/arc to/x radius=\meta{value}} - This forwards the \meta{value} to \referenceKeyandIndexO{x radius}. - Its \meta{value} is used for the radius of the arc. -\end{key} - -\begin{key}{/tikz/arc to/y radius=\meta{value}} - This forwards the \meta{value} to \referenceKeyandIndexO{y radius}. - Its \meta{value} is used for the radius of the arc. -\end{key} - -\begin{key}{/tikz/arc to/radius=\meta{value}} - This forwards the \meta{value} to both |/tikz/x radius| and |/tikz/y radius|. - Its \meta{value} is used for radius of the arc. -\end{key} - -\begin{stylekey}{/tikz/every arc to} - After |/tikz/every arc| this will also be applied before any \meta{options} are set. -\end{stylekey} - -It should be noted that this uses |\pgfpatharcto| for which the \tikzname\space manual warns:\indexCommandO\pgfpatharcto -\begin{quote}\itshape - The internal computations necessary for this command are numerically very unstable. - In particular, the arc will not always really end at the \meta{target coordinate}, - but may be off by up to several points. - A more precise positioning is currently infeasible due to \TeX's numerical weaknesses. - The only case it works quite nicely is when the resulting angle is a multiple of $90^\circ$. -\end{quote} - -The |arc to| path operation will also work only in the |canvas| coordinate system. -The lengths of the vectors $(1, 0)$ and $(0, 1)$ will be used for the calculation of the radii -but no further consideration is done. -\end{pathoperation} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.ortho.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.ortho.tex deleted file mode 100644 index a46f6be023..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.ortho.tex +++ /dev/null @@ -1,185 +0,0 @@ -% !TeX root = tikz-ext-manual.tex -% !TeX spellcheck = en_US -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\section{More Horizontal and Vertical Lines} -\label{library:paths.ortho} - -\begin{tikzlibrary}{ext.paths.ortho} - This library adds new path specifications \verb!|-|!, \verb!-|-! as well as - |r-ud|, |r-du|, |r-lr| and |r-rl|. -\end{tikzlibrary} - -\subsection{Zig-Zag} -Similar to the path operations \verb!|-! and \verb!-|! this library adds\indexPathOperationO{\protect\pgfmanualbar-}\indexPathOperationO{-\protect\pgfmanualbar} -the path operations \verb!|-|! and \verb!-|-!. -{\catcode`\|=12 -\begin{pathoperation}[noindex]{|-|}{\opt{\oarg{options}}\meta{coordinate or cycle}} - \index{---1@\protect\texttt{\protect\pgfmanualbar-\protect\pgfmanualbar} path operation}% - \index{Path operations!---1@\protect\texttt{\protect\pgfmanualbar-\protect\pgfmanualbar}}% - \pgfmanualpdflabel[\catcode`\|=12 ]{|-|}{}% - This operation means ``first vertical, then horizontal and then vertical again''. -\end{pathoperation} -\begin{pathoperation}[noindex]{-|-}{\opt{\oarg{options}}\meta{coordinate or cycle}} - \index{--1@\protect\texttt{-\protect\pgfmanualbar-} path operation}% - \index{Path operations!--1@\protect\texttt{-\protect\pgfmanualbar-}}% - \pgfmanualpdflabel[\catcode`\|=12 ]{-|-}{}% - This operation means ``first horizontal, then vertical and then horizontal again''. -\end{pathoperation} -} -\begin{key}{/tikz/hvvh/ratio=\meta{ratio} (initially 0.5)} - This sets the ratio for the middle part of the Zig-Zag connection. - - For values $\meta{ratio} < 0$ and $\meta{ratio} > 1$ the Zig-Zag lines will - look more like Zig-Zig lines. -\begin{codeexample}[preamble=\usetikzlibrary{paths.ortho}] -\begin{tikzpicture}[very thick, rounded corners] -\draw[help lines] (-.25, -1.25) grid (2.25, 1.25); -\draw (0, 0) -|- (2, 1) -- - (2, 0) -|-[ratio=.25] (0,-1) -- cycle; -\end{tikzpicture} -\end{codeexample} -\end{key} -%TODO: hvvh/distance needs fixing, maybe? -\begin{key}{/tikz/hvvh/distance=\meta{distance}} - This sets the distance between the start point - and the middle part of the Zig-Zag connection. - - For values $\meta{distance} < 0$ the distance will be used for the target coordinate. -\begin{codeexample}[width=8cm,preamble=\usetikzlibrary{ext.paths.ortho}] -\begin{tikzpicture}[very thick,-latex] -\draw[help lines,-] (-.25, -.25) grid (5.25, 3.25); -\draw (0, 0) -|-[distance= .5cm] ++(2, 1); -\draw (0, 2) -|-[distance=-.5cm] ++(2, 1); - -\tikzset{xshift=3cm} -\draw (2, 1) -|-[distance= .5cm] ++(-2, -1); -\draw (2, 3) -|-[distance=-.5cm] ++(-2, -1); -\end{tikzpicture} -\end{codeexample} -\end{key} -\begin{key}{/tikz/hvvh/from center=\opt{\meta{true or false}} (default true)} - When nodes get connected the placement of the middle part of the Zig-Zag - and the Zig-Zig (see below) connections will be calculated from the border - of these nodes. - The middle part of the connections can be calculated from the nodes' center - if this key is set to |true|. -\end{key} - -New timers are setup for both the Zig-Zag and the Zig-Zig connections, -these can be configured through the following keys. -\begin{codeexample}[width=8cm,preamble=\usetikzlibrary{paths.ortho}] -\tikz \draw (0,0) -|- (2,3) - foreach \p in {0.0, 0.25, 0.5, 0.75, 1.0}{ - node [pos=\p] {\p}}; -\end{codeexample} -\begin{key}{/tikz/hvvh/spacing=\meta{number} (initially 4)} - Unless $\meta{number} = 0$ is set - \begin{itemize} - \item |pos = 0| will be at the start,\indexKeyO{pos} - \item |pos = 1| will be at the end, - \item |pos = |$\frac{1}{\meta{number}}$ will be at the first kink, - \item |pos = |$\frac{\meta{number}-1}{\meta{number}}$ will be at the second kink and - \item |pos = .5| will be in the middle of the middle part of the connection. - \end{itemize} - - If $\meta{number} = 0$ then - \begin{itemize} - \item |pos = -1| will be at the start, - \item |pos = 2| will be at the end, - \item |pos = 0| will be at the first kink, - \item |pos = 1| will be at the second kink and - \item |pos = .5| will still be in the middle of the middle part of the connection. - \end{itemize} -\end{key} -\begin{key}{/tikz/hvvh/middle 0 to 1} - This is an alias for |spacing = 0|. -\end{key} - -\subsection{Zig-Zig} -\begin{pathoperation}{r-ud}{\opt{\oarg{options}}\meta{coordinate or cycle}} - This operation means ``first up, then horizontal and then down''. - \begin{key}{/tikz/udlr/ud distance=\meta{length} (initially .5cm)} - This sets the distance between the start and the horizontal line to \meta{length}. - \end{key} -\end{pathoperation} -\begin{pathoperation}{r-du}{\opt{\oarg{options}}\meta{coordinate or cycle}} - This operation means ``first down, then horizontal and then up''. - \begin{key}{/tikz/udlr/du distance=\meta{length} (initially .5cm)} - This sets the distance between the start and the horizontal line to \meta{length}. - \end{key} -\end{pathoperation} -\begin{pathoperation}{r-lr}{\opt{\oarg{options}}\meta{coordinate or cycle}} - This operation means ``left down, then vertical and then right''. - \begin{key}{/tikz/udlr/lr distance=\meta{length} (initially .5cm)} - This sets the distance between the start and the vertical line to \meta{length}. - \end{key} -\end{pathoperation} -\begin{pathoperation}{r-rl}{\opt{\oarg{options}}\meta{coordinate or cycle}} - This operation means ``first right, then vertical and then down''. - \begin{key}{/tikz/udlr/rl distance=\meta{length} (initially .5cm)} - This sets the distance between the start and the vertical line to \meta{length}. - \end{key} -\end{pathoperation} - -All distances can be set with on key. -\begin{key}{/tikz/udlr/distance=\meta{length}} - Sets all distances in the |/tikz/udlr| namespace. -\end{key} - -\begin{key}{/tikz/udlr/from center=\opt{\meta{true or false}} (initially false, default true)} - This is an alias for |/tikz/hvvh/from center|. -\end{key} - -\subsection{Even more Horizontal and Vertical Lines} - -The following keys can be used to access vertical and horizontal line path operations. -\begin{stylekey}{/tikz/horizontal vertical} - This installs \verb!to path = -| (\tikztotarget) \tikztonodes! that can be used with\indexKeyO{to path} - the path operations |to| or |edge|. -\end{stylekey} -\begin{stylekey}{/tikz/vertical horizontal} - This installs \verb!to path = |- (\tikztotarget) \tikztonodes! that can be used with - the path operations |to| or |edge|. -\end{stylekey} -\begin{stylekey}{/tikz/horizontal vertical horizontal} - This installs \verb!to path = -|- (\tikztotarget) \tikztonodes! that can be used with - the path operations |to| or |edge|. -\end{stylekey} -\begin{stylekey}{/tikz/vertical horizontal vertical} - This installs \verb!to path = |-| (\tikztotarget) \tikztonodes! that can be used with - the path operations |to| or |edge|. -\end{stylekey} - -When connecting rectangular nodes, these keys could be useful as well. -They all need to be given to a |to| or |edge| path operation. -\begin{stylekey}{/tikz/only vertical second=\opt{\meta{length}} (default 0pt)} -This draws a vertical line from the start point to the target point so that -it connects to the target point in the center (or at its border in case it is a node). - -The optional \meta{length} can be used to shift the line orthogonally to its direction. -\end{stylekey} -\begin{stylekey}{/tikz/only horizontal second=\opt{\meta{length}} (default 0pt)} -This draws a horizontal line from the start point to the target point so that -it connects to the target point in the center (or at its border in case it is a node). - -The optional \meta{length} can be used to shift the line orthogonally to its direction. -\end{stylekey} -\begin{stylekey}{/tikz/only vertical first=\opt{\meta{length}} (default 0pt)} -This draws a vertical line from the start point to the target point so that -it connects to the start point in the center (or at its border in case it is a node). - -The optional \meta{length} can be used to shift the line orthogonally to its direction. -\end{stylekey} -\begin{stylekey}{/tikz/only horizontal first=\opt{\meta{length}} (default 0pt)} -This draws a horizontal line from the start point to the target point so that -it connects to the start point in the center (or at its border in case it is a node). - -The optional \meta{length} can be used to shift the line orthogonally to its direction. -\end{stylekey} diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.timer.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.timer.tex deleted file mode 100644 index 595a647917..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.timer.tex +++ /dev/null @@ -1,92 +0,0 @@ -% !TeX root = tikz-ext-manual.tex -% !TeX spellcheck = en_US -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\section{Extending the Path Timers} -\label{library:timer} - -\begin{tikzlibrary}{ext.paths.timer} - This library adds timers to the path specifications |rectangle|, |parabola|, |sin| and |cos|. - - \inspiration{TimerRect-Q,TimerPara-Q}{TimerRect-A,TimerPara-A} -\end{tikzlibrary} - -In \tikzname, the path specification |rectangle|, |parabola|, |sin| and |cos| do not provide -their own timer, i.\,e. a node placing algorithm that is dependent on the actual path. -For |rectangle| the timer of the straight line between the rectangle's corners is used, for -the other paths, nodes, coordinates, pics, etc. are placed on the last coordinate. - -This library allows this. - -\subsection{Rectangle} -\indexPathOperationO{rectangle} - -For the |rectangle| path operator, the timer starts with |pos = 0| (= |at start|) from\indexKeyO{pos} -the starting coordinate in a counter-clockwise direction along the rectangle. -The corners will be at positions 0.0, 0.25, 0.5, 0.75 and 1.0. - -\begin{codeexample}[width=10cm,preamble=\usetikzlibrary{ext.paths.timer}] -\begin{tikzpicture}[scale=2, every pin edge/.style={latex-, gray}] -\coordinate [label=above right:Target] (A) at (0,0); -\coordinate [label=below left:Start] (B) at (1,2); -\draw[->, help lines] ([shift=(50:.3 and .75)] .5,1) - arc[start angle=50, delta angle=340, x radius=.3, y radius=.75]; -\draw (B) rectangle (A) - foreach \pos/\ang in {at start/60, very near start/90, near start/180, pos=.375/180, - midway/180, pos=.625/270, near end/0, very near end/0, at end/0}{ - node[pin=\ang:\pos, style/.expanded=\pos]{}}; -\end{tikzpicture} -\end{codeexample} - -\subsection{Parabola} -\indexPathOperationO{parabola}% - -For the |parabola| path operator the timer is similar to the |.. controls ..| operator. - -The position 0.5 will lie at the |bend|. -\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{ext.paths.timer}] -\begin{tikzpicture} -\draw[help lines] (-2.25, -1.25) grid (2.25, 3.25); -\draw ( 2,-1) parabola bend (0,0) (-1,3); -\draw[ultra thick] (-2,-1) parabola bend (0,0) ( 1,3) - foreach \pos in {1,...,4,6,7,...,9}{ - node[ - pos=.\pos, sloped, fill=white, font=\small, inner sep=+0pt - ] {\pos} - }; -\end{tikzpicture} -\end{codeexample} - -If no |bend| is specified half the positions will collapse into one end of the curve. - -\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{ext.paths.timer}] -\begin{tikzpicture}[every pin edge/.style={latex-, shorten <=1pt, gray}] -\draw (-2,-2) parabola (1,0) - foreach \pos in {0, 1, ..., 10} { - node [pos=\pos/10, pin={[anchor=-18*\pos+90]-18*\pos+270:\pos}]{} - }; -\end{tikzpicture} -\end{codeexample} - -\subsection{Sine/Cosine} -\indexPathOperationO{sin}\indexPathOperationO{cos}% - -The |sin| and |cos| path operators also allow placing of nodes along their paths. - -\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{ext.paths.timer}] -\begin{tikzpicture}[mark nodes on line/.style={insert path={ - foreach \pos in {1, ..., 9} {node[ - sloped, fill=white, font=\small, inner sep=+0pt, pos=\pos/10] {\pos}}}}] -\draw[help lines] (-2.1,-2.1) grid (2.1,0.1); -\draw (-2,-2) sin (1,0) [mark nodes on line]; -\draw[shift=(0:1)](-2,-2) cos (1,0) [mark nodes on line]; -\end{tikzpicture} -\end{codeexample} - -\endinput diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-patterns.images.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-patterns.images.tex deleted file mode 100644 index c3c38a8517..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-patterns.images.tex +++ /dev/null @@ -1,52 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\clearpage -\section{Using Images as a Pattern} -\label{library:patterns.images} - -\begin{tikzlibrary}{ext.patterns.images} - This library allows to use an image to be used as a repeating pattern for a path. - - \inspiration{Pattern-Q}{Pattern-A} -\end{tikzlibrary} - -With this library arbitrary images (or indeed PDF documents) can be used as -a repeating pattern for the background of a path. - -This is a two-step process: -\begin{enumerate} -\item Declaring an image as an ``image-pattern''. -\item Using the ``image-pattern''. -\end{enumerate} - -\begin{command}{\pgfsetupimageaspattern\oarg{options}\marg{name}\marg{image}} -\end{command} - -\begin{key}{/tikz/image as pattern=\meta{options} (default \{\})} - -\begin{codeexample}[preamble=\usetikzlibrary{ext.patterns.images,shapes.geometric}] -\pgfsetupimageaspattern[width=.5cm]{grid}{example-image-1x1} -\tikz \node[star, minimum size=3cm, draw, - image as pattern={name=grid,options={left, bottom, y=-.5cm, rotate=45}}] {}; -\end{codeexample} -\end{key} - -\begin{key}{/tikz/image as pattern/name=\meta{name}} -Specifies the name of the ``image-pattern'' to be used. -\end{key} - -\begin{stylekey}{/tikz/image as pattern/option} -Options that will be used by the internal |\pgftext|,\indexCommandO{\pgftext} -only keys from |/pgf/text| should be used.\indexKeyO[/pgf/]{text} -\end{stylekey} - -\begin{stylekey}{/tikz/image as pattern/options=\meta{style}} -Appends style |/tikz/image as pattern/option|. -\end{stylekey} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-positioning-plus.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-positioning-plus.tex deleted file mode 100644 index 56c81376aa..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-positioning-plus.tex +++ /dev/null @@ -1,183 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\clearpage -\section{Positioning Plus} -\label{library:positioning-plus} -\tikzsetnextfilename{posplus} -\begin{tikzlibrary}{ext.positioning-plus} - With the help of the \referenceLibraryandIndexO{positioning} and the \referenceLibraryandIndexO{fit} library this extends the placement of nodes. -\end{tikzlibrary} - -\subsection{Useful corner anchors} -The anchors |corner north east|, |corner north west|, |corner south west| and |corner south east| -are defined as ``generic anchors'', i.\,e. they are defined for all shapes. -This is mostly useful for the placement of circular shapes. -\begin{stylekey}{/tikz/corner above left=\opt{\meta{specification}} (default 0pt)} - Similar as \referenceKeyandIndexO{above left} of the \tikzname\space library |positioning| - but uses the |corner north west| anchor. -\end{stylekey} -\begin{stylekey}{/tikz/corner below left=\opt{\meta{specification}} (default 0pt)} - Similar as \referenceKeyandIndexO{below left} of the \tikzname\space library |positioning| - but uses the |corner south west| anchor. -\end{stylekey} -\begin{stylekey}{/tikz/corner above right=\opt{\meta{specification}} (default 0pt)} - Similar as \referenceKeyandIndexO{above right} of the \tikzname\space library |positioning| - but uses the |corner north east| anchor. -\end{stylekey} -\begin{stylekey}{/tikz/corner below right=\opt{\meta{specification}} (default 0pt)} - Similar as \referenceKeyandIndexO{below right} of the \tikzname\space library |positioning| - but uses the |corner south east| anchor. -\end{stylekey} - -\begin{codeexample}[width=.6\linewidth,preamble=\usetikzlibrary{ext.positioning-plus}] -\Huge -\begin{tikzpicture} -\node[name=s,shape=circle,shape example] - {Circle\vrule width 1pt height 2cm}; -\foreach \anchor/\placement in { - north west/above left, north/above, north east/above right, - west/left, center/above, east/right, - mid west/right, mid/above, mid east/left, - base west/left, base/below, base east/right, - south west/below left, south/below, south east/below right, - text/left, 10/right, 130/above} - \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} - node[\placement] {\scriptsize\texttt{(s.\anchor)}}; -\draw (s.corner north west) rectangle (s.corner south east); -\foreach \anchor/\placement in { - corner north west/above left, corner north east/above right, - corner south west/below left, corner south east/below right} - \draw[red,shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} - node[\placement] {\scriptsize\texttt{(s.\anchor)}}; -\end{tikzpicture} -\end{codeexample} - -\subsection{Useful placement keys for vertical and horizontal alignment} -\begin{stylekey}{/tikz/north left=\opt{\meta{specification}} (default 0pt)} - Like \referenceKeyandIndexO{left} but aligns the nodes at their |north| border. - - This is basically the same as |left=of reference.north west, anchor=north east|. - % -\begin{codeexample}[preamble=\usetikzlibrary{ext.positioning-plus}] -\begin{tikzpicture}[nodes=draw] -\node[minimum height=2cm] (a) {}; -\node[minimum height=3cm, north right=of a] {}; -\end{tikzpicture} -\end{codeexample} -\end{stylekey} -\begin{stylekey}{/tikz/north right=\opt{\meta{specification}} (default 0pt)} - Like \referenceKeyandIndexO{right} but aligns the nodes at their |north| border. - - This is basically the same as |left=of reference.north east, anchor=north west|. -\end{stylekey} -\begin{stylekey}{/tikz/south left=\opt{\meta{specification}} (default 0pt)} - Like \referenceKeyandIndexO{left} but aligns the nodes at their |south| border. - - This is basically the same as |left=of reference.south west, anchor=south east|. -\end{stylekey} -\begin{stylekey}{/tikz/south right=\opt{\meta{specification}} (default 0pt)} - Like \referenceKeyandIndexO{right} but aligns the nodes at their |south| border. - - This is basically the same as |left=of reference.south east, anchor=south west|. -\end{stylekey} -\begin{stylekey}{/tikz/west above=\opt{\meta{specification}} (default 0pt)} - Like \referenceKeyandIndexO{above} but aligns the nodes at their |west| border. - - This is basically the same as |left=of reference.north west, anchor=south west|. -\end{stylekey} -\begin{stylekey}{/tikz/west below=\opt{\meta{specification}} (default 0pt)} - Like \referenceKeyandIndexO{below} but aligns the nodes at their |west| border. - - This is basically the same as |left=of reference.south west, anchor=north west|. -\end{stylekey} -\begin{stylekey}{/tikz/east above=\opt{\meta{specification}} (default 0pt)} - Like \referenceKeyandIndexO{above} but aligns the nodes at their |east| border. - - This is basically the same as |left=of reference.north east, anchor=south east|. -\end{stylekey} -\begin{stylekey}{/tikz/east below=\opt{\meta{specification}} (default 0pt)} - Like \referenceKeyandIndexO{below} but aligns the nodes at their |east| border. - - This is basically the same as |left=of reference.south east, anchor=north east|. -\end{stylekey} - -The same exist for the recently introduces corner anchors, too. -\begin{stylekey}{/tikz/corner north left=\opt{\meta{specification}} (default 0pt)} - The same as |/tikz/north left| but uses the new corner anchors. -\end{stylekey} -\begin{stylekey}{/tikz/corner north right=\opt{\meta{specification}} (default 0pt)} - The same as |/tikz/north right| but uses the new corner anchors. -\end{stylekey} -\begin{stylekey}{/tikz/corner south left=\opt{\meta{specification}} (default 0pt)} - The same as |/tikz/south left| but uses the new corner anchors. -\end{stylekey} -\begin{stylekey}{/tikz/corner south right=\opt{\meta{specification}} (default 0pt)} - The same as |/tikz/south right| but uses the new corner anchors. -\end{stylekey} -\begin{stylekey}{/tikz/corner west above=\opt{\meta{specification}} (default 0pt)} - The same as |/tikz/west above| but uses the new corner anchors. -\end{stylekey} -\begin{stylekey}{/tikz/corner west below=\opt{\meta{specification}} (default 0pt)} - The same as |/tikz/west below| but uses the new corner anchors. -\end{stylekey} -\begin{stylekey}{/tikz/corner east above=\opt{\meta{specification}} (default 0pt)} - The same as |/tikz/east above| but uses the new corner anchors. -\end{stylekey} -\begin{stylekey}{/tikz/corner east below=\opt{\meta{specification}} (default 0pt)} - The same as |/tikz/east below| but uses the new corner anchors. -\end{stylekey} - -While the \meta{specification} of all these keys still accept the same form as with \tikzname, -the |ext.positioning-plus| library extends this even more. - -The specification after |of| can contain a list of coordinates -(like the |fit| key of the |fit| library). -This means that the new node will be placed in relation to a rectangular bounding box -that fits around all this nodes in the list. - -If this list is prefixed with \verb!|!, |-| or |+|, -the new node will also have the same height (\verb!|!), -the same width (|-|) or both as this bounding box. - -\begin{codeexample}[preamble=\usetikzlibrary{ext.positioning-plus}] -\begin{tikzpicture}[nodes=draw] -\node (A) {A}; -\node[below=of A] (BCD) {BCD}; -\node[right=of |(A)(BCD)] (c) {}; -\node[below=.5:of -(A)(BCD)] (d) {}; -\draw[help lines] (BCD.south west) -- (c.south east) - (BCD.north east) -- (d.south east); -\end{tikzpicture} -\end{codeexample} - -This functionality is also available without the placement: -\begin{stylekey}{/tikz/fit bounding box=\meta{list of coordinates}} - Creates a rectangular node with the name |fit bounding box| that encompasses - the \meta{list of coordinates}. -\end{stylekey} -\begin{stylekey}{/tikz/span vertical=\meta{list of coordinates}} - Creates a rectangular node with the name |fit bounding box| that encompasses - the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf]{minimum height} to - the height of this bounding box. -\end{stylekey} -\begin{stylekey}{/tikz/span horizontal=\meta{list of coordinates}} - Creates a rectangular node with the name |fit bounding box| that encompasses - the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf]{minimum width} to - the width of this bounding box. -\end{stylekey} -\begin{stylekey}{/tikz/span=\meta{list of coordinates}} - Is a combination of |/tikz/span vertical| and |/tikz/span horizontal|. -\end{stylekey} - -As you maybe noticed in the example above, the \meta{specification} also allows a prefix -delimited by |:| which the |node distance| will be multiplied to with for the placement.% -\footnote{This is probably more useful when \referenceKeyandIndexO{on grid} is used.} - -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-topaths.arcthrough.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-topaths.arcthrough.tex deleted file mode 100644 index 1d9e5ba9df..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-topaths.arcthrough.tex +++ /dev/null @@ -1,63 +0,0 @@ -% !TeX root = tikz-ext-manual.tex -% !TeX spellcheck = en_US -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\section{Arcs through Three Points} -\label{library:topaths.arcthrough} -\begin{tikzlibrary}{ext.topaths.arcthrough} - This library allows to use an arc defined by three points. -\end{tikzlibrary} - -\begin{codeexample}[width=10cm,preamble=\usetikzlibrary{ext.topaths.arcthrough}] -\begin{tikzpicture} -\coordinate[label=above right:$A$] (A) at ( 3, 1); -\coordinate[label=above:$B$] (B) at ( 1, 2); -\coordinate[label=below left:$C$] (C) at (-2,-2); - -\draw[ultra thick, draw=green, fill=green!50] - (B) to[arc through={clockwise,(A)}] (C) - -- (arc through center) -- cycle; -\draw[ultra thick, draw=blue, fill=blue!50] - (B) to[arc through=(A)] (C) - -- (arc through center) -- cycle; - -\foreach \p in {A,B,C, arc through center} \fill[red] (\p) circle[radius=2pt]; -\end{tikzpicture} -\end{codeexample} - -This can only by used for circles in the |canvas| coordinate system. - -\begin{multicols}{2} -\begin{key}{/tikz/arc through/through=\meta{coordinate} (initially {(0,0)})} - The coordinate on the circle that defines~-- together with the - starting and target point~-- a circle. -\end{key} - -\begin{key}{/tikz/arc through/center suffix=\meta{suffix} (initially {})} - The |arc through| will define a coordinate named |arc through center|\meta{suffix} - so that it can be referenced later. -\end{key} - -\begin{key}{/tikz/arc through/clockwise} - The resulting arc will go clockwise from the starting point to the target point. - This will not necessarily go through the |through| point. -\end{key} - -\begin{key}{/tikz/arc through/counter clockwise} - The resulting arc will go counter clockwise from the starting point to the target point. - This will not necessarily go through the |through| point. -\end{key} - -\begin{key}{/tikz/arc through=\meta{key-value}} - This key should be used with |to|\indexPathOperationO{to} or |edge|\indexPathOperationO{edge}. - A parameter other than |center suffix|, |clockwise| or |counter clockwise| will - be assumed to be the |through| coordinate. -\end{key} -\end{multicols} -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-trans.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-trans.tex deleted file mode 100644 index 97011bc4d0..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-trans.tex +++ /dev/null @@ -1,136 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\clearpage -\section{Mirror, Mirror on the Wall} -\label{library:mirror} - -\begin{tikzlibrary}{ext.transformations.mirror} - This library adds more transformations to \tikzname. -\end{tikzlibrary} - -As explained in section~\ref{pgflibrary:transformations}, there are two approaches to setting a mirror transformation. -As with the commands in \pgfname, we'll be using a lowercase |m| for the reflection matrix and an uppercase |M| for the built-in approach. - -\subsection{Using the reflection matrix} - -\begin{codeexample}[width=.4\linewidth,preamble=\usetikzlibrary{shapes.geometric,ext.transformations.mirror}] -\begin{tikzpicture}[line join=round, thick, reg poly/.style={ - shape=regular polygon, regular polygon sides={#1}}] -\node[reg poly=5, minimum size=+2cm, draw, very thick] (a) {}; -\foreach \i[evaluate={\col=(\i-1)/.04}] in {1,...,5} - \node [mirror=(a.corner \i)--(a.side \i), transform shape, - reg poly=5, minimum size=+2cm, draw=red!\col!blue] {}; -\end{tikzpicture} -\end{codeexample} - -\begin{key}{/tikz/xmirror=\meta{value or coordinate} (default 0pt)} - Sets up a transformation that mirrors along a horizontal line that goes through point $(\text{\meta{value}}, 0)$ or \meta{coordinate}. - -\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}] -\begin{tikzpicture} -\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); - -\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25); -\draw[xmirror=(m),-latex] (0,0) .. controls (.5,1) .. (1,1); -\end{tikzpicture} -\end{codeexample} -\end{key} - -\begin{key}{/tikz/ymirror=\meta{value or coordinate} (default 0pt)} - Sets up a transformation that mirrors along a vertical line that goes through point $(0, \text{\meta{value}})$ or \meta{coordinate}. -\end{key} - - -\begin{key}{/tikz/mirror x=\meta{coordinate} (default {(0,0)})} - Similar to |/tikz/xmirror|, this however uses the |xyz| coordinate system instead of the |canvas| system. -\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}] -\begin{tikzpicture}[x=.5cm, y=(45:1cm)] - -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); - -\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25); - -\draw[ xmirror=(m), -latex, red, dotted] (0,0) .. controls (.5,1) .. (1,1); -\draw[mirror x=(m), -latex] (0,0) .. controls (.5,1) .. (1,1); -\end{tikzpicture} -\end{codeexample} -\end{key} - -\begin{key}{/tikz/mirror y=\meta{coordinate} (default {(0,0)})} - Similar to |/tikz/ymirror|, this however uses the |xyz| coordinate system instead of the |canvas| system. -\end{key} - - -\begin{key}{/tikz/mirror=\meta{point A}|--|\meta{point B}} - Sets up a transformation that mirrors along a line that goes through \meta{point A} and \meta{point B}. - - When only \meta{point A} is given that line goes through \meta{point A} and the origin. -\end{key} - -\subsection{Using built-in transformations} - -\begin{codeexample}[width=.4\linewidth,preamble=\usetikzlibrary{shapes.geometric,ext.transformations.mirror}] -\begin{tikzpicture}[line join=round, thick, reg poly/.style={ - shape=regular polygon, regular polygon sides={#1}}] -\node[reg poly=5, minimum size=+2cm, draw, very thick] (a) {}; -\foreach \i[evaluate={\col=(\i-1)/.04}] in {1,...,5} - \node [Mirror=(a.corner \i)--(a.side \i), transform shape, - reg poly=5, minimum size=+2cm, draw=red!\col!blue] {}; -\end{tikzpicture} -\end{codeexample} - -\begin{key}{/tikz/xMirror=\meta{value or coordinate} (default 0pt)} - Sets up a transformation that mirrors along a horizontal line that goes through point $(\text{\meta{value}}, 0)$ or \meta{coordinate}. - -\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}] -\begin{tikzpicture} -\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); - -\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25); -\draw[xMirror=(m),-latex] (0,0) .. controls (.5,1) .. (1,1); -\end{tikzpicture} -\end{codeexample} -\end{key} - -\begin{key}{/tikz/yMirror=\meta{value or coordinate} (default 0pt)} - Sets up a transformation that mirrors along a vertical line that goes through point $(0, \text{\meta{value}})$ or \meta{coordinate}. -\end{key} - - -\begin{key}{/tikz/Mirror x=\meta{coordinate} (default {(0,0)})} - Similar to |/tikz/xMirror|, this however uses the |xyz| coordinate system instead of the |canvas| system. -\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}] -\begin{tikzpicture}[x=.5cm, y=(45:1cm)] - -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); - -\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25); - -\draw[ xMirror=(m), -latex, red, dotted] (0,0) .. controls (.5,1) .. (1,1); -\draw[Mirror x=(m), -latex] (0,0) .. controls (.5,1) .. (1,1); -\end{tikzpicture} -\end{codeexample} -\end{key} - -\begin{key}{/tikz/Mirror y=\meta{coordinate} (default {(0,0)})} - Similar to |/tikz/yMirror|, this however uses the |xyz| coordinate system instead of the |canvas| system. -\end{key} - - -\begin{key}{/tikz/Mirror=\meta{point A}\opt{|--|\meta{point B}}} - Sets up a transformation that mirrors along a line that goes through \meta{point A} and \meta{point B}. - - When only \meta{point A} is given that line goes through \meta{point A} and the origin. -\end{key} - -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-body.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-body.tex deleted file mode 100644 index 1185cdb6d7..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-body.tex +++ /dev/null @@ -1,204 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\newcommand*\tikzextname{Ti\textit kZ-Extensions} -\newcommand*\tikzextversion{0.3} -\begin{document} -{\colorlet{blue}{black}% links shall be black -\title{\bfseries The \tikzextname\space Package\\ - \large Manual for version \tikzextversion\\[1mm] -\large\href{https://github.com/Qrrbrbirlbel/tikz-extensions} - {\texttt{https://github.com/Qrrbrbirlbel/tikz-extensions}} -\author{Qrrbrbirlbel}} - -\maketitle -\label{table-of-contents} - -\tableofcontents -} -\include{tikz-ext-manual-en-intro} - -\part{\tikzname\space Libraries} -\label{part:tikz} - -These libraries only work with \tikzname. -\vspace{1em} -\begin{center}\tikzsetnextfilename{main-cover} -\begin{tikzpicture}[ - very thick, - scale=2.7, - grow cyclic, - level distance=1cm, - level/.style={ - level distance/.expanded=\ifnum#1>1 \tikzleveldistance/1.5\else\tikzleveldistance\fi, - nodes/.expanded={\ifodd#1 fill\else fill=none\fi} - }, - level 1/.style={sibling angle=120}, - level 2/.style={sibling angle=90}, - level 3/.style={sibling angle=90}, - level 4/.style={sibling angle=45}, - nodes={circle,draw,inner sep=+0pt, minimum size=+5pt}, - ] -\path[rotate=30] - node {} - child foreach \cntI in {1,...,3} { - node {} - child foreach \cntII in {1,...,2} { - node {} - child foreach \cntIII in {1,...,2} { - node {} - child foreach \cntIV in {1,...,2} { - node {} - child foreach \cntV in {1,...,2} {} - } - } - } - }; -\end{tikzpicture} -\end{center} - -\tikzsetfigurename{calendar-plus} \include{tikz-ext-manual-en-library-calendar-plus} -\tikzsetfigurename{node-families} \include{tikz-ext-manual-en-library-node-families} -\tikzsetfigurename{paths.arcto} \include{tikz-ext-manual-en-library-paths.arcto} -\tikzsetfigurename{paths.ortho} \include{tikz-ext-manual-en-library-paths.ortho} -\tikzsetfigurename{paths.timer} \include{tikz-ext-manual-en-library-paths.timer} -\tikzsetfigurename{patterns.images} \include{tikz-ext-manual-en-library-patterns.images} -\tikzsetfigurename{positioning-plus} -\include{tikz-ext-manual-en-library-positioning-plus} -\tikzsetfigurename{topaths.arcthrough} -\include{tikz-ext-manual-en-library-topaths.arcthrough} -\tikzsetfigurename{trans} -\include{tikz-ext-manual-en-library-trans} - -\part{\pgfname\space Libraries} -\label{part:pgf} -These libraries (should) work with both \pgfname\space and \tikzname. - -\begin{center}\tikzsetnextfilename{main-graph} -\begin{codeexample}[width=10cm,preamble=% - \usetikzlibrary{graphs,graphdrawing,ext.misc} \usegdlibrary{force}] -\tikzset{ - mynode/.style={ - circle, minimum size=10mm, draw, densely dashdotted, thick, - decide color/.expand once=#1}, - decide color/.style 2 args={ - /utils/TeX/if=c#1 - {/utils/TeX/ifnum={#2<5}{bluelight}{bluedark}} - {/utils/TeX/ifnum={#2<8}{light}{dark}}}, - light/.style={fill=gray!20}, bluelight/.style={fill=blue!10}, - dark/.style ={fill=gray!60}, bluedark/.style ={fill=blue!30}} -\tikz\graph[ - spring electrical layout, vertical=c2 to p13, - node distance=1.5cm, typeset=$n_{\tikzgraphnodetext}$, - nodes={mynode=\tikzgraphnodetext}] { - % outer ring - c2 -- {p1, p11, p6}; - p1 -- {p8, c6, p11}; - p8 -- {p3, p10, c6}; - p3 -- {p13, p15, p10}; - p13 -- {p15, c7}; - c7 -- {c3, c4, p15}; - c3 -- {p14, c4}; - p14 -- {p7, c4}; - p7 -- {p9, p2, c4}; - p9 -- {c5, p12, p2}; - c5 -- {c1, p4, p12}; - c1 -- {p6, p4}; - p6 -- {p11, p4}; - % inner ring - p11 -- {c6, p12, p4}; - p5 -- {c6 -- {p10, p12}, p10 -- p15, p15 -- c4, c4 -- p2, p2 -- p12, p12 -- p4}; -}; -\end{codeexample} -\end{center} - -\tikzsetfigurename{PGF.trans}\include{tikz-ext-manual-en-pgf-trans} -\tikzsetfigurename{PGF.shapes}% -\include{tikz-ext-manual-en-pgf-shapes-circlearrow} -\include{tikz-ext-manual-en-pgf-shapes-circlecrosssplit} -\include{tikz-ext-manual-en-pgf-shapes-heatmark} -\include{tikz-ext-manual-en-pgf-shapes-rectround} -\include{tikz-ext-manual-en-pgf-shapes-superellipse} -\part{Utilities} - -\label{part:misc} -\vfill\tikzsetnextfilename{main-misc} -\begin{codeexample}[width=6cm, preamble=\usetikzlibrary{ext.misc}] -\begin{tikzpicture}[ - declare function={bigR(\n)=smallR+.05*\n;}, - declare constant={smallR=1; segments=20;}, - full arc=segments] -\foreach \iN[evaluate={\endRadius=bigR(\iN+1);}, use int=0 to segments-1] - \filldraw[fill=gray!50] (\iN R:\endRadius) - arc [radius=\endRadius, start angle=\iN R, delta angle=+1R] -- (\iN R+1R:smallR) - arc [radius=smallR, end angle=\iN R, delta angle=-1R] -- cycle; - -\node {$\phi^2$}; -\node at (north west:{sqrt 2 * bigR(segments/2)}) {$\{\Omega\}_{i=1}^n$}; -\node[rotate=-.5R, right] at (-.5R: bigR segments) {$\partial \varphi$}; - -\tikzset{yshift=-5cm, declare constant={segments=25;}, full arc=segments} -\filldraw[fill=gray!50] (right:smallR) - \foreach \iN[evaluate={\endRadius=bigR(\iN+1);}, use int=0 to segments-1] { - -- (\iN R:\endRadius) arc[radius=\endRadius, start angle=\iN R, delta angle=1R]} - -- (right:smallR) arc[radius=smallR, start angle=0, delta angle=-360]; - -\node {$\phi^2$}; -\node at (north west:{sqrt 2 * bigR(segments/2)}) {$\{\Omega\}_{i=1}^n$}; -\node[rotate=-.5R, right] at (-.5R: bigR segments) {$\partial \varphi$}; -\end{tikzpicture} -\end{codeexample} -\vfill - -\tikzsetfigurename{misc.calendar}\include{tikz-ext-manual-en-calendar} -\tikzsetfigurename{misc.misc}\include{tikz-ext-manual-en-library-misc} - -%%% END -\newcommand*{\addTikz}[1]{Added \tikzname\space library \texttt{ext.#1}.} -\newcommand*{\addPGF}[1]{Added \pgfname\space library \texttt{ext.#1}.} -\newcommand*{\addShape}[2][]{Added shape \texttt{\ifx\\#1\\#2\else#1\fi}\\(\pgfname\space library \texttt{ext.shapes.#2}).} -\part{Changelog, Index \& References} -\section*{Changelog}\addcontentsline{toc}{section}{Changelog} -\begin{multicols}{2}\raggedright -\noindent -Version 0.3 -\begin{itemize} -\item \addShape[circle arrow]{circlearrow} -\item \addShape[circle cross split]{circlecrosssplit} -\item \addShape{heatmark} -\item \addShape[rectangle with rounded corners]{rectangleroundedcorners} -\item \addShape{superellipse} -\item \addTikz{node-families.shapes.geometric} -\item Fixed |ext.node-families|' key |size|. -\item Renamed internal macros to use custom namespace starting with |\tikzext@|. -\item Added some references. -\end{itemize} -Version 0.2 -\begin{itemize} -\item \addTikz{positioning-plus} -\item \addTikz{node-families} -\end{itemize} -Version 0.1 -\begin{itemize} -\item \addTikz{calendar-plus} -\item \addTikz{misc} -\item \addTikz{paths.arcto} -\item \addTikz{paths.ortho} -\item \addTikz{paths.timer} -\item \addTikz{patterns.images} -\item \addTikz{topaths.arcthrough} -\item \addTikz{transformations.mirror} -\item \addPGF{transformations.mirror} -\end{itemize} -\end{multicols} -\printindex - -\printbibliography[heading=bibintoc] -%\typeout{Examples: \the\codeexamplecount}% -\end{document} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-preamble.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-preamble.tex deleted file mode 100644 index 494d63e012..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-preamble.tex +++ /dev/null @@ -1,402 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\usepackage[version=latest]{pgf} - -\usepackage{xkeyval,calc,listings,tikz,fp} - -\usepackage{imakeidx} -\makeindex - -%%% Bibliography -\usepackage{csquotes} -\usepackage[backend=biber,style=numeric,backref]{biblatex} -\addbibresource{tikz-ext-manual.bib} - -\usepackage{hyperref} -\hypersetup{% - colorlinks=true, % use true to enable colors below: - linkcolor=blue,%red, - filecolor=blue,%magenta, - urlcolor=blue,%cyan, - citecolor=blue, - pdfborder=0 0 0, -} - -\usepackage[a4paper,left=2.25cm,right=2.25cm,top=2.5cm,bottom=2.5cm,nohead,columnsep=1cm]{geometry} -\usepackage{amsmath,amssymb} -\usepackage{xxcolor} -\usepackage{pifont} - -\usepackage[T1]{fontenc} -% Promote `Missing character` reports to full errors -% require texlive 2021 or above -\tracinglostchars=3 - -\input{pgfmanual-en-macros} - -\usepackage{unicode-math} -\setmathfont[Scale=MatchUppercase]{libertinusmath-regular.otf} -\usepackage[ttscale=.85]{libertine} -\setmonofont[Scale=0.8]{Bitstream Vera Sans Mono} - -\makeatletter -\renewcommand*\l@section[2]{% - \ifnum \c@tocdepth >\z@ - \addpenalty\@secpenalty - \addvspace{1.0em \@plus\p@}% - \setlength\@tempdima{2.5em}% - \begingroup - \parindent \z@ \rightskip \@pnumwidth - \parfillskip -\@pnumwidth - \leavevmode \bfseries - \advance\leftskip\@tempdima - \hskip -\leftskip - #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par - \endgroup - \fi} -\renewcommand*\l@subsection{\@dottedtocline{2}{2.5em}{3.3em}} -\renewcommand*\l@subsubsection{\@dottedtocline{3}{5.8em}{4.2em}} -\def\@pnumwidth{2.2em} -\makeatother - -% Global styles: -\tikzset{ - every plot/.style={prefix=plots/pgf-}, - shape example/.style={ - color=black!30, - draw, - fill=yellow!30, - line width=.5cm, - inner xsep=2.5cm, - inner ysep=0.5cm} -} - -% Detect changed labels -% by David Carlisle https://tex.stackexchange.com/a/169245 -\makeatletter -\def\@testdef#1#2#3{% - \def\reserved@a{#3}% - \expandafter\ifx\csname #1@#2\endcsname\reserved@a\else - \typeout{^^JLabel `#2' changed:^^J\meaning\reserved@a^^J\expandafter\meaning\csname #1@#2\endcsname^^J}% - \@tempswatrue - \fi} -\makeatother - -\usetikzlibrary{ - ext.calendar-plus, - ext.misc, - ext.node-families, - ext.node-families.shapes.geometric, - ext.paths.arcto, - ext.paths.ortho, - ext.paths.timer, - ext.patterns.images, - ext.positioning-plus, - ext.shapes.heatmark, - ext.shapes.circlearrow, - ext.shapes.circlecrosssplit, - ext.shapes.rectangleroundedcorners, - ext.shapes.superellipse, - ext.topaths.arcthrough, - ext.transformations.mirror, - % - calc, - fit, - matrix, - shapes.geometric, - through, - trees, -} - -%% needs Lua! -\usetikzlibrary{graphs,graphdrawing} -\usegdlibrary{force} - -\makeatletter -\def\endofcodeexample#1{% original from tex/latex/pgf/doc/pgfmanual-en-macros.tex by Till Tantau et al - \endgroup% - \ifpgfmanual@setup@code% - \gdef\pgfmanual@do@this{% - {% - \returntospace% - \commenthandler% - \xdef\code@temp{#1}% removes returns and comments - }% - \edef\pgfmanualmcatcode{\the\catcode`\^^M}% - \catcode`\^^M=9\relax% - \expandafter\scantokens\expandafter{\code@temp}% - \catcode`\^^M=\pgfmanualmcatcode% - }% - \fi% - \ifcode@hidden\else - \ifcode@execute% - \setbox\codeexamplebox=\hbox{% - \ifx\code@render\pgfutil@empty% - {% - {% - \returntospace% - \commenthandler% - \xdef\code@temp{#1}% removes returns and comments - }% - \catcode`\^^M=9% - \colorbox{graphicbackground}{\color{black}\ignorespaces% - \code@pre\expandafter\scantokens\expandafter{\code@temp\ignorespaces}\code@post\ignorespaces}% - }% - \else% - \global\let\code@temp\code@render% - \colorbox{graphicbackground}{\color{black}\ignorespaces% - \code@render}% - \fi% - }% - \ifx\code@animation@list\pgfutil@empty% - \else% - \setbox\codeexampleboxanim=\vbox{% - \rightskip0pt\leftskip0pt plus1filll% - \ifdim\wd\codeexamplebox>\codeexamplewidth% - \else% - \hsize\codeexamplewidth% - \advance\hsize by2cm% - \fi% - \leavevmode\catcode`\^^M=9% - \foreach \pgfmanualtime/\pgfmanualtimehow in\code@animation@list{% - \setbox\codeexampleboxanim=\hbox{\colorbox{animationgraphicbackground}{% - \tikzset{make snapshot of=\pgfmanualtime}% - \scalebox{\pgfmanualanimscale}{\color{black}\ignorespaces% - \code@animation@pre\expandafter\scantokens\expandafter{\code@temp\ignorespaces}\code@animation@post\ignorespaces}% - }}% - \space\raise4pt\hbox to0pt{\vrule width0pt height1em\hbox - to\wd\codeexampleboxanim{\hfil\scriptsize$t{=}\pgfmanualtimehow \mathrm s$\hfil}\hss}% - \lower\ht\codeexampleboxanim\box\codeexampleboxanim\hfil\penalty0\hskip0ptplus-1fil% - }% - }% - \setbox\codeexampleboxanim=\hbox{\hbox{}\hskip-2cm\box\codeexampleboxanim}% - \fi% - \ifdim\wd\codeexamplebox>\codeexamplewidth% - \def\code@start{\par}% - \def\code@flushstart{}\def\code@flushend{}% - \def\code@mid{\parskip2pt\par\noindent}% - \def\code@width{\linewidth-6pt}% - \def\code@end{}% - \else% - \def\code@start{% -% \linewidth=\textwidth% removed this line - \parshape \@ne 0pt \linewidth - \leavevmode% - \hbox\bgroup}% - \def\code@flushstart{\hfill}% - \def\code@flushend{\hbox{}}% - \def\code@mid{\hskip6pt}% - \def\code@width{\linewidth-12pt-\codeexamplewidth}% - \def\code@end{\egroup}% - \fi% - \code@start% - \noindent% - \begin{minipage}[t]{\codeexamplewidth}\raggedright - \hrule width0pt% - \footnotesize\vskip-1em% - \code@flushstart\box\codeexamplebox\code@flushend% - \vskip0pt% - \leavevmode% - \box\codeexampleboxanim% - \vskip-1ex - \leavevmode% - \end{minipage}% - \else% - \def\code@mid{\par} - \def\code@width{\linewidth-6pt} - \def\code@end{} - \fi% - \code@mid% - \ifpgfmanual@multipage@code% - {% - \pgfkeysvalueof{/codeexample/prettyprint/base color}% - \pgfmanualdolisting{#1}% - }% - \else% - \colorbox{codebackground}{% - \pgfkeysvalueof{/codeexample/prettyprint/base color}% - \begin{minipage}[t]{\code@width}% - \pgfmanualdolisting{#1}% - \end{minipage}}% - \fi% - \code@end% - \par% - \medskip - \fi - \endcodeexample\endgroup% -} - -\newenvironment{pathoperation'}[3][]{ - \begin{pgfmanualentry} - \def\pgfmanualtest{#1}% - \pgfmanualentryheadline{% - \ifx\pgfmanualtest\@empty% - \pgfmanualpdflabel{#2}{}% - \fi% - %\textcolor{gray}{{\ttfamily\char`\\path}\ \ \dots} - %\declare{\texttt{\noligs{#2}}}#3\ \textcolor{gray}{\dots\texttt{;}} - }% - \ifx\pgfmanualtest\@empty% - \index{#2@\protect\texttt{#2} path operation}% - \index{Path operations!#2@\protect\texttt{#2}}% - \fi% - \pgfmanualbody -} -{ - \end{pgfmanualentry} -} -\makeatother - -\usepackage{paracol} - -%% normal references -\newcommand*{\indexLibrary}[1]{% - \index{#1@\protect\texttt{#1} library}% - \index{Libraries!#1@\protect\texttt{#1}}% -} -\newcommand*{\indexMathFunction}[1]{% - \index{#1@\protect\texttt{#1} math function}% - \index{Math functions!#1@\protect\texttt{#1}}% -} -\newcommand*{\indexShape}[1]{% - \index{#1@\protect\texttt{#1} shape}% - \index{Shapes!#1@\protect\texttt{#1}}% -} -\newcommand*{\indexHandler}[1]{% - \index{\gobble#1@\protect\texttt{#1} handler}% - \index{Key handlers!#1@\protect\texttt{#1}} -} -\newcommand*{\indexKey}[2][/tikz/]{% -\begingroup - \def\mykey{#1#2}% - \def\mypath{}% - \gdef\myname{}% - \firsttimetrue - \decompose#1#2/\nil -\endgroup -} -\newcommand*{\indexPathOperation}[1]{% - \index{#1@\protect\texttt{#1} path operation}% - \index{Path operations!#1@\protect\texttt{#1}}% -} - -%% references to original -\newcommand*{\indexLibraryO}[1]{% - \index{#1@\originalprefix\protect\texttt{\original{#1}} library\originalsuffix}% - \index{Libraries!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% -} -\newcommand*{\indexMathFunctionO}[1]{% - \index{#1@\protect\texttt{\original{#1}} math function\originalsuffix}% - \index{Math functions!#1@\protect\texttt{\original{#1}}\originalsuffix}% -} -\newcommand*{\indexShapeO}[1]{% - \index{#1@\originalprefix\protect\texttt{\original{#1}} shape\originalsuffix}% - \index{Shapes!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% -} -\newcommand*{\indexHandlerO}[1]{% - \index{\gobble#1@\originalprefix\protect\texttt{\original{#1}} handler\originalsuffix}% - \index{Key handlers!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix} -} -\newcommand*{\indexKeyO}[2][/tikz/]{%TODO - \begingroup\let\decomposetoodeep\decomposetoodeepO - \def\mykey{#1#2}% - \def\mypath{}% - \gdef\myname{}% - \firsttimetrue - \decomposeO#1#2/\nil - \endgroup -} -\def\decomposetoodeepO#1/#2/\nil{% - % avoid too-deep nesting in index - \index{#1/#2@\originalprefix\protect\texttt{\original{#1/#2}} key\originalsuffix}% - \index{\mypath#1/#2@\originalprefix\protect\texttt{\original{#1/#2}}\originalsuffix}% - \decomposefindlast/#1/#2/\nil% -} -\def\decomposeO/#1/#2\nil{% - \def\test{#2}% - \ifx\test\empty% - % aha. - \index{#1@\originalprefix\protect\texttt{\original{#1}} key\originalsuffix}% - \index{\mypath#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% - \gdef\myname{#1}% - \pgfmanualpdflabel{#1}{} - \else% - \advance\pgfmanualdecomposecount by1\relax% - \ifnum\pgfmanualdecomposecount>2\relax% - \decomposetoodeepO#1/#2\nil% - \else% - \iffirsttime% - \begingroup% - % also make a pdf link anchor with full key path. - \def\hyperlabelwithoutslash##1/\nil{% - \pgfmanualpdflabel{##1}{}% - }% - \hyperlabelwithoutslash/#1/#2\nil% - \endgroup% - \def\mypath{#1@\protect\texttt{/#1/}!}% - \firsttimefalse% - \else% - \expandafter\def\expandafter\mypath\expandafter{\mypath#1@\protect\texttt{#1/}!}% - \fi% - \def\firsttime{}% - \decomposeO/#2\nil% - \fi% - \fi% -} -\newcommand*{\indexPathOperationO}[1]{% - \index{#1@\originalprefix\protect\texttt{\original{#1}} path operation\originalsuffix}% - \index{Path operations!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% -} - -\newcommand*{\indexCommandO}[1]{% - \removeats{#1}% - \index{\strippedat @\originalprefix\protect\texttt{\original{\protect\string\protect#1}}\originalsuffix}% -} - -\newcommand*{\referenceKeyandIndexO}[2][/tikz/]{\texttt{#1#2}\indexKeyO[#1]{#2}} -\newcommand*{\referenceKeyandIndex}[2][/tikz/]{\texttt{#1#2}\indexKey[#1]{#2}} -\newcommand*{\referenceShapeandIndex}[1]{\texttt{#1}\indexShape{#1}} -\newcommand*{\referenceShapeandIndexO}[1]{\texttt{#1}\indexShapeO{#1}} -\newcommand*{\referenceLibraryandIndexO}[1]{\texttt{#1}\indexLibraryO{#1}} - -\colorlet{originalindex}{gray} -\newcommand*{\original}[1]{\textcolor{originalindex}{#1}} -\newcommand*{\originalsuffix}{}%\textsuperscript{\textdagger}}%\normalsize -\newcommand*{\originalprefix}{}%\footnotesize - -%\newcommand*{\original}[1]{\textcolor{originalindex}{#1}} -%\newcommand*{\original}[1]{#1}%\textcolor{originalindex}{#1}} -%\newcommand*{\originalsuffix}{}%\textsuperscript{\color{blue}\tikzname}} -%\DeclareRobustCommand*{\originalprefix}{\smash{\footnotesize\llap{\textbullet\space}}} - -\newcommand*{\filetype}[1]{\textsc{#1}} - -\makeatletter -\def\index@prologue{\section*{Index}\addcontentsline{toc}{section}{Index} - This index contains automatically generated entries as well as {\originalprefix\original{references}\originalsuffix} to - original functionalities of \pgfname/\tikzname. - \bigskip -} -\makeatother - -\DeclareMathOperator{\sgn}{sgn} - -\newenvironment{implementation}{% - \noindent\rule[.5ex]{\linewidth}{.4pt}\par - \paragraph*{Notes on Implementation:}\par% - \small - \begin{quotation}% -}{\end{quotation}} - -\newcommand*{\inspiration}[2]{% - \par\textbf{Q\,\&\,A:} \cite{#1} \& \cite{#2}\par -} -\newcommand*\inspirationQ[1]{\par\textbf{Q:} \cite{#1}} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-circlearrow.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-circlearrow.tex deleted file mode 100644 index e26711bb35..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-circlearrow.tex +++ /dev/null @@ -1,93 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\section{Shape: Circle Arrow} -\begin{pgflibrary}{ext.shapes.circlearrow} - A circular shape named |circle arrow| that has an arc as its background path that can have an arrow tip. - \inspiration{ShapeCircleArrow-Q}{ShapeCircleArrow-A} -\end{pgflibrary} -\begin{shape}{circle arrow} - This shape is an arrow whose path is an arc -- defined very similar to the |arc|% - \indexPathOperationO{arc} path operation -- that can possibly be customized with - arrow tips. - - \begin{key}{/pgf/circle arrow start angle=\meta{start angle} (initially \{\})} - Sets the start angle. - \end{key} - \begin{key}{/pgf/circle arrow end angle=\meta{end angle} (initially \{\})} - Sets the end angle. - \end{key} - \begin{key}{/pgf/circle arrow delta angle=\meta{delta angle} (initially \{\})} - Sets the delta angle. - \end{key} - \begin{key}{/pgf/circle arrow arrows=% - \meta{start arrow tip specification}-\meta{end arrow tip specification} (initially -)} - The specification will be forwarded to |\pgfsetarrows|\indexCommandO{\pgfsetarrows}. - \end{key} - - A few handful styles are pre-defined. - \begin{key}{/pgf/circle arrow turn left north} - Sets |circle arrow start angle = 100|, |circle arrow delta angle = 340| - and |circle arrow arrows = ->|. - \end{key} - \begin{key}{/pgf/circle arrow turn left east} - As above but |circle arrow start angle = 10|. - \end{key} - \begin{key}{/pgf/circle arrow turn left west} - As above but |circle arrow start angle = 280|. - \end{key} - \begin{key}{/pgf/circle arrow turn left south} - As above but |circle arrow start angle = 190|. - \end{key} - \begin{key}{/pgf/circle arrow turn right north} - Sets |circle arrow start angle = 100|, |circle arrow delta angle = 340| - and |circle arrow arrows = <-|. - \end{key} - \begin{key}{/pgf/circle arrow turn right east} - As above but |circle arrow start angle = 10|. - \end{key} - \begin{key}{/pgf/circle arrow turn right west} - As above but |circle arrow start angle = 280|. - \end{key} - \begin{key}{/pgf/circle arrow turn right south} - As above but |circle arrow start angle = 190|. - \end{key} - -{\catcode`\|=12 -\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.circlearrow,matrix}] -\begin{tikzpicture} -\matrix[matrix of nodes, draw=none, row sep=1em, column sep=1em, - every node/.style={draw=gray, shape=circle arrow, ultra thick, inner sep=1em} -] (m) { - |[circle arrow turn left north]| & |[circle arrow turn left east]| \\ - |[circle arrow turn left west]| & |[circle arrow turn left south]| \\ - |[circle arrow turn right north]| & |[circle arrow turn right east]| \\ - |[circle arrow turn right west]| & |[circle arrow turn right south]| \\ -}; -\end{tikzpicture} -\end{codeexample} -} -\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.circlearrow},width=16cm] -\begin{tikzpicture}\Huge -\node[name=s, shape=circle arrow, - circle arrow turn left west, shape example] - {Circle Arrow\vrule width 1pt height 2cm}; -\foreach \anchor/\placement in - {north west/above left, north/above, north east/above right, - west/left, center/above, east/right, - mid west/right, mid/above, mid east/left, - base west/left, base/below, base east/right, - south west/below left, south/below, south east/below right, - text/left, 10/right, 130/above} - \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} - node[\placement] {\scriptsize\texttt{(s.\anchor)}}; -\end{tikzpicture} -\end{codeexample} -\end{shape} -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-circlecrosssplit.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-circlecrosssplit.tex deleted file mode 100644 index e7b2b9ba5a..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-circlecrosssplit.tex +++ /dev/null @@ -1,53 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\section{Shape: Circle Cross Split} -\begin{pgflibrary}{ext.shapes.circlecrosssplit} - A circular shape with four parts that can be individually filled. - \inspiration{ShapeSplitCircle-Q}{ShapeSplitCircle-A} -\end{pgflibrary} -\begin{shape}{circle cross split} -This shape has four node parts that are placed near the center of a circle. - -\begin{key}{/pgf/circle cross split part fill=\marg{list} (initially none)} -Sets the custom fill color for each node part shape. -The items in \meta{list} should be separated by commas -(so if there is more than one item in \meta{list}, it must be surrounded by braces). -If \meta{list} has less entries than node parts, -then the remaining node parts use the color from the last entry in the list. -This key will automatically set |/pgf/circle cross split uses custom fill|. -\end{key} -\begin{key}{/pgf/circle cross split uses custom fill=\opt{\meta{boolean}} (default true)} -This enables the use of a custom fill for each of the node parts -(including the area covered by the |inner sep|). -The background path for the shape should not be filled (e.\,g., in \tikzname, -the |fill| option for the node must be implicitly or explicitly set to |none|). -Internally, this key sets the \TeX-if |\ifpgfcirclecrosssplitcustomfill| appropriately. -\end{key} -\begin{codeexample}[preamble=\usepgflibrary{ext.shapes.circlecrosssplit}] -\begin{tikzpicture}\Huge -\node[name=s, shape=circle cross split, shape example, inner xsep=1.5cm, fill=none, - circle cross split part fill={green,blue,red,yellow!90!black}] - {\nodepart{text}text\nodepart{two}two - \nodepart{three}three\nodepart{four}four}; -\foreach \anchor/\placement in - {north west/above left, north/above, north east/above right, - west/left, center/left, east/right, - mid west/right, mid/left, mid east/left, - base west/left, base/left, base east/right, -lower base west/left, lower base/below, lower base east/right, - lower mid west/left, lower mid/above, lower mid east/right, - south west/below left, south/below, south east/below right, - text/below, 10/right, 130/above, two/left, three/left, four/left} - \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} - node[\placement] {\scriptsize\texttt{(s.\anchor)}}; -\end{tikzpicture} -\end{codeexample} -\end{shape} -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-heatmark.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-heatmark.tex deleted file mode 100644 index fa13cb0000..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-heatmark.tex +++ /dev/null @@ -1,83 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\section{Shape: Heatmark} -\begin{pgflibrary}{ext.shapes.heatmark} - A circular shape that has customizable rings around it. - \inspiration{ShapeHeat-Q}{ShapeHeat-A} -\end{pgflibrary} - -\begin{shape}{heatmark} - \begin{key}{/pgf/heatmark arcs=\meta{arcs num} (initially 3)} - Sets the number of arc around the circle to \meta{arcs num}. - \end{key} - \begin{key}{/pgf/heatmark arc width=\meta{arc width} (initially 4pt)} - Sets the width of the rings around the circle to \meta{arc width}. - \end{key} - \begin{key}{/pgf/heatmark arc sep=\meta{sep length} (initially 1pt)} - Sets the whitespace between the rings to \meta{sep length}. - \end{key} - \begin{key}{/pgf/heatmark arc rings=\meta{rings num} (initially 3)} - Sets the number of rings around the circle to \meta{rings num} - \end{key} - \begin{key}{/pgf/heatmark arc sep angle=\meta{sep angle} (initially 20)} - Sets the whitespace angle between the arcs in one ring to \meta{sep angle}. - \end{key} - \begin{key}{/pgf/heatmark inner opacity=\meta{inner opacity} (initially 0.8)} - Sets the opacity of the inner ring to \meta{inner opacity}. - \end{key} - \begin{key}{/pgf/heatmark outer opacity=\meta{low opacity} (initially 0.2)} - Sets the opacity of the outer ring to \meta{outer opacity}. - - The opacity of the rings between the outer and the inner ring will be interpolated by these two opacities. - \end{key} - -This shape takes the value of |/pgf/shape border rotate|% -\indexKeyO[/pgf/]{shape border rotate} into consideration. - -For every ring and for every arc the following styke keys are tried. -\begin{stylekey}{/pgf/heatmark ring \meta{ring number}} -\end{stylekey} -\begin{stylekey}{/pgf/heatmark arc \meta{arc number}} -\end{stylekey} -\begin{stylekey}{/pgf/heatmark ring \meta{ring number} arc \meta{arc number}} -\end{stylekey} - -The \pgfname shape is setup in a way that even \tikzname\space -styles can be used with a little bit work: -\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.heatmark}] -\tikz[ - shape border rotate=90, - /pgf/heatmark ring 1/.append style={/tikz/fill=green}, - /pgf/heatmark arc 1/.append style={/tikz/fill=blue}, - /pgf/heatmark ring 2 arc 2/.append style={/tikz/fill=yellow!70!black} -] \node[heatmark, fill=red] (n) {100}; -\end{codeexample} - -It is best to use this shape with no actual border (|draw = none|) and the |outer sep| set to zero. -\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.heatmark},width=16cm] -\begin{tikzpicture}\Huge -\node[name=s, shape=heatmark, shape example, - fill=blue!25, draw=none, outer sep=0pt] - {Heatmark\vrule width 1pt height 2cm}; -\foreach \anchor/\placement in - {north west/above left, north/above, - north east/above right, - west/left, center/above, east/right, - mid west/right, mid/above, mid east/left, - base west/left, base/below, base east/right, - south west/below left, south/below, - south east/below right, - text/left, 10/right, 130/above} - \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} - node[\placement] {\scriptsize\texttt{(s.\anchor)}}; -\end{tikzpicture} -\end{codeexample} -\end{shape} -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-rectround.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-rectround.tex deleted file mode 100644 index 78bab76925..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-rectround.tex +++ /dev/null @@ -1,58 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\section{Shape: Rectangle with Rounded Corners} -\begin{pgflibrary}{ext.shapes.rectangleroundedcorners} - A rectangle with rounded corners. -\end{pgflibrary} - -\begin{shape}{rectangle with rounded corners} -This library provides a |rectangle with rounded corners| where every corner can have a different radius. - -\begin{key}{/pgf/rectangle with rounded corners north west radius=\meta{dimen} (initially .5\string\pgflinewidth)} - Sets the north west radius to \meta{dimen}. -\end{key} -\begin{key}{/pgf/rectangle with rounded corners north east radius=\meta{dimen} (initially .5\string\pgflinewidth)} - Sets the north east radius to \meta{dimen}. -\end{key} -\begin{key}{/pgf/rectangle with rounded corners south west radius=\meta{dimen} (initially .5\string\pgflinewidth)} - Sets the south west radius to \meta{dimen}. -\end{key} -\begin{key}{/pgf/rectangle with rounded corners south east radius=\meta{dimen} (initially .5\string\pgflinewidth)} - Sets the south east radius to \meta{dimen}. -\end{key} -\begin{key}{/pgf/rectangle with rounded corners radius=\meta{dimen}} - Sets all radii to \meta{dimen}. -\end{key} - -\begin{codeexample}[preamble=\usepgflibrary{ext.shapes.rectangleroundedcorners}] -\begin{tikzpicture}\Huge -\node[name=s, shape=rectangle with rounded corners, shape example, - rectangle with rounded corners north west radius=10pt, - rectangle with rounded corners north east radius=20pt, - rectangle with rounded corners south west radius=30pt, - rectangle with rounded corners south east radius=40pt] {Rectangle with rounded corners\vrule width 1pt height 2cm}; -\foreach \anchor/\placement in - {north west/above left, north/above, north east/above right, - west/left, center/above, east/right, - mid west/right, mid/above, mid east/left, - base west/left, base/below, base east/right, - south west/below left, south/below, south east/below right, - text/below, 10/right, 130/above, - north west center/below right, north east center/left, - south west center/above right, south east center/left, - below north west/left, above south west/left, above south east/right, below north east/right, - right north west/above, right south west/below, left south east/below, left north east/above} - \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} - node[\placement] {\scriptsize\texttt{(s.\anchor)}}; -\end{tikzpicture} -\end{codeexample} -\end{shape} -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-superellipse.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-superellipse.tex deleted file mode 100644 index 580ef0d93f..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-superellipse.tex +++ /dev/null @@ -1,105 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\section{Shape: Superellipse} -\begin{pgflibrary}{ext.shapes.superellipse} - Shape in the form of a ``superellipse''. - \inspiration{ShapeSuperEllipse-Q}{ShapeSuperEllipse-A} -\end{pgflibrary} - -\begin{shape}{superellipse} -This shape is defined by formula -\begin{equation*} - \biggl|\frac x{r_x}\biggr|^m + \biggl|\frac y{r_y}\biggr|^n = 1 -\end{equation*} -and will be plotted by -\begin{align*} - x(t) &= |\cos t|^{\frac 2m} \cdot r_x \sgn(\cos t) \\ - y(t) &= |\sin t|^{\frac 2n} \cdot r_y \sgn(\sin t) \\ -\end{align*} -where $r_x$ is half the node's width and $r_y$ is half the node's height. - -\begin{key}{/pgf/superellipse x exponent=\meta{x exponent}(initially 2.5)} -This sets $m$. -\end{key} -\begin{key}{/pgf/superellipse y exponent=\meta{y exponent}(initially 2.5)} -This sets $n$. -\end{key} -\begin{key}{/pgf/superellipse step=\meta{step}(initially 5)} -This specifies the step of the underlying plot handler. -The smaller \meta{step} is, the slower computation will be. - -Sensible values for \meta{step} are integer dividers of 90, i.\,e. -2, 3, 5, 6, 9, 10, 15, 18, 30 and 45. -\end{key} -\begin{key}{/pgf/superellipse exponent=\meta{exponent}} - Sets both |superellipse x exponent| and |superellipse y exponent| to \meta{exponent}. -\end{key} - -\paragraph{Notes on Implementation} -For implementing this shape, additional mathematical functions were declared. -\begin{math-function}{superellipsex(\mvar{t}, \mvar{2/m}, \mvar{$r_x$})} -\mathcommand -Returns the $x$ value on a point of the superellipse with its center on the origin following -\begin{equation*} - x = r_x\cos^{2/m} t -\end{equation*} -for values of $0 \leq t \leq 90$. -\end{math-function} -\begin{math-function}{superellipsey(\mvar{t}, \mvar{2/n}, \mvar{$r_y$})} -\mathcommand -Returns the $y$ value on a point of the superellipse with its center on the origin following -\begin{equation*} - y = r_y\cos^{2/n} t -\end{equation*} -for values of $0 \leq t \leq 90$. -\end{math-function} - -Both \pgfname math functions can be used at once with the following macro. -\begin{command}{\pgfmathsuperellipseXY\marg{t}\marg{2/m}\marg{2/n}\marg{a}\marg{b}} -Returns the $x$ value (in |\pgfmathresultX|) and the $y$ value (in |\pgfmathresultY|) of the superellipse with its center on the origin following -\begin{align*} - x & = a\cos^{2/m} t \\ - y & = b\cos^{2/n} t -\end{align*} -for values of $0 \leq t \leq 90$. - -Note: all arguments must be a valid number since they will not be parsed by \pgfname math. -\end{command} - -And additional internal macro was defined following the original naming scheme. -\def\temp{\begin{command}}% -\expandafter\temp\expandafter{\csname pgfutil@prefix@macrotomacro\endcsname\marg{macro 1}\marg{macro 2}} -Adds the once-expansion of \meta{macro 2} in front of \meta{macro 1}. -\end{command} - -\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.superellipse}] -\begin{tikzpicture}[superellipse step=1]\Huge -\node[name=s,shape=superellipse,shape example] {Superellipse\vrule width 1pt height 2cm}; -\foreach \anchor/\placement in - {north west/above left, north/above, north east/above right, - west/left, center/above, east/right, - mid west/right, mid/above, mid east/left, - base west/left, base/below, base east/right, - south west/below left, south/below, south east/below right, - text/left, 10/right, 130/above} - \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} - node[\placement] {\scriptsize\texttt{(s.\anchor)}}; -\end{tikzpicture} -\end{codeexample} -% -\begin{codeexample}[width=8cm,preamble=\usetikzlibrary{ext.shapes.superellipse}] -\begin{tikzpicture}[minimum width=1cm, minimum height=3cm] -\foreach \xe/\ye[count=\i] in {.5/.5, 1/1, 2/2, 3/3, .5/5} - \node[draw, superellipse, superellipse x exponent=\xe, superellipse y exponent=\ye] at (1.5*\i,0) {}; -\end{tikzpicture} -\end{codeexample} -\end{shape} -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex deleted file mode 100644 index ccd378a6e7..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex +++ /dev/null @@ -1,176 +0,0 @@ -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\section{Transformations: Mirroring} -\label{pgflibrary:transformations} - -\begin{purepgflibrary}{ext.transformations.mirror} - This library adds mirror transformations to \pgfname. -\end{purepgflibrary} - -Two approaches to mirror transformation exist: -\begin{enumerate} -\item Using the reflection matrix (see left column). - - This depends on |\pgfpointnormalised|\indexCommandO\pgfpointnormalised which involves - the sine\indexMathFunctionO{sin} and the cosine\indexMathFunctionO{cos} functions of \pgfname math. - -\item Using built-in transformations (see right column). - - This depends on |\pgfmathanglebetweenpoints|\indexCommandO\pgfmathanglebetweenpoints which - involves the arctangent (|atan2|\indexMathFunctionO{atan2}) function of \pgfname math. -\end{enumerate} - -Which one is better? I don't know. -Choose one you're comfortable with. - -\begin{paracol}{2} - -\subsection{Using the reflection matrix} - -The following commands use the reflection matrix that sets the transformation matrix following -\begin{equation*} - A = \frac{1}{\Vert\vec l\Vert^2} \begin{bmatrix} - l_x^2-l_y^2 & 2l_xl_y \\ - 2l_xl_y & l_y^2-l_x^2\\ - \end{bmatrix}. -\end{equation*} - -\switchcolumn% > - -\stepcounter{subsection} -\subsection{Using built-in transformations} - -The following commands use a combination of shifting, rotating, $-1$ scaling, -rotating back and shifting back to reach the mirror transformation. - -The commands are named the same as on the left side, -only the |m| in |mirror| is capitalized. - -\switchcolumn*% < - -\begin{command}{\pgftransformxmirror\marg{value}} - Sets up a transformation that mirrors along a vertical line that goes through point $(\text{\meta{value}}, 0)$. - -\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] -\begin{tikzpicture} -\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); - -\draw[dashed] (1.5, -.25) -- (1.5, 1.25); -\pgftransformxmirror{1.5} - -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); -\end{tikzpicture} -\end{codeexample} -\end{command} - -\switchcolumn% > - -\begin{command}{\pgftransformxMirror\marg{value}} - Sets up a transformation that mirrors along a vertical line that goes through point $(\text{\meta{value}}, 0)$. - -\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] -\begin{tikzpicture} -\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); - -\draw[dashed] (1.5, -.25) -- (1.5, 1.25); -\pgftransformxMirror{1.5} - -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); -\end{tikzpicture} -\end{codeexample} -\end{command} - -\switchcolumn*% < - -\begin{command}{\pgftransformymirror\marg{value}} - Sets up a transformation that mirrors along a horizontal line that goes through point $(0, \text{\meta{value})}$. -\end{command} - -\begin{command}{\pgftransformmirror\marg{point A}\marg{point B}} - Sets up a transformation that mirrors along the line that goes through \meta{point A} and \meta{point B}. - -\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] -\begin{tikzpicture} -\draw[help lines] (-.25, -2.25) grid (2.5, 1.25); -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); - -\draw[dashed] (0, -1) -- (2, 0); -\pgftransformmirror{\pgfpointxy{0}{-1}} - {\pgfpointxy{2}{ 0}} - -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); -\end{tikzpicture} -\end{codeexample} -\end{command} - -\switchcolumn% > - -\begin{command}{\pgftransformyMirror\marg{value}} - Sets up a transformation that mirrors along a horizontal line that goes through point $(0, \text{\meta{value})}$. -\end{command} - -\begin{command}{\pgftransformMirror\marg{point A}\marg{point B}} - Sets up a transformation that mirrors along the line that goes through \meta{point A} and \meta{point B}. - -\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] -\begin{tikzpicture} -\draw[help lines] (-.25, -2.25) grid (2.5, 1.25); -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); - -\draw[dashed] (0, -1) -- (2, 0); -\pgftransformMirror{\pgfpointxy{0}{-1}} - {\pgfpointxy{2}{ 0}} - -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); -\end{tikzpicture} -\end{codeexample} -\end{command} - -\switchcolumn*% < - -\begin{command}{\pgfqtransformmirror\marg{point A}} - Sets up a transformation that mirrors along the line that goes through the origin and \meta{point A}. - -\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] -\begin{tikzpicture} -\draw[help lines] (-.25, -.25) grid (2.25, 1.25); -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); - -\draw[dashed] (0, 0) -- (2, 1); -\pgfqtransformmirror{\pgfpointxy{2}{1}} - -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); -\end{tikzpicture} -\end{codeexample} -\end{command} - -\switchcolumn - -\begin{command}{\pgfqtransformMirror\marg{point A}} - Sets up a transformation that mirrors along the line that goes through the origin and \meta{point A}. - -\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] -\begin{tikzpicture} -\draw[help lines] (-.25, -.25) grid (2.25, 1.25); -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); - -\draw[dashed] (0, 0) -- (2, 1); -\pgfqtransformMirror{\pgfpointxy{2}{1}} - -\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); -\end{tikzpicture} -\end{codeexample} -\end{command} - -\end{paracol} -\endinput diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.bib b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.bib deleted file mode 100644 index 7bb85bf7b2..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.bib +++ /dev/null @@ -1,299 +0,0 @@ -' -@Misc{NodeFam-Q, - author = {Holene}, - month = apr, - title = {Dependent node size in {TikZ}}, - year = {2017}, - file = {Snapshot:https\://tex.stackexchange.com/questions/107227/dependent-node-size-in-tikz/121054#121054:text/html}, - url = {https://tex.stackexchange.com/q/107227/16595}, - urldate = {2022-09-24}, -} - -@Misc{NodeFam-A, - author = {Qrrbrbirlbel}, - month = jun, - title = {Answer to \enquote{{Dependent} node size in {TikZ}}}, - year = {2013}, - file = {Snapshot:https\://tex.stackexchange.com/questions/107227/dependent-node-size-in-tikz/121054#121054:text/html}, - url = {https://tex.stackexchange.com/a/121054/16595}, - urldate = {2022-09-24}, -} - -' -@Misc{TimerRect-Q, - author = {CrazyArm}, - month = apr, - title = {Is {It} {Possible} to {Combine} {TikZ} {Distance} and {Line}-{To} {Operations}?}, - year = {2013}, - file = {Snapshot:https\://tex.stackexchange.com/questions/106558/is-it-possible-to-combine-tikz-distance-and-line-to-operations/106571#106571:text/html}, - url = {https://tex.stackexchange.com/q/106558/16595}, - urldate = {2022-09-24}, -} - -@Misc{TimerRect-A, - author = {Qrrbrbirlbel}, - month = apr, - title = {Answer to \enquote{{Is} {It} {Possible} to {Combine} {TikZ} {Distance} and {Line}-{To} {Operations}?}}, - year = {2013}, - file = {Snapshot:https\://tex.stackexchange.com/questions/106558/is-it-possible-to-combine-tikz-distance-and-line-to-operations/106571#106571:text/html}, - shorttitle = {Answer to "{Is} {It} {Possible} to {Combine} {TikZ} {Distance} and {Line}-{To} {Operations}?}, - url = {https://tex.stackexchange.com/a/106571/16595}, - urldate = {2022-09-24}, -} - -' -@Misc{TimerPara-Q, - author = {cis}, - month = may, - title = {{TikZ}: {How} to place a coordinate at parabola-path-position?}, - year = {2020}, - file = {Snapshot:https\://tex.stackexchange.com/questions/543251/tikz-how-to-place-a-coordinate-at-parabola-path-position/621012#621012:text/html}, - shorttitle = {{TikZ}}, - url = {https://tex.stackexchange.com/q/543251/16595}, - urldate = {2022-09-24}, -} - -@Misc{TimerPara-A, - author = {Qrrbrbirlbel}, - month = nov, - title = {Answer to \enquote{{TikZ}: {How} to place a coordinate at parabola-path-position?}}, - year = {2021}, - file = {Snapshot:https\://tex.stackexchange.com/questions/543251/tikz-how-to-place-a-coordinate-at-parabola-path-position/621012#621012:text/html}, - shorttitle = {Answer to "{TikZ}}, - url = {https://tex.stackexchange.com/a/621012/16595}, - urldate = {2022-09-24}, -} - -' -@Misc{Pattern-Q, - author = {knut}, - month = mar, - title = {{TikZ}: {Define} pattern with reference to external picture}, - year = {2013}, - file = {Snapshot:https\://tex.stackexchange.com/questions/103980/tikz-define-pattern-with-reference-to-external-picture/107144#107144:text/html}, - shorttitle = {{TikZ}}, - url = {https://tex.stackexchange.com/q/103980/16595}, - urldate = {2022-09-24}, -} - -@Misc{Pattern-A, - author = {Qrrbrbirlbel}, - month = apr, - title = {Answer to \enquote{{TikZ}: {Define} pattern with reference to external picture}}, - year = {2013}, - file = {Snapshot:https\://tex.stackexchange.com/questions/103980/tikz-define-pattern-with-reference-to-external-picture/107144#107144:text/html}, - shorttitle = {Answer to "{TikZ}}, - url = {https://tex.stackexchange.com/a/107144/16595}, - urldate = {2022-09-24}, -} - -' -@Misc{WeekNum-Q, - author = {Fence}, - month = nov, - title = {Add week day to calendar}, - year = {2019}, - file = {Snapshot:https\://tex.stackexchange.com/questions/517338/add-week-day-to-calendar/651888#651888:text/html}, - url = {https://tex.stackexchange.com/q/517338/16595}, - urldate = {2022-09-24}, -} - -@Misc{WeekNum-A, - author = {Qrrbrbirlbel}, - month = jul, - title = {Answer to \enquote{{Add} week day to calendar}}, - year = {2022}, - file = {Snapshot:https\://tex.stackexchange.com/questions/517338/add-week-day-to-calendar/651888#651888:text/html}, - url = {https://tex.stackexchange.com/a/651888/16595}, - urldate = {2022-09-24}, -} - -' -@Misc{CalCond-Q, - author = {healyp}, - month = oct, - title = {{TikZ} calendar and conditional tests}, - year = {2013}, - file = {Snapshot:https\://tex.stackexchange.com/questions/140948/tikz-calendar-and-conditional-tests/141027#141027:text/html}, - url = {https://tex.stackexchange.com/q/140948/16595}, - urldate = {2022-09-24}, -} - -@Misc{CalCond-A, - author = {Qrrbrbirlbel}, - month = oct, - title = {Answer to \enquote{{TikZ} calendar and conditional tests}}, - year = {2013}, - file = {Snapshot:https\://tex.stackexchange.com/questions/140948/tikz-calendar-and-conditional-tests/141027#141027:text/html}, - url = {https://tex.stackexchange.com/a/141027/16595}, - urldate = {2022-09-24}, -} - -' -@Misc{CalMath-Q, - author = {cis}, - month = dec, - title = {{TikZ} / calendar: {Set} the height of a monthly calendar}, - year = {2018}, - file = {Snapshot:https\://tex.stackexchange.com/questions/464589/tikz-calendar-set-the-height-of-a-monthly-calendar/653146#653146:text/html}, - shorttitle = {{TikZ} / calendar}, - url = {https://tex.stackexchange.com/q/464589/16595}, - urldate = {2022-09-24}, -} - -@Misc{CalMath-A, - author = {Qrrbrbirlbel}, - month = aug, - title = {Answer to \enquote{{TikZ} / calendar: {Set} the height of a monthly calendar}}, - year = {2022}, - file = {Snapshot:https\://tex.stackexchange.com/questions/464589/tikz-calendar-set-the-height-of-a-monthly-calendar/653146#653146:text/html}, - shorttitle = {Answer to "{TikZ} / calendar}, - url = {https://tex.stackexchange.com/a/653146/16595}, - urldate = {2022-09-24}, -} - -' -@Misc{FullArc-Q, - author = {Peter, Anthony}, - month = apr, - title = {A rather difficult ring like picture to be drawn}, - year = {2017}, - file = {Snapshot:https\://tex.stackexchange.com/questions/144293/a-rather-difficult-ring-like-picture-to-be-drawn/144297#144297:text/html}, - url = {https://tex.stackexchange.com/q/144293/16595}, - urldate = {2022-09-24}, -} - -@Misc{FullArc-A, - author = {Qrrbrbirlbel}, - month = nov, - title = {Answer to "{A} rather difficult ring like picture to be drawn"}, - year = {2013}, - file = {Snapshot:https\://tex.stackexchange.com/questions/144293/a-rather-difficult-ring-like-picture-to-be-drawn/144297#144297:text/html}, - url = {https://tex.stackexchange.com/a/144297/16595}, - urldate = {2022-09-24}, -} - -' -@Misc{NodeFam-Ellipse, - author = {nkk}, - month = jun, - title = {How to prevent tikz custom node fill from covering the text when using node-families library}, - year = {2019}, - file = {Snapshot:https\://tex.stackexchange.com/questions/494862/how-to-prevent-tikz-custom-node-fill-from-covering-the-text-when-using-node-fami:text/html}, - url = {https://tex.stackexchange.com/q/494862/16595}, - urldate = {2022-09-24}, -} - -' -@Misc{ShapeHeat-Q, - author = {boje}, - month = may, - title = {Heatmap over country like {Google} {Map}}, - year = {2013}, - file = {Snapshot:https\://tex.stackexchange.com/questions/112929/heatmap-over-country-like-google-map/113004#113004:text/html}, - url = {https://tex.stackexchange.com/q/112929/16595}, - urldate = {2022-09-24}, -} - -@Misc{ShapeHeat-A, - author = {Qrrbrbirlbel}, - month = may, - title = {Answer to \enquote{{Heatmap} over country like {Google} {Map}}}, - year = {2013}, - file = {Snapshot:https\://tex.stackexchange.com/questions/112929/heatmap-over-country-like-google-map/113004#113004:text/html}, - url = {https://tex.stackexchange.com/a/113004/16595}, - urldate = {2022-09-24}, -} - -' -@Misc{ShapeSplitCircle-Q, - author = {Marco}, - month = apr, - title = {{TikZ} - {Four} {Colored} {Circle} {Split}}, - year = {2017}, - file = {Snapshot:https\://tex.stackexchange.com/questions/121686/tikz-four-colored-circle-split/121767#121767:text/html}, - url = {https://tex.stackexchange.com/q/121686/16595}, - urldate = {2022-09-24}, -} - -@Misc{ShapeSplitCircle-A, - author = {Qrrbrbirlbel}, - month = jun, - title = {Answer to \enquote{{TikZ} - {Four} {Colored} {Circle} {Split}}}, - year = {2013}, - file = {Snapshot:https\://tex.stackexchange.com/questions/121686/tikz-four-colored-circle-split/121767#121767:text/html}, - url = {https://tex.stackexchange.com/a/121767/16595}, - urldate = {2022-09-24}, -} - -' -@Online{ShapeSuperEllipse-Q, - author = {somenxavier}, - file = {Snapshot:https\://tex.stackexchange.com/questions/649144/an-oval-surrounded-a-long-text-inside-in-tikz-equivalent-cover-background-of/654759#654759:text/html}, - month = aug, - title = {An oval surrounded a *long text* inside in {TikZ} [equivalent cover background of {METAFUN}]}, - titleaddon = {{TeX} - {LaTeX} Stack Exchange}, - url = {https://tex.stackexchange.com/q/649144/16595}, - urldate = {2022-09-24}, - year = {2022}, -} - -@Online{ShapeSuperEllipse-A, - author = {Qrrbrbirlbel}, - file = {Snapshot:https\://tex.stackexchange.com/questions/649144/an-oval-surrounded-a-long-text-inside-in-tikz-equivalent-cover-background-of/654759#654759:text/html}, - month = aug, - title = {Answer to \enquote{An oval surrounded a *long text* inside in {TikZ} [equivalent cover background of {METAFUN}]}}, - titleaddon = {{TeX} - {LaTeX} Stack Exchange}, - url = {https://tex.stackexchange.com/a/654759/16595}, - urldate = {2022-09-24}, - year = {2022}, -} - -' -@Online{ShapeCircleArrow-Q, - author = {projetmbc}, - file = {Snapshot:https\://tex.stackexchange.com/questions/95221/tikz-circled-arrow/95263#95263:text/html}, - month = jan, - title = {{TikZ} - \enquote{Circled} arrow}, - titleaddon = {{TeX} - {LaTeX} Stack Exchange}, - url = {https://tex.stackexchange.com/q/95221/16595}, - urldate = {2022-09-24}, - year = {2013}, -} - -@Online{ShapeCircleArrow-A, - author = {Qrrbrbirlbel}, - file = {Snapshot:https\://tex.stackexchange.com/questions/95221/tikz-circled-arrow/95263#95263:text/html}, - month = jan, - title = {Answer to \enquote{{TikZ} - \enquote{Circled} arrow}}, - titleaddon = {{TeX} - {LaTeX} Stack Exchange}, - url = {https://tex.stackexchange.com/a/95263/16595}, - urldate = {2022-09-24}, - year = {2013}, -} - -' -@Online{ForeachUse-Q, - author = {Bar, Foo}, - file = {Snapshot:https\://tex.stackexchange.com/questions/110962/how-to-use-declared-tikz-functions-in-foreach-condition/110996#110996:text/html}, - month = apr, - title = {How to use declared {TikZ} functions in {\textbackslash}foreach condition?}, - titleaddon = {{TeX} - {LaTeX} Stack Exchange}, - url = {https://tex.stackexchange.com/q/110962/16595}, - urldate = {2022-09-24}, - year = {2013}, -} - -@Online{ForeachUse-A, - author = {Qrrbrbirlbel}, - file = {Snapshot:https\://tex.stackexchange.com/questions/110962/how-to-use-declared-tikz-functions-in-foreach-condition/110996#110996:text/html}, - month = apr, - shorttitle = {Answer to "How to use declared {TikZ} functions in {\textbackslash}foreach condition?}, - title = {Answer to \enquote{How to use declared {TikZ} functions in {\textbackslash}foreach condition?}}, - titleaddon = {{TeX} - {LaTeX} Stack Exchange}, - url = {https://tex.stackexchange.com/a/110996/16595}, - urldate = {2022-09-24}, - year = {2013}, -} - -@Comment{jabref-meta: databaseType:bibtex;} diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.pdf b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.pdf deleted file mode 100644 index afeef21a22..0000000000 Binary files a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.pdf and /dev/null differ diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.tex deleted file mode 100644 index 1f2400847a..0000000000 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.tex +++ /dev/null @@ -1,32 +0,0 @@ -% !TeX TS-program = lualatex -% !TeX spellcheck = en_US -% !TeX root = tikz-ext-manual.tex -% arara: lualatex -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\documentclass[a4paper,doc2,landscape]{ltxdoc} - -\input{tikz-ext-manual-en-main-preamble.tex} -\usetikzlibrary{external} -%\newif\iftikzextmanualexternalize -%\tikzextmanualexternalizetrue -%\iftikzextmanualexternalize - \tikzexternalize[ - prefix=tikz/, -% mode=convert with system call, - %mode=list and make, - %mode=list only,export=true,% simply skips EVERY picture -> good for debugging the text. - ] - \tikzexternalenable - \tikzifexternalizing{% - \pgfkeys{/pdflinks/codeexample links=false}% - }{}% -%\fi - -\input{tikz-ext-manual-en-main-body.tex} diff --git a/graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.code.tex b/graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.code.tex deleted file mode 100644 index b32ac9a3a6..0000000000 --- a/graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.code.tex +++ /dev/null @@ -1,327 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\pgfqkeys{/pgf/calendar}{ - style/.style={#1}, - yesterday/.value required, - yesterday/.code={% - \begingroup - \pgfutil@tempcnta=\pgfcalendarifdatejulian\relax - \advance\pgfutil@tempcnta by -1\relax - \pgfcalendarjuliantodate{\pgfutil@tempcnta}{\pgfcalendarifdateyear}{\pgfcalendarifdatemonth}{\pgfcalendarifdateday}% - \edef\pgfcalendarifdatejulian{\the\pgfutil@tempcnta}% - \pgfcalendarjuliantoweekday\pgfutil@tempcnta\pgfutil@tempcntb - \edef\pgfcalendarifdateweekday{\the\pgfutil@tempcntb}% - \pgfcalendarjulianyeartoweek\pgfutil@tempcnta\pgfcalendarifdateyear\pgfutil@tempcntb - \edef\pgfcalendarifdateweek{\the\pgfutil@tempcntb}% - \pgfcalendar@launch@ifdate{#1}{% - \def\pgf@cal@temp{\pgfcalendarmatchestrue}% - }{% - \let\pgf@cal@temp\pgfutil@empty - }% - \expandafter - \endgroup\pgf@cal@temp - }, - Jan/.code={\ifnum\pgfcalendarifdatemonth=1 \expandafter\pgfcalendarmatchestrue\fi},Jan/.value forbidden, - Feb/.code={\ifnum\pgfcalendarifdatemonth=2 \expandafter\pgfcalendarmatchestrue\fi},Feb/.value forbidden, - Mar/.code={\ifnum\pgfcalendarifdatemonth=3 \expandafter\pgfcalendarmatchestrue\fi},Mar/.value forbidden, - Apr/.code={\ifnum\pgfcalendarifdatemonth=4 \expandafter\pgfcalendarmatchestrue\fi},Apr/.value forbidden, - May/.code={\ifnum\pgfcalendarifdatemonth=5 \expandafter\pgfcalendarmatchestrue\fi},May/.value forbidden, - Jun/.code={\ifnum\pgfcalendarifdatemonth=6 \expandafter\pgfcalendarmatchestrue\fi},Jun/.value forbidden, - Jul/.code={\ifnum\pgfcalendarifdatemonth=7 \expandafter\pgfcalendarmatchestrue\fi},Jul/.value forbidden, - Aug/.code={\ifnum\pgfcalendarifdatemonth=8 \expandafter\pgfcalendarmatchestrue\fi},Aug/.value forbidden, - Sep/.code={\ifnum\pgfcalendarifdatemonth=9 \expandafter\pgfcalendarmatchestrue\fi},Sep/.value forbidden, - Oct/.code={\ifnum\pgfcalendarifdatemonth=10 \expandafter\pgfcalendarmatchestrue\fi},Oct/.value forbidden, - Nov/.code={\ifnum\pgfcalendarifdatemonth=11 \expandafter\pgfcalendarmatchestrue\fi},Nov/.value forbidden, - Dec/.code={\ifnum\pgfcalendarifdatemonth=12 \expandafter\pgfcalendarmatchestrue\fi},Dec/.value forbidden, - % - difference between/.code args={#1and#2 #3 #4}{% - \pgfcalendardatetojulian{#1}\pgfutil@tempcnta - \pgfcalendardatetojulian{#2}\pgfutil@tempcntb - \advance\pgfutil@tempcntb by -\pgfutil@tempcnta - \ifnum\pgfutil@tempcntb#3#4\relax - \pgfcalendarmatchestrue - \fi}, - weekday before or same/.code args={#1and#2}{% - \pgfcalendarjuliantoweekday{#1}\pgfutil@tempcnta - \pgfcalendarjuliantoweekday{#2}\pgfutil@tempcntb - \ifnum\pgfutil@tempcntb<\pgfutil@tempcnta - \pgfcalendarmatchestrue - \fi - }, - leap year/.code={% - \pgfutil@tempcnta=#1\relax - \divide\pgfutil@tempcnta4 - \multiply\pgfutil@tempcnta4 - \ifnum\pgfutil@tempcnta=#1\relax - \divide\pgfutil@tempcnta100 - \multiply\pgfutil@tempcnta100 - \ifnum\pgfutil@tempcnta=#1\relax - \divide\pgfutil@tempcnta400 - \multiply\pgfutil@tempcnta400 - \ifnum\pgfutil@tempcnta=#1\relax - \pgfcalendarmatchestrue - \fi - \else - \pgfcalendarmatchestrue - \fi - \fi}, - leap year/.default=\pgfcalendarifdateyear, - between days/.code args={#1and#2}{% - \pgfutil@tempcnta=#1\relax - \ifnum\pgfcalendarifdateday<\pgfutil@tempcnta\else - \pgfutil@tempcnta=#2\relax - \ifnum\pgfcalendarifdateday>\pgfutil@tempcnta\else - \pgfcalendarmatchestrue\fi\fi}, - week of month/.code={% - \pgfutil@tempcnta=#1\relax - \multiply\pgfutil@tempcnta7 - \ifnum\pgfcalendarifdateday>\pgfutil@tempcnta\else - \advance\pgfutil@tempcnta-7 - \ifnum\pgfcalendarifdateday>\pgfutil@tempcnta - \pgfcalendarmatchestrue - \fi - \fi}, - week of month'/.code={% - \pgfcalendar@getlastYMX\pgfcalendarifdateyear\pgfcalendarifdatemonth\pgfutil@tempcnta - \advance\pgfutil@tempcnta1 - \pgfutil@tempcntb=#1\relax - \multiply\pgfutil@tempcntb7 - \advance\pgfutil@tempcnta-\pgfutil@tempcntb - \ifnum\pgfcalendarifdateday<\pgfutil@tempcnta\else - \advance\pgfutil@tempcnta+7 - \ifnum\pgfcalendarifdateday<\pgfutil@tempcnta - \pgfcalendarmatchestrue - \fi - \fi}, - first/.code={\pgfutil@in@:{#1}\ifpgfutil@in@ - \pgfcalendar@ifdate@first{}#1\pgf@stop\else - \pgfcalendar@ifdate@first{}1:#1\pgf@stop\fi}, - last/.code={\pgfutil@in@:{#1}\ifpgfutil@in@ - \pgfcalendar@ifdate@first'#1\pgf@stop\else - \pgfcalendar@ifdate@first'1:#1\pgf@stop\fi}, - % logic - not/.value required, - not/.code=% - \begingroup - \let\pgf@cal@tempa\pgfutil@empty - \pgfcalendar@launch@ifdate{#1}{}{\def\pgf@cal@tempa{\pgfcalendarmatchestrue}}% - \expandafter\endgroup\pgf@cal@tempa, - and/.value required, - and/.code=% and = {, , , …} - \begingroup - \pgfcalendarmatchestrue - \pgfqkeys{/pgf/calendar/and}{#1}% - \ifpgfcalendarmatches % is it still true? - \expandafter\pgfutil@firstoftwo - \else - \expandafter\pgfutil@secondoftwo - \fi - {\def\pgf@cal@temp{\pgfcalendarmatchestrue}}% - {\let\pgf@cal@temp\pgfutil@empty}% - \expandafter\endgroup\pgf@cal@temp, - and/.unknown/.code=% only inside the group of and/.code - \ifpgfcalendarmatches - \expandafter\pgfutil@firstofone - \else - \expandafter\pgfutil@gobble - \fi - {% - \begingroup - \pgfcalendar@launch@ifdate{\pgfkeyscurrentname={#1}}% - {\let\pgf@cal@temp\pgfutil@empty}{\def\pgf@cal@temp{\pgfcalendarmatchesfalse}} - \expandafter\endgroup\pgf@cal@temp - }% -} - -\def\pgfcalendar@ifdate@first#1#2:#3\pgf@stop{% - \pgfqkeys{/pgf/calendar}{and={#3, week of month#1={#2}}}} -\def\pgfcalendar@getlastYMX#1#2#3{% #1 = year, #2 = month, #3 := last day - \begingroup - \ifnum#2=2 % stupid February - \pgfcalendarmatchesfalse - \pgfqkeys{/pgf/calendar}{leap year={#1}}% - \ifpgfcalendarmatches - #3=29 - \else - #3=28 - \fi - \else - #3=\ifcase#2\relax\or - 31\or\or31\or30\or31\or30\or31\or31\or30\or31\or30\or31\fi - \fi - \edef\pgf@cal@temp{#3=\the#3\relax} - \expandafter - \endgroup\pgf@cal@temp} - -% -% weeks -% -\def\pgfcalendar@week@setup#1{% - \pgfutil@IfUndefined{pgfcalendar@week@#1}{% - \begingroup - \pgfcalendardatetojulian{#1-01-01}\pgfutil@tempcnta - \pgfcalendarjuliantoweekday\pgfutil@tempcnta\pgfutil@tempcntb - % - % tempcnta holds the julian number for first day of the current year - % tempcntb holds the weekday for the first day of the current year - % - % set tempcnta to the Monday of the week with first day of current year - \advance\pgfutil@tempcnta by -\pgfutil@tempcntb - % - % if the first week starts at Fri, Sat or Sun, next week is the 1st week - \ifnum\pgfutil@tempcntb>3\relax - \advance\pgfutil@tempcnta by 7\relax - \fi - % setup macro for year with {Julian number for day of first week}{weekday of -01-01} - \edef\pgf@cal@temp{\def\expandafter\noexpand\csname pgfcalendar@week@#1\endcsname - {{\the\pgfutil@tempcnta}{\the\pgfutil@tempcntb}}}% - \expandafter\endgroup\pgf@cal@temp - }{}% -} - -\def\pgfcalendarjulianyeartoweek#1#2#3{\pgfcalendarjulianyeartoweek@{#1}{#2}{#3}{\iftrue}} -\def\pgfcalendarjulianyeartoweek@#1#2#3#4{% - % #1 = julian date (count) - % #2 = year - % #3 = count that holds the week at the end - % #4 = \iftrue or \iffalse: whether week 53 needs to be checked (\iffalse when determing week from next year) - \begingroup - \pgfcalendar@week@setup{#2}% - #3=#1\relax - % - % calculate difference of days between current date and start of week 1 - % - \advance#3 by -\expandafter\expandafter\expandafter\pgfutil@firstoftwo\csname pgfcalendar@week@#2\endcsname\relax - \ifnum#3<0\relax % whoops, we are in the week of the previous year - \expandafter\pgfutil@firstoftwo - \else - \expandafter\pgfutil@secondoftwo - \fi - {% if first day of the year is Fri, Sat or Sun - \ifnum\expandafter\expandafter\expandafter\pgfutil@secondoftwo\csname pgfcalendar@week@#2\endcsname>3\relax - \expandafter\pgfutil@firstoftwo - \else - \expandafter\pgfutil@secondoftwo - \fi - {% we need to check the week of the previous year - #3=#2\relax - \advance#3 by -1 - \edef\pgf@cal@temp{\noexpand\pgfcalendarjulianyeartoweek@#1{\the#3}#3\noexpand\iffalse}% - \pgf@cal@temp - }{% yeah, it's weird - \divide#3 by 7 - \advance#3 by 1 - } - }{% - \divide#3 by 7 - \advance#3 by 1 - #4% - \expandafter\pgfutil@firstofone - \else - \expandafter\pgfutil@gobble - \fi - {% - \ifnum#3=53\relax % whoops, we are possibly in the first week of the next year - \expandafter\pgfutil@firstofone - \else - \expandafter\pgfutil@gobble - \fi - {% - \begingroup - % check whether we're already in week 1 of the next year - #3=#2\relax - \advance#3 by 1 - \expandafter\pgfcalendar@week@setup\expandafter{\the#3}% - \ifnum#1<\expandafter\expandafter\expandafter\pgfutil@firstoftwo\csname pgfcalendar@week@\the#3\endcsname\relax - #3=53 - \else - #3=1 - \fi - \expandafter - \endgroup\expandafter#3\the#3\relax - }% - }% - }% - \expandafter - \endgroup\expandafter - #3\the#3\relax -} - -% -% shorthands for weeks (n) -% -% n-: shortest -% n=: shortest but prepends whitespace -% n0: leading zero -% -\expandafter\def\csname pgfcalendar@shorthand@n-\endcsname{% - \if0\pgfcalendarcurrentweek\else\pgfcalendarcurrentweek\fi} -\expandafter\def\csname pgfcalendar@shorthand@n=\endcsname{% - {\pgfutil@tempcnta=\pgfcalendarcurrentweek\relax\ifnum\pgfutil@tempcnta<10\relax\setbox0=\hbox{1}\kern\wd0\relax\fi\the\pgfutil@tempcnta}} -\expandafter\def\csname pgfcalendar@shorthand@n0\endcsname{% - \pgfcalendarcurrentweek} - -% -% Overwriting original \pgfcalendar -% -\long\def\pgfcalendar#1#2#3#4{% - \begingroup% - % Setup local \ifdate - \let\ifdate=\pgfcalendar@local@ifdate% - % Let's start with computing start and end dates... - \def\pgfcalendarprefix{#1}% - \pgfcalendardatetojulian{#2}{\pgfcalendarcurrentjulian}% - \edef\pgfcalendarbeginjulian{\the\pgfcalendarcurrentjulian}% - \edef\pgfcalendarbeginiso{#2}% - \pgfcalendardatetojulian{#3}{\pgfutil@tempcnta}% - \edef\pgfcalendarendjulian{\the\pgfutil@tempcnta}% - \advance\pgfutil@tempcnta by1\relax% - \edef\pgfcalendarendjulianplus{\the\pgfutil@tempcnta}% - \edef\pgfcalendarendiso{#3}% - % - % Start main loop - % - \loop% - \ifnum\pgfcalendarcurrentjulian<\pgfcalendarendjulianplus\relax% - % Setup information about current date - \pgfcalendarjuliantodate{\pgfcalendarcurrentjulian}% - {\pgfcalendarcurrentyear}{\pgfcalendarcurrentmonth}{\pgfcalendarcurrentday}% - \pgfcalendarjuliantoweekday{\pgfcalendarcurrentjulian}{\pgfutil@tempcntb}% - \edef\pgfcalendarcurrentweekday{\the\pgfutil@tempcntb}% - \pgfcalendarjulianyeartoweek{\pgfcalendarcurrentjulian}{\pgfcalendarcurrentyear}{\pgfutil@tempcntb}% - \edef\pgfcalendarcurrentweek{\ifnum\pgfutil@tempcntb<10 0\fi\the\pgfutil@tempcntb}% - % Render: - #4% - % Advance day: - \advance\pgfcalendarcurrentjulian by1\relax% - \repeat% - \endgroup% -} - -% -% Overwriting original \pgfcalendar@local@ifdate -% -\def\pgfcalendar@local@ifdate{% - \let\pgfcalendarifdatejulian=\pgfcalendarcurrentjulian - \let\pgfcalendarifdateyear=\pgfcalendarcurrentyear - \let\pgfcalendarifdatemonth=\pgfcalendarcurrentmonth - \let\pgfcalendarifdateday=\pgfcalendarcurrentday - \let\pgfcalendarifdateweekday=\pgfcalendarcurrentweekday - \let\pgfcalendarifdateweek=\pgfcalendarcurrentweek - \pgfcalendar@launch@ifdate% -} - -\pgfqkeys{/pgf/calendar/week}{.value required,.code=\ifnum#1=\pgfcalendarifdateweek\relax\expandafter\pgfcalendarmatchestrue\fi} - -% Overwriting shorthands of pgfcalendar -\expandafter\def\csname pgfcalendar@shorthand@d-\endcsname{% - \if0\pgfcalendarcurrentday\else\pgfcalendarcurrentday\fi} -\expandafter\def\csname pgfcalendar@shorthand@m-\endcsname{% - \if0\pgfcalendarcurrentmonth\else\pgfcalendarcurrentmonth\fi} - -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.sty b/graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.sty deleted file mode 100644 index a0f5ef3bc0..0000000000 --- a/graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.sty +++ /dev/null @@ -1,11 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\RequirePackage{pgfcalendar} -\input{pgfcalendar-ext.code.tex} -\endinput diff --git a/graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.tex b/graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.tex deleted file mode 100644 index 30c44187a4..0000000000 --- a/graphics/pgf/contrib/tikz-ext/pgfcalendar-ext.tex +++ /dev/null @@ -1,13 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\input pgfcalendar.text -\catcode`\@=11 -\input pgfcalendar-ext.code.tex -\catcode`\@=\pgfcalendaratcode -\endinput diff --git a/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex b/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex deleted file mode 100644 index 9eb1c6ab09..0000000000 --- a/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex +++ /dev/null @@ -1,66 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\pgfset{ - circle arrow start angle/.initial=, - circle arrow end angle/.initial=, - circle arrow delta angle/.initial=, - circle arrow arrows/.initial=-, - circle arrow/@turn left/.style={/pgf/circle arrow arrows=->,/pgf/circle arrow delta angle=340}, - circle arrow/@turn right/.style={/pgf/circle arrow arrows=<-,/pgf/circle arrow delta angle=340}, - circle arrow turn left north/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=100}, - circle arrow turn left east/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=10}, - circle arrow turn left south/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=280}, - circle arrow turn left west/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=190}, - circle arrow turn right north/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=100}, - circle arrow turn right east/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=10}, - circle arrow turn right south/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=280}, - circle arrow turn right west/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=190}, -} -\pgfdeclareshape{circle arrow}{ - \inheritsavedanchors[from=circle] - \inheritanchorborder[from=circle] - \inheritanchor[from=circle]{north} - \inheritanchor[from=circle]{north west} - \inheritanchor[from=circle]{north east} - \inheritanchor[from=circle]{center} - \inheritanchor[from=circle]{west} - \inheritanchor[from=circle]{east} - \inheritanchor[from=circle]{mid} - \inheritanchor[from=circle]{mid west} - \inheritanchor[from=circle]{mid east} - \inheritanchor[from=circle]{base} - \inheritanchor[from=circle]{base west} - \inheritanchor[from=circle]{base east} - \inheritanchor[from=circle]{south} - \inheritanchor[from=circle]{south west} - \inheritanchor[from=circle]{south east} - \backgroundpath{ - \pgfkeysgetvalue{/pgf/circle arrow start angle}\pgf@sh@circlearrow@s - \pgfkeysgetvalue{/pgf/circle arrow end angle}\pgf@sh@circlearrow@e - \pgfkeysgetvalue{/pgf/circle arrow delta angle}\pgf@sh@circlearrow@d - \ifx\pgf@sh@circlearrow@s\pgfutil@empty% - \pgfmathsetmacro\pgf@sh@circlearrow@s{\pgf@sh@circlearrow@e-\pgf@sh@circlearrow@d}% - \else - \ifx\pgf@sh@circlearrow@e\pgfutil@empty% - \pgfmathsetmacro\pgf@sh@circlearrow@e{\pgf@sh@circlearrow@s+\pgf@sh@circlearrow@d}% - \fi% - \fi - \pgfutil@tempdima=\radius - \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% - \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% - \ifdim\pgf@xb<\pgf@yb - \advance\pgfutil@tempdima by-\pgf@yb - \else - \advance\pgfutil@tempdima by-\pgf@xb - \fi - \pgfpathmoveto{\pgfpointadd{\centerpoint}{\pgfpointpolar{\pgf@sh@circlearrow@s}{\pgfutil@tempdima}}}% - \pgfpatharc{\pgf@sh@circlearrow@s}{\pgf@sh@circlearrow@e}{\pgfutil@tempdima}% - \pgfkeysgetvalue{/pgf/circle arrow arrows}\pgf@temp - \expandafter\pgfsetarrows\expandafter{\pgf@temp}% - } -} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.circlecrosssplit.code.tex b/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.circlecrosssplit.code.tex deleted file mode 100644 index 7bc2761fb4..0000000000 --- a/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.circlecrosssplit.code.tex +++ /dev/null @@ -1,292 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\usepgflibrary{shapes.multipart} -\let\pgfnodeparttrbox\pgfnodeparttwobox -\let\pgfnodepartblbox\pgfnodepartthreebox -\let\pgfnodepartbrbox\pgfnodepartfourbox -\newif\ifpgfcirclecrosssplitcustomfill -\pgfset{% - circle cross split part fill/.code=% - \def\pgf@lib@sh@ccs@list@fill{#1}% - \pgfcirclecrosssplitcustomfilltrue,% - circle cross split uses custom fill/.is if=pgfcirclecrosssplitcustomfill -} -\def\pgf@lib@sh@ccs@list@fill{none}% -\pgfdeclareshape{circle cross split}{% - \nodeparts{text,two,three,four}% - \savedanchor\centerpoint{% - \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/inner xsep}}% - \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}% - \pgf@x =\wd\pgfnodeparttextbox - \pgf@yb=\dp\pgfnodeparttextbox - \pgf@y=\dp\pgfnodeparttwobox - \ifdim\pgf@yb>\pgf@y - \pgf@y=\pgf@yb - \fi - \advance\pgf@x\pgf@xa - \advance\pgf@y-\pgf@ya - \advance\pgf@x.5\pgflinewidth - \advance\pgf@y-.5\pgflinewidth - }% - \savedanchor\twoanchor{% - \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/inner xsep}}% - \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}% - \advance\pgf@x.5\pgflinewidth - \advance\pgf@x\pgf@xa - \advance\pgf@y.5\pgflinewidth - \advance\pgf@y\pgf@ya - \pgf@yb\dp\pgfnodeparttextbox - \pgf@yc\dp\pgfnodeparttwobox - \ifdim\pgf@yb>\pgf@yc - \pgf@yc\pgf@yb - \fi - \advance\pgf@y\pgf@yc - }% - \savedanchor\threeanchor{% - \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}% - \pgf@x\wd\pgfnodeparttextbox - \pgf@yb\dp\pgfnodeparttextbox - \pgf@yc\dp\pgfnodeparttwobox - \ifdim\pgf@yb>\pgf@yc - \pgf@yc\pgf@yb - \fi - \advance\pgf@y-\pgf@yc - \advance\pgf@y-2\pgf@ya - \advance\pgf@y-\pgflinewidth - \pgf@yb\ht\pgfnodepartthreebox - \pgf@yc\ht\pgfnodepartfourbox - \ifdim\pgf@yb>\pgf@yc - \pgf@yc\pgf@yb - \fi - \advance\pgf@y-\pgf@yc - \advance\pgf@x-\wd\pgfnodepartthreebox - }% - \saveddimen\radius{% - % height (upper): - \pgf@y=\ht\pgfnodeparttextbox - \ifdim\pgf@y<\ht\pgfnodeparttwobox - \pgf@y=\ht\pgfnodeparttwobox - \fi - \ifdim\dp\pgfnodeparttextbox>\dp\pgfnodeparttwobox - \advance\pgf@y by\dp\pgfnodeparttextbox - \else - \advance\pgf@y by\dp\pgfnodeparttwobox - \fi - % height (lower): - \pgf@yb\ht\pgfnodepartthreebox - \ifdim\pgf@yb<\ht\pgfnodepartfourbox - \pgf@yb=\ht\pgfnodepartfourbox - \fi - \pgf@yc=\dp\pgfnodepartthreebox - \ifdim\pgf@yc<\dp\pgfnodepartfourbox - \advance\pgf@yb by\dp\pgfnodepartfourbox - \else - \advance\pgf@yb by\pgf@yc - \fi - \ifdim\pgf@yc>\pgf@y - \pgf@y=\pgf@yc - \fi - \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}% - \advance\pgf@y2\pgf@ya - % - \pgf@x\wd\pgfnodeparttextbox - \pgf@xa\wd\pgfnodepartthreebox - \pgf@xb\wd\pgfnodeparttwobox - \pgf@xc\wd\pgfnodepartfourbox - \ifdim\pgf@xa>\pgf@x - \pgf@x\pgf@xa - \fi - \ifdim\pgf@xb>\pgf@x - \pgf@x\pgf@xb - \fi - \ifdim\pgf@xc>\pgf@x - \pgf@x\pgf@xc - \fi - \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/inner xsep}}% - \advance\pgf@x by 2\pgf@xa - \ifdim\pgf@y>\pgf@x - \pgf@x=\pgf@y - \fi - \advance\pgf@x by\pgflinewidth - % - \pgf@xa=\pgf@x - \pgf@ya=\pgf@y - % from circle: - \pgf@process{\pgfpointnormalised{}}% - \ifdim\pgf@x>\pgf@y% - \c@pgf@counta=\pgf@x% - \ifnum\c@pgf@counta=0\relax% - \else% - \divide\c@pgf@counta by 255\relax% - \pgf@xa=16\pgf@xa\relax% - \divide\pgf@xa by\c@pgf@counta% - \pgf@xa=16\pgf@xa\relax% - \fi% - \else% - \c@pgf@counta=\pgf@y% - \ifnum\c@pgf@counta=0\relax% - \else% - \divide\c@pgf@counta by 255\relax% - \pgf@ya=16\pgf@ya\relax% - \divide\pgf@ya by\c@pgf@counta% - \pgf@xa=16\pgf@ya\relax% - \fi% - \fi% - \pgf@x=\pgf@xa% - % - \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}% - \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}% - \ifdim\pgf@x<.5\pgf@xb - \pgf@x=.5\pgf@xb - \fi - \ifdim\pgf@x<.5\pgf@yb - \pgf@x=.5\pgf@yb - \fi - % - \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% - \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% - \ifdim\pgf@xb<\pgf@yb - \advance\pgf@x\pgf@yb - \else - \advance\pgf@x\pgf@xb - \fi - }% - \inheritanchorborder[from=circle]% - \inheritanchor[from=circle]{north}% - \inheritanchor[from=circle]{north west}% - \inheritanchor[from=circle]{north east}% - \inheritanchor[from=circle]{center}% - \inheritanchor[from=circle]{west}% - \inheritanchor[from=circle]{east}% - \inheritanchor[from=circle]{mid}% - \inheritanchor[from=circle]{mid west}% - \inheritanchor[from=circle]{mid east}% - \inheritanchor[from=circle]{base}% - \inheritanchor[from=circle]{base west}% - \inheritanchor[from=circle]{base east}% - \inheritanchor[from=circle]{south}% - \inheritanchor[from=circle]{south west}% - \inheritanchor[from=circle]{south east}% - \anchor{two}{\twoanchor}% - \anchor{three}{\threeanchor}% - \anchor{four}{ - \threeanchor - \pgf@ya=\pgf@y - \twoanchor - \pgf@y=\pgf@ya - }% - \anchor{lower base}{% - \threeanchor - \pgf@ya=\pgf@y - \centerpoint - \pgf@y=\pgf@ya - } - \anchor{lower base west}{% - \threeanchor - \pgf@ya=\pgf@y - \centerpoint - \pgf@y=\pgf@ya - \advance\pgf@x by-\radius - } - \anchor{lower base east}{% - \threeanchor - \pgf@ya=\pgf@y - \centerpoint - \pgf@y=\pgf@ya - \advance\pgf@x by\radius - } - \anchor{lower mid}{% - \threeanchor - \pgf@ya=\pgf@y - \centerpoint - \pgf@y=\pgf@ya - \pgfmathsetlength\pgf@ya{+.5ex}% - \advance\pgf@y by\pgf@ya - } - \anchor{lower mid west}{% - \threeanchor - \pgf@ya=\pgf@y - \centerpoint - \pgf@y=\pgf@ya - \advance\pgf@x by-\radius - \pgfmathsetlength\pgf@ya{+.5ex}% - \advance\pgf@y by\pgf@ya - } - \anchor{lower mid east}{% - \threeanchor - \pgf@ya=\pgf@y - \centerpoint - \pgf@y=\pgf@ya - \advance\pgf@x by\radius - \pgfmathsetlength\pgf@ya{+.5ex}% - \advance\pgf@y by\pgf@ya - } - \inheritbackgroundpath[from=circle] - \beforebackgroundpath{% - \pgfutil@tempdima=\radius - \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% - \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% - \ifdim\pgf@xb<\pgf@yb - \advance\pgfutil@tempdima by-\pgf@yb - \else - \advance\pgfutil@tempdima by-\pgf@xb - \fi - \advance\pgfutil@tempdima by-.5\pgflinewidth% - \pgfsetshortenstart{0pt}% - \pgfsetshortenend{0pt}% - \pgfsetarrows{-}% - \pgfpathmoveto - {\pgfpointadd{\centerpoint}{\pgfqpoint{-\pgfutil@tempdima}{0pt}}}% - \pgfpathlineto - {\pgfpointadd{\centerpoint}{\pgfqpoint{\pgfutil@tempdima}{0pt}}}% - \pgfpathmoveto - {\pgfpointadd{\centerpoint}{\pgfqpoint{0pt}{-\pgfutil@tempdima}}}% - \pgfpathlineto - {\pgfpointadd{\centerpoint}{\pgfqpoint{0pt}{\pgfutil@tempdima}}}% - \pgfusepathqstroke - }% - \behindbackgroundpath{% - \pgfutil@tempdima=\radius - \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% - \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% - \ifdim\pgf@xb<\pgf@yb - \advance\pgfutil@tempdima by-\pgf@yb - \else - \advance\pgfutil@tempdima by-\pgf@xb - \fi - \advance\pgfutil@tempdima by-.5\pgflinewidth% - \ifpgfcirclecrosssplitcustomfill% - \pgf@lib@sh@rs@process@list{\pgf@lib@sh@ccs@list@fill}{4}% - {% - \pgfmathloop - \ifnum\pgfmathcounter>4% - \else% - \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}% - \edef\pgf@tempa - {\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname}% - \ifx\pgf@tempa\pgf@lib@sh@rs@nonetext\else - \pgfsetfillcolor{\pgf@tempa}% - \ifcase\pgfmathcounter\or - \def\pgf@lib@sh@ccs@angle{90}\or - \def\pgf@lib@sh@ccs@angle{0}\or - \def\pgf@lib@sh@ccs@angle{180}\else - \def\pgf@lib@sh@ccs@angle{270}% - \fi - \pgfpathmoveto{\centerpoint}% - \pgfpathlineto{\pgfpointadd{\centerpoint} - {\pgfqpointpolar{\pgf@lib@sh@ccs@angle}{\pgfutil@tempdima}}}% - \pgfpatharc{+\pgf@lib@sh@ccs@angle}{\pgf@lib@sh@ccs@angle+90} - {+\pgfutil@tempdima}% - \pgfpathclose - \pgfusepathqfill - \fi - \repeatpgfmathloop - }% - \fi - }% -} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.heatmark.code.tex b/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.heatmark.code.tex deleted file mode 100644 index 477d0442da..0000000000 --- a/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.heatmark.code.tex +++ /dev/null @@ -1,181 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\pgfset{ - heatmark arc width/.initial=+4pt, - heatmark arc sep/.initial=+1pt, - heatmark arc rings/.initial=3, - heatmark arcs/.initial=3, - heatmark arc sep angle/.initial=20, - heatmark inner opacity/.initial=.8, - heatmark outer opacity/.initial=.2 -} -\pgfdeclareshape{heatmark} -% -% Draws a circle around the text -% -{ - \savedanchor\centerpoint{% - \pgf@x=.5\wd\pgfnodeparttextbox% - \pgf@y=.5\ht\pgfnodeparttextbox% - \advance\pgf@y by-.5\dp\pgfnodeparttextbox% - } - - \saveddimen\innerradius{% - % - % Caculate ``height radius'' - % - \pgf@ya=.5\ht\pgfnodeparttextbox% - \advance\pgf@ya by.5\dp\pgfnodeparttextbox% - \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/inner ysep}}% - \advance\pgf@ya by\pgf@yb% - % - % Caculate ``width radius'' - % - \pgf@xa=.5\wd\pgfnodeparttextbox% - \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/inner xsep}}% - \advance\pgf@xa by\pgf@xb% - % - % Calculate length of radius vector: - % - \pgf@process{\pgfpointnormalised{\pgfqpoint{\pgf@xa}{\pgf@ya}}}% - \ifdim\pgf@x>\pgf@y% - \c@pgf@counta=\pgf@x% - \ifnum\c@pgf@counta=0\relax% - \else% - \divide\c@pgf@counta by 255\relax% - \pgf@xa=16\pgf@xa\relax% - \divide\pgf@xa by\c@pgf@counta% - \pgf@xa=16\pgf@xa\relax% - \fi% - \else% - \c@pgf@counta=\pgf@y% - \ifnum\c@pgf@counta=0\relax% - \else% - \divide\c@pgf@counta by 255\relax% - \pgf@ya=16\pgf@ya\relax% - \divide\pgf@ya by\c@pgf@counta% - \pgf@xa=16\pgf@ya\relax% - \fi% - \fi% - \pgf@x=\pgf@xa% - % - % If necessary, adjust radius so that the size requirements are - % met: - % - \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}% - \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}% - \ifdim\pgf@x<.5\pgf@xb% - \pgf@x=.5\pgf@xb% - \fi% - \ifdim\pgf@x<.5\pgf@yb% - \pgf@x=.5\pgf@yb% - \fi% - }% - - \saveddimen\radius{% - \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% - \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% - \ifdim\pgf@xb<\pgf@yb% - \advance\pgf@x by\pgf@yb% - \else% - \advance\pgf@x by\pgf@xb% - \fi% - \pgfmathsetcount\c@pgf@counta{\pgfkeysvalueof{/pgf/heatmark arc rings}}% - \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/heatmark arc width}+\pgfkeysvalueof{/pgf/heatmark arc sep}}% - \multiply\pgf@xa\c@pgf@counta - \advance\pgf@x\pgf@xa - }% - % - % Anchors - % - \inheritanchor[from=circle]{north} - \inheritanchor[from=circle]{north west} - \inheritanchor[from=circle]{north east} - \inheritanchor[from=circle]{center} - \inheritanchor[from=circle]{west} - \inheritanchor[from=circle]{east} - \inheritanchor[from=circle]{mid} - \inheritanchor[from=circle]{mid west} - \inheritanchor[from=circle]{mid east} - \inheritanchor[from=circle]{base} - \inheritanchor[from=circle]{base west} - \inheritanchor[from=circle]{base east} - \inheritanchor[from=circle]{south} - \inheritanchor[from=circle]{south west} - \inheritanchor[from=circle]{south east} - \inheritanchorborder[from=circle] - % - % Background path - % - \backgroundpath{ - \pgfutil@tempdima=\innerradius% - \pgfpathcircle{\centerpoint}{\pgfutil@tempdima}% - }% - % - % - % - \behindbackgroundpath{% - \pgfmathsetcount\c@pgf@counta{\pgfkeysvalueof{/pgf/heatmark arc rings}}% heat arc rings - \pgfmathsetcount\c@pgf@countb{\pgfkeysvalueof{/pgf/heatmark arcs}}% heat arcs - \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/heatmark arc width}}% heat arc width - \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/heatmark arc sep}}% heat arc sep - %\pgfmathsetmacro\pgf@tempa{\pgfkeysvalueof{/pgf/heat arc sep angle}}% heat arc sep angle - \pgfmathsetmacro\pgf@tempb{360/\c@pgf@countb-(\pgfkeysvalueof{/pgf/heatmark arc sep angle})}% heat arc - \pgfmathsetmacro\pgf@tempc{\pgfkeysvalueof{/pgf/shape border rotate}}% heat rotate - % - \pgfmathsetmacro\pgf@tempd{\pgfkeysvalueof{/pgf/heatmark inner opacity}}% heat opacity high - \ifnum\c@pgf@counta=1 - \def\tikzext@heatmark@opacity@seps{0}% - \else - \pgfmathsetmacro\tikzext@heatmark@opacity@seps - {(\pgf@tempd-(\pgfkeysvalueof{/pgf/heatmark outer opacity}))% - /(\c@pgf@counta-1)}% - \fi - \pgfutil@tempcnta=0 - \pgfutil@tempcntb=0 - \pgf@ya\innerradius\relax - \pgftransformshift{\centerpoint} - \pgfutil@loop % ring loop - \advance\pgf@ya\pgf@xb % current radius + heat arc sep - \pgf@yb\pgf@ya - \advance\pgf@yb\pgf@xa % current radius + heat arc sep + heat arc width - \pgfsetfillopacity{\pgf@tempd}% - \begingroup - \edef\pgf@marshal{\noexpand\pgfset{heatmark ring \the\numexpr\pgfutil@tempcnta+1\relax/.try}}% - \pgf@marshal - \csname tikz@options\endcsname - {% - \pgfutil@loop - \pgfmathsetmacro\tikzext@heatmark@start@angle{\pgf@tempc-.5*\pgf@tempb+\pgfutil@tempcntb*(360/\c@pgf@countb)}% - % path - \begingroup - \edef\pgf@marshal{\noexpand\pgfset{heatmark arc \the\numexpr\pgfutil@tempcntb+1\relax/.try}% - \noexpand\pgfset{heatmark ring \the\numexpr\pgfutil@tempcnta+1\relax\space arc \the\numexpr\pgfutil@tempcntb+1\relax/.try}}% - \pgf@marshal - \csname tikz@options\endcsname - \pgfpathmoveto{\pgfpointpolar{\tikzext@heatmark@start@angle}{\pgf@ya}}% - \pgfpatharc{\tikzext@heatmark@start@angle}{\tikzext@heatmark@start@angle+\pgf@tempb}{\pgf@ya}% - \pgfpathlineto{\pgfpointpolar{\tikzext@heatmark@start@angle+\pgf@tempb}{\pgf@yb}}% - \pgfpatharc{\tikzext@heatmark@start@angle+\pgf@tempb}{\tikzext@heatmark@start@angle}{\pgf@yb}% - \pgfpathclose - \pgfusepathqfill - \endgroup - \advance\pgfutil@tempcntb\@ne - \ifnum\pgfutil@tempcntb<\c@pgf@countb - \pgfutil@repeat - }% - \endgroup - \advance\pgfutil@tempcnta\@ne - \ifnum\pgfutil@tempcnta<\c@pgf@counta - \pgf@ya\pgf@yb - \pgfmathsetmacro\pgf@tempd{\pgf@tempd-\tikzext@heatmark@opacity@seps}% - \pgfutil@repeat - \pgftransformshift{\pgfqpointscale{-1}{\centerpoint}}% - } -} -\endinput diff --git a/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.rectangleroundedcorners.code.tex b/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.rectangleroundedcorners.code.tex deleted file mode 100644 index 37baf7abbf..0000000000 --- a/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.rectangleroundedcorners.code.tex +++ /dev/null @@ -1,318 +0,0 @@ -\pgfset{ - rectangle with rounded corners north west radius/.initial=.5\pgflinewidth, - rectangle with rounded corners north east radius/.initial=.5\pgflinewidth, - rectangle with rounded corners south west radius/.initial=.5\pgflinewidth, - rectangle with rounded corners south east radius/.initial=.5\pgflinewidth, - rectangle with rounded corners radius/.style={ - /pgf/rectangle with rounded corners north west radius={#1}, - /pgf/rectangle with rounded corners north east radius={#1}, - /pgf/rectangle with rounded corners south west radius={#1}, - /pgf/rectangle with rounded corners south east radius={#1}} -}% -\pgfdeclareshape{rectangle with rounded corners}{% - \savedmacro\rectanglewithroundedcornersparameter{% - % - % width = max(text width + 2 * inner xseps, minimum width) + 2 * outer xseps - \pgf@x=\wd\pgfnodeparttextbox - \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}% - \advance\pgf@x by 2\pgf@xc - \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/minimum width}}% - \ifdim\pgf@x<\pgf@xc - \pgf@x=\pgf@xc - \fi - % - \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/outer xsep}}% - \edef\outerxsep{\the\pgf@xc}% - \addtosavedmacro\outerxsep - \advance\pgf@x by 2\pgf@xc - \pgf@x=.5\pgf@x - \edef\halfwidth{\the\pgf@x}% - \addtosavedmacro\halfwidth - % - % height = max(text height + text depth + 2 * inner yseps, minimum height) + 2 * outer yseps - \pgf@y=\ht\pgfnodeparttextbox - \advance\pgf@y by \dp\pgfnodeparttextbox - \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}% - \advance\pgf@y by 2\pgf@yc - \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/minimum height}}% - \ifdim\pgf@y<\pgf@yc - \pgf@y=\pgf@yc - \fi - % - \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/outer ysep}}% - \edef\outerysep{\the\pgf@yc}% - \addtosavedmacro\outerysep - \advance\pgf@y by 2\pgf@yc - \pgf@y=.5\pgf@y - \edef\halfheight{\the\pgf@y}% - \addtosavedmacro\halfheight - % - % \centerpoint - \pgf@x=.5\wd\pgfnodeparttextbox - \pgf@y=.5\ht\pgfnodeparttextbox - \advance\pgf@y by -.5\dp\pgfnodeparttextbox - \pgfextract@process\centerpoint{}% - \addtosavedmacro\centerpoint - % - \pgfmathsetlengthmacro\northwestradius{\pgfkeysvalueof{/pgf/rectangle with rounded corners north west radius}} - \pgfmathsetlengthmacro\northeastradius{\pgfkeysvalueof{/pgf/rectangle with rounded corners north east radius}} - \pgfmathsetlengthmacro\southwestradius{\pgfkeysvalueof{/pgf/rectangle with rounded corners south west radius}} - \pgfmathsetlengthmacro\southeastradius{\pgfkeysvalueof{/pgf/rectangle with rounded corners south east radius}} - \addtosavedmacro\northwestradius - \addtosavedmacro\northeastradius - \addtosavedmacro\southwestradius - \addtosavedmacro\southeastradius - }% - \anchor{center}{% - \rectanglewithroundedcornersparameter - \centerpoint - } - \anchor{west}{% - \rectanglewithroundedcornersparameter - \centerpoint - \advance\pgf@x by -\halfwidth - } - \anchor{east}{% - \rectanglewithroundedcornersparameter - \centerpoint - \advance\pgf@x by \halfwidth - } - \anchor{north}{% - \rectanglewithroundedcornersparameter - \centerpoint - \advance\pgf@y by \halfheight - } - \anchor{south}{% - \rectanglewithroundedcornersparameter - \centerpoint - \advance\pgf@y by -\halfheight - } - \anchor{mid}{% - \rectanglewithroundedcornersparameter - \centerpoint - \pgfmathsetlength\pgf@y{+.5ex}% - } - \anchor{mid west}{% - \csname pgf@anchor@rectangle with rounded corners@west\endcsname - \pgfmathsetlength\pgf@y{+.5ex}% - } - \anchor{mid east}{% - \csname pgf@anchor@rectangle with rounded corners@east\endcsname - \pgfmathsetlength\pgf@y{+.5ex}% - } - \anchor{base}{% - \rectanglewithroundedcornersparameter - \centerpoint - \pgf@y=0pt - } - \anchor{base west}{% - \csname pgf@anchor@rectangle with rounded corners@west\endcsname - \pgf@y=0pt - } - \anchor{base east}{% - \csname pgf@anchor@rectangle with rounded corners@east\endcsname - \pgf@y=0pt - } - \anchor{north west}{% - \csname pgf@anchor@rectangle with rounded corners@north west center\endcsname - \ifdim\northwestradius=0pt - \else - \pgf@process{\pgfpointadd{}{\pgfpointpolar{135}{\northwestradius+\outerxsep and \northwestradius+\outerysep}}}% - \fi - } - \anchor{north west center}{% - \rectanglewithroundedcornersparameter - \pgf@x=-\halfwidth - \pgf@y=\halfheight - \ifdim\northwestradius=0pt - \else - \advance\pgf@x by \outerxsep - \advance\pgf@x by \northwestradius - \advance\pgf@y by -\outerysep - \advance\pgf@y by -\northwestradius - \fi - \pgf@process{\pgfpointadd{}{\centerpoint}}% - } - \anchor{north east}{% - \csname pgf@anchor@rectangle with rounded corners@north east center\endcsname - \ifdim\northeastradius=0pt - \else - \pgf@process{\pgfpointadd{}{\pgfpointpolar{45}{\northeastradius+\outerxsep and \northeastradius+\outerysep}}}% - \fi - } - \anchor{north east center}{% - \rectanglewithroundedcornersparameter - \pgf@x=\halfwidth - \pgf@y=\halfheight - \ifdim\northeastradius=0pt - \else - \advance\pgf@x by -\outerxsep - \advance\pgf@x by -\northeastradius - \advance\pgf@y by -\outerysep - \advance\pgf@y by -\northeastradius - \fi - \pgf@process{\pgfpointadd{}{\centerpoint}}% - } - \anchor{south west}{% - \csname pgf@anchor@rectangle with rounded corners@south west center\endcsname - \ifdim\southwestradius=0pt - \else - \pgf@process{\pgfpointadd{}{\pgfpointpolar{225}{\southwestradius+\outerxsep and \southwestradius+\outerysep}}}% - \fi - } - \anchor{south west center}{% - \rectanglewithroundedcornersparameter - \pgf@x=-\halfwidth - \pgf@y=-\halfheight - \ifdim\southwestradius=0pt - \else - \advance\pgf@x by \outerxsep - \advance\pgf@x by \southwestradius - \advance\pgf@y by \outerysep - \advance\pgf@y by \southwestradius - \fi - \pgf@process{\pgfpointadd{}{\centerpoint}}% - } - \anchor{south east}{% - \csname pgf@anchor@rectangle with rounded corners@south east center\endcsname - \ifdim\southeastradius=0pt - \else - \pgf@process{\pgfpointadd{}{\pgfpointpolar{315}{\southeastradius+\outerxsep and \southeastradius+\outerysep}}}% - \fi - } - \anchor{south east center}{% - \rectanglewithroundedcornersparameter - \pgf@x=\halfwidth - \pgf@y=-\halfheight - \ifdim\southeastradius=0pt - \else - \advance\pgf@x by -\outerxsep - \advance\pgf@x by -\southeastradius - \advance\pgf@y by \outerysep - \advance\pgf@y by \southeastradius - \fi - \pgf@process{\pgfpointadd{}{\centerpoint}}% - } - \anchor{below north west}{% - \csname pgf@anchor@rectangle with rounded corners@north west center\endcsname - \advance\pgf@x by -\northwestradius - \advance\pgf@x by -\outerxsep - } - \anchor{above south west}{% - \csname pgf@anchor@rectangle with rounded corners@south west center\endcsname - \advance\pgf@x by -\southwestradius - \advance\pgf@x by -\outerxsep - } - \anchor{below north east}{% - \csname pgf@anchor@rectangle with rounded corners@north east center\endcsname - \advance\pgf@x by \northeastradius - \advance\pgf@x by \outerxsep - } - \anchor{above south east}{% - \csname pgf@anchor@rectangle with rounded corners@south east center\endcsname - \advance\pgf@x by \southeastradius - \advance\pgf@x by \outerxsep - } - \anchor{right north west}{% - \csname pgf@anchor@rectangle with rounded corners@north west center\endcsname - \advance\pgf@y by \northwestradius - \advance\pgf@y by \outerysep - } - \anchor{right south west}{% - \csname pgf@anchor@rectangle with rounded corners@south west center\endcsname - \advance\pgf@y by -\southwestradius - \advance\pgf@y by -\outerysep - } - \anchor{left north east}{% - \csname pgf@anchor@rectangle with rounded corners@north east center\endcsname - \advance\pgf@y by \northeastradius - \advance\pgf@y by \outerysep - } - \anchor{left south east}{% - \csname pgf@anchor@rectangle with rounded corners@south east center\endcsname - \advance\pgf@y by -\southeastradius - \advance\pgf@y by -\outerysep - } - \backgroundpath{% - \rectanglewithroundedcornersparameter - % - \pgf@xa=\halfwidth - \advance\pgf@xa by -\outerxsep - \edef\HalfWidth{\the\pgf@xa}% - % - \pgf@ya=\halfheight - \advance\pgf@ya by -\outerysep - \edef\HalfHeight{\the\pgf@ya}% - % - \pgftransformshift{\centerpoint}% - % - \pgfpathmoveto{\pgfqpoint{\HalfWidth}{0pt}}% - \pgfpathlineto{\pgfpoint {+\HalfWidth}{\HalfHeight-\northeastradius}}% - \pgfpatharc{0}{90}{\northeastradius}% - \pgfpathlineto{\pgfpoint{-\HalfWidth+\northwestradius}{+\HalfHeight}} - \pgfpatharc{90}{180}{\northwestradius}% - \pgfpathlineto{\pgfpoint{+-\HalfWidth}{-\HalfHeight+\southwestradius}}% - \pgfpatharc{180}{270}{\southwestradius}% - \pgfpathlineto{\pgfpoint{\HalfWidth-\southeastradius}{+-\HalfHeight}}% - \pgfpatharc{270}{360}{\southeastradius}% - \pgfpathclose - \pgftransformshift{\pgfqpointscale{-1}{\centerpoint}}% - }% - \anchorborder{% - \pgfextract@process\externalpoint{}% - \ifdim\pgf@x=0pt - \ifdim\pgf@y<0pt - \csname pgf@anchor@rectangle with rounded corners@south\endcsname - \else - \csname pgf@anchor@rectangle with rounded corners@north\endcsname - \fi - \else - \ifdim\pgf@y=0pt - \ifdim\pgf@x<0pt - \csname pgf@anchor@rectangle with rounded corners@west\endcsname - \else - \csname pgf@anchor@rectangle with rounded corners@east\endcsname - \fi - \else - \rectanglewithroundedcornersparameter - \pgfmathanglebetweenpoints{\pgfpointorigin}{\externalpoint}% - \let\angle\pgfmathresult - \pgf@xa=\pgf@x - \pgf@ya=\pgf@y - \pgfextract@process\externalPoint{\pgfpointadd{}{\centerpoint}}% - \ifdim\pgf@xa<0pt - \ifdim\pgf@ya<0pt - % south west - \pgf@sh@rwrc@anchorborder{above south west}{right south west}{south west}{180}{270}{\southwestradius}% - \else - % north west - \pgf@sh@rwrc@anchorborder{right north west}{below north west}{north west}{90}{180}{\northwestradius}% - \fi - \else - \ifdim\pgf@ya<0pt - % south east - \pgf@sh@rwrc@anchorborder{left south east}{above south east}{south east}{270}{360}{\southeastradius}% - \else - % north east - \pgf@sh@rwrc@anchorborder{below north east}{left north east}{north east}{0}{90}{\northeastradius}% - \fi - \fi - \fi - \fi - } -} -\def\pgf@sh@rwrc@anchorborder#1#2#3#4#5#6{% - \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@rectangle with rounded corners@#1\endcsname}% - \let\angleA\pgfmathresult - \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@rectangle with rounded corners@#2\endcsname}% - \let\angleB\pgfmathresult - \if\ifdim\angle pt>\angleA pt 0\else1\fi\ifdim\angle pt<\angleB pt 0\else 2\fi - \pgfmathpointintersectionoflineandarc{\externalPoint}{\centerpoint} - {\csname pgf@anchor@rectangle with rounded corners@#3 center\endcsname} - {#4}{#5}{#6+\outerxsep and #6+\outerysep}% - \else - \pgf@process{\pgfpointadd{\pgfpointborderrectangle{\externalpoint}{\pgfqpoint{\halfwidth}{\halfheight}}}{\centerpoint}}% - \fi -} - -\endinput diff --git a/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.superellipse.code.tex b/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.superellipse.code.tex deleted file mode 100644 index 9a89b5a8a6..0000000000 --- a/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.superellipse.code.tex +++ /dev/null @@ -1,198 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\usepgflibrary{shapes.geometric,intersections} -\pgfset{ - superellipse x exponent/.initial=2.5, - superellipse y exponent/.initial=2.5, - superellipse step/.initial=4, - superellipse exponent/.style={/pgf/superellipse x exponent={#1},/pgf/superellipse y exponent={#1}}} - -% Evaluates the x-value of a superellipse around the center -% #1 = t (0≤t≤90) -% #2 = 2/m (x-exp) -% #3 = a (x-rad) -\pgfmathdeclarefunction{superellipsex}{3}{% - \pgfmathcos@{#1}% - \pgfmathpow@{\pgfmathresult}{#2}% - \pgfmathmultiply@{\pgfmathresult}{#3}} - -% Evaluates the y-value of a superellipse around the center -% #1 = t (0≤t≤90) -% #2 = 2/n (y-exp) -% #3 = a (y-rad) -\pgfmathdeclarefunction{superellipsey}{3}{% - \pgfmathsin@{#1}% - \pgfmathpow@{\pgfmathresult}{#2}% - \pgfmathmultiply@{\pgfmathresult}{#3}} - -% Evaluates the x- and y- value of superellipse around the center -% #1 = t (0≤t≤90) -% #2 = 2/m (x-exp) -% #3 = 2/n (y-exp) -% #4 = a (x-rad) -% #5 = b (y-rad) -\def\pgfmathsuperellipseXY#1#2#3#4#5{% - \begingroup - \pgfmathsuperellipsex@{#1}{#2}{#4}% - \let\pgfmath@temp\pgfmathresult - \pgfmathsuperellipsey@{#1}{#3}{#5}% - \edef\pgfmath@temp{\def\noexpand\pgfmathresultX{\pgfmath@temp}% - \def\noexpand\pgfmathresultY{\pgfmathresult}}% - \expandafter - \endgroup\pgfmath@temp} - -\pgfdeclareshape{superellipse}{% - \inheritsavedanchors[from=ellipse] - \inheritanchor[from=ellipse]{text}\inheritanchor[from=ellipse]{center} - \inheritanchor[from=ellipse]{mid}\inheritanchor[from=ellipse]{base} - \inheritanchor[from=ellipse]{north}\inheritanchor[from=ellipse]{south} - \inheritanchor[from=ellipse]{west}\inheritanchor[from=ellipse]{east} - \inheritanchor[from=ellipse]{mid west}\inheritanchor[from=ellipse]{base west} - \inheritanchor[from=ellipse]{mid east}\inheritanchor[from=ellipse]{base east} - \anchor{north east}{% - \pgf@process{\radius}% - \pgfmathpow@{.70710678118}{\xexponent}% - \pgf@x=\pgfmathresult\pgf@x - \pgfmathpow@{.70710678118}{\yexponent}% - \pgf@y=\pgfmathresult\pgf@y - \pgfpointadd{}{\centerpoint}% - } - \anchor{north west}{% - \pgf@process{\radius}% - \pgfmathpow@{.70710678118}{\xexponent}% - \pgf@x=-\pgfmathresult\pgf@x - \pgfmathpow@{.70710678118}{\yexponent}% - \pgf@y=\pgfmathresult\pgf@y - \pgfpointadd{}{\centerpoint}% - } - \anchor{south west}{% - \pgf@process{\radius}% - \pgfmathpow@{.70710678118}{\xexponent}% - \pgf@x=-\pgfmathresult\pgf@x - \pgfmathpow@{.70710678118}{\yexponent}% - \pgf@y=-\pgfmathresult\pgf@y - \pgfpointadd{}{\centerpoint}% - } - \anchor{south east}{% - \pgf@process{\radius}% - \pgfmathpow@{.70710678118}{\xexponent}% - \pgf@x=\pgfmathresult\pgf@x - \pgfmathpow@{.70710678118}{\yexponent}% - \pgf@y=-\pgfmathresult\pgf@y - \pgfpointadd{}{\centerpoint}% - } - \savedmacro\xexponent{% - \pgfmathreciprocal{\pgfkeysvalueof{/pgf/superellipse x exponent}}% - \pgfmathmultiply@{\pgfmathresult}{2}% - \let\xexponent\pgfmathresult - } - \savedmacro\yexponent{% - \pgfmathreciprocal{\pgfkeysvalueof{/pgf/superellipse y exponent}}% - \pgfmathmultiply@{\pgfmathresult}{2}% - \let\yexponent\pgfmathresult - } - \savedmacro\step{% - \pgfmathtruncatemacro\step{\pgfkeysvalueof{/pgf/superellipse step}}% - } - \backgroundpath{% - \pgf@process{\radius}% - \pgfmathsetmacro\xradius{\pgf@x-(\pgfkeysvalueof{/pgf/outer xsep})}% - \pgfmathsetmacro\yradius{\pgf@y-(\pgfkeysvalueof{/pgf/outer ysep})}% - \let\pgf@tempa\pgfutil@empty\let\pgf@tempb\pgfutil@empty - \let\pgf@tempc\pgfutil@empty\let\pgf@tempd\pgfutil@empty - \c@pgf@counta=\step - \pgfutil@loop - \ifnum\c@pgf@counta<90 - \pgfmathsuperellipseXY{\the\c@pgf@counta}{\xexponent}{\yexponent}{\xradius}{\yradius}% - \edef\pgf@temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{\pgfmathresultX pt}{\pgfmathresultY pt}}}% - \pgfutil@append@macrotomacro\pgf@tempa\pgf@temp - \edef\pgf@temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{-\pgfmathresultX pt}{\pgfmathresultY pt}}}% - \pgfutil@prefix@macrotomacro\pgf@tempb\pgf@temp - \edef\pgf@temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{-\pgfmathresultX pt}{-\pgfmathresultY pt}}}% - \pgfutil@append@macrotomacro\pgf@tempc\pgf@temp - \edef\pgf@temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{\pgfmathresultX pt}{-\pgfmathresultY pt}}}% - \pgfutil@prefix@macrotomacro\pgf@tempd\pgf@temp - \advance\c@pgf@counta by\step - \pgfutil@repeat - \pgftransformshift{\centerpoint}% - \pgfplothandlerclosedcurve - \pgfplotstreamstart - \pgfplotstreampoint{\pgfqpoint{\xradius pt}{0pt}}% east - \pgf@tempa - \pgfplotstreampoint{\pgfqpoint{0pt}{\yradius pt}}% north - \pgf@tempb - \pgfplotstreampoint{\pgfqpoint{-\xradius pt}{0pt}}% west - \pgf@tempc - \pgfplotstreampoint{\pgfqpoint{0pt}{-\yradius pt}}% south - \pgf@tempd - \pgfplotstreamend - \pgftransformshift{\centerpoint\pgf@x=-\pgf@x\pgf@y=-\pgf@y} - } - \anchorborder{% - \pgfextract@process\externalpoint{}% - \ifdim\pgf@x=0pt % catch special case x = 0 - \ifdim\pgf@y<0pt \pgf@anchor@superellipse@south\else\pgf@anchor@superellipse@north\fi - \else - \ifdim\pgf@y=0pt % catch special case y = 0 - \ifdim\pgf@x<0pt \pgf@anchor@superellipse@west\else\pgf@anchor@superellipse@east\fi - \else % both are not zero - % save original direction - \pgf@xa=\pgf@x - \pgf@ya=\pgf@y - % make both positive, we're not looking at one quadrant - \ifdim\pgf@xa<0pt \pgf@x=-\pgf@x\fi - \ifdim\pgf@ya<0pt \pgf@y=-\pgf@y\fi - % save that point again - \pgfextract@process\externalpoint{}% - % we need to do the calculations without any transformations - % since we're using plots and \pgfpointborderrectangle - \pgftransformreset - \pgfintersectionofpaths{% - % from center to point on rectangle that encompasses superellipse - \pgf@relevantforpicturesizefalse - \pgfpathmoveto{\pgfpointorigin}% - \pgfpathlineto{\pgfpointborderrectangle{\externalpoint}{\radius}}% - }{% - \pgf@relevantforpicturesizefalse - \pgf@process{\radius} - \edef\xradius{\pgf@sys@tonumber\pgf@x}% - \edef\yradius{\pgf@sys@tonumber\pgf@y}% - \let\pgf@tempa\pgfutil@empty - \c@pgf@counta=\step - \pgfutil@loop - \ifnum\c@pgf@counta<90 - \pgfmathsuperellipseXY{\the\c@pgf@counta}{\xexponent}{\yexponent}{\xradius}{\yradius}% - \edef\pgf@temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{\pgfmathresultX pt}{\pgfmathresultY pt}}}% - \pgfutil@append@macrotomacro\pgf@tempa\pgf@temp - \advance\c@pgf@counta by\step - \pgfutil@repeat - % we're only using curveto since closedcurve - % messes with our other path - \pgfplothandlercurveto - \pgfplotstreamstart - \pgfplotstreampoint{\pgfqpoint{\xradius pt}{0pt}}% east - \pgf@tempa - \pgfplotstreampoint{\pgfqpoint{0pt}{\yradius pt}}% north - \pgfplotstreamend - }% - \ifnum\pgfintersectionsolutions>0 % only if a solution was found - \pgf@process{\pgfpointintersectionsolution{1}}% - \else % otherwise take the border on the rectangle (close enough?) - \pgf@process{\pgfpointborderrectangle{\externalpoint}{\radius}}% - \fi - \ifdim\pgf@xa<0pt \pgf@x=-\pgf@x\fi - \ifdim\pgf@ya<0pt \pgf@y=-\pgf@y\fi - \pgf@process{\pgfpointadd{}{\centerpoint}}% - \fi - \fi - } -} -\def\pgfutil@prefix@macrotomacro#1#2{% - \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter% - #1\expandafter\expandafter\expandafter{\expandafter#2#1}} -\endinput diff --git a/graphics/pgf/contrib/tikz-ext/pgflibraryext.transformations.mirror.code.tex b/graphics/pgf/contrib/tikz-ext/pgflibraryext.transformations.mirror.code.tex deleted file mode 100644 index 4d962ccb1c..0000000000 --- a/graphics/pgf/contrib/tikz-ext/pgflibraryext.transformations.mirror.code.tex +++ /dev/null @@ -1,96 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\def\pgftransformxmirror#1{ - \pgfmathparse{#1}% - \ifpgfmathunitsdeclared - \pgf@xa\pgfmathresult pt\relax - \multiply\pgf@xa2 - \pgftransformcm{-1}{0}{0}{1}{\pgfqpoint{\pgf@xa}{0pt}}% - \else - \pgftransformmirror{\pgfqpointxy{\pgfmathresult}{0}}{\pgfpointadd{\pgfqpointxy{\pgfmathresult}{0}}{\pgfqpointxy{0}{1}}}% - \fi -} -\def\pgftransformymirror#1{ - \pgfmathparse{#1}% - \ifpgfmathunitsdeclared - \pgf@ya\pgfmathresult pt\relax - \multiply\pgf@ya2 - \pgftransformcm{1}{0}{0}{-1}{\pgfqpoint{0pt}{\pgf@ya}}% - \else - \edef\pgf@marshal{\noexpand\pgftransformmirror{\noexpand\pgfqpointxy{0}{\pgfmathresult}}% - {\noexpand\pgfpointadd{\noexpand\pgfqpointxy{0}{\pgfmathresult}}{\noexpand\pgfqpointxy{1}{0}}}}% - \pgf@marshal - \fi} -\def\pgftransformmirror#1#2{% - \pgfextract@process\pgf@tempa{#1}% - \pgfpointnormalised{\pgfpointdiff{\pgf@tempa}{#2}}% - \pgf@xa=\pgf@sys@tonumber\pgf@y\pgf@x - \pgf@xb=\pgf@sys@tonumber\pgf@x\pgf@x - \pgf@yb=\pgf@sys@tonumber\pgf@y\pgf@y - \multiply\pgf@xa2 - \pgf@xc=-\pgf@yb\advance\pgf@xc\pgf@xb - \pgf@yc=-\pgf@xb\advance\pgf@yc\pgf@yb - \edef\pgf@temp{{\the\pgf@xc}{+\the\pgf@xa}{+\the\pgf@xa}{+\the\pgf@yc}}% - \expandafter\pgf@transformcm\pgf@temp{\pgf@tempa}% - \pgftransformshift{\pgfpointscale{-1}{\pgf@tempa}}% -} - -\def\pgfqtransformmirror#1{% - \pgfpointnormalised{#1}% - \pgf@xa=\pgf@sys@tonumber\pgf@y\pgf@x - \pgf@xb=\pgf@sys@tonumber\pgf@x\pgf@x - \pgf@yb=\pgf@sys@tonumber\pgf@y\pgf@y - \multiply\pgf@xa2 - \pgf@xc=-\pgf@yb\advance\pgf@xc\pgf@xb - \pgf@yc=-\pgf@xb\advance\pgf@yc\pgf@yb - \edef\pgf@temp{{\the\pgf@xc}{+\the\pgf@xa}{+\the\pgf@xa}{+\the\pgf@yc}}% - \expandafter\pgf@transformcm\pgf@temp{\pgfpointorigin}% -} - -% Using existant transformation (shift, rotate, yscale=-1, rotate back, shift back) -\def\pgftransformxMirror#1{ - \pgfmathparse{#1}% - \ifpgfmathunitsdeclared - \pgf@xa\pgfmathresult pt\relax - \multiply\pgf@xa2 - \pgftransformcm{-1}{0}{0}{1}{\pgfqpoint{\pgf@xa}{0pt}}% - \else - \pgftransformMirror{\pgfqpointxy{\pgfmathresult}{0}}{\pgfpointadd{\pgfqpointxy{\pgfmathresult}{0}}{\pgfqpointxy{0}{1}}}% - \fi -} -\def\pgftransformyMirror#1{ - \pgfmathparse{#1}% - \ifpgfmathunitsdeclared - \pgf@ya\pgfmathresult pt\relax - \multiply\pgf@ya2 - \pgftransformcm{1}{0}{0}{-1}{\pgfqpoint{0pt}{\pgf@ya}}% - \else - \edef\pgf@marshal{\noexpand\pgftransformMirror{\noexpand\pgfqpointxy{0}{\pgfmathresult}}% - {\noexpand\pgfpointadd{\noexpand\pgfqpointxy{0}{\pgfmathresult}}{\noexpand\pgfqpointxy{1}{0}}}}% - \pgf@marshal - \fi} - -\def\pgftransformMirror#1#2{% - \pgfextract@process\pgf@tempa{#1}% - \pgfmathanglebetweenpoints{\pgf@tempa}{#2}% - \let\pgf@temp\pgfmathresult - \pgftransformshift{\pgf@tempa}% - \pgftransformrotate{\pgf@temp}% - \pgftransformyscale{-1}% - \pgftransformrotate{-\pgf@temp}% - \pgftransformshift{\pgfqpointscale{-1}{\pgf@tempa}}% -} - -\def\pgfqtransformMirror#1{% - \pgfmathanglebetweenpoints{\pgfpointorigin}{#1}% - \let\pgf@temp\pgfmathresult - \pgftransformrotate{\pgf@temp}% - \pgftransformyscale{-1}% - \pgftransformrotate{-\pgf@temp}% -} -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgfcalendar-ext.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgfcalendar-ext.code.tex new file mode 100644 index 0000000000..90b42a0011 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgfcalendar-ext.code.tex @@ -0,0 +1,370 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\pgfqkeys{/pgf/calendar}{ + style/.style={#1}, + yesterday/.value required, + yesterday/.code={% + \begingroup + \pgfutil@tempcnta=\pgfcalendarifdatejulian\relax + \advance\pgfutil@tempcnta by -1\relax + \pgfcalendarjuliantodate{\pgfutil@tempcnta}{\pgfcalendarifdateyear}{\pgfcalendarifdatemonth}{\pgfcalendarifdateday}% + \edef\pgfcalendarifdatejulian{\the\pgfutil@tempcnta}% + \pgfcalendarjuliantoweekday\pgfutil@tempcnta\pgfutil@tempcntb + \edef\pgfcalendarifdateweekday{\the\pgfutil@tempcntb}% + \pgfcalendarjulianyeartoweek\pgfutil@tempcnta\pgfcalendarifdateyear\pgfutil@tempcntb + \edef\pgfcalendarifdateweek{\the\pgfutil@tempcntb}% + \pgfcalendar@launch@ifdate{#1}{% + \def\pgf@cal@temp{\pgfcalendarmatchestrue}% + }{% + \let\pgf@cal@temp\pgfutil@empty + }% + \expandafter + \endgroup\pgf@cal@temp + }, + relative/.code 2 args={% + \begingroup + \pgfutil@tempcnta=\pgfcalendarifdatejulian\relax + \advance\pgfutil@tempcnta by #1\relax + \pgfcalendarjuliantodate{\pgfutil@tempcnta}{\pgfcalendarifdateyear}{\pgfcalendarifdatemonth}{\pgfcalendarifdateday}% + \edef\pgfcalendarifdatejulian{\the\pgfutil@tempcnta}% + \pgfcalendarjuliantoweekday\pgfutil@tempcnta\pgfutil@tempcntb + \edef\pgfcalendarifdateweekday{\the\pgfutil@tempcntb}% + \pgfcalendarjulianyeartoweek\pgfutil@tempcnta\pgfcalendarifdateyear\pgfutil@tempcntb + \edef\pgfcalendarifdateweek{\the\pgfutil@tempcntb}% + \pgfcalendar@launch@ifdate{#2}{% + \def\pgf@cal@temp{\pgfcalendarmatchestrue}% + }{% + \let\pgf@cal@temp\pgfutil@empty + }% + \expandafter + \endgroup\pgf@cal@temp + }, + Jan/.code={\ifnum\pgfcalendarifdatemonth=1 \expandafter\pgfcalendarmatchestrue\fi},Jan/.value forbidden, + Feb/.code={\ifnum\pgfcalendarifdatemonth=2 \expandafter\pgfcalendarmatchestrue\fi},Feb/.value forbidden, + Mar/.code={\ifnum\pgfcalendarifdatemonth=3 \expandafter\pgfcalendarmatchestrue\fi},Mar/.value forbidden, + Apr/.code={\ifnum\pgfcalendarifdatemonth=4 \expandafter\pgfcalendarmatchestrue\fi},Apr/.value forbidden, + May/.code={\ifnum\pgfcalendarifdatemonth=5 \expandafter\pgfcalendarmatchestrue\fi},May/.value forbidden, + Jun/.code={\ifnum\pgfcalendarifdatemonth=6 \expandafter\pgfcalendarmatchestrue\fi},Jun/.value forbidden, + Jul/.code={\ifnum\pgfcalendarifdatemonth=7 \expandafter\pgfcalendarmatchestrue\fi},Jul/.value forbidden, + Aug/.code={\ifnum\pgfcalendarifdatemonth=8 \expandafter\pgfcalendarmatchestrue\fi},Aug/.value forbidden, + Sep/.code={\ifnum\pgfcalendarifdatemonth=9 \expandafter\pgfcalendarmatchestrue\fi},Sep/.value forbidden, + Oct/.code={\ifnum\pgfcalendarifdatemonth=10 \expandafter\pgfcalendarmatchestrue\fi},Oct/.value forbidden, + Nov/.code={\ifnum\pgfcalendarifdatemonth=11 \expandafter\pgfcalendarmatchestrue\fi},Nov/.value forbidden, + Dec/.code={\ifnum\pgfcalendarifdatemonth=12 \expandafter\pgfcalendarmatchestrue\fi},Dec/.value forbidden, + % + leap year/.code={% + \pgfutil@tempcnta=#1\relax + \divide\pgfutil@tempcnta4 + \multiply\pgfutil@tempcnta4 + \ifnum\pgfutil@tempcnta=#1\relax + \divide\pgfutil@tempcnta100 + \multiply\pgfutil@tempcnta100 + \ifnum\pgfutil@tempcnta=#1\relax + \divide\pgfutil@tempcnta400 + \multiply\pgfutil@tempcnta400 + \ifnum\pgfutil@tempcnta=#1\relax + \pgfcalendarmatchestrue + \fi + \else + \pgfcalendarmatchestrue + \fi + \fi}, + leap year/.default=\pgfcalendarifdateyear, + between days/.value required, + between days/.code args={#1and#2}{% + \pgfutil@tempcnta=#1\relax + \ifnum\pgfcalendarifdateday<\pgfutil@tempcnta\else + \pgfutil@tempcnta=#2\relax + \ifnum\pgfcalendarifdateday>\pgfutil@tempcnta\else + \pgfcalendarmatchestrue\fi\fi}, + week of month/.code={% + \pgfutil@tempcnta=#1\relax + \multiply\pgfutil@tempcnta7 + \ifnum\pgfcalendarifdateday>\pgfutil@tempcnta\else + \advance\pgfutil@tempcnta-7 + \ifnum\pgfcalendarifdateday>\pgfutil@tempcnta + \pgfcalendarmatchestrue + \fi + \fi}, + week of month'/.code={% + \pgfcalendar@getlastYMX\pgfcalendarifdateyear\pgfcalendarifdatemonth\pgfutil@tempcnta + \advance\pgfutil@tempcnta1 + \pgfutil@tempcntb=#1\relax + \multiply\pgfutil@tempcntb7 + \advance\pgfutil@tempcnta-\pgfutil@tempcntb + \ifnum\pgfcalendarifdateday<\pgfutil@tempcnta\else + \advance\pgfutil@tempcnta+7 + \ifnum\pgfcalendarifdateday<\pgfutil@tempcnta + \pgfcalendarmatchestrue + \fi + \fi}, + first/.code={\pgfutil@in@:{#1}\ifpgfutil@in@ + \pgfcalendar@ifdate@first{}#1\pgf@stop\else + \pgfcalendar@ifdate@first{}1:#1\pgf@stop\fi}, + last/.code={\pgfutil@in@:{#1}\ifpgfutil@in@ + \pgfcalendar@ifdate@first'#1\pgf@stop\else + \pgfcalendar@ifdate@first'1:#1\pgf@stop\fi}, + % logic + not/.value required, + not/.code=% + \begingroup + \let\pgf@cal@tempa\pgfutil@empty + \pgfcalendar@launch@ifdate{#1}{}{\def\pgf@cal@tempa{\pgfcalendarmatchestrue}}% + \expandafter\endgroup\pgf@cal@tempa, + and/.value required, + and/.code=% and = {, , , …} + \begingroup + \pgfcalendarmatchestrue + \pgfqkeys{/pgf/calendar/and}{#1}% + \ifpgfcalendarmatches % is it still true? + \expandafter\pgfutil@firstoftwo + \else + \expandafter\pgfutil@secondoftwo + \fi + {\def\pgf@cal@temp{\pgfcalendarmatchestrue}}% + {\let\pgf@cal@temp\pgfutil@empty}% + \expandafter\endgroup\pgf@cal@temp, + and/.unknown/.code=% only inside the group of and/.code + \ifpgfcalendarmatches + \expandafter\pgfutil@firstofone + \else + \expandafter\pgfutil@gobble + \fi + {% + \begingroup + \pgfcalendar@launch@ifdate{\pgfkeyscurrentname={#1}}% + {\let\pgf@cal@temp\pgfutil@empty}{\def\pgf@cal@temp{\pgfcalendarmatchesfalse}} + \expandafter\endgroup\pgf@cal@temp + },% + calendar week of month/.default=1, + calendar week of month'/.default=1, + calendar week of month/.code={% + \begingroup + \pgfutil@tempcnta=\pgfcalendarifdateday\relax + \advance\pgfutil@tempcnta by 5 + \advance\pgfutil@tempcnta by -\pgfcalendarifdateweekday\relax + \divide\pgfutil@tempcnta by 7 + \advance\pgfutil@tempcnta by -#1\relax + \expandafter\endgroup\expandafter + \ifnum\the\pgfutil@tempcnta=-1 + \pgfcalendarmatchestrue + \fi}, + calendar week of month'/.code={% + \begingroup + \pgfcalendar@getlastYMX\pgfcalendarifdateyear\pgfcalendarifdatemonth\pgfutil@tempcnta + \advance\pgfutil@tempcnta by -\pgfcalendarifdateday\relax + \edef\pgfcalendarifdateday{\the\pgfutil@tempcnta}% + \pgfutil@tempcnta=-\pgfcalendarifdateweekday\relax + \advance\pgfutil@tempcnta by 5 + \edef\pgfcalendarifdateweekday{\the\pgfutil@tempcnta}% + \let\pgf@cal@temp\pgfutil@empty + \pgfcalendar@launch@ifdate{calendar week of month={#1}}{\def\pgf@cal@temp{\pgfcalendarmatchestrue}}{}% + \expandafter\endgroup\pgf@cal@temp}} + +\def\pgfcalendar@ifdate@first#1#2:#3\pgf@stop{% + \pgfqkeys{/pgf/calendar}{and={#3, week of month#1={#2}}}} +\def\pgfcalendar@getlastYMX#1#2#3{% #1 = year, #2 = month, #3 := last day + \begingroup + \ifnum#2=2 % stupid February + \pgfcalendarmatchesfalse + \pgfqkeys{/pgf/calendar}{leap year={#1}}% + \ifpgfcalendarmatches + #3=29 + \else + #3=28 + \fi + \else + #3=\ifcase#2\relax\or + 31\or\or31\or30\or31\or30\or31\or31\or30\or31\or30\or31\fi + \fi + \edef\pgf@cal@temp{#3=\the#3\relax} + \expandafter + \endgroup\pgf@cal@temp} + +% +% weeks +% +\def\pgfcalendar@week@setup#1{% + \pgfutil@IfUndefined{pgfcalendar@week@#1}{% + \begingroup + \pgfcalendardatetojulian{#1-01-01}\pgfutil@tempcnta + \pgfcalendarjuliantoweekday\pgfutil@tempcnta\pgfutil@tempcntb + % + % tempcnta holds the julian number for first day of the current year + % tempcntb holds the weekday for the first day of the current year + % + % set tempcnta to the Monday of the week with first day of current year + \advance\pgfutil@tempcnta by -\pgfutil@tempcntb + % + % if the first week starts at Fri, Sat or Sun, next week is the 1st week + \ifnum\pgfutil@tempcntb>3\relax + \advance\pgfutil@tempcnta by 7\relax + \fi + % setup macro for year with {Julian number for day of first week}{weekday of -01-01} + \expandafter\xdef\csname pgfcalendar@week@#1\endcsname{{\the\pgfutil@tempcnta}{\the\pgfutil@tempcntb}}% + \endgroup + }{}% +} + +\def\pgfcalendarjulianyeartoweek#1#2#3{\pgfcalendarjulianyeartoweek@{#1}{#2}{#3}{\iftrue}} +\def\pgfcalendarjulianyeartoweek@#1#2#3#4{% + % #1 = julian date (count) + % #2 = year + % #3 = count that holds the week at the end + % #4 = \iftrue or \iffalse: whether week 53 needs to be checked (\iffalse when determing week from next year) + \begingroup + \pgfcalendar@week@setup{#2}% + #3=#1\relax + % + % calculate difference of days between current date and start of week 1 + % + \advance#3 by -\expandafter\expandafter\expandafter\pgfutil@firstoftwo\csname pgfcalendar@week@#2\endcsname\relax + \ifnum#3<0\relax % whoops, we are in the week of the previous year + \expandafter\pgfutil@firstoftwo + \else + \expandafter\pgfutil@secondoftwo + \fi + {% if first day of the year is Fri, Sat or Sun + \ifnum\expandafter\expandafter\expandafter\pgfutil@secondoftwo\csname pgfcalendar@week@#2\endcsname>3\relax + \expandafter\pgfutil@firstoftwo + \else + \expandafter\pgfutil@secondoftwo + \fi + {% we need to check the week of the previous year + #3=#2\relax + \advance#3 by -1 + \edef\pgf@cal@temp{\noexpand\pgfcalendarjulianyeartoweek@{#1}{\the#3}{#3}\noexpand\iffalse}% + \pgf@cal@temp + }{% yeah, it's weird + \divide#3 by 7 + \advance#3 by 1 + }% + }{% + \divide#3 by 7 + \advance#3 by 1 + #4% + \expandafter\pgfutil@firstofone + \else + \expandafter\pgfutil@gobble + \fi + {% + \ifnum#3=53\relax % whoops, we are possibly in the first week of the next year + \expandafter\pgfutil@firstofone + \else + \expandafter\pgfutil@gobble + \fi + {% + \begingroup + % check whether we're already in week 1 of the next year + #3=#2\relax + \advance#3 by 1 + \expandafter\pgfcalendar@week@setup\expandafter{\the#3}% + \ifnum#1<\expandafter\expandafter\expandafter\pgfutil@firstoftwo\csname pgfcalendar@week@\the#3\endcsname\relax + #3=53 + \else + #3=1 + \fi + \expandafter + \endgroup\expandafter#3\the#3\relax + }% + }% + }% + \expandafter + \endgroup\expandafter + #3\the#3\relax +} + +% +% shorthands for weeks (n) +% +% n-: shortest +% n=: shortest but prepends whitespace +% n0: leading zero +% +\expandafter\def\csname pgfcalendar@shorthand@n-\endcsname{% + \if0\pgfcalendarcurrentweek\else\pgfcalendarcurrentweek\fi} +\expandafter\def\csname pgfcalendar@shorthand@n=\endcsname{% + {\pgfutil@tempcnta=\pgfcalendarcurrentweek\relax\ifnum\pgfutil@tempcnta<10\relax\setbox0=\hbox{1}\kern\wd0\relax\fi\the\pgfutil@tempcnta}} +\expandafter\def\csname pgfcalendar@shorthand@n0\endcsname{% + \pgfcalendarcurrentweek} + +% +% Overwriting original \pgfcalendar +% +\long\def\pgfcalendar#1#2#3#4{% + \begingroup% + % Setup local \ifdate + \let\ifdate=\pgfcalendar@local@ifdate% + % Let's start with computing start and end dates... + \def\pgfcalendarprefix{#1}% + \pgfcalendardatetojulian{#2}{\pgfcalendarcurrentjulian}% + \edef\pgfcalendarbeginjulian{\the\pgfcalendarcurrentjulian}% + \edef\pgfcalendarbeginiso{#2}% + \pgfcalendardatetojulian{#3}{\pgfutil@tempcnta}% + \edef\pgfcalendarendjulian{\the\pgfutil@tempcnta}% + \advance\pgfutil@tempcnta by1\relax% + \edef\pgfcalendarendjulianplus{\the\pgfutil@tempcnta}% + \edef\pgfcalendarendiso{#3}% + % + % Start main loop + % + \loop% + \ifnum\pgfcalendarcurrentjulian<\pgfcalendarendjulianplus\relax% + % Setup information about current date + \pgfcalendarjuliantodate{\pgfcalendarcurrentjulian}% + {\pgfcalendarcurrentyear}{\pgfcalendarcurrentmonth}{\pgfcalendarcurrentday}% + \pgfcalendarjuliantoweekday{\pgfcalendarcurrentjulian}{\pgfutil@tempcntb}% + \edef\pgfcalendarcurrentweekday{\the\pgfutil@tempcntb}% + \pgfcalendarjulianyeartoweek{\pgfcalendarcurrentjulian}{\pgfcalendarcurrentyear}{\pgfutil@tempcntb}% + \edef\pgfcalendarcurrentweek{\ifnum\pgfutil@tempcntb<10 0\fi\the\pgfutil@tempcntb}% + % Render: + #4% + % Advance day: + \advance\pgfcalendarcurrentjulian by1\relax% + \repeat% + \endgroup% +} + +% +% Overwriting original \pgfcalendar@local@ifdate +% +\def\pgfcalendar@local@ifdate{% + \let\pgfcalendarifdatejulian=\pgfcalendarcurrentjulian + \let\pgfcalendarifdateyear=\pgfcalendarcurrentyear + \let\pgfcalendarifdatemonth=\pgfcalendarcurrentmonth + \let\pgfcalendarifdateday=\pgfcalendarcurrentday + \let\pgfcalendarifdateweekday=\pgfcalendarcurrentweekday + \let\pgfcalendarifdateweek=\pgfcalendarcurrentweek + \pgfcalendar@launch@ifdate% +} +% +% Overwritigin original \pgfcalendarifdate +% +\def\pgfcalendarifdate#1#2#3#4{% + \pgfcalendardatetojulian{#1}{\pgfutil@tempcnta}% + \pgfcalendarjuliantodate{\pgfutil@tempcnta} + {\pgfcalendarifdateyear}{\pgfcalendarifdatemonth}{\pgfcalendarifdateday}% + \edef\pgfcalendarifdatejulian{\the\pgfutil@tempcnta}% + % Compute info about date + \pgfcalendarjuliantoweekday{\pgfutil@tempcnta}{\pgfutil@tempcntb}% + \edef\pgfcalendarifdateweekday{\the\pgfutil@tempcntb}% + \pgfcalendarjulianyeartoweek{\pgfcalendarifdatejulian}{\pgfcalendarifdateyear}{\pgfutil@tempcntb}% + \edef\pgfcalendarifdateweek{\ifnum\pgfutil@tempcntb<10 0\fi\the\pgfutil@tempcntb}% + % + \pgfcalendar@launch@ifdate{#2}{#3}{#4}% +} + +\pgfqkeys{/pgf/calendar/week}{.value required,.code=\ifnum#1=\pgfcalendarifdateweek\relax\expandafter\pgfcalendarmatchestrue\fi} + +% Overwriting shorthands of pgfcalendar +\expandafter\def\csname pgfcalendar@shorthand@d-\endcsname{% + \if0\pgfcalendarcurrentday\else\pgfcalendarcurrentday\fi} +\expandafter\def\csname pgfcalendar@shorthand@m-\endcsname{% + \if0\pgfcalendarcurrentmonth\else\pgfcalendarcurrentmonth\fi} + +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex new file mode 100644 index 0000000000..9eb1c6ab09 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex @@ -0,0 +1,66 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\pgfset{ + circle arrow start angle/.initial=, + circle arrow end angle/.initial=, + circle arrow delta angle/.initial=, + circle arrow arrows/.initial=-, + circle arrow/@turn left/.style={/pgf/circle arrow arrows=->,/pgf/circle arrow delta angle=340}, + circle arrow/@turn right/.style={/pgf/circle arrow arrows=<-,/pgf/circle arrow delta angle=340}, + circle arrow turn left north/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=100}, + circle arrow turn left east/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=10}, + circle arrow turn left south/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=280}, + circle arrow turn left west/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=190}, + circle arrow turn right north/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=100}, + circle arrow turn right east/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=10}, + circle arrow turn right south/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=280}, + circle arrow turn right west/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=190}, +} +\pgfdeclareshape{circle arrow}{ + \inheritsavedanchors[from=circle] + \inheritanchorborder[from=circle] + \inheritanchor[from=circle]{north} + \inheritanchor[from=circle]{north west} + \inheritanchor[from=circle]{north east} + \inheritanchor[from=circle]{center} + \inheritanchor[from=circle]{west} + \inheritanchor[from=circle]{east} + \inheritanchor[from=circle]{mid} + \inheritanchor[from=circle]{mid west} + \inheritanchor[from=circle]{mid east} + \inheritanchor[from=circle]{base} + \inheritanchor[from=circle]{base west} + \inheritanchor[from=circle]{base east} + \inheritanchor[from=circle]{south} + \inheritanchor[from=circle]{south west} + \inheritanchor[from=circle]{south east} + \backgroundpath{ + \pgfkeysgetvalue{/pgf/circle arrow start angle}\pgf@sh@circlearrow@s + \pgfkeysgetvalue{/pgf/circle arrow end angle}\pgf@sh@circlearrow@e + \pgfkeysgetvalue{/pgf/circle arrow delta angle}\pgf@sh@circlearrow@d + \ifx\pgf@sh@circlearrow@s\pgfutil@empty% + \pgfmathsetmacro\pgf@sh@circlearrow@s{\pgf@sh@circlearrow@e-\pgf@sh@circlearrow@d}% + \else + \ifx\pgf@sh@circlearrow@e\pgfutil@empty% + \pgfmathsetmacro\pgf@sh@circlearrow@e{\pgf@sh@circlearrow@s+\pgf@sh@circlearrow@d}% + \fi% + \fi + \pgfutil@tempdima=\radius + \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% + \ifdim\pgf@xb<\pgf@yb + \advance\pgfutil@tempdima by-\pgf@yb + \else + \advance\pgfutil@tempdima by-\pgf@xb + \fi + \pgfpathmoveto{\pgfpointadd{\centerpoint}{\pgfpointpolar{\pgf@sh@circlearrow@s}{\pgfutil@tempdima}}}% + \pgfpatharc{\pgf@sh@circlearrow@s}{\pgf@sh@circlearrow@e}{\pgfutil@tempdima}% + \pgfkeysgetvalue{/pgf/circle arrow arrows}\pgf@temp + \expandafter\pgfsetarrows\expandafter{\pgf@temp}% + } +} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.circlecrosssplit.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.circlecrosssplit.code.tex new file mode 100644 index 0000000000..7bc2761fb4 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.circlecrosssplit.code.tex @@ -0,0 +1,292 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\usepgflibrary{shapes.multipart} +\let\pgfnodeparttrbox\pgfnodeparttwobox +\let\pgfnodepartblbox\pgfnodepartthreebox +\let\pgfnodepartbrbox\pgfnodepartfourbox +\newif\ifpgfcirclecrosssplitcustomfill +\pgfset{% + circle cross split part fill/.code=% + \def\pgf@lib@sh@ccs@list@fill{#1}% + \pgfcirclecrosssplitcustomfilltrue,% + circle cross split uses custom fill/.is if=pgfcirclecrosssplitcustomfill +} +\def\pgf@lib@sh@ccs@list@fill{none}% +\pgfdeclareshape{circle cross split}{% + \nodeparts{text,two,three,four}% + \savedanchor\centerpoint{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/inner xsep}}% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}% + \pgf@x =\wd\pgfnodeparttextbox + \pgf@yb=\dp\pgfnodeparttextbox + \pgf@y=\dp\pgfnodeparttwobox + \ifdim\pgf@yb>\pgf@y + \pgf@y=\pgf@yb + \fi + \advance\pgf@x\pgf@xa + \advance\pgf@y-\pgf@ya + \advance\pgf@x.5\pgflinewidth + \advance\pgf@y-.5\pgflinewidth + }% + \savedanchor\twoanchor{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/inner xsep}}% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}% + \advance\pgf@x.5\pgflinewidth + \advance\pgf@x\pgf@xa + \advance\pgf@y.5\pgflinewidth + \advance\pgf@y\pgf@ya + \pgf@yb\dp\pgfnodeparttextbox + \pgf@yc\dp\pgfnodeparttwobox + \ifdim\pgf@yb>\pgf@yc + \pgf@yc\pgf@yb + \fi + \advance\pgf@y\pgf@yc + }% + \savedanchor\threeanchor{% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}% + \pgf@x\wd\pgfnodeparttextbox + \pgf@yb\dp\pgfnodeparttextbox + \pgf@yc\dp\pgfnodeparttwobox + \ifdim\pgf@yb>\pgf@yc + \pgf@yc\pgf@yb + \fi + \advance\pgf@y-\pgf@yc + \advance\pgf@y-2\pgf@ya + \advance\pgf@y-\pgflinewidth + \pgf@yb\ht\pgfnodepartthreebox + \pgf@yc\ht\pgfnodepartfourbox + \ifdim\pgf@yb>\pgf@yc + \pgf@yc\pgf@yb + \fi + \advance\pgf@y-\pgf@yc + \advance\pgf@x-\wd\pgfnodepartthreebox + }% + \saveddimen\radius{% + % height (upper): + \pgf@y=\ht\pgfnodeparttextbox + \ifdim\pgf@y<\ht\pgfnodeparttwobox + \pgf@y=\ht\pgfnodeparttwobox + \fi + \ifdim\dp\pgfnodeparttextbox>\dp\pgfnodeparttwobox + \advance\pgf@y by\dp\pgfnodeparttextbox + \else + \advance\pgf@y by\dp\pgfnodeparttwobox + \fi + % height (lower): + \pgf@yb\ht\pgfnodepartthreebox + \ifdim\pgf@yb<\ht\pgfnodepartfourbox + \pgf@yb=\ht\pgfnodepartfourbox + \fi + \pgf@yc=\dp\pgfnodepartthreebox + \ifdim\pgf@yc<\dp\pgfnodepartfourbox + \advance\pgf@yb by\dp\pgfnodepartfourbox + \else + \advance\pgf@yb by\pgf@yc + \fi + \ifdim\pgf@yc>\pgf@y + \pgf@y=\pgf@yc + \fi + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}% + \advance\pgf@y2\pgf@ya + % + \pgf@x\wd\pgfnodeparttextbox + \pgf@xa\wd\pgfnodepartthreebox + \pgf@xb\wd\pgfnodeparttwobox + \pgf@xc\wd\pgfnodepartfourbox + \ifdim\pgf@xa>\pgf@x + \pgf@x\pgf@xa + \fi + \ifdim\pgf@xb>\pgf@x + \pgf@x\pgf@xb + \fi + \ifdim\pgf@xc>\pgf@x + \pgf@x\pgf@xc + \fi + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/inner xsep}}% + \advance\pgf@x by 2\pgf@xa + \ifdim\pgf@y>\pgf@x + \pgf@x=\pgf@y + \fi + \advance\pgf@x by\pgflinewidth + % + \pgf@xa=\pgf@x + \pgf@ya=\pgf@y + % from circle: + \pgf@process{\pgfpointnormalised{}}% + \ifdim\pgf@x>\pgf@y% + \c@pgf@counta=\pgf@x% + \ifnum\c@pgf@counta=0\relax% + \else% + \divide\c@pgf@counta by 255\relax% + \pgf@xa=16\pgf@xa\relax% + \divide\pgf@xa by\c@pgf@counta% + \pgf@xa=16\pgf@xa\relax% + \fi% + \else% + \c@pgf@counta=\pgf@y% + \ifnum\c@pgf@counta=0\relax% + \else% + \divide\c@pgf@counta by 255\relax% + \pgf@ya=16\pgf@ya\relax% + \divide\pgf@ya by\c@pgf@counta% + \pgf@xa=16\pgf@ya\relax% + \fi% + \fi% + \pgf@x=\pgf@xa% + % + \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}% + \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}% + \ifdim\pgf@x<.5\pgf@xb + \pgf@x=.5\pgf@xb + \fi + \ifdim\pgf@x<.5\pgf@yb + \pgf@x=.5\pgf@yb + \fi + % + \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% + \ifdim\pgf@xb<\pgf@yb + \advance\pgf@x\pgf@yb + \else + \advance\pgf@x\pgf@xb + \fi + }% + \inheritanchorborder[from=circle]% + \inheritanchor[from=circle]{north}% + \inheritanchor[from=circle]{north west}% + \inheritanchor[from=circle]{north east}% + \inheritanchor[from=circle]{center}% + \inheritanchor[from=circle]{west}% + \inheritanchor[from=circle]{east}% + \inheritanchor[from=circle]{mid}% + \inheritanchor[from=circle]{mid west}% + \inheritanchor[from=circle]{mid east}% + \inheritanchor[from=circle]{base}% + \inheritanchor[from=circle]{base west}% + \inheritanchor[from=circle]{base east}% + \inheritanchor[from=circle]{south}% + \inheritanchor[from=circle]{south west}% + \inheritanchor[from=circle]{south east}% + \anchor{two}{\twoanchor}% + \anchor{three}{\threeanchor}% + \anchor{four}{ + \threeanchor + \pgf@ya=\pgf@y + \twoanchor + \pgf@y=\pgf@ya + }% + \anchor{lower base}{% + \threeanchor + \pgf@ya=\pgf@y + \centerpoint + \pgf@y=\pgf@ya + } + \anchor{lower base west}{% + \threeanchor + \pgf@ya=\pgf@y + \centerpoint + \pgf@y=\pgf@ya + \advance\pgf@x by-\radius + } + \anchor{lower base east}{% + \threeanchor + \pgf@ya=\pgf@y + \centerpoint + \pgf@y=\pgf@ya + \advance\pgf@x by\radius + } + \anchor{lower mid}{% + \threeanchor + \pgf@ya=\pgf@y + \centerpoint + \pgf@y=\pgf@ya + \pgfmathsetlength\pgf@ya{+.5ex}% + \advance\pgf@y by\pgf@ya + } + \anchor{lower mid west}{% + \threeanchor + \pgf@ya=\pgf@y + \centerpoint + \pgf@y=\pgf@ya + \advance\pgf@x by-\radius + \pgfmathsetlength\pgf@ya{+.5ex}% + \advance\pgf@y by\pgf@ya + } + \anchor{lower mid east}{% + \threeanchor + \pgf@ya=\pgf@y + \centerpoint + \pgf@y=\pgf@ya + \advance\pgf@x by\radius + \pgfmathsetlength\pgf@ya{+.5ex}% + \advance\pgf@y by\pgf@ya + } + \inheritbackgroundpath[from=circle] + \beforebackgroundpath{% + \pgfutil@tempdima=\radius + \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% + \ifdim\pgf@xb<\pgf@yb + \advance\pgfutil@tempdima by-\pgf@yb + \else + \advance\pgfutil@tempdima by-\pgf@xb + \fi + \advance\pgfutil@tempdima by-.5\pgflinewidth% + \pgfsetshortenstart{0pt}% + \pgfsetshortenend{0pt}% + \pgfsetarrows{-}% + \pgfpathmoveto + {\pgfpointadd{\centerpoint}{\pgfqpoint{-\pgfutil@tempdima}{0pt}}}% + \pgfpathlineto + {\pgfpointadd{\centerpoint}{\pgfqpoint{\pgfutil@tempdima}{0pt}}}% + \pgfpathmoveto + {\pgfpointadd{\centerpoint}{\pgfqpoint{0pt}{-\pgfutil@tempdima}}}% + \pgfpathlineto + {\pgfpointadd{\centerpoint}{\pgfqpoint{0pt}{\pgfutil@tempdima}}}% + \pgfusepathqstroke + }% + \behindbackgroundpath{% + \pgfutil@tempdima=\radius + \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% + \ifdim\pgf@xb<\pgf@yb + \advance\pgfutil@tempdima by-\pgf@yb + \else + \advance\pgfutil@tempdima by-\pgf@xb + \fi + \advance\pgfutil@tempdima by-.5\pgflinewidth% + \ifpgfcirclecrosssplitcustomfill% + \pgf@lib@sh@rs@process@list{\pgf@lib@sh@ccs@list@fill}{4}% + {% + \pgfmathloop + \ifnum\pgfmathcounter>4% + \else% + \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}% + \edef\pgf@tempa + {\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname}% + \ifx\pgf@tempa\pgf@lib@sh@rs@nonetext\else + \pgfsetfillcolor{\pgf@tempa}% + \ifcase\pgfmathcounter\or + \def\pgf@lib@sh@ccs@angle{90}\or + \def\pgf@lib@sh@ccs@angle{0}\or + \def\pgf@lib@sh@ccs@angle{180}\else + \def\pgf@lib@sh@ccs@angle{270}% + \fi + \pgfpathmoveto{\centerpoint}% + \pgfpathlineto{\pgfpointadd{\centerpoint} + {\pgfqpointpolar{\pgf@lib@sh@ccs@angle}{\pgfutil@tempdima}}}% + \pgfpatharc{+\pgf@lib@sh@ccs@angle}{\pgf@lib@sh@ccs@angle+90} + {+\pgfutil@tempdima}% + \pgfpathclose + \pgfusepathqfill + \fi + \repeatpgfmathloop + }% + \fi + }% +} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.heatmark.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.heatmark.code.tex new file mode 100644 index 0000000000..477d0442da --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.heatmark.code.tex @@ -0,0 +1,181 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\pgfset{ + heatmark arc width/.initial=+4pt, + heatmark arc sep/.initial=+1pt, + heatmark arc rings/.initial=3, + heatmark arcs/.initial=3, + heatmark arc sep angle/.initial=20, + heatmark inner opacity/.initial=.8, + heatmark outer opacity/.initial=.2 +} +\pgfdeclareshape{heatmark} +% +% Draws a circle around the text +% +{ + \savedanchor\centerpoint{% + \pgf@x=.5\wd\pgfnodeparttextbox% + \pgf@y=.5\ht\pgfnodeparttextbox% + \advance\pgf@y by-.5\dp\pgfnodeparttextbox% + } + + \saveddimen\innerradius{% + % + % Caculate ``height radius'' + % + \pgf@ya=.5\ht\pgfnodeparttextbox% + \advance\pgf@ya by.5\dp\pgfnodeparttextbox% + \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/inner ysep}}% + \advance\pgf@ya by\pgf@yb% + % + % Caculate ``width radius'' + % + \pgf@xa=.5\wd\pgfnodeparttextbox% + \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/inner xsep}}% + \advance\pgf@xa by\pgf@xb% + % + % Calculate length of radius vector: + % + \pgf@process{\pgfpointnormalised{\pgfqpoint{\pgf@xa}{\pgf@ya}}}% + \ifdim\pgf@x>\pgf@y% + \c@pgf@counta=\pgf@x% + \ifnum\c@pgf@counta=0\relax% + \else% + \divide\c@pgf@counta by 255\relax% + \pgf@xa=16\pgf@xa\relax% + \divide\pgf@xa by\c@pgf@counta% + \pgf@xa=16\pgf@xa\relax% + \fi% + \else% + \c@pgf@counta=\pgf@y% + \ifnum\c@pgf@counta=0\relax% + \else% + \divide\c@pgf@counta by 255\relax% + \pgf@ya=16\pgf@ya\relax% + \divide\pgf@ya by\c@pgf@counta% + \pgf@xa=16\pgf@ya\relax% + \fi% + \fi% + \pgf@x=\pgf@xa% + % + % If necessary, adjust radius so that the size requirements are + % met: + % + \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}% + \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}% + \ifdim\pgf@x<.5\pgf@xb% + \pgf@x=.5\pgf@xb% + \fi% + \ifdim\pgf@x<.5\pgf@yb% + \pgf@x=.5\pgf@yb% + \fi% + }% + + \saveddimen\radius{% + \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% + \ifdim\pgf@xb<\pgf@yb% + \advance\pgf@x by\pgf@yb% + \else% + \advance\pgf@x by\pgf@xb% + \fi% + \pgfmathsetcount\c@pgf@counta{\pgfkeysvalueof{/pgf/heatmark arc rings}}% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/heatmark arc width}+\pgfkeysvalueof{/pgf/heatmark arc sep}}% + \multiply\pgf@xa\c@pgf@counta + \advance\pgf@x\pgf@xa + }% + % + % Anchors + % + \inheritanchor[from=circle]{north} + \inheritanchor[from=circle]{north west} + \inheritanchor[from=circle]{north east} + \inheritanchor[from=circle]{center} + \inheritanchor[from=circle]{west} + \inheritanchor[from=circle]{east} + \inheritanchor[from=circle]{mid} + \inheritanchor[from=circle]{mid west} + \inheritanchor[from=circle]{mid east} + \inheritanchor[from=circle]{base} + \inheritanchor[from=circle]{base west} + \inheritanchor[from=circle]{base east} + \inheritanchor[from=circle]{south} + \inheritanchor[from=circle]{south west} + \inheritanchor[from=circle]{south east} + \inheritanchorborder[from=circle] + % + % Background path + % + \backgroundpath{ + \pgfutil@tempdima=\innerradius% + \pgfpathcircle{\centerpoint}{\pgfutil@tempdima}% + }% + % + % + % + \behindbackgroundpath{% + \pgfmathsetcount\c@pgf@counta{\pgfkeysvalueof{/pgf/heatmark arc rings}}% heat arc rings + \pgfmathsetcount\c@pgf@countb{\pgfkeysvalueof{/pgf/heatmark arcs}}% heat arcs + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/heatmark arc width}}% heat arc width + \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/heatmark arc sep}}% heat arc sep + %\pgfmathsetmacro\pgf@tempa{\pgfkeysvalueof{/pgf/heat arc sep angle}}% heat arc sep angle + \pgfmathsetmacro\pgf@tempb{360/\c@pgf@countb-(\pgfkeysvalueof{/pgf/heatmark arc sep angle})}% heat arc + \pgfmathsetmacro\pgf@tempc{\pgfkeysvalueof{/pgf/shape border rotate}}% heat rotate + % + \pgfmathsetmacro\pgf@tempd{\pgfkeysvalueof{/pgf/heatmark inner opacity}}% heat opacity high + \ifnum\c@pgf@counta=1 + \def\tikzext@heatmark@opacity@seps{0}% + \else + \pgfmathsetmacro\tikzext@heatmark@opacity@seps + {(\pgf@tempd-(\pgfkeysvalueof{/pgf/heatmark outer opacity}))% + /(\c@pgf@counta-1)}% + \fi + \pgfutil@tempcnta=0 + \pgfutil@tempcntb=0 + \pgf@ya\innerradius\relax + \pgftransformshift{\centerpoint} + \pgfutil@loop % ring loop + \advance\pgf@ya\pgf@xb % current radius + heat arc sep + \pgf@yb\pgf@ya + \advance\pgf@yb\pgf@xa % current radius + heat arc sep + heat arc width + \pgfsetfillopacity{\pgf@tempd}% + \begingroup + \edef\pgf@marshal{\noexpand\pgfset{heatmark ring \the\numexpr\pgfutil@tempcnta+1\relax/.try}}% + \pgf@marshal + \csname tikz@options\endcsname + {% + \pgfutil@loop + \pgfmathsetmacro\tikzext@heatmark@start@angle{\pgf@tempc-.5*\pgf@tempb+\pgfutil@tempcntb*(360/\c@pgf@countb)}% + % path + \begingroup + \edef\pgf@marshal{\noexpand\pgfset{heatmark arc \the\numexpr\pgfutil@tempcntb+1\relax/.try}% + \noexpand\pgfset{heatmark ring \the\numexpr\pgfutil@tempcnta+1\relax\space arc \the\numexpr\pgfutil@tempcntb+1\relax/.try}}% + \pgf@marshal + \csname tikz@options\endcsname + \pgfpathmoveto{\pgfpointpolar{\tikzext@heatmark@start@angle}{\pgf@ya}}% + \pgfpatharc{\tikzext@heatmark@start@angle}{\tikzext@heatmark@start@angle+\pgf@tempb}{\pgf@ya}% + \pgfpathlineto{\pgfpointpolar{\tikzext@heatmark@start@angle+\pgf@tempb}{\pgf@yb}}% + \pgfpatharc{\tikzext@heatmark@start@angle+\pgf@tempb}{\tikzext@heatmark@start@angle}{\pgf@yb}% + \pgfpathclose + \pgfusepathqfill + \endgroup + \advance\pgfutil@tempcntb\@ne + \ifnum\pgfutil@tempcntb<\c@pgf@countb + \pgfutil@repeat + }% + \endgroup + \advance\pgfutil@tempcnta\@ne + \ifnum\pgfutil@tempcnta<\c@pgf@counta + \pgf@ya\pgf@yb + \pgfmathsetmacro\pgf@tempd{\pgf@tempd-\tikzext@heatmark@opacity@seps}% + \pgfutil@repeat + \pgftransformshift{\pgfqpointscale{-1}{\centerpoint}}% + } +} +\endinput diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.rectangleroundedcorners.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.rectangleroundedcorners.code.tex new file mode 100644 index 0000000000..37baf7abbf --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.rectangleroundedcorners.code.tex @@ -0,0 +1,318 @@ +\pgfset{ + rectangle with rounded corners north west radius/.initial=.5\pgflinewidth, + rectangle with rounded corners north east radius/.initial=.5\pgflinewidth, + rectangle with rounded corners south west radius/.initial=.5\pgflinewidth, + rectangle with rounded corners south east radius/.initial=.5\pgflinewidth, + rectangle with rounded corners radius/.style={ + /pgf/rectangle with rounded corners north west radius={#1}, + /pgf/rectangle with rounded corners north east radius={#1}, + /pgf/rectangle with rounded corners south west radius={#1}, + /pgf/rectangle with rounded corners south east radius={#1}} +}% +\pgfdeclareshape{rectangle with rounded corners}{% + \savedmacro\rectanglewithroundedcornersparameter{% + % + % width = max(text width + 2 * inner xseps, minimum width) + 2 * outer xseps + \pgf@x=\wd\pgfnodeparttextbox + \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}% + \advance\pgf@x by 2\pgf@xc + \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/minimum width}}% + \ifdim\pgf@x<\pgf@xc + \pgf@x=\pgf@xc + \fi + % + \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/outer xsep}}% + \edef\outerxsep{\the\pgf@xc}% + \addtosavedmacro\outerxsep + \advance\pgf@x by 2\pgf@xc + \pgf@x=.5\pgf@x + \edef\halfwidth{\the\pgf@x}% + \addtosavedmacro\halfwidth + % + % height = max(text height + text depth + 2 * inner yseps, minimum height) + 2 * outer yseps + \pgf@y=\ht\pgfnodeparttextbox + \advance\pgf@y by \dp\pgfnodeparttextbox + \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}% + \advance\pgf@y by 2\pgf@yc + \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/minimum height}}% + \ifdim\pgf@y<\pgf@yc + \pgf@y=\pgf@yc + \fi + % + \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/outer ysep}}% + \edef\outerysep{\the\pgf@yc}% + \addtosavedmacro\outerysep + \advance\pgf@y by 2\pgf@yc + \pgf@y=.5\pgf@y + \edef\halfheight{\the\pgf@y}% + \addtosavedmacro\halfheight + % + % \centerpoint + \pgf@x=.5\wd\pgfnodeparttextbox + \pgf@y=.5\ht\pgfnodeparttextbox + \advance\pgf@y by -.5\dp\pgfnodeparttextbox + \pgfextract@process\centerpoint{}% + \addtosavedmacro\centerpoint + % + \pgfmathsetlengthmacro\northwestradius{\pgfkeysvalueof{/pgf/rectangle with rounded corners north west radius}} + \pgfmathsetlengthmacro\northeastradius{\pgfkeysvalueof{/pgf/rectangle with rounded corners north east radius}} + \pgfmathsetlengthmacro\southwestradius{\pgfkeysvalueof{/pgf/rectangle with rounded corners south west radius}} + \pgfmathsetlengthmacro\southeastradius{\pgfkeysvalueof{/pgf/rectangle with rounded corners south east radius}} + \addtosavedmacro\northwestradius + \addtosavedmacro\northeastradius + \addtosavedmacro\southwestradius + \addtosavedmacro\southeastradius + }% + \anchor{center}{% + \rectanglewithroundedcornersparameter + \centerpoint + } + \anchor{west}{% + \rectanglewithroundedcornersparameter + \centerpoint + \advance\pgf@x by -\halfwidth + } + \anchor{east}{% + \rectanglewithroundedcornersparameter + \centerpoint + \advance\pgf@x by \halfwidth + } + \anchor{north}{% + \rectanglewithroundedcornersparameter + \centerpoint + \advance\pgf@y by \halfheight + } + \anchor{south}{% + \rectanglewithroundedcornersparameter + \centerpoint + \advance\pgf@y by -\halfheight + } + \anchor{mid}{% + \rectanglewithroundedcornersparameter + \centerpoint + \pgfmathsetlength\pgf@y{+.5ex}% + } + \anchor{mid west}{% + \csname pgf@anchor@rectangle with rounded corners@west\endcsname + \pgfmathsetlength\pgf@y{+.5ex}% + } + \anchor{mid east}{% + \csname pgf@anchor@rectangle with rounded corners@east\endcsname + \pgfmathsetlength\pgf@y{+.5ex}% + } + \anchor{base}{% + \rectanglewithroundedcornersparameter + \centerpoint + \pgf@y=0pt + } + \anchor{base west}{% + \csname pgf@anchor@rectangle with rounded corners@west\endcsname + \pgf@y=0pt + } + \anchor{base east}{% + \csname pgf@anchor@rectangle with rounded corners@east\endcsname + \pgf@y=0pt + } + \anchor{north west}{% + \csname pgf@anchor@rectangle with rounded corners@north west center\endcsname + \ifdim\northwestradius=0pt + \else + \pgf@process{\pgfpointadd{}{\pgfpointpolar{135}{\northwestradius+\outerxsep and \northwestradius+\outerysep}}}% + \fi + } + \anchor{north west center}{% + \rectanglewithroundedcornersparameter + \pgf@x=-\halfwidth + \pgf@y=\halfheight + \ifdim\northwestradius=0pt + \else + \advance\pgf@x by \outerxsep + \advance\pgf@x by \northwestradius + \advance\pgf@y by -\outerysep + \advance\pgf@y by -\northwestradius + \fi + \pgf@process{\pgfpointadd{}{\centerpoint}}% + } + \anchor{north east}{% + \csname pgf@anchor@rectangle with rounded corners@north east center\endcsname + \ifdim\northeastradius=0pt + \else + \pgf@process{\pgfpointadd{}{\pgfpointpolar{45}{\northeastradius+\outerxsep and \northeastradius+\outerysep}}}% + \fi + } + \anchor{north east center}{% + \rectanglewithroundedcornersparameter + \pgf@x=\halfwidth + \pgf@y=\halfheight + \ifdim\northeastradius=0pt + \else + \advance\pgf@x by -\outerxsep + \advance\pgf@x by -\northeastradius + \advance\pgf@y by -\outerysep + \advance\pgf@y by -\northeastradius + \fi + \pgf@process{\pgfpointadd{}{\centerpoint}}% + } + \anchor{south west}{% + \csname pgf@anchor@rectangle with rounded corners@south west center\endcsname + \ifdim\southwestradius=0pt + \else + \pgf@process{\pgfpointadd{}{\pgfpointpolar{225}{\southwestradius+\outerxsep and \southwestradius+\outerysep}}}% + \fi + } + \anchor{south west center}{% + \rectanglewithroundedcornersparameter + \pgf@x=-\halfwidth + \pgf@y=-\halfheight + \ifdim\southwestradius=0pt + \else + \advance\pgf@x by \outerxsep + \advance\pgf@x by \southwestradius + \advance\pgf@y by \outerysep + \advance\pgf@y by \southwestradius + \fi + \pgf@process{\pgfpointadd{}{\centerpoint}}% + } + \anchor{south east}{% + \csname pgf@anchor@rectangle with rounded corners@south east center\endcsname + \ifdim\southeastradius=0pt + \else + \pgf@process{\pgfpointadd{}{\pgfpointpolar{315}{\southeastradius+\outerxsep and \southeastradius+\outerysep}}}% + \fi + } + \anchor{south east center}{% + \rectanglewithroundedcornersparameter + \pgf@x=\halfwidth + \pgf@y=-\halfheight + \ifdim\southeastradius=0pt + \else + \advance\pgf@x by -\outerxsep + \advance\pgf@x by -\southeastradius + \advance\pgf@y by \outerysep + \advance\pgf@y by \southeastradius + \fi + \pgf@process{\pgfpointadd{}{\centerpoint}}% + } + \anchor{below north west}{% + \csname pgf@anchor@rectangle with rounded corners@north west center\endcsname + \advance\pgf@x by -\northwestradius + \advance\pgf@x by -\outerxsep + } + \anchor{above south west}{% + \csname pgf@anchor@rectangle with rounded corners@south west center\endcsname + \advance\pgf@x by -\southwestradius + \advance\pgf@x by -\outerxsep + } + \anchor{below north east}{% + \csname pgf@anchor@rectangle with rounded corners@north east center\endcsname + \advance\pgf@x by \northeastradius + \advance\pgf@x by \outerxsep + } + \anchor{above south east}{% + \csname pgf@anchor@rectangle with rounded corners@south east center\endcsname + \advance\pgf@x by \southeastradius + \advance\pgf@x by \outerxsep + } + \anchor{right north west}{% + \csname pgf@anchor@rectangle with rounded corners@north west center\endcsname + \advance\pgf@y by \northwestradius + \advance\pgf@y by \outerysep + } + \anchor{right south west}{% + \csname pgf@anchor@rectangle with rounded corners@south west center\endcsname + \advance\pgf@y by -\southwestradius + \advance\pgf@y by -\outerysep + } + \anchor{left north east}{% + \csname pgf@anchor@rectangle with rounded corners@north east center\endcsname + \advance\pgf@y by \northeastradius + \advance\pgf@y by \outerysep + } + \anchor{left south east}{% + \csname pgf@anchor@rectangle with rounded corners@south east center\endcsname + \advance\pgf@y by -\southeastradius + \advance\pgf@y by -\outerysep + } + \backgroundpath{% + \rectanglewithroundedcornersparameter + % + \pgf@xa=\halfwidth + \advance\pgf@xa by -\outerxsep + \edef\HalfWidth{\the\pgf@xa}% + % + \pgf@ya=\halfheight + \advance\pgf@ya by -\outerysep + \edef\HalfHeight{\the\pgf@ya}% + % + \pgftransformshift{\centerpoint}% + % + \pgfpathmoveto{\pgfqpoint{\HalfWidth}{0pt}}% + \pgfpathlineto{\pgfpoint {+\HalfWidth}{\HalfHeight-\northeastradius}}% + \pgfpatharc{0}{90}{\northeastradius}% + \pgfpathlineto{\pgfpoint{-\HalfWidth+\northwestradius}{+\HalfHeight}} + \pgfpatharc{90}{180}{\northwestradius}% + \pgfpathlineto{\pgfpoint{+-\HalfWidth}{-\HalfHeight+\southwestradius}}% + \pgfpatharc{180}{270}{\southwestradius}% + \pgfpathlineto{\pgfpoint{\HalfWidth-\southeastradius}{+-\HalfHeight}}% + \pgfpatharc{270}{360}{\southeastradius}% + \pgfpathclose + \pgftransformshift{\pgfqpointscale{-1}{\centerpoint}}% + }% + \anchorborder{% + \pgfextract@process\externalpoint{}% + \ifdim\pgf@x=0pt + \ifdim\pgf@y<0pt + \csname pgf@anchor@rectangle with rounded corners@south\endcsname + \else + \csname pgf@anchor@rectangle with rounded corners@north\endcsname + \fi + \else + \ifdim\pgf@y=0pt + \ifdim\pgf@x<0pt + \csname pgf@anchor@rectangle with rounded corners@west\endcsname + \else + \csname pgf@anchor@rectangle with rounded corners@east\endcsname + \fi + \else + \rectanglewithroundedcornersparameter + \pgfmathanglebetweenpoints{\pgfpointorigin}{\externalpoint}% + \let\angle\pgfmathresult + \pgf@xa=\pgf@x + \pgf@ya=\pgf@y + \pgfextract@process\externalPoint{\pgfpointadd{}{\centerpoint}}% + \ifdim\pgf@xa<0pt + \ifdim\pgf@ya<0pt + % south west + \pgf@sh@rwrc@anchorborder{above south west}{right south west}{south west}{180}{270}{\southwestradius}% + \else + % north west + \pgf@sh@rwrc@anchorborder{right north west}{below north west}{north west}{90}{180}{\northwestradius}% + \fi + \else + \ifdim\pgf@ya<0pt + % south east + \pgf@sh@rwrc@anchorborder{left south east}{above south east}{south east}{270}{360}{\southeastradius}% + \else + % north east + \pgf@sh@rwrc@anchorborder{below north east}{left north east}{north east}{0}{90}{\northeastradius}% + \fi + \fi + \fi + \fi + } +} +\def\pgf@sh@rwrc@anchorborder#1#2#3#4#5#6{% + \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@rectangle with rounded corners@#1\endcsname}% + \let\angleA\pgfmathresult + \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@rectangle with rounded corners@#2\endcsname}% + \let\angleB\pgfmathresult + \if\ifdim\angle pt>\angleA pt 0\else1\fi\ifdim\angle pt<\angleB pt 0\else 2\fi + \pgfmathpointintersectionoflineandarc{\externalPoint}{\centerpoint} + {\csname pgf@anchor@rectangle with rounded corners@#3 center\endcsname} + {#4}{#5}{#6+\outerxsep and #6+\outerysep}% + \else + \pgf@process{\pgfpointadd{\pgfpointborderrectangle{\externalpoint}{\pgfqpoint{\halfwidth}{\halfheight}}}{\centerpoint}}% + \fi +} + +\endinput diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.superellipse.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.superellipse.code.tex new file mode 100644 index 0000000000..9a89b5a8a6 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.shapes.superellipse.code.tex @@ -0,0 +1,198 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\usepgflibrary{shapes.geometric,intersections} +\pgfset{ + superellipse x exponent/.initial=2.5, + superellipse y exponent/.initial=2.5, + superellipse step/.initial=4, + superellipse exponent/.style={/pgf/superellipse x exponent={#1},/pgf/superellipse y exponent={#1}}} + +% Evaluates the x-value of a superellipse around the center +% #1 = t (0≤t≤90) +% #2 = 2/m (x-exp) +% #3 = a (x-rad) +\pgfmathdeclarefunction{superellipsex}{3}{% + \pgfmathcos@{#1}% + \pgfmathpow@{\pgfmathresult}{#2}% + \pgfmathmultiply@{\pgfmathresult}{#3}} + +% Evaluates the y-value of a superellipse around the center +% #1 = t (0≤t≤90) +% #2 = 2/n (y-exp) +% #3 = a (y-rad) +\pgfmathdeclarefunction{superellipsey}{3}{% + \pgfmathsin@{#1}% + \pgfmathpow@{\pgfmathresult}{#2}% + \pgfmathmultiply@{\pgfmathresult}{#3}} + +% Evaluates the x- and y- value of superellipse around the center +% #1 = t (0≤t≤90) +% #2 = 2/m (x-exp) +% #3 = 2/n (y-exp) +% #4 = a (x-rad) +% #5 = b (y-rad) +\def\pgfmathsuperellipseXY#1#2#3#4#5{% + \begingroup + \pgfmathsuperellipsex@{#1}{#2}{#4}% + \let\pgfmath@temp\pgfmathresult + \pgfmathsuperellipsey@{#1}{#3}{#5}% + \edef\pgfmath@temp{\def\noexpand\pgfmathresultX{\pgfmath@temp}% + \def\noexpand\pgfmathresultY{\pgfmathresult}}% + \expandafter + \endgroup\pgfmath@temp} + +\pgfdeclareshape{superellipse}{% + \inheritsavedanchors[from=ellipse] + \inheritanchor[from=ellipse]{text}\inheritanchor[from=ellipse]{center} + \inheritanchor[from=ellipse]{mid}\inheritanchor[from=ellipse]{base} + \inheritanchor[from=ellipse]{north}\inheritanchor[from=ellipse]{south} + \inheritanchor[from=ellipse]{west}\inheritanchor[from=ellipse]{east} + \inheritanchor[from=ellipse]{mid west}\inheritanchor[from=ellipse]{base west} + \inheritanchor[from=ellipse]{mid east}\inheritanchor[from=ellipse]{base east} + \anchor{north east}{% + \pgf@process{\radius}% + \pgfmathpow@{.70710678118}{\xexponent}% + \pgf@x=\pgfmathresult\pgf@x + \pgfmathpow@{.70710678118}{\yexponent}% + \pgf@y=\pgfmathresult\pgf@y + \pgfpointadd{}{\centerpoint}% + } + \anchor{north west}{% + \pgf@process{\radius}% + \pgfmathpow@{.70710678118}{\xexponent}% + \pgf@x=-\pgfmathresult\pgf@x + \pgfmathpow@{.70710678118}{\yexponent}% + \pgf@y=\pgfmathresult\pgf@y + \pgfpointadd{}{\centerpoint}% + } + \anchor{south west}{% + \pgf@process{\radius}% + \pgfmathpow@{.70710678118}{\xexponent}% + \pgf@x=-\pgfmathresult\pgf@x + \pgfmathpow@{.70710678118}{\yexponent}% + \pgf@y=-\pgfmathresult\pgf@y + \pgfpointadd{}{\centerpoint}% + } + \anchor{south east}{% + \pgf@process{\radius}% + \pgfmathpow@{.70710678118}{\xexponent}% + \pgf@x=\pgfmathresult\pgf@x + \pgfmathpow@{.70710678118}{\yexponent}% + \pgf@y=-\pgfmathresult\pgf@y + \pgfpointadd{}{\centerpoint}% + } + \savedmacro\xexponent{% + \pgfmathreciprocal{\pgfkeysvalueof{/pgf/superellipse x exponent}}% + \pgfmathmultiply@{\pgfmathresult}{2}% + \let\xexponent\pgfmathresult + } + \savedmacro\yexponent{% + \pgfmathreciprocal{\pgfkeysvalueof{/pgf/superellipse y exponent}}% + \pgfmathmultiply@{\pgfmathresult}{2}% + \let\yexponent\pgfmathresult + } + \savedmacro\step{% + \pgfmathtruncatemacro\step{\pgfkeysvalueof{/pgf/superellipse step}}% + } + \backgroundpath{% + \pgf@process{\radius}% + \pgfmathsetmacro\xradius{\pgf@x-(\pgfkeysvalueof{/pgf/outer xsep})}% + \pgfmathsetmacro\yradius{\pgf@y-(\pgfkeysvalueof{/pgf/outer ysep})}% + \let\pgf@tempa\pgfutil@empty\let\pgf@tempb\pgfutil@empty + \let\pgf@tempc\pgfutil@empty\let\pgf@tempd\pgfutil@empty + \c@pgf@counta=\step + \pgfutil@loop + \ifnum\c@pgf@counta<90 + \pgfmathsuperellipseXY{\the\c@pgf@counta}{\xexponent}{\yexponent}{\xradius}{\yradius}% + \edef\pgf@temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{\pgfmathresultX pt}{\pgfmathresultY pt}}}% + \pgfutil@append@macrotomacro\pgf@tempa\pgf@temp + \edef\pgf@temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{-\pgfmathresultX pt}{\pgfmathresultY pt}}}% + \pgfutil@prefix@macrotomacro\pgf@tempb\pgf@temp + \edef\pgf@temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{-\pgfmathresultX pt}{-\pgfmathresultY pt}}}% + \pgfutil@append@macrotomacro\pgf@tempc\pgf@temp + \edef\pgf@temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{\pgfmathresultX pt}{-\pgfmathresultY pt}}}% + \pgfutil@prefix@macrotomacro\pgf@tempd\pgf@temp + \advance\c@pgf@counta by\step + \pgfutil@repeat + \pgftransformshift{\centerpoint}% + \pgfplothandlerclosedcurve + \pgfplotstreamstart + \pgfplotstreampoint{\pgfqpoint{\xradius pt}{0pt}}% east + \pgf@tempa + \pgfplotstreampoint{\pgfqpoint{0pt}{\yradius pt}}% north + \pgf@tempb + \pgfplotstreampoint{\pgfqpoint{-\xradius pt}{0pt}}% west + \pgf@tempc + \pgfplotstreampoint{\pgfqpoint{0pt}{-\yradius pt}}% south + \pgf@tempd + \pgfplotstreamend + \pgftransformshift{\centerpoint\pgf@x=-\pgf@x\pgf@y=-\pgf@y} + } + \anchorborder{% + \pgfextract@process\externalpoint{}% + \ifdim\pgf@x=0pt % catch special case x = 0 + \ifdim\pgf@y<0pt \pgf@anchor@superellipse@south\else\pgf@anchor@superellipse@north\fi + \else + \ifdim\pgf@y=0pt % catch special case y = 0 + \ifdim\pgf@x<0pt \pgf@anchor@superellipse@west\else\pgf@anchor@superellipse@east\fi + \else % both are not zero + % save original direction + \pgf@xa=\pgf@x + \pgf@ya=\pgf@y + % make both positive, we're not looking at one quadrant + \ifdim\pgf@xa<0pt \pgf@x=-\pgf@x\fi + \ifdim\pgf@ya<0pt \pgf@y=-\pgf@y\fi + % save that point again + \pgfextract@process\externalpoint{}% + % we need to do the calculations without any transformations + % since we're using plots and \pgfpointborderrectangle + \pgftransformreset + \pgfintersectionofpaths{% + % from center to point on rectangle that encompasses superellipse + \pgf@relevantforpicturesizefalse + \pgfpathmoveto{\pgfpointorigin}% + \pgfpathlineto{\pgfpointborderrectangle{\externalpoint}{\radius}}% + }{% + \pgf@relevantforpicturesizefalse + \pgf@process{\radius} + \edef\xradius{\pgf@sys@tonumber\pgf@x}% + \edef\yradius{\pgf@sys@tonumber\pgf@y}% + \let\pgf@tempa\pgfutil@empty + \c@pgf@counta=\step + \pgfutil@loop + \ifnum\c@pgf@counta<90 + \pgfmathsuperellipseXY{\the\c@pgf@counta}{\xexponent}{\yexponent}{\xradius}{\yradius}% + \edef\pgf@temp{\noexpand\pgfplotstreampoint{\noexpand\pgfqpoint{\pgfmathresultX pt}{\pgfmathresultY pt}}}% + \pgfutil@append@macrotomacro\pgf@tempa\pgf@temp + \advance\c@pgf@counta by\step + \pgfutil@repeat + % we're only using curveto since closedcurve + % messes with our other path + \pgfplothandlercurveto + \pgfplotstreamstart + \pgfplotstreampoint{\pgfqpoint{\xradius pt}{0pt}}% east + \pgf@tempa + \pgfplotstreampoint{\pgfqpoint{0pt}{\yradius pt}}% north + \pgfplotstreamend + }% + \ifnum\pgfintersectionsolutions>0 % only if a solution was found + \pgf@process{\pgfpointintersectionsolution{1}}% + \else % otherwise take the border on the rectangle (close enough?) + \pgf@process{\pgfpointborderrectangle{\externalpoint}{\radius}}% + \fi + \ifdim\pgf@xa<0pt \pgf@x=-\pgf@x\fi + \ifdim\pgf@ya<0pt \pgf@y=-\pgf@y\fi + \pgf@process{\pgfpointadd{}{\centerpoint}}% + \fi + \fi + } +} +\def\pgfutil@prefix@macrotomacro#1#2{% + \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter% + #1\expandafter\expandafter\expandafter{\expandafter#2#1}} +\endinput diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.transformations.mirror.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.transformations.mirror.code.tex new file mode 100644 index 0000000000..4d962ccb1c --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/pgflibraryext.transformations.mirror.code.tex @@ -0,0 +1,96 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\def\pgftransformxmirror#1{ + \pgfmathparse{#1}% + \ifpgfmathunitsdeclared + \pgf@xa\pgfmathresult pt\relax + \multiply\pgf@xa2 + \pgftransformcm{-1}{0}{0}{1}{\pgfqpoint{\pgf@xa}{0pt}}% + \else + \pgftransformmirror{\pgfqpointxy{\pgfmathresult}{0}}{\pgfpointadd{\pgfqpointxy{\pgfmathresult}{0}}{\pgfqpointxy{0}{1}}}% + \fi +} +\def\pgftransformymirror#1{ + \pgfmathparse{#1}% + \ifpgfmathunitsdeclared + \pgf@ya\pgfmathresult pt\relax + \multiply\pgf@ya2 + \pgftransformcm{1}{0}{0}{-1}{\pgfqpoint{0pt}{\pgf@ya}}% + \else + \edef\pgf@marshal{\noexpand\pgftransformmirror{\noexpand\pgfqpointxy{0}{\pgfmathresult}}% + {\noexpand\pgfpointadd{\noexpand\pgfqpointxy{0}{\pgfmathresult}}{\noexpand\pgfqpointxy{1}{0}}}}% + \pgf@marshal + \fi} +\def\pgftransformmirror#1#2{% + \pgfextract@process\pgf@tempa{#1}% + \pgfpointnormalised{\pgfpointdiff{\pgf@tempa}{#2}}% + \pgf@xa=\pgf@sys@tonumber\pgf@y\pgf@x + \pgf@xb=\pgf@sys@tonumber\pgf@x\pgf@x + \pgf@yb=\pgf@sys@tonumber\pgf@y\pgf@y + \multiply\pgf@xa2 + \pgf@xc=-\pgf@yb\advance\pgf@xc\pgf@xb + \pgf@yc=-\pgf@xb\advance\pgf@yc\pgf@yb + \edef\pgf@temp{{\the\pgf@xc}{+\the\pgf@xa}{+\the\pgf@xa}{+\the\pgf@yc}}% + \expandafter\pgf@transformcm\pgf@temp{\pgf@tempa}% + \pgftransformshift{\pgfpointscale{-1}{\pgf@tempa}}% +} + +\def\pgfqtransformmirror#1{% + \pgfpointnormalised{#1}% + \pgf@xa=\pgf@sys@tonumber\pgf@y\pgf@x + \pgf@xb=\pgf@sys@tonumber\pgf@x\pgf@x + \pgf@yb=\pgf@sys@tonumber\pgf@y\pgf@y + \multiply\pgf@xa2 + \pgf@xc=-\pgf@yb\advance\pgf@xc\pgf@xb + \pgf@yc=-\pgf@xb\advance\pgf@yc\pgf@yb + \edef\pgf@temp{{\the\pgf@xc}{+\the\pgf@xa}{+\the\pgf@xa}{+\the\pgf@yc}}% + \expandafter\pgf@transformcm\pgf@temp{\pgfpointorigin}% +} + +% Using existant transformation (shift, rotate, yscale=-1, rotate back, shift back) +\def\pgftransformxMirror#1{ + \pgfmathparse{#1}% + \ifpgfmathunitsdeclared + \pgf@xa\pgfmathresult pt\relax + \multiply\pgf@xa2 + \pgftransformcm{-1}{0}{0}{1}{\pgfqpoint{\pgf@xa}{0pt}}% + \else + \pgftransformMirror{\pgfqpointxy{\pgfmathresult}{0}}{\pgfpointadd{\pgfqpointxy{\pgfmathresult}{0}}{\pgfqpointxy{0}{1}}}% + \fi +} +\def\pgftransformyMirror#1{ + \pgfmathparse{#1}% + \ifpgfmathunitsdeclared + \pgf@ya\pgfmathresult pt\relax + \multiply\pgf@ya2 + \pgftransformcm{1}{0}{0}{-1}{\pgfqpoint{0pt}{\pgf@ya}}% + \else + \edef\pgf@marshal{\noexpand\pgftransformMirror{\noexpand\pgfqpointxy{0}{\pgfmathresult}}% + {\noexpand\pgfpointadd{\noexpand\pgfqpointxy{0}{\pgfmathresult}}{\noexpand\pgfqpointxy{1}{0}}}}% + \pgf@marshal + \fi} + +\def\pgftransformMirror#1#2{% + \pgfextract@process\pgf@tempa{#1}% + \pgfmathanglebetweenpoints{\pgf@tempa}{#2}% + \let\pgf@temp\pgfmathresult + \pgftransformshift{\pgf@tempa}% + \pgftransformrotate{\pgf@temp}% + \pgftransformyscale{-1}% + \pgftransformrotate{-\pgf@temp}% + \pgftransformshift{\pgfqpointscale{-1}{\pgf@tempa}}% +} + +\def\pgfqtransformMirror#1{% + \pgfmathanglebetweenpoints{\pgfpointorigin}{#1}% + \let\pgf@temp\pgfmathresult + \pgftransformrotate{\pgf@temp}% + \pgftransformyscale{-1}% + \pgftransformrotate{-\pgf@temp}% +} +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.calendar-plus.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.calendar-plus.code.tex new file mode 100644 index 0000000000..195ecf9414 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.calendar-plus.code.tex @@ -0,0 +1,93 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\usetikzlibrary{calendar} +\pgfutil@usemodule{pgfcalendar-ext} + +% Shift between days + +\def\tikz@lib@cal@xshift{\pgfkeysvalueof{/tikz/day xshift}} +\def\tikz@lib@cal@yshift{\pgfkeysvalueof{/tikz/day yshift}} +\tikzset{day xshift/.initial=3ex,day yshift/.initial=3.5ex} + +% Shift between months + +\def\tikz@lib@cal@month@xshift{\pgfkeysvalueof{/tikz/month xshift}} +\def\tikz@lib@cal@month@yshift{\pgfkeysvalueof{/tikz/month yshift}} +\tikzset{month xshift/.initial=9ex,month yshift/.initial=9ex} + +% Internal option for storing the "width" of a calendar as a number of +% days + +\def\tikz@lib@cal@width{\pgfkeysvalueof{/tikz/tikz@lib@cal@width}} +\tikzset{tikz@lib@cal@width/.initial=1} + +% Weeks + +\def\tikzweekcode{\pgfkeysvalueof{/tikz/week code}} +\def\tikzweektext{\pgfkeysvalueof{/tikz/week text}} + +\tikzset{ + week code/.initial={% + \node[every week]{\pgfkeysvalueof{/tikz/week text}};}, + week text/.initial={\%n=}, + every week/.style=, + week label left/.style={ + every week/.append style={ + anchor=base east, + xshift=-1.25*\pgfkeysvalueof{/tikz/day xshift}}, + execute before day scope=% + \ifdate{Monday, equals=\pgfcalendarbeginiso}{\tikzweekcode}{}}} + +% +% Overwriting original \tikz@lib@cal@if@else@code +% +\def\tikz@lib@cal@if@else@code#1#2#3{% + \pgfutil@addto@macro\tikz@lib@cal@ifs{\ifdate{#1}{#2}{#3}}% + \tikz@lib@cal@scanner% +} + +% +% Overwriting original \tikz@lib@cal@stop +% +\def\tikz@lib@cal@stop{% + \pgftransformshift{\tikz@node@at}% + \expandafter\pgfcalendar\expandafter{\tikz@fig@name}{\tikz@lib@cal@start}{\tikz@lib@cal@end}% + {% + \tikz@before@day% + \scope% + \tikz@atbegin@day% + \let\pgfutil@addto@macro\pgfutil@secondoftwo + \tikz@lib@cal@ifs% + \tikzdaycode% + \tikz@atend@day% + \endscope% + \tikz@after@day% + }% + \endgroup% +} + +\def\pgfutil@addto@macro#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}} + +\pgfmathdeclarefunction{weeksinmonthofyear}{3}{% #1 = first weekday, #2 = month, #3 = year + \begingroup + \pgfmathlastdayinmonthofyear@{#2}{#3}% + \pgfmathadd@{#1}{\pgfmathresult}% + \pgfmathdivide@{\pgfmathresult}{7}% + \pgfmathceil@{\pgfmathresult}% + \pgfmathint@{\pgfmathresult}% + \pgfmathsmuggle\pgfmathresult + \endgroup +} +\pgfmathdeclarefunction{lastdayinmonthofyear}{2}{% #1 = month, #2 = year + \begingroup + \pgfcalendar@getlastYMX{#2}{#1}{\pgfutil@tempcnta}% + \edef\pgfmathresult{\the\pgfutil@tempcnta}% + \pgfmathsmuggle\pgfmathresult + \endgroup +} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.misc.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.misc.code.tex new file mode 100644 index 0000000000..830b3513e5 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.misc.code.tex @@ -0,0 +1,251 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +%% full arc +%% https://tex.stackexchange.com/a/144297/16595 +%% The postfix operator R is added to PGFmath, +%% it allows the use of angular segments. +%% full arc = 10 makes it so that +%% 1R = 36° +%% 2R = 72° +%% … +%% 10R = 360° +%% Calling the full arc key with an empty value +%% makes 1R = 1° +\pgfset{full arc/.code=% + \def\pgf@temp{#1}% + \ifx\pgfutil@empty\pgf@temp + \let\pgfmath@fullarc@factor\pgfutil@empty + \else + \pgfmathsetmacro\pgfmath@fullarc@factor{360/(#1)}% + \fi,full arc=} +\pgfmathdeclareoperator{R}{full arc}{1}{postfix}{950} +\pgfmathdeclarefunction{full arc}{1}{% + \begingroup + \pgfmath@x=#1pt\relax + \ifx\pgfmath@fullarc@factor\pgfutil@empty\else + \pgfmath@x\pgfmath@fullarc@factor\pgfmath@x + \fi + \pgfmath@returnone\pgfmath@x + \endgroup} + +%% foreach +%% http://tex.stackexchange.com/a/126418/16595 +%% instead of \foreach \var in {start, start + delta, ..., end} +%% this allows to use \foreach[use int={start to end step delta}] without(!) a list in {} +%% the values start, end and delta are evaluated by PGFmath at the start of the loop. +%% In addition to use int, there's also use float. +\newif\iftikzext@pgf@foreach@no@list +\pgfqkeys{/pgf/foreach}{ + use int/.code={% + \tikzext@pgf@foreach@no@list@parse@to\pgfmathtruncatemacro#1\pgffor@stop + }, + use float/.code={% + \tikzext@pgf@foreach@no@list@parse@to\pgfmathsetmacro#1\pgffor@stop + } +} + +\def\tikzext@pgf@foreach@no@list@parse@to#1#2to#3\pgffor@stop{% + \tikzext@pgf@foreach@no@listtrue + #1\foreachStart{#2}% + \pgfutil@in@{step}{#3} + \ifpgfutil@in@ + \tikzext@pgf@foreach@no@list@parse@step{#1}#3\pgffor@stop + \else + \tikzext@pgf@foreach@no@list@parse@step{#1}#3step1\pgffor@stop + \fi + \edef\tikzext@pgf@foreach@no@list@list{\foreachStart,\foreachSecond,...,\foreachEnd}% +} +\def\tikzext@pgf@foreach@no@list@parse@step#1#2step#3\pgffor@stop{% + #1\foreachEnd{#2}% + #1\foreachSecond{\foreachStart+#3}% +} +\def\pgffor@vars{% manually extended, better etoolbox + \pgfutil@ifnextchar i{\pgffor@@vars@end}{% + \pgfutil@ifnextchar[{\pgffor@@vars@opt}{%] + \pgfutil@ifnextchar/{\pgffor@@vars@slash@gobble}{% + \iftikzext@pgf@foreach@no@list\expandafter\pgfutil@firstoftwo\else + \expandafter\pgfutil@secondoftwo\fi + {\tikzext@pgf@foreach@no@listfalse\pgffor@macro@list\tikzext@pgf@foreach@no@list@list} + {\pgffor@@vars}}}}}% + +%% Handlers +%% .pgfmath evaluates values given to keys in PGFmath before handing them over. +%% .pgfmath int truncates the result +%% .pgfmath strcat concatenates the given values +\pgfkeys{/handlers/.pgfmath/.code=\pgfmathparse{#1}\expandafter\pgfkeys@exp@call\expandafter{\pgfmathresult}} +\pgfkeys{/handlers/.pgfmath int/.code=\pgfmathint{#1}\expandafter\pgfkeys@exp@call\expandafter{\pgfmathresult}} +\pgfkeys{/handlers/.pgfmath strcat/.code=\pgfmathstrcat{#1}\expandafter\pgfkeys@exp@call\expandafter{\pgfmathresult}} + +%% http://tex.stackexchange.com/a/144187/16595 +%% key/.List={(point-1),(point-2),(point-...),(point-6)} will call +%% key=(point-1)(point-2)(point-3)(point-4)(point-5),(point-6) +\pgfkeys{/handlers/.List/.code={% + \let\pgfkeys@global@temp\pgfutil@empty + \foreach \pgfkeys@temp in{#1}{ + \ifx\pgfkeys@global@temp\pgfutil@empty + \global\let\pgfkeys@global@temp\pgfkeys@temp + \else + \expandafter\pgfutil@g@addto@macro\expandafter\pgfkeys@global@temp\expandafter + {\pgfkeys@temp}% + \fi}% + \expandafter\pgfkeys@exp@call\expandafter{\pgfkeys@global@temp}}} + +%% PGFmath +%% strrepeat("x", 5) = "xxxxx" +\pgfmathdeclarefunction{strrepeat}{2}{% + \begingroup\pgfmathint{#2}\pgfmath@count\pgfmathresult + \let\pgfmathresult\pgfutil@empty + \pgfutil@loop\ifnum\pgfmath@count>0\relax + \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult#1}% + \advance\pgfmath@count-1\relax + \pgfutil@repeat\pgfmath@smuggleone\pgfmathresult\endgroup} + +%% isInString("foo", "foobar") = true (= 1) +%% isInString("boo", "foobar") = false (= 0) +\pgfmathdeclarefunction{isInString}{2}{% + \pgfutil@in@{#1}{#2}% + \ifpgfutil@in@\def\pgfmathresult{1}\else\def\pgfmathresult{0}\fi} + +%% strcat("foo", "bar") = "foobar" (can have more than two parameters) +\pgfutil@IfUndefined{pgfmathstrcat@}{ + \pgfmathdeclarefunction{strcat}{...}{% + \begingroup + \let\pgfmathresult\pgfutil@empty + \pgfmathstrcat@@#1\pgfmath@stop} + \def\pgfmathstrcat@@#1{% + \ifx\pgfmath@stop#1% + \def\pgfmath@next{\pgfmath@smuggleone\pgfmathresult\endgroup} + \else + \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult#1}% + \let\pgfmath@next\pgfmathstrcat@@ + \fi + \pgfmath@next} +}{} + +% http://tex.stackexchange.com/questions/244569/bounding-lines-around-tax-nodes/244619#244619 +\pgfmathdeclarefunction{atanXY}{2}{\pgfmathatantwo@{#2}{#1}} +\pgfmathdeclarefunction{atanYX}{2}{\pgfmathatantwo@{#1}{#2}} + +%% http://tex.stackexchange.com/a/132939/16595 +\tikzset{ + @edges through/.code={{{% three braces to protect \pgfeov + \pgfutil@ifnextchar[{\pgfkeysvalueof{/tikz/@@edges through/.@cmd}} + {\pgfkeysvalueof{/tikz/@@edges through/.@cmd}[]}#1\pgfeov}}}, + @@edges through/.style args={[#1]#2}{/tikz/insert path={edge[#1] (#2) (#2)}}, + edges through/.style={/tikz/@edges through/.list={#1}}} +\tikzset{ + @edges to/.code={{{% three braces to protect \pgfeov + \pgfutil@ifnextchar[{\pgfkeysvalueof{/tikz/@@edges to/.@cmd}} + {\pgfkeysvalueof{/tikz/@@edges to/.@cmd}[]}#1\pgfeov}}}, + @@edges to/.style args={[#1]#2}{/tikz/insert path={edge[#1] (#2)}}, + edges to/.style={/tikz/@edges to/.list={#1}}} +\tikzset{ + @tos to/.code={{{% three braces to protect \pgfeov + \pgfutil@ifnextchar[{\pgfkeysvalueof{/tikz/@@tos to/.@cmd}} + {\pgfkeysvalueof{/tikz/@@tos to/.@cmd}[]}#1\pgfeov}}}, + @@tos to/.style args={[#1]#2}{/tikz/insert path={to[#1] (#2)}}, + tos to/.style={/tikz/@tos to/.list={#1}}} + + +\pgfmathdeclarefunction{distancebetween}{2}{% only coordinates/nodes + \begingroup + \pgfpointdiff{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}}% + \edef\pgfmath@temp{{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}}% + \expandafter\pgfmathveclen@\pgfmath@temp + \pgfmath@smuggleone\pgfmathresult + \endgroup} +\pgfmathdeclarefunction{qdistancebetween}{1}{% only coordinates/nodes + \begingroup + \pgfpointdiff{\pgfpointorigin}{\pgfpointanchor{#1}{center}}% + \edef\pgfmath@temp{{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}}% + \expandafter\pgfmathveclen@\pgfmath@temp + \pgfmath@smuggleone\pgfmathresult + \endgroup} + +\pgfmathdeclarefunction{qanglebetween}{1}{% + \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfpointanchor{#1}{center}}} + +\pgfmathdeclarefunction{anglebetween}{2}{% + \pgfmathanglebetweenpoints{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}}} + +\pgfmathdeclarefunction{isEmpty}{1}{% + \begingroup + \edef\pgfmath@temp{#1}% + \pgfutil@ifxempty\pgfmath@temp{\def\pgfmathresult{1}}{\def\pgfmathresult{0}}% + \pgfmath@smuggleone\pgfmathresult + \endgroup} + +\pgfqkeys{/utils}{ + if/.code n args=3{% + \pgfmathparse{#1}% + \ifdim\pgfmathresult pt=0pt + \expandafter\pgfutil@firstoftwo + \else + \expandafter\pgfutil@secondoftwo + \fi + {\pgfkeysalso{#3}}% + {\pgfkeysalso{#2}}}, + IF/.code args={(#1)#2}{% + \pgfmathparse{#1}% + \pgfutil@in@{else}{#2}% + \ifpgfutil@in@ + \expandafter\pgfutil@firstoftwo + \else + \expandafter\pgfutil@secondoftwo + \fi + {\tikzext@misc@handle@else#2\pgf@stop}{\tikzext@misc@handle@else#2else\pgf@stop}% + }, + TeX/if/.code n args={4}{% + \if#1#2\expandafter\pgfutil@firstoftwo\else\expandafter\pgfutil@secondoftwo\fi + {\pgfkeysalso{#3}}{\pgfkeysalso{#4}}% + }, + TeX/ifnum/.code n args={3}{% + \ifnum#1\relax\expandafter\pgfutil@firstoftwo\else\expandafter\pgfutil@secondoftwo\fi + {\pgfkeysalso{#2}}{\pgfkeysalso{#3}}% + }, + TeX/ifdim/.code n args={3}{% + \ifdim#1\relax\expandafter\pgfutil@firstoftwo\else\expandafter\pgfutil@secondoftwo\fi + {\pgfkeysalso{#2}}{\pgfkeysalso{#3}}% + }, + TeX/ifx/.code n args={4}{% + \ifx#1#2\relax\expandafter\pgfutil@firstoftwo\else\expandafter\pgfutil@secondoftwo\fi + {\pgfkeysalso{#3}}{\pgfkeysalso{#4}}% + }, + TeX/ifempty/.code n args={3}{% + \edef\pgfkeys@temp{#1}% + \pgfutil@ifxempty\pgfkeys@temp{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}% + }, + tex/.search also=/utils/TeX, +} +\def\tikzext@misc@handle@else#1else#2\pgf@stop{% + \ifdim\pgfmathresult pt=0pt + \expandafter\pgfutil@firstoftwo + \else + \expandafter\pgfutil@secondoftwo + \fi + {\pgfkeysalso{#2}}% + {\pgfkeysalso{#1}}} + +\pgfset{ + declare constant/.code={% + \let\pgfmathdeclareconstant@@@\pgfutil@empty + \pgfkeysvalueof{/pgf/declare function/execute at begin function}% + \pgfmathdeclareconstant@#1@=@;\pgf@stop + \pgfkeysvalueof{/pgf/declare function/execute at end function}% + \pgfmathdeclareconstant@@@ + }} +\def\pgfmathdeclareconstant@{% + \pgfutil@ifnextchar x\pgfmathdeclareconstant@@\pgfmathdeclareconstant@@ +} +\def\pgfmathdeclareconstant@@#1=#2;#3\pgf@stop{% + \edef\pgfmath@local@temp{#1}% + \pgfutil@ifx\pgfmath@local@temp\pgfmath@local@at{}{% + \pgfutil@g@addto@macro\pgfmathdeclareconstant@@@{\pgfmathdeclarepseudoconstant{#1}{\def\pgfmathresult{#2}}}% + \pgfmathdeclareconstant@#3\pgf@stop + }% +} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.node-families.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.node-families.code.tex new file mode 100644 index 0000000000..c0ecda441a --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.node-families.code.tex @@ -0,0 +1,339 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\def\tikzext@nf@align@left#1{} +\def\tikzext@nf@align@center#1{\kern.5#1} +\def\tikzext@nf@align@right#1{\kern#1} + +\pgfqkeys{/tikz/node family}{ + width/.initial=, + width/.append style={/pgf/minimum width=nf_width}, + height/.initial=, + height/.append style={/pgf/minimum height=nf_height}, + size/.code=\pgfqkeys{/tikz/node family}{width={#1},height={#1}}, + text depth/.initial=, + text height/.initial=, + text width align/.is choice, + text width align/left/.code=\let\tikzext@nf@align@action\tikzext@nf@align@left, + text width align/center/.code=\let\tikzext@nf@align@action\tikzext@nf@align@center, + text width align/right/.code=\let\tikzext@nf@align@action\tikzext@nf@align@right, + text width align=center, + text width/.initial=, + text/.code=\pgfqkeys{/tikz/node family}{text depth={#1},text height={#1},text width={#1}}, + prefix/.initial=\pgfpictureid-, +} +\tikzset{node family/.code=\pgfqkeys{/tikz/node family}{#1}} + +% #1 = family type + name +\def\tikzext@nf@save#1{% + %\errmessage{#1}% + \immediate\write\pgfutil@auxout{% + \noexpand\expandafter\noexpand\gdef\noexpand\csname tikzext@nf@#1@previous\endcsname + {\csname tikzext@nf@#1@next\endcsname}% + }% +} + +% #1 = value to set +% #2 = family type +% #3 = return dimen +\def\tikzext@nf@getandset#1#2#3{% + % what's our family's name? + #3=0pt\relax + \pgfkeysgetvalue{/tikz/node family/#2}\tikzext@nf@familyname + \pgfutil@ifxempty\tikzext@nf@familyname{% no family to deal with + }{% + \edef\tikzext@nf@familyname{\pgfkeysvalueof{/tikz/node family/prefix}\tikzext@nf@familyname}% + % we need to save the value for the next run + \pgfutil@IfUndefined{tikzext@nf@#2@\tikzext@nf@familyname @next}{% + % first time: define first value and install hook at end of picture + \expandafter\xdef\csname tikzext@nf@#2@\tikzext@nf@familyname @next\endcsname{#1}% + \edef\tikz@temp{\noexpand\tikzext@nf@save{#2@\tikzext@nf@familyname}}% + %\expandafter\AtVeryEndDocument\expandafter{\tikz@temp}% + \expandafter\pgfutil@g@addto@macro\expandafter\tikz@atend@picture\expandafter{\tikz@temp}% + }{% + \ifdim\csname tikzext@nf@#2@\tikzext@nf@familyname @next\endcsname<#1\relax + \expandafter\xdef\csname tikzext@nf@#2@\tikzext@nf@familyname @next\endcsname{#1}% + \fi + }% + \pgfutil@IfUndefined{tikzext@nf@#2@\tikzext@nf@familyname @previous}{% first run, ignore + }{% set previous value + #3=\csname tikzext@nf@#2@\tikzext@nf@familyname @previous\endcsname\relax + }% + }% +} + +\pgfdeclareshape{Rectangle}{% + \savedanchor\northeast{% + % Calculate x + % + % First, is width < minimum width? + \pgf@x=\the\wd\pgfnodeparttextbox% + \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}% + \advance\pgf@x by 2\pgf@xc% + % Qrr: family width + \tikzext@nf@getandset{\the\pgf@x}{width}{\pgfutil@tempdima}% + \ifdim\pgf@x<\pgfutil@tempdima + \pgf@x=\pgfutil@tempdima + \fi + % + \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}% + \ifdim\pgf@x<\pgf@xb% + % yes, too small. Enlarge... + \pgf@x=\pgf@xb% + \fi% + % Now, calculate right border: .5\wd\pgfnodeparttextbox + .5 \pgf@x + outer sep + \pgf@x=.5\pgf@x% + \advance\pgf@x by.5\wd\pgfnodeparttextbox% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}% + \advance\pgf@x by\pgf@xa% + % Calculate y + % + % First, is height+depth < minimum height? + \pgf@y=\ht\pgfnodeparttextbox% + \advance\pgf@y by\dp\pgfnodeparttextbox% + \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}% + \advance\pgf@y by 2\pgf@yc% + % Qrr: family height + \tikzext@nf@getandset{\the\pgf@y}{height}{\pgfutil@tempdima}% + \ifdim\pgf@y<\pgfutil@tempdima + \pgf@y=\pgfutil@tempdima + \fi + % + \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}% + \ifdim\pgf@y<\pgf@yb% + % yes, too small. Enlarge... + \pgf@y=\pgf@yb% + \fi% + % Now, calculate upper border: .5\ht-.5\dp + .5 \pgf@y + outer sep + \pgf@y=.5\pgf@y% + \advance\pgf@y by-.5\dp\pgfnodeparttextbox% + \advance\pgf@y by.5\ht\pgfnodeparttextbox% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% + \advance\pgf@y by\pgf@ya% + }% + + \savedanchor\southwest{% + % Calculate x + % + % First, is width < minimum width? + \pgf@x=\wd\pgfnodeparttextbox% + \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}% + \advance\pgf@x by 2\pgf@xc% + % Qrr: family width + \tikzext@nf@getandset{\the\pgf@x}{width}{\pgfutil@tempdima}% + \ifdim\pgf@x<\pgfutil@tempdima + \pgf@x=\pgfutil@tempdima + \fi + % + \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}% + \ifdim\pgf@x<\pgf@xb% + % yes, too small. Enlarge... + \pgf@x=\pgf@xb% + \fi% + % Now, calculate left border: .5\wd\pgfnodeparttextbox - .5 \pgf@x - outer sep + \pgf@x=-.5\pgf@x% + \advance\pgf@x by.5\wd\pgfnodeparttextbox% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}% + \advance\pgf@x by-\pgf@xa% + % Calculate y + % + % First, is height+depth < minimum height? + \pgf@y=\ht\pgfnodeparttextbox% + \advance\pgf@y by\dp\pgfnodeparttextbox% + \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}% + \advance\pgf@y by 2\pgf@yc% + % Qrr: family height + \tikzext@nf@getandset{\the\pgf@y}{height}{\pgfutil@tempdima}% + \ifdim\pgf@y<\pgfutil@tempdima + \pgf@y=\pgfutil@tempdima + \fi + % + \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}% + \ifdim\pgf@y<\pgf@yb% + % yes, too small. Enlarge... + \pgf@y=\pgf@yb% + \fi% + % Now, calculate upper border: .5\ht-.5\dp - .5 \pgf@y - outer sep + \pgf@y=-.5\pgf@y% + \advance\pgf@y by-.5\dp\pgfnodeparttextbox% + \advance\pgf@y by.5\ht\pgfnodeparttextbox% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% + \advance\pgf@y by-\pgf@ya% + }% + \inheritbackgroundpath[from=rectangle] + \inheritbeforebackgroundpath[from=rectangle] + \inheritbehindforegroundpath[from=rectangle] + \inheritforegroundpath[from=rectangle] + \inheritbeforeforegroundpath[from=rectangle] + \inheritanchor[from=rectangle]{center} + \inheritanchor[from=rectangle]{mid} + \inheritanchor[from=rectangle]{base} + \inheritanchor[from=rectangle]{north} + \inheritanchor[from=rectangle]{south} + \inheritanchor[from=rectangle]{west} + \inheritanchor[from=rectangle]{mid west} + \inheritanchor[from=rectangle]{base west} + \inheritanchor[from=rectangle]{north west} + \inheritanchor[from=rectangle]{south west} + \inheritanchor[from=rectangle]{east} + \inheritanchor[from=rectangle]{mid east} + \inheritanchor[from=rectangle]{base east} + \inheritanchor[from=rectangle]{north east} + \inheritanchor[from=rectangle]{south east} + \inheritanchorborder[from=rectangle] +} + +\pgfdeclareshape{Circle}{% + \savedanchor\centerpoint{% tex/generic/pgf/modules/pgfmoduleshapes.code.tex + \pgf@x=.5\wd\pgfnodeparttextbox + \pgf@y=.5\ht\pgfnodeparttextbox + \advance\pgf@y by-.5\dp\pgfnodeparttextbox + }% + \saveddimen\radius{% tex/generic/pgf/modules/pgfmoduleshapes.code.tex + % Calculate ``height radius'' + \pgf@ya=.5\ht\pgfnodeparttextbox + \advance\pgf@ya by.5\dp\pgfnodeparttextbox + \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/inner ysep}}% + \advance\pgf@ya by\pgf@yb + % Calculate ``width radius'' + \pgf@xa=.5\wd\pgfnodeparttextbox + \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/inner xsep}}% + \advance\pgf@xa by\pgf@xb + % Calculate length of radius vector: + \pgf@process{\pgfpointnormalised{\pgfqpoint{\pgf@xa}{\pgf@ya}}}% + \ifdim\pgf@x>\pgf@y + \c@pgf@counta=\pgf@x + \ifnum\c@pgf@counta=0\relax + \else + \divide\c@pgf@counta by 255\relax + \pgf@xa=16\pgf@xa\relax + \divide\pgf@xa by\c@pgf@counta + \pgf@xa=16\pgf@xa\relax + \fi + \else + \c@pgf@counta=\pgf@y + \ifnum\c@pgf@counta=0\relax + \else + \divide\c@pgf@counta by 255\relax + \pgf@ya=16\pgf@ya\relax + \divide\pgf@ya by\c@pgf@counta + \pgf@xa=16\pgf@ya\relax + \fi + \fi + \pgf@x=\pgf@xa% + % Qrr: check for families + \tikzext@nf@getandset{\the\dimexpr2\pgf@x\relax}{width}{\pgfutil@tempdima}% + \tikzext@nf@getandset{\the\dimexpr2\pgf@x\relax}{height}{\pgfutil@tempdimb}% + % Qrr: and adjust like minimum width and minimum height + \ifdim\pgf@x<.5\pgfutil@tempdima + \pgf@x=.5\pgfutil@tempdima + \fi + \ifdim\pgf@x<.5\pgfutil@tempdimb + \pgf@x=.5\pgfutil@tempdimb + \fi + % If necessary, adjust radius so that the size requirements are met: + \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}% + \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}% + \ifdim\pgf@x<.5\pgf@xb + \pgf@x=.5\pgf@xb + \fi + \ifdim\pgf@x<.5\pgf@yb + \pgf@x=.5\pgf@yb + \fi + % Now, add larger of outer separations. + \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% + \ifdim\pgf@xb<\pgf@yb + \advance\pgf@x by\pgf@yb + \else + \advance\pgf@x by\pgf@xb + \fi + }% + \inheritbackgroundpath[from=circle] + \inheritbeforebackgroundpath[from=circle] + \inheritbehindforegroundpath[from=circle] + \inheritforegroundpath[from=circle] + \inheritbeforeforegroundpath[from=circle] + \inheritanchor[from=circle]{center} + \inheritanchor[from=circle]{mid} + \inheritanchor[from=circle]{base} + \inheritanchor[from=circle]{north} + \inheritanchor[from=circle]{south} + \inheritanchor[from=circle]{west} + \inheritanchor[from=circle]{mid west} + \inheritanchor[from=circle]{base west} + \inheritanchor[from=circle]{north west} + \inheritanchor[from=circle]{south west} + \inheritanchor[from=circle]{east} + \inheritanchor[from=circle]{mid east} + \inheritanchor[from=circle]{base east} + \inheritanchor[from=circle]{north east} + \inheritanchor[from=circle]{south east} + \inheritanchorborder[from=circle] +} + +\def\pgfutil@prefixto@macro#1#2{% + \def\pgf@temp{#2}% + \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter#1% + \expandafter\expandafter\expandafter{\expandafter\pgf@temp#1}% +} + +\pgfqkeys{/tikz/node family}{ + setup shape/.code={% + \expandafter\pgfutil@prefixto@macro\csname pgf@sh@s@#1\endcsname{% + \tikzext@nf@getandset{\the\wd\pgfnodeparttextbox}{text width}{\pgfutil@tempdima}% + \ifdim\wd\pgfnodeparttextbox<\pgfutil@tempdima + \pgfutil@tempdimb=\pgfutil@tempdima + \advance\pgfutil@tempdimb-\wd\pgfnodeparttextbox + \setbox\pgfnodeparttextbox=\hbox to \pgfutil@tempdima{\tikzext@nf@align@action\pgfutil@tempdimb\unhbox\pgfnodeparttextbox}% + \fi + \tikzext@nf@getandset{\the\dp\pgfnodeparttextbox}{text depth}{\pgfutil@tempdima}% + \ifdim\dp\pgfnodeparttextbox<\pgfutil@tempdima + \dp\pgfnodeparttextbox=\pgfutil@tempdima + \fi + \tikzext@nf@getandset{\the\ht\pgfnodeparttextbox}{text height}{\pgfutil@tempdima}% + \ifdim\ht\pgfnodeparttextbox<\pgfutil@tempdima + \ht\pgfnodeparttextbox=\pgfutil@tempdima + \fi + }% + }, + setup shape/.list={rectangle,circle,Rectangle,Circle} +} + +%% nf functions +\def\tikzext@nf@function@default{{\the\pgf@x}{\the\pgf@y}} +\def\tikzext@nf@function@default@double{{\the\dimexpr2\pgf@x\relax}{\the\dimexpr2\pgf@y\relax}} +\def\tikzext@nf@function@circle{{\the\pgf@x}{\the\pgf@x}} +\def\tikzext@nf@function@circle@double{{\the\dimexpr2\pgf@x\relax}{\the\dimexpr2\pgf@x\relax}} + +\pgfmathdeclarefunction{nf_width}{0}{% + \begingroup + \pgfutil@IfUndefined{tikzext@nf@function@\pgf@sm@shape@name}{% + \let\tikzext@nf@function\tikzext@nf@function@default + }{% + \pgfutil@IfUndefined{tikzext@nf@function@\pgf@sm@shape@name @extra}{}{\csname tikzext@nf@function@\pgf@sm@shape@name @extra\endcsname}% + \expandafter\let\expandafter\tikzext@nf@function\csname tikzext@nf@function@\pgf@sm@shape@name\endcsname + }% + \tikzext@nf@getandset{\expandafter\pgfutil@firstoftwo\tikzext@nf@function}{width}{\pgfutil@tempdima}% + \edef\pgfmathresult{\pgf@sys@tonumber\pgfutil@tempdima}% + \pgfmath@smuggleone\pgfmathresult + \endgroup +} +\pgfmathdeclarefunction{nf_height}{0}{% + \begingroup + \pgfutil@IfUndefined{tikzext@nf@function@\pgf@sm@shape@name}{% + \let\tikzext@nf@function\tikzext@nf@function@default + }{% + \pgfutil@IfUndefined{tikzext@nf@function@\pgf@sm@shape@name @extra}{}{\csname tikzext@nf@function@\pgf@sm@shape@name @extra\endcsname}% + \expandafter\let\expandafter\tikzext@nf@function\csname tikzext@nf@function@\pgf@sm@shape@name\endcsname + }% + \tikzext@nf@getandset{\expandafter\pgfutil@secondoftwo\tikzext@nf@function}{height}{\pgfutil@tempdima}% + \edef\pgfmathresult{\pgf@sys@tonumber\pgfutil@tempdima}% + \pgfmath@smuggleone\pgfmathresult + \endgroup +} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.node-families.shapes.geometric.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.node-families.shapes.geometric.code.tex new file mode 100644 index 0000000000..58384960a8 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.node-families.shapes.geometric.code.tex @@ -0,0 +1,38 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\usetikzlibrary{ext.node-families,shapes.geometric} + +\let\tikzext@nf@function@ellipse \tikzext@nf@function@default@double +\let\tikzext@nf@function@star \tikzext@nf@function@circle +\let\tikzext@nf@function@diamond \tikzext@nf@function@default@double +\let\tikzext@nf@function@star \tikzext@nf@function@circle@double +\expandafter\let\csname tikzext@nf@function@regular polygon\endcsname + \tikzext@nf@function@circle@double +\let\tikzext@nf@function@trapezium\tikzext@nf@function@default@double +\def\tikzext@nf@function@semicircle {{\the\dimexpr2\pgf@x\relax}{\the\pgf@x}} +\expandafter\def\csname tikzext@nf@function@isosceles triangle\endcsname + {{\the\dimexpr2\pgf@ya\relax}{\the\pgf@xa}} +\def\tikzext@nf@function@kite {{\the\dimexpr2\pgf@xa\relax}{\the\dimexpr\pgf@ya+\pgf@yb\relax}} +\def\tikzext@nf@function@dart {{\the\dimexpr2\pgf@ya\relax}{\the\pgf@xb}} +\expandafter\def\csname tikzext@nf@function@circular sector\endcsname{{\the\pgf@xc}{\the\pgf@xa}} +\def\tikzext@nf@function@cylinder{{\the\dimexpr2\pgfutil@tempdimb\relax}{\the\pgf@x}} + +\tikzset{node family/setup shape/.list={ + ellipse, + star, + diamond, + regular polygon, + trapezium, + semicircle, + isosceles triangle, + kite, + dart, + circular sector, + cylinder +}} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.paths.arcto.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.paths.arcto.code.tex new file mode 100644 index 0000000000..c75f31b60a --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.paths.arcto.code.tex @@ -0,0 +1,326 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\tikzset{ + arc to/.code=\pgfqkeys{/tikz/arc to}{#1}, + arc to={ + counter clockwise/.code=\pgfkeyssetvalue{/tikz/arc to/ccw flag}{1}, + clockwise/.code=\pgfkeyssetvalue{/tikz/arc to/ccw flag}{0}, + x radius/.code=\pgfkeyssetvalue{/tikz/x radius}{#1}, + y radius/.code=\pgfkeyssetvalue{/tikz/y radius}{#1}, + radius/.code=\pgfkeyssetvalue{/tikz/x radius}{#1}\pgfkeyssetvalue{/tikz/y radius}{#1}, + large/.code=\pgfkeyssetvalue{/tikz/arc to/large flag}{1}, + small/.code=\pgfkeyssetvalue{/tikz/arc to/large flag}{0}, + % defaults + rotate/.initial=0, counter clockwise, small, + counter clockwise/.value forbidden, + clockwise/.value forbidden, + large/.value forbidden, + small/.value forbidden}} +\def\tikz@arcA rc{\pgfutil@ifnextchar t% + {\tikz@flush@moveto\expandafter\expandafter\expandafter\tikz@arcB@cont\expandafter\pgfutil@gobble\pgfutil@gobble} + {\tikz@flush@moveto\tikz@arc@cont}} +\def\tikz@arcB@cont{% + \pgfutil@ifnextchar[\tikz@@do@arcB{ + \advance\tikz@expandcount by -10\relax% go down quickly + \ifnum\tikz@expandcount<0\relax% + \def\@next{\tikz@@do@arcB[]}% + \else% + \def\@next{\expandafter\tikz@arcB@cont}% + \fi% + \@next}}% +\def\tikz@@do@arcB[#1]{% + \def\tikz@arcB@options{#1}% + \tikz@do@@arcB} +\def\tikz@do@@arcB{% + \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@do@@arcB} + {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikz@do@@arcB} + {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikz@do@@arcB} + {\tikz@scan@one@point\tikz@do@arcB}}}} + +\def\tikz@do@arcB#1{% + \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}} + \tikz@make@last@position{#1}% + \edef\tikz@timer@end{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \iftikz@shapeborder + \edef\tikz@moveto@waiting{\tikz@shapeborder@name}% + \fi + \begingroup + \tikzset{every arc/.try,every arc to/.try,arc to/.expand once=\tikz@arcB@options}% + \pgfmathsetmacro\tikz@arc@x{\pgfkeysvalueof{/tikz/x radius}}% + \ifpgfmathunitsdeclared + \pgfmathsetmacro\tikz@arc@y{\pgfkeysvalueof{/tikz/y radius}}% + \ifpgfmathunitsdeclared + \tikzext@pgfpatharcto{\tikz@arc@x pt}{\tikz@arc@y pt} + {\pgfkeysvalueof{/tikz/arc to/rotate}}{\pgfkeysvalueof{/tikz/arc to/large flag}} + {\pgfkeysvalueof{/tikz/arc to/ccw flag}}{#1}% + \else + \tikzerror{You cannot mix dimensions and dimension values in an arc}% + \fi + \else + \pgfmathsetmacro\tikz@arc@y{\pgfkeysvalueof{/tikz/y radius}}% + \ifpgfmathunitsdeclared + \tikzerror{You cannot mix dimensions and dimension values in an arc}% + \else + \pgf@process{\pgfpointxy{\tikz@arc@x}{0}}% + \pgfmathveclen@{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}% + \let\tikz@arc@x\pgfmathresult + \pgf@process{\pgfpointxy{0}{\tikz@arc@y}}% + \pgfmathveclen@{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}% + \let\tikz@arc@y\pgfmathresult + \tikzext@pgfpatharcto{+\tikz@arc@x pt}{+\tikz@arc@y pt} + {\pgfkeysvalueof{/tikz/arc to/rotate}}{\pgfkeysvalueof{/tikz/arc to/large flag}} + {\pgfkeysvalueof{/tikz/arc to/ccw flag}}{#1}% + \fi + \fi + \endgroup + % check whether \pgf@marshall starts with \pgfpathlineto + \pgfutil@ifxempty\pgf@marshal{}{% + \edef\tikz@temp{\expandafter\expandafter\expandafter\noexpand\expandafter\pgfutil@firstgobblerest\pgf@marshal\relax}% + \expandafter\let\expandafter\tikz@temp\tikz@temp + \pgfutil@ifx\tikz@temp\pgfpathlineto{}{% + % getting rid of \pgfpatharcaxes inside \pgf@marshal + \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@marshal + \expandafter\expandafter\expandafter{\expandafter\pgfutil@gobble\pgf@marshal}% + % extracting the other four values needed for the timer + \edef\tikz@timer@start@angle{\expandafter\pgfutil@firstoffour\pgf@marshal}% + \edef\tikz@timer@end@angle{\expandafter\pgfutil@secondoffour\pgf@marshal}% + \pgfextract@process\tikz@timer@zero@axis{\expandafter\pgfutil@thirdoffour\pgf@marshal}% + \pgfextract@process\tikz@timer@ninety@axis{\expandafter\pgfutil@fourthoffour\pgf@marshal}% + % + \let\tikz@timer=\tikz@timer@arc + }% + }% + \tikz@scan@next@command +} +\def\pgfutil@firstoffour#1#2#3#4{#1} +\def\pgfutil@secondoffour#1#2#3#4{#2} +\def\pgfutil@thirdoffour#1#2#3#4{#3} +\def\pgfutil@fourthoffour#1#2#3#4{#4} +\def\pgfutil@firstgobblerest#1#2\relax{#1} + +% original from pgfcorepathconstruct.code.tex +\def\tikzext@pgfpatharcto#1#2#3#4#5#6{% + {% + % The following code is based on the transformation described in svg + % 1.1 specification Section F.6.5 + % + % Step 1: store the simple parameters (xa=x1 since TeX does not + % allow numbers in names) + % + \pgfmathsetmacro\pgf@arcto@rx{abs(#1)}% + \pgfmathsetmacro\pgf@arcto@ry{abs(#2)}% + \ifdim\pgf@arcto@rx pt=0pt% special rule: zero radius=straight line + \gdef\pgf@marshal{\pgfpathlineto{#6}}% + \else + \ifdim\pgf@arcto@ry pt=0pt% special rule: zero radius=straight line + \gdef\pgf@marshal{\pgfpathlineto{#6}}% + \else + \pgfmathsetmacro\pgf@arcto@phi{#3}% + \pgfmathsetmacro\pgf@arcto@fA{#4}% + \ifdim\pgf@arcto@fA pt=0pt + \else + \pgfmathsetmacro\pgf@arcto@fA{1.0}% Special rule: every non-zero value is 1. + \fi + \pgfmathsetmacro\pgf@arcto@fS{#5}% + \ifdim\pgf@arcto@fS pt=0pt + \else + \pgfmathsetmacro\pgf@arcto@fS{1.0}% Special rule: every non-zero value is 1. + \fi + \pgf@process{#6}% + \edef\pgf@arcto@xb{\the\pgf@x}% + \edef\pgf@arcto@yb{\the\pgf@y}% + % + % Step 2: x1,y1 is more complicated to compute: It is given by lastx + % and lasty, but these are transformed coordinates, we need the + % untransformed ones. So, we inverse the transformation (arghh...) + % + \pgftransforminvert% + \pgf@process{\pgfpointtransformed{\pgfqpoint{\pgf@path@lastx}{\pgf@path@lasty}}}% + \edef\pgf@arcto@xa{\the\pgf@x}% + \edef\pgf@arcto@ya{\the\pgf@y}% + \edef\pgf@temp@a{\pgf@arcto@xa,\pgf@arcto@ya}% + \edef\pgf@temp@b{\pgf@arcto@xb,\pgf@arcto@yb}% + \ifx\pgf@temp@a\pgf@temp@b% special rule: skip! + \global\let\pgf@marshal\pgfutil@empty + \else + % + % Ok, now we got all the parameters setup. Now comes the + % computation... + % + % + % Step 3: Start with a new coordinate system and rotate everything + % by the negated phi. + % + \pgftransformreset + \pgftransformrotate{-\pgf@arcto@phi}% + % Ok, using \pgfpointtransformed we now get transformed points... + % + % Step 4: Compute x1' and y1' (xaprime and yaprime) + % + \pgf@process{% + \pgfpointtransformed{\pgfpointscale{.5}{\pgfpointdiff + {\pgfqpoint{\pgf@arcto@xb}{\pgf@arcto@yb}} + {\pgfqpoint{\pgf@arcto@xa}{\pgf@arcto@ya}}% + }% + }% + }% + \edef\pgf@arcto@xaprime{\pgf@sys@tonumber\pgf@x}% + \edef\pgf@arcto@yaprime{\pgf@sys@tonumber\pgf@y}% + % + % Compute Lambda + % + \pgfmathsetmacro\pgf@arcto@frac@x{\pgf@arcto@xaprime/\pgf@arcto@rx}% + \pgfmathsetmacro\pgf@arcto@frac@y{\pgf@arcto@yaprime/\pgf@arcto@ry}% + \pgfmathsetmacro\pgf@arcto@lambda{ + \pgf@arcto@frac@x*\pgf@arcto@frac@x+\pgf@arcto@frac@y*\pgf@arcto@frac@y + }% + \ifdim\pgf@arcto@lambda pt>1pt + \pgfmathsetmacro\pgf@arcto@sqrt@lambda{sqrt(\pgf@arcto@lambda)}% + \pgfmathsetmacro\pgf@arcto@rx{\pgf@arcto@sqrt@lambda*\pgf@arcto@rx}% + \pgfmathsetmacro\pgf@arcto@ry{\pgf@arcto@sqrt@lambda*\pgf@arcto@ry}% + \fi + % + % Do some scaling + % + \pgfmathsetmacro\pgf@arcto@xaprime@abs{abs(\pgf@arcto@xaprime)}% + \pgfmathsetmacro\pgf@arcto@yaprime@abs{abs(\pgf@arcto@yaprime)}% + \pgfmathmax@{\pgf@arcto@rx,\pgf@arcto@ry,\pgf@arcto@xaprime@abs,\pgf@arcto@yaprime@abs}% + \pgfmathsetmacro\pgf@arcto@scaling{20/\pgfmathresult}% + \pgfmathsetmacro\pgf@arcto@rx@scaled{\pgf@arcto@scaling*\pgf@arcto@rx}% + \pgfmathsetmacro\pgf@arcto@ry@scaled{\pgf@arcto@scaling*\pgf@arcto@ry}% + \pgfmathsetmacro\pgf@arcto@xaprime@scaled{\pgf@arcto@scaling*\pgf@arcto@xaprime}% + \pgfmathsetmacro\pgf@arcto@yaprime@scaled{\pgf@arcto@scaling*\pgf@arcto@yaprime}% + % + % Step 5: Now comes the messy computation of c1' and c2'. + % + \ifdim\pgf@arcto@rx pt>\pgf@arcto@ry pt + \pgfmathsetmacro\pgf@arcto@rx@over@ry{\pgf@arcto@rx/\pgf@arcto@ry}% + \pgfmathsetmacro\pgf@arcto@ry@over@rx{\pgf@arcto@ry/\pgf@arcto@rx}% + \pgfmathsetmacro\pgf@arcto@temp{\pgf@arcto@ry@over@rx*\pgf@arcto@xaprime@scaled}% + \pgfmathsetmacro\pgf@arcto@numerator{ + \pgf@arcto@ry@scaled*\pgf@arcto@ry@scaled- + \pgf@arcto@yaprime@scaled*\pgf@arcto@yaprime@scaled- + \pgf@arcto@temp*\pgf@arcto@temp + }% + \pgfmathsetmacro\pgf@arcto@denominator{ + \pgf@arcto@yaprime@scaled*\pgf@arcto@yaprime@scaled+ + \pgf@arcto@temp*\pgf@arcto@temp + }% + \else + \pgfmathsetmacro\pgf@arcto@rx@over@ry{\pgf@arcto@rx/\pgf@arcto@ry}% + \pgfmathsetmacro\pgf@arcto@ry@over@rx{\pgf@arcto@ry/\pgf@arcto@rx}% + \pgfmathsetmacro\pgf@arcto@temp{\pgf@arcto@rx@over@ry*\pgf@arcto@yaprime@scaled}% + \pgfmathsetmacro\pgf@arcto@numerator{ + \pgf@arcto@rx@scaled*\pgf@arcto@rx@scaled- + \pgf@arcto@xaprime@scaled*\pgf@arcto@xaprime@scaled- + \pgf@arcto@temp*\pgf@arcto@temp + }% + \pgfmathsetmacro\pgf@arcto@denominator{ + \pgf@arcto@xaprime@scaled*\pgf@arcto@xaprime@scaled+ + \pgf@arcto@temp*\pgf@arcto@temp + }% + \fi + \pgfmathsetmacro\pgf@arcto@frac{ + \pgf@arcto@numerator/\pgf@arcto@denominator + }% + \ifdim\pgf@arcto@frac pt<0pt + \pgfmathsetmacro\pgf@arcto@factor{0}% + \else + \pgfmathsetmacro\pgf@arcto@factor{sqrt(\pgf@arcto@frac)}% + \fi + \ifx\pgf@arcto@fA\pgf@arcto@fS + \pgfmathsetmacro\pgf@arcto@factor{-\pgf@arcto@factor}% + \fi + \pgfmathsetmacro\pgf@arcto@cxprime{ + \pgf@arcto@factor*\pgf@arcto@rx@over@ry*\pgf@arcto@yaprime + }% + \pgfmathsetmacro\pgf@arcto@cyprime{ + -\pgf@arcto@factor*\pgf@arcto@ry@over@rx*\pgf@arcto@xaprime + }% + % + % Step 6: Ok, now compute cx,cy + % + \pgftransformreset + \pgftransformrotate{\pgf@arcto@phi}% + \pgf@process{% + \pgfpointtransformed{\pgfqpoint{\pgf@arcto@cxprime pt}{\pgf@arcto@cyprime pt}}% + }% + \edef\pgf@arcto@temp{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% + \pgf@process{\pgfpointadd{\pgf@arcto@temp}{% + \pgfpointscale{.5}{% + \pgfpointadd + {\pgfqpoint{\pgf@arcto@xa}{\pgf@arcto@ya}} + {\pgfqpoint{\pgf@arcto@xb}{\pgf@arcto@yb}}}% + }% + }% + \edef\pgf@arcto@cx{\the\pgf@x}% + \edef\pgf@arcto@cy{\the\pgf@y}% + % + % Step 7: Compute start angle: + % + \pgfmathsetmacro\pgf@arcto@vec@x{(\pgf@arcto@xaprime-\pgf@arcto@cxprime)/\pgf@arcto@rx}% + \pgfmathsetmacro\pgf@arcto@vec@y{(\pgf@arcto@yaprime-\pgf@arcto@cyprime)/\pgf@arcto@ry}% + \pgfmathsetmacro\pgf@arcto@denominator{veclen(\pgf@arcto@vec@x,\pgf@arcto@vec@y)}% + \pgfmathsetmacro\pgf@arcto@frac{\pgf@arcto@vec@x/\pgf@arcto@denominator}% + \pgfmathsetmacro\pgf@arcto@theta@start{acos(\pgf@arcto@frac)}% + \ifdim\pgf@arcto@vec@y pt<0pt + \pgfmathsetmacro\pgf@arcto@theta@start{-\pgf@arcto@theta@start}% + \fi + % + % Step 8: Compute end angle: + % + \pgfmathsetmacro\pgf@arcto@vec@x{(-\pgf@arcto@xaprime-\pgf@arcto@cxprime)/\pgf@arcto@rx}% + \pgfmathsetmacro\pgf@arcto@vec@y{(-\pgf@arcto@yaprime-\pgf@arcto@cyprime)/\pgf@arcto@ry}% + \pgfmathsetmacro\pgf@arcto@denominator{veclen(\pgf@arcto@vec@x,\pgf@arcto@vec@y)}% + \pgfmathsetmacro\pgf@arcto@frac{\pgf@arcto@vec@x/\pgf@arcto@denominator}% + \pgfmathsetmacro\pgf@arcto@theta@end{acos(\pgf@arcto@frac)}% + \ifdim\pgf@arcto@vec@y pt<0pt + \pgfmathsetmacro\pgf@arcto@theta@end{-\pgf@arcto@theta@end}% + \fi + \pgfmathsetmacro\pgf@arcto@delta@theta{abs(\pgf@arcto@theta@start-\pgf@arcto@theta@end)}% + \ifdim\pgf@arcto@fA pt=0pt + \ifdim\pgf@arcto@delta@theta pt>180pt + % Ok, we need to adjust the angle! + \ifdim\pgf@arcto@theta@end pt>\pgf@arcto@theta@start pt + \pgfmathsetmacro\pgf@arcto@theta@end{\pgf@arcto@theta@end-360}% + \else + \pgfmathsetmacro\pgf@arcto@theta@end{\pgf@arcto@theta@end+360}% + \fi + \fi + \else + \ifdim\pgf@arcto@delta@theta pt<180pt + % Ok, we need to adjust the angle! + \ifdim\pgf@arcto@theta@end pt>\pgf@arcto@theta@start pt + \pgfmathsetmacro\pgf@arcto@theta@end{\pgf@arcto@theta@end-360}% + \else + \pgfmathsetmacro\pgf@arcto@theta@end{\pgf@arcto@theta@end+360}% + \fi + \fi + \fi + % Qrr: + % make sure direction is properly followed + \ifdim\pgf@arcto@fS pt=1pt + % counter clockwise + \ifdim\pgf@arcto@theta@end pt<\pgf@arcto@theta@start path + \pgfmathsetmacro\pgf@arcto@theta@end{\pgf@arcto@theta@end+360}% + \fi + \else + % clockwise + \ifdim\pgf@arcto@theta@end pt>\pgf@arcto@theta@start path + \pgfmathsetmacro\pgf@arcto@theta@end{\pgf@arcto@theta@end-360}% + \fi + \fi + \xdef\pgf@marshal{\noexpand + \pgfpatharcaxes{\pgf@arcto@theta@start}{\pgf@arcto@theta@end} + {\noexpand\pgfpointpolar{\pgf@arcto@phi}{\pgf@arcto@rx}} + {\noexpand\pgfpointpolar{\pgf@arcto@phi+90}{\pgf@arcto@ry}}% + }% + \fi\fi\fi + }% + \pgf@marshal +} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.paths.ortho.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.paths.ortho.code.tex new file mode 100644 index 0000000000..9740c39cc2 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.paths.ortho.code.tex @@ -0,0 +1,692 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +%% For the operators r-lr, r-rl, r-ud and r-du we need to check after TikZ found r +\let\tikz@orig@rect\tikz@rect +\def\tikz@rect{\pgfutil@ifnextchar e\tikz@orig@rect\tikzext@tikz@r} +\def\tikzext@tikz@r -{% + \pgfutil@ifnextchar l\tikzext@tikz@lr@lineto{% + \pgfutil@ifnextchar r\tikzext@tikz@rl@lineto{% + \pgfutil@ifnextchar u\tikzext@tikz@ud@lineto{% + \pgfutil@ifnextchar d\tikzext@tikz@du@lineto\tikz@expand + }% + }% + }% +} +%% For the operator |-| we need to check after TikZ found |- +\let\tikz@orig@vh@lineto@next\tikz@vh@lineto@next +\def\tikz@vh@lineto@next{% + \pgfutil@ifnextchar|{\expandafter\tikzext@tikz@vhv@lineto\pgfutil@gobble}% + {\pgfutil@ifnextchar\tikz@activebar{\expandafter\tikzext@tikz@vhv@lineto\pgfutil@gobble}% + {\tikz@orig@vh@lineto@next}}} +%% For the operator -|- we need to check after TikZ found -| +\let\tikz@orig@hv@lineto\tikz@hv@lineto +\def\tikz@hv@lineto{% + \pgfutil@ifnextchar-{\expandafter\tikzext@tikz@hvh@lineto\pgfutil@gobble}% + {\tikz@orig@hv@lineto}} + +%% |-|[] and -|-[] are allowed +\def\tikzext@tikz@vhv@lineto{\pgfutil@ifnextchar[{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@vhv@lineto@next}{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@vhv@lineto@next[]}} +\def\tikzext@tikz@hvh@lineto{\pgfutil@ifnextchar[{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@hvh@lineto@next}{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@hvh@lineto@next[]}} + +%% r-rl[], r-lr[], etc. +\def\tikzext@tikz@rl@lineto rl{\pgfutil@ifnextchar[{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@rl@lineto@next}{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@rl@lineto@next[]}} +\def\tikzext@tikz@lr@lineto lr{\pgfutil@ifnextchar[{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@lr@lineto@next}{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@lr@lineto@next[]}} +\def\tikzext@tikz@du@lineto du{\pgfutil@ifnextchar[{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@du@lineto@next}{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@du@lineto@next[]}} +\def\tikzext@tikz@ud@lineto ud{\pgfutil@ifnextchar[{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@ud@lineto@next}{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@ud@lineto@next[]}} + +%% TikZ interjects are done, the rest is independent: + +\newlength\tikzext@tikz@udlr@distance +\newlength\tikzext@tikz@hvvh@distance +\newif\iftikzext@tikz@hvvh@middle % checks whether spacing = 0 was selected +\newif\iftikzext@tikz@hvvh@fromcenter +\newif\iftikzext@ortho@preflush +\tikzext@ortho@preflushtrue + +%%% HVVH/UDLR +\tikzset{% + ortho/.code=\pgfqkeys{/tikz/ortho}{#1}, + hvvh/.code=\pgfqkeys{/tikz/ortho}{#1},% + udlr/.code=\pgfqkeys{/tikz/ortho}{#1},% + ortho/.search also=/tikz, + ortho/middle 0 to 1/.style={/tikz/ortho/spacing=0},% + ortho/from center/.is if=tikzext@tikz@hvvh@fromcenter,% + ortho/spacing/.code=% spacing = 0 means that the middle part are the pos-itions 0 to 1, + % the first part is -1 to 0, the last part is to 2 + \pgfmathint{#1}\let\tikzext@tikz@hvvh@timing@parts\pgfmathresult% in case they are calculations to be done + \ifcase\tikzext@tikz@hvvh@timing@parts\relax + \tikzext@tikz@hvvh@middletrue + \def\tikzext@tikz@hvvh@timing@parts{1}% + \def\tikzext@tikz@hvvh@timing@first{0}% + \def\tikzext@tikz@hvvh@timing@last{1}% + \def\tikzext@tikz@hvvh@timing@subtr{0}% + \def\tikzext@tikz@hvvh@timing@factor{1}% + \else % in all other cases n > 0 the kinks are at pos = 1/n and (n - 1)/n + \tikzext@tikz@hvvh@middlefalse + \pgfmathreciprocal{#1}\let\tikzext@tikz@hvvh@timing@first\pgfmathresult + \pgfmathsetmacro\tikzext@tikz@hvvh@timing@last{1-\pgfmathresult}% + \pgfmathreciprocal{#1-2}% + \let\tikzext@tikz@hvvh@timing@subtr\pgfmathresult + \pgfmathsetmacro\tikzext@tikz@hvvh@timing@factor{1+2*\pgfmathresult}% + \fi,% + ortho/ratio/.code=\pgfmathsetmacro\tikzext@tikz@hvvh@ratio{#1},% + % TODO: not possible to do distance in TikZ coordinate system + ortho/distance/.code=\pgfmathsetlength\tikzext@tikz@hvvh@distance{#1}\let\tikzext@tikz@hvvh@ratio\pgfutil@empty,% + ortho/udlr distance/.style={% + /tikz/ortho/ud distance={#1},% + /tikz/ortho/du distance={#1},% + /tikz/ortho/lr distance={#1},% + /tikz/ortho/rl distance={#1}},% + ortho/ud distance/.initial=+.5cm,% + ortho/du distance/.initial=+.5cm,% + ortho/lr distance/.initial=+.5cm,% + ortho/rl distance/.initial=+.5cm,% + ortho/ratio=.5,% default value + ortho/spacing=4,% default value +}% + +%BEGIN_FOLD Timer +\def\tikz@timer@hvhline{% + \pgf@process{\tikz@timer@start}\pgf@ya\pgf@y + \pgf@process{\tikz@timer@end}\pgf@yc\pgf@y + \pgf@process{\tikz@timer@middle}\pgf@xb\tikz@time pt% + \ifdim\tikz@time pt<\tikzext@tikz@hvvh@timing@first pt% first quarter + \iftikzext@tikz@hvvh@middle + \advance\pgf@xb1pt% + \else + \pgf@xb\tikzext@tikz@hvvh@timing@parts\pgf@xb + \fi + \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}{\noexpand\tikz@timer@start}{% + \noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@ya}}}% + \else + \ifdim\tikz@time pt>\tikzext@tikz@hvvh@timing@last pt% last quarter + \iftikzext@tikz@hvvh@middle + \advance\pgf@xb-1pt% + \else + \pgf@xb\tikzext@tikz@hvvh@timing@parts\pgf@xb + \fi + \advance\pgf@xb\dimexpr-\tikzext@tikz@hvvh@timing@parts pt+1pt\relax% + \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}% + {\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@yc}}{\noexpand\tikz@timer@end}}% + \else% middle half + \pgf@xb\tikzext@tikz@hvvh@timing@factor\pgf@xb% + \advance\pgf@xb-\tikzext@tikz@hvvh@timing@subtr pt% + \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}% + {\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@ya}}{\noexpand\tikz@timer@middle}}% + \fi\fi\tikz@marshal} +\def\tikz@timer@vhvline{% + \pgf@process{\tikz@timer@start}\pgf@xa\pgf@x + \pgf@process{\tikz@timer@end}\pgf@xc\pgf@x + \pgf@process{\tikz@timer@middle}\pgf@xb\tikz@time pt% + \ifdim\tikz@time pt<\tikzext@tikz@hvvh@timing@first pt% first quarter + \iftikzext@tikz@hvvh@middle + \advance\pgf@xb1pt% + \else + \pgf@xb\tikzext@tikz@hvvh@timing@parts\pgf@xb + \fi + \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}{\noexpand\tikz@timer@start}{% + \noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@y}}}% + \else + \ifdim\tikz@time pt>\tikzext@tikz@hvvh@timing@last pt% last quarter + \iftikzext@tikz@hvvh@middle + \advance\pgf@xb-1pt% + \else + \pgf@xb\tikzext@tikz@hvvh@timing@parts\pgf@xb + \fi + \advance\pgf@xb by\dimexpr-\tikzext@tikz@hvvh@timing@parts pt+1pt\relax% + \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}% + {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@y}}{\noexpand\tikz@timer@end}}% + \else% middle half + \pgf@xb=\tikzext@tikz@hvvh@timing@factor\pgf@xb + \advance\pgf@xb by-\tikzext@tikz@hvvh@timing@subtr pt% + \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}% + {\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@y}}{\noexpand\tikz@timer@middle}}% + \fi\fi\tikz@marshal}% + +%% collect options and nodes, coordinates and pics onpath +\let\tikz@hvvh@currentoption\pgfutil@empty +\def\tikzext@tikz@collect@hvvh@options#1[#2]{\edef\tikz@hvvh@currentoption{#2}#1} +\def\tikzext@tikz@hvh@lineto@next{% + \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikzext@tikz@hvh@lineto@next} + {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikzext@tikz@hvh@lineto@next}% + {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikzext@tikz@hvh@lineto@next}{\tikz@scan@one@point\tikzext@tikz@@hvh@lineto}}}}% +\def\tikzext@tikz@vhv@lineto@next{% + \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikzext@tikz@vhv@lineto@next} + {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikzext@tikz@vhv@lineto@next}% + {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikzext@tikz@vhv@lineto@next}{\tikz@scan@one@point\tikzext@tikz@@vhv@lineto}}}}% +\def\tikzext@tikz@ud@lineto@next{% + \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikzext@tikz@ud@lineto@next} + {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikzext@tikz@ud@lineto@next} + {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikzext@tikz@ud@lineto@next}{\tikz@scan@one@point\tikzext@tikz@@ud@lineto}}}}% +\def\tikzext@tikz@du@lineto@next{% + \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikzext@tikz@du@lineto@next} + {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikzext@tikz@du@lineto@next} + {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikzext@tikz@du@lineto@next}{\tikz@scan@one@point\tikzext@tikz@@du@lineto}}}}% +\def\tikzext@tikz@lr@lineto@next{% + \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikzext@tikz@lr@lineto@next} + {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikzext@tikz@lr@lineto@next} + {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikzext@tikz@lr@lineto@next}{\tikz@scan@one@point\tikzext@tikz@@lr@lineto}}}}% +\def\tikzext@tikz@rl@lineto@next{% + \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikzext@tikz@rl@lineto@next} + {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikzext@tikz@rl@lineto@next} + {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikzext@tikz@rl@lineto@next}{\tikz@scan@one@point\tikzext@tikz@@rl@lineto}}}}% + +\def\tikz@do@hvvh#1#2#3#4#5{% +% #1 = first kink +% #2 = second kink +% #3 = end +% #4 = timer +% #5 = tikz@shapeborder@name + \pgfpathlineto{#1}% + \pgfpathlineto{#2}% + \pgfpathlineto{#3}% + \def\tikz@timer@middle{#2}% + \def\tikz@timer@end{#3}% + \let\tikz@timer#4 + \edef\pgf@temp{#5}% + \ifx\pgf@temp\pgfutil@empty + \let\tikz@moveto@waiting\relax + \else + \let\tikz@moveto@waiting\pgf@temp + \fi + \tikz@scan@next@command}% + +%% -|- operator +\def\tikzext@tikz@@hvh@lineto#1{% + \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \pgf@xb=\tikz@lastx + \pgf@xc=\tikz@lastx + \pgf@yc=\tikz@lasty + \tikz@make@last@position{#1}% + \tikz@flush@moveto@toward{\pgfqpoint{\tikz@lastx}{\pgf@yc}}\pgf@xc\pgf@yc + \begingroup + \pgfqkeys{/tikz/ortho}{/tikz/style/.expand once=\tikz@hvvh@currentoption}% + \iftikz@shapeborder + \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\pgf@xb}{\tikz@lasty}}}% + \iftikzext@tikz@hvvh@fromcenter + \pgf@xc\pgf@xb + \fi + \pgfutil@ifxempty\tikzext@tikz@hvvh@ratio{% + \ifdim\tikzext@tikz@hvvh@distance<0pt\relax + \iftikzext@tikz@hvvh@fromcenter + \pgf@xc\tikz@lastx + \else + \pgf@xc\pgf@x + \fi + \fi + \ifdim\pgf@xb>\tikz@lastx + \tikzext@tikz@hvvh@distance-\tikzext@tikz@hvvh@distance + \fi + }{% + \iftikzext@tikz@hvvh@fromcenter + \tikzext@tikz@hvvh@distance\tikz@lastx + \else + \tikzext@tikz@hvvh@distance\pgf@x + \fi + \advance\tikzext@tikz@hvvh@distance-\pgf@xc + \tikzext@tikz@hvvh@distance\tikzext@tikz@hvvh@ratio\tikzext@tikz@hvvh@distance + }% + \advance\pgf@xc\tikzext@tikz@hvvh@distance + \edef\pgf@tempa{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% + \edef\pgf@tempb{\noexpand\pgfqpoint{\the\pgf@xc}{\the\tikz@lasty}}% + \edef\pgf@temp{\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% + \else + \let\tikz@shapeborder@name\pgfutil@empty + \iftikzext@tikz@hvvh@fromcenter + \pgf@xc\pgf@xb + \fi + \pgfutil@ifxempty\tikzext@tikz@hvvh@ratio{% + \ifdim\tikzext@tikz@hvvh@distance<0pt\relax + \pgf@xc\tikz@lastx + \fi + \ifdim\pgf@xb>\tikz@lastx + \tikzext@tikz@hvvh@distance-\tikzext@tikz@hvvh@distance + \fi + }{% + \tikzext@tikz@hvvh@distance\tikz@lastx + \advance\tikzext@tikz@hvvh@distance-\pgf@xc + \tikzext@tikz@hvvh@distance\tikzext@tikz@hvvh@ratio\tikzext@tikz@hvvh@distance + }% + \advance\pgf@xc\tikzext@tikz@hvvh@distance + \edef\pgf@tempa{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% + \edef\pgf@tempb{\noexpand\pgfqpoint{\the\pgf@xc}{\the\tikz@lasty}}% + \edef\pgf@temp{\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \fi% + \xdef\pgf@marshal{% + \noexpand\tikz@do@hvvh + {\expandafter\noexpand\pgf@tempa}% + {\expandafter\noexpand\pgf@tempb}% + {\expandafter\noexpand\pgf@temp}% + {\noexpand\tikz@timer@hvhline}{\tikz@shapeborder@name}}% + \endgroup + \pgf@marshal}% + +%% |-| operator +\def\tikzext@tikz@@vhv@lineto#1{% + \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \pgf@xc=\tikz@lastx + \pgf@yb=\tikz@lasty + \pgf@yc=\tikz@lasty + \tikz@make@last@position{#1}% + \tikz@flush@moveto@toward{\pgfqpoint{\pgf@xc}{\tikz@lasty}}\pgf@xc\pgf@yc + \begingroup + \pgfqkeys{/tikz/ortho}{/tikz/style/.expand once=\tikz@hvvh@currentoption}% + \iftikz@shapeborder + \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\tikz@lastx}{\pgf@yb}}}% + \iftikzext@tikz@hvvh@fromcenter + \pgf@yc\pgf@yb + \fi + \ifx\tikzext@tikz@hvvh@ratio\pgfutil@empty + \ifdim\tikzext@tikz@hvvh@distance<0pt\relax + \iftikzext@tikz@hvvh@fromcenter + \pgf@yc\tikz@lasty + \else + \pgf@yc\pgf@y + \fi + \fi + \ifdim\pgf@yb>\tikz@lasty + \tikzext@tikz@hvvh@distance-\tikzext@tikz@hvvh@distance + \fi + \else + \iftikzext@tikz@hvvh@fromcenter + \tikzext@tikz@hvvh@distance\tikz@lasty + \else + \tikzext@tikz@hvvh@distance\pgf@y + \fi + \advance\tikzext@tikz@hvvh@distance-\pgf@yc + \tikzext@tikz@hvvh@distance\tikzext@tikz@hvvh@ratio\tikzext@tikz@hvvh@distance + \fi + \advance\pgf@yc\tikzext@tikz@hvvh@distance + \edef\pgf@tempa{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% + \edef\pgf@tempb{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\pgf@yc}}% + \edef\pgf@temp{\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% + \else + \let\tikz@shapeborder@name\pgfutil@empty + \iftikzext@tikz@hvvh@fromcenter + \pgf@yc\pgf@yb + \fi + \ifx\tikzext@tikz@hvvh@ratio\pgfutil@empty + \ifdim\tikzext@tikz@hvvh@distance<0pt\relax + \pgf@yc\tikz@lasty + \fi + \ifdim\pgf@yb>\tikz@lasty + \tikzext@tikz@hvvh@distance-\tikzext@tikz@hvvh@distance + \fi + \else + \tikzext@tikz@hvvh@distance\tikz@lasty + \advance\tikzext@tikz@hvvh@distance-\pgf@yc + \tikzext@tikz@hvvh@distance\tikzext@tikz@hvvh@ratio\tikzext@tikz@hvvh@distance + \fi + \advance\pgf@yc\tikzext@tikz@hvvh@distance + \edef\pgf@tempa{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% + \edef\pgf@tempb{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\pgf@yc}}% + \edef\pgf@temp{\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \fi% + \xdef\pgf@marshal{% + \noexpand\tikz@do@hvvh + {\expandafter\noexpand\pgf@tempa}% + {\expandafter\noexpand\pgf@tempb}% + {\expandafter\noexpand\pgf@temp}% + {\noexpand\tikz@timer@vhvline}{\tikz@shapeborder@name}}% + \endgroup + \pgf@marshal}% + +%% r-ud operator +\def\tikzext@tikz@@ud@lineto#1{% + \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \pgf@xc\tikz@lastx + \pgf@yb\tikz@lasty + \advance\tikz@lasty1pt% + \let\pgf@temp\tikz@moveto@waiting + \tikz@flush@moveto@toward{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}\pgf@xc\pgf@yc + \tikz@make@last@position{#1}% + \begingroup + \pgfqkeys{/tikz/ortho}{/tikz/style/.expand once=\tikz@hvvh@currentoption}% + \pgfmathsetlength\tikzext@tikz@udlr@distance{\pgfkeysvalueof{/tikz/ortho/ud distance}}% + \iftikz@shapeborder + \advance\pgf@y1pt% + \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\pgf@x}{\pgf@y}}}% + \iftikzext@tikz@hvvh@fromcenter + \pgf@yc\pgf@yb + \else\ifx\pgf@temp\relax + \pgf@yc\pgf@yb + \fi + \fi + \ifdim\pgf@yc<\pgf@y + \iftikzext@tikz@hvvh@fromcenter + \pgf@yc=\tikz@lasty + \else + \pgf@yc=\pgf@y + \fi + \fi + \advance\pgf@yc\tikzext@tikz@udlr@distance + \edef\pgf@temp{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% + \else + \let\tikz@shapeborder@name\pgfutil@empty + \ifx\pgf@temp\relax\else + \iftikzext@tikz@hvvh@fromcenter\else + \pgf@yb\pgf@yc + \fi + \fi + \ifdim\pgf@yb<\tikz@lasty\pgf@yb\tikz@lasty\fi + \advance\pgf@yb\tikzext@tikz@udlr@distance + \pgf@yc\pgf@yb + \edef\pgf@temp{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \fi + \xdef\pgf@marshal{% + \noexpand\tikz@do@hvvh + {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% + {\noexpand\pgfqpoint{\the\tikz@lastx}{\the\pgf@yc}}% + {\expandafter\noexpand\pgf@temp}% + {\noexpand\tikz@timer@vhvline}{\tikz@shapeborder@name}}% + \endgroup + \pgf@marshal}% + +%% r-du operator +\def\tikzext@tikz@@du@lineto#1{% + \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \pgf@xc\tikz@lastx + \pgf@yb\tikz@lasty + \advance\tikz@lasty-1pt% + \let\pgf@temp\tikz@moveto@waiting + \tikz@flush@moveto@toward{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}\pgf@xc\pgf@yc + \tikz@make@last@position{#1}% + \begingroup + \pgfqkeys{/tikz/ortho}{/tikz/style/.expand once=\tikz@hvvh@currentoption}% + \pgfmathsetlength\tikzext@tikz@udlr@distance{\pgfkeysvalueof{/tikz/ortho/du distance}}% + \iftikz@shapeborder + \advance\pgf@y-1pt% + \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\pgf@x}{\pgf@y}}}% + \iftikzext@tikz@hvvh@fromcenter + \pgf@yc\pgf@yb + \else\ifx\pgf@temp\relax + \pgf@yc\pgf@yb + \fi + \fi + \ifdim\pgf@yc>\pgf@y + \iftikzext@tikz@hvvh@fromcenter + \pgf@yc=\tikz@lasty + \else + \pgf@yc=\pgf@y + \fi + \fi + \advance\pgf@yc-\tikzext@tikz@udlr@distance + \edef\pgf@temp{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% + \else + \let\tikz@shapeborder@name\pgfutil@empty + \ifx\pgf@temp\relax\else + \iftikzext@tikz@hvvh@fromcenter\else + \pgf@yb\pgf@yc + \fi + \fi + \ifdim\pgf@yb>\tikz@lasty\pgf@yb\tikz@lasty\fi + \advance\pgf@yb-\tikzext@tikz@udlr@distance + \pgf@yc\pgf@yb + \edef\pgf@temp{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \fi + \xdef\pgf@marshal{% + \noexpand\tikz@do@hvvh + {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% + {\noexpand\pgfqpoint{\the\tikz@lastx}{\the\pgf@yc}}% + {\expandafter\noexpand\pgf@temp}% + {\noexpand\tikz@timer@vhvline}{\tikz@shapeborder@name}}% + \endgroup + \pgf@marshal}% + +%% r-lr operator +\def\tikzext@tikz@@lr@lineto#1{% + \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \pgf@xb\tikz@lastx + \pgf@yc\tikz@lasty + \advance\tikz@lastx-1pt% + \let\pgf@temp\tikz@moveto@waiting + \tikz@flush@moveto@toward{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}\pgf@xc\pgf@yc + \tikz@make@last@position{#1}% + \begingroup + \pgfqkeys{/tikz/ortho}{/tikz/style/.expand once=\tikz@hvvh@currentoption}% + \pgfmathsetlength\tikzext@tikz@udlr@distance{\pgfkeysvalueof{/tikz/ortho/lr distance}}% + \iftikz@shapeborder + \advance\pgf@x-1pt% + \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\pgf@x}{\pgf@y}}}% + \iftikzext@tikz@hvvh@fromcenter + \pgf@xc\pgf@xb + \else\ifx\pgf@temp\relax + \pgf@xc\pgf@xb + \fi + \fi + \ifdim\pgf@xc>\pgf@x + \iftikzext@tikz@hvvh@fromcenter + \pgf@xc=\tikz@lastx + \else + \pgf@xc=\pgf@x + \fi + \fi + \advance\pgf@xc-\tikzext@tikz@udlr@distance + \edef\pgf@temp{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% + \else + \let\tikz@shapeborder@name\pgfutil@empty + \ifx\pgf@temp\relax\else + \iftikzext@tikz@hvvh@fromcenter\else + \pgf@xb\pgf@xc + \fi + \fi + \ifdim\pgf@xb>\tikz@lastx\pgf@xb\tikz@lastx\fi + \advance\pgf@xb-\tikzext@tikz@udlr@distance + \pgf@xc\pgf@xb + \edef\pgf@temp{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \fi + \xdef\pgf@marshal{% + \noexpand\tikz@do@hvvh + {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% + {\noexpand\pgfqpoint{\the\pgf@xc}{\the\tikz@lasty}}% + {\expandafter\noexpand\pgf@temp}% + {\noexpand\tikz@timer@hvhline}{\tikz@shapeborder@name}}% + \endgroup + \pgf@marshal}% + +%% r-rl operator +\def\tikzext@tikz@@rl@lineto#1{% + \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \pgf@xb\tikz@lastx + \pgf@yc\tikz@lasty + \advance\tikz@lastx1pt% + \let\pgf@temp\tikz@moveto@waiting + \tikz@flush@moveto@toward{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}\pgf@xc\pgf@yc + \tikz@make@last@position{#1}% + \begingroup + \pgfqkeys{/tikz/udlr}{/tikz/ortho/.expand once=\tikz@hvvh@currentoption}% + \pgfmathsetlength\tikzext@tikz@udlr@distance{\pgfkeysvalueof{/tikz/ortho/rl distance}}% + \iftikz@shapeborder% + \advance\pgf@x1pt% + \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\pgf@x}{\pgf@y}}}% + \iftikzext@tikz@hvvh@fromcenter + \pgf@xc\pgf@xb + \else\ifx\pgf@temp\relax + \pgf@xc\pgf@xb + \fi + \fi + \ifdim\pgf@xc<\pgf@x + \iftikzext@tikz@hvvh@fromcenter + \pgf@xc=\tikz@lastx + \else + \pgf@xc=\pgf@x + \fi + \fi + \advance\pgf@xc\tikzext@tikz@udlr@distance + \edef\pgf@temp{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% + \else + \let\tikz@shapeborder@name\pgfutil@empty% + \ifx\pgf@temp\relax\else + \iftikzext@tikz@hvvh@fromcenter\else + \pgf@xb\pgf@xc + \fi + \fi + \ifdim\pgf@xb<\tikz@lastx\pgf@xb\tikz@lastx\fi + \advance\pgf@xb\tikzext@tikz@udlr@distance + \pgf@xc\pgf@xb + \edef\pgf@temp{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \fi + \xdef\pgf@marshal{% + \noexpand\tikz@do@hvvh + {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% + {\noexpand\pgfqpoint{\the\pgf@xc}{\the\tikz@lasty}}% + {\expandafter\noexpand\pgf@temp}% + {\noexpand\tikz@timer@hvhline}{\tikz@shapeborder@name}}% + \endgroup + \pgf@marshal}% + +%% a few nice to haves, use with to or edge operator +\tikzset{ + node as new start/.is if=tikzext@ortho@preflush, + node as new start, + ortho/install shortcuts/.style={ + *|/.style={only vertical second={#1}}, *|/.default=, + |*/.style={only vertical first={#1}}, |*/.default=, + *-/.style={only horizontal second={#1}}, *-/.default=, + -*/.style={only horizontal first={#1}}, -*/.default=, + |-/.style={to path={|-(\tikztotarget)\tikztonodes}}, + -|/.style={to path={-|(\tikztotarget)\tikztonodes}}, + -|-/.style=/tikz/horizontal vertical horizontal, + |-|/.style=/tikz/vertical horizontal vertical, + }, + horizontal vertical/.style={to path={-| (\tikztotarget) \tikztonodes}}, + vertical horizontal/.style={to path={|- (\tikztotarget) \tikztonodes}}, + horizontal vertical horizontal/.style={to path={-|- (\tikztotarget) \tikztonodes}}, + vertical horizontal vertical/.style={to path={|-| (\tikztotarget) \tikztonodes}}, + only vertical second/.style={to path={ + \pgfextra + \let\tikzext@ortho@anchor\pgfutil@empty + \let\tikzext@origtotarget\pgfutil@empty + \tikz@scan@one@point\pgfutil@firstofone(\tikztostart)\relax + \iftikz@shapeborder + \tikz@scan@one@point\pgfutil@firstofone(\tikztotarget)\relax + \ifdim\pgf@y>\tikz@lasty\relax + \edef\tikztostart{\tikztostart.north}% + \iftikz@shapeborder\def\tikzext@ortho@anchor{.south}\fi + \else + \edef\tikztostart{\tikztostart.south}% + \iftikz@shapeborder\def\tikzext@ortho@anchor{.north}\fi + \fi + \fi + \def\tikz@tempa{#1}% + \ifx\tikz@tempa\pgfutil@empty\else + \let\tikzext@origtotarget\tikztotarget + \edef\tikztotarget{[xshift={#1}]\tikztotarget\tikzext@ortho@anchor}% + \fi + \endpgfextra + [insert path/.expanded={ + (perpendicular cs: horizontal line through={(\tikztostart)}, + vertical line through={(\tikztotarget)}) -- (\tikztotarget)}] \tikztonodes + \pgfextra + \ifx\tikzext@origtotarget\pgfutil@empty\else + \iftikzext@ortho@preflush(\tikzext@origtotarget)\fi\fi\endpgfextra}}, + only vertical second/.default=, + only horizontal second/.style={to path={ + \pgfextra + \let\tikzext@ortho@anchor\pgfutil@empty + \let\tikzext@origtotarget\pgfutil@empty + \tikz@scan@one@point\pgfutil@firstofone(\tikztostart)\relax + \iftikz@shapeborder + \tikz@scan@one@point\pgfutil@firstofone(\tikztotarget)\relax + \ifdim\pgf@x>\tikz@lastx\relax + \edef\tikztostart{\tikztostart.east}% + \iftikz@shapeborder\def\tikzext@ortho@anchor{.west}\fi + \else + \edef\tikztostart{\tikztostart.west}% + \iftikz@shapeborder\def\tikzext@ortho@anchor{.east}\fi + \fi + \fi + \def\tikz@tempa{#1}% + \ifx\tikz@tempa\pgfutil@empty\else + \let\tikzext@origtotarget\tikztotarget + \edef\tikztotarget{[yshift={#1}]\tikztotarget\tikzext@ortho@anchor}% + \fi + \endpgfextra + [insert path/.expanded={ + (perpendicular cs: vertical line through={(\tikztostart)}, + horizontal line through={(\tikztotarget)}) -- (\tikztotarget)}] \tikztonodes + \pgfextra + \ifx\tikzext@origtotarget\pgfutil@empty\else + \iftikzext@ortho@preflush(\tikzext@origtotarget)\fi\fi\endpgfextra}}, + only horizontal second/.default=, + only vertical first/.style={to path={ + \pgfextra + \let\tikzext@ortho@anchor\pgfutil@empty + \let\tikzext@origtotarget\pgfutil@empty + \tikz@scan@one@point\pgfutil@firstofone(\tikztotarget)\relax + \pgf@ya=\pgf@y + \iftikz@shapeborder + \let\tikzext@origtotarget\tikztotarget + \tikz@scan@one@point\pgfutil@firstofone(\tikztostart)\relax + \ifdim\pgf@ya>\tikz@lasty\relax + \edef\tikztotarget{\tikztotarget.south}% + \iftikz@shapeborder\def\tikzext@ortho@anchor{.north}\fi + \else + \edef\tikztotarget{\tikztotarget.north}% + \iftikz@shapeborder\def\tikzext@ortho@anchor{.south}\fi + \fi + \fi + \def\tikz@tempa{#1}% + \ifx\tikz@tempa\pgfutil@empty\else + \edef\tikztostart{[xshift={#1}]\tikztostart\tikzext@ortho@anchor}% + \fi + \endpgfextra + [insert path/.expanded={(\tikztostart)}] + -- (perpendicular cs: vertical line through/.expanded={(\tikztostart)}, + horizontal line through={(\tikztotarget)}) + \tikztonodes + \pgfextra + \ifx\tikzext@origtotarget\pgfutil@empty\else + \iftikzext@ortho@preflush(\tikzext@origtotarget)\fi\fi\endpgfextra}}, + only vertical first/.default=, + only horizontal first/.style={to path={ + \pgfextra + \let\tikzext@ortho@anchor\pgfutil@empty + \let\tikzext@origtotarget\pgfutil@empty + \tikz@scan@one@point\pgfutil@firstofone(\tikztotarget)\relax + \pgf@xa=\pgf@x + \iftikz@shapeborder + \let\tikzext@origtotarget\tikztotarget + \tikz@scan@one@point\pgfutil@firstofone(\tikztostart)\relax + \ifdim\pgf@xa>\tikz@lastx\relax + \edef\tikztotarget{\tikztotarget.west}% + \iftikz@shapeborder\def\tikzext@ortho@anchor{.east}\fi + \else + \edef\tikztotarget{\tikztotarget.east}% + \iftikz@shapeborder\def\tikzext@ortho@anchor{.west}\fi + \fi + \fi + \def\tikz@tempa{#1}% + \ifx\tikz@tempa\pgfutil@empty\else + \edef\tikztostart{[yshift={#1}]\tikztostart\tikzext@ortho@anchor}% + \fi + \endpgfextra + [insert path/.expanded={(\tikztostart)}] + -- (perpendicular cs: horizontal line through/.expanded={(\tikztostart)}, + vertical line through={(\tikztotarget)}) + \tikztonodes \pgfextra + \ifx\tikzext@origtotarget\pgfutil@empty\else + \iftikzext@ortho@preflush(\tikzext@origtotarget)\fi\fi\endpgfextra}}, + only horizontal first/.default=, + only vertical first to center/.style={to path={ + \pgfextra + \let\tikzext@origtotarget\tikztotarget + \endpgfextra + (\tikztostart) -- (perpendicular cs: vertical line through={(\tikztostart)}, + horizontal line through={(\tikztotarget)}) + \tikztonodes \ifx\tikzext@origtotarget\pgfutil@empty\else\iftikzext@ortho@preflush(\tikzext@origtotarget)\fi\fi}}, + only horizontal first to center/.style={to path={ + \pgfextra + \let\tikzext@origtotarget\tikztotarget + \endpgfextra + (\tikztostart) -- (perpendicular cs: horizontal line through={(\tikztostart)}, + vertical line through={(\tikztotarget)}) + \tikztonodes \ifx\tikzext@origtotarget\pgfutil@empty\else\iftikzext@ortho@preflush(\tikzext@origtotarget)\fi\fi}}% +} +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.paths.timer.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.paths.timer.code.tex new file mode 100644 index 0000000000..3a4d30e68f --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.paths.timer.code.tex @@ -0,0 +1,188 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\def\tikz@rectB#1{% originally from tikz.code.tex + \tikz@make@last@position{#1}% + \edef\tikz@timer@end{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \let\tikz@timer\tikz@timer@rectangle% %% Timer: new timer + \tikz@@movetosave{\pgfqpoint{\pgf@xa}{\pgf@ya}}% + \tikz@path@lineto{\pgfqpoint{\pgf@xa}{\tikz@lasty}}% + \tikz@path@lineto{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}% + \tikz@path@lineto{\pgfqpoint{\tikz@lastx}{\pgf@ya}}% + \iftikz@snaked + \tikz@path@lineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}% + \fi + \pgfpathclose + \tikz@@movetosave{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}% + \def\pgfstrokehook{}% + \let\tikz@tangent\relax + \tikz@scan@next@command +}% + +\def\tikz@@sine#1{% originally from tikz.code.tex + \let\tikz@tangent\tikz@tangent@lookup + \tikz@flush@moveto + \edef\tikz@timer@start{\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% %% Timer: save start position + \pgf@process{#1}% + \edef\tikz@timer@end{\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% %% Timer: saver target position + \pgf@xc=\pgf@x + \pgf@yc=\pgf@y + \advance\pgf@xc by-\tikz@lastx + \advance\pgf@yc by-\tikz@lasty + \advance\tikz@lastx by\pgf@xc + \advance\tikz@lasty by\pgf@yc + \tikz@lastxsaved=\tikz@lastx + \tikz@lastysaved=\tikz@lasty + \tikz@updatecurrenttrue + \let\tikz@timer=\tikz@timer@sine% %% Timer: new timer + \pgfpathsine{\pgfqpoint{\pgf@xc}{\pgf@yc}}% + \tikz@scan@next@command +} + +\def\tikz@@cosine#1{% originally from tikz.code.tex + \let\tikz@tangent\tikz@tangent@lookup + \tikz@flush@moveto + \edef\tikz@timer@start{\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% %% Timer: save start position + \pgf@process{#1}% + \edef\tikz@timer@end{\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% %% Timer: save target position + \pgf@xc=\pgf@x + \pgf@yc=\pgf@y + \advance\pgf@xc by-\tikz@lastx + \advance\pgf@yc by-\tikz@lasty + \advance\tikz@lastx by\pgf@xc + \advance\tikz@lasty by\pgf@yc + \tikz@lastxsaved=\tikz@lastx + \tikz@lastysaved=\tikz@lasty + \tikz@updatecurrenttrue + \let\tikz@timer=\tikz@timer@cosine% %% Timer: new timer + \pgfpathcosine{\pgfqpoint{\pgf@xc}{\pgf@yc}}% + \tikz@scan@next@command +} + +\def\tikz@timer@rectangle{% + \pgfutil@tempdima\tikz@time pt + \ifdim\pgfutil@tempdima<.5pt\else % if we're at the return pos-ition we switch start and end + \advance\pgfutil@tempdima-.5pt + \let\pgf@tempa\tikz@timer@start + \let\tikz@timer@start\tikz@timer@end + \let\tikz@timer@end\pgf@tempa + \fi + \multiply\pgfutil@tempdima2 + \edef\tikz@time{\strip@pt\pgfutil@tempdima}% + \tikz@timer@hvline}% + +\def\tikz@parabola@semifinal#1{% + \tikz@flush@moveto + % Save original start: + \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% %% Timer: save start position + \pgf@xb=\tikz@lastx + \pgf@yb=\tikz@lasty + \tikz@make@last@position{#1}% + \edef\tikz@timer@end{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% %% Timer: save target position + \pgf@xc=\tikz@lastx + \pgf@yc=\tikz@lasty + \begingroup% now calculate bend: + \let\tikz@after@path\pgfutil@empty + \expandafter\tikzset\expandafter{\tikz@parabola@option}% + \tikz@lastxsaved=\tikz@parabola@bend@factor\tikz@lastx + \tikz@lastysaved=\tikz@parabola@bend@factor\tikz@lasty + \advance\tikz@lastxsaved by\pgf@xb + \advance\tikz@lastysaved by\pgf@yb + \advance\tikz@lastxsaved by-\tikz@parabola@bend@factor\pgf@xb + \advance\tikz@lastysaved by-\tikz@parabola@bend@factor\pgf@yb + \expandafter\tikz@make@last@position\expandafter{\tikz@parabola@bend}% + \edef\tikz@timer@middle{{\the\tikz@lastx}{\the\tikz@lasty}}% %% Timer: save bend postion + % Calculate delta from bend + \advance\pgf@xc by-\tikz@lastx + \advance\pgf@yc by-\tikz@lasty + % Ok, now calculate delta to bend + \advance\tikz@lastx by-\pgf@xb + \advance\tikz@lasty by-\pgf@yb + \edef\tikz@marshall{% + \noexpand\let\noexpand\tikz@timer\noexpand\tikz@timer@parabola + \noexpand\edef\noexpand\tikz@timer@middle{\noexpand\pgfqpoint\tikz@timer@middle}% + \noexpand\pgfpathparabola{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% + }% + \expandafter\endgroup% + \tikz@marshall + \expandafter\tikz@scan@next@command\tikz@after@path% +}% + +\def\tikz@timer@parabola{% following calculations, see \def of \pgfpathparabola in pgfcorepathconstruct.code.tex (l. 1261) + \ifdim\tikz@time pt<.5pt\relax % first part + \pgf@process{\tikz@timer@middle}% + \pgf@xc\pgf@x\pgf@yc\pgf@y + \pgf@xb\pgf@x\pgf@yb\pgf@y + \pgf@process{\tikz@timer@start}% + \advance\pgf@xc-\pgf@x\pgf@xc.1125\pgf@xc + \advance\pgf@xc\pgf@x % = start_x + .1125 (middle_x - start_x) + \advance\pgf@yc-\pgf@y\pgf@yc.225\pgf@yc + \advance\pgf@yc\pgf@y % = start_y + .225 (middle_y - start_y) + \advance\pgf@xb\pgf@x\pgf@xb.5\pgf@xb % = .5 (middle_x + start_x) = start_x + .5 (middle_x - start_x) + \pgf@xa=\tikz@time pt% + \pgf@xa=2\pgf@xa % = 2 * \tikz@time + \edef\tikz@marshall{\noexpand\pgftransformcurveattime{\strip@pt\pgf@xa}{\noexpand\tikz@timer@start}% + {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% + {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}% + {\noexpand\tikz@timer@middle}}% + \else % second part + \pgf@process{\tikz@timer@end}% + \pgf@xc\pgf@x + \pgf@xb\pgf@x + \pgf@yb\pgf@y + \pgf@process{\tikz@timer@middle}% + \advance\pgf@xc\pgf@x\pgf@xc.5\pgf@xc % = .5 (end_x + middle_x) = middle_x + .5 (end_x - middle_x) + \advance\pgf@xb-\pgf@x\pgf@xb.8875\pgf@xb + \advance\pgf@xb\pgf@x % = middle_x + .8875 (end_x - middle_x) + \advance\pgf@yb-\pgf@y\pgf@yb.775\pgf@yb + \advance\pgf@yb\pgf@y % = middle_y + .775 (end_y - middle_y) + \pgf@xa=\tikz@time pt% + \advance\pgf@xa-.5pt% + \pgf@xa=2\pgf@xa % = 2 (\tikz@zime - .5) + \edef\tikz@marshall{\noexpand\pgftransformcurveattime{\strip@pt\pgf@xa}{\noexpand\tikz@timer@middle}% + {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@y}}% + {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}% + {\noexpand\tikz@timer@end}}% + \fi + \tikz@marshall +} + +\def\tikz@timer@sine{% following calculations, see \def of \pgfpathsine in pgfcorepathconstruct.code.tex (l. 1315) + \pgf@process{\tikz@timer@end}% + \pgf@xc\pgf@x\pgf@yc\pgf@y + \pgf@xb\pgf@x\pgf@yb\pgf@y + \pgf@process{\tikz@timer@start}% + \advance\pgf@xc-\pgf@x\pgf@xc.3260\pgf@xc + \advance\pgf@xc\pgf@x % = start_x + .3260 (end_x - start_x) + \advance\pgf@yc-\pgf@y\pgf@yc.5120\pgf@yc + \advance\pgf@yc\pgf@y % = start_y + .5120 (end_y - start_y) + \advance\pgf@xb-\pgf@x\pgf@xb.6380\pgf@xb % = start_x + .6380 (end_x - start_x) + \advance\pgf@xb\pgf@x + \edef\tikz@marshall{\noexpand\pgftransformcurveattime{\tikz@time}{\noexpand\tikz@timer@start}% + {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% + {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}% + {\noexpand\tikz@timer@end}}% + \tikz@marshall +} +\def\tikz@timer@cosine{% following calculations, see \def of \pgfpathcosine in pgfcorepathconstruct.code.tex (l. 1345) + \pgf@process{\tikz@timer@end}% + \pgf@xc\pgf@x\pgf@yc\pgf@y + \pgf@xb\pgf@x\pgf@yb\pgf@y + \pgf@process{\tikz@timer@start}% + \advance\pgf@xb-\pgf@x\pgf@xb.6740\pgf@xb + \advance\pgf@xb\pgf@x % = start_x + .6740 (end_x - start_x) + \advance\pgf@yb-\pgf@y\pgf@yb.4880\pgf@yb + \advance\pgf@yb\pgf@y % = start_y + .4880 (end_y - start_y) + \advance\pgf@xc-\pgf@x\pgf@xc.3620\pgf@xc % = start_x + .3620 (end_x - start_x) + \advance\pgf@xc\pgf@x + \edef\tikz@marshall{\noexpand\pgftransformcurveattime{\tikz@time}{\noexpand\tikz@timer@start}% + {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@y}}% + {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}% + {\noexpand\tikz@timer@end}}% + \tikz@marshall +} +\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.patterns.images.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.patterns.images.code.tex new file mode 100644 index 0000000000..aa732ab835 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.patterns.images.code.tex @@ -0,0 +1,60 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +% This is the TikZ library patterns.images +% Load with \usetikzlibrary{patterns.images} +% +% Macro: +% - \pgfSetupImageAsPattern[]{}{} +% +% Keys are: +% - use image as pattern= +% - image as pattern= + +\def\pgfsetupimageaspattern{\pgfutil@ifnextchar[\tikzext@pgfsetupimageaspattern{\tikzext@pgfsetupimageaspattern[]}} +\def\tikzext@pgfsetupimageaspattern[#1]#2#3{% #1 = options + % #2 = image name + % #3 = file name + \pgfdeclareimage[#1]{tikzext@pgf@iap@#2}{#3}% + \sbox\pgfutil@tempboxa{\pgfuseimage{tikzext@pgf@iap@#2}}% + \expandafter\edef\csname tikzext@pgf@iap@#2@\endcsname{{\the\wd\pgfutil@tempboxa}{\the\ht\pgfutil@tempboxa}}% +} +\tikzset{ + image as pattern/name/.initial=, + image as pattern/option/.style=, + image as pattern/options/.style={/tikz/image as pattern/option/.append style={#1}}, + image as pattern/.default=, + image as pattern/.code={ + \pgfqkeys{/tikz/image as pattern}{#1}% + \pgfkeysgetvalue{/tikz/image as pattern/name}\tikz@temp + \pgfutil@ifxempty\tikz@temp{% + \tikzerror{You need to specify a name for the ``image-pattern'' to be used.}% + }{% + \edef\tikz@tempa{\expandafter\expandafter\expandafter\pgfutil@firstoftwo\csname tikzext@pgf@iap@\tikz@temp @\endcsname}% + \edef\tikz@tempb{\expandafter\expandafter\expandafter\pgfutil@secondoftwo\csname tikzext@pgf@iap@\tikz@temp @\endcsname}% + \pgfkeysalso{/tikz/path picture={% + \pgf@process{\pgfpointanchor{path picture bounding box}{north east}}% + \pgf@xa\pgf@x\pgf@ya\pgf@y + \pgf@process{\pgfpointanchor{path picture bounding box}{south west}}% + \pgf@xb\pgf@x\pgf@yb\pgf@y\pgf@yc\pgf@yb + \pgfutil@loop + {% + \pgfutil@loop + \expandafter\pgftext\expandafter[/tikz/image as pattern/option,at=\pgfqpoint{\pgf@xb}{\pgf@yb}]{\pgfuseimage{tikzext@pgf@iap@\tikz@temp}}% + \ifdim\pgf@yb<\pgf@ya + \advance\pgf@yb\tikz@tempb + \pgfutil@repeat + }% + \ifdim\pgf@xb<\pgf@xa + \advance\pgf@xb\tikz@tempa + \pgf@yb\pgf@yc + \pgfutil@repeat + }}% + } + } +} +\endinput diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.positioning-plus.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.positioning-plus.code.tex new file mode 100644 index 0000000000..98de181c27 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.positioning-plus.code.tex @@ -0,0 +1,262 @@ +% This is the TikZ library positioning-plus +% Load with \usetikzlibrary{positioning-plus} +% +% This small library extends TikZ options like 'above', 'left' or 'below right' +% so that they can be used with an optional prefixed factor seperated by ':' (colon) +% +% The option 'left=.5:of somenode' will place +% a new node .5cm (default 'node distance' is '1cm and 1cm') left to (somenode). +% The option 'above right=.2 and .7:of someothernode' will place +% a new node .2cm above and .7cm right of (someothernode). +% +% Additional the options 'xshift*' and 'yshift*' add an additional shift +% as a factor of 'node distance' +% Inspired by http://tex.stackexchange.com/a/117610/16595 + +\usetikzlibrary{positioning} +\usetikzlibrary{fit} + +\pgfdeclaregenericanchor{corner south east}{% + \pgf@sh@reanchor{#1}{south}% + \pgf@ya\pgf@y + \pgf@process{\pgf@sh@reanchor{#1}{east}}% + \pgf@y\pgf@ya +} +\pgfdeclaregenericanchor{corner north east}{% + \pgf@sh@reanchor{#1}{north}% + \pgf@ya\pgf@y + \pgf@process{\pgf@sh@reanchor{#1}{east}}% + \pgf@y\pgf@ya +} +\pgfdeclaregenericanchor{corner south west}{% + \pgf@sh@reanchor{#1}{south}% + \pgf@ya\pgf@y + \pgf@process{\pgf@sh@reanchor{#1}{west}}% + \pgf@y\pgf@ya +} +\pgfdeclaregenericanchor{corner north west}{% + \pgf@sh@reanchor{#1}{north}% + \pgf@ya\pgf@y + \pgf@process{\pgf@sh@reanchor{#1}{west}}% + \pgf@y\pgf@ya +} + +\tikzset{corner above left/.code=\tikz@lib@place@handle@{#1}{corner south east}{-1}{1}{corner north west}{0.707106781}} +\tikzset{corner above right/.code=\tikz@lib@place@handle@{#1}{corner south west}{1}{1}{corner north east}{0.707106781}} +\tikzset{corner below left/.code=\tikz@lib@place@handle@{#1}{corner north east}{-1}{-1}{corner south west}{0.707106781}} +\tikzset{corner below right/.code=\tikz@lib@place@handle@{#1}{corner north west}{1}{-1}{corner south east}{0.707106781}} + +\tikzset{corner north left/.code =\tikz@lib@place@handle@{#1}{corner north east}{-1}{0}{corner north west}{1}} +\tikzset{corner north right/.code=\tikz@lib@place@handle@{#1}{corner north west}{1}{0}{corner north east}{1}} +\tikzset{corner south left/.code =\tikz@lib@place@handle@{#1}{corner south east}{-1}{0}{corner south west}{1}} +\tikzset{corner south right/.code=\tikz@lib@place@handle@{#1}{corner south west}{1}{0}{corner south east}{1}} + +\tikzset{corner west above/.code =\tikz@lib@place@handle@{#1}{corner south west}{0}{1}{corner north west}{1}} +\tikzset{corner west below/.code=\tikz@lib@place@handle@{#1}{corner north west}{0}{-1}{corner south west}{1}} +\tikzset{corner east above/.code =\tikz@lib@place@handle@{#1}{corner south east}{0}{1}{corner north east}{1}} +\tikzset{corner east below/.code=\tikz@lib@place@handle@{#1}{corner north east}{0}{-1}{corner south east}{1}} + +\tikzset{north left/.code =\tikz@lib@place@handle@{#1}{north east}{-1}{0}{north west}{1}} +\tikzset{north right/.code=\tikz@lib@place@handle@{#1}{north west}{1}{0}{north east}{1}} +\tikzset{south left/.code =\tikz@lib@place@handle@{#1}{south east}{-1}{0}{south west}{1}} +\tikzset{south right/.code=\tikz@lib@place@handle@{#1}{south west}{1}{0}{south east}{1}} + +\tikzset{west above/.code =\tikz@lib@place@handle@{#1}{south west}{0}{1}{north west}{1}} +\tikzset{west below/.code=\tikz@lib@place@handle@{#1}{north west}{0}{-1}{south west}{1}} +\tikzset{east above/.code =\tikz@lib@place@handle@{#1}{south east}{0}{1}{north east}{1}} +\tikzset{east below/.code=\tikz@lib@place@handle@{#1}{north east}{0}{-1}{south east}{1}} + +\newif\iftikzext@tikz@lib@place@postransform +\tikzset{node distance transformation/.is if=qrr@tikz@lib@place@postransform} +\def\tikz@lib@place@handle@@#1#2#3#4{% + \pgfutil@in@{of }{#1}% + \ifpgfutil@in@ + \tikz@lib@place@of#1\tikz@stop{#4}% + \else + \edef\tikz@lib@place@nums{#1}% + \fi + \ifx\tikz@lib@place@nums\pgfutil@empty + % Ok, nothing to do, we have set the anchor and we are happy... + \else + \expandafter\tikz@lib@place@parse@nums\expandafter{\tikz@lib@place@nums}% + \pgf@x=#2\pgf@x + \pgf@y=#3\pgf@y + \iftikzext@tikz@lib@place@postransform + \pgf@pos@transform{\pgf@x}{\pgf@y}% change from original + \fi + \edef\tikz@lib@pos@call{\noexpand\pgftransformshift{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}% + \fi +} + +\def\tikz@lib@place@handle@#1#2#3#4#5#6{% + \pgfutil@in@{:}{#1}% + \ifpgfutil@in@ + \tikzext@lib@place@handle@#1\tikz@stop + \ifx\pgf@temp\pgfutil@empty + \let\pgf@temp\tikz@node@distance + \fi + \pgfmathsetmacro\pgf@tempa{(\pgf@tempa)*#4}% + \pgfmathsetmacro\pgf@tempb{(\pgf@tempb)*#3}% + \edef\pgf@marshal{\noexpand\tikz@lib@place@handle@{\pgf@temp}{#2}{\pgf@tempb}{\pgf@tempa}{#5}{#6}}% + \pgf@marshal + \else + \def\tikz@anchor{#2}% + \let\tikz@do@auto@anchor=\relax + \edef\tikz@temp{#1}% + \def\tikz@lib@place@single@factor{#6}% + \expandafter\tikz@lib@place@handle@@\expandafter{\tikz@temp}{#3}{#4}{#5}% + \fi +} +\def\tikzext@lib@place@handle@#1:#2\tikz@stop{% + \pgfutil@in@{and}{#1}% + \ifpgfutil@in@ + \tikzext@lib@place@handle@@#1\tikz@stop + \else + \tikzext@lib@place@handle@@#1and#1\tikz@stop + \fi + \def\pgf@temp{#2}% +} +\def\tikzext@lib@place@handle@@#1and#2\tikz@stop{% + \def\pgf@tempa{#1}% + \def\pgf@tempb{#2}% +} +\def\tikzext@xyshift@starred#1#2#3{% + \edef\tikz@marshal{\noexpand\pgfutil@in@{and}{\tikz@node@distance}}% + \tikz@marshal + \ifpgfutil@in@ + \expandafter\tikzext@lib@place@handle@@\tikz@node@distance\tikz@stop + \else + \let#3\tikz@node@distance + \fi + \pgfmathparse{(#1)*#3}% + \ifpgfmathunitsdeclared + \if#2x% + \pgftransformshift{\pgfqpoint{\pgfmathresult pt}{0pt}}% + \else + \pgftransformshift{\pgfqpoint{0pt}{\pgfmathresult pt}}% + \fi + \else + \ifx#2x% + \pgf@process{\pgfqpointxy{\pgfmathresult}{0}}% + \else + \pgf@process{\pgfqpointxy{0}{\pgfmathresult}}% + \fi + \pgftransformshift{\pgfqpoint{\pgf@x}{\pgf@y}}% + \fi} +\tikzset{ + xshift*/.code=\tikzext@xyshift@starred{#1}x\pgf@tempb, + yshift*/.code=\tikzext@xyshift@starred{#1}y\pgf@tempa +} + +\def\pgfutil@firstofmany#1#2\pgf@stop{#1} +\def\pgfutil@secondofmany#1#2\pgf@stop{#2} +\def\tikz@lib@place@of@#1#2#3{% + \def\pgf@tempa{fit bounding box}% + \edef\pgf@temp{\expandafter\pgfutil@firstofmany#2\pgf@stop} + \if\pgf@temp(% + \tikz@lib@place@fit@scan{#2}{0}% + \else\if\pgf@temp|% + \expandafter\tikz@lib@place@fit@scan\expandafter{\pgfutil@secondofmany#2\pgf@stop}{1}% + \else\ifx\pgf@temp\tikz@activebar + \expandafter\tikz@lib@place@fit@scan\expandafter{\pgfutil@secondofmany#2\pgf@stop}{1}% + \else\if\pgf@temp-% + \expandafter\tikz@lib@place@fit@scan\expandafter{\pgfutil@secondofmany#2\pgf@stop}{2}% + \else\if\pgf@temp+% + \expandafter\tikz@lib@place@fit@scan\expandafter{\pgfutil@secondofmany#2\pgf@stop}{3}% + \else + \def\pgf@tempa{#2}% + \fi + \fi + \fi + \fi + \fi + \expandafter\tikz@scan@one@point\expandafter\tikz@lib@place@remember\expandafter(\pgf@tempa)% + \iftikz@shapeborder% + % Ok, this is relative to a border. + \iftikz@lib@ignore@size% + \edef\tikz@node@at{\noexpand\pgfpointanchor{\tikz@shapeborder@name}{center}}% + \def\tikz@anchor{center}% + \else% + \edef\tikz@node@at{\noexpand\pgfpointanchor{\tikz@shapeborder@name}{#3}}% + \fi% + \fi% + \edef\tikz@lib@place@nums{#1}% +} +\def\tikz@lib@place@fit@scan#1#2{% + \pgf@xb=-16000pt\relax% + \pgf@xa=16000pt\relax% + \pgf@yb=-16000pt\relax% + \pgf@ya=16000pt\relax% + \if\pgfutil@firstofmany#1\pgf@stop(% + \tikz@lib@fit@scan#1\pgf@stop% + \else + \tikz@lib@fit@scan(#1)\pgf@stop + \fi + \ifdim\pgf@xa>\pgf@xa + % shouldn't happen + \else + \expandafter\def\csname pgf@sh@ns@fit bounding box\endcsname{rectangle}% + \expandafter\edef\csname pgf@sh@np@fit bounding box\endcsname{% + \def\noexpand\southwest{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}% + \def\noexpand\northeast{\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}% + }% + \expandafter\def\csname pgf@sh@nt@fit bounding box\endcsname{{1}{0}{0}{1}{0pt}{0pt}}% + \expandafter\def\csname pgf@sh@pi@fit bounding box\expandafter\endcsname\expandafter{\pgfpictureid}% + \ifcase#2\relax + \or % 1 = vertical + \pgf@y=\pgf@yb% + \advance\pgf@y by-\pgf@ya% + \edef\pgf@marshal{\noexpand\pgfset{minimum height={\the\pgf@y-2*(\noexpand\pgfkeysvalueof{/pgf/outer ysep})}}}% + \pgf@marshal + \or % 2 = horizontal + \pgf@x=\pgf@xb% + \advance\pgf@x by-\pgf@xa% + \edef\pgf@marshal{\noexpand\pgfset{minimum width={\the\pgf@x-2*(\noexpand\pgfkeysvalueof{/pgf/outer xsep})}}}% + \pgf@marshal + \or % 3 = both directions + \pgf@y=\pgf@yb% + \advance\pgf@y by-\pgf@ya% + \pgf@x=\pgf@xb% + \advance\pgf@x by-\pgf@xa% + \edef\pgf@marshal{\noexpand\pgfset{minimum height={\the\pgf@y-2*(\noexpand\pgfkeysvalueof{/pgf/outer ysep})},minimum width={\the\pgf@x-2*(\noexpand\pgfkeysvalueof{/pgf/outer xsep})}}}% + \pgf@marshal + \fi + \fi +} +\tikzset{ + fit bounding box/.code={\tikz@lib@place@fit@scan{#1}{0}}, + span vertical/.code={\tikz@lib@place@fit@scan{#1}{1}}, + span horizontal/.code={\tikz@lib@place@fit@scan{#1}{2}}, + span/.code={\tikz@lib@place@fit@scan{#1}{3}}} + +\pgfmathdeclarefunction{x_node_dist}{0}{% + \begingroup + \edef\pgfmath@temp{\noexpand\pgfutil@in@{and}{\tikz@node@distance}}% + \pgfmath@temp\ifpgfutil@in@ + \expandafter\tikzext@lib@place@handle@@\tikz@node@distance\tikz@stop + \else + \let\pgf@tempb\tikz@node@distance + \fi + \pgfmathparse{\pgf@tempb}% + \pgfmath@smuggleone\pgfmathresult + \endgroup +} +\pgfmathdeclarefunction{y_node_dist}{0}{% + \begingroup + \edef\pgfmath@temp{\noexpand\pgfutil@in@{and}{\tikz@node@distance}}% + \pgfmath@temp\ifpgfutil@in@ + \expandafter\tikzext@lib@place@handle@@\tikz@node@distance\tikz@stop + \else + \let\pgf@tempa\tikz@node@distance + \fi + \pgfmathparse{\pgf@tempa}% + \pgfmath@smuggleone\pgfmathresult + \endgroup +} +%\tikzdeclarecoordinatesystem{node distance}{% +% \tikz@cs@nd#1\tikz@stop} +%\def\tikz@cs@nd#1,#2\tikz@stop{% +% \def\tikzext@xyshift@starred@action##1{\pgftransformshift{##1}}% +% \tikzext@xyshift@starred{#1}x\pgf@tempb +% \tikzext@xyshift@starred{#2}y\pgf@tempa} +\endinput diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.topaths.arcthrough.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.topaths.arcthrough.code.tex new file mode 100644 index 0000000000..d90a2edc78 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.topaths.arcthrough.code.tex @@ -0,0 +1,50 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\pgfqkeys{/tikz/arc through}{ + .unknown/.code=\pgfkeyssetevalue{/tikz/arc through/through}{\pgfkeyscurrentname}, + through/.initial={(0,0)}, + center suffix/.initial=, + clockwise/.code=% + \def\tikz@arcthrough@clockwise{% + \pgfmathsubtract@{\pgfkeysvalueof{/tikz/end angle}}{360}% + \pgfkeyssetevalue{/tikz/end angle}{+\pgfmathresult}}, + counter clockwise/.code=\let\tikz@arcthrough@clockwise\relax, + clockwise/.value forbidden, counter clockwise/.value forbidden, counter clockwise} +\tikzset{ + arc through/.code={% + \tikzset{every arc through/.try}% + \pgfqkeys{/tikz/arc through}{#1}% + \pgfkeysgetvalue{/tikz/arc through/through}\tikz@temp + \pgfextract@process\pgf@tostart{\tikz@scan@one@point\pgfutil@firstofone(\tikztostart)\relax}% + \expandafter\pgfextract@process\expandafter\pgf@tothrough\expandafter + {\expandafter\tikz@scan@one@point\expandafter\pgfutil@firstofone\tikz@temp\relax}% + \pgfextract@process\pgf@totarget{\tikz@scan@one@point\pgfutil@firstofone(\tikztotarget)\relax}% + \pgfextract@process\pgf@topointMidA{\pgfpointlineattime{.5}{\pgf@tostart}{\pgf@tothrough}}% + \pgfextract@process\pgf@topointMidB{\pgfpointlineattime{.5}{\pgf@totarget}{\pgf@tothrough}}% + \pgfextract@process\pgf@tocenter{% + \pgfpointintersectionoflines + {\pgf@topointMidA}{\pgfmathrotatepointaround{\pgf@tothrough}{\pgf@topointMidA}{90}}% + {\pgf@topointMidB}{\pgfmathrotatepointaround{\pgf@tothrough}{\pgf@topointMidB}{90}}}% + \pgfcoordinate{arc through center\pgfkeysvalueof{/tikz/arc through/center suffix}}{\pgf@tocenter}% + \pgfpointdiff{\pgf@tocenter}{\pgf@tostart}% + \pgfmathveclen@{\pgfmath@tonumber\pgf@x}{\pgfmath@tonumber\pgf@y}% + \pgfkeyssetevalue{/tikz/x radius}{+\pgfmathresult pt}% + \pgfkeyssetevalue{/tikz/y radius}{+\pgfmathresult pt}% + \pgfmathanglebetweenpoints{\pgf@tocenter}{\pgf@totarget}% + \pgfkeyssetevalue{/tikz/end angle}{+\pgfmathresult}% + \pgfmathanglebetweenpoints{\pgf@tocenter}{\pgf@tostart}% + \ifdim\pgfmathresult pt>\pgfkeysvalueof{/tikz/end angle}pt\relax + \pgfmathsubtract@{\pgfmathresult}{360}% + \fi + \pgfkeyssetevalue{/tikz/start angle}{+\pgfmathresult}% + \tikz@arcthrough@clockwise + \pgfkeyslet{/tikz/delta angle}\pgfutil@empty + \def\tikz@to@path{arc[]\tikztonodes}% + }% +} diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.transformations.mirror.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.transformations.mirror.code.tex new file mode 100644 index 0000000000..026b39ab2f --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikz-ext/tikzlibraryext.transformations.mirror.code.tex @@ -0,0 +1,130 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\usepgflibrary{ext.transformations.mirror} +\tikzset{ + mirror/.code={% + \pgfutil@in@{--}{#1}% + \ifpgfutil@in@ + \tikzext@trans@mirror#1\tikz@stop + \else + \tikz@addtransform{\tikz@scan@one@point\pgfqtransformmirror#1\relax}% + \fi}, + ymirror/.code={\pgfutil@ifnextchar(\tikzext@trans@ymirror@coordinate\tikzext@trans@ymirror@simple#1\tikz@stop}, + xmirror/.code={\pgfutil@ifnextchar(\tikzext@trans@xmirror@coordinate\tikzext@trans@xmirror@simple#1\tikz@stop}, + mirror x/.code={% + \pgfextract@process\tikz@temp{\tikz@scan@one@point\pgfutil@firstofone#1\relax}% + \edef\tikz@marshal{% + \noexpand\tikz@addtransform{% + \noexpand\pgftransformmirror + {\expandafter\noexpand\tikz@temp} + {\noexpand\pgfpointadd{\expandafter\noexpand\tikz@temp} + {\noexpand\pgfqpointxy{0}{1}}}}}% + \tikz@marshal + }, + mirror y/.code={% + \pgfextract@process\tikz@temp{\tikz@scan@one@point\pgfutil@firstofone#1\relax}% + \edef\tikz@marshal{% + \noexpand\tikz@addtransform{% + \noexpand\pgftransformmirror + {\expandafter\noexpand\tikz@temp} + {\noexpand\pgfpointadd{\expandafter\noexpand\tikz@temp} + {\noexpand\pgfqpointxy{1}{0}}}}}% + \tikz@marshal + }, + mirror/.value required, + ymirror/.default=+0pt, + xmirror/.default=+0pt, + mirror x/.default={(0,0)}, + mirror y/.default={(0,0)}% +} +\def\tikzext@trans@mirror#1--#2\tikz@stop{% + \tikz@addtransform{% + \pgftransformmirror{\tikz@scan@one@point\pgfutil@firstofone#1\relax} + {\tikz@scan@one@point\pgfutil@firstofone#2\relax}}} +\def\tikzext@trans@xmirror@simple#1\tikz@stop{\tikz@addtransform{\pgftransformxmirror{#1}}} +\def\tikzext@trans@ymirror@simple#1\tikz@stop{\tikz@addtransform{\pgftransformymirror{#1}}} +\def\tikzext@trans@xmirror@coordinate#1\tikz@stop{% + \tikz@scan@one@point\pgfutil@firstofone#1\relax + \edef\tikz@marshal{% + \noexpand\tikz@addtransform{% + \noexpand\pgftransformxmirror{+\the\pgf@x}% + }% + }% + \tikz@marshal +} +\def\tikzext@trans@ymirror@coordinate#1\tikz@stop{% + \tikz@scan@one@point\pgfutil@firstofone#1\relax + \edef\tikz@marshal{% + \noexpand\tikz@addtransform{% + \noexpand\pgftransformymirror{+\the\pgf@y}% + }% + }% + \tikz@marshal +} + +\tikzset{ + Mirror/.code={% + \pgfutil@in@{--}{#1}% + \ifpgfutil@in@ + \tikzext@trans@Mirror#1\tikz@stop + \else + \tikz@addtransform{\tikz@scan@one@point\pgfqtransformMirror#1\relax}% + \fi}, + yMirror/.code={\pgfutil@ifnextchar(\tikzext@trans@yMirror@coordinate\tikzext@trans@yMirror@simple#1\tikz@stop}, + xMirror/.code={\pgfutil@ifnextchar(\tikzext@trans@xMirror@coordinate\tikzext@trans@xMirror@simple#1\tikz@stop}, + Mirror x/.code={% + \pgfextract@process\tikz@temp{\tikz@scan@one@point\pgfutil@firstofone#1\relax}% + \edef\tikz@marshal{% + \noexpand\tikz@addtransform{% + \noexpand\pgftransformMirror + {\expandafter\noexpand\tikz@temp} + {\noexpand\pgfpointadd{\expandafter\noexpand\tikz@temp} + {\noexpand\pgfqpointxy{0}{1}}}}}% + \tikz@marshal + }, + Mirror y/.code={% + \pgfextract@process\tikz@temp{\tikz@scan@one@point\pgfutil@firstofone#1\relax}% + \edef\tikz@marshal{% + \noexpand\tikz@addtransform{% + \noexpand\pgftransformMirror + {\expandafter\noexpand\tikz@temp} + {\noexpand\pgfpointadd{\expandafter\noexpand\tikz@temp} + {\noexpand\pgfqpointxy{1}{0}}}}}% + \tikz@marshal + }, + Mirror/.value required, + yMirror/.default=+0pt, + xMirror/.default=+0pt, + Mirror x/.default={(0,0)}, + Mirror y/.default={(0,0)}% +} +\def\tikzext@trans@Mirror#1--#2\tikz@stop{% + \tikz@addtransform{% + \pgftransformMirror{\tikz@scan@one@point\pgfutil@firstofone#1\relax} + {\tikz@scan@one@point\pgfutil@firstofone#2\relax}}} +\def\tikzext@trans@xMirror@simple#1\tikz@stop{\tikz@addtransform{\pgftransformxMirror{#1}}} +\def\tikzext@trans@yMirror@simple#1\tikz@stop{\tikz@addtransform{\pgftransformyMirror{#1}}} +\def\tikzext@trans@xMirror@coordinate#1\tikz@stop{% + \tikz@scan@one@point\pgfutil@firstofone#1\relax + \edef\tikz@marshal{% + \noexpand\tikz@addtransform{% + \noexpand\pgftransformxMirror{+\the\pgf@x}% + }% + }% + \tikz@marshal +} +\def\tikzext@trans@yMirror@coordinate#1\tikz@stop{% + \tikz@scan@one@point\pgfutil@firstofone#1\relax + \edef\tikz@marshal{% + \noexpand\tikz@addtransform{% + \noexpand\pgftransformyMirror{+\the\pgf@y}% + }% + }% + \tikz@marshal +} +\endinput diff --git a/graphics/pgf/contrib/tikz-ext/tex/latex/tikz-ext/pgfcalendar-ext.sty b/graphics/pgf/contrib/tikz-ext/tex/latex/tikz-ext/pgfcalendar-ext.sty new file mode 100644 index 0000000000..a0f5ef3bc0 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/latex/tikz-ext/pgfcalendar-ext.sty @@ -0,0 +1,11 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\RequirePackage{pgfcalendar} +\input{pgfcalendar-ext.code.tex} +\endinput diff --git a/graphics/pgf/contrib/tikz-ext/tex/plain/tikz-ext/pgfcalendar-ext.tex b/graphics/pgf/contrib/tikz-ext/tex/plain/tikz-ext/pgfcalendar-ext.tex new file mode 100644 index 0000000000..30c44187a4 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/plain/tikz-ext/pgfcalendar-ext.tex @@ -0,0 +1,13 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\input pgfcalendar.text +\catcode`\@=11 +\input pgfcalendar-ext.code.tex +\catcode`\@=\pgfcalendaratcode +\endinput diff --git a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.calendar-plus.code.tex b/graphics/pgf/contrib/tikz-ext/tikzlibraryext.calendar-plus.code.tex deleted file mode 100644 index 195ecf9414..0000000000 --- a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.calendar-plus.code.tex +++ /dev/null @@ -1,93 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\usetikzlibrary{calendar} -\pgfutil@usemodule{pgfcalendar-ext} - -% Shift between days - -\def\tikz@lib@cal@xshift{\pgfkeysvalueof{/tikz/day xshift}} -\def\tikz@lib@cal@yshift{\pgfkeysvalueof{/tikz/day yshift}} -\tikzset{day xshift/.initial=3ex,day yshift/.initial=3.5ex} - -% Shift between months - -\def\tikz@lib@cal@month@xshift{\pgfkeysvalueof{/tikz/month xshift}} -\def\tikz@lib@cal@month@yshift{\pgfkeysvalueof{/tikz/month yshift}} -\tikzset{month xshift/.initial=9ex,month yshift/.initial=9ex} - -% Internal option for storing the "width" of a calendar as a number of -% days - -\def\tikz@lib@cal@width{\pgfkeysvalueof{/tikz/tikz@lib@cal@width}} -\tikzset{tikz@lib@cal@width/.initial=1} - -% Weeks - -\def\tikzweekcode{\pgfkeysvalueof{/tikz/week code}} -\def\tikzweektext{\pgfkeysvalueof{/tikz/week text}} - -\tikzset{ - week code/.initial={% - \node[every week]{\pgfkeysvalueof{/tikz/week text}};}, - week text/.initial={\%n=}, - every week/.style=, - week label left/.style={ - every week/.append style={ - anchor=base east, - xshift=-1.25*\pgfkeysvalueof{/tikz/day xshift}}, - execute before day scope=% - \ifdate{Monday, equals=\pgfcalendarbeginiso}{\tikzweekcode}{}}} - -% -% Overwriting original \tikz@lib@cal@if@else@code -% -\def\tikz@lib@cal@if@else@code#1#2#3{% - \pgfutil@addto@macro\tikz@lib@cal@ifs{\ifdate{#1}{#2}{#3}}% - \tikz@lib@cal@scanner% -} - -% -% Overwriting original \tikz@lib@cal@stop -% -\def\tikz@lib@cal@stop{% - \pgftransformshift{\tikz@node@at}% - \expandafter\pgfcalendar\expandafter{\tikz@fig@name}{\tikz@lib@cal@start}{\tikz@lib@cal@end}% - {% - \tikz@before@day% - \scope% - \tikz@atbegin@day% - \let\pgfutil@addto@macro\pgfutil@secondoftwo - \tikz@lib@cal@ifs% - \tikzdaycode% - \tikz@atend@day% - \endscope% - \tikz@after@day% - }% - \endgroup% -} - -\def\pgfutil@addto@macro#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}} - -\pgfmathdeclarefunction{weeksinmonthofyear}{3}{% #1 = first weekday, #2 = month, #3 = year - \begingroup - \pgfmathlastdayinmonthofyear@{#2}{#3}% - \pgfmathadd@{#1}{\pgfmathresult}% - \pgfmathdivide@{\pgfmathresult}{7}% - \pgfmathceil@{\pgfmathresult}% - \pgfmathint@{\pgfmathresult}% - \pgfmathsmuggle\pgfmathresult - \endgroup -} -\pgfmathdeclarefunction{lastdayinmonthofyear}{2}{% #1 = month, #2 = year - \begingroup - \pgfcalendar@getlastYMX{#2}{#1}{\pgfutil@tempcnta}% - \edef\pgfmathresult{\the\pgfutil@tempcnta}% - \pgfmathsmuggle\pgfmathresult - \endgroup -} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.misc.code.tex b/graphics/pgf/contrib/tikz-ext/tikzlibraryext.misc.code.tex deleted file mode 100644 index 830b3513e5..0000000000 --- a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.misc.code.tex +++ /dev/null @@ -1,251 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -%% full arc -%% https://tex.stackexchange.com/a/144297/16595 -%% The postfix operator R is added to PGFmath, -%% it allows the use of angular segments. -%% full arc = 10 makes it so that -%% 1R = 36° -%% 2R = 72° -%% … -%% 10R = 360° -%% Calling the full arc key with an empty value -%% makes 1R = 1° -\pgfset{full arc/.code=% - \def\pgf@temp{#1}% - \ifx\pgfutil@empty\pgf@temp - \let\pgfmath@fullarc@factor\pgfutil@empty - \else - \pgfmathsetmacro\pgfmath@fullarc@factor{360/(#1)}% - \fi,full arc=} -\pgfmathdeclareoperator{R}{full arc}{1}{postfix}{950} -\pgfmathdeclarefunction{full arc}{1}{% - \begingroup - \pgfmath@x=#1pt\relax - \ifx\pgfmath@fullarc@factor\pgfutil@empty\else - \pgfmath@x\pgfmath@fullarc@factor\pgfmath@x - \fi - \pgfmath@returnone\pgfmath@x - \endgroup} - -%% foreach -%% http://tex.stackexchange.com/a/126418/16595 -%% instead of \foreach \var in {start, start + delta, ..., end} -%% this allows to use \foreach[use int={start to end step delta}] without(!) a list in {} -%% the values start, end and delta are evaluated by PGFmath at the start of the loop. -%% In addition to use int, there's also use float. -\newif\iftikzext@pgf@foreach@no@list -\pgfqkeys{/pgf/foreach}{ - use int/.code={% - \tikzext@pgf@foreach@no@list@parse@to\pgfmathtruncatemacro#1\pgffor@stop - }, - use float/.code={% - \tikzext@pgf@foreach@no@list@parse@to\pgfmathsetmacro#1\pgffor@stop - } -} - -\def\tikzext@pgf@foreach@no@list@parse@to#1#2to#3\pgffor@stop{% - \tikzext@pgf@foreach@no@listtrue - #1\foreachStart{#2}% - \pgfutil@in@{step}{#3} - \ifpgfutil@in@ - \tikzext@pgf@foreach@no@list@parse@step{#1}#3\pgffor@stop - \else - \tikzext@pgf@foreach@no@list@parse@step{#1}#3step1\pgffor@stop - \fi - \edef\tikzext@pgf@foreach@no@list@list{\foreachStart,\foreachSecond,...,\foreachEnd}% -} -\def\tikzext@pgf@foreach@no@list@parse@step#1#2step#3\pgffor@stop{% - #1\foreachEnd{#2}% - #1\foreachSecond{\foreachStart+#3}% -} -\def\pgffor@vars{% manually extended, better etoolbox - \pgfutil@ifnextchar i{\pgffor@@vars@end}{% - \pgfutil@ifnextchar[{\pgffor@@vars@opt}{%] - \pgfutil@ifnextchar/{\pgffor@@vars@slash@gobble}{% - \iftikzext@pgf@foreach@no@list\expandafter\pgfutil@firstoftwo\else - \expandafter\pgfutil@secondoftwo\fi - {\tikzext@pgf@foreach@no@listfalse\pgffor@macro@list\tikzext@pgf@foreach@no@list@list} - {\pgffor@@vars}}}}}% - -%% Handlers -%% .pgfmath evaluates values given to keys in PGFmath before handing them over. -%% .pgfmath int truncates the result -%% .pgfmath strcat concatenates the given values -\pgfkeys{/handlers/.pgfmath/.code=\pgfmathparse{#1}\expandafter\pgfkeys@exp@call\expandafter{\pgfmathresult}} -\pgfkeys{/handlers/.pgfmath int/.code=\pgfmathint{#1}\expandafter\pgfkeys@exp@call\expandafter{\pgfmathresult}} -\pgfkeys{/handlers/.pgfmath strcat/.code=\pgfmathstrcat{#1}\expandafter\pgfkeys@exp@call\expandafter{\pgfmathresult}} - -%% http://tex.stackexchange.com/a/144187/16595 -%% key/.List={(point-1),(point-2),(point-...),(point-6)} will call -%% key=(point-1)(point-2)(point-3)(point-4)(point-5),(point-6) -\pgfkeys{/handlers/.List/.code={% - \let\pgfkeys@global@temp\pgfutil@empty - \foreach \pgfkeys@temp in{#1}{ - \ifx\pgfkeys@global@temp\pgfutil@empty - \global\let\pgfkeys@global@temp\pgfkeys@temp - \else - \expandafter\pgfutil@g@addto@macro\expandafter\pgfkeys@global@temp\expandafter - {\pgfkeys@temp}% - \fi}% - \expandafter\pgfkeys@exp@call\expandafter{\pgfkeys@global@temp}}} - -%% PGFmath -%% strrepeat("x", 5) = "xxxxx" -\pgfmathdeclarefunction{strrepeat}{2}{% - \begingroup\pgfmathint{#2}\pgfmath@count\pgfmathresult - \let\pgfmathresult\pgfutil@empty - \pgfutil@loop\ifnum\pgfmath@count>0\relax - \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult#1}% - \advance\pgfmath@count-1\relax - \pgfutil@repeat\pgfmath@smuggleone\pgfmathresult\endgroup} - -%% isInString("foo", "foobar") = true (= 1) -%% isInString("boo", "foobar") = false (= 0) -\pgfmathdeclarefunction{isInString}{2}{% - \pgfutil@in@{#1}{#2}% - \ifpgfutil@in@\def\pgfmathresult{1}\else\def\pgfmathresult{0}\fi} - -%% strcat("foo", "bar") = "foobar" (can have more than two parameters) -\pgfutil@IfUndefined{pgfmathstrcat@}{ - \pgfmathdeclarefunction{strcat}{...}{% - \begingroup - \let\pgfmathresult\pgfutil@empty - \pgfmathstrcat@@#1\pgfmath@stop} - \def\pgfmathstrcat@@#1{% - \ifx\pgfmath@stop#1% - \def\pgfmath@next{\pgfmath@smuggleone\pgfmathresult\endgroup} - \else - \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult#1}% - \let\pgfmath@next\pgfmathstrcat@@ - \fi - \pgfmath@next} -}{} - -% http://tex.stackexchange.com/questions/244569/bounding-lines-around-tax-nodes/244619#244619 -\pgfmathdeclarefunction{atanXY}{2}{\pgfmathatantwo@{#2}{#1}} -\pgfmathdeclarefunction{atanYX}{2}{\pgfmathatantwo@{#1}{#2}} - -%% http://tex.stackexchange.com/a/132939/16595 -\tikzset{ - @edges through/.code={{{% three braces to protect \pgfeov - \pgfutil@ifnextchar[{\pgfkeysvalueof{/tikz/@@edges through/.@cmd}} - {\pgfkeysvalueof{/tikz/@@edges through/.@cmd}[]}#1\pgfeov}}}, - @@edges through/.style args={[#1]#2}{/tikz/insert path={edge[#1] (#2) (#2)}}, - edges through/.style={/tikz/@edges through/.list={#1}}} -\tikzset{ - @edges to/.code={{{% three braces to protect \pgfeov - \pgfutil@ifnextchar[{\pgfkeysvalueof{/tikz/@@edges to/.@cmd}} - {\pgfkeysvalueof{/tikz/@@edges to/.@cmd}[]}#1\pgfeov}}}, - @@edges to/.style args={[#1]#2}{/tikz/insert path={edge[#1] (#2)}}, - edges to/.style={/tikz/@edges to/.list={#1}}} -\tikzset{ - @tos to/.code={{{% three braces to protect \pgfeov - \pgfutil@ifnextchar[{\pgfkeysvalueof{/tikz/@@tos to/.@cmd}} - {\pgfkeysvalueof{/tikz/@@tos to/.@cmd}[]}#1\pgfeov}}}, - @@tos to/.style args={[#1]#2}{/tikz/insert path={to[#1] (#2)}}, - tos to/.style={/tikz/@tos to/.list={#1}}} - - -\pgfmathdeclarefunction{distancebetween}{2}{% only coordinates/nodes - \begingroup - \pgfpointdiff{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}}% - \edef\pgfmath@temp{{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}}% - \expandafter\pgfmathveclen@\pgfmath@temp - \pgfmath@smuggleone\pgfmathresult - \endgroup} -\pgfmathdeclarefunction{qdistancebetween}{1}{% only coordinates/nodes - \begingroup - \pgfpointdiff{\pgfpointorigin}{\pgfpointanchor{#1}{center}}% - \edef\pgfmath@temp{{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}}% - \expandafter\pgfmathveclen@\pgfmath@temp - \pgfmath@smuggleone\pgfmathresult - \endgroup} - -\pgfmathdeclarefunction{qanglebetween}{1}{% - \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfpointanchor{#1}{center}}} - -\pgfmathdeclarefunction{anglebetween}{2}{% - \pgfmathanglebetweenpoints{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}}} - -\pgfmathdeclarefunction{isEmpty}{1}{% - \begingroup - \edef\pgfmath@temp{#1}% - \pgfutil@ifxempty\pgfmath@temp{\def\pgfmathresult{1}}{\def\pgfmathresult{0}}% - \pgfmath@smuggleone\pgfmathresult - \endgroup} - -\pgfqkeys{/utils}{ - if/.code n args=3{% - \pgfmathparse{#1}% - \ifdim\pgfmathresult pt=0pt - \expandafter\pgfutil@firstoftwo - \else - \expandafter\pgfutil@secondoftwo - \fi - {\pgfkeysalso{#3}}% - {\pgfkeysalso{#2}}}, - IF/.code args={(#1)#2}{% - \pgfmathparse{#1}% - \pgfutil@in@{else}{#2}% - \ifpgfutil@in@ - \expandafter\pgfutil@firstoftwo - \else - \expandafter\pgfutil@secondoftwo - \fi - {\tikzext@misc@handle@else#2\pgf@stop}{\tikzext@misc@handle@else#2else\pgf@stop}% - }, - TeX/if/.code n args={4}{% - \if#1#2\expandafter\pgfutil@firstoftwo\else\expandafter\pgfutil@secondoftwo\fi - {\pgfkeysalso{#3}}{\pgfkeysalso{#4}}% - }, - TeX/ifnum/.code n args={3}{% - \ifnum#1\relax\expandafter\pgfutil@firstoftwo\else\expandafter\pgfutil@secondoftwo\fi - {\pgfkeysalso{#2}}{\pgfkeysalso{#3}}% - }, - TeX/ifdim/.code n args={3}{% - \ifdim#1\relax\expandafter\pgfutil@firstoftwo\else\expandafter\pgfutil@secondoftwo\fi - {\pgfkeysalso{#2}}{\pgfkeysalso{#3}}% - }, - TeX/ifx/.code n args={4}{% - \ifx#1#2\relax\expandafter\pgfutil@firstoftwo\else\expandafter\pgfutil@secondoftwo\fi - {\pgfkeysalso{#3}}{\pgfkeysalso{#4}}% - }, - TeX/ifempty/.code n args={3}{% - \edef\pgfkeys@temp{#1}% - \pgfutil@ifxempty\pgfkeys@temp{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}% - }, - tex/.search also=/utils/TeX, -} -\def\tikzext@misc@handle@else#1else#2\pgf@stop{% - \ifdim\pgfmathresult pt=0pt - \expandafter\pgfutil@firstoftwo - \else - \expandafter\pgfutil@secondoftwo - \fi - {\pgfkeysalso{#2}}% - {\pgfkeysalso{#1}}} - -\pgfset{ - declare constant/.code={% - \let\pgfmathdeclareconstant@@@\pgfutil@empty - \pgfkeysvalueof{/pgf/declare function/execute at begin function}% - \pgfmathdeclareconstant@#1@=@;\pgf@stop - \pgfkeysvalueof{/pgf/declare function/execute at end function}% - \pgfmathdeclareconstant@@@ - }} -\def\pgfmathdeclareconstant@{% - \pgfutil@ifnextchar x\pgfmathdeclareconstant@@\pgfmathdeclareconstant@@ -} -\def\pgfmathdeclareconstant@@#1=#2;#3\pgf@stop{% - \edef\pgfmath@local@temp{#1}% - \pgfutil@ifx\pgfmath@local@temp\pgfmath@local@at{}{% - \pgfutil@g@addto@macro\pgfmathdeclareconstant@@@{\pgfmathdeclarepseudoconstant{#1}{\def\pgfmathresult{#2}}}% - \pgfmathdeclareconstant@#3\pgf@stop - }% -} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.node-families.code.tex b/graphics/pgf/contrib/tikz-ext/tikzlibraryext.node-families.code.tex deleted file mode 100644 index 699170d178..0000000000 --- a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.node-families.code.tex +++ /dev/null @@ -1,339 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\def\tikzext@nf@align@left#1{} -\def\tikzext@nf@align@center#1{\kern.5#1} -\def\tikzext@nf@align@right#1{\kern#1} - -\pgfqkeys{/tikz/node family}{ - width/.initial=, - width/.append style={/pgf/minimum width=nf_width}, - height/.initial=, - height/.append style={/pgf/minimum height=nf_height}, - size/.code=\pgfqkeys{/tikz/node family}{width={#1},height={#1}}, - text depth/.initial=, - text height/.initial=, - text width align/.is choice, - text width align/left/.code=\let\tikzext@nf@align@action\tikzext@nf@align@left, - text width align/center/.code=\let\tikzext@nf@align@action\tikzext@nf@align@center, - text width align/right/.code=\let\tikzext@nf@align@action\tikzext@nf@align@right, - text width align=center, - text width/.initial=, - text/.code=\pgfqkeys{/tikz/node family}{text depth={#1},text height={#1},text width={#1}}, - prefix/.initial=\pgfpictureid-, -} -\tikzset{node family/.code=\pgfqkeys{/tikz/node family}{#1}} - -% #1 = family type + name -\def\tikzext@nf@save#1{% - %\errmessage{#1}% - \immediate\write\pgfutil@auxout{% - \noexpand\expandafter\noexpand\gdef\noexpand\csname tikzext@nf@#1@previous\endcsname - {\csname tikzext@nf@#1@next\endcsname}% - }% -} - -% #1 = value to set -% #2 = family type -% #3 = return dimen -\def\tikzext@nf@getandset#1#2#3{% - % what's our family's name? - #3=0pt\relax - \pgfkeysgetvalue{/tikz/node family/#2}\tikzext@nf@familyname - \pgfutil@ifxempty\tikzext@nf@familyname{% no family to deal with - }{% - \edef\tikzext@nf@familyname{\pgfkeysvalueof{/tikz/node family/prefix}\tikzext@nf@familyname}% - % we need to save the value for the next run - \pgfutil@IfUndefined{tikzext@nf@#2@\tikzext@nf@familyname @next}{% - % first time: define first value and install hook at end of picture - \expandafter\xdef\csname tikzext@nf@#2@\tikzext@nf@familyname @next\endcsname{#1}% - \edef\tikz@temp{\noexpand\tikzext@nf@save{#2@\tikzext@nf@familyname}}% - %\expandafter\AtVeryEndDocument\expandafter{\tikz@temp}% - \expandafter\pgfutil@g@addto@macro\expandafter\tikz@atend@picture\expandafter{\tikz@temp}% - }{% - \ifdim\csname tikzext@nf@#2@\tikzext@nf@familyname @next\endcsname<#1\relax - \expandafter\xdef\csname tikzext@nf@#2@\tikzext@nf@familyname @next\endcsname{#1}% - \fi - }% - \pgfutil@IfUndefined{tikzext@nf@#2@\tikzext@nf@familyname @previous}{% first run, ignore - }{% set previous value - #3=\csname tikzext@nf@#2@\tikzext@nf@familyname @previous\endcsname\relax - }% - }% -} - -\pgfdeclareshape{Rectangle}{% - \savedanchor\northeast{% - % Calculate x - % - % First, is width < minimum width? - \pgf@x=\the\wd\pgfnodeparttextbox% - \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}% - \advance\pgf@x by 2\pgf@xc% - % Qrr: family width - \tikzext@nf@getandset{\the\pgf@x}{width}{\pgfutil@tempdima}% - \ifdim\pgf@x<\pgfutil@tempdima - \pgf@x=\pgfutil@tempdima - \fi - % - \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}% - \ifdim\pgf@x<\pgf@xb% - % yes, too small. Enlarge... - \pgf@x=\pgf@xb% - \fi% - % Now, calculate right border: .5\wd\pgfnodeparttextbox + .5 \pgf@x + outer sep - \pgf@x=.5\pgf@x% - \advance\pgf@x by.5\wd\pgfnodeparttextbox% - \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}% - \advance\pgf@x by\pgf@xa% - % Calculate y - % - % First, is height+depth < minimum height? - \pgf@y=\ht\pgfnodeparttextbox% - \advance\pgf@y by\dp\pgfnodeparttextbox% - \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}% - \advance\pgf@y by 2\pgf@yc% - % Qrr: family height - \tikzext@nf@getandset{\the\pgf@y}{height}{\pgfutil@tempdima}% - \ifdim\pgf@y<\pgfutil@tempdima - \pgf@y=\pgfutil@tempdima - \fi - % - \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}% - \ifdim\pgf@y<\pgf@yb% - % yes, too small. Enlarge... - \pgf@y=\pgf@yb% - \fi% - % Now, calculate upper border: .5\ht-.5\dp + .5 \pgf@y + outer sep - \pgf@y=.5\pgf@y% - \advance\pgf@y by-.5\dp\pgfnodeparttextbox% - \advance\pgf@y by.5\ht\pgfnodeparttextbox% - \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% - \advance\pgf@y by\pgf@ya% - }% - - \savedanchor\southwest{% - % Calculate x - % - % First, is width < minimum width? - \pgf@x=\wd\pgfnodeparttextbox% - \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}% - \advance\pgf@x by 2\pgf@xc% - % Qrr: family width - \tikzext@nf@getandset{\the\pgf@x}{width}{\pgfutil@tempdima}% - \ifdim\pgf@x<\pgfutil@tempdima - \pgf@x=\pgfutil@tempdima - \fi - % - \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}% - \ifdim\pgf@x<\pgf@xb% - % yes, too small. Enlarge... - \pgf@x=\pgf@xb% - \fi% - % Now, calculate left border: .5\wd\pgfnodeparttextbox - .5 \pgf@x - outer sep - \pgf@x=-.5\pgf@x% - \advance\pgf@x by.5\wd\pgfnodeparttextbox% - \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}% - \advance\pgf@x by-\pgf@xa% - % Calculate y - % - % First, is height+depth < minimum height? - \pgf@y=\ht\pgfnodeparttextbox% - \advance\pgf@y by\dp\pgfnodeparttextbox% - \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}% - \advance\pgf@y by 2\pgf@yc% - % Qrr: family height - \tikzext@nf@getandset{\the\pgf@y}{height}{\pgfutil@tempdima}% - \ifdim\pgf@y<\pgfutil@tempdima - \pgf@y=\pgfutil@tempdima - \fi - % - \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}% - \ifdim\pgf@y<\pgf@yb% - % yes, too small. Enlarge... - \pgf@y=\pgf@yb% - \fi% - % Now, calculate upper border: .5\ht-.5\dp - .5 \pgf@y - outer sep - \pgf@y=-.5\pgf@y% - \advance\pgf@y by-.5\dp\pgfnodeparttextbox% - \advance\pgf@y by.5\ht\pgfnodeparttextbox% - \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% - \advance\pgf@y by-\pgf@ya% - }% - \inheritbackgroundpath[from=rectangle] - \inheritbeforebackgroundpath[from=rectangle] - \inheritbehindforegroundpath[from=rectangle] - \inheritforegroundpath[from=rectangle] - \inheritbeforeforegroundpath[from=rectangle] - \inheritanchor[from=rectangle]{center} - \inheritanchor[from=rectangle]{mid} - \inheritanchor[from=rectangle]{base} - \inheritanchor[from=rectangle]{north} - \inheritanchor[from=rectangle]{south} - \inheritanchor[from=rectangle]{west} - \inheritanchor[from=rectangle]{mid west} - \inheritanchor[from=rectangle]{base west} - \inheritanchor[from=rectangle]{north west} - \inheritanchor[from=rectangle]{south west} - \inheritanchor[from=rectangle]{east} - \inheritanchor[from=rectangle]{mid east} - \inheritanchor[from=rectangle]{base east} - \inheritanchor[from=rectangle]{north east} - \inheritanchor[from=rectangle]{south east} - \inheritanchorborder[from=rectangle] -} - -\pgfdeclareshape{Circle}{% - \savedanchor\centerpoint{% tex/generic/pgf/modules/pgfmoduleshapes.code.tex - \pgf@x=.5\wd\pgfnodeparttextbox - \pgf@y=.5\ht\pgfnodeparttextbox - \advance\pgf@y by-.5\dp\pgfnodeparttextbox - }% - \saveddimen\radius{% tex/generic/pgf/modules/pgfmoduleshapes.code.tex - % Calculate ``height radius'' - \pgf@ya=.5\ht\pgfnodeparttextbox - \advance\pgf@ya by.5\dp\pgfnodeparttextbox - \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/inner ysep}}% - \advance\pgf@ya by\pgf@yb - % Calculate ``width radius'' - \pgf@xa=.5\wd\pgfnodeparttextbox - \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/inner xsep}}% - \advance\pgf@xa by\pgf@xb - % Calculate length of radius vector: - \pgf@process{\pgfpointnormalised{\pgfqpoint{\pgf@xa}{\pgf@ya}}}% - \ifdim\pgf@x>\pgf@y - \c@pgf@counta=\pgf@x - \ifnum\c@pgf@counta=0\relax - \else - \divide\c@pgf@counta by 255\relax - \pgf@xa=16\pgf@xa\relax - \divide\pgf@xa by\c@pgf@counta - \pgf@xa=16\pgf@xa\relax - \fi - \else - \c@pgf@counta=\pgf@y - \ifnum\c@pgf@counta=0\relax - \else - \divide\c@pgf@counta by 255\relax - \pgf@ya=16\pgf@ya\relax - \divide\pgf@ya by\c@pgf@counta - \pgf@xa=16\pgf@ya\relax - \fi - \fi - \pgf@x=\pgf@xa% - % Qrr: check for families - \tikzext@nf@getandset{\the\dimexpr2\pgf@x\relax}{width}{\pgfutil@tempdima}% - \tikzext@nf@getandset{\the\dimexpr2\pgf@x\relax}{height}{\pgfutil@tempdimb}% - % Qrr: and adjust like minimum width and minimum height - \ifdim\pgf@x<.5\pgfutil@tempdima - \pgf@x=.5\pgfutil@tempdima - \fi - \ifdim\pgf@x<.5\pgfutil@tempdimb - \pgf@x=.5\pgfutil@tempdimb - \fi - % If necessary, adjust radius so that the size requirements are met: - \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}% - \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}% - \ifdim\pgf@x<.5\pgf@xb - \pgf@x=.5\pgf@xb - \fi - \ifdim\pgf@x<.5\pgf@yb - \pgf@x=.5\pgf@yb - \fi - % Now, add larger of outer separations. - \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% - \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% - \ifdim\pgf@xb<\pgf@yb - \advance\pgf@x by\pgf@yb - \else - \advance\pgf@x by\pgf@xb - \fi - }% - \inheritbackgroundpath[from=circle] - \inheritbeforebackgroundpath[from=circle] - \inheritbehindforegroundpath[from=circle] - \inheritforegroundpath[from=circle] - \inheritbeforeforegroundpath[from=circle] - \inheritanchor[from=circle]{center} - \inheritanchor[from=circle]{mid} - \inheritanchor[from=circle]{base} - \inheritanchor[from=circle]{north} - \inheritanchor[from=circle]{south} - \inheritanchor[from=circle]{west} - \inheritanchor[from=circle]{mid west} - \inheritanchor[from=circle]{base west} - \inheritanchor[from=circle]{north west} - \inheritanchor[from=circle]{south west} - \inheritanchor[from=circle]{east} - \inheritanchor[from=circle]{mid east} - \inheritanchor[from=circle]{base east} - \inheritanchor[from=circle]{north east} - \inheritanchor[from=circle]{south east} - \inheritanchorborder[from=circle] -} - -\def\pgfutil@prefixto@macro#1#2{% - \def\pgf@temp{#2}% - \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter#1% - \expandafter\expandafter\expandafter{\expandafter\pgf@temp#1}% -} - -\pgfqkeys{/tikz/node family}{ - setup shape/.code={% - \expandafter\pgfutil@prefixto@macro\csname pgf@sh@s@#1\endcsname{% - \tikzext@nf@getandset{\the\wd\pgfnodeparttextbox}{text width}{\pgfutil@tempdima}% - \ifdim\wd\pgfnodeparttextbox<\pgfutil@tempdima - \pgfutil@tempdimb=\pgfutil@tempdima - \advance\pgfutil@tempdimb-\wd\pgfnodeparttextbox - \setbox\pgfnodeparttextbox=\hbox to \pgfutil@tempdima{\tikzext@nf@align@action\pgfutil@tempdimb\box\pgfnodeparttextbox}% - \fi - \tikzext@nf@getandset{\the\dp\pgfnodeparttextbox}{text depth}{\pgfutil@tempdima}% - \ifdim\dp\pgfnodeparttextbox<\pgfutil@tempdima - \dp\pgfnodeparttextbox=\pgfutil@tempdima - \fi - \tikzext@nf@getandset{\the\ht\pgfnodeparttextbox}{text height}{\pgfutil@tempdima}% - \ifdim\ht\pgfnodeparttextbox<\pgfutil@tempdima - \ht\pgfnodeparttextbox=\pgfutil@tempdima - \fi - }% - }, - setup shape/.list={rectangle,circle,Rectangle,Circle} -} - -%% nf functions -\def\tikzext@nf@function@default{{\the\pgf@x}{\the\pgf@y}} -\def\tikzext@nf@function@default@double{{\the\dimexpr2\pgf@x\relax}{\the\dimexpr2\pgf@y\relax}} -\def\tikzext@nf@function@circle{{\the\pgf@x}{\the\pgf@x}} -\def\tikzext@nf@function@circle@double{{\the\dimexpr2\pgf@x\relax}{\the\dimexpr2\pgf@x\relax}} - -\pgfmathdeclarefunction{nf_width}{0}{% - \begingroup - \pgfutil@IfUndefined{tikzext@nf@function@\pgf@sm@shape@name}{% - \let\tikzext@nf@function\tikzext@nf@function@default - }{% - \pgfutil@IfUndefined{tikzext@nf@function@\pgf@sm@shape@name @extra}{}{\csname tikzext@nf@function@\pgf@sm@shape@name @extra\endcsname}% - \expandafter\let\expandafter\tikzext@nf@function\csname tikzext@nf@function@\pgf@sm@shape@name\endcsname - }% - \tikzext@nf@getandset{\expandafter\pgfutil@firstoftwo\tikzext@nf@function}{width}{\pgfutil@tempdima}% - \edef\pgfmathresult{\pgf@sys@tonumber\pgfutil@tempdima}% - \pgfmath@smuggleone\pgfmathresult - \endgroup -} -\pgfmathdeclarefunction{nf_height}{0}{% - \begingroup - \pgfutil@IfUndefined{tikzext@nf@function@\pgf@sm@shape@name}{% - \let\tikzext@nf@function\tikzext@nf@function@default - }{% - \pgfutil@IfUndefined{tikzext@nf@function@\pgf@sm@shape@name @extra}{}{\csname tikzext@nf@function@\pgf@sm@shape@name @extra\endcsname}% - \expandafter\let\expandafter\tikzext@nf@function\csname tikzext@nf@function@\pgf@sm@shape@name\endcsname - }% - \tikzext@nf@getandset{\expandafter\pgfutil@secondoftwo\tikzext@nf@function}{height}{\pgfutil@tempdima}% - \edef\pgfmathresult{\pgf@sys@tonumber\pgfutil@tempdima}% - \pgfmath@smuggleone\pgfmathresult - \endgroup -} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.node-families.shapes.geometric.code.tex b/graphics/pgf/contrib/tikz-ext/tikzlibraryext.node-families.shapes.geometric.code.tex deleted file mode 100644 index 58384960a8..0000000000 --- a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.node-families.shapes.geometric.code.tex +++ /dev/null @@ -1,38 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\usetikzlibrary{ext.node-families,shapes.geometric} - -\let\tikzext@nf@function@ellipse \tikzext@nf@function@default@double -\let\tikzext@nf@function@star \tikzext@nf@function@circle -\let\tikzext@nf@function@diamond \tikzext@nf@function@default@double -\let\tikzext@nf@function@star \tikzext@nf@function@circle@double -\expandafter\let\csname tikzext@nf@function@regular polygon\endcsname - \tikzext@nf@function@circle@double -\let\tikzext@nf@function@trapezium\tikzext@nf@function@default@double -\def\tikzext@nf@function@semicircle {{\the\dimexpr2\pgf@x\relax}{\the\pgf@x}} -\expandafter\def\csname tikzext@nf@function@isosceles triangle\endcsname - {{\the\dimexpr2\pgf@ya\relax}{\the\pgf@xa}} -\def\tikzext@nf@function@kite {{\the\dimexpr2\pgf@xa\relax}{\the\dimexpr\pgf@ya+\pgf@yb\relax}} -\def\tikzext@nf@function@dart {{\the\dimexpr2\pgf@ya\relax}{\the\pgf@xb}} -\expandafter\def\csname tikzext@nf@function@circular sector\endcsname{{\the\pgf@xc}{\the\pgf@xa}} -\def\tikzext@nf@function@cylinder{{\the\dimexpr2\pgfutil@tempdimb\relax}{\the\pgf@x}} - -\tikzset{node family/setup shape/.list={ - ellipse, - star, - diamond, - regular polygon, - trapezium, - semicircle, - isosceles triangle, - kite, - dart, - circular sector, - cylinder -}} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.paths.arcto.code.tex b/graphics/pgf/contrib/tikz-ext/tikzlibraryext.paths.arcto.code.tex deleted file mode 100644 index 213fc1b74a..0000000000 --- a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.paths.arcto.code.tex +++ /dev/null @@ -1,104 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\tikzset{ - arc to/.code=\pgfqkeys{/tikz/arc to}{#1}, - arc to={ - counter clockwise/.code=\pgfkeyssetvalue{/tikz/arc to/ccw flag}{1}, - clockwise/.code=\pgfkeyssetvalue{/tikz/arc to/ccw flag}{0}, - x radius/.code=\pgfkeyssetvalue{/tikz/x radius}{#1}, - y radius/.code=\pgfkeyssetvalue{/tikz/y radius}{#1}, - radius/.code=\pgfkeyssetvalue{/tikz/x radius}{#1}\pgfkeyssetvalue{/tikz/y radius}{#1}, - large/.code=\pgfkeyssetvalue{/tikz/arc to/large flag}{1}, - small/.code=\pgfkeyssetvalue{/tikz/arc to/large flag}{0}, - % defaults - rotate/.initial=0, counter clockwise, small, - counter clockwise/.value forbidden, - clockwise/.value forbidden, - large/.value forbidden, - small/.value forbidden}} -\def\tikz@arcA rc{\pgfutil@ifnextchar t% - {\tikz@flush@moveto\expandafter\expandafter\expandafter\tikz@arcB@cont\expandafter\pgfutil@gobble\pgfutil@gobble} - {\tikz@flush@moveto\tikz@arc@cont}} -\def\tikz@arcB@cont{% - \pgfutil@ifnextchar[\tikz@@do@arcB{ - \advance\tikz@expandcount by -10\relax% go down quickly - \ifnum\tikz@expandcount<0\relax% - \def\@next{\tikz@@do@arcB[]}% - \else% - \def\@next{\expandafter\tikz@arcB@cont}% - \fi% - \@next}}% -\def\tikz@@do@arcB[#1]{% - \def\tikz@arcB@options{#1}% - \tikz@do@@arcB} -\def\tikz@do@@arcB{% - \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@do@@arcB} - {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikz@do@@arcB} - {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikz@do@@arcB} - {\tikz@scan@one@point\tikz@do@arcB}}}} - -\def\tikz@do@arcB#1{% - \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}} - \tikz@make@last@position{#1}% - \edef\tikz@timer@end{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \iftikz@shapeborder - \edef\tikz@moveto@waiting{\tikz@shapeborder@name}% - \fi - \begingroup - \tikzset{every arc/.try,every arc to/.try,arc to/.expand once=\tikz@arcB@options}% - \pgfmathsetmacro\tikz@arc@x{\pgfkeysvalueof{/tikz/x radius}}% - \ifpgfmathunitsdeclared - \pgfmathsetmacro\tikz@arc@y{\pgfkeysvalueof{/tikz/y radius}}% - \ifpgfmathunitsdeclared - \pgfpatharcto{\tikz@arc@x pt}{\tikz@arc@y pt} - {\pgfkeysvalueof{/tikz/arc to/rotate}}{\pgfkeysvalueof{/tikz/arc to/large flag}} - {\pgfkeysvalueof{/tikz/arc to/ccw flag}}{#1}% - \else - \tikzerror{You cannot mix dimensions and dimension values in an arc}% - \fi - \else - \pgfmathsetmacro\tikz@arc@y{\pgfkeysvalueof{/tikz/y radius}}% - \ifpgfmathunitsdeclared - \tikzerror{You cannot mix dimensions and dimension values in an arc}% - \else - \pgf@process{\pgfpointxy{\tikz@arc@x}{0}}% - \pgfmathveclen@{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}% - \let\tikz@arc@x\pgfmathresult - \pgf@process{\pgfpointxy{0}{\tikz@arc@y}}% - \pgfmathveclen@{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}% - \let\tikz@arc@y\pgfmathresult - \pgfpatharcto{+\tikz@arc@x pt}{+\tikz@arc@y pt} - {\pgfkeysvalueof{/tikz/arc to/rotate}}{\pgfkeysvalueof{/tikz/arc to/large flag}} - {\pgfkeysvalueof{/tikz/arc to/ccw flag}}{#1}% - \fi - \fi - \endgroup - % check whether \pgf@marshall starts with \pgfpathlineto - \pgfutil@ifxempty\pgf@marshal{}{% - \edef\tikz@temp{\expandafter\expandafter\expandafter\noexpand\expandafter\pgfutil@firstgobblerest\pgf@marshal\relax}% - \expandafter\let\expandafter\tikz@temp\tikz@temp - \pgfutil@ifx\tikz@temp\pgfpathlineto{}{% - % getting rid of \pgfpatharcaxes inside \pgf@marshal - \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@marshal - \expandafter\expandafter\expandafter{\expandafter\pgfutil@gobble\pgf@marshal}% - % extracting the other four values needed for the timer - \edef\tikz@timer@start@angle{\expandafter\pgfutil@firstoffour\pgf@marshal}% - \edef\tikz@timer@end@angle{\expandafter\pgfutil@secondoffour\pgf@marshal}% - \pgfextract@process\tikz@timer@zero@axis{\expandafter\pgfutil@thirdoffour\pgf@marshal}% - \pgfextract@process\tikz@timer@ninety@axis{\expandafter\pgfutil@fourthoffour\pgf@marshal}% - % - \let\tikz@timer=\tikz@timer@arc - }% - }% - \tikz@scan@next@command -} -\def\pgfutil@firstoffour#1#2#3#4{#1} -\def\pgfutil@secondoffour#1#2#3#4{#2} -\def\pgfutil@thirdoffour#1#2#3#4{#3} -\def\pgfutil@fourthoffour#1#2#3#4{#4} -\def\pgfutil@firstgobblerest#1#2\relax{#1} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.paths.ortho.code.tex b/graphics/pgf/contrib/tikz-ext/tikzlibraryext.paths.ortho.code.tex deleted file mode 100644 index e7a3b02ed7..0000000000 --- a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.paths.ortho.code.tex +++ /dev/null @@ -1,681 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -%% For the operators r-lr, r-rl, r-ud and r-du we need to check after TikZ found r -\let\tikz@orig@rect\tikz@rect -\def\tikz@rect{\pgfutil@ifnextchar e\tikz@orig@rect\tikzext@tikz@r} -\def\tikzext@tikz@r -{% - \pgfutil@ifnextchar l\tikzext@tikz@lr@lineto{% - \pgfutil@ifnextchar r\tikzext@tikz@rl@lineto{% - \pgfutil@ifnextchar u\tikzext@tikz@ud@lineto{% - \pgfutil@ifnextchar d\tikzext@tikz@du@lineto\tikz@expand - }% - }% - }% -} -%% For the operator |-| we need to check after TikZ found |- -\let\tikz@orig@vh@lineto@next\tikz@vh@lineto@next -\def\tikz@vh@lineto@next{% - \pgfutil@ifnextchar|{\expandafter\tikzext@tikz@vhv@lineto\pgfutil@gobble}% - {\pgfutil@ifnextchar\tikz@activebar{\expandafter\tikzext@tikz@vhv@lineto\pgfutil@gobble}% - {\tikz@orig@vh@lineto@next}}} -%% For the operator -|- we need to check after TikZ found -| -\let\tikz@orig@hv@lineto\tikz@hv@lineto -\def\tikz@hv@lineto{% - \pgfutil@ifnextchar-{\expandafter\tikzext@tikz@hvh@lineto\pgfutil@gobble}% - {\tikz@orig@hv@lineto}} - -%% |-|[] and -|-[] are allowed -\def\tikzext@tikz@vhv@lineto{\pgfutil@ifnextchar[{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@vhv@lineto@next}{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@vhv@lineto@next[]}} -\def\tikzext@tikz@hvh@lineto{\pgfutil@ifnextchar[{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@hvh@lineto@next}{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@hvh@lineto@next[]}} - -%% r-rl[], r-lr[], etc. -\def\tikzext@tikz@rl@lineto rl{\pgfutil@ifnextchar[{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@rl@lineto@next}{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@rl@lineto@next[]}} -\def\tikzext@tikz@lr@lineto lr{\pgfutil@ifnextchar[{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@lr@lineto@next}{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@lr@lineto@next[]}} -\def\tikzext@tikz@du@lineto du{\pgfutil@ifnextchar[{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@du@lineto@next}{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@du@lineto@next[]}} -\def\tikzext@tikz@ud@lineto ud{\pgfutil@ifnextchar[{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@ud@lineto@next}{\tikzext@tikz@collect@hvvh@options\tikzext@tikz@ud@lineto@next[]}} - -%% TikZ interjects are done, the rest is independent: - -\newlength\tikzext@tikz@udlr@distance -\newlength\tikzext@tikz@hvvh@distance -\newif\iftikzext@tikz@hvvh@middle % checks whether spacing = 0 was selected -\newif\iftikzext@tikz@hvvh@fromcenter -\newif\iftikzext@ortho@preflush -\tikzext@ortho@preflushtrue - -%%% HVVH/UDLR -\tikzset{% - hvvh/.code={\pgfqkeys{/tikz/hvvh}{#1}},% - udlr/.code={\pgfqkeys{/tikz/udlr}{#1}},% - hvvh/.search also=/tikz,% - udlr/.search also=/tikz,% - hvvh/middle 0 to 1/.style={hvvh/spacing=0},% - hvvh/from center/.is if=tikzext@tikz@hvvh@fromcenter,% - udlr/from center/.style={/tikz/hvvh/from center={#1}}, - hvvh/spacing/.code=% spacing = 0 means that the middle part are the pos-itions 0 to 1, - % the first part is -1 to 0, the last part is to 2 - \pgfmathint{#1}\let\tikzext@tikz@hvvh@timing@parts\pgfmathresult% in case they are calculations to be done - \ifcase\tikzext@tikz@hvvh@timing@parts\relax - \tikzext@tikz@hvvh@middletrue - \def\tikzext@tikz@hvvh@timing@parts{1}% - \def\tikzext@tikz@hvvh@timing@first{0}% - \def\tikzext@tikz@hvvh@timing@last{1}% - \def\tikzext@tikz@hvvh@timing@subtr{0}% - \def\tikzext@tikz@hvvh@timing@factor{1}% - \else % in all other cases n > 0 the kinks are at pos = 1/n and (n - 1)/n - \tikzext@tikz@hvvh@middlefalse - \pgfmathreciprocal{#1}\let\tikzext@tikz@hvvh@timing@first\pgfmathresult - \pgfmathsetmacro\tikzext@tikz@hvvh@timing@last{1-\pgfmathresult}% - \pgfmathreciprocal{#1-2}% - \let\tikzext@tikz@hvvh@timing@subtr\pgfmathresult - \pgfmathsetmacro\tikzext@tikz@hvvh@timing@factor{1+2*\pgfmathresult}% - \fi,% - hvvh/ratio/.code=\pgfmathsetmacro\tikzext@tikz@hvvh@ratio{#1},% - % TODO: not possible to do distance in TikZ coordinate system - hvvh/distance/.code=\pgfmathsetlength\tikzext@tikz@hvvh@distance{#1}\let\tikzext@tikz@hvvh@ratio\pgfutil@empty,% - udlr/distance/.style={% - /tikz/udlr/ud distance={#1},% - /tikz/udlr/du distance={#1},% - /tikz/udlr/lr distance={#1},% - /tikz/udlr/rl distance={#1}},% - udlr/ud distance/.initial=+.5cm,% - udlr/du distance/.initial=+.5cm,% - udlr/lr distance/.initial=+.5cm,% - udlr/rl distance/.initial=+.5cm,% - hvvh/ratio=.5,% default value - hvvh/spacing=4,% default value -}% - -%BEGIN_FOLD Timer -\def\tikz@timer@hvhline{% - \pgf@process{\tikz@timer@start}\pgf@ya\pgf@y - \pgf@process{\tikz@timer@end}\pgf@yc\pgf@y - \pgf@process{\tikz@timer@middle}\pgf@xb\tikz@time pt% - \ifdim\tikz@time pt<\tikzext@tikz@hvvh@timing@first pt% first quarter - \iftikzext@tikz@hvvh@middle - \advance\pgf@xb1pt% - \else - \pgf@xb\tikzext@tikz@hvvh@timing@parts\pgf@xb - \fi - \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}{\noexpand\tikz@timer@start}{% - \noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@ya}}}% - \else - \ifdim\tikz@time pt>\tikzext@tikz@hvvh@timing@last pt% last quarter - \iftikzext@tikz@hvvh@middle - \advance\pgf@xb-1pt% - \else - \pgf@xb\tikzext@tikz@hvvh@timing@parts\pgf@xb - \fi - \advance\pgf@xb\dimexpr-\tikzext@tikz@hvvh@timing@parts pt+1pt\relax% - \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}% - {\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@yc}}{\noexpand\tikz@timer@end}}% - \else% middle half - \pgf@xb\tikzext@tikz@hvvh@timing@factor\pgf@xb% - \advance\pgf@xb-\tikzext@tikz@hvvh@timing@subtr pt% - \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}% - {\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@ya}}{\noexpand\tikz@timer@middle}}% - \fi\fi\tikz@marshal} -\def\tikz@timer@vhvline{% - \pgf@process{\tikz@timer@start}\pgf@xa\pgf@x - \pgf@process{\tikz@timer@end}\pgf@xc\pgf@x - \pgf@process{\tikz@timer@middle}\pgf@xb\tikz@time pt% - \ifdim\tikz@time pt<\tikzext@tikz@hvvh@timing@first pt% first quarter - \iftikzext@tikz@hvvh@middle - \advance\pgf@xb1pt% - \else - \pgf@xb\tikzext@tikz@hvvh@timing@parts\pgf@xb - \fi - \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}{\noexpand\tikz@timer@start}{% - \noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@y}}}% - \else - \ifdim\tikz@time pt>\tikzext@tikz@hvvh@timing@last pt% last quarter - \iftikzext@tikz@hvvh@middle - \advance\pgf@xb-1pt% - \else - \pgf@xb\tikzext@tikz@hvvh@timing@parts\pgf@xb - \fi - \advance\pgf@xb by\dimexpr-\tikzext@tikz@hvvh@timing@parts pt+1pt\relax% - \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}% - {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@y}}{\noexpand\tikz@timer@end}}% - \else% middle half - \pgf@xb=\tikzext@tikz@hvvh@timing@factor\pgf@xb - \advance\pgf@xb by-\tikzext@tikz@hvvh@timing@subtr pt% - \edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}% - {\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@y}}{\noexpand\tikz@timer@middle}}% - \fi\fi\tikz@marshal}% - -%% collect options and nodes, coordinates and pics onpath -\let\tikz@hvvh@currentoption\pgfutil@empty -\def\tikzext@tikz@collect@hvvh@options#1[#2]{\edef\tikz@hvvh@currentoption{#2}#1} -\def\tikzext@tikz@hvh@lineto@next{% - \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikzext@tikz@hvh@lineto@next} - {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikzext@tikz@hvh@lineto@next}% - {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikzext@tikz@hvh@lineto@next}{\tikz@scan@one@point\tikzext@tikz@@hvh@lineto}}}}% -\def\tikzext@tikz@vhv@lineto@next{% - \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikzext@tikz@vhv@lineto@next} - {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikzext@tikz@vhv@lineto@next}% - {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikzext@tikz@vhv@lineto@next}{\tikz@scan@one@point\tikzext@tikz@@vhv@lineto}}}}% -\def\tikzext@tikz@ud@lineto@next{% - \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikzext@tikz@ud@lineto@next} - {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikzext@tikz@ud@lineto@next} - {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikzext@tikz@ud@lineto@next}{\tikz@scan@one@point\tikzext@tikz@@ud@lineto}}}}% -\def\tikzext@tikz@du@lineto@next{% - \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikzext@tikz@du@lineto@next} - {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikzext@tikz@du@lineto@next} - {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikzext@tikz@du@lineto@next}{\tikz@scan@one@point\tikzext@tikz@@du@lineto}}}}% -\def\tikzext@tikz@lr@lineto@next{% - \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikzext@tikz@lr@lineto@next} - {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikzext@tikz@lr@lineto@next} - {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikzext@tikz@lr@lineto@next}{\tikz@scan@one@point\tikzext@tikz@@lr@lineto}}}}% -\def\tikzext@tikz@rl@lineto@next{% - \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikzext@tikz@rl@lineto@next} - {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikzext@tikz@rl@lineto@next} - {\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikzext@tikz@rl@lineto@next}{\tikz@scan@one@point\tikzext@tikz@@rl@lineto}}}}% - -\def\tikz@do@hvvh#1#2#3#4#5{% -% #1 = first kink -% #2 = second kink -% #3 = end -% #4 = timer -% #5 = tikz@shapeborder@name - \pgfpathlineto{#1}% - \pgfpathlineto{#2}% - \pgfpathlineto{#3}% - \def\tikz@timer@middle{#2}% - \def\tikz@timer@end{#3}% - \let\tikz@timer#4 - \edef\pgf@temp{#5}% - \ifx\pgf@temp\pgfutil@empty - \let\tikz@moveto@waiting\relax - \else - \let\tikz@moveto@waiting\pgf@temp - \fi - \tikz@scan@next@command}% - -%% -|- operator -\def\tikzext@tikz@@hvh@lineto#1{% - \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \pgf@xb=\tikz@lastx - \pgf@xc=\tikz@lastx - \pgf@yc=\tikz@lasty - \tikz@make@last@position{#1}% - \tikz@flush@moveto@toward{\pgfqpoint{\tikz@lastx}{\pgf@yc}}\pgf@xc\pgf@yc - \begingroup - \pgfqkeys{/tikz/hvvh}{/tikz/style/.expand once=\tikz@hvvh@currentoption}% - \iftikz@shapeborder - \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\pgf@xb}{\tikz@lasty}}}% - \iftikzext@tikz@hvvh@fromcenter - \pgf@xc\pgf@xb - \fi - \pgfutil@ifxempty\tikzext@tikz@hvvh@ratio{% - \ifdim\tikzext@tikz@hvvh@distance<0pt\relax - \iftikzext@tikz@hvvh@fromcenter - \pgf@xc\tikz@lastx - \else - \pgf@xc\pgf@x - \fi - \fi - \ifdim\pgf@xb>\tikz@lastx - \tikzext@tikz@hvvh@distance-\tikzext@tikz@hvvh@distance - \fi - }{% - \iftikzext@tikz@hvvh@fromcenter - \tikzext@tikz@hvvh@distance\tikz@lastx - \else - \tikzext@tikz@hvvh@distance\pgf@x - \fi - \advance\tikzext@tikz@hvvh@distance-\pgf@xc - \tikzext@tikz@hvvh@distance\tikzext@tikz@hvvh@ratio\tikzext@tikz@hvvh@distance - }% - \advance\pgf@xc\tikzext@tikz@hvvh@distance - \edef\pgf@tempa{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% - \edef\pgf@tempb{\noexpand\pgfqpoint{\the\pgf@xc}{\the\tikz@lasty}}% - \edef\pgf@temp{\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% - \else - \let\tikz@shapeborder@name\pgfutil@empty - \iftikzext@tikz@hvvh@fromcenter - \pgf@xc\pgf@xb - \fi - \pgfutil@ifxempty\tikzext@tikz@hvvh@ratio{% - \ifdim\tikzext@tikz@hvvh@distance<0pt\relax - \pgf@xc\tikz@lastx - \fi - \ifdim\pgf@xb>\tikz@lastx - \tikzext@tikz@hvvh@distance-\tikzext@tikz@hvvh@distance - \fi - }{% - \tikzext@tikz@hvvh@distance\tikz@lastx - \advance\tikzext@tikz@hvvh@distance-\pgf@xc - \tikzext@tikz@hvvh@distance\tikzext@tikz@hvvh@ratio\tikzext@tikz@hvvh@distance - }% - \advance\pgf@xc\tikzext@tikz@hvvh@distance - \edef\pgf@tempa{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% - \edef\pgf@tempb{\noexpand\pgfqpoint{\the\pgf@xc}{\the\tikz@lasty}}% - \edef\pgf@temp{\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \fi% - \xdef\pgf@marshal{% - \noexpand\tikz@do@hvvh - {\expandafter\noexpand\pgf@tempa}% - {\expandafter\noexpand\pgf@tempb}% - {\expandafter\noexpand\pgf@temp}% - {\noexpand\tikz@timer@hvhline}{\tikz@shapeborder@name}}% - \endgroup - \pgf@marshal}% - -%% |-| operator -\def\tikzext@tikz@@vhv@lineto#1{% - \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \pgf@xc=\tikz@lastx - \pgf@yb=\tikz@lasty - \pgf@yc=\tikz@lasty - \tikz@make@last@position{#1}% - \tikz@flush@moveto@toward{\pgfqpoint{\pgf@xc}{\tikz@lasty}}\pgf@xc\pgf@yc - \begingroup - \pgfqkeys{/tikz/hvvh}{/tikz/style/.expand once=\tikz@hvvh@currentoption}% - \iftikz@shapeborder - \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\tikz@lastx}{\pgf@yb}}}% - \iftikzext@tikz@hvvh@fromcenter - \pgf@yc\pgf@yb - \fi - \ifx\tikzext@tikz@hvvh@ratio\pgfutil@empty - \ifdim\tikzext@tikz@hvvh@distance<0pt\relax - \iftikzext@tikz@hvvh@fromcenter - \pgf@yc\tikz@lasty - \else - \pgf@yc\pgf@y - \fi - \fi - \ifdim\pgf@yb>\tikz@lasty - \tikzext@tikz@hvvh@distance-\tikzext@tikz@hvvh@distance - \fi - \else - \iftikzext@tikz@hvvh@fromcenter - \tikzext@tikz@hvvh@distance\tikz@lasty - \else - \tikzext@tikz@hvvh@distance\pgf@y - \fi - \advance\tikzext@tikz@hvvh@distance-\pgf@yc - \tikzext@tikz@hvvh@distance\tikzext@tikz@hvvh@ratio\tikzext@tikz@hvvh@distance - \fi - \advance\pgf@yc\tikzext@tikz@hvvh@distance - \edef\pgf@tempa{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% - \edef\pgf@tempb{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\pgf@yc}}% - \edef\pgf@temp{\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% - \else - \let\tikz@shapeborder@name\pgfutil@empty - \iftikzext@tikz@hvvh@fromcenter - \pgf@yc\pgf@yb - \fi - \ifx\tikzext@tikz@hvvh@ratio\pgfutil@empty - \ifdim\tikzext@tikz@hvvh@distance<0pt\relax - \pgf@yc\tikz@lasty - \fi - \ifdim\pgf@yb>\tikz@lasty - \tikzext@tikz@hvvh@distance-\tikzext@tikz@hvvh@distance - \fi - \else - \tikzext@tikz@hvvh@distance\tikz@lasty - \advance\tikzext@tikz@hvvh@distance-\pgf@yc - \tikzext@tikz@hvvh@distance\tikzext@tikz@hvvh@ratio\tikzext@tikz@hvvh@distance - \fi - \advance\pgf@yc\tikzext@tikz@hvvh@distance - \edef\pgf@tempa{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% - \edef\pgf@tempb{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\pgf@yc}}% - \edef\pgf@temp{\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \fi% - \xdef\pgf@marshal{% - \noexpand\tikz@do@hvvh - {\expandafter\noexpand\pgf@tempa}% - {\expandafter\noexpand\pgf@tempb}% - {\expandafter\noexpand\pgf@temp}% - {\noexpand\tikz@timer@vhvline}{\tikz@shapeborder@name}}% - \endgroup - \pgf@marshal}% - -%% r-ud operator -\def\tikzext@tikz@@ud@lineto#1{% - \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \pgf@xc\tikz@lastx - \pgf@yb\tikz@lasty - \advance\tikz@lasty1pt% - \let\pgf@temp\tikz@moveto@waiting - \tikz@flush@moveto@toward{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}\pgf@xc\pgf@yc - \tikz@make@last@position{#1}% - \begingroup - \pgfqkeys{/tikz/udlr}{/tikz/style/.expand once=\tikz@hvvh@currentoption}% - \pgfmathsetlength\tikzext@tikz@udlr@distance{\pgfkeysvalueof{/tikz/udlr/ud distance}}% - \iftikz@shapeborder - \advance\pgf@y1pt% - \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\pgf@x}{\pgf@y}}}% - \iftikzext@tikz@hvvh@fromcenter - \pgf@yc\pgf@yb - \else\ifx\pgf@temp\relax - \pgf@yc\pgf@yb - \fi - \fi - \ifdim\pgf@yc<\pgf@y - \iftikzext@tikz@hvvh@fromcenter - \pgf@yc=\tikz@lasty - \else - \pgf@yc=\pgf@y - \fi - \fi - \advance\pgf@yc\tikzext@tikz@udlr@distance - \edef\pgf@temp{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% - \else - \let\tikz@shapeborder@name\pgfutil@empty - \ifx\pgf@temp\relax\else - \iftikzext@tikz@hvvh@fromcenter\else - \pgf@yb\pgf@yc - \fi - \fi - \ifdim\pgf@yb<\tikz@lasty\pgf@yb\tikz@lasty\fi - \advance\pgf@yb\tikzext@tikz@udlr@distance - \pgf@yc\pgf@yb - \edef\pgf@temp{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \fi - \xdef\pgf@marshal{% - \noexpand\tikz@do@hvvh - {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% - {\noexpand\pgfqpoint{\the\tikz@lastx}{\the\pgf@yc}}% - {\expandafter\noexpand\pgf@temp}% - {\noexpand\tikz@timer@vhvline}{\tikz@shapeborder@name}}% - \endgroup - \pgf@marshal}% - -%% r-du operator -\def\tikzext@tikz@@du@lineto#1{% - \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \pgf@xc\tikz@lastx - \pgf@yb\tikz@lasty - \advance\tikz@lasty-1pt% - \let\pgf@temp\tikz@moveto@waiting - \tikz@flush@moveto@toward{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}\pgf@xc\pgf@yc - \tikz@make@last@position{#1}% - \begingroup - \pgfqkeys{/tikz/udlr}{/tikz/style/.expand once=\tikz@hvvh@currentoption}% - \pgfmathsetlength\tikzext@tikz@udlr@distance{\pgfkeysvalueof{/tikz/udlr/du distance}}% - \iftikz@shapeborder - \advance\pgf@y-1pt% - \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\pgf@x}{\pgf@y}}}% - \iftikzext@tikz@hvvh@fromcenter - \pgf@yc\pgf@yb - \else\ifx\pgf@temp\relax - \pgf@yc\pgf@yb - \fi - \fi - \ifdim\pgf@yc>\pgf@y - \iftikzext@tikz@hvvh@fromcenter - \pgf@yc=\tikz@lasty - \else - \pgf@yc=\pgf@y - \fi - \fi - \advance\pgf@yc-\tikzext@tikz@udlr@distance - \edef\pgf@temp{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% - \else - \let\tikz@shapeborder@name\pgfutil@empty - \ifx\pgf@temp\relax\else - \iftikzext@tikz@hvvh@fromcenter\else - \pgf@yb\pgf@yc - \fi - \fi - \ifdim\pgf@yb>\tikz@lasty\pgf@yb\tikz@lasty\fi - \advance\pgf@yb-\tikzext@tikz@udlr@distance - \pgf@yc\pgf@yb - \edef\pgf@temp{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \fi - \xdef\pgf@marshal{% - \noexpand\tikz@do@hvvh - {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% - {\noexpand\pgfqpoint{\the\tikz@lastx}{\the\pgf@yc}}% - {\expandafter\noexpand\pgf@temp}% - {\noexpand\tikz@timer@vhvline}{\tikz@shapeborder@name}}% - \endgroup - \pgf@marshal}% - -%% r-lr operator -\def\tikzext@tikz@@lr@lineto#1{% - \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \pgf@xb\tikz@lastx - \pgf@yc\tikz@lasty - \advance\tikz@lastx-1pt% - \let\pgf@temp\tikz@moveto@waiting - \tikz@flush@moveto@toward{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}\pgf@xc\pgf@yc - \tikz@make@last@position{#1}% - \begingroup - \pgfqkeys{/tikz/udlr}{/tikz/style/.expand once=\tikz@hvvh@currentoption}% - \pgfmathsetlength\tikzext@tikz@udlr@distance{\pgfkeysvalueof{/tikz/udlr/lr distance}}% - \iftikz@shapeborder - \advance\pgf@x-1pt% - \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\pgf@x}{\pgf@y}}}% - \iftikzext@tikz@hvvh@fromcenter - \pgf@xc\pgf@xb - \else\ifx\pgf@temp\relax - \pgf@xc\pgf@xb - \fi - \fi - \ifdim\pgf@xc>\pgf@x - \iftikzext@tikz@hvvh@fromcenter - \pgf@xc=\tikz@lastx - \else - \pgf@xc=\pgf@x - \fi - \fi - \advance\pgf@xc-\tikzext@tikz@udlr@distance - \edef\pgf@temp{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% - \else - \let\tikz@shapeborder@name\pgfutil@empty - \ifx\pgf@temp\relax\else - \iftikzext@tikz@hvvh@fromcenter\else - \pgf@xb\pgf@xc - \fi - \fi - \ifdim\pgf@xb>\tikz@lastx\pgf@xb\tikz@lastx\fi - \advance\pgf@xb-\tikzext@tikz@udlr@distance - \pgf@xc\pgf@xb - \edef\pgf@temp{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \fi - \xdef\pgf@marshal{% - \noexpand\tikz@do@hvvh - {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% - {\noexpand\pgfqpoint{\the\pgf@xc}{\the\tikz@lasty}}% - {\expandafter\noexpand\pgf@temp}% - {\noexpand\tikz@timer@hvhline}{\tikz@shapeborder@name}}% - \endgroup - \pgf@marshal}% - -%% r-rl operator -\def\tikzext@tikz@@rl@lineto#1{% - \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \pgf@xb\tikz@lastx - \pgf@yc\tikz@lasty - \advance\tikz@lastx1pt% - \let\pgf@temp\tikz@moveto@waiting - \tikz@flush@moveto@toward{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}\pgf@xc\pgf@yc - \tikz@make@last@position{#1}% - \begingroup - \pgfqkeys{/tikz/udlr}{/tikz/style/.expand once=\tikz@hvvh@currentoption}% - \pgfmathsetlength\tikzext@tikz@udlr@distance{\pgfkeysvalueof{/tikz/udlr/rl distance}}% - \iftikz@shapeborder% - \advance\pgf@x1pt% - \pgf@process{\pgfpointshapeborder{\tikz@shapeborder@name}{\pgfqpoint{\pgf@x}{\pgf@y}}}% - \iftikzext@tikz@hvvh@fromcenter - \pgf@xc\pgf@xb - \else\ifx\pgf@temp\relax - \pgf@xc\pgf@xb - \fi - \fi - \ifdim\pgf@xc<\pgf@x - \iftikzext@tikz@hvvh@fromcenter - \pgf@xc=\tikz@lastx - \else - \pgf@xc=\pgf@x - \fi - \fi - \advance\pgf@xc\tikzext@tikz@udlr@distance - \edef\pgf@temp{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% - \else - \let\tikz@shapeborder@name\pgfutil@empty% - \ifx\pgf@temp\relax\else - \iftikzext@tikz@hvvh@fromcenter\else - \pgf@xb\pgf@xc - \fi - \fi - \ifdim\pgf@xb<\tikz@lastx\pgf@xb\tikz@lastx\fi - \advance\pgf@xb\tikzext@tikz@udlr@distance - \pgf@xc\pgf@xb - \edef\pgf@temp{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \fi - \xdef\pgf@marshal{% - \noexpand\tikz@do@hvvh - {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% - {\noexpand\pgfqpoint{\the\pgf@xc}{\the\tikz@lasty}}% - {\expandafter\noexpand\pgf@temp}% - {\noexpand\tikz@timer@hvhline}{\tikz@shapeborder@name}}% - \endgroup - \pgf@marshal}% - -%% a few nice to haves, use with to or edge operator -\tikzset{ - node as new start/.is if=tikzext@ortho@preflush, - node as new start, - horizontal vertical/.style={to path={-| (\tikztotarget) \tikztonodes}}, - vertical horizontal/.style={to path={|- (\tikztotarget) \tikztonodes}}, - horizontal vertical horizontal/.style={to path={-|- (\tikztotarget) \tikztonodes}}, - vertical horizontal vertical/.style={to path={|-| (\tikztotarget) \tikztonodes}}, - only vertical second/.style={to path={ - \pgfextra - \let\tikzext@ortho@anchor\pgfutil@empty - \let\tikzext@origtotarget\pgfutil@empty - \tikz@scan@one@point\pgfutil@firstofone(\tikztostart)\relax - \iftikz@shapeborder - \tikz@scan@one@point\pgfutil@firstofone(\tikztotarget)\relax - \ifdim\pgf@y>\tikz@lasty\relax - \edef\tikztostart{\tikztostart.north}% - \iftikz@shapeborder\def\tikzext@ortho@anchor{.south}\fi - \else - \edef\tikztostart{\tikztostart.south}% - \iftikz@shapeborder\def\tikzext@ortho@anchor{.north}\fi - \fi - \fi - \def\tikz@tempa{#1}% - \ifx\tikz@tempa\pgfutil@empty\else - \let\tikzext@origtotarget\tikztotarget - \edef\tikztotarget{[xshift={#1}]\tikztotarget\tikzext@ortho@anchor}% - \fi - \endpgfextra - [insert path/.expanded={ - (perpendicular cs: horizontal line through={(\tikztostart)}, - vertical line through={(\tikztotarget)}) -- (\tikztotarget)}] \tikztonodes - \pgfextra - \ifx\tikzext@origtotarget\pgfutil@empty\else - \iftikzext@ortho@preflush(\tikzext@origtotarget)\fi\fi\endpgfextra}}, - only vertical second/.default=, - only horizontal second/.style={to path={ - \pgfextra - \let\tikzext@ortho@anchor\pgfutil@empty - \let\tikzext@origtotarget\pgfutil@empty - \tikz@scan@one@point\pgfutil@firstofone(\tikztostart)\relax - \iftikz@shapeborder - \tikz@scan@one@point\pgfutil@firstofone(\tikztotarget)\relax - \ifdim\pgf@x>\tikz@lastx\relax - \edef\tikztostart{\tikztostart.east}% - \iftikz@shapeborder\def\tikzext@ortho@anchor{.west}\fi - \else - \edef\tikztostart{\tikztostart.west}% - \iftikz@shapeborder\def\tikzext@ortho@anchor{.east}\fi - \fi - \fi - \def\tikz@tempa{#1}% - \ifx\tikz@tempa\pgfutil@empty\else - \let\tikzext@origtotarget\tikztotarget - \edef\tikztotarget{[yshift={#1}]\tikztotarget\tikzext@ortho@anchor}% - \fi - \endpgfextra - [insert path/.expanded={ - (perpendicular cs: vertical line through={(\tikztostart)}, - horizontal line through={(\tikztotarget)}) -- (\tikztotarget)}] \tikztonodes - \pgfextra - \ifx\tikzext@origtotarget\pgfutil@empty\else - \iftikzext@ortho@preflush(\tikzext@origtotarget)\fi\fi\endpgfextra}}, - only horizontal second/.default=, - only vertical first/.style={to path={ - \pgfextra - \let\tikzext@ortho@anchor\pgfutil@empty - \let\tikzext@origtotarget\pgfutil@empty - \tikz@scan@one@point\pgfutil@firstofone(\tikztotarget)\relax - \iftikz@shapeborder - \let\tikzext@origtotarget\tikztotarget - \tikz@scan@one@point\pgfutil@firstofone(\tikztostart)\relax - \ifdim\pgf@y>\tikz@lasty\relax - \edef\tikztotarget{\tikztotarget.south}% - \iftikz@shapeborder\def\tikzext@ortho@anchor{.north}\fi - \else - \edef\tikztotarget{\tikztotarget.north}% - \iftikz@shapeborder\def\tikzext@ortho@anchor{.south}\fi - \fi - \fi - \def\tikz@tempa{#1}% - \ifx\tikz@tempa\pgfutil@empty\else - \edef\tikztostart{[xshift={#1}]\tikztostart\tikzext@ortho@anchor}% - \fi - \endpgfextra - [insert path/.expanded={(\tikztostart)}] - -- (perpendicular cs: vertical line through/.expanded={(\tikztostart)}, - horizontal line through={(\tikztotarget)}) - \tikztonodes - \pgfextra - \ifx\tikzext@origtotarget\pgfutil@empty\else - \iftikzext@ortho@preflush(\tikzext@origtotarget)\fi\fi\endpgfextra}}, - only vertical first/.default=, - only horizontal first/.style={to path={ - \pgfextra - \let\tikzext@ortho@anchor\pgfutil@empty - \let\tikzext@origtotarget\pgfutil@empty - \tikz@scan@one@point\pgfutil@firstofone(\tikztotarget)\relax - \iftikz@shapeborder - \let\tikzext@origtotarget\tikztotarget - \tikz@scan@one@point\pgfutil@firstofone(\tikztostart)\relax - \ifdim\pgf@x>\tikz@lastx\relax - \edef\tikztotarget{\tikztotarget.west}% - \iftikz@shapeborder\def\tikzext@ortho@anchor{.east}\fi - \else - \edef\tikztotarget{\tikztotarget.east}% - \iftikz@shapeborder\def\tikzext@ortho@anchor{.west}\fi - \fi - \fi - \def\tikz@tempa{#1}% - \ifx\tikz@tempa\pgfutil@empty\else - \edef\tikztostart{[yshift={#1}]\tikztostart\tikzext@ortho@anchor}% - \fi - \endpgfextra - [insert path/.expanded={(\tikztostart)}] - -- (perpendicular cs: horizontal line through/.expanded={(\tikztostart)}, - vertical line through={(\tikztotarget)}) - \tikztonodes \pgfextra - \ifx\tikzext@origtotarget\pgfutil@empty\else - \iftikzext@ortho@preflush(\tikzext@origtotarget)\fi\fi\endpgfextra}}, - only horizontal first/.default=, - only vertical first to center/.style={to path={ - \pgfextra - \let\tikzext@origtotarget\tikztotarget - \endpgfextra - (\tikztostart) -- (perpendicular cs: vertical line through={(\tikztostart)}, - horizontal line through={(\tikztotarget)}) - \tikztonodes \ifx\tikzext@origtotarget\pgfutil@empty\else\iftikzext@ortho@preflush(\tikzext@origtotarget)\fi\fi}}, - only horizontal first to center/.style={to path={ - \pgfextra - \let\tikzext@origtotarget\tikztotarget - \endpgfextra - (\tikztostart) -- (perpendicular cs: horizontal line through={(\tikztostart)}, - vertical line through={(\tikztotarget)}) - \tikztonodes \ifx\tikzext@origtotarget\pgfutil@empty\else\iftikzext@ortho@preflush(\tikzext@origtotarget)\fi\fi}}% -} -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.paths.timer.code.tex b/graphics/pgf/contrib/tikz-ext/tikzlibraryext.paths.timer.code.tex deleted file mode 100644 index 3a4d30e68f..0000000000 --- a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.paths.timer.code.tex +++ /dev/null @@ -1,188 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\def\tikz@rectB#1{% originally from tikz.code.tex - \tikz@make@last@position{#1}% - \edef\tikz@timer@end{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \let\tikz@timer\tikz@timer@rectangle% %% Timer: new timer - \tikz@@movetosave{\pgfqpoint{\pgf@xa}{\pgf@ya}}% - \tikz@path@lineto{\pgfqpoint{\pgf@xa}{\tikz@lasty}}% - \tikz@path@lineto{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}% - \tikz@path@lineto{\pgfqpoint{\tikz@lastx}{\pgf@ya}}% - \iftikz@snaked - \tikz@path@lineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}% - \fi - \pgfpathclose - \tikz@@movetosave{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}% - \def\pgfstrokehook{}% - \let\tikz@tangent\relax - \tikz@scan@next@command -}% - -\def\tikz@@sine#1{% originally from tikz.code.tex - \let\tikz@tangent\tikz@tangent@lookup - \tikz@flush@moveto - \edef\tikz@timer@start{\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% %% Timer: save start position - \pgf@process{#1}% - \edef\tikz@timer@end{\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% %% Timer: saver target position - \pgf@xc=\pgf@x - \pgf@yc=\pgf@y - \advance\pgf@xc by-\tikz@lastx - \advance\pgf@yc by-\tikz@lasty - \advance\tikz@lastx by\pgf@xc - \advance\tikz@lasty by\pgf@yc - \tikz@lastxsaved=\tikz@lastx - \tikz@lastysaved=\tikz@lasty - \tikz@updatecurrenttrue - \let\tikz@timer=\tikz@timer@sine% %% Timer: new timer - \pgfpathsine{\pgfqpoint{\pgf@xc}{\pgf@yc}}% - \tikz@scan@next@command -} - -\def\tikz@@cosine#1{% originally from tikz.code.tex - \let\tikz@tangent\tikz@tangent@lookup - \tikz@flush@moveto - \edef\tikz@timer@start{\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% %% Timer: save start position - \pgf@process{#1}% - \edef\tikz@timer@end{\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% %% Timer: save target position - \pgf@xc=\pgf@x - \pgf@yc=\pgf@y - \advance\pgf@xc by-\tikz@lastx - \advance\pgf@yc by-\tikz@lasty - \advance\tikz@lastx by\pgf@xc - \advance\tikz@lasty by\pgf@yc - \tikz@lastxsaved=\tikz@lastx - \tikz@lastysaved=\tikz@lasty - \tikz@updatecurrenttrue - \let\tikz@timer=\tikz@timer@cosine% %% Timer: new timer - \pgfpathcosine{\pgfqpoint{\pgf@xc}{\pgf@yc}}% - \tikz@scan@next@command -} - -\def\tikz@timer@rectangle{% - \pgfutil@tempdima\tikz@time pt - \ifdim\pgfutil@tempdima<.5pt\else % if we're at the return pos-ition we switch start and end - \advance\pgfutil@tempdima-.5pt - \let\pgf@tempa\tikz@timer@start - \let\tikz@timer@start\tikz@timer@end - \let\tikz@timer@end\pgf@tempa - \fi - \multiply\pgfutil@tempdima2 - \edef\tikz@time{\strip@pt\pgfutil@tempdima}% - \tikz@timer@hvline}% - -\def\tikz@parabola@semifinal#1{% - \tikz@flush@moveto - % Save original start: - \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% %% Timer: save start position - \pgf@xb=\tikz@lastx - \pgf@yb=\tikz@lasty - \tikz@make@last@position{#1}% - \edef\tikz@timer@end{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% %% Timer: save target position - \pgf@xc=\tikz@lastx - \pgf@yc=\tikz@lasty - \begingroup% now calculate bend: - \let\tikz@after@path\pgfutil@empty - \expandafter\tikzset\expandafter{\tikz@parabola@option}% - \tikz@lastxsaved=\tikz@parabola@bend@factor\tikz@lastx - \tikz@lastysaved=\tikz@parabola@bend@factor\tikz@lasty - \advance\tikz@lastxsaved by\pgf@xb - \advance\tikz@lastysaved by\pgf@yb - \advance\tikz@lastxsaved by-\tikz@parabola@bend@factor\pgf@xb - \advance\tikz@lastysaved by-\tikz@parabola@bend@factor\pgf@yb - \expandafter\tikz@make@last@position\expandafter{\tikz@parabola@bend}% - \edef\tikz@timer@middle{{\the\tikz@lastx}{\the\tikz@lasty}}% %% Timer: save bend postion - % Calculate delta from bend - \advance\pgf@xc by-\tikz@lastx - \advance\pgf@yc by-\tikz@lasty - % Ok, now calculate delta to bend - \advance\tikz@lastx by-\pgf@xb - \advance\tikz@lasty by-\pgf@yb - \edef\tikz@marshall{% - \noexpand\let\noexpand\tikz@timer\noexpand\tikz@timer@parabola - \noexpand\edef\noexpand\tikz@timer@middle{\noexpand\pgfqpoint\tikz@timer@middle}% - \noexpand\pgfpathparabola{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% - }% - \expandafter\endgroup% - \tikz@marshall - \expandafter\tikz@scan@next@command\tikz@after@path% -}% - -\def\tikz@timer@parabola{% following calculations, see \def of \pgfpathparabola in pgfcorepathconstruct.code.tex (l. 1261) - \ifdim\tikz@time pt<.5pt\relax % first part - \pgf@process{\tikz@timer@middle}% - \pgf@xc\pgf@x\pgf@yc\pgf@y - \pgf@xb\pgf@x\pgf@yb\pgf@y - \pgf@process{\tikz@timer@start}% - \advance\pgf@xc-\pgf@x\pgf@xc.1125\pgf@xc - \advance\pgf@xc\pgf@x % = start_x + .1125 (middle_x - start_x) - \advance\pgf@yc-\pgf@y\pgf@yc.225\pgf@yc - \advance\pgf@yc\pgf@y % = start_y + .225 (middle_y - start_y) - \advance\pgf@xb\pgf@x\pgf@xb.5\pgf@xb % = .5 (middle_x + start_x) = start_x + .5 (middle_x - start_x) - \pgf@xa=\tikz@time pt% - \pgf@xa=2\pgf@xa % = 2 * \tikz@time - \edef\tikz@marshall{\noexpand\pgftransformcurveattime{\strip@pt\pgf@xa}{\noexpand\tikz@timer@start}% - {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% - {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}% - {\noexpand\tikz@timer@middle}}% - \else % second part - \pgf@process{\tikz@timer@end}% - \pgf@xc\pgf@x - \pgf@xb\pgf@x - \pgf@yb\pgf@y - \pgf@process{\tikz@timer@middle}% - \advance\pgf@xc\pgf@x\pgf@xc.5\pgf@xc % = .5 (end_x + middle_x) = middle_x + .5 (end_x - middle_x) - \advance\pgf@xb-\pgf@x\pgf@xb.8875\pgf@xb - \advance\pgf@xb\pgf@x % = middle_x + .8875 (end_x - middle_x) - \advance\pgf@yb-\pgf@y\pgf@yb.775\pgf@yb - \advance\pgf@yb\pgf@y % = middle_y + .775 (end_y - middle_y) - \pgf@xa=\tikz@time pt% - \advance\pgf@xa-.5pt% - \pgf@xa=2\pgf@xa % = 2 (\tikz@zime - .5) - \edef\tikz@marshall{\noexpand\pgftransformcurveattime{\strip@pt\pgf@xa}{\noexpand\tikz@timer@middle}% - {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@y}}% - {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}% - {\noexpand\tikz@timer@end}}% - \fi - \tikz@marshall -} - -\def\tikz@timer@sine{% following calculations, see \def of \pgfpathsine in pgfcorepathconstruct.code.tex (l. 1315) - \pgf@process{\tikz@timer@end}% - \pgf@xc\pgf@x\pgf@yc\pgf@y - \pgf@xb\pgf@x\pgf@yb\pgf@y - \pgf@process{\tikz@timer@start}% - \advance\pgf@xc-\pgf@x\pgf@xc.3260\pgf@xc - \advance\pgf@xc\pgf@x % = start_x + .3260 (end_x - start_x) - \advance\pgf@yc-\pgf@y\pgf@yc.5120\pgf@yc - \advance\pgf@yc\pgf@y % = start_y + .5120 (end_y - start_y) - \advance\pgf@xb-\pgf@x\pgf@xb.6380\pgf@xb % = start_x + .6380 (end_x - start_x) - \advance\pgf@xb\pgf@x - \edef\tikz@marshall{\noexpand\pgftransformcurveattime{\tikz@time}{\noexpand\tikz@timer@start}% - {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% - {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}% - {\noexpand\tikz@timer@end}}% - \tikz@marshall -} -\def\tikz@timer@cosine{% following calculations, see \def of \pgfpathcosine in pgfcorepathconstruct.code.tex (l. 1345) - \pgf@process{\tikz@timer@end}% - \pgf@xc\pgf@x\pgf@yc\pgf@y - \pgf@xb\pgf@x\pgf@yb\pgf@y - \pgf@process{\tikz@timer@start}% - \advance\pgf@xb-\pgf@x\pgf@xb.6740\pgf@xb - \advance\pgf@xb\pgf@x % = start_x + .6740 (end_x - start_x) - \advance\pgf@yb-\pgf@y\pgf@yb.4880\pgf@yb - \advance\pgf@yb\pgf@y % = start_y + .4880 (end_y - start_y) - \advance\pgf@xc-\pgf@x\pgf@xc.3620\pgf@xc % = start_x + .3620 (end_x - start_x) - \advance\pgf@xc\pgf@x - \edef\tikz@marshall{\noexpand\pgftransformcurveattime{\tikz@time}{\noexpand\tikz@timer@start}% - {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@y}}% - {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}% - {\noexpand\tikz@timer@end}}% - \tikz@marshall -} -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.patterns.images.code.tex b/graphics/pgf/contrib/tikz-ext/tikzlibraryext.patterns.images.code.tex deleted file mode 100644 index aa732ab835..0000000000 --- a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.patterns.images.code.tex +++ /dev/null @@ -1,60 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -% This is the TikZ library patterns.images -% Load with \usetikzlibrary{patterns.images} -% -% Macro: -% - \pgfSetupImageAsPattern[]{}{} -% -% Keys are: -% - use image as pattern= -% - image as pattern= - -\def\pgfsetupimageaspattern{\pgfutil@ifnextchar[\tikzext@pgfsetupimageaspattern{\tikzext@pgfsetupimageaspattern[]}} -\def\tikzext@pgfsetupimageaspattern[#1]#2#3{% #1 = options - % #2 = image name - % #3 = file name - \pgfdeclareimage[#1]{tikzext@pgf@iap@#2}{#3}% - \sbox\pgfutil@tempboxa{\pgfuseimage{tikzext@pgf@iap@#2}}% - \expandafter\edef\csname tikzext@pgf@iap@#2@\endcsname{{\the\wd\pgfutil@tempboxa}{\the\ht\pgfutil@tempboxa}}% -} -\tikzset{ - image as pattern/name/.initial=, - image as pattern/option/.style=, - image as pattern/options/.style={/tikz/image as pattern/option/.append style={#1}}, - image as pattern/.default=, - image as pattern/.code={ - \pgfqkeys{/tikz/image as pattern}{#1}% - \pgfkeysgetvalue{/tikz/image as pattern/name}\tikz@temp - \pgfutil@ifxempty\tikz@temp{% - \tikzerror{You need to specify a name for the ``image-pattern'' to be used.}% - }{% - \edef\tikz@tempa{\expandafter\expandafter\expandafter\pgfutil@firstoftwo\csname tikzext@pgf@iap@\tikz@temp @\endcsname}% - \edef\tikz@tempb{\expandafter\expandafter\expandafter\pgfutil@secondoftwo\csname tikzext@pgf@iap@\tikz@temp @\endcsname}% - \pgfkeysalso{/tikz/path picture={% - \pgf@process{\pgfpointanchor{path picture bounding box}{north east}}% - \pgf@xa\pgf@x\pgf@ya\pgf@y - \pgf@process{\pgfpointanchor{path picture bounding box}{south west}}% - \pgf@xb\pgf@x\pgf@yb\pgf@y\pgf@yc\pgf@yb - \pgfutil@loop - {% - \pgfutil@loop - \expandafter\pgftext\expandafter[/tikz/image as pattern/option,at=\pgfqpoint{\pgf@xb}{\pgf@yb}]{\pgfuseimage{tikzext@pgf@iap@\tikz@temp}}% - \ifdim\pgf@yb<\pgf@ya - \advance\pgf@yb\tikz@tempb - \pgfutil@repeat - }% - \ifdim\pgf@xb<\pgf@xa - \advance\pgf@xb\tikz@tempa - \pgf@yb\pgf@yc - \pgfutil@repeat - }}% - } - } -} -\endinput diff --git a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.positioning-plus.code.tex b/graphics/pgf/contrib/tikz-ext/tikzlibraryext.positioning-plus.code.tex deleted file mode 100644 index 98de181c27..0000000000 --- a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.positioning-plus.code.tex +++ /dev/null @@ -1,262 +0,0 @@ -% This is the TikZ library positioning-plus -% Load with \usetikzlibrary{positioning-plus} -% -% This small library extends TikZ options like 'above', 'left' or 'below right' -% so that they can be used with an optional prefixed factor seperated by ':' (colon) -% -% The option 'left=.5:of somenode' will place -% a new node .5cm (default 'node distance' is '1cm and 1cm') left to (somenode). -% The option 'above right=.2 and .7:of someothernode' will place -% a new node .2cm above and .7cm right of (someothernode). -% -% Additional the options 'xshift*' and 'yshift*' add an additional shift -% as a factor of 'node distance' -% Inspired by http://tex.stackexchange.com/a/117610/16595 - -\usetikzlibrary{positioning} -\usetikzlibrary{fit} - -\pgfdeclaregenericanchor{corner south east}{% - \pgf@sh@reanchor{#1}{south}% - \pgf@ya\pgf@y - \pgf@process{\pgf@sh@reanchor{#1}{east}}% - \pgf@y\pgf@ya -} -\pgfdeclaregenericanchor{corner north east}{% - \pgf@sh@reanchor{#1}{north}% - \pgf@ya\pgf@y - \pgf@process{\pgf@sh@reanchor{#1}{east}}% - \pgf@y\pgf@ya -} -\pgfdeclaregenericanchor{corner south west}{% - \pgf@sh@reanchor{#1}{south}% - \pgf@ya\pgf@y - \pgf@process{\pgf@sh@reanchor{#1}{west}}% - \pgf@y\pgf@ya -} -\pgfdeclaregenericanchor{corner north west}{% - \pgf@sh@reanchor{#1}{north}% - \pgf@ya\pgf@y - \pgf@process{\pgf@sh@reanchor{#1}{west}}% - \pgf@y\pgf@ya -} - -\tikzset{corner above left/.code=\tikz@lib@place@handle@{#1}{corner south east}{-1}{1}{corner north west}{0.707106781}} -\tikzset{corner above right/.code=\tikz@lib@place@handle@{#1}{corner south west}{1}{1}{corner north east}{0.707106781}} -\tikzset{corner below left/.code=\tikz@lib@place@handle@{#1}{corner north east}{-1}{-1}{corner south west}{0.707106781}} -\tikzset{corner below right/.code=\tikz@lib@place@handle@{#1}{corner north west}{1}{-1}{corner south east}{0.707106781}} - -\tikzset{corner north left/.code =\tikz@lib@place@handle@{#1}{corner north east}{-1}{0}{corner north west}{1}} -\tikzset{corner north right/.code=\tikz@lib@place@handle@{#1}{corner north west}{1}{0}{corner north east}{1}} -\tikzset{corner south left/.code =\tikz@lib@place@handle@{#1}{corner south east}{-1}{0}{corner south west}{1}} -\tikzset{corner south right/.code=\tikz@lib@place@handle@{#1}{corner south west}{1}{0}{corner south east}{1}} - -\tikzset{corner west above/.code =\tikz@lib@place@handle@{#1}{corner south west}{0}{1}{corner north west}{1}} -\tikzset{corner west below/.code=\tikz@lib@place@handle@{#1}{corner north west}{0}{-1}{corner south west}{1}} -\tikzset{corner east above/.code =\tikz@lib@place@handle@{#1}{corner south east}{0}{1}{corner north east}{1}} -\tikzset{corner east below/.code=\tikz@lib@place@handle@{#1}{corner north east}{0}{-1}{corner south east}{1}} - -\tikzset{north left/.code =\tikz@lib@place@handle@{#1}{north east}{-1}{0}{north west}{1}} -\tikzset{north right/.code=\tikz@lib@place@handle@{#1}{north west}{1}{0}{north east}{1}} -\tikzset{south left/.code =\tikz@lib@place@handle@{#1}{south east}{-1}{0}{south west}{1}} -\tikzset{south right/.code=\tikz@lib@place@handle@{#1}{south west}{1}{0}{south east}{1}} - -\tikzset{west above/.code =\tikz@lib@place@handle@{#1}{south west}{0}{1}{north west}{1}} -\tikzset{west below/.code=\tikz@lib@place@handle@{#1}{north west}{0}{-1}{south west}{1}} -\tikzset{east above/.code =\tikz@lib@place@handle@{#1}{south east}{0}{1}{north east}{1}} -\tikzset{east below/.code=\tikz@lib@place@handle@{#1}{north east}{0}{-1}{south east}{1}} - -\newif\iftikzext@tikz@lib@place@postransform -\tikzset{node distance transformation/.is if=qrr@tikz@lib@place@postransform} -\def\tikz@lib@place@handle@@#1#2#3#4{% - \pgfutil@in@{of }{#1}% - \ifpgfutil@in@ - \tikz@lib@place@of#1\tikz@stop{#4}% - \else - \edef\tikz@lib@place@nums{#1}% - \fi - \ifx\tikz@lib@place@nums\pgfutil@empty - % Ok, nothing to do, we have set the anchor and we are happy... - \else - \expandafter\tikz@lib@place@parse@nums\expandafter{\tikz@lib@place@nums}% - \pgf@x=#2\pgf@x - \pgf@y=#3\pgf@y - \iftikzext@tikz@lib@place@postransform - \pgf@pos@transform{\pgf@x}{\pgf@y}% change from original - \fi - \edef\tikz@lib@pos@call{\noexpand\pgftransformshift{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}% - \fi -} - -\def\tikz@lib@place@handle@#1#2#3#4#5#6{% - \pgfutil@in@{:}{#1}% - \ifpgfutil@in@ - \tikzext@lib@place@handle@#1\tikz@stop - \ifx\pgf@temp\pgfutil@empty - \let\pgf@temp\tikz@node@distance - \fi - \pgfmathsetmacro\pgf@tempa{(\pgf@tempa)*#4}% - \pgfmathsetmacro\pgf@tempb{(\pgf@tempb)*#3}% - \edef\pgf@marshal{\noexpand\tikz@lib@place@handle@{\pgf@temp}{#2}{\pgf@tempb}{\pgf@tempa}{#5}{#6}}% - \pgf@marshal - \else - \def\tikz@anchor{#2}% - \let\tikz@do@auto@anchor=\relax - \edef\tikz@temp{#1}% - \def\tikz@lib@place@single@factor{#6}% - \expandafter\tikz@lib@place@handle@@\expandafter{\tikz@temp}{#3}{#4}{#5}% - \fi -} -\def\tikzext@lib@place@handle@#1:#2\tikz@stop{% - \pgfutil@in@{and}{#1}% - \ifpgfutil@in@ - \tikzext@lib@place@handle@@#1\tikz@stop - \else - \tikzext@lib@place@handle@@#1and#1\tikz@stop - \fi - \def\pgf@temp{#2}% -} -\def\tikzext@lib@place@handle@@#1and#2\tikz@stop{% - \def\pgf@tempa{#1}% - \def\pgf@tempb{#2}% -} -\def\tikzext@xyshift@starred#1#2#3{% - \edef\tikz@marshal{\noexpand\pgfutil@in@{and}{\tikz@node@distance}}% - \tikz@marshal - \ifpgfutil@in@ - \expandafter\tikzext@lib@place@handle@@\tikz@node@distance\tikz@stop - \else - \let#3\tikz@node@distance - \fi - \pgfmathparse{(#1)*#3}% - \ifpgfmathunitsdeclared - \if#2x% - \pgftransformshift{\pgfqpoint{\pgfmathresult pt}{0pt}}% - \else - \pgftransformshift{\pgfqpoint{0pt}{\pgfmathresult pt}}% - \fi - \else - \ifx#2x% - \pgf@process{\pgfqpointxy{\pgfmathresult}{0}}% - \else - \pgf@process{\pgfqpointxy{0}{\pgfmathresult}}% - \fi - \pgftransformshift{\pgfqpoint{\pgf@x}{\pgf@y}}% - \fi} -\tikzset{ - xshift*/.code=\tikzext@xyshift@starred{#1}x\pgf@tempb, - yshift*/.code=\tikzext@xyshift@starred{#1}y\pgf@tempa -} - -\def\pgfutil@firstofmany#1#2\pgf@stop{#1} -\def\pgfutil@secondofmany#1#2\pgf@stop{#2} -\def\tikz@lib@place@of@#1#2#3{% - \def\pgf@tempa{fit bounding box}% - \edef\pgf@temp{\expandafter\pgfutil@firstofmany#2\pgf@stop} - \if\pgf@temp(% - \tikz@lib@place@fit@scan{#2}{0}% - \else\if\pgf@temp|% - \expandafter\tikz@lib@place@fit@scan\expandafter{\pgfutil@secondofmany#2\pgf@stop}{1}% - \else\ifx\pgf@temp\tikz@activebar - \expandafter\tikz@lib@place@fit@scan\expandafter{\pgfutil@secondofmany#2\pgf@stop}{1}% - \else\if\pgf@temp-% - \expandafter\tikz@lib@place@fit@scan\expandafter{\pgfutil@secondofmany#2\pgf@stop}{2}% - \else\if\pgf@temp+% - \expandafter\tikz@lib@place@fit@scan\expandafter{\pgfutil@secondofmany#2\pgf@stop}{3}% - \else - \def\pgf@tempa{#2}% - \fi - \fi - \fi - \fi - \fi - \expandafter\tikz@scan@one@point\expandafter\tikz@lib@place@remember\expandafter(\pgf@tempa)% - \iftikz@shapeborder% - % Ok, this is relative to a border. - \iftikz@lib@ignore@size% - \edef\tikz@node@at{\noexpand\pgfpointanchor{\tikz@shapeborder@name}{center}}% - \def\tikz@anchor{center}% - \else% - \edef\tikz@node@at{\noexpand\pgfpointanchor{\tikz@shapeborder@name}{#3}}% - \fi% - \fi% - \edef\tikz@lib@place@nums{#1}% -} -\def\tikz@lib@place@fit@scan#1#2{% - \pgf@xb=-16000pt\relax% - \pgf@xa=16000pt\relax% - \pgf@yb=-16000pt\relax% - \pgf@ya=16000pt\relax% - \if\pgfutil@firstofmany#1\pgf@stop(% - \tikz@lib@fit@scan#1\pgf@stop% - \else - \tikz@lib@fit@scan(#1)\pgf@stop - \fi - \ifdim\pgf@xa>\pgf@xa - % shouldn't happen - \else - \expandafter\def\csname pgf@sh@ns@fit bounding box\endcsname{rectangle}% - \expandafter\edef\csname pgf@sh@np@fit bounding box\endcsname{% - \def\noexpand\southwest{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}% - \def\noexpand\northeast{\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}% - }% - \expandafter\def\csname pgf@sh@nt@fit bounding box\endcsname{{1}{0}{0}{1}{0pt}{0pt}}% - \expandafter\def\csname pgf@sh@pi@fit bounding box\expandafter\endcsname\expandafter{\pgfpictureid}% - \ifcase#2\relax - \or % 1 = vertical - \pgf@y=\pgf@yb% - \advance\pgf@y by-\pgf@ya% - \edef\pgf@marshal{\noexpand\pgfset{minimum height={\the\pgf@y-2*(\noexpand\pgfkeysvalueof{/pgf/outer ysep})}}}% - \pgf@marshal - \or % 2 = horizontal - \pgf@x=\pgf@xb% - \advance\pgf@x by-\pgf@xa% - \edef\pgf@marshal{\noexpand\pgfset{minimum width={\the\pgf@x-2*(\noexpand\pgfkeysvalueof{/pgf/outer xsep})}}}% - \pgf@marshal - \or % 3 = both directions - \pgf@y=\pgf@yb% - \advance\pgf@y by-\pgf@ya% - \pgf@x=\pgf@xb% - \advance\pgf@x by-\pgf@xa% - \edef\pgf@marshal{\noexpand\pgfset{minimum height={\the\pgf@y-2*(\noexpand\pgfkeysvalueof{/pgf/outer ysep})},minimum width={\the\pgf@x-2*(\noexpand\pgfkeysvalueof{/pgf/outer xsep})}}}% - \pgf@marshal - \fi - \fi -} -\tikzset{ - fit bounding box/.code={\tikz@lib@place@fit@scan{#1}{0}}, - span vertical/.code={\tikz@lib@place@fit@scan{#1}{1}}, - span horizontal/.code={\tikz@lib@place@fit@scan{#1}{2}}, - span/.code={\tikz@lib@place@fit@scan{#1}{3}}} - -\pgfmathdeclarefunction{x_node_dist}{0}{% - \begingroup - \edef\pgfmath@temp{\noexpand\pgfutil@in@{and}{\tikz@node@distance}}% - \pgfmath@temp\ifpgfutil@in@ - \expandafter\tikzext@lib@place@handle@@\tikz@node@distance\tikz@stop - \else - \let\pgf@tempb\tikz@node@distance - \fi - \pgfmathparse{\pgf@tempb}% - \pgfmath@smuggleone\pgfmathresult - \endgroup -} -\pgfmathdeclarefunction{y_node_dist}{0}{% - \begingroup - \edef\pgfmath@temp{\noexpand\pgfutil@in@{and}{\tikz@node@distance}}% - \pgfmath@temp\ifpgfutil@in@ - \expandafter\tikzext@lib@place@handle@@\tikz@node@distance\tikz@stop - \else - \let\pgf@tempa\tikz@node@distance - \fi - \pgfmathparse{\pgf@tempa}% - \pgfmath@smuggleone\pgfmathresult - \endgroup -} -%\tikzdeclarecoordinatesystem{node distance}{% -% \tikz@cs@nd#1\tikz@stop} -%\def\tikz@cs@nd#1,#2\tikz@stop{% -% \def\tikzext@xyshift@starred@action##1{\pgftransformshift{##1}}% -% \tikzext@xyshift@starred{#1}x\pgf@tempb -% \tikzext@xyshift@starred{#2}y\pgf@tempa} -\endinput diff --git a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.topaths.arcthrough.code.tex b/graphics/pgf/contrib/tikz-ext/tikzlibraryext.topaths.arcthrough.code.tex deleted file mode 100644 index d90a2edc78..0000000000 --- a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.topaths.arcthrough.code.tex +++ /dev/null @@ -1,50 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\pgfqkeys{/tikz/arc through}{ - .unknown/.code=\pgfkeyssetevalue{/tikz/arc through/through}{\pgfkeyscurrentname}, - through/.initial={(0,0)}, - center suffix/.initial=, - clockwise/.code=% - \def\tikz@arcthrough@clockwise{% - \pgfmathsubtract@{\pgfkeysvalueof{/tikz/end angle}}{360}% - \pgfkeyssetevalue{/tikz/end angle}{+\pgfmathresult}}, - counter clockwise/.code=\let\tikz@arcthrough@clockwise\relax, - clockwise/.value forbidden, counter clockwise/.value forbidden, counter clockwise} -\tikzset{ - arc through/.code={% - \tikzset{every arc through/.try}% - \pgfqkeys{/tikz/arc through}{#1}% - \pgfkeysgetvalue{/tikz/arc through/through}\tikz@temp - \pgfextract@process\pgf@tostart{\tikz@scan@one@point\pgfutil@firstofone(\tikztostart)\relax}% - \expandafter\pgfextract@process\expandafter\pgf@tothrough\expandafter - {\expandafter\tikz@scan@one@point\expandafter\pgfutil@firstofone\tikz@temp\relax}% - \pgfextract@process\pgf@totarget{\tikz@scan@one@point\pgfutil@firstofone(\tikztotarget)\relax}% - \pgfextract@process\pgf@topointMidA{\pgfpointlineattime{.5}{\pgf@tostart}{\pgf@tothrough}}% - \pgfextract@process\pgf@topointMidB{\pgfpointlineattime{.5}{\pgf@totarget}{\pgf@tothrough}}% - \pgfextract@process\pgf@tocenter{% - \pgfpointintersectionoflines - {\pgf@topointMidA}{\pgfmathrotatepointaround{\pgf@tothrough}{\pgf@topointMidA}{90}}% - {\pgf@topointMidB}{\pgfmathrotatepointaround{\pgf@tothrough}{\pgf@topointMidB}{90}}}% - \pgfcoordinate{arc through center\pgfkeysvalueof{/tikz/arc through/center suffix}}{\pgf@tocenter}% - \pgfpointdiff{\pgf@tocenter}{\pgf@tostart}% - \pgfmathveclen@{\pgfmath@tonumber\pgf@x}{\pgfmath@tonumber\pgf@y}% - \pgfkeyssetevalue{/tikz/x radius}{+\pgfmathresult pt}% - \pgfkeyssetevalue{/tikz/y radius}{+\pgfmathresult pt}% - \pgfmathanglebetweenpoints{\pgf@tocenter}{\pgf@totarget}% - \pgfkeyssetevalue{/tikz/end angle}{+\pgfmathresult}% - \pgfmathanglebetweenpoints{\pgf@tocenter}{\pgf@tostart}% - \ifdim\pgfmathresult pt>\pgfkeysvalueof{/tikz/end angle}pt\relax - \pgfmathsubtract@{\pgfmathresult}{360}% - \fi - \pgfkeyssetevalue{/tikz/start angle}{+\pgfmathresult}% - \tikz@arcthrough@clockwise - \pgfkeyslet{/tikz/delta angle}\pgfutil@empty - \def\tikz@to@path{arc[]\tikztonodes}% - }% -} diff --git a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.transformations.mirror.code.tex b/graphics/pgf/contrib/tikz-ext/tikzlibraryext.transformations.mirror.code.tex deleted file mode 100644 index 026b39ab2f..0000000000 --- a/graphics/pgf/contrib/tikz-ext/tikzlibraryext.transformations.mirror.code.tex +++ /dev/null @@ -1,130 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% -\usepgflibrary{ext.transformations.mirror} -\tikzset{ - mirror/.code={% - \pgfutil@in@{--}{#1}% - \ifpgfutil@in@ - \tikzext@trans@mirror#1\tikz@stop - \else - \tikz@addtransform{\tikz@scan@one@point\pgfqtransformmirror#1\relax}% - \fi}, - ymirror/.code={\pgfutil@ifnextchar(\tikzext@trans@ymirror@coordinate\tikzext@trans@ymirror@simple#1\tikz@stop}, - xmirror/.code={\pgfutil@ifnextchar(\tikzext@trans@xmirror@coordinate\tikzext@trans@xmirror@simple#1\tikz@stop}, - mirror x/.code={% - \pgfextract@process\tikz@temp{\tikz@scan@one@point\pgfutil@firstofone#1\relax}% - \edef\tikz@marshal{% - \noexpand\tikz@addtransform{% - \noexpand\pgftransformmirror - {\expandafter\noexpand\tikz@temp} - {\noexpand\pgfpointadd{\expandafter\noexpand\tikz@temp} - {\noexpand\pgfqpointxy{0}{1}}}}}% - \tikz@marshal - }, - mirror y/.code={% - \pgfextract@process\tikz@temp{\tikz@scan@one@point\pgfutil@firstofone#1\relax}% - \edef\tikz@marshal{% - \noexpand\tikz@addtransform{% - \noexpand\pgftransformmirror - {\expandafter\noexpand\tikz@temp} - {\noexpand\pgfpointadd{\expandafter\noexpand\tikz@temp} - {\noexpand\pgfqpointxy{1}{0}}}}}% - \tikz@marshal - }, - mirror/.value required, - ymirror/.default=+0pt, - xmirror/.default=+0pt, - mirror x/.default={(0,0)}, - mirror y/.default={(0,0)}% -} -\def\tikzext@trans@mirror#1--#2\tikz@stop{% - \tikz@addtransform{% - \pgftransformmirror{\tikz@scan@one@point\pgfutil@firstofone#1\relax} - {\tikz@scan@one@point\pgfutil@firstofone#2\relax}}} -\def\tikzext@trans@xmirror@simple#1\tikz@stop{\tikz@addtransform{\pgftransformxmirror{#1}}} -\def\tikzext@trans@ymirror@simple#1\tikz@stop{\tikz@addtransform{\pgftransformymirror{#1}}} -\def\tikzext@trans@xmirror@coordinate#1\tikz@stop{% - \tikz@scan@one@point\pgfutil@firstofone#1\relax - \edef\tikz@marshal{% - \noexpand\tikz@addtransform{% - \noexpand\pgftransformxmirror{+\the\pgf@x}% - }% - }% - \tikz@marshal -} -\def\tikzext@trans@ymirror@coordinate#1\tikz@stop{% - \tikz@scan@one@point\pgfutil@firstofone#1\relax - \edef\tikz@marshal{% - \noexpand\tikz@addtransform{% - \noexpand\pgftransformymirror{+\the\pgf@y}% - }% - }% - \tikz@marshal -} - -\tikzset{ - Mirror/.code={% - \pgfutil@in@{--}{#1}% - \ifpgfutil@in@ - \tikzext@trans@Mirror#1\tikz@stop - \else - \tikz@addtransform{\tikz@scan@one@point\pgfqtransformMirror#1\relax}% - \fi}, - yMirror/.code={\pgfutil@ifnextchar(\tikzext@trans@yMirror@coordinate\tikzext@trans@yMirror@simple#1\tikz@stop}, - xMirror/.code={\pgfutil@ifnextchar(\tikzext@trans@xMirror@coordinate\tikzext@trans@xMirror@simple#1\tikz@stop}, - Mirror x/.code={% - \pgfextract@process\tikz@temp{\tikz@scan@one@point\pgfutil@firstofone#1\relax}% - \edef\tikz@marshal{% - \noexpand\tikz@addtransform{% - \noexpand\pgftransformMirror - {\expandafter\noexpand\tikz@temp} - {\noexpand\pgfpointadd{\expandafter\noexpand\tikz@temp} - {\noexpand\pgfqpointxy{0}{1}}}}}% - \tikz@marshal - }, - Mirror y/.code={% - \pgfextract@process\tikz@temp{\tikz@scan@one@point\pgfutil@firstofone#1\relax}% - \edef\tikz@marshal{% - \noexpand\tikz@addtransform{% - \noexpand\pgftransformMirror - {\expandafter\noexpand\tikz@temp} - {\noexpand\pgfpointadd{\expandafter\noexpand\tikz@temp} - {\noexpand\pgfqpointxy{1}{0}}}}}% - \tikz@marshal - }, - Mirror/.value required, - yMirror/.default=+0pt, - xMirror/.default=+0pt, - Mirror x/.default={(0,0)}, - Mirror y/.default={(0,0)}% -} -\def\tikzext@trans@Mirror#1--#2\tikz@stop{% - \tikz@addtransform{% - \pgftransformMirror{\tikz@scan@one@point\pgfutil@firstofone#1\relax} - {\tikz@scan@one@point\pgfutil@firstofone#2\relax}}} -\def\tikzext@trans@xMirror@simple#1\tikz@stop{\tikz@addtransform{\pgftransformxMirror{#1}}} -\def\tikzext@trans@yMirror@simple#1\tikz@stop{\tikz@addtransform{\pgftransformyMirror{#1}}} -\def\tikzext@trans@xMirror@coordinate#1\tikz@stop{% - \tikz@scan@one@point\pgfutil@firstofone#1\relax - \edef\tikz@marshal{% - \noexpand\tikz@addtransform{% - \noexpand\pgftransformxMirror{+\the\pgf@x}% - }% - }% - \tikz@marshal -} -\def\tikzext@trans@yMirror@coordinate#1\tikz@stop{% - \tikz@scan@one@point\pgfutil@firstofone#1\relax - \edef\tikz@marshal{% - \noexpand\tikz@addtransform{% - \noexpand\pgftransformyMirror{+\the\pgf@y}% - }% - }% - \tikz@marshal -} -\endinput -- cgit v1.2.3