summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-10-03 23:09:44 +0000
committerKarl Berry <karl@freefriends.org>2015-10-03 23:09:44 +0000
commitfe8d843c0480ab3531127a9407e6bc6ad34aeb41 (patch)
tree15293007b62c467186e3b1bf63f04ba6c4a2c039 /Master
parent6307ae8ab02cf7f889e94b3a1ba34bd25e460cb6 (diff)
mcf2graph (3oct15)
git-svn-id: svn://tug.org/texlive/trunk@38536 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/README3
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf7
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdfbin259821 -> 259824 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdfbin320461 -> 320372 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdfbin127799 -> 127775 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex2
-rw-r--r--Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf56
7 files changed, 31 insertions, 37 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README
index e9f80e27721..1644433da8b 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/README
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/README
@@ -1,7 +1,7 @@
********************************************************************************
mcf2graph : Convert Molecular Coding Format to graphics with Metafont/Metapost
Author : Akira Yamaji
- version : 3.73 2015-09-25
+ version : 3.74 2015-10-03
E-mail : akira.yamaji5@gmail.com
Located at : http://mirror.ctan.org/pkg/graphics/mcf2graph
Home page : http://molecoding.cocolog-nifty.com/blog/
@@ -122,3 +122,4 @@
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
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 1f43d85466b..ef9318591ec 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
@@ -408,10 +408,3 @@ beginfont("EN:Atoropin")
endfont
%***************************************************************************
bye
-********
-bye
-*********
-bye
-
-
-bye
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
index d411d5b14f9..4dcb0f30c49 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_manual.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
index b7a191892de..d1d69ca9e33 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_mplib_exa.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf
index 1f64588194b..2bb6ee316ef 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/doc/metapost/mcf2graph/mcf_mplib_exa.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
index 18b61382556..a0551832ae3 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
@@ -174,9 +174,9 @@ endfont;
@(6,46,50,53,60,67,74)*/H^-60,
@(9,18,85,93,112,139,143,147)*/Me`1^60,
@(80,88,97,115,120,124)/*Me`1^-60,108:*/Me`1^-60,
- @(36~zf^-45>30)/'(O,!,SOO,!,"O{Na}"),
#6\,|,!11,60~dr,-60,60,OH,2:/*OH,@(7,10)*/OH,@(1,3)*/Me,@(8~zf,11~dm,12)/Me,
6\,O,30,SOO,30,"O{Na}",
+ #36\~zf^-45,O,30,SOO,30,"O{Na}",
#150\,|,!7,@(1,2)/*OH,4:*/Me,5:/*Me,7=dl
)
endfont
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
index 2ecd92f90c3..7e6e0c53315 100644
--- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
+++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 3.73 Copyright (c) 2013-2015 Akira Yamaji
+% mcf2graph ver 3.74 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,13 @@
% Set output checklist : mpost -s ahlength=2 FILENAME
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tracingstats:=1;
-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;
+message " This is mcf2graph ver 3.7 2015.10";
%-------------------------------------------------------------------------------------------------
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[];
+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[],op_com[][],op_par[][],op_cnt[],
+ comMC[][],parMC[][],stock_p[],cntMC[],colorA[],colorB[],tblN[],tblB[][],wtA[],sumA[],
+ CH[],NH[],NO[],SO[],CCl[],CF[],CBr[],?[],![],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;
@@ -166,7 +165,7 @@ def resize(expr WD,HT)=
ratio_bond_width:=ratio_bond_width*factor; len_x:=len_x*factor; len_y:=len_y*factor;
enddef;
%-------------------------------------------------------------------------------------------------
-for i=1 upto 128: f_FON[i]=0; endfor asc0:=ASCII("0"); asc9:=ASCII("9");
+for i=1 upto 128: f_FON[i]:=0; endfor asc0:=ASCII("0"); asc9:=ASCII("9");
def font_use_check=
for i=1 upto 128: if f_FON[i]<>0: f_FON[i]:=0; fi endfor
if (sw_numberA>=1)or(sw_numberB>=1): for j=asc0 upto asc9: f_FON[j]:=1; endfor
@@ -174,7 +173,6 @@ def font_use_check=
f_FON[ASCII(pic_c(j,com_str[strA[i]]))]:=1; endfor fi endfor fi
enddef;
%-------------------------------------------------------------------------------------------------
-vardef '(text s)= ''(incr mc_num)(s); mc_num enddef;
def set_def_MC=
save /,*,//,/*,*/,**,~,^,`,{,},<,>,&,&#,:,=,\,\\,*\,\*,@,$,#,|,d,w,z,inside_def_MC;
inside_def_MC:=1; d:=dl; w:=wf; z:=zf;
@@ -196,6 +194,7 @@ def set_def_MC=
enddef;
%-------------------------------------------------------------------------------------------------
def PM(expr a,b,c)= comMC[a][incr cntMC[a]]:=b; parMC[a][cntMC[a]]:=c; enddef;
+vardef '(text s)= ''(incr mc_num)(s); mc_num enddef;
def ''(expr k)(text s)= begingroup
if unknown inside_def_MC:: set_def_MC fi cntMC[k]:=0;
for list==s::
@@ -226,7 +225,7 @@ def !!?(expr a)(expr b)(expr c) =
PB(_pop,0) if ypart(a)<=0:: PB(_cyc_eB,ypart(a)-c+1) else:: PB(_cyc_eB,ypart(a)) fi
enddef;
%-------------------------------------------------------------------------------------------------
-def PB(expr b,c)= comMC[ab_num][incr cntBS]:=b; parMC[ab_num][cntBS]:=c; enddef;
+def PB(expr a,b)= cntBS:=cntBS+1; comMC[ab_num][cntBS]:=a; parMC[ab_num][cntBS]:=b; enddef;
def $$(text t)(expr e) =
begingroup save cntBS; cntBS:=0; ab_num:=ab_num+1;
if known e:: if numeric e::
@@ -243,7 +242,7 @@ def $$(text t)(expr e) =
endgroup
enddef;
%-------------------------------------------------------------------------------------------------
-def PA(expr b,c)= comMC[ab_num][incr cntAS]:=b; parMC[ab_num][cntAS]:=c; enddef;
+def PA(expr a,b)= cntAS:=cntAS+1; comMC[ab_num][cntAS]:=a; parMC[ab_num][cntAS]:=b; enddef;
def @@(text t)(expr s)=
begingroup save cntAS; cntAS:=0; ab_num:=ab_num+1;
if known s:: if numeric s::
@@ -273,16 +272,14 @@ def @@(text t)(expr s)=
endgroup
enddef;
%-------------------------------------------------------------------------------------------------
-def PS(expr a,b)= comMC[0][incr cntMC[0]]:=a; parMC[0][cntMC[0]]:=b; enddef;
-def ps_get(expr n)= cntC:=cntMC[0]; cntPS:=cntP;
- for i=n upto cntP: PS(_jp_atom_abs,ps_adr[i]) PS(_push,1)
- if ps_rot[i]<>0: PS(_rot_ang,ps_rot[i]) fi
- if ps_env[i]<>hz: PS(_chg_env,ps_env[i]) fi
- if (ps_line[i]<>0)and(ps_line[i]<>nl): PS(_tmp_line,ps_line[i]) fi
- if ps_len[i]<>crR: PS(_tmp_len,ps_len[i]) fi PS(_chg_len,crR)
- if ps_line[i]<>nl: if ps_line[i]=no: PS(_adj_ang,0) fi PS(_mk_bond,0) fi
- for j=1 upto cntMC[ps_com[i]]: PS(comMC[ps_com[i]][j],parMC[ps_com[i]][j]) endfor
- PS(_pop,1) PS(_term,0)
+def PG(expr a,b)= comMC[0][incr cntMC[0]]:=a; parMC[0][cntMC[0]]:=b; enddef;
+def ps_get(expr n)=
+ cntC:=cntMC[0]; cntPS:=cntP;
+ for i=n upto cntP:
+ PG(_jp_atom_abs,ps_adr[i]) PG(_push,1)
+ for j=1 upto op_cnt[i]: PG(op_com[i][j],op_par[i][j]) endfor
+ for j=1 upto cntMC[ps_com[i]]: PG(comMC[ps_com[i]][j],parMC[ps_com[i]][j]) endfor
+ PG(_pop,1) PG(_term,0)
endfor
proc_bond_atom(cntC+1); if cntP>cntPS: ps_get(cntPS+1); fi
enddef;
@@ -379,9 +376,12 @@ def proc_bond_atom(expr n)=
endfor
enddef;
%-------------------------------------------------------------------------------------------------
+def PP(expr a,b)= op_com[cntP][incr op_cnt[cntP]]:=a; op_par[cntP][op_cnt[cntP]]:=b; enddef;
def ps_put(expr n,p)=
- ps_adr[incr cntP]:=n; ps_com[cntP]:=p; ps_len[cntP]:=lenT;
- ps_line[cntP]:=lineT; ps_rot[cntP]:=rotT; ps_env[cntP]:=envT;
+ ps_adr[incr cntP]:=n; ps_com[cntP]:=p; op_cnt[cntP]:=0;
+ if lineT<>0: PP(_tmp_line,lineT) fi if rotT<>0: PP(_rot_ang,rotT) fi
+ if lenT<>crR: PP(_chg_len,lenT) fi if envT<>hz: PP(_chg_env,envT) fi
+ if lineT<>nl: if lineT=no: PP(_adj_ang,0) fi PP(_mk_bond,0) fi
if f_lineT=0: lineT:=si; fi if f_lenT=0: lenT:=crR; fi
if f_rotT=0: rotT:=0; fi if f_envT=0: envT:=hz; fi
enddef;
@@ -731,10 +731,10 @@ def mol_check=
hide_H:=warning_cnt:=calc_weight:=calc_weightp:=0; calc_formula:="";
for i=1 upto tbl_max: sumA[i]:=0; endfor
for i=1 upto cntA: knownA:=nA:=0;
- for j=1 upto cntB: if (lineB[j]=dl)or(lineB[j]=dr)or(lineB[j]=dm): nB:=2;
- elseif (lineB[j]=tm): nB:=3; elseif lineB[j]=nl: nB:=0;
- elseif lineB[j]=0: nB:=0; else: nB:=1; fi
- if (sB[j]=i)or(eB[j]=i): nA:=nA+nB; fi endfor
+ for j=1 upto cntB: if (lineB[j]=dl)or(lineB[j]=dr)or(lineB[j]=dm): bondC[j]:=2;
+ elseif (lineB[j]=tm): bondC[j]:=3; elseif lineB[j]=nl: bondC[j]:=0;
+ elseif lineB[j]=0: bondC[j]:=0; else: bondC[j]:=1; fi
+ if (sB[j]=i)or(eB[j]=i): nA:=nA+bondC[j]; fi endfor
Bcnt[i]:=nA;
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
@@ -773,7 +773,7 @@ def checklist_out=
fdr(10)(ypart(posA[i])/BL)&" ) "&fixed_l(8)(com_str[strA[i]])&" "&fdr(3)(Bcnt[i]); endfor
message "%Bond list---------------------------------------------------------";
for i=1 upto cntB: if lineB[i]<>0: message "% "&fdr(3)(incr nA)&" "&fdr(3)(sB[i])&
- " -> "&fdr(3)(eB[i])&" ("&fdr(3)(lineB[i]-si+1)&")"; fi endfor
+ " -> "&fdr(3)(eB[i])&" ("&fdr(3)(bondC[i]-si+1)&")"; fi endfor
message "%Fomula / Molecular weight ---------------------------------------";
if calc_weightp<=40: calc_weight_str:=fdr(10)(calc_weight);
else: calc_weight_str:=fdr(10)(calc_weightp)&" * 100"; fi