summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost/mcf2graph
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-09-16 21:34:45 +0000
committerKarl Berry <karl@freefriends.org>2015-09-16 21:34:45 +0000
commitad2b4ce35eb65c792a7ebc1cac1d5a271b0945e1 (patch)
treea2bb35f01b53cc7eedddd9989426ada573693ed2 /Master/texmf-dist/metapost/mcf2graph
parentce734db3a717c0331952974aa47b6d39166e8a13 (diff)
mcf2graph (16sep15)
git-svn-id: svn://tug.org/texlive/trunk@38387 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost/mcf2graph')
-rw-r--r--Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf40
1 files changed, 20 insertions, 20 deletions
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
index 2bc472f6efd..114c0881621 100644
--- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
+++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 3.63 Copyright (c) 2013-2015 Akira Yamaji
+% mcf2graph ver 3.70 Copyright (c) 2013-2015 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,
@@ -30,14 +30,14 @@
% Set output checklist : mpost -s ahlength=2 FILENAME
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tracingstats:=1;
-message " This is mcf2graph ver 3.6 2015.9 ";
+message " This is mcf2graph ver 3.7 2015.9 ";
newinternal com,par,cntA,cntB,adrS,adrA,adrB,dx,nX,i,u,j,k,v,xp,yp,nA,nB;
%-------------------------------------------------------------------------------------------------
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[],stkL[],stkM[],strW[],lineB[],lenB[],ps_com[],ps_adr[],ps_len[],ps_rot[],
ps_env[],comMC[][],parMC[][],stock_p[],cntMC[],colorA[],colorB[],tblN[],tblB[][],
- wtA[],sumA[],CH[],NH[],NO[],SO[],CCl[],CF[],CBr[],?[],??[],![],!![],Ph[],ph[];
+ wtA[],sumA[],CH[],NH[],NO[],SO[],CCl[],CF[],CBr[],??[],?[],|?[],![],!![],Ph[],ph[];
path pA,pB,pC,pT;
string info[],tblA[],com_str[],calc_formula,mp_log_name,mol_name,mol_formula,calc_weight_str;
picture atom_font[],chem_structure,temp_picture;
@@ -69,7 +69,7 @@ else: f_MP:=0;
clearit; chem_structure:=currentpicture;
%-------------------------------------------------------------------------------------------------
let DIV= /; let MUL= *; let LT= <; let GT= >; let AND= &; let :: = : ; let == = =;
-?3:=?20:=??3:=??20:=Ph:=Ph1:=Ph2:=ph:=ph1:=ph2:=hz:=0; vt:=1;
+??3:=??20:=?3:=?20:=Ph:=Ph1:=Ph2:=ph:=ph1:=ph2:=hz:=0; vt:=1;
first_def_number:=500; user_def_number:=2500; ab_def_number:=3000; unit_e:=1/2048;
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;
@@ -177,7 +177,7 @@ enddef;
%-------------------------------------------------------------------------------------------------
vardef '(text s)= ''(incr mc_num)(s); mc_num 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; vardef @(text a)tertiary b == @@(a)(b) enddef;
vardef #primary n == n MUL unit_e enddef; vardef ##primary n == -n MUL unit_e enddef;
@@ -188,7 +188,7 @@ def set_def_MC=
def * == (0,1) enddef; def \ == *,0 enddef; def \\ == *,0~dm enddef;
def *\ == (0,1),0~wf enddef; def \* == (0,1),0~zf enddef;
def { == (_push,1) enddef; def } == (_pop,1) enddef;
- def {{ == (_push,0) enddef; def }} == (_pop,0) enddef;
+ def {{ == (_push,0) enddef; def }} == (_pop,0) enddef; def | == {,} enddef;
def >>primary n == (_chg_env,n) enddef; def ``primary n == (_chg_len,n) enddef;
def ^^primary n == (_rot_ang,n) enddef; def ~~primary n == (_chg_line,n) enddef;
def /secondary n == (_postA,n) enddef; def //secondary n == (_postB,n) enddef;
@@ -230,8 +230,8 @@ def $$(text t)(expr e) = begingroup save cntBS; cntBS:=0; ab_num:=ab_num+1;
if known e:: if numeric e::
if (e>=si)and(e<=nl):: if e==dl:: for list==t:: PB(_dl,list) endfor
else:: for list==t:: PB(_set_adr,list) PB(_set_line,e) endfor fi
- elseif (e>=?3)and(e<=?20):: for list==t:: !?(list)(e-?3+3)(1) endfor
- elseif (e>=??3)and(e<=??20):: for list==t:: !?(list)(e-??3+3)(0) endfor
+ elseif (e>=??3)and(e<=??20):: for list==t:: !?(list)(e-??3+3)(1) endfor
+ elseif (e>=?3)and(e<=?20):: for list==t:: !?(list)(e-?3+3)(0) endfor
elseif e==Ph1:: !?(t)(6)(1) PB(_dl,-2) PB(_dl,-4)
elseif e==Ph2:: !?(t)(6)(1) PB(_dl,-1) PB(_dl,-3) PB(_dl,-5)
elseif e==ph1:: !?(t)(6)(0) PB(_dl,-2) PB(_dl,-4)
@@ -337,7 +337,7 @@ enddef;
%------------------------------------------------------------------------------------------------
def proc_bond_atom(expr n)=
f_bra:=f_end:=f_term:=rotT:=adrS:=f_lineT:=f_rotT:=f_lenT:=f_envT:=envT:=env:=0;
- stkL[0]:=bondL:=crR; lenT:=crR; stkA[1]:=stkB[1]:=1;
+ stkL[0]:=bondL:=crR; lenT:=crR; for i=1 upto 5: stkA[i]:=stkB[i]:=0; endfor
for i=n upto cntMC[0]: com:= comMC[0][i]; par:=parMC[0][i];
if com=_push:
if par=1: stkL[adrS]:=bondL; stkA[incr adrS]:=adrA:=cntA; stkB[adrS]:=adrB:=cntB;
@@ -397,8 +397,8 @@ def add_atom=
enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
def proc_skeleton=
- stkA[1]:=stkB[1]:=1; envT:=env:=f_lineT:=f_rotT:=f_lenT:=f_envT:=0;
- adrA:=adrB:=cntA:=cntB:=angT:=adrS:=f_end:=f_bra:=rotT:=f_term:=0;
+ envT:=env:=f_lineT:=f_rotT:=f_lenT:=f_envT:=0; for i=1 upto 5: stkA[i]:=stkB[i]:=0; endfor
+ adrA:=adrB:=cntA:=cntB:=angT:=adrS:=f_end:=f_bra:=rotT:=f_term:=0;
for i=1 upto cntMC[0]: com:=comMC[0][i]; par:=parMC[0][i];
if com=_push: if par=1: stkM[adrS]:=env; adrS:=adrS+1; stkA[adrS]:=adrA:=cntA;
stkB[adrS]:=adrB:=cntB;
@@ -553,16 +553,16 @@ mc_num:=first_def_number;
lr:='(60 for i==1 upto 10:: ,-60,60 endfor); rl:='(-60,lr);
def ring expr n=^^((-180 DIV n)-90),(_chg_len,0),
for i==2 upto n:: ,(360 DIV n) endfor,(_cyc_sB,1-n) enddef;
-for i=3 upto 20: ??[i]:='({{,ring i,}}); endfor
-for i=3 upto 20: ?[i]:='({,ring i,}); endfor
-Ph:=Ph1:='( ?6,(_dl,-2),(_dl,-4),(_dl,-6)); Ph2:='( ?6,(_dl,-1),(_dl,-3),(_dl,-5));
-ph:=ph1:='(??6,(_dl,-2),(_dl,-4),(_dl,-6)); ph2:='(??6,(_dl,-1),(_dl,-3),(_dl,-5));
+for i=3 upto 20: ?[i]:='({{,ring i,}}); endfor
+for i=3 upto 20: ??[i]:='({,ring i,}); endfor
+Ph:=Ph1:='(??6,(_dl,-2),(_dl,-4),(_dl,-6)); Ph2:='(??6,(_dl,-1),(_dl,-3),(_dl,-5));
+ph:=ph1:='(?6, (_dl,-2),(_dl,-4),(_dl,-6)); ph2:='(?6, (_dl,-1),(_dl,-3),(_dl,-5));
!:='((_mk_bond,_arg_ang)); !0:='(^^180,180);
-for i=1 upto 20: !![i]:='(! for j==2 upto i::,! endfor); endfor
-for i=1 upto 20: ![i]:='({,(_get_len,0),!![i],}); endfor
-!!:=!!1; Me:='(); Et:=!; Pr:='(!,!); Bu:='(!,!,!);
-for i=4,5,6: for j=2 upto i-2: ?[i][j]:='((_fuse,i),(j,1)); endfor endfor
-for i=4,5,6: for j=2 upto i-2: ??[i][j]:='((_fuse,i),(j,0)); endfor endfor
+for i=1 upto 20: ![i]:='({{,(_get_len,0),! for j==2 upto i::,! endfor,}}); endfor
+for i=1 upto 20: !![i]:='({, (_get_len,0),! for j==2 upto i::,! endfor,}); endfor
+Me:='(); Et:=!; Pr:='(!,!); Bu:='(!,!,!);
+for i=4,5,6: for j=2 upto i-2: ??[i][j]:='((_fuse,i),(j,1)); endfor endfor
+for i=4,5,6: for j=2 upto i-2: ?[i][j]:='((_fuse,i),(j,0)); endfor endfor
%-------------------------------------------------------------------------------------------------
H :='("H");C:='("C");N:='("N");O:='("O");F:='("F");S:='("S");P:='("P");I:='("I");
Si:='("{Si}");Al:='("{Al}");Mg:='("{Mg}");Zn:='("{Zn}");As:='("{As}");Cu:='("{Cu}");