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 | |
parent | 727cc36d88b70bea622511decb72424804f86152 (diff) |
mcf2graph (24mar16)
git-svn-id: svn://tug.org/texlive/trunk@40115 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/README | 16 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf | bin | 248143 -> 248085 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf | bin | 418909 -> 419072 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex | 18 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf | bin | 123650 -> 123595 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex | 12 | ||||
-rw-r--r-- | Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf | 22 |
10 files changed, 49 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG index 3137460edb4..130584a3b46 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG +++ b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG @@ -1,6 +1,10 @@ ******************************************************************************* - Changelog of mcf2graph software package by Akira Yamaji 2016-03-19 + Changelog of mcf2graph software package by Akira Yamaji 2016-03-24 ******************************************************************************* +[ver. 3.85 / 2016-03-24] + -change aux output control + -update MCF syntax manual + [ver. 3.84 / 2016-03-19] -improve efficiency of command @,: -update MCF syntax manual diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README index 773c46846b6..afa70443a9c 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/README +++ b/Master/texmf-dist/doc/metapost/mcf2graph/README @@ -1,15 +1,15 @@ ******************************************************************************** mcf2graph : Convert Molecular Coding Format to graphics with METAFONT/METAPOST Author : Akira Yamaji - version : 3.84 2016-03-19 + version : 3.85 2016-03-24 E-mail : mcf2graph@gmail.com Located at : http://www.ctan.org/pkg/mcf2graph ******************************************************************************** 1. Introduction - Molecular Coding Format(MCF) is new linear notation represent chmical - structure diagram. This 'Coding' is named from coding(programing) technique - like adressing,grouping,macro,etc. There are no Meta language commands in MCF. + Molecular Coding Format(MCF) is new linear notation represent chemical + structure diagrams. This 'Coding' is named from coding(programing) technique + adressing,grouping,macro,etc. There are no Meta language commands in MCF. mcf2graph.mf(METAFONT/METAPOST macro) convert MCF file to graphics file (pk font/PNG/SVG/EPS) or MDL MOL file(V2000). @@ -47,11 +47,11 @@ sw_numberB:=0; % numbering bond off > sw_expand:=0; % substituent expand mode off > sw_start_vector:=0; % start vector output off > Gloval setting - sw_info_formula:=1; % molecular formula output on > - sw_info_weight:=1; % molecular weight output on > sw_font_frame:=0; % font frame off > font_wd#:=60mm#; % font width > font_ht#:=40mm#; % font height > + var3:="calc_weight"; tag3:="MWc"; > AUX file table + var4:="calc_formula"; tag4:="FMc"; > %-- molecular definition ----------------------------------------------- beginfont("EN:Acetamiprid") % molecular 1 sw_font_frame:=1; % > Local setting @@ -60,8 +60,8 @@ beginfont("EN:Imidacloprid") % molecular 2 sw_start_vector:=1; % > Local setting MCf(<30,Ph,1:N,6:/Cl,3\,!, % MCF - |,?5,1:N,3:NH,2\\,!,NO2) - endfont + |,?5,1:N,3:NH,2\\,!,NO2) % + endfont % %----------------------------------------------------------------------- bye 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 3aa36766135..16b3e823749 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2016.03.05 +% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2016.03.24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% input mcf2graph.mf; %------------------------------------------------------------------------- @@ -13,8 +13,10 @@ sw_atom_frame:=0; sw_numberB:=0; sw_expand:=0; sw_start_vector:=0; -%%%% sw_info_formula:=1; -%%%% sw_info_weight:=1; +%%%% var3:="len_x"; tag3:="Lx"; +%%%% var4:="len_y"; tag4:="Ly"; +%%%% var5:="calc_weight"; tag5:="MWc"; +%%%% var6:="calc_formula"; tag6:="FMc"; %%%% sw_checklist:=1; %%%% sw_MOLout:=1; %%%% outputformat:="png"; hppp:=vppp:=0.1; outputtemplate:="%j-%3c.png"; diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf Binary files differindex e85094d8f01..315de5e8602 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf index 149370c2b6e..05ffe66f8ed 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2016.03.05 +% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2016.03.24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% input mcf2graph.mf; %------------------------------------------------------------------------ @@ -14,7 +14,6 @@ sw_start_vector:=0; %%%%%sw_checklist:=1; %*********************************************************************** beginfont("NO:1","EN:Chlorophyll a","MW:893.49","FM:C55H72MgN4O5") - sw_info_weight:=sw_info_formula:=1; font_wd#:=110mm#; font_ht#:=40mm#; MCf(<54, diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf Binary files differindex 9234c8801d1..451e193dde8 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex index 81219e15e38..a8426aac7c2 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format manual by Akira Yamaji 2016.03.05 +% Molecular Coding Format manual by Akira Yamaji 2016.03.24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage[dvipdfmx]{graphicx} @@ -75,16 +75,16 @@ %------------------------------------------------------------------------- input mcf2graph.mf; % input macro %------------------------------------------------------------------------- -sw_auxout:=1; % aux(information) file output on > +sw_auxout:=1; % aux(information) file output on > Gloval setting sw_numberA:=0; % numbering atom off > sw_numberB:=0; % numbering bond off > sw_expand:=0; % substituent expand mode off > -sw_start_vector:=0; % start vector output off > Gloval setting -sw_info_formula:=1; % molecular formula output on > -sw_info_weight:=1; % molecular weight output on > +sw_start_vector:=0; % start vector output off > sw_font_frame:=0; % font frame off > font_wd#:=60mm#; % font width > font_ht#:=40mm#; % font height > +var3:="calc_weight"; tag3:="MWc"; > AUX file table +var4:="calc_formula"; tag4:="FMc"; > outputformat:="png"; hppp:=vppp:=0.1; > PNG output outputtemplate:="%j-%3c.png"; > %------------------------------------------------------------------------- @@ -1147,11 +1147,11 @@ beginfont() MCd(1,.4)( 1,.5)(Ph) endfont \begin{minipage}[t][37mm]{90mm} \MCFtitle{Output molecular information} \begin{verbatim} -beginfont() sw_info_weight:=sw_info_formula:=1; -MCf(...) endfont +var3:="calc_weight"; tag3:="MWc"; +var4:="calc_formula"; tag4:="FMc"; %% Output to mcf_man_soc-info.aux %% -\INFO{{F:mcf_man_soc}{C:82}{MWc:194.19174} - {FMc:C8H10N4O2}}% +\INFO{{F:mcf_man_soc}{C:82} + {MWc:194.19174}{FMc:C8H10N4O2}}% MWc:calculated molecular weight FMc:calculated molecular formula \end{verbatim} diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf Binary files differindex e7c934bb561..e182c1ddcec 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf 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 be65894e6fb..e44fc63a721 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex @@ -1,13 +1,19 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2016.3.05 +% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2016.3.24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass{article} %------------------------------------------------------------------------------ \usepackage{luamplib}% \mplibcodeinherit{enable}% \mplibverbatim{enable}% -\everymplib{if unknown Ph1: input mcf2graph.mf; mp_log_name:="temp-info.aux"; - sw_auxout:=sw_info_lenx:=sw_info_weight:=sw_info_formula:=1; fi}% +\everymplib{if unknown Ph1: + input mcf2graph.mf; + mp_log_name:="temp-info.aux"; + sw_auxout:=1; + var3:="len_x"; tag3:="Lx"; + var4:="calc_weight"; tag4:="MWc"; + var5:="calc_formula"; tag5:="FMc"; + fi}% \everyendmplib{write EOF to mp_log_name;}% %------------------------------------------------------------------------------ \makeatletter% 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; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |