diff options
author | Karl Berry <karl@freefriends.org> | 2022-03-13 20:46:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-03-13 20:46:36 +0000 |
commit | de05bebec0f64c9977e3a2ebb305b75bd37de07f (patch) | |
tree | 6faad2f4295683d26b15de46ee0c156956ee7461 /Master/texmf-dist/doc | |
parent | fc9457d95b5f96a9eb90abaa452216ce40ed0b9d (diff) |
mcf2graph (13mar22)
git-svn-id: svn://tug.org/texlive/trunk@62678 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
14 files changed, 350 insertions, 191 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG index a6625b3c3e8..ac547444939 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG +++ b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG @@ -1,6 +1,16 @@ ******************************************************************************* - Changelog of mcf2graph software package by Akira Yamaji 2022-02-27 + Changelog of mcf2graph software package by Akira Yamaji 2022-03-13 ******************************************************************************* +[ver. 4.82 / 2022-03-13] + -add new example file + mcf_exa_code.tex (example include code) + mcf_exa_code.pdf + -change file name + mf_data_base.mcf => mcf_library.mcf + -update mcf2graph.mp + -update mcf_library.mcf + -update MCF example + [ver. 4.81 / 2022-02-27] -update mcf2graph.mp -update MCF manual diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README index b3fe39068e1..bac51eca958 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 MetaPost Author : Akira Yamaji - version : 4.81 2022-02-27 + version : 4.82 2022-03-13 E-mail : mcf2graph@gmail.com Located at : http://www.ctan.org/pkg/mcf2graph ******************************************************************************** @@ -18,17 +18,19 @@ ( 1) README This file ( 2) CHANGELOG Changelog file of mcf2graph ( 3) mcf2graph.mp Main macro of Metapost - ( 4) mcf_data_base.mcf Molecular data base file - ( 5) mcf_exa_soc.mp MCF souce file example + ( 4) mcf_library.mcf Molecular data library + ( 5) mcf_exa_soc.mp Molecular difinition file example ( 6) mcf_manual.tex MCF syntax manual(LaTeX file) make files 'mcf_man_soc-***.mps' before typeset >mpost mcf_man_soc.mf ( 7) mcf_man_soc.mp Molecular definition file for mcf_manual.tex ( 8) mcf_manual.pdf PDF of (6) (typeset with pdftex(LaTeX),makeindex) ( 9) mcf_example.tex MCF example - (10) mcf_example.pdf PDF of (9) typeset with LuaTeX(LuaLaTeX) - (11) mcf_mplib_exa.tex luamplib(LuaLaTeX) example - (12) mcf_mplib_exa.pdf PDF of (11) typeset with LuaTeX(LuaLaTeX) + (10) mcf_example.pdf PDF of (9) typeset with LuaLaTeX + (11) mcf_exa_code.tex MCF example include code + (12) mcf_exa_code.pdf PDF of (11) typeset with LuaLaTeX + (13) mcf_mplib_exa.tex luamplib(LuaLaTeX) example + (14) mcf_mplib_exa.pdf PDF of (13) typeset with LuaLaTeX 3. How to use mcf2graph with MetaPost Minimum requirement to use mcf2graph : mpost.exe,mpost.dll,mpost.mp,plain.mp @@ -40,13 +42,13 @@ ( 6) >mpost -s ahlength=1 FILENAME => output information-aux file(for tex) ( 7) >mpost -s ahlength=2 FILENAME => output information-aux file (for spread sheet) - ( 8) >mpost -s ahlength=3 FILENAME => output data-base-aux file + ( 8) >mpost -s ahlength=3 FILENAME => output library-aux file ( 9) >mpost -s ahlength=5 FILENAME => output mol file(V2000) (10) >mpost -s ahlength=6 FILENAME => output mol file(V3000) (11) >mpost -s ahlength=7 FILENAME => output report file 4. License - mcf2graph ver 4.81 Copyright (c) 2013-2022 Akira Yamaji + mcf2graph ver 4.82 Copyright (c) 2013-2022 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 diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf2graph.mp b/Master/texmf-dist/doc/metapost/mcf2graph/mcf2graph.mp index a34c4a9054f..6bf22925102 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf2graph.mp +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf2graph.mp @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 4.81 Copyright (c) 2013-2022 Akira Yamaji +% mcf2graph ver 4.82 Copyright (c) 2013-2022 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, @@ -28,17 +28,17 @@ % Set outputformat to "eps" (.eps) : mpost -s ahangle=3 FILENAME % Set output information aux file (for TeX) : mpost -s ahlength=1 FILENAME % Set output information aux file (for spread sheet) : mpost -s ahlength=2 FILENAME -% Set output aux data-base file : mpost -s ahlength=3 FILENAME +% Set output aux library file : mpost -s ahlength=3 FILENAME % Set output MOL file (V2000) : mpost -s ahlength=5 FILENAME % Set output MOL file (V3000) : mpost -s ahlength=6 FILENAME % Set output report : mpost -s ahlength=7 FILENAME %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -message "* This is mcf2graph ver 4.81 2022.02.27"; +message "* This is mcf2graph ver 4.82 2022.03.13"; tracingstats:=1; prologues:=3; warningcheck:=0; %------------------------------------------------------------------------------------------------- numeric save_num[],parts_com[][],parts_par[][],parts_cnt[],tbl_atom[],tbl_group[][],tbl_atom_wt[], tbl_atom_mi[],tbl_char_wd[],tbl_char_ht[]; -string save_str[],tbl_atom_str[],str_tbl[],tag[],aux_delimiter,default_data_file, +string save_str[],tbl_atom_str[],str_tbl[],tag[],aux_delimiter,default_library, default_temp_file,mpfont,atomfont,tempc,temps,blanks; pair save_pair[],msize,mposition,fsize,fmargin,dum,save_mposition; %------------------------------------------------------------------------------------------------- @@ -79,7 +79,7 @@ vardef fdl(expr n)(expr s)= fsl(n)(decimal(s)) enddef; def printf expr s= write s to file_output enddef; def warning(expr s)= message "% "&decimal(fig_num)&fdr(3)(incr warning_cnt)&")"&s; enddef; %================================================================================================= -default_data_file:="mcf_data_base.mcf"; default_temp_file:="temp.mcf"; +default_library:="mcf_library.mcf"; default_temp_file:="temp.mcf"; mpfont:="uhvr8r"; atomfont:="draw"; defaultfont:=mpfont; %--default ahangle=45--------------------------------------------------------------------- if ahangle=0: outputformat:="eps"; % eps format(.mps) @@ -92,7 +92,7 @@ fi %--default ahlength=4--------------------------------------------------------------------- if ahlength=1: sw_output:=Info; % output aux file ef ahlength=2: sw_output:=Info+Table; % output aux file(Table mode) -ef ahlength=3: sw_output:=Info+Mcode; % output aux data-base +ef ahlength=3: sw_output:=Info+Mcode; % output aux library ef ahlength=4: sw_output:=Fig; % *default ef ahlength=5: sw_output:=MOL2k; % output MOL(V2000) ef ahlength=6: sw_output:=MOL3k; % output MOL(V3000) @@ -112,8 +112,8 @@ if sw_output>=Info: if (ahlength=1)or(ahlength=2): message "* output information file"; message "* file name="&jobname&"-info.aux"; message "* info delimiter="&aux_delimiter; - ef ahlength=3: message "* output data-base file"; - message "* data-base file name="&jobname&"-data.aux"; + ef ahlength=3: message "* output library file"; + message "* library file name="&jobname&"-lib.aux"; ef ahlength=5: message "* output MOL file(V2000)"; message "* "&jobname&"-nnn-"&"inf_EN"&".mol"; ef ahlength=6: message "* output MOL file(V3000)"; message "* "&jobname&"-nnn-"&"inf_EN"&".mol"; ef ahlength=7: message "* output report file"; message "* file name="&jobname&"-report.txt"; fi @@ -134,7 +134,7 @@ max_blength:=10mm; blength:=mangle:=0; max_labelsize:=20mm; dottedline_gap:=1.5; fsize:=(30mm,20mm); fmargin:=(0.4mm,0.4mm); msize:=(1,1); mposition:=(0.5,0.5); %=== bboxmargin:=0; % 2bp => 0 ==================================================================== ahangle:=45; ahlength:=4; defaultsize:=8; defaultscale:=1; labeloffset:=3; ext_defaultline:=0.5; -lonepairdiam:=lonepairspace:=circlediam:=circlepen:=bboxmargin:=0; +lonepairdiam:=lonepairspace:=circlediam:=circlepen:=bboxmargin:=0; mc_length:=100; %================================================================================================== parts_emb_start:=1000; % 1001 => 2000 for embedded parts (max 1900) parts_emi_start:=1900; % 1901 => 2000 for embedded internal parts (max 100) @@ -190,10 +190,10 @@ def beginfigm(text s)= warning_cnt,hideH_cnt,filter_s,mc_indent,cntM,cntA,cntB,minX,minY,maxX,maxY,posA,posM, hideH,lineB,sB,eB,angB,angA,lenB,angX,numS,sumA,bond_num,wdM,htM,chargeA,addA,add_rot, file_input,file_output,cal_FM,cal_MW,cal_MI,inf_Cat,inf_NO,inf_EN,inf_JN,inf_FM,inf_CAS, - inf_USE,inf_EXA,inf_EXB,inf_MW,mol_pic,sC,sI,sS,sT,sV,color_list, - unit_cnt,f_end,semic_cnt,f_match,var_n,tag_a,var_a,at_semic; + inf_USE,inf_EXA,inf_EXB,inf_MW,mol_pic,sC,sI,sS,sT,sV,color_list,unit_cnt,f_end,semic_cnt, + f_match,var_n,tag_a,var_a,at_semic,at_comma; numeric mc_indent[],hideH[],lineB[],sB[],eB[],angB[],angA[],lenB[],angX[],strA[],sumA[], - bond_num[],wdM[],htM[],chargeA[],addA[],add_rot[],at_semic[]; + bond_num[],wdM[],htM[],chargeA[],addA[],add_rot[],at_semic[],at_comma[]; pair posA[],posM[][]; string info_s[],mc[],tag_a[],var_a[],mc,filter_s,file_input,file_output,cal_FM,cal_MW,cal_MI, inf_Cat,inf_NO,inf_EN,inf_JN,inf_FM,inf_CAS,inf_USE,inf_EXA,inf_EXB,inf_MW, @@ -205,7 +205,7 @@ def beginfigm(text s)= %------------------------------------------------------------------------------------------------ inf_NO:=inf_EN:=inf_JN:=inf_MW:=inf_FM:=inf_CAS:=inf_Cat:=inf_EXA:=inf_EXB:="-"; mc:=temps:=cal_MW:=cal_MI:=cal_FM:=filter_s:=""; - file_input:=default_data_file; + file_input:=default_library; %------------------------------------------------------------------------------------------------ parts_num:=parts_usr_start; parts_int:=parts_int_start; %------------------------------------------------------------------------------------------------ @@ -221,9 +221,9 @@ def beginfigm(text s)= ef at_colon>=1: info_cnt:=info_cnt+1; info_s[info_cnt]:=list; sT:=substring(0,at_colon-1) of list; sV:=substring(at_colon,length(list)) of list; - if sT="f": if scan_char(".",sV,0,1)=0: file_input:=sV&".mcf"; else: file_input:=sV; fi - ef sT="t": temps:=sV; - ef sT="v": pickup_data_unit(temps,sV,1); + if sT="f": if scan_char(".",sV,0,1)=0: file_input:=sV&".mcf"; else: file_input:=sV; fi + ef sT="t": temps:=sV; + ef sT="v": pickup_data_unit(temps,sV,1); ef sT="v+": pickup_data_unit(temps,sV,0); else: if known scantokens("inf_"&sT): scantokens("inf_"&sT):=sV; fi fi fi endfor @@ -298,14 +298,14 @@ def pickup_data_unit(expr t,v,f)= f_end:=unit_cnt:=semic_cnt:=f_match:=inf_num:=0; if t="n": var_n:=scantokens(v); fi forever: - sS:=readfrom file_input; if sS=EOF: f_EOF:=1; fi exitif sS=EOF; + sS:=readfrom file_input; if sS=EOF: f_EOF:=1; fi exitif f_EOF=1; if subc(1,sS)="%": ef (subc(1,sS)="+")and(subc(2,sS)<>"-"): unit_cnt:=unit_cnt+1; if v="*": f_match:=1; ef t="n": if unit_cnt=var_n: f_match:=1; fi fi if f_match=1: forever: sS:=readfrom file_input; - if sS=EOF: f_EOF:=1; fi exitif sS=EOF; exitif subc(1,sS)="+"; + if sS=EOF: f_EOF:=1; fi exitif f_EOF=1; exitif subc(1,sS)="+"; if subc(1,sS)<>"%": fw_n:=scan_char(" ",sS,1,1); mc_row:=mc_row+1; mc_indent[mc_row]:=fw_n-1; mc[mc_row]:=substring(fw_n-1,length(sS)) of sS; mc:=mc&mc[mc_row]; fi @@ -316,8 +316,8 @@ def pickup_data_unit(expr t,v,f)= f_end:=1; else: forever: - sS:=readfrom file_input; if sS=EOF: f_EOF:=1; fi - exitif sS=EOF; exitif (substring(0,2) of sS)="+-"; + sS:=readfrom file_input; if sS=EOF: f_EOF:=1; fi exitif f_EOF=1; + exitif (substring(0,2) of sS)="+-"; endfor fi else: @@ -1146,83 +1146,84 @@ def circ_Oh = (hP,qH)..Z_x..(fW,qH)..Z_y..cycle enddef; def circ_Oa = (hP,0.35aH)..Z_x..(fW,0.35aH)..(hW,.7aH)..cycle enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def draw_char(expr s,p)= -aW:=atom_wd*tbl_char_wd[ASCII(s)]*(1-2ratio_atomgap_atom); -aH:=atom_wd*tbl_char_ht[ASCII(s)]*(1-2ratio_atomgap_atom); -cpos:=p-(aW/2,atom_wd/2*(1-2ratio_atomgap_atom)); -fP:=bond_pen_wd*ratio_char_bond; -hP:=fP/2; qP:=fP/4; fW:=aW-hP; hW:=aW/2; fH:=aH-hP; hH:=aH/2; qH:=aH/4; -%------------------------------------------------------------------------------------------------- -pickup pencircle scaled fP; -if s=cC: cdw sbp(.05,.95)circ_O; -ef s=cH: dwv Z_b--Z_w; dw Z_m--Z_o; dwv Z_e--Z_t; -ef s=cO: dw circ_O; -ef s=cN: dwv Z_b--Z_w; dwv Z_e--Z_t; dwvs(1.4)(1.4hP,aH)--(aW-1.4hP,0); -ef s=cS: cdw sbp(.05,.45)circ_O; cdw sbp(.55,.95)circ_O; dw (fW,.3aH){up}..{up}(hP,.7aH); -ef s=cF: dwh Z_q--Z_u; dwh (0,.45aH)--(fW,.45aH); dw Z_b--Z_r; -ef s=cP: dwv Z_b--Z_w; dw Z_r--(.65aW,fH){right}..(fW,.7aH)..{left}(.65aW,.44aH)..(hP,.44aH); -ef s="I": dwv Z_x--Z_s; dwh (hW-fP,hP)--(hW+fP,hP); dwh (hW-fP,fH)--(hW+fP,fH); -ef s="l": dwv Z_g--Z_f; dwh Z_s--Z_r; dwh Z_x--Z_z; -ef s="2": cdw (hP,1.3hP)..(.4fW,.35fH)..(fW,.65aH)..Z_s..(hP,.65aH); dwh Z_d--Z_a; -ef s="3": cdw sbp(0,.75)circ_Oh; cdw sbp(.25,.98)circ_Oh shifted (0,hH-hP); dwh (.3aW,hH)--Z_y; -ef s="4": dwh Z_j--Z_k; dwv Z_l--(0.75aW,aH)--(1.2hP,qH+hP); dwv (.75aW+qP,aH)--(1.7hP,qH+hP); -ef s="A": dwvs(1.14)Z_b--Z_f--Z_e; dw .33[Z_b,Z_f]--.33[Z_e,Z_f]; -ef s="B": dw Z_r--Z_s{right}..(.9fH,.75aH)..{left}Z_y--Z_m--Z_y{right}..(.9fH,qH)..{left}Z_x--Z_c; - dwv Z_b--Z_w; -ef s="D": dw Z_r--Z_s..Z_o..Z_x--Z_c; dwv Z_b--Z_w; -ef s="E": pickup pensquare scaled fP; dw Z_z--Z_c--Z_r--Z_n; dw Z_m--Z_o; -ef s="G": cdw sbp(.06,.97)circ_O; dwh bot Z_y-- bot Z_v; -ef s="J": cdw Z_m..(hP,.4aH){down}..{right}Z_x{right}..{up}(fW,.4aH)..Z_t; -ef s="K": cdw Z_b--Z_w; cdw .35[.45[Z_b,Z_w],Z_u]--Z_e; cdw .35[Z_b,Z_w]--Z_u; -ef s="L": dwh Z_d--Z_a; dwv Z_b--Z_w; -ef s="M": dwv Z_b--Z_w; dwvs(1.14)Z_w--Z_x--Z_t; dwv Z_t--Z_e; -ef s="Q": dw circ_O; dw (.6aW,.4aH)--Z_e; -ef s="R": dwv Z_b--Z_w; dw Z_r--(.65aW,fH){right}..(fW,.7aH)..{left}(.65aW,.44aH)..(hP,.44aH); - cdw Z_e{up}..{left}(hW,.44aH); -ef s="T": dwh Z_q--Z_u; dwv .5[Z_q,Z_u]--Z_g; -ef s="U": cdw Z_w..Z_m{down}..{right}Z_x{right}..{up}Z_o..Z_t; -ef s="V": dwvs(1.2)Z_w--Z_g--Z_t; -ef s="W": dwvs(1.08)Z_w--(aW/4,0)--Z_f--Z_l--Z_t; -ef s="X": dwvs(1.4)Z_w..Z_e; dwvs(1.4) Z_b..Z_t; -ef s="Y": dwvs(1.2)Z_w--Z_y--Z_t; dwv Z_y--Z_g; -ef s="Z": dwh Z_q--Z_u; dwvs(1.4)(1.4hP,fP)--(aW-1.4hP,aH-fP); dwh Z_a--Z_d; -ef s="a": dw Z_x..Z_o..Z_s..Z_m..cycle; dwv Z_e--Z_t; -ef s="b": dw Z_x..Z_o..Z_p..Z_m..cycle; dwv Z_b--(hP,1.3aH) -ef s="c": cdw sbp(.06,.94)Z_o..Z_s..Z_m..Z_x..cycle; -ef s="d": dw Z_x..Z_o..Z_p..Z_m..cycle; dwv Z_e--(fW,1.3aH); -ef s="e": cdw sbp(0,.92)Z_o..Z_s..Z_m..Z_x..cycle; dw Z_o--Z_m; -ef s="f": cdw (.4fW,0)--(.4fW,.75aH){up}..(.75aW,fH)..{down}(fW,.8aH); dwh Z_h--Z_v; -ef s="g": dw circ_Oa; dw sbp(0,.5)circ_Oh shifted (0,-.5fH); cdw (fW,.7aH)--(fW,-qH); -ef s="h": cdw Z_b..(hP,.3aH){up}..(hW,.7fH)..{down}(fW,.3aH)..Z_e; dwv (hP,.3aH)--Z_w; -ef s="i": dwv Z_g--(hW,.7aH); ppcs 1.4fP; dw Z_s; -ef s="j": cdw (fW,.7aH)--Z_z..(aW/4,-.66fP)..Z_c; ppcs 1.4fP; dw Z_n; -ef s="k": dwv Z_b--(hP,1.3fH); cdw .5[Z_b,Z_w]--Z_e; cdw .5[Z_b,Z_w]--Z_u; -ef s="m": cdw Z_b..(hP,.3aH){up}..(.28aW,fH)..{down}(hW,.3aH)..Z_g; - cdw (hW,.6aH){up}..(.7aW,fH)..{down}(fW,.6aH)..Z_e; dwv (hP,.3aH)--Z_w; -ef s="n": cdw Z_b{up}..(hW,.8fH)..{down}Z_o..Z_e; dwv Z_b--(hP,.8aH); -ef s="o": dw Z_x..Z_o..Z_s..Z_m..cycle; -ef s="p": dw Z_x..Z_o..Z_s..Z_m..cycle; dwv Z_w--(hP,-.3aH); -ef s="q": dw Z_x..Z_o..Z_s..Z_m..cycle; dwv Z_t--(fW,-.3aH); -ef s="r": cdw (sbp(.33,.72)Z_x..Z_o..Z_s..Z_m..cycle) shifted(0,-hP); dwv Z_b--Z_w; -ef s="s": cdw sbp(.05,.45)circ_O; cdw sbp(.55,.95)circ_O; dw (fW,.3aH){up}..{up}(hP,.7aH); -ef s="t": dwv Z_g--Z_f; dwh (0,.66aH)--(aW,.66aH); -ef s="u": cdw Z_w..(hP,.55aH){down}..Z_x..(fW,.55aH){up}..Z_t; dwv Z_t--Z_e; -ef s="v": dwv Z_w--Z_g--Z_t; -ef s="w": dwv Z_w--(aW/4,0)--Z_f--Z_l--Z_t; -ef s="x": dwvs(1.4)Z_w--Z_e; dwvs(1.4) Z_t--Z_b; -ef s="y": dwvs(1.4)(Z_w--Z_y) shifted (0,-.3aH); dwvs(1.4)(Z_t--Z_b) shifted (0,-.3aH); -ef s="z": dwh Z_q--Z_u; dwvs(1.4)(1.4hP,fP)--(aW-1.4hP,aH-fP); dwh Z_a--Z_d; -ef s="0": dw Z_m...Z_s...Z_o...Z_x...cycle; -ef s="1": dwv Z_g--(hW,aH-.3hP)--(hW-fP,aH-fP)--(hW-fP,aH-1.5fP); -ef s="5": dwh Z_q--Z_u; dwv Z_r--(hP,.55fH); - cdw (qP,.18aH)..(.65aW,1.3hP)..(fW,.4aH)..(hW,.63aH)..(.7hP,.56aH); -ef s="6": dw Z_x..(fW,.5fW)..Z_i..(hP,.5fW)..cycle; cdw (.8fP,hH)--Z_f; -ef s="7": dwh (0,.fH)--Z_u; dwvs(1.2)(aW-1.2hP,aH-fP)--(.4aW,0); -ef s="8": dw circ_Oh; dw (hP,.75aH)...Z_s...(fW,.75aH)...Z_y...cycle; -ef s="9": dw (Z_x..(fW,.5fW)..Z_i..(hP,.5fW)..cycle) shifted (0,.32aH); cdw (fW-.45fP,hH)--Z_g; -ef s="-": dwh Z_m--Z_o; -ef s="+": dwv Z_x--Z_s; dwh Z_m--Z_o; -else: -fi + aW:=atom_wd*tbl_char_wd[ASCII(s)]*(1-2ratio_atomgap_atom); + aH:=atom_wd*tbl_char_ht[ASCII(s)]*(1-2ratio_atomgap_atom); + cpos:=p-(aW/2,atom_wd/2*(1-2ratio_atomgap_atom)); + fP:=bond_pen_wd*ratio_char_bond; + hP:=fP/2; qP:=fP/4; fW:=aW-hP; hW:=aW/2; fH:=aH-hP; hH:=aH/2; qH:=aH/4; + %----------------------------------------------------------------------------------------------- + pickup pencircle scaled fP; + if s=cC: cdw sbp(.05,.95)circ_O; + ef s=cH: dwv Z_b--Z_w; dw Z_m--Z_o; dwv Z_e--Z_t; + ef s=cO: dw circ_O; + ef s=cN: dwv Z_b--Z_w; dwv Z_e--Z_t; dwvs(1.4)(1.4hP,aH)--(aW-1.4hP,0); + ef s=cS: cdw sbp(.05,.45)circ_O; cdw sbp(.55,.95)circ_O; dw (fW,.3aH){up}..{up}(hP,.7aH); + ef s=cF: dwh Z_q--Z_u; dwh (0,.45aH)--(fW,.45aH); dw Z_b--Z_r; + ef s=cP: dwv Z_b--Z_w; dw Z_r--(.65aW,fH){right}..(fW,.7aH)..{left}(.65aW,.44aH)..(hP,.44aH); + ef s="I": dwv Z_x--Z_s; dwh (hW-fP,hP)--(hW+fP,hP); dwh (hW-fP,fH)--(hW+fP,fH); + ef s="l": dwv Z_g--Z_f; dwh Z_s--Z_r; dwh Z_x--Z_z; + ef s="2": cdw (hP,1.3hP)..(.4fW,.35fH)..(fW,.65aH)..Z_s..(hP,.65aH); dwh Z_d--Z_a; + ef s="3": cdw sbp(0,.75)circ_Oh; cdw sbp(.25,.98)circ_Oh shifted (0,hH-hP); dwh (.3aW,hH)--Z_y; + ef s="4": dwh Z_j--Z_k; dwv Z_l--(0.75aW,aH)--(1.2hP,qH+hP); dwv (.75aW+qP,aH)--(1.7hP,qH+hP); + ef s="-": dwh Z_m--Z_o; + ef s="+": dwv Z_x--Z_s; dwh Z_m--Z_o; + ef s="A": dwvs(1.14)Z_b--Z_f--Z_e; dw .33[Z_b,Z_f]--.33[Z_e,Z_f]; + ef s="B": dw Z_r--Z_s{right}..(.9fH,.75aH)..{left}Z_y--Z_m--Z_y{right}.. + (.9fH,qH)..{left}Z_x--Z_c; + dwv Z_b--Z_w; + ef s="D": dw Z_r--Z_s..Z_o..Z_x--Z_c; dwv Z_b--Z_w; + ef s="E": pickup pensquare scaled fP; dw Z_z--Z_c--Z_r--Z_n; dw Z_m--Z_o; + ef s="G": cdw sbp(.06,.97)circ_O; dwh bot Z_y-- bot Z_v; + ef s="J": cdw Z_m..(hP,.4aH){down}..{right}Z_x{right}..{up}(fW,.4aH)..Z_t; + ef s="K": cdw Z_b--Z_w; cdw .35[.45[Z_b,Z_w],Z_u]--Z_e; cdw .35[Z_b,Z_w]--Z_u; + ef s="L": dwh Z_d--Z_a; dwv Z_b--Z_w; + ef s="M": dwv Z_b--Z_w; dwvs(1.14)Z_w--Z_x--Z_t; dwv Z_t--Z_e; + ef s="Q": dw circ_O; dw (.6aW,.4aH)--Z_e; + ef s="R": dwv Z_b--Z_w; dw Z_r--(.65aW,fH){right}..(fW,.7aH)..{left}(.65aW,.44aH)..(hP,.44aH); + cdw Z_e{up}..{left}(hW,.44aH); + ef s="T": dwh Z_q--Z_u; dwv .5[Z_q,Z_u]--Z_g; + ef s="U": cdw Z_w..Z_m{down}..{right}Z_x{right}..{up}Z_o..Z_t; + ef s="V": dwvs(1.2)Z_w--Z_g--Z_t; + ef s="W": dwvs(1.08)Z_w--(aW/4,0)--Z_f--Z_l--Z_t; + ef s="X": dwvs(1.4)Z_w..Z_e; dwvs(1.4) Z_b..Z_t; + ef s="Y": dwvs(1.2)Z_w--Z_y--Z_t; dwv Z_y--Z_g; + ef s="Z": dwh Z_q--Z_u; dwvs(1.4)(1.4hP,fP)--(aW-1.4hP,aH-fP); dwh Z_a--Z_d; + ef s="a": dw Z_x..Z_o..Z_s..Z_m..cycle; dwv Z_e--Z_t; + ef s="b": dw Z_x..Z_o..Z_p..Z_m..cycle; dwv Z_b--(hP,1.3aH) + ef s="c": cdw sbp(.06,.94)Z_o..Z_s..Z_m..Z_x..cycle; + ef s="d": dw Z_x..Z_o..Z_p..Z_m..cycle; dwv Z_e--(fW,1.3aH); + ef s="e": cdw sbp(0,.92)Z_o..Z_s..Z_m..Z_x..cycle; dw Z_o--Z_m; + ef s="f": cdw (.4fW,0)--(.4fW,.75aH){up}..(.75aW,fH)..{down}(fW,.8aH); dwh Z_h--Z_v; + ef s="g": dw circ_Oa; dw sbp(0,.5)circ_Oh shifted (0,-.5fH); cdw (fW,.7aH)--(fW,-qH); + ef s="h": cdw Z_b..(hP,.3aH){up}..(hW,.7fH)..{down}(fW,.3aH)..Z_e; dwv (hP,.3aH)--Z_w; + ef s="i": dwv Z_g--(hW,.7aH); ppcs 1.4fP; dw Z_s; + ef s="j": cdw (fW,.7aH)--Z_z..(aW/4,-.66fP)..Z_c; ppcs 1.4fP; dw Z_n; + ef s="k": dwv Z_b--(hP,1.3fH); cdw .5[Z_b,Z_w]--Z_e; cdw .5[Z_b,Z_w]--Z_u; + ef s="m": cdw Z_b..(hP,.3aH){up}..(.28aW,fH)..{down}(hW,.3aH)..Z_g; + cdw (hW,.6aH){up}..(.7aW,fH)..{down}(fW,.6aH)..Z_e; dwv (hP,.3aH)--Z_w; + ef s="n": cdw Z_b{up}..(hW,.8fH)..{down}Z_o..Z_e; dwv Z_b--(hP,.8aH); + ef s="o": dw Z_x..Z_o..Z_s..Z_m..cycle; + ef s="p": dw Z_x..Z_o..Z_s..Z_m..cycle; dwv Z_w--(hP,-.3aH); + ef s="q": dw Z_x..Z_o..Z_s..Z_m..cycle; dwv Z_t--(fW,-.3aH); + ef s="r": cdw (sbp(.33,.72)Z_x..Z_o..Z_s..Z_m..cycle) shifted(0,-hP); dwv Z_b--Z_w; + ef s="s": cdw sbp(.05,.45)circ_O; cdw sbp(.55,.95)circ_O; dw (fW,.3aH){up}..{up}(hP,.7aH); + ef s="t": dwv Z_g--Z_f; dwh (0,.66aH)--(aW,.66aH); + ef s="u": cdw Z_w..(hP,.55aH){down}..Z_x..(fW,.55aH){up}..Z_t; dwv Z_t--Z_e; + ef s="v": dwv Z_w--Z_g--Z_t; + ef s="w": dwv Z_w--(aW/4,0)--Z_f--Z_l--Z_t; + ef s="x": dwvs(1.4)Z_w--Z_e; dwvs(1.4) Z_t--Z_b; + ef s="y": dwvs(1.4)(Z_w--Z_y) shifted (0,-.3aH); dwvs(1.4)(Z_t--Z_b) shifted (0,-.3aH); + ef s="z": dwh Z_q--Z_u; dwvs(1.4)(1.4hP,fP)--(aW-1.4hP,aH-fP); dwh Z_a--Z_d; + ef s="0": dw Z_m...Z_s...Z_o...Z_x...cycle; + ef s="1": dwv Z_g--(hW,aH-.3hP)--(hW-fP,aH-fP)--(hW-fP,aH-1.5fP); + ef s="5": dwh Z_q--Z_u; dwv Z_r--(hP,.55fH); + cdw (qP,.18aH)..(.65aW,1.3hP)..(fW,.4aH)..(hW,.63aH)..(.7hP,.56aH); + ef s="6": dw Z_x..(fW,.5fW)..Z_i..(hP,.5fW)..cycle; cdw (.8fP,hH)--Z_f; + ef s="7": dwh (0,.fH)--Z_u; dwvs(1.2)(aW-1.2hP,aH-fP)--(.4aW,0); + ef s="8": dw circ_Oh; dw (hP,.75aH)...Z_s...(fW,.75aH)...Z_y...cycle; + ef s="9": dw (Z_x..(fW,.5fW)..Z_i..(hP,.5fW)..cycle) shifted (0,.32aH); cdw (fW-.45fP,hH)--Z_g; + else: + fi enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def warning_bond(expr a)= @@ -1300,7 +1301,7 @@ enddef; %================================================================================================= def proc_info_out(expr f)= message "["&decimal(fig_num)&"]:"&inf_EN; - if (f=1)or(f=2): file_output:=jobname&"-info.aux"; ef f=3: file_output:=jobname&"-data.aux"; fi + if (f=1)or(f=2): file_output:=jobname&"-info.aux"; ef f=3: file_output:=jobname&"-lib.aux"; fi if (fig_num=1)and(f=2): printf tag[1] for i=2 upto aux_max: exitif tag[i]=""; &aux_delimiter&tag[i] endfor ; fi %-------------------------------------------------------------------------------------- @@ -1426,7 +1427,19 @@ enddef; def proc_mc_out(expr f)= message "["&decimal(fig_num)&"]:"&inf_EN; file_output:="temp-mc.aux"; - for i=1 upto mc_row: printf (substring(0,mc_indent[i]) of blanks)&mc[i]; endfor + if mc_length<100: + nN:=split_comma(mc); nL:=length(mc); nA:=0; + forever: + for i=nN downto 1: + if at_comma[i]<=nA+mc_length: + printf substring(nA,at_comma[i]) of mc; nA:=at_comma[i]; exitif true; + fi + endfor + if nL-nA<=mc_length: printf substring(nA,nL) of mc; exitif true; fi + endfor + else: + for i=1 upto mc_row: printf (substring(0,mc_indent[i]) of blanks)&mc[i]; endfor + fi printf EOF; enddef; %================================================================================================= @@ -1634,7 +1647,7 @@ def query(text s)= string line_s[][],sort_s[],sort_all[],key_s[],filter_tag[],filter_var[],info_s[]; numeric row_cnt[],order[],order_tbl[],filter_sign[],filter_p[],at_semic[]; unit_row:=f_mcf:=mc_row:=info_cnt:=key_cnt:=filter_cnt:=0; unit_cnt:=1; - file_input:=default_data_file; file_output:=default_temp_file; + file_input:=default_library; file_output:=default_temp_file; %----------------------------------------------------------------------------------------------- for list=s: at_colon:=scan_char(":",list,0,1); at_equal:=scan_char("=",list,0,1); @@ -1747,4 +1760,9 @@ vardef split_semic(expr s)= nN:=at_semic[0]:=0; for i=1 upto length(s): if subc(i,s)=";": nN:=nN+1; at_semic[nN]:=i; fi endfor nN enddef; +%------------------------------------------------------------------------------------------------- +vardef split_comma(expr s)= + nN:=at_comma[0]:=0; + for i=1 upto length(s): if subc(i,s)=",": nN:=nN+1; at_comma[nN]:=i; fi endfor nN +enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_code.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_code.pdf Binary files differnew file mode 100644 index 00000000000..c4f74a9d589 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_code.pdf diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_code.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_code.tex new file mode 100644 index 00000000000..90096a0f34a --- /dev/null +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_code.tex @@ -0,0 +1,118 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Print out mcf data list (LuaLaTeX) by A.Yamaji 2022.03.13 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% ** mcf2graph.mf must be version 4.82 +% ** use mcf_library.mcf +% ** typeset by LuaLaTeX(luamplib) +\documentclass{article} +\usepackage{luamplib}% +\usepackage[T1]{fontenc}% +\mplibcodeinherit{enable}% +\mplibnumbersystem{double}% +\mpliblegacybehavior{disabled}% +%------------------------------------------------------------------------- +\everymplib{% + if unknown Ph1: + input mcf2graph; + outputformat:="eps"; + sw_output:=Fig+Calc; + fsize:=(35mm,34mm); + max_blength:=4mm; + row_h:=3.8mm; + def make_frame= + draw (0,0)--(185mm,0)--(185mm,h)--(0,h)--cycle wpcs thickness_frame; + draw (w,h-row_h)--(185mm,h-row_h) wpcs thickness_frame; + draw (w,h)--(w,0) wpcs thickness_frame; + draw ( 75mm,h)--( 75mm,h-row_h) wpcs thickness_frame; + draw (105mm,h)--(105mm,h-row_h) wpcs thickness_frame; + draw (130mm,h)--(130mm,h-row_h) wpcs thickness_frame; + draw (155mm,h)--(155mm,h-row_h) wpcs thickness_frame; + enddef; + fi +}% +%------------------------------------------------------------------------- +\pagestyle{empty} +\topmargin=-25mm +\oddsidemargin=-12mm +\textwidth=192mm +\textheight=280mm +\parindent=0mm +\makeatletter +%------------------------------------------------------------------------- +\newcount \fig@num% +\newif\ifCONT@% +\edef\one{1}% +\fig@num=0% +%------------------------------------------------------------------------- +\begin{document} +\noindent% +\begin{mplibcode} + beginfigm(":<0,0~nb") + if check(mc)=0: + MC(scantokens(mc)) + ext( + defaultfont:="cmtt9"; + label.lrt("[(No)]",(0,h)); + label.llft("(EXA)",(w,h)); + label.lrt("(Structure)",(8mm,18mm)); + label.lrt("(Name)",(w,h)); + label.lrt("(Category)",(75mm,h)); + label.lrt("(MW)*1",(105mm,h)); + label.lrt("(mw)*2",(130mm,h)); + label.lrt("(fm)*3",(155mm,h)); + label.lrt("(Molecular_Coding_Format)",(46mm,18mm)); + label.lrt("*1_(MW):Molecular_weight(data)",(105mm,26mm)); + label.lrt("*2_(mw):Molecular_weight(calculated)",(105mm,21mm)); + label.lrt("*3_(fm):Molecular_formula(calculated)",(105mm,16mm)); + make_frame; + ) + fi + endfigm + fig_num:=0; +\end{mplibcode}\vspace{-1.2pt}\\ +%------------------------------------------------------------------------ +\CONT@true% +\loop% +\advance\fig@num\@ne\relax% +\begin{mplibcode}% +%%%%%% beginfigm("t:EXA","v+:*") +%%%%%% beginfigm("t:EXA","v+:1") + beginfigm("t:EXA","v+:2") + if check(mc)=0: + MC(scantokens(mc)) + ext( + defaultfont:="cmtt9"; + label.lrt("["&decimal(fig_num)&"]",(0,h)); + label.llft(inf_EXA,(w,h)); + if length(inf_EN)>23: + nA:=defaultscale; defaultscale:=23/length(inf_EN); + label.lrt(inf_EN, (w,h)); + defaultscale:=nA; + else: + label.lrt(inf_EN, (w,h)); + fi + label.lrt(inf_Cat,(75mm,h)); + label.lrt(inf_MW,(105mm,h)); + label.lrt(cal_MW,(130mm,h)); + label.lrt(cal_FM,(155mm,h)); + make_frame; + if mc_row>12: defaultscale:=0.6; row_h:=5.25; + ef mc_row>8: defaultscale:=0.8; row_h:=6.5; + else: row_h:=10; + fi + for i=1 upto mc_row: + label.lrt(mc[i],(w+mc_indent[i]*4.25,h-(i-1)*row_h-11.5)); + endfor + ) + VerbatimTeX("\gdef\EN{"&inf_EN&"}"); + fi + endfigm + VerbatimTeX("\gdef\EOF{"&decimal(f_EOF)&"}"); +\end{mplibcode}\vspace{-1.2pt}\\ +%------------------------------------------------------------------------ +%%%%%%%\ifnum\fig@num=10 \CONT@false \fi% +\ifx\EOF\one \CONT@false \fi% +\message{[\the\fig@num:\EN]}% +\ifCONT@ \repeat% +%------------------------------------------------------------------------------ +\end{document} diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mp b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mp index 65f884e4129..9be5d18af16 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mp +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mp @@ -1,14 +1,15 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format by Akira Yamaji 2022.02.27 +% Molecular Coding Format by Akira Yamaji 2022.03.13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -input mcf2graph; %%% it must be version 4.81 -message "* mcf_exa_soc 2022.02.27"; +input mcf2graph; %%% it must be version 4.82 +message "* mcf_exa_soc 2022.03.13"; message ""; %------------------------------------------------------------------------------ %%%%sw_frame:=Outside; %%%%sw_numbering:=Bond; %%%%sw_numbering:=Atom; %%%%sw_frame:=Atom; +sw_expand:=1; tag1:="J"; tag2:="C"; tag3:="fm"; tag4:="mw"; tag5:="EN"; tag6:="MW"; %------------------------------------------------------------------------------ %% outputformat:="png"; hppp:=vppp:=0.1; outputtemplate:="%j-%3c.png"; @@ -28,8 +29,8 @@ max_blength:=4mm; %------------------------------------------------------------------------------ %%%% beginfigm("t:EN","v:Caffeine") % select EN=Caffeine forever: -%%%% beginfigm("f:mcf_data_base","v+:*") % 'mcf_data_base.mcf'(default) -%%%% beginfigm("f:temp","v+:*") % use query output 'temp.mcf' +%%%% beginfigm("f:mcf_library","v+:*") % 'mcf_library.mcf'(default) +%%%% beginfigm("f:temp","v+:*") % use query output 'temp.mcf' %%%% beginfigm("v+:*") % select all beginfigm("t:EXA","v+:1") % 'v+:1': select EXA=1 if f_EOF=0: if check(mc)=0: MC(scantokens(mc)) fi fi 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 f322a774e4f..4a658c43b56 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_example.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex index b4239bfccd6..8508fc134fd 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex @@ -1,25 +1,24 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF Typeset with LuaLaTeX(luamplib) by A.Yamaji 2022.02.27 +% Example of MCF Typeset with LuaLaTeX(luamplib) by A.Yamaji 2022.03.13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% ** mcf2graph.mf must be version 4.81 -% ** use mcf_data_base.mcf +% ** mcf2graph.mf must be version 4.82 +% ** use mcf_library.mcf % ** typeset by LuaLaTeX(luamplib) \documentclass{article} -\usepackage{luamplib}% -\usepackage[T1]{fontenc}% -\mplibcodeinherit{enable}% -\mplibnumbersystem{double}% -\mpliblegacybehavior{disabled}% +\usepackage{luamplib} +\usepackage[T1]{fontenc} +\mplibcodeinherit{enable} +\mplibnumbersystem{double} +\mpliblegacybehavior{disabled} %------------------------------------------------------------------------- -\everymplib{% - if unknown Ph1: input mcf2graph; fi - outputformat:="eps"; - sw_output:=Fig+Calc; - fsize:=(35mm,24mm); - max_blength:=4mm; - defaultfont:="uhvr8r"; - defaultsize:=8; - defaultscale:=1; +\everymplib{ + if unknown Ph1: + input mcf2graph; + outputformat:="eps"; + sw_output:=Fig+Calc; + fsize:=(35mm,24mm); + max_blength:=4mm; + fi }% %------------------------------------------------------------------------- \pagestyle{empty} @@ -28,34 +27,41 @@ \textwidth=192mm \textheight=280mm \parindent=0mm +\newcount\headeroff +\headeroff=0 +\makeatletter %------------------------------------------------------------------------- \begin{document} +\ifnum\z@=\headeroff% \begin{center} {\Huge\sf Molecular Coding Format examples} \vspace{5mm} \\ Author : Akira Yamaji \quad Date : \today \\ Located at : http://www.ctan.org/pkg/mcf2graph \end{center} {\small *typeset with LuaLaTeX \quad - *use molecular data base file 'mcf\_data\_base.mcf' \\ + *use molecular library file 'mcf\_library.mcf' \\ ** FM(fm):molecular formula (calculated) \quad * MW(mw):molecular weight (calculated)} \vspace{3mm} \\ +\fi% %------------------------------------------------------------------------- \noindent% -\makeatletter -\newbox \f@box% -\newcount \f@num% -\newcount \t@num% +\newbox \fig@box% +\newcount \fig@num% +\newcount \col@num% \font\labelM=cmtt8 at 6pt\relax% %------------------------------------------------------------------------- -\f@num=1% -\t@num=0% +\fig@num=0% +\col@num=0% \unitlength=0.01mm% +\edef\zero{0}% \noindent% %------------------------------------------------------------------------- \newif\ifCONT@% \CONT@true% \loop% -\sbox{\f@box}{% +\advance\fig@num\@ne\relax% +\advance\col@num\@ne\relax% +\sbox{\fig@box}{% \begin{mplibcode} beginfigm("t:EXA","v+:1") if check(mc)=0: @@ -64,22 +70,26 @@ VerbatimTeX("\gdef\MW{"&inf_MW&"}"); VerbatimTeX("\gdef\mw{"&cal_MW&"}"); VerbatimTeX("\gdef\fm{"&cal_FM&"}"); - fi + fi endfigm + VerbatimTeX("\gdef\EOF{"&decimal(f_EOF)&"}"); \end{mplibcode} }% %------------------------------------------------------------------------ -\begin{picture}(3750,3350)% - \put(20,3000){\footnotesize\bf \EN}% - \put(20,2750){\labelM mw:\mw { / }fm:\fm}% - \put(20,2530){\labelM MW:\MW { / }[\the\f@num]}% - \put(0,0){\makebox(3750,2530){\usebox{\f@box}}}% -\end{picture}% +\ifx\EOF\zero% + \begin{picture}(3750,3350)% + \put(20,3000){\footnotesize\bf \EN}% + \put(20,2750){\labelM mw:\mw { / }fm:\fm}% + \put(20,2530){\labelM MW:\MW { / }[\the\fig@num]}% + \put(0,0){\makebox(3750,2530){\usebox{\fig@box}}}% + \end{picture}% + \ifnum\col@num=5 \\ \col@num=\z@ \fi% +\else% + \CONT@false% +\fi% %------------------------------------------------------------------------ -\advance\f@num\@ne\relax% -\advance\t@num\@ne\relax% -\ifnum\t@num=5 \\ \t@num=\z@ \fi% -\ifnum\f@num=156 \CONT@false \fi% +%%%%%%%%\ifnum\fig@num=10 \CONT@false \fi% +\message{[\the\fig@num:\EN]}% \ifCONT@ \repeat% %------------------------------------------------------------------------------ \end{document} diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_data_base.mcf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_library.mcf index 6635993fc16..ac330fef919 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_data_base.mcf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_library.mcf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% molecular data base file mcf_data_base.mcf by Akira Yamaji 2022.02.27 +% molecular library file mcf_library.mcf by Akira Yamaji 2022.03.13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % tag1:var1;tag2:var2;tag3:var3 ..... % first character of line "%" comment out @@ -501,7 +501,7 @@ Cat:biological;EN:Paclitaxel;MW:853.918;EXA:1 +------------------------------------------------------------------------------ Cat:biological;EN:Mevastatin;MW:390.52;EXA:1 + -<30,?6,2=dl,4:*/H^60,-4=?6,-4=dl,9:*/_, +<30,?6,2=dl,4:*/H^60,-4=?6,-4=dl,9:*/_, @10,*\,!,60~wb,?6,6:O,-2://O,-4:/*OH,@5,\*,O,60,//O,!,*/_,!2 +------------------------------------------------------------------------------ Cat:biological;EN:Sesamine;MW:354.35;EXA:1 @@ -564,7 +564,7 @@ Cat:biological;EN:Aflatoxin B2;MW:314.3;EXA:- <30,Ph,6=?6,-2=?5,4=?5,-2=?5,10=dl,{7,14,17}:O, 2:/O!,{8,11}://O,{15^-54,16^54}:*/H +------------------------------------------------------------------------------ -Cat:biological;EN:Aflatoxin G1;MW:328.27;EXA:- +Cat:biological;EN:Aflatoxin G1;MW:328.27;EXA:2 + <30,Ph,6=?6,-2=?6,4=?5,-2=?5,{-2,10}=dl,{7,12,15,18}:O, 2:/O!,{8,11}://O,{16^-54,17^54}:*/H @@ -672,7 +672,7 @@ Cat:synthetic;EN:12-Crown-4;MW:176.21;EXA:- + <-180,O,30,60,60,O,-30,60,60,O,-30,60,60,O,-30,60,&1 +------------------------------------------------------------------------------ -Cat:synthetic;EN:15-Crown-5;MW:220.26;EXA:- +Cat:synthetic;EN:15-Crown-5;MW:220.26;EXA:2 + <-180,O,48,60,60,O,-48,60,60,O,-48,60,60,O,-48,60,60,O,-48,60,&1 +------------------------------------------------------------------------------ @@ -1165,7 +1165,7 @@ Cat:pesticide;EN:Halosulfuron-methyl;MW:434.82;EXA:- +, <6,?5,{3,5}=db,{1,2}:N,5:/Cl,@3,\,SOO,!,NH,!,//O,!,NH,!,Ph,@4,\,//O,!,O,! +------------------------------------------------------------------------------ -Cat:pesticide;EN:Flupoxam;MW:460.8;EXA:- +Cat:pesticide;EN:Flupoxam;MW:460.8;EXA:2 + <30,Ph,4:/Cl,@1,\,?5,{-2,-4}=db,{-2,-4,-5}:N,-1:/Ph,@-3,\,//O,!,NH2, @3,\,!,O,!,/F^35,/F^-35,!,CF3 @@ -1847,7 +1847,7 @@ Cat:pesticide;EN:Silafluofen;MW:408.588;EXA:- + <30,Ph,@5,\,O,!,Ph,-1:/F,@10,\,!3,Si,??,!,Ph,-3:/O!2 +------------------------------------------------------------------------------ -Cat:pesticide;EN:Spinosad;MW:731.968;EXA:- +Cat:pesticide;EN:Spinosad;MW:731.968;EXA:2 + <30,#1,<-120,60,60,-60,60,60,60,-60,60,60,60,-60,&1,##, 5=?5,-1=dl,{-2^60,-3^-35}:/*H,-3=?6,-4=dl,{-1^35,-2'^-60}:*/H,-2=?5, @@ -2194,6 +2194,13 @@ Cat:antibacterial;EN:Oxaziclomefone;MW:376.277;EXA:- <30,?6,6=dl,4:N,2:O,1:/_,5://O,6:/Ph,@4,\,??,!,|,Ph,{3,5}:/Cl +------------------------------------------------------------------------------ %****************************************************************************** +Cat:biological;EN:Okadaic acid;MW:805.00;EXA:2 ++ +<30,?6,@4,?6,@-4,\,!3,<-12,?5,@-3,<-12,?6,-3=?6,@-3,*\,!3, + ?6,@-4,?6,@6,\,!,/*_^-40,*/OH^20,!,//O,!1,OH, + 3=wb,11=dl,15=dr,17=wf,19=wf,38=wb,{5,7,16,24,25,33,42}:O, + 32:*/H^60,10:/_,{12,31,37'}:*/_,27://_,28:/OH,{3,29}:/*OH ++------------------------------------------------------------------------------ Cat:antibiotics;EN:Vancomycin;MW:1449.25;EXA:2 + <-30,#1,!12,{1,3,12}=zf,7=wf,/H^-60,60,*/OH,60, @@ -2219,14 +2226,7 @@ Cat:biological;EN:Maitotoxin;MW:3425.86;EXA:2 {6,46,50,53,60,67,74}:*/H^-60, {9,18,85,93,112,139,143,147}:*/_^60`1,{80,88,97,108',115,120,124}:/*_^-60`1, @$6,\,|,!11,60~dr,-60,60,OH,{2',7,10}:*/OH,{1,3,8'}:*/_,11://_,12:/_, - @6,\,O,30,SOO,30,"O{Na}", - @$36,-45~zf,O,30,SOO,30,"O{Na}", + @6,\,O,30,SOO,30,ONa, + @$36,-45~zf,O,30,SOO,30,ONa, @$150,\,|,!7,{1,2}:/*OH,4:*/_,5:/*_,7=dl +------------------------------------------------------------------------------ -Cat:biological;EN:Okadaic acid;MW:805.00;EXA:2 -+ -<30,?6,@4,?6,@-4,\,!3,<-12,?5,@-3,<-12,?6,-3=?6,@-3,*\,!3, - ?6,@-4,?6,@6,\,!,/*_^-40,*/OH^20,!,//O,!1,OH, - 3=wb,11=dl,15=dr,17=wf,19=wf,38=wb,{5,7,16,24,25,33,42}:O, - 32:*/H^60,10:/_,{12,31,37'}:*/_,27://_,28:/OH,{3,29}:/*OH -+------------------------------------------------------------------------------ diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mp b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mp index f77f6bf94c9..da1e9b80930 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mp +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mp @@ -1,9 +1,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2022.02.27 +% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2022.03.13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -input mcf2graph; %% it must be version 4.81 -% ** use data base file 'mcf_data_base.mcf' -message "mcf_man_soc 2022.02.27"; message ""; +input mcf2graph; %% it must be version 4.82 +% ** use library file 'mcf_library.mcf' +message "mcf_man_soc 2022.03.13"; message ""; %------------------------------------------------------------------------ sw_mframe:=0; sw_expand:=0; 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 1b00d2848be..cec3c7ffbca 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 0dd00f333a1..01d25e170ce 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 2022.02.27 +% Molecular Coding Format manual by Akira Yamaji 2022.03.13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage[pdftex]{graphicx} @@ -1384,8 +1384,8 @@ endfigm \subsection{Luciferin} \index{check()}% \begin{verbatim} -(use data base file 'mcf_data_base') -beginfigm("f:mcf_data_base", +(use library file 'mcf_library') +beginfigm("f:mcf_library", "t:EN","v:Luciferin") fsize:=(50mm,15mm); if check(mc)=0: MC(scantokens(mc)) fi @@ -1519,7 +1519,7 @@ beginfigm("EN:Cholesterol","MW:386.65", >information if check(mc)=0: MC(scantokens(mc)) fi > mc=mc1 - mc4 endfigm > %------------------------------------------------------------------------------ -beginfigm("f:mcf_data_base.mcf","t:EN","v:Adenine") > from mcf_data_base.mcf +beginfigm("f:mcf_library.mcf","t:EN","v:Adenine") > from mcf_library.mcf if check(mc)=0: MC(scantokens(mc)) fi > select EN="Adenine" endfigm > %------------------------------------------------------------------------------ @@ -1536,8 +1536,8 @@ beginfigm("t:n","v+:4") > v+:4 = select No.4 endfigm > %------------------------------------------------------------------------------ forever: -%%%%%%%%%% beginfigm("f:mcf_data_base","v+:*") > select all - beginfigm("f:mcf_data_base","t:EXA","v+:1") > 'v+:1'= select EXA=1 +%%%%%%%%%% beginfigm("f:mcf_library","v+:*") > select all + beginfigm("f:mcf_library","t:EXA","v+:1") > 'v+:1'= select EXA=1 if f_EOF=0: if check(mc)=0: MC(scantokens(mc)) fi fi > keep file open endfigm > exitif f_EOF=1; > exit if file end @@ -1548,10 +1548,10 @@ bye %------------------------------------------------------------------------ \noindent% \newpage -\subsection{Molecular data base file} +\subsection{Molecular library file} \begin{verbatim} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% molecular data base file mcf_data_base.mcf by Akira Yamaji 2021.11.14 +% molecular library file mcf_library.mcf by Akira Yamaji 2022.03.13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % tag1:var1;tag2:var2;tag3:var3 ..... % first character of line "%" comment out @@ -1616,7 +1616,7 @@ Cat:biological;EN:Stearic acid;MW:284.48 %-------------------------------------------------------------- % query() % -% "f:filename" : input file name (default "mcf_data_base.mcf") +% "f:filename" : input file name (default "mcf_library.mcf") % "o:filename" : output file name (default "temp.mcf") % "s:sort-key" : sort by sort-key % @@ -1627,7 +1627,7 @@ Cat:biological;EN:Stearic acid;MW:284.48 % filter 3 : MW<=295 %-------------------------------------------------------------- query("s:EN", -%%%%% "f:mcf_data_base.mcf","o:temp.mcf","s:EN", +%%%%% "f:mcf_library.mcf","o:temp.mcf","s:EN", "Cat=biological","MW>=285","MW<=295"); %-------------------------------------------------------------- forever: @@ -1767,9 +1767,9 @@ sw_output=Mcode %% file name = 'temp-mc.aux' <30,?6,3=?5,{1,3,5,9}=dl,{2,6,9}:N,5:/NH2,7:NH \end{verbatim} -\paragraph{(Output data-base file)} +\paragraph{(Output library file)} \begin{verbatim} -sw_output=Info+Mcode %% file name = 'jobname-data.aux' +sw_output=Info+Mcode %% file name = 'jobname-lib.aux' (result) Cat:biological;EN:Adenine;MW:135.13;EXA:1 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 a4e6396a01c..91de41e545f 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 be3e077f28c..8a37c827609 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex @@ -1,8 +1,8 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2022.02.27 +% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2022.03.13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% ** mcf2graph.mp must be version 4.81 -% ** use mcf_data_base.mcf +% ** mcf2graph.mp must be version 4.82 +% ** use mcf_library.mcf \documentclass{article} %------------------------------------------------------------------------------ \usepackage{luamplib}% @@ -39,7 +39,7 @@ \section{MCF example} \noindent% %------------------------------------------------------------------------------------ - use molecular data base file 'mcf\_exa\_data.mcf' \\ + use molecular library file 'mcf\_library.mcf' \\ {{\tt FM(fm) :} molecular formula (calculated) \\ {{\tt MW(mw) :} molecular weight (calculated) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -111,9 +111,9 @@ endfigm \newpage \subsection{Chlorophyll a} \noindent% -( read data-base file ) +( read library file ) \begin{verbatim} -beginfigm("f:mcf_data_base.mcf","t:EN","v:Chlorophyll a","NO:-") +beginfigm("f:mcf_library.mcf","t:EN","v:Chlorophyll a","NO:-") sw_output:=Fig+Calc+Mcode; %%%% output temp-mc.aux %%%% fsize:=(100mm,30mm); if check(mc)=0: @@ -128,7 +128,7 @@ endfigm \end{verbatim} %------------------------------------------------------------------------------------ \begin{mplibcode} -beginfigm("f:mcf_data_base.mcf","t:EN","v:Chlorophyll a","NO:-") +beginfigm("f:mcf_library.mcf","t:EN","v:Chlorophyll a","NO:-") sw_output:=Fig+Calc+Mcode; fsize:=(100mm,30mm); if check(mc)=0: MC(scantokens(mc)) @@ -142,7 +142,7 @@ endfigm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Dinophysistoxin-1} \noindent% -( read data-base file + pass mcf to beginfigm() ) +( read library file + pass mcf to beginfigm() ) \begin{verbatim} beginfigm("t:EN","v:Okadaic acid","EN:Dinophysistoxin-1", "MW:819",":,38:*/_,65=red") %%%% add methyl group (color red) %%%% @@ -176,7 +176,7 @@ endfigm; %---------------------------------------------------------------------------- \subsection{Maitotoxin} \noindent% -( read data-base file ) +( read library file ) %-------------------------------------------------------------------------------- \begin{verbatim} %-------------------------------------------------------------------------------- @@ -198,7 +198,7 @@ endfigm; \begin{mplibcode} beginfigm("t:EN","v:Maitotoxin") sw_output:=Fig+Calc+Mcode; - fsize:=(120mm,60mm); fmargin:=(0,3mm); sw_frame:=Outside; + fsize:=(120mm,60mm); fmargin:=(0,3mm); sw_frame:=Outside; %% mc_length:=40; if check(mc)=0: MC(scantokens(mc)) VerbatimTeX("\gdef\EN{"&inf_EN&"}\gdef\MW{"&inf_MW&"}"); VerbatimTeX("\gdef\mw{"&cal_MW&"}\gdef\fm{"&cal_FM&"}"); |