summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-10-17 21:36:36 +0000
committerKarl Berry <karl@freefriends.org>2015-10-17 21:36:36 +0000
commitae5f5414b4992e6952298af124a8fd1816d293b8 (patch)
treef472d1db1b4c6efd6822d849741fb6dd99ffe290 /Master/texmf-dist/metapost
parent46dd0a201815f9d6a3795ff47571530f8b1c04cc (diff)
mcf2graph (17oct15)
git-svn-id: svn://tug.org/texlive/trunk@38666 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost')
-rw-r--r--Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf27
1 files changed, 13 insertions, 14 deletions
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
index 7e6e0c53315..8e63ba00dc1 100644
--- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
+++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 3.74 Copyright (c) 2013-2015 Akira Yamaji
+% mcf2graph ver 3.75 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,
@@ -272,6 +272,16 @@ def @@(text t)(expr s)=
endgroup
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; 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: PP(_tmp_len,0) elseif lineT=no: PP(_adj_ang,0) fi PP(_mk_bond,0)
+ 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;
+%-------------------------------------------------------------------------------------------------
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;
@@ -376,16 +386,6 @@ 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; 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;
-%-------------------------------------------------------------------------------------------------
def add_atom=
lineB[incr cntB]:=lineT; lineT:=si;
if lenT=crR: lenB[cntB]:=bondL; else: lenB[cntB]:=lenT; lenT:=crR; fi
@@ -761,13 +761,12 @@ enddef;
def checklist_out=
nA:=0; calc_weight_str:="";
message "% Molecular name = "& mol_name;
- message "% There were "&fdr(3)(warning_cnt)&" warnings";
+ 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);
message "% Atom count="&fdr(3)(cntA)&" Bond count="&fdr(3)(cntB)&
- " Ring count="&fdr(3)(cntB-cntA+1);
- message "% Hide H = "&fdr(3)(hide_H);
+ " Ring count="&fdr(3)(cntB-cntA+1)&" Hide H ="&fdr(3)(hide_H);
message "%-----------------------------------< atom >< bond >-------";
for i=1 upto cntA: message "% "&fdr(3)(i)&" ("&fdr(10)(xpart(posA[i])/BL)&" ) ("&
fdr(10)(ypart(posA[i])/BL)&" ) "&fixed_l(8)(com_str[strA[i]])&" "&fdr(3)(Bcnt[i]); endfor