summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-02-06 23:08:31 +0000
committerKarl Berry <karl@freefriends.org>2016-02-06 23:08:31 +0000
commit271b5e39301a387f969ef73ea8d24eb4f087d8da (patch)
tree48805808c93aeebe7a24cd0ab78a8b0a7aeb55a6 /Master/texmf-dist
parent52e9577d57804c7b92390862d0058a88a346a870 (diff)
mcf2graph (7feb16)
git-svn-id: svn://tug.org/texlive/trunk@39605 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG63
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/README49
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf12
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdfbin248101 -> 248205 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex2
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf7
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdfbin344487 -> 344950 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex17
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdfbin123595 -> 123803 bytes
-rw-r--r--Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf31
10 files changed, 116 insertions, 65 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
new file mode 100644
index 00000000000..1c83bd84c19
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
@@ -0,0 +1,63 @@
+*******************************************************************************
+ Changelog of mcf2graph
+*******************************************************************************
+[ver. 3.80 / 2016-02-06]
+ add new command || , divide CHANGELOG from README and change e-mail address
+
+[ver. 3.78 / 2016-01-16]
+ update MCF syntax manual and MCF luamplib example
+
+[ver. 3.76 / 2015-11-28]
+ update MCF syntax manual and MCF example
+
+[ver. 3.75 / 2015-10-17]
+ fix bug in command **
+
+[ver. 3.74 / 2015-10-03]
+ improve bond infomation of checklist
+
+[ver. 3.72 / 2015-09-22]
+ change command ^^ to < and delete ^^
+
+[ver. 3.71 / 2015-09-18]
+ delete command !!,??
+
+[ver. 3.70 / 2015-09-16]
+ add new command | ,change syntax of !,!!,?,??
+
+[ver. 3.63 / 2015-09-14]
+ add command option of numbering address,update MCF syntax manual
+
+[ver. 3.62 / 2015-09-07]
+ improve numbering bond, numbering atom, update MCF syntax manual
+
+[ver. 3.61 / 2015-09-01]
+ fix bug in local setting of font_wd# and font_ht#
+
+[ver. 3.59 / 2015-08-23]
+ update MCF syntax manual
+
+[ver. 3.58 / 2015-08-18]
+ improve calculation of molecular formula and weight
+
+[ver. 3.57 / 2015-08-14]
+ improve AUX file format
+
+[ver. 3.55 / 2015-08-04]
+ support luamplib(v2.11), renew mcf_mplib_exa.tex
+
+[ver. 3.54 / 2015-08-03]
+ maximum item number of MOLinfo can be changed
+
+[ver. 3.53 / 2015-07-29]
+ support luamplib(LuaLaTeX)
+
+[ver. 3.52 / 2015-07-20]
+ '!!4`2' can use as '{,``2,!4,}'
+
+[ver. 3.51 / 2015-07-19]
+ '?6`2' can use as '{,``2,?6,}'
+
+[ver. 3.50 / 2015-07-11]
+ first version uploaded to ctan.
+******************************************************************************
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README
index 25c92a2d031..3755cb4e70c 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/README
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/README
@@ -1,8 +1,8 @@
********************************************************************************
mcf2graph : Convert Molecular Coding Format to graphics with Metafont/Metapost
Author : Akira Yamaji
- version : 3.78 2016-01-16
- E-mail : akira.yamaji5@gmail.com
+ version : 3.80 2016-02-06
+ E-mail : mcf2graph@gmail.com
Located at : http://www.ctan.org/pkg/mcf2graph
********************************************************************************
@@ -16,18 +16,19 @@
2. The distribution of software
( 1) README This file
- ( 2) mcf2graph.mf Macro of Metafont / Metapost
- ( 3) mcf_manual.tex MCF syntax manual(LaTeX file)
- ( 4) mcf_man_soc.mf Molecular difinition file for mcf_manual.tex
- ( 5) mcf_man_soc-031.eps No.31 EPS(with color) file of (4)
- ( 6) mcf_manual.pdf PDF of (3) (used LaTeX,dvipdfmx)
- ( 7) mcf_example.tex LaTeX example,
+ ( 2) CHANGELOG Changelog file of mcf2graph
+ ( 3) mcf2graph.mf Macro of Metafont / Metapost
+ ( 4) mcf_manual.tex MCF syntax manual(LaTeX file)
+ ( 5) mcf_man_soc.mf Molecular difinition file for mcf_manual.tex
+ ( 6) mcf_man_soc-031.eps No.31 EPS(with color) file of (4)
+ ( 7) mcf_manual.pdf PDF of (4) (used LaTeX,dvipdfmx)
+ ( 8) mcf_example.tex LaTeX example,
Make 'mcf_exa_soc-info.aux' before typeset
mpost -s ahangle=0 mcf_exa_soc.mf
- ( 8) mcf_exa_soc.mf Molecular difinition file for mcf_example.tex
- ( 9) mcf_example.pdf PDF of (7) (used LaTeX,dvipdfmx)
- (10) mcf_mplib_exa.tex luamplib v2.11(LuaLaTeX) example
- (11) mcf_example.pdf PDF of (10) typeset with LuaTeX(LuaLaTeX)
+ ( 9) mcf_exa_soc.mf Molecular difinition file for mcf_example.tex
+ (10) mcf_example.pdf PDF of (8) (used LaTeX,dvipdfmx)
+ (11) mcf_mplib_exa.tex luamplib v2.11(LuaLaTeX) example
+ (12) mcf_example.pdf PDF of (11) typeset with LuaTeX(LuaLaTeX)
3. How to use mcf2graph with Metapost
( 1) mpost -s ahangle=0 FILENAME output no graphic file.
@@ -101,26 +102,4 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-8. Changelog
- ver. 3.50 / 2015-07-11 first version uploaded to ctan.
- ver. 3.51 / 2015-07-19 '?6`2' can use as '{,``2,?6,}'
- ver. 3.52 / 2015-07-20 '!!4`2' can use as '{,``2,!4,}'
- ver. 3.53 / 2015-07-29 support luamplib(LuaLaTeX)
- ver. 3.54 / 2015-08-03 maximum item number of MOLinfo can be changed
- ver. 3.55 / 2015-08-04 support luamplib(v2.11), renew mcf_mplib_exa.tex
- ver. 3.57 / 2015-08-14 improve AUX file format
- ver. 3.58 / 2015-08-18 improve calculation of molecular formula and weight
- ver. 3.59 / 2015-08-23 update MCF syntax manual
- ver. 3.61 / 2015-09-01 fix bug in local setting of font_wd# and font_ht#
- ver. 3.62 / 2015-09-07 improve numbering bond, numbering atom,
- update MCF syntax manual
- ver. 3.63 / 2015-09-14 add command option of numbering address,
- update MCF syntax manual
- ver. 3.70 / 2015-09-16 add new command | ,change syntax of !,!!,?,??
- ver. 3.71 / 2015-09-18 delete command !!,??
- ver. 3.72 / 2015-09-22 change command ^^ to < and delete ^^
- ver. 3.73 / 2015-09-25 '&#n' can use as '&(#n)'
- ver. 3.74 / 2015-10-03 improve bond infomation of checklist
- ver. 3.75 / 2015-10-17 fix bug in command **
- ver. 3.76 / 2015-11-28 update MCF syntax manual and MCF example
- ver. 3.78 / 2016-01-16 update MCF syntax manual and MCF luamplib example
+%----------------------------------------------------------------------------
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
index d1f3a7d7e14..d0e05dea883 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
@@ -17,7 +17,7 @@ sw_start_vector:=0;
%%%%sw_info_weight:=1;
%%%%sw_checklist:=1;
%%%%sw_MOLfile:=1;
-%****************************************************************************
+%***************************************************************************
beginfont("EN:Acetamiprid")
MCf(<30,Ph,4\,!,NH,!,!~dr,N,!,CN)
endfont
@@ -65,7 +65,7 @@ endfont
%***************************************************************************
beginfont("EN:Oxine-Copper")
MCf(Ph,4:N,5=Ph,-4\,O,-60,<90,Cu,-90,O,60,|,Ph,5=Ph,10:N,
- #4*,&#12~vf,#23*,&#12~vf)
+ ||,4*,&12~vf,23*,&12~vf)
endfont
%***************************************************************************
beginfont("EN:Captan")
@@ -165,7 +165,7 @@ endfont
%***************************************************************************
beginfont("EN:Rifampicin")
MCf(<30,
- Ph,6:/Me^30,5:/OH,|,-6=?5,1:O,3://O,2:/*Me^60,|,#3=?6,@(2,4)d,@(1,4)/OH,
+ Ph,6:/Me^30,5:/OH,|,-6=?5,1:O,3://O,2:/*Me^60,|,-8=?6,@(2,4)d,@(1,4)/OH,
{,``1,-2\,NH,60,//O,-60,/Me,60~dl,60,60~dl,-60,
*/Me,60,/*OH,-60,/*Me,60,/*OH,60,*/Me^30,-60,
60,/*Me^30,-53,/*OMe,66,-53~dl,66`1.2,O,},&#8,
@@ -343,7 +343,7 @@ MCf(<30,{,``1,<-120,60,60,60,-60,60,60,-60,60,60,60,-60,60,60,},&1,
endfont;
%**************************************************************************
beginfont("EN:Paclitaxel")
- MCf({,?6,5=d,3*,{,``1,36,45,45,45,45,},&#5,#9=?6,-4=?4,},-1=wb,-3=wf,-1:O,
+ MCf({,?6,5=d,3*,{,``1,36,45,45,45,45,},&#5,-4=?6,-4=?4,},-1=wb,-3=wf,-1:O,
@(4^35,4^-35,6)/Me,@(3^-60,15)*/OH,8:/*H^-60,9:*/Me^60,10://O,
#1\,O,!,//O,!,*/OH,!,/Ph,60~wf,NH,-60,//O,60,Ph,
#7\*,O,-45,//O,60,Ph,#11*\,O,-60,//O,60,#12\*^-15,O,60,//O,-60)
@@ -360,9 +360,9 @@ beginfont("EN:Sesamine")
endfont
%**************************************************************************
beginfont("EN:Morphine")
- MCf(<30,Ph,2=?6,-4=?6,(#1,#12)=?5[2],-1:O,-1=zb,
+ MCf(<30,Ph,2=?6,-4=?6,(1,12)=?5[2],-1:O,-1=zb,
7*,60~wf`0.75,70~ov`1.3,45,N,/Me,&9~wb,
- 15=d,6:/OH,8^180:*/H,12:/*OH)
+ 15=dl,6:/OH,8^180:*/H,12:/*OH)
endfont
%**************************************************************************
beginfont("EN:Capsaicin")
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
index e301759a3b7..686e34edde9 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
index c5d8f9413d5..74100ffce45 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2016.1.16
+% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2016.2.06
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
\usepackage{graphicx}
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
index b7de1e5b2e6..67f9a314c70 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
@@ -56,7 +56,7 @@ endfont
%***********************************************************************
beginfont("EN:change bond length3")
sw_start_vector:=1;
- MCf(<30,?6,3\,|,?6`1.2,4=?6)
+ MCf(<30,?6,3\,?6`1.2,11=?6)
endfont
%***********************************************************************
beginfont("EN:change atom 1")
@@ -77,9 +77,8 @@ beginfont("EN:change atom 3")
endfont
%***********************************************************************
beginfont("EN:change atom 4")
- MCd(.5,.5)(.5,.9)(?6,4\,|,?6,2:N)
- sw_numberA:=2;
- numberA_start:=7;
+ MCd(.5,.5)(.5,.9)(?6,4\,|,?6,2:N,||,@(2,6)O)
+ sw_numberA:=1;
MCd(.5,.5)(.5,.1)(?6,4\,?6)
endfont
%***********************************************************************
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
index b1c0f3ff828..7035e8d2219 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
index 514395af805..d48fed43a5b 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format manual by Akira Yamaji 2016.01.16
+% Molecular Coding Format manual by Akira Yamaji 2016.02.06
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
\usepackage[dvipdfmx]{graphicx}
@@ -144,7 +144,7 @@ Bn`length : change bond length at Bn
\begin{verbatim}
?n`length : change ring length
- <30,?6,3\,|,?6`1.2,4=?6
+ <30,?6,3\,?6`1.2,11=?6
\end{verbatim}
\end{minipage}
\MCFstructure
@@ -169,7 +169,7 @@ Insert hetero atom
<30,!6,2:O,@(3,5)N
-An(n:numeric): atom number
+An(-999<=n<=4095): atom number
\end{verbatim}
\end{minipage}
\MCFstructure
@@ -191,9 +191,10 @@ An(n:numeric): atom number
\begin{verbatim}
2:N : change A2(brock address) C to N
-?6,4\,|,?6,2:N
+?6,4\,|,?6,2:N,||,@(2,6)O
-| : divide brock
+| : divide brock
+|| : reset brock adress
\end{verbatim}
\end{minipage}
\MCFstructure
@@ -205,6 +206,8 @@ An(n:numeric): atom number
#2:N : change A#2 C to N
?6,4\,|,?6,#2:N
+
+#n : (1<=n<=3095)
\end{verbatim}
\end{minipage}
\MCFstructure
@@ -216,6 +219,8 @@ An(n:numeric): atom number
-2:N : change A(-2) C to N
?6,4\,?6,-2:N
+
+-n : (1<=n<=999)
\end{verbatim}
\end{minipage}
\MCFstructure
@@ -228,7 +233,7 @@ An(n:numeric): atom number
?6,3=?5
-Bn(n:numeric): bond number
+Bn(n:-999<=n<=4095): bond number
\end{verbatim}
\end{minipage}
\MCFstructure
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf
index 0d885003288..cd25913dea7 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf
Binary files differ
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
index c8d36c276d7..59907975a36 100644
--- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
+++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 3.78 Copyright (c) 2013-2016 Akira Yamaji
+% mcf2graph ver 3.80 Copyright (c) 2013-2016 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,
@@ -20,7 +20,7 @@
% Molecular Coding Format(MCF) to font(pk)/eps/sgv/png/mdl molfile(V2000)
%----------------------------------------------------------------------------------------------
% This package is located at : http://www.ctan.org/pkg/mcf2graph
-% Suggestion or request mail to : akira.yamaji5@gmail.com
+% Suggestion or request mail to : mcf2graph@gmail.com
%----------------------------------------------------------------------------------------------
% Set output no image file : mpost -s ahangle=0 FILENAME
% Set outputformat to "png" : mpost -s ahangle=1 FILENAME
@@ -30,7 +30,7 @@
% Set output checklist : mpost -s ahlength=2 FILENAME
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tracingstats:=1;
-message " This is mcf2graph ver 3.7 2016.1";
+message " This is mcf2graph ver 3.8 2016.2";
%-------------------------------------------------------------------------------------------------
pair posB[],posA[],pairT,Ls,Le,pairA;
numeric angB[],angA[],br_ang[],sB[],eB[],f_FON[],atom_w[],atom_h[],atom_d[],strA[],stkB[],stkA[],
@@ -68,8 +68,9 @@ else: f_MP:=0;
clearit; chem_structure:=currentpicture;
%-------------------------------------------------------------------------------------------------
let DIV= /; let MUL= *; let LT= <; let GT= >; let AND= &; let :: = : ; let == = =;
+primarydef a SUB b = a-b enddef;
?3:=?20:=Ph:=Ph1:=Ph2:=hz:=0; vt:=1;
-first_def_number:=500; user_def_number:=2500; ab_def_number:=3000; unit_e:=1/2048;
+first_def_number:=500; user_def_number:=2500; ab_def_number:=3000;
margin_left_right:=margin_top_bottom:=0.4mm; ratio_chain_ring:= 0.66; ratio_atom_bond:=0.36;
ratio_thickness_bond:=0.015; offset_atom#:=0.8pt#; max_bond_width:=0.25;
ratio_char_bond:=1.5; ratio_bondgap_bond:=0.15; ratio_zebragap_bond:=0.12;
@@ -82,7 +83,7 @@ def def_com(expr n)(text tx)= nA:=n; forsuffixes list=tx:: list:=nA; nA:=nA+1; e
def_com(-4000)(_term,_jp_atom,_jp_atom_abs,_jp_bond,_cyc,_cyc_sB,_cyc_eB,_set_line,_chg_line,
_dl,_tmp_line,_chg_len,_get_len,_ring_len,_tmp_len,_rot_ang,_set_ang,_adj_ang,_chg_env,
_tmp_env,_set_colorA,_set_colorB,_postA,_postB,_postC,_postD,_postE,_postF,_set_psA,
- _skeletonA_end,_skeletonB_end,
+ _skeletonA_end,_skeletonB_end,_stack_reset,
_set_clr,_set_adr,_mk_bond,_set_atom,_arg_ang,_chg_atom,_tmp_rot,_fuse,_push,_pop,_size_a);
def_com(1)(si,dl,dr,dm,tm,wf,wb,bd,zf,zb,ov,dt,no,ar,vf,vb,wv,nl);
%-------------------------------------------------------------------------------------------------
@@ -175,18 +176,19 @@ def font_use_check=
enddef;
%-------------------------------------------------------------------------------------------------
def set_def_MC=
- save /,*,//,/*,*/,**,~,^,`,{,},<,>,&,&#,:,=,\,\\,*\,\*,@,$,#,|,d,w,z,inside_def_MC;
+ save /,*,//,/*,*/,**,~,^,`,{,},<,>,&,&#,:,=,\,\\,*\,\*,@,$,#,|,||,d,w,z,inside_def_MC;
inside_def_MC:=1; d:=dl; w:=wf; z:=zf;
vardef $(text a)tertiary b == $$(a)(b) enddef; tertiarydef a=b == $$(a)(b) enddef;
vardef @(text a)tertiary b == @@(a)(b) enddef; tertiarydef a:b == @@(a)(b) enddef;
- vardef #primary n == n MUL unit_e enddef;
+ vardef #primary a == if numeric a:: a-4095 elseif pair a:: a+(0,-4095) fi enddef;
def &primary n ==(_cyc,n) enddef; def &# == & # enddef;
tertiarydef a^b == (_tmp_rot,b),a enddef; tertiarydef a`b == (_tmp_len,b),a enddef;
tertiarydef a>b == (_tmp_env,b),a enddef; tertiarydef a~b == (_tmp_line,b),a enddef;
def * == (0,1) enddef; def \ == *,0 enddef; def \\ == *,0~dm enddef;
def *\ == *,0~wf enddef; def \* == *,0~zf enddef;
def { == (_push,1) enddef; def } == (_pop,1) enddef;
- def {{ == (_push,0) enddef; def }} == (_pop,0) enddef; def | == {,} enddef;
+ def {{ == (_push,0) enddef; def }} == (_pop,0) enddef;
+ def | == {,} enddef; def || == (_stack_reset,0) enddef;
def >>primary n == (_chg_env,n) enddef; def ``primary n == (_chg_len,n) enddef;
def <primary n == (_rot_ang,n) enddef;
def /secondary n == (_postA,n) enddef; def //secondary n == (_postB,n) enddef;
@@ -214,7 +216,7 @@ enddef;
def !?(expr a)(expr b) =
PB(_jp_bond,a) PB(_get_len,a) PB(_push,0)
PB(_chg_len,_ring_len) for i==1 upto b-2:: PB(_mk_bond,360 DIV b) endfor PB(_pop,0)
- if a>=1:: PB(_cyc_eB,0) elseif a<=0:: PB(_cyc_eB,a-b+2) else:: PB(_cyc_eB,a) fi
+ if a>=1:: PB(_cyc_eB,0) elseif a>=-999:: PB(_cyc_eB,a-b+2) else:: PB(_cyc_eB,a) fi
enddef;
%-------------------------------------------------------------------------------------------------
def !!?(expr a)(expr b)(expr c) =
@@ -380,6 +382,7 @@ def proc_bond_atom(expr n)=
if par=1: if lineT<>si: f_lineT:=1; fi if rotT<>0: f_rotT:=1; fi
if lenT<>crR: f_lenT:=1; fi if envT<>hz: f_envT:=1; fi fi
if par=0: f_lineT:=f_rotT:=f_lenT:=f_envT:=rotT:=envT:=0; lineT:=si; lenT:=crR; fi
+ elseif com=_stack_reset: stkA[adrS+1]:=0;
elseif com=_term: termA;
elseif com=_set_colorA: colorA[getA(adrT)]:=par;
elseif com=_set_colorB: colorB[getB(adrT)]:=par;
@@ -423,14 +426,16 @@ def proc_skeleton=
elseif com=_cyc_sB: f_end:=1; proc_cyc(sB[getB(par)]);
elseif com=_cyc_eB: f_end:=1; proc_cyc(eB[getB(par)]);
elseif com=_term: termB;
+ elseif com=_stack_reset: stkA[adrS+1]:=0;
fi
endfor
enddef;
%-------------------------------------------------------------------------------------------------
-vardef getA(expr n)= if n>=1: stkA[adrS+1]+n elseif n<=-1: cntA+n+1
- elseif n>0: stkA[adrS]+2048n elseif n<0: -2048n fi enddef;
-vardef getB(expr n)= if n>=1: stkB[adrS+1]+n elseif n<=-1: cntB+n+1 elseif n=0: tempB
- elseif n>0: stkB[adrS]+2048n elseif n<0: -2048n fi enddef;
+vardef getA(expr n)=
+ if n>=0: stkA[adrS+1]+n elseif n>=-999: cntA+n+1 else: stkA[adrS]+n+4095 fi enddef;
+vardef getB(expr n)=
+ if n>=1: stkB[adrS+1]+n elseif n=0: tempB elseif n>=-999: cntB+n+1 else: stkB[adrS]+n+4095 fi
+enddef;
def termA= if f_term=0: if f_bra=0: strA[incr cntA]:=strAT; strAT:=0;
if f_MP=1: colorA[cntA]:=0; fi else: f_bra:=0; fi f_term:=1; fi enddef;
def termB=