summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf')
-rw-r--r--Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf20
1 files changed, 12 insertions, 8 deletions
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
index ccff8ecd160..06e221df212 100644
--- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
+++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 3.94 Copyright (c) 2013-2016 Akira Yamaji
+% mcf2graph ver 3.95 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,
@@ -30,7 +30,7 @@
% Set output checklist : mpost -s ahlength=2 FILENAME
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tracingstats:=1;
-message " This is mcf2graph ver 3.9 2016.6";
+message " This is mcf2graph ver 3.9 2016.7";
%-------------------------------------------------------------------------------------------------
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[],
@@ -50,6 +50,7 @@ aux_delimiter:=";"; var1:="jobname"; tag1:="F"; var2:="char_num"; tag2:="C";
for i=3 upto aux_max: var[i]:=tag[i]:=""; endfor
%-------------------------------------------------------------------------------------------------
if known green: f_MP:=1;
+ color color_list[];
mp_log_name:=jobname&"-info.aux";
if ahlength=1: proc_end:=1; fi % first molecular only
if ahlength=2: sw_checklist:=1; def shipit = enddef; fi % checklist on
@@ -59,15 +60,17 @@ if known green: f_MP:=1;
elseif ahangle=3: sw_MOLout:=1; def shipit = enddef; % MDL Molefile on
fi
outputtemplate:="%j-%3c."&outputformat;
- def beginchar(text s)= beginfig(char_num) enddef; def endchar = endfig enddef;
- vardef mp_filename = jobname&"-"&fit_zero(char_num)&decimal(char_num)&"."&outputformat enddef;
+ def beginchar(text s)= beginfig(char_num) enddef;
+ def endchar = endfig enddef;
def printf expr s= write s to mp_log_name enddef;
- ahangle:=45; ahlength:=4; def # = enddef; color color_list[];
+ def # = enddef;
def Cp(expr s) = if known s: if s<>0: withcolor color_list[s] fi fi enddef;
def define_pixels(text s) = enddef;
else: f_MP:=0;
def Cp(expr s) = enddef; def color = transform enddef;
- mode_setup; def printf expr s= message s enddef; def mp_filename= "" enddef; fi
+ mode_setup; def printf expr s= message s enddef;
+fi
+ahangle:=45; ahlength:=4;
clearit; chem_structure:=currentpicture;
%-------------------------------------------------------------------------------------------------
let DIV= /; let MUL= *; let LT= <; let GT= >; let AND= &; let :: = : ; let == = =;
@@ -351,7 +354,8 @@ def MCd(expr RW,RH)(expr FW,FH)(text s)=
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 cntB: if lineB[i]<>ov: draw_bond(i,sB[i],eB[i],angB[i],lineB[i]); fi endfor
+ for i=1 upto cntB: if lineB[i]=ov: draw_bond(i,sB[i],eB[i],angB[i],lineB[i]); fi endfor
for i=1 upto cntA:
if (sw_numberA>=1)and(i>=numberA_start)and(i<=numberA_end):
if sw_numberA=2: nA:=i-numberA_start+1;
@@ -792,7 +796,7 @@ def mol_check=
if com_str[strA[i]]="": com_str[strA[i]]:="C"; fi
if com_str[strA[i]]="C": if nA<4: hide_H:=hide_H+(4-nA); fi fi
B_check(i)("C")(4); B_check(i)("H")(1); B_check(i)("O")(2);
- B_check(i)("F")(1); B_check(i)("{Cl}")(1); B_check(i)("{Br}")(1);
+ B_check(i)("F")(1); B_check(i)("{Cl}")(1); B_check(i)("Br}")(1);
for j=1 upto tbl_cnt:
if com_str[strA[i]]=tblA[j]:
if tblN[j]=0: sumA[j]:=sumA[j]+1;