diff options
author | Karl Berry <karl@freefriends.org> | 2016-02-12 00:20:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-02-12 00:20:07 +0000 |
commit | 947e533d6de8e459df04fdcf60d65bbc735b3b12 (patch) | |
tree | 6ac0e9eac2fd2f8ddfb391d454413258b9a6b986 /Master/texmf-dist/metapost/mcf2graph | |
parent | 499f66f0a1368ffd94de79083962eb5a0f4ca8f2 (diff) |
mcf2graph (11feb16)
git-svn-id: svn://tug.org/texlive/trunk@39672 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost/mcf2graph')
-rw-r--r-- | Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf index 59907975a36..03125f9e88d 100644 --- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf +++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 3.80 Copyright (c) 2013-2016 Akira Yamaji +% mcf2graph ver 3.81 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, @@ -43,7 +43,8 @@ picture atom_font[],chem_structure,temp_picture; %------------------------------------------------------------------------------------------------- sw_numberA:=sw_numberB:=sw_mol_frame:=sw_logout:=sw_solid:=sw_expand:=sw_start_vector:=0; char_num:=str_cnt:=proc_end:=sw_font_frame:=sw_atom_frame:=sw_checklist:=sw_MOLfile:=0; -sw_info_file:=sw_info_char:=1; sw_info_lenx:=sw_info_leny:=sw_info_weight:=sw_info_formula:=0; +sw_info_lenx:=sw_info_leny:=sw_info_weight:=sw_info_formula:=sw_subst_off:=sw_bond_single:=0; +sw_info_file:=sw_info_char:=1; numberA_start:=numberB_start:=1; numberA_end:=numberB_end:=4095; %------------------------------------------------------------------------------------------------- if known green: f_MP:=1; @@ -82,14 +83,13 @@ max_info_num:=12; for i:=1 upto max_info_num: info[i]:=":"; endfor def def_com(expr n)(text tx)= nA:=n; forsuffixes list=tx:: list:=nA; nA:=nA+1; endfor enddef; 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,_stack_reset, + _tmp_env,_set_colorA,_set_colorB,_postA,_postB,_postC,_postD,_postE,_postF,_set_psA,_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); %------------------------------------------------------------------------------------------------- def parameter_list= sw_checklist,sw_numberA,sw_numberB,sw_mol_frame,sw_logout,sw_solid,sw_expand,sw_MOLfile, - sw_start_vector,sw_atom_frame,sw_font_frame, + sw_start_vector,sw_atom_frame,sw_font_frame,sw_subst_off,sw_bond_single, margin_left_right,margin_top_bottom,ratio_atom_bond,ratio_thickness_bond,ratio_char_bond, ratio_chain_ring,offset_atom,offset_atom#,max_bond_width,ratio_bondgap_bond,ratio_zebra_black, ratio_zebragap_bond,ratio_wedge_bond,ratio_atomgap_atom,offset_wedge,offset_wedge#, @@ -308,7 +308,7 @@ def MCd(expr RW,RH)(expr FW,FH)(text s)= eB[0]:=1; com_str[0]:=""; lineT:=si; str_cnt:=2000; posA[0]:=posB[0]:=posB[1]:=(0,0); if (sw_numberA>=1)or(sw_numberB>=1): ratio_atom_bond:=0.25; fi if (sw_expand=1)or(sw_MOLfile=1): expand_set; fi - ''(0)(s,(_term,0)); proc_bond_atom(1); cntA_skeleton:=cntA; cntA_skeleton:=cntB; + ''(0)(s,(_term,0)); proc_bond_atom(1); cntA_skeleton:=cntA; cntB_skeleton:=cntB; if cntP>0: ps_get(1); fi font_use_check; if sw_solid=1: size_setup; proc_skeleton; scaling; @@ -317,9 +317,9 @@ def MCd(expr RW,RH)(expr FW,FH)(text s)= ratio_bond_width:=max_bond_width; size_setup; proc_skeleton; scaling; else: for i=1 upto 4: proc_skeleton; scaling; resize(RW,RH); size_setup; endfor fi fi font_setup; + if sw_subst_off=1: cntA:=cntA_skeleton; cntB:=cntB_skeleton; fi for i=1 upto cntB: draw_bond(i,sB[i],eB[i],angB[i],lineB[i]); endfor for i=1 upto cntA: - if numberA_end=_skeletonA_end: numberA_end:=cntA_skeleton; fi if (sw_numberA>=1)and(i>=numberA_start)and(i<=numberA_end): if sw_numberA=2: nA:=i-numberA_start+1; elseif sw_numberA=3: if numberA_end<cntA: nA:=numberA_end-i+1; else: nA:=cntA-i+1; fi @@ -519,7 +519,7 @@ if (nC>0)and(LN<>0): else: clipping(strA[BP],strA[EP],posA[BP],posA[EP],nC); fi pickup pencircle scaled bond_pen_wd; if known colorB[n]: nB:=colorB[n]; fi - if LN=si:draw pA Cp(nB); + if (LN=si)or(sw_bond_single=1): draw pA Cp(nB); elseif LN=dl:draw pA Cp(nB); draw sfB(pC,gap,ap) Cp(nB); elseif LN=dr:draw pA Cp(nB); draw sfB(pC,gap,am) Cp(nB); elseif LN=dm:draw sfB(pB,gap/1.75,ap) Cp(nB); draw sfB(pB,gap/1.75,am) Cp(nB); @@ -767,7 +767,8 @@ enddef; def checklist_out= nA:=0; calc_weight_str:=""; message "% Molecular name = "& mol_name; - message "% There were "&fdr(3)(warning_cnt)&" warnings / Expanded command count= "&decimal(cntMC[0]); + message "% There were "&fdr(3)(warning_cnt)& + " warnings / Expanded command count= "&decimal(cntMC[0]); message "% width * height = " & fdr(8)(max_x-min_x)&" * "&fdr(8)(max_y-min_y); message "% Shift width * height = "& fdr(8)(min_x)&" * "&fdr(8)(min_y); message "% Bond length = "&fdr(3)(BL)&" Atom size = "&fdr(3)(AL); |