diff options
author | Karl Berry <karl@freefriends.org> | 2016-03-24 22:22:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-03-24 22:22:56 +0000 |
commit | af076f3d085915ef71cddaab71c8c22f8294e1ba (patch) | |
tree | 7bd14e9eb96eee9b8ee57336e68464f01125401b /Master/texmf-dist/metapost/mcf2graph | |
parent | 727cc36d88b70bea622511decb72424804f86152 (diff) |
mcf2graph (24mar16)
git-svn-id: svn://tug.org/texlive/trunk@40115 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost/mcf2graph')
-rw-r--r-- | Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf index 86a70da2d4b..b2fb9522a7e 100644 --- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf +++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 3.84 Copyright (c) 2013-2016 Akira Yamaji +% mcf2graph ver 3.85 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, @@ -38,16 +38,18 @@ numeric angB[],angA[],br_ang[],sB[],eB[],f_FON[],atom_w[],atom_h[],atom_d[],strA 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[], +string info[],tblA[],com_str[],var[],tag[], calc_formula,mp_log_name,mol_name,mol_formula,calc_weight_str,info_str; picture atom_font[],chem_structure,temp_picture; %------------------------------------------------------------------------------------------------- sw_numberA:=sw_numberB:=sw_mol_frame:=sw_auxout:=sw_solid:=sw_expand:=sw_start_vector:=0; char_num:=str_cnt:=proc_end:=sw_font_frame:=sw_atom_frame:=sw_checklist:=sw_MOLout:=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; +sw_subst_off:=sw_bond_single:=0; numberA_start:=numberB_start:=1; numberA_end:=numberB_end:=4095; -info_str:="\INFO"; +info_str:="\INFO"; aux_max:=20; +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; mp_log_name:=jobname&"-info.aux"; @@ -564,13 +566,13 @@ fi enddef; %------------------------------------------------------------------------------------------------- vardef fit_zero(expr n)=if n<=9: "00" elseif n<=99: "0" fi enddef; -def info_c(expr sw,c,cc)= if sw=1: &"{"&c&":"&cc&"}" fi enddef; -def info_n(expr sw,c,n)= if sw=1: &"{"&c&":"&decimal(n)&"}" fi enddef; def auxfile_out= printf info_str&"{" - info_c(sw_info_file,"F",jobname) info_n(sw_info_char,"C",char_num) - info_n(sw_info_lenx,"Lx",len_x) info_n(sw_info_leny,"Ly",len_y) - info_n(sw_info_weight,"MWc",calc_weight) info_c(sw_info_formula,"FMc",calc_formula) + for i=1 upto aux_max: exitif var[i]=""; + &"{"&tag[i]&":"& + if string scantokens(var[i]): scantokens(var[i]) + elseif numeric scantokens(var[i]): decimal(scantokens(var[i])) fi &"}" + endfor for i=1 upto info_num: &"{"&info[i]&"}" endfor &"}%"; enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |