diff options
Diffstat (limited to 'Master')
13 files changed, 852 insertions, 1270 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG index ce3badf9180..21454bf0728 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG +++ b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG @@ -1,6 +1,21 @@ ******************************************************************************* - Changelog of mcf2graph software package by Akira Yamaji 2022-01-02 + Changelog of mcf2graph software package by Akira Yamaji 2022-01-17 ******************************************************************************* +[ver. 4.78 / 2022-01-17] + -from this version use MetaPost only + -change file name + mcf2graph.mf => mcf2graph.mp + mcf_exa_soc.mf => mcf_exa_soc.mp + mcf_man_soc.mf => mcf_exa_soc.mp + -change function name + beginfont => beginfigm + endfont => endfigm + -delete style file mcf_setup.sty + -update mcf_example.tex + typeset with LuaLaTeX + -update mcf_data_base.mcf + -update MCF manual,example + [ver. 4.77 / 2022-01-02] -change syntax of add group {a'}:*/_ : {a}:/*_ diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README index 556778b61fe..51cbf86411d 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 + mcf2graph : Convert Molecular Coding Format to graphics with MetaPost Author : Akira Yamaji - version : 4.77 2022-01-02 + version : 4.78 2022-01-17 E-mail : mcf2graph@gmail.com Located at : http://www.ctan.org/pkg/mcf2graph ******************************************************************************** @@ -11,37 +11,29 @@ chemical structure diagrams. This Coding is named from programing technique such as operator, array, scope, macro, adressing, etc. - mcf2graph convert from MCF to pk font, PNG, SVG, EPS, MOL file. + mcf2graph convert from MCF to PNG, SVG, EPS, MOL file. It is also able to calculate molecular weight, exact mass, molecular formula. 2. The distribution of software ( 1) README This file ( 2) CHANGELOG Changelog file of mcf2graph - ( 3) mcf2graph.mf Main macro of Metafont / Metapost + ( 3) mcf2graph.mp Main macro of Metapost ( 4) mcf_data_base.mcf Molecular data base file - ( 5) mcf_setup.sty Style file for aux file input + ( 5) mcf_exa_soc.mp MCF souce 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.mf Molecular definition file for mcf_manual.tex + ( 7) mcf_man_soc.mp Molecular definition file for mcf_manual.tex ( 8) mcf_manual.pdf PDF of (6) (used pdftex(LaTeX),makeindex) - ( 9) mcf_example.tex LaTeX example - make file 'mcf_exa_soc-info.aux' before typeset - >mpost -s ahlength=1 mcf_exa_soc.mf - make files 'mcf_exa_soc-***.mps' before typeset - >mpost mcf_exa_soc.mf - (for metafont) - make file 'mcf_exa_soc-mf.aux' before typeset - >mpost -s ahlength=7 mcf_exa_soc.mf - (10) mcf_exa_soc.mf Metafont/Metapost souce file for mcf_example.tex - (11) mcf_example.pdf PDF of (9) typeset with pdftex(LaTeX) - (12) mcf_mplib_exa.tex luamplib(LuaLaTeX) example - (13) mcf_mplib_exa.pdf PDF of (12) typeset with LuaTeX(LaTeX) + ( 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) -3. How to use mcf2graph with Metapost +3. How to use mcf2graph with MetaPost Minimum requirement to use mcf2graph : mpost.exe,mpost.dll,mpost.mp,plain.mp ( 1) >mpost FILENAME => output eps(.mps) file - ( 2) >mpost -s bboxmargin=1 FILENAME => output first font only (for test) + ( 2) >mpost -s bboxmargin=1 FILENAME => output first figure only (for test) ( 3) >mpost -s ahangle=1 FILENAME => output png file (600dpi) ( 4) >mpost -s ahangle=11 FILENAME => output png file (1200dpi) ( 5) >mpost -s ahangle=2 FILENAME => output svg file @@ -51,16 +43,14 @@ ( 8) >mpost -s ahlength=2 FILENAME => output information-aux file tag1;tag2; var1;var2; - ( 9) >mpost -s ahlength=3 FILENAME => output report file + ( 9) >mpost -s ahlength=3 FILENAME => output data-base-aux file (10) >mpost -s ahlength=5 FILENAME => output mol file(V2000) (11) >mpost -s ahlength=6 FILENAME => output mol file(V3000) - (12) >mpost -s ahlength=7 FILENAME => output metafont-aux file - (13) >mpost -s ahlength=8 FILENAME => output data-base-aux file - (14) >mpost -s labeloffset=1 FILENAME => use plain.mp 'label','drawarrow' - (15) >mpost -s labeloffset=2 FILENAME => atomfont="uhvr8r" + (12) >mpost -s ahlength=7 FILENAME => output report file + (13) >mpost -s labeloffset=2 FILENAME => atomfont="uhvr8r" 4. License - mcf2graph ver 4.77 Copyright (c) 2013-2022 Akira Yamaji + mcf2graph ver 4.78 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/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf2graph.mp index 0a89d9de33c..107606aae45 100644 --- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf2graph.mp @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 4.77 Copyright (c) 2013-2022 Akira Yamaji +% mcf2graph ver 4.78 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, @@ -16,8 +16,8 @@ % DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, % OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph is METAFONT/METAPOST macro package convert -% Molecular Coding Format(MCF) to font(pk)/eps/sgv/png/mdl molfile +% mcf2graph is MetaPost macro package convert Molecular Coding Format(MCF) to graphic file +% font(pk)/eps/sgv/png/mdl molfile %-------------------------------------------------------------------------------------------------- % This package is located at : http://www.ctan.org/pkg/mcf2graph % Suggestion or request mail to : mcf2graph@gmail.com @@ -29,16 +29,13 @@ % Set outputformat to "eps" (.eps) : mpost -s ahangle=3 FILENAME % Set output information aux file (tag1:var1;tag2:var2) : mpost -s ahlength=1 FILENAME % Set output information aux file (tag1;tag2 var1;var2) : mpost -s ahlength=2 FILENAME -% Set output report : mpost -s ahlength=3 FILENAME +% Set output aux data-base 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 aux metafont file : mpost -s ahlength=7 FILENAME -% Set output aux data-base file : mpost -s ahlength=8 FILENAME -% Set to use plain.mp (label,arrow) : mpost -s labeloffset=1 FILENAME -% Set to use plain.mp (label,arrow,atom) : mpost -s labeloffset=2 FILENAME +% Set output report : mpost -s ahlength=7 FILENAME %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% tracingstats:=1; -message "* This is mcf2graph ver 4.77 2022.01.02"; +message "* This is mcf2graph ver 4.78 2022.01.16"; %------------------------------------------------------------------------------------------------- newinternal cntA,cntB,cntM,minX,minY,maxX,maxY,sftX,sftY,com,par,envT,envB,lenT,lineT,angT,rotT, crR,nA,nB,nC,nD,nE,nF,nS,nL,nR,nU,nP,xpos,ypos,markA,markB,saveA,saveB,bondL; @@ -52,14 +49,13 @@ string save_str[],tbl_atom_str[],strD[],tag[],file_name_output,blank_str,aux_de inf_Cat,inf_NO,inf_EN,inf_JN,inf_FM,inf_CAS,inf_USE,inf_EXA,inf_EXB,inf_MW; pair save_pair[],posA[],posM[][],msize,mposition,fsize,fmargin,save_mposition,posBs,posBe,dum; picture mol_stru[],atom_picture,save_picture,temp_picture; -path arrow_path,dottedline_path,line_path,arrow_head; %------------------------------------------------------------------------------------------------- char_num:=str_cnt:=tbl_cnt:=proc_end:=mangle:=sw_expand:=sw_frame:=sw_trimming:=sw_ext_all:=0; -sw_abbreviate:=sw_arrow_emu:=sw_numbering:=sw_output:=0; numbering_start:=1; numbering_end:=4095; +sw_abbreviate:=sw_numbering:=sw_output:=0; numbering_start:=1; numbering_end:=4095; %------------------------------------------------------------------------------------------------- aux_max:=max_inf_num:=20; aux_delimiter:=";"; blank_str:= " "; dum:=(-4091,0); for i=1 upto aux_max: tag[i]:=""; endfor -Font:=1; Mfont:=2; Mcode:=4; Temp:=8; Info:=16; Table:=32; Report:=64; MOL2k:=128; MOL3k:=256; +Fig:=1; Mcode:=2; Calc:=4; Info:=8; Table:=16; Report:=32; MOL2k:=64; MOL3k:=128; Atom:=8; Bond:=16; Brock:=32; Inverse:=64; Group:=32; Mol:=64; Outside:=1; Inside:=2; Bothside:=Outside+Inside; %------------------------------------------------------------------------------------------------- @@ -92,98 +88,70 @@ vardef fdr(expr n)(expr s)= fsr(n)(decimal(s)) enddef; vardef fdl(expr n)(expr s)= fsl(n)(decimal(s)) enddef; def warning(expr s)= message "% "&decimal(char_num)&fdr(3)(incr warning_cnt)&")"&s; enddef; %================================================================================================= -if (known green)and(known ahlength): - f_MP:=1; - color color_list[]; - for i=1 upto 100: colorA[i]:=colorB[i]:=0; endfor - prologues:=3; - default_data_file:="mcf_data_base.mcf"; - default_temp_file:="temp.mcf"; - mpfont:="uhvr8r"; - atomfont:=defaultfont:=""; - %--default ahangle=45--------------------------------------------------------------------- - if ahangle=0: outputformat:="eps"; % eps format(.mps) - ef ahangle=1: outputformat:="png"; hppp:=vppp:=0.12; % png format(600dpi) - ef ahangle=11: outputformat:="png"; hppp:=vppp:=0.06; % png format(1200dpi) - ef ahangle=2: outputformat:="svg"; % svg format - ef ahangle=3: outputformat:="eps"; % eps format(.eps) - ef ahangle=45: outputformat:="eps"; % eps format(.mps) *default - 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:=Report; % output report - ef ahlength=4: sw_output:=Font; % *default - ef ahlength=5: sw_output:=MOL2k; % output MOL(V2000) - ef ahlength=6: sw_output:=MOL3k; % output MOL(V3000) - ef ahlength=7: sw_output:=Mfont; % output aux mf - ef ahlength=8: sw_output:=Mcode+Info; % output aux data-base - fi - %-- default bboxmargin=2------------------------------------------------------------------ - if bboxmargin=1: proc_end:=1; % output first font only - ef bboxmargin=3: ext(defaultfont:="uhvr8r"; defaultscale:=.3; label.rt(inf_EN,(0,0));) - ef bboxmargin=4: sw_output:=Font+Info; - ext(defaultfont:="uhvr8r"; defaultscale:=.3; - label.rt(inf_EN&" / "&cal_MW&" / "&decimal(num_MW-scantokens(inf_MW)),(0,0));) - fi - %--default labeloffset=3------------------------------------------------------------------ - if labeloffset=1: defaultfont:=mpfont; % mpost label - elseif labeloffset=2: defaultfont:=atomfont:=mpfont; % mpost label,atom - fi - %--default outputtemplate:="%j-%3c."&"mps"------------------------------------------------ - if (outputformat="eps")and(ahangle<>3): outputtemplate:="%j-%3c."&"mps"; - else: outputtemplate:="%j-%3c."&outputformat; - fi - %----------------------------------------------------------------------------------------- - def endchar = endfig enddef; - def printf expr s= write s to file_name_output enddef; - def # = enddef; - vardef totalweight expr a= 0 enddef; - def Cp(expr s) = if known s: if s<>0: withcolor color_list[s] fi fi enddef; - if atomfont="": atomfont:="draw"; fi % default atom font - if defaultfont="": defaultfont:="draw"; fi % default label font - %----------------------------------------------------------------------------------------- - if sw_output>=Info: - if bboxmargin=1: message "* output first font only"; fi - message "* jobname="&jobname; - message "* numbersystem="&numbersystem; - 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 report file"; - message "* file name="&jobname&"-report.txt"; - 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 metafont file"; - message "* mf file name="&jobname&"-mf.aux"; - ef ahlength=8: message "* output data-base file"; - message "* data-base file name="&jobname&"-data.aux"; - fi - message "* outputformat="&outputformat; - if outputformat="png": message "* hppp="&decimal(hppp)&"/vppp="&decimal(vppp); fi - message "* outputtemplate="&outputtemplate; - message "* atomfont="&atomfont; - message "* defaultfont="&defaultfont; +color color_list[]; +for i=1 upto 100: colorA[i]:=colorB[i]:=0; endfor +prologues:=3; +warningcheck:=0; +default_data_file:="mcf_data_base.mcf"; +default_temp_file:="temp.mcf"; +mpfont:="uhvr8r"; +atomfont:="draw"; +defaultfont:=mpfont; +%--default ahangle=45--------------------------------------------------------------------- +if ahangle=0: outputformat:="eps"; % eps format(.mps) +ef ahangle=1: outputformat:="png"; hppp:=vppp:=0.12; % png format(600dpi) +ef ahangle=11: outputformat:="png"; hppp:=vppp:=0.06; % png format(1200dpi) +ef ahangle=2: outputformat:="svg"; % svg format +ef ahangle=3: outputformat:="eps"; % eps format(.eps) +ef ahangle=45: outputformat:="eps"; % eps format(.mps) *default +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=4: sw_output:=Fig; % *default +ef ahlength=5: sw_output:=MOL2k; % output MOL(V2000) +ef ahlength=6: sw_output:=MOL3k; % output MOL(V3000) +ef ahlength=7: sw_output:=Report; % output report +fi +%-- default bboxmargin=2------------------------------------------------------------------ +if bboxmargin=1: proc_end:=1; % output first font only +ef bboxmargin=3: ext(defaultfont:=mpfont; defaultscale:=.3; label.rt(inf_EN,(0,0));) +ef bboxmargin=4: sw_output:=Fig+Calc; + ext(defaultfont:=mpfont; defaultscale:=.3; + label.rt(inf_EN&" / "&cal_MW&" / "&decimal(num_MW-scantokens(inf_MW)),(0,0));) +fi +%--default outputtemplate:="%j-%3c."&"mps"------------------------------------------------ +if (outputformat="eps")and(ahangle<>3): outputtemplate:="%j-%3c."&"mps"; +else: outputtemplate:="%j-%3c."&outputformat; +fi +%----------------------------------------------------------------------------------------- +def printf expr s= write s to file_name_output enddef; +vardef totalweight expr a= 0 enddef; +def Cp(expr s) = if known s: if s<>0: withcolor color_list[s] fi fi enddef; +%----------------------------------------------------------------------------------------- +if sw_output>=Info: + if bboxmargin=1: message "* output first font only"; fi + message "* jobname="&jobname; + message "* numbersystem="&numbersystem; + 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=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 -else: - f_MP:=0; - def image = image_emu enddef; - def llcorner = llcorner_emu enddef; - def lrcorner = lrcorner_emu enddef; - def urcorner = urcorner_emu enddef; - def ulcorner = ulcorner_emu enddef; - string defaultfont; - defaultscale:=1.2; - dotlabeldiam:=3bp; - def Cp(expr s) = enddef; - def color = transform enddef; - atomfont:="draw"; - defaultfont:="draw"; - sw_output:=Font; - mode_setup; + message "* outputformat="&outputformat; + if outputformat="png": message "* hppp="&decimal(hppp)&"/vppp="&decimal(vppp); fi + message "* outputtemplate="&outputtemplate; + message "* atomfont="&atomfont; + message "* defaultfont="&defaultfont; fi clearit; %-------------------------------------------------------------------------------------------------- @@ -192,19 +160,19 @@ ratio_chain_ring:=0.66; ratio_atom_bond:=0.36; ratio_thickness_bond:=0.015 ratio_thickness_char:=0.1; ratio_char_bond:=1.5; ratio_bondgap_bond:=0.15; ratio_hashgap_bond:=0.12; ratio_hash_black:=0.4; ratio_wedge_bond:=0.12; ratio_atomgap_atom:=0.04; -offset_thickness:=0.2bp; offset_bond_gap:=0.3bp; offset_hash_gap:=0.1bp; -offset_atom:=0.8pt; offset_wedge:=0.4bp; thickness_frame:=0.2bp; -max_blength:=10mm; blength:=mangle:=0; max_labelsize:=20mm; dottedline_gap:=1.5bp; +offset_thickness:=0.2; offset_bond_gap:=0.3; offset_hash_gap:=0.1; +offset_atom:=0.8; offset_wedge:=0.4; thickness_frame:=0.2; +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:=4bp; -defaultsize:=8bp; +ahlength:=4; +defaultsize:=8; defaultscale:=1; -labeloffset:=3bp; -ext_defaultline:=0.5bp; +labeloffset:=3; +ext_defaultline:=0.5; lonepairdiam:=lonepairspace:=circlediam:=circlepen:=0; %================================================================================================== parts_emb_start:=1000; % 1001 => 2000 for embedded parts (max 1900) @@ -223,7 +191,7 @@ def_com(-4090)(_com,_jp_atom,_jp_absA,_jp_bond,_cyc,_cyc_sB,_cyc_eB,_set_line,_t arc_lb,arc_br,arc_lbr,arc_ltr,si_,wf_,wb_,zf_,zb_,wv_,bd_); %-------------------------------------------------------------------------------------------------- def parameter_list= - sw_numbering,sw_expand,sw_output,sw_ext_all,sw_frame,sw_trimming,sw_arrow_emu,sw_abbreviate, + sw_numbering,sw_expand,sw_output,sw_ext_all,sw_frame,sw_trimming,sw_abbreviate, ratio_atom_bond,ratio_thickness_bond,ratio_char_bond,ratio_chain_ring,ratio_bondgap_bond, ratio_hash_black,ratio_hashgap_bond,ratio_thickness_char,ratio_wedge_bond,ratio_atomgap_atom, lonepairdiam,lonepairspace,offset_atom,offset_wedge,max_blength,offset_hash_gap, @@ -263,9 +231,9 @@ def restore_par(text t)= endfor enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -def beginfont(text s)= +def beginfigm(text s)= begingroup - save ',f_beginchar,f_ext,blen,ext,add,ang_br,fw_n,bw_n,at_colon,temp_tag,info_cnt, + save ',f_ext,blen,ext,add,ang_br,fw_n,bw_n,at_colon,temp_tag,info_cnt, mc,info,file_name_input,bond_cnt,warning_cnt,hideH_cnt,bondC,filter_s; string info[],mc[],mc,file_name_input,temp_tag,filter_s; %------------------------------------------------------------------------------------------------ @@ -298,14 +266,12 @@ def beginfont(text s)= tag_s:=substring (0,at_colon-1) of list; var_s:=substring (at_colon,length(list)) of list; if tag_s="f": - if f_MP=1: - if scan_char(".",var_s,0,1)=0: file_name_input:=var_s&".mcf"; - else: file_name_input:=var_s; - fi + if scan_char(".",var_s,0,1)=0: file_name_input:=var_s&".mcf"; + else: file_name_input:=var_s; fi - ef tag_s="t": if f_MP=1: temp_tag:=var_s; fi - ef tag_s="v": if f_MP=1: pickup_data_unit(temp_tag,var_s,1); fi - ef tag_s="v+": if f_MP=1: pickup_data_unit(temp_tag,var_s,0); fi + ef tag_s="t": temp_tag:=var_s; + ef tag_s="v": pickup_data_unit(temp_tag,var_s,1); + ef tag_s="v+": pickup_data_unit(temp_tag,var_s,0); else: if known scantokens("inf_"&tag_s): scantokens("inf_"&tag_s):=var_s; fi fi fi @@ -314,10 +280,10 @@ def beginfont(text s)= mol_stru[0]:=nullpicture; enddef; %================================================================================================== -def endfont= +def endfigm= if f_EOF=0: %-------------------------------------------------------------------------------------------- - if scan_bit(sw_output,Font): + if scan_bit(sw_output,Fig): if cntM>=1: if sw_ext_all=1: ext_to_font(EXT_ALL); fi if sw_trimming>=1: @@ -328,19 +294,17 @@ def endfont= if ypart(posM[1][i])<nC: nC:=ypart(posM[1][i]); fi if ypart(posM[2][i])>nD: nD:=ypart(posM[2][i]); fi endfor - font_wd:=nB-nA+2margin_lr; - font_ht:=nD-nC+2margin_tb; - fsize:=(font_wd,font_ht); + fig_wd:=nB-nA+2margin_lr; + fig_ht:=nD-nC+2margin_tb; + fsize:=(fig_wd,fig_ht); for i=1 upto cntM: posM[0][i]:=posM[0][i]+(margin_lr-nA,margin_tb-nC); posM[1][i]:=posM[1][i]+(margin_lr-nA,margin_tb-nC); endfor fi %---------------------------------------------------------------------------------------- - if f_MP=0: beginchar(char_num,font_wd/bp*bp#,font_ht/bp*bp#,0) - else: beginfig(char_num) w:=charwd:=font_wd; h:=charht:=font_ht; chardp:=0; - if scan_bit(sw_frame,Outside): else: draw_corner((0,0),w,h,0.05bp); fi - fi + beginfig(char_num) w:=charwd:=fig_wd; h:=charht:=fig_ht; chardp:=0; + if scan_bit(sw_frame,Outside): else: draw_corner((0,0),w,h,0.05); fi if scan_bit(sw_frame,Outside): draw_frame((0,0),w,h,thickness_frame); fi if scan_bit(sw_frame,Inside): draw_frame((margin_lr,margin_tb),w-2margin_lr,h-2margin_tb,thickness_frame); @@ -352,39 +316,29 @@ def endfont= if f_ext=1: addto currentpicture also mol_stru[0]; mol_stru[0]:=nullpicture; fi %---------------------------------------------------------------------------------------- else: - font_wd:=xpart(fsize); font_ht:=ypart(fsize); - if f_MP=0: beginchar(char_num,font_wd/bp*bp#,font_ht/bp*bp#,0) - else: beginfig(char_num) w:=charwd:=font_wd; h:=charht:=font_ht; - fi + fig_wd:=xpart(fsize); fig_ht:=ypart(fsize); + beginfig(char_num) w:=charwd:=fig_wd; h:=charht:=fig_ht; draw (0,h)--(0,0)--(w,0)--(w,h)--(0,h)--(w,0) wpcs thickness_frame; fi %----------------------------------------------------------------------------------------- - endchar; + endfig; clearit; - %----------------------------------------------------------------------------------------- - if sw_output=Font+Info+Temp: proc_info_out(1,1); - ef sw_output=Font+Mcode+Temp: proc_mc_out(1); - ef sw_output=Font+Info+Mcode+Temp: proc_info_out(1,1); proc_mc_out(1); - ef sw_output=Font+Report+Temp: proc_report_out(1); + fi + %------------------------------------------------------------------------------------------- + if scan_bit(sw_output,Info): + if scan_bit(sw_output,Table): proc_info_out(2); + ef scan_bit(sw_output,Mcode): proc_info_out(3); + else: proc_info_out(1); fi - %----------------------------------------------------------------------------------------- - ef sw_output=Info: proc_info_out(1,0); - ef sw_output=Info+Table: proc_info_out(2,0); - ef sw_output=Info+Temp: proc_info_out(1,1); - ef sw_output=Info+Mcode: proc_info_out(1,2); - ef sw_output=Mcode: proc_mc_out(0); - ef sw_output=Mcode+Temp: proc_mc_out(1); - ef sw_output=Mfont: proc_mf_out(1); - ef sw_output=Report: proc_report_out(0); - ef sw_output=Report+Temp: proc_report_out(1); - ef sw_output=MOL2k: proc_mol_out(1); - ef sw_output=MOL3k: proc_mol_out(2); - ef sw_output=Info+Mcode+Temp: proc_mc_out(1); proc_info_out(1,1); fi - %--------------------------------------------------------------------------------------------- + if scan_bit(sw_output,Mcode): proc_mc_out(0); fi + if scan_bit(sw_output,Report): proc_report_out(0); fi + if scan_bit(sw_output,MOL2k): proc_mol_out(1); fi + if scan_bit(sw_output,MOL3k): proc_mol_out(2); fi + %------------------------------------------------------------------------------------------- %% message "* parts_cnt (0)="& decimal(parts_cnt) &" "& decimal(parts_usr-parts_usr_start); %% message "* parts_int (0)="& decimal(parts_int) &" "& decimal(parts_int-parts_int_start); - %--------------------------------------------------------------------------------------------- + %------------------------------------------------------------------------------------------- fi %--------------------------------------------------------------------------------------------- restore_par(parameter_list); @@ -709,12 +663,12 @@ vardef change_atom(expr a,b)= for i==1 upto cntD[a]:: if comD[a][i]==_numeric:: if xpart(b)==_group_wf:: - if frac parD[a][i]==0:: CP(_set_adr,parD[a][i]) CP(_group_wf,ypart(b)) - else:: CP(_set_adr,floor parD[a][i]) CP(_group_zf,ypart(b)) + if frac parD[a][i]==0:: CP(_set_adr,parD[a][i]) CP(_group_wf,ypart(b)) + else:: CP(_set_adr,floor parD[a][i]) CP(_group_zf,ypart(b)) fi ef xpart(b)==_group_zf:: - if frac parD[a][i]==0:: CP(_set_adr,parD[a][i]) CP(_group_zf,ypart(b)) - else:: CP(_set_adr,floor parD[a][i]) CP(_group_wf,ypart(b)) + if frac parD[a][i]==0:: CP(_set_adr,parD[a][i]) CP(_group_zf,ypart(b)) + else:: CP(_set_adr,floor parD[a][i]) CP(_group_wf,ypart(b)) fi else:: CP(_set_adr,parD[a][i]) CP(xpart(b),ypart(b)) @@ -752,7 +706,7 @@ def puts(expr POS)(expr STR)= string temp_c; temp_p:=POS; nC:=defaultscale*defaultsize; - if (defaultfont="draw")or(f_MP=0): + if defaultfont="draw": for i=1 upto length(STR): temp_c:=subc(i,STR); draw_char(temp_c,temp_p,nC,ratio_thickness_char*nC,0); @@ -771,22 +725,11 @@ enddef; %================================================================================================= def ext_setup= pickup pencircle scaled ext_defaultline; - dotlabeldiam:=3bp; - labeloffset:=3bp; + dotlabeldiam:=3; + labeloffset:=3; save em; em=defaultscale*defaultsize; - if (defaultfont="draw")or(f_MP=0): - save label,dotlabel; - def label = label_emu enddef; - def dotlabel = dotlabel_emu enddef; - else: - defaultfont:=mpfont; - fi - if (sw_arrow_emu=1)or(f_MP=0): - save drawarrow,drawdblarrow; - def drawarrow = drawarrow_emu enddef; - def drawdblarrow = drawdblarrow_emu enddef; - fi + defaultfont:=mpfont; enddef; %------------------------------------------------------------------------------------------------- def add_to_molecule(text TXT)= @@ -811,7 +754,7 @@ def add_to_molecule(text TXT)= lonepairdiam:=0.3aw; lonepairspace:=.7aw; circlediam:=.6aw; - circlepen:=.2bp; + circlepen:=.2; for i=1 upto cntA: A[i]:=posA[i]; A[i]ang:=angX[i]; A[i]up:=dir(angX[i]); A[i]left:=dir(angX[i]+90); A[i]right:=dir(angX[i]-90); A[i]down:=dir(angX[i]+180); @@ -851,49 +794,6 @@ def ext_to_font(text TXT)= endgroup; enddef; %------------------------------------------------------------------------------------------------- -vardef image_emu(text TXT) = - save_picture:=currentpicture; currentpicture:=nullpicture; - TXT; - temp_picture:=currentpicture; currentpicture:=save_picture; - temp_picture -enddef; -%------------------------------------------------------------------------------------------------- -vardef scan_picture(expr PIC,SD)= - save iw,erase_h,erase_v; - path erase_h,erase_v; - nD:=0.2bp; - if (SD=1)or(SD=3): nS:=-max_labelsize; nE:=max_labelsize; nB:=nD; nC:=-nD; - elseif (SD=2)or(SD=4): nS:=max_labelsize; nE:=-max_labelsize; nB:=-nD; nC:=0; - fi - if (SD=1)or(SD=2): - erase_h:=unitsquare xscaled 2max_labelsize yscaled nD shifted (-max_labelsize,nC); - elseif (SD=3)or(SD=4): - erase_v:=unitsquare xscaled nD yscaled 2max_labelsize shifted (nC,-max_labelsize); - fi - temp_picture:=currentpicture; - currentpicture:=PIC; - erase fill unitsquare scaled nD shifted (-max_labelsize,-max_labelsize); - iw:=totalweight currentpicture; - if iw>=0: - for i=nS step nB until nE: - if (SD=1)or(SD=2): erase fill erase_h shifted (0,i); - elseif (SD=3)or(SD=4): erase fill erase_v shifted (i,0); - fi - nA:=i; - exitif (totalweight currentpicture)<iw; - endfor - else: - nA:=0; - fi - currentpicture:=temp_picture; - nA -enddef; -%------------------------------------------------------------------------------------------------- -vardef llcorner_emu(expr b)= (scan_picture(b,3),scan_picture(b,1)) enddef; -vardef lrcorner_emu(expr b)= (scan_picture(b,4),scan_picture(b,1)) enddef; -vardef urcorner_emu(expr b)= (scan_picture(b,4),scan_picture(b,2)) enddef; -vardef ulcorner_emu(expr b)= (scan_picture(b,3),scan_picture(b,2)) enddef; -%------------------------------------------------------------------------------------------------- vardef circled_plus_add= nA:=circlediam; nB:=circlepen; image(draw fullcircle scaled nA wpcs nB; @@ -908,78 +808,6 @@ enddef; vardef lone_pair_add expr ANG= image(draw (0,0) wpcs lonepairdiam; draw ((0,lonepairspace) rotated ANG) wpcs lonepairdiam;) enddef; -%------------------------------------------------------------------------------------------------- -vardef label_emu@#(expr OBJ,POS) = %% modified 'thelabel@#(expr s,z)' of plain.mp - save oft,fx,fy,wd_s,wd_c,pA,pB,pC,pD,sC; - pair oft,oft.lft,oft.rt,oft.top,oft.bot,oft.ulft,oft.llft,oft.urt,oft.lrt,pA,pB,pC,pD; - wd_s:=0; - wd_c:=defaultscale*defaultsize; - %--------------------------------------------------------------- - if string OBJ: - if (defaultfont="draw")or(f_MP=0): - for i=1 upto length(OBJ): wd_s:=wd_s+wd_c*tbl_char_wd[ASCII(subc(i,OBJ))]; endfor - else: - for i=1 upto length(OBJ): - temp_picture:=subc(i,OBJ) infont defaultfont scaled defaultscale; - wd_s:=wd_s+xpart(lrcorner temp_picture-llcorner temp_picture); - endfor - fi - fi - %--------------------------------------------------------------- - oft:= ( 0, 0); fx:=0.5; fy:=0.5; - oft.lft:= ( -1, 0); fx.lft:=1; fy.lft:=0.5; - oft.rt := ( 1, 0); fx.rt :=0; fy.rt :=0.5; - oft.bot:= ( 0, -1); fx.bot:=0.5; fy.bot:=1; - oft.top:= ( 0, 1); fx.top:=0.5; fy.top:=0; - oft.ulft:=(-.7, .7); fx.ulft:=1; fy.ulft:=0; - oft.urt:= ( .7, .7); fx.urt:=0; fy.urt:=0; - oft.llft:=(-.7,-.7); fx.llft:=1; fy.llft:=1; - oft.lrt:= ( .7,-.7); fx.lrt:=0; fy.lrt:=1; - %--------------------------------------------------------------- - if string OBJ: - puts(POS+(labeloffset*oft@#)-(wd_s*fx@#,wd_c*fy@#))(OBJ); - elseif picture OBJ: - pA:=llcorner(OBJ); - pB:=urcorner(OBJ); - pC:=.5(pB-pA) xscaled xpart(oft@#) yscaled ypart(oft@#); - pD:=.5(pA+pB); - addto currentpicture also OBJ shifted (POS+labeloffset*oft@#+pC-pD); - fi -enddef; -%------------------------------------------------------------------------------------------------- -vardef dotlabel_emu@#(expr OBJ,POS)= label_emu@#(OBJ,POS); draw POS wpcs dotlabeldiam; enddef; -%================================================================================================= -def drawarrow_emu expr PATH = arrow_path:=PATH; draw_arrow enddef; -%------------------------------------------------------------------------------------------------- -def draw_arrow text t = %% modified 'drawarrow' of plain.mp - filldraw arrow_head rotated ahead_angle(reverse arrow_path) - shifted point infinity of arrow_path t; - draw arrow_path t -enddef; -%------------------------------------------------------------------------------------------------- -def drawdblarrow_emu expr PATH = arrow_path:=PATH; draw_dblarrow enddef; -%------------------------------------------------------------------------------------------------- -def draw_dblarrow text t = - filldraw arrow_head rotated ahead_angle(arrow_path) shifted point 0 of arrow_path t; - filldraw arrow_head rotated ahead_angle(reverse arrow_path) - shifted point infinity of arrow_path t; - draw arrow_path t -enddef; -%================================================================================================= -arrow_head:=(0,0)--(ahlength,-(sind 0.5ahangle)*ahlength)-- - (ahlength, (sind 0.5ahangle)*ahlength)--cycle; -%------------------------------------------------------------------------------------------------- -def ahead_angle(expr p)= - angle direction .5ahlength/length(point 1 of p - point 0 of p) of p -enddef; -%------------------------------------------------------------------------------------------------- -def drawdottedline expr PATH = dottedline_path:=PATH; draw_dottedline enddef; -def draw_dottedline text t = - line_path:=dottedline_path; - for i=0 step dottedline_gap/length(point 1 of line_path - point 0 of line_path) until 1: - drawdot (point i of line_path) t; - endfor -enddef; %================================================================================================= def MCat(expr FW,FH)(text TXT)= save_mposition:=mposition; mposition:=(FW,FH); MC(TXT) mposition:=save_mposition; @@ -992,14 +820,14 @@ def MC(text TXT)= string temp_c; pair temp_p; %----------------------------------------------------------------------------------------------- - if sw_numbering>=1: ratio_atom_bond:=0.25; fi + if sw_numbering>=1: ratio_atom_bond:=0.20; fi if (sw_expand=1)or(scan_bit(sw_output,MOL2k))or(scan_bit(sw_output,MOL3k)): expand_set; crR:=1; else: crR:=-ratio_chain_ring; fi cntA:=cntB:=cntC:=cnt_group:=0; strD[0]:="C"; str_cnt:=2000; %----------------------------------------------------------------------------------------------- - font_wd:=xpart(fsize); - font_ht:=ypart(fsize); + fig_wd:=xpart(fsize); + fig_ht:=ypart(fsize); margin_lr:=xpart(fmargin); margin_tb:=ypart(fmargin); %=============================================================================================== @@ -1009,21 +837,21 @@ def MC(text TXT)= char_use_check; %-scaling--------------------------------------------------------------------------------------- if blength>1: blen:=blength; proc_size_setup; proc_skeleton(0); proc_scaling; - elseif blength>0: blen:=font_wd*blength; proc_size_setup; proc_skeleton(0); proc_scaling; + elseif blength>0: blen:=fig_wd*blength; proc_size_setup; proc_skeleton(0); proc_scaling; else: blen:=3mm; proc_size_setup; - if xpart(msize)<1: m_wd:=font_wd*xpart(msize); else: m_wd:=font_wd; fi - if ypart(msize)<1: m_ht:=font_ht*ypart(msize); else: m_ht:=font_ht; fi + if xpart(msize)<1: m_wd:=fig_wd*xpart(msize); else: m_wd:=fig_wd; fi + if ypart(msize)<1: m_ht:=fig_ht*ypart(msize); else: m_ht:=fig_ht; fi for i=1 upto 6: proc_skeleton(0); proc_scaling; if (mol_ht/mol_wd)>(m_ht/m_wd): if ypart(msize)>1: factor:=ypart(msize)/mol_ht; - else: factor:=((font_ht-2margin_tb)*ypart(msize))/mol_ht; + else: factor:=((fig_ht-2margin_tb)*ypart(msize))/mol_ht; fi else: if xpart(msize)>1: factor:=xpart(msize)/mol_wd; - else: factor:=((font_wd-2margin_lr)*xpart(msize))/mol_wd; + else: factor:=((fig_wd-2margin_lr)*xpart(msize))/mol_wd; fi fi exitif (factor>=1-eps)and(factor<=1+eps); blen:=blen*factor; proc_size_setup; @@ -1039,7 +867,7 @@ def MC(text TXT)= fi endfor %=============================================================================================== - if scan_bit(sw_output,Font): + if scan_bit(sw_output,Fig): %-draw atom----------------------------------------------------------------------------------- if sw_numbering=0: for i=1 upto cntA: draw_atom(i); endfor fi %-draw add to atom---------------------------------------------------------------------------- @@ -1069,7 +897,7 @@ def MC(text TXT)= fi erase fill unitsquare xscaled (.8atom_wd*length(decimal(nA))) yscaled atom_wd shifted (posA[i]-(.5atom_wd,.5atom_wd)); - defaultsize:=atom_wd; defaultscale:=1; + defaultsize:=.6atom_wd; defaultscale:=.6; puts(posA[i]-(.5atom_wd,.5atom_wd))(decimal(nA)); fi endfor @@ -1085,17 +913,17 @@ def MC(text TXT)= fi erase fill unitsquare yscaled atom_wd xscaled (.8atom_wd*length(decimal(nB))) shifted (.5[posA[sB[i]],posA[eB[i]]]-(.5atom_wd,.5atom_wd)); - defaultsize:=atom_wd; defaultscale:=1; + defaultsize:=.6atom_wd; defaultscale:=.6; puts(0.5[posA[sB[i]],posA[eB[i]]]-(.5atom_wd,.5atom_wd))(decimal(nB)); fi endfor fi %--------------------------------------------------------------------------------------------- if xpart(mposition)>1: sftX:=xpart(mposition)-minX; - else: sftX:=margin_lr-minX+(font_wd-mol_wd-2margin_lr)*xpart(mposition); + else: sftX:=margin_lr-minX+(fig_wd-mol_wd-2margin_lr)*xpart(mposition); fi if ypart(mposition)>1: sftY:=ypart(mposition)-minY; - else: sftY:=margin_tb-minY+(font_ht-mol_ht-2margin_tb)*ypart(mposition); + else: sftY:=margin_tb-minY+(fig_ht-mol_ht-2margin_tb)*ypart(mposition); fi cntM:=cntM+1; posM[0][cntM]:=(sftX,sftY); @@ -1110,7 +938,7 @@ def MC(text TXT)= for i=1 upto cntB: if colorB[i]<>0: colorB[i]:=0; fi endfor fi fi - if sw_output>=Info: proc_check_structure(0); fi + if sw_output>=Calc: proc_calc(0); fi endgroup; enddef; %------------------------------------------------------------------------------------------------- @@ -1164,11 +992,7 @@ def draw_corner(expr PS,LX,LY,PN)= enddef; %------------------------------------------------------------------------------------------------- def proc_size_setup= - if (blen*ratio_atom_bond+offset_atom)<.8blen: - atom_wd:=blen*ratio_atom_bond+offset_atom; - else: - atom_wd:=.8blen; ratio_chain_ring:= .5; - fi + atom_wd:= blen*ratio_atom_bond+offset_atom; wedge_wd:= blen*ratio_wedge_bond+offset_wedge; hash_gap:= blen*ratio_hashgap_bond+offset_hash_gap; bondgap:= blen*ratio_bondgap_bond+offset_bond_gap; @@ -1378,7 +1202,7 @@ def draw_atom(expr NUM)= dxA[NUM]:=dir_str:=iif((nA<=90)or(nA>=270),1,-1); wdA[NUM]:=nC:=0; pos_c:=(0,0); pos_a:=posA[NUM]-(.5atom_wd*dir_str,.5atom_wd); - if (atomfont<>"draw")and(f_MP=1): + if atomfont<>"draw": atom_picture:="C" infont atomfont; r_ff:=atom_wd/(ypart(ulcorner atom_picture)-ypart(llcorner atom_picture)); fi @@ -1393,7 +1217,7 @@ def draw_atom(expr NUM)= if temp_c="_": pos_c:=iif(pos_c=(0,0),(0,-.5atom_wd),(0,0)); elseif temp_c="^": pos_c:=iif(pos_c=(0,0),(0, .5atom_wd),(0,0)); elseif (temp_c<>"{")and(temp_c<>"}"): - if (atomfont="draw")or(f_MP=0): + if atomfont="draw": f_wd:=atom_wd*tbl_char_wd[ASCII(temp_c)]; if dir_str=-1: pos_a:=pos_a-(f_wd,0); fi draw_char(temp_c,pos_a+pos_c,atom_wd,bond_pen_wd*ratio_char_bond,NUM); @@ -1712,10 +1536,10 @@ vardef erase_space(expr TXT)= temp_s enddef; %================================================================================================= -def proc_check_structure(expr n)= +def proc_calc(expr n)= begingroup save knownA,tmp_wtp; - num_MW:=num_MI:=cen_MW:=cen_MI:=tbl_atom_max:=warning_cnt:=hideH_cnt:=0; + num_MW:=num_MI:=tbl_atom_max:=warning_cnt:=hideH_cnt:=0; nE:=parts_emb_start; for i=1 upto tbl_atom_end: sumA[i]:=0; endfor for i=1 upto cntA: @@ -1769,38 +1593,28 @@ def proc_check_structure(expr n)= if (tbl_atom_max=1)and(sumA[2]>0): tbl_atom_max:=2; fi for i=1 upto tbl_atom_max: if sumA[i]>=1: - nA:=tbl_atom_wt[i]/100*sumA[i]; nB:=tbl_atom_mi[i]/100*sumA[i]; - cen_MW:=cen_MW+nA; cen_MI:=cen_MI+nB; - if (cen_MW<40)and(cen_MI<40): - num_MW:= num_MW+tbl_atom_wt[i]*sumA[i]; - num_MI:= num_MI+tbl_atom_mi[i]*sumA[i]; - fi + num_MW:= num_MW+tbl_atom_wt[i]*sumA[i]; num_MI:= num_MI+tbl_atom_mi[i]*sumA[i]; cal_FM:=cal_FM&erase_brace(tbl_atom_str[i]) if sumA[i]>=2: &decimal(sumA[i]) fi; fi endfor - %------------------------------------------------------------------------------------- - if cen_MW<40: cal_MW:=substring (0,8) of decimal(num_MW); - else: num_MW:=cen_MW; cal_MW:=fdr(6)(cen_MW)&"*100"; fi - if cen_MI<40: cal_MI:=substring (0,10) of decimal(num_MI); - else: num_MI:=cen_MI; cal_MI:=fdr(8)(cen_MI)&"*100"; fi - %------------------------------------------------------------------------------------- + cal_MW:=substring (0,8) of decimal(num_MW); cal_MI:=substring (0,10) of decimal(num_MI); + %--------------------------------------------------------------------------------------- endgroup enddef; %================================================================================================= -def proc_info_out(expr n,f)= +def proc_info_out(expr f)= message "["&decimal(char_num)&"]:"&inf_EN; - if f=1: file_name_output:="temp-info.aux"; - ef f=2: file_name_output:=jobname&"-data.aux"; - else: file_name_output:=jobname&"-info.aux"; + if (f=1)or(f=2): file_name_output:=jobname&"-info.aux"; + ef f=3: file_name_output:=jobname&"-data.aux"; fi %-------------------------------------------------------------------------------------- - if (char_num=1)and(n=2): + if (char_num=1)and(f=2): printf tag[1] for i=2 upto aux_max: exitif tag[i]=""; &aux_delimiter&tag[i] endfor ; fi %-------------------------------------------------------------------------------------- for i=1 upto aux_max: exitif tag[i]=""; if i=1: printf "" else: &aux_delimiter fi - if n=1: &tag[i]&":" fi + if (f=1)or(f=3): &tag[i]&":" fi %------------------------------------------- if tag[i]="J": & jobname ef tag[i]="C": & decimal(char_num) @@ -1813,6 +1627,7 @@ def proc_info_out(expr n,f)= ef tag[i]="h1": & decimal(mol_ht) ef tag[i]="An": & decimal(cntA) ef tag[i]="Bn": & decimal(cntB) + ef tag[i]="mc": & mc %------------------------------------------- ef tag[i]="NO": & inf_NO ef tag[i]="EN": & inf_EN @@ -1824,11 +1639,9 @@ def proc_info_out(expr n,f)= ef tag[i]="USE": & inf_USE ef tag[i]="EXA": & inf_EXA ef tag[i]="EXB": & inf_EXB - ef tag[i]="MC": & inf_MC fi endfor ; - if f=1: printf EOF; - ef f=2: printf "+"; + if f=3: printf "+"; for i=1 upto mc_row: printf (substring(0,mc_indent[i]) of blank_str)&mc[i]; endfor printf "+-----------------------------------------------------------------------------"; fi @@ -1946,22 +1759,9 @@ def proc_mol_out(expr n)= fi enddef; %================================================================================================= -def proc_mf_out(expr f)= - message "["&decimal(char_num)&"]:"&inf_EN; - file_name_output:=jobname&"-mf.aux"; - printf "beginfont("&ditto&"NO:"&decimal(char_num)&ditto&","&ditto&"EN:"&inf_EN&ditto&")"; - printf "MC("; - for i=1 upto mc_row: printf mc[i]; endfor - printf ")"; - printf "endfont"; - if f=1: printf "%-------------------------------------------------------------------------"; fi -enddef; -%================================================================================================= def proc_mc_out(expr f)= message "["&decimal(char_num)&"]:"&inf_EN; - if f=1: file_name_output:="temp-mc.aux"; - else: file_name_output:=jobname&"-"&fit_zero(char_num)&"-"&erase_space(inf_EN)&"-mc.aux"; - fi + file_name_output:="temp-mc.aux"; for i=1 upto mc_row: printf (substring(0,mc_indent[i]) of blank_str)&mc[i]; endfor printf EOF; enddef; @@ -2193,7 +1993,7 @@ vardef check(expr s)= message "*"&fdr(3)(i)&" "&err_type[err_code[i]]&fdr(4)(err_adr[i])&" '"&err_str[i]&"'"; endfor %--------------------------------------------------------------------------------------------- -%%%%%%% if (f_MP=1)and(err_cnt>0): readstring; fi +%%%%%%% err_cnt>0: readstring; %--------------------------------------------------------------------------------------------- err_cnt enddef; diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_data_base.mcf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_data_base.mcf index 40dfc81af3e..6c7897a6ffb 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_data_base.mcf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_data_base.mcf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% molecular data base file mcf_data_base.mcf by Akira Yamaji 2022.01.02 +% molecular data base file mcf_data_base.mcf by Akira Yamaji 2022.01.17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % tag1:var1;tag2:var2;tag3:var3 ..... % first character of line "%" comment out @@ -422,8 +422,8 @@ Cat:biological;EN:Cromolyn;MW:468.37;EXA:1 +------------------------------------------------------------------------------ Cat:biological;EN:Emetine;MW:480.649;EXA:1 + -<30,Ph,{-4,-4}=?6,8:N,{1,6}:/O!,-2:/*!,{7^-60,12^-60}:/*H, - @-3,\,!~zb,<-60,|,?6,5=dl,2:NH,-6^-60:*/H,|,-2=?6,{2,4}=dl,{-2,-3}:/O! +<30,Ph,{-4,-4}=?6,8:N,{1,6}:/O!,-2:/*!,{7^-60,12^-60}:/*H, + @-3,\,!~zb,<-60,|,?6,5=dl,2:NH,-6^-60:*/H,|,-2=?6,{2,4}=dl,{-2,-3}:/O! +------------------------------------------------------------------------------ Cat:biological;EN:Acronycine;MW:321.376;EXA:1 + @@ -490,7 +490,7 @@ Cat:biological;EN:Pyrethrin I;MW:328.452;EXA:1 +------------------------------------------------------------------------------ Cat:biological;EN:Oseltamivir;MW:312.40;EXA:1 + -<30,?6,3=dl,6:*/NH2,@1,\*,NH,!,//O,!,@2,*\,O,!?,!2,@4,\,//O,!,O,!2 +<30,?6,3=dl,6:*/NH2,@1,\*,NH,!,//O,!,@2,*\,O,!,/!,!2,@4,\,//O,!,O,!2 +------------------------------------------------------------------------------ Cat:biological;EN:Paclitaxel;MW:853.918;EXA:1 + @@ -559,6 +559,58 @@ Cat:biological;EN:Aflatoxin B1;MW:312.27;EXA:1 <30,Ph,6=?6,-2=?5,4=?5,-2=?5,{-2,10}=dl,{7,14,17}:O, 2:/O!,{8,11}://O,{15^-54,16^54}:*/H +------------------------------------------------------------------------------ +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:- ++ +<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 ++------------------------------------------------------------------------------ +Cat:biological;EN:Aflatoxin G2;MW:330.29;EXA:- ++ +<30,Ph,6=?6,-2=?6,4=?5,-2=?5,10=dl,{7,12,15,18}:O, + 2:/O!,{8,11}://O,{16^-54,17^54}:*/H ++------------------------------------------------------------------------------ +Cat:biological;EN:Aflatoxin M1;MW:328.3;EXA:- ++ +<30,Ph,6=?6,-2=?5,4=?5,-2=?5,{-2,10}=dl,{7,14,17}:O, + 2:/O!,{8,11}://O,15^-54:*/H,16^54:*/OH ++------------------------------------------------------------------------------ +Cat:biological;EN:Aflatoxin M2;MW:330.29;EXA:- ++ +<30,Ph,6=?6,-2=?5,4=?5,-2=?5,10=dl,{7,14,17}:O, + 2:/O!,{8,11}://O,15^-54:*/H,16^54:*/OH ++------------------------------------------------------------------------------ +Cat:biological;EN:Ochratoxin A;MW:403.813;EXA:1 ++ +<30,Ph,@4,\,!,/*COOH,!`1.2,NH,!`1.2,//O,!, + Ph,-2:/Cl,-5:/OH,-4=?6,-3:O,-2:*/_,-4://O ++------------------------------------------------------------------------------ +Cat:biological;EN:Deoxynivalenol;MW:296.32;EXA:1 ++ +<30,?6,3=?6,5=dl,1://O,6:/_,-1:O,{4'^60,-2}:*/H,7^30:*/_,@7,72`.9,80`1.3,&9, + @8,?3,-3=wf_,-1=si_,-1:O,{2,12^18}:/*OH,3:/*!OH^-60`1 ++------------------------------------------------------------------------------ +Cat:biological;EN:Patulin;MW:154.12;EXA:1 ++ +<30,?6,3=?5,{2,10}=dl,{6,7}:O,5:/OH,8://O ++------------------------------------------------------------------------------ +Cat:biological;EN:Citrinin;MW:250.247;EXA:1 ++ +<30,?6,3=?6,{2,5,11}=dl,9:O,1://O,2:/_,{7,8'}:*/_,5:/OH,6:/COOH ++------------------------------------------------------------------------------ +Cat:biological;EN:Zearalenone;MW:318.364;EXA:1 ++ +<30,Ph,@3,#1,\,!5,60,60,!4,&4,##,{1,5,8}=dl,17:O,16:*/_,{1,5}:/OH,{12,18}://O ++------------------------------------------------------------------------------ +Cat:biological;EN:Fumonisin B1;MW:721.83;EXA:1 ++ +<30,!19,@6,*\,O,!,//O,!2,/COOH,!2,COOH,@7,\*`1.2,O,!,//O,!2,/COOH,!2,COOH, + {5,9}:/*_,{11,16,18'}:*/OH,19:/*NH2 ++------------------------------------------------------------------------------ %============================================================================== Cat:synthetic;EN:Benzene;MW:78.11;EXA:- + @@ -1959,11 +2011,11 @@ Cat:pesticide;EN:Lufenuron;MW:511.15;EXA:- @3,\,//O,!,NH,!,//O,!,NH,!,Ph,{-1,-4}:/Cl,@-3,\,O,!,/F^35,/F^-35,!,/F,!,CF3 +------------------------------------------------------------------------------ %****************************************************************************** -Cat:antibacterial;EN:Sulfacetamide;MW:214.239;EXA:1 +Cat:antibacterial;EN:Sulfacetamide;MW:214.239;EXA:- + <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,//O,! +------------------------------------------------------------------------------ -Cat:antibacterial;EN:Sulfatiazole;MW:255.31;EXA:1 +Cat:antibacterial;EN:Sulfatiazole;MW:255.31;EXA:- + <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,?5,{1,3}=dl,2:N,5:S +------------------------------------------------------------------------------ @@ -1992,7 +2044,7 @@ Cat:antibacterial;EN:Marbofloxacin;MW:362.361;EXA:1 <30,Ph,{3,(2,7)}=?6,9=dl,6:/F,{7,13}:N,11:O,9:/COOH,10://O,13:/_, @1,\,|,?6,{1,4}:N,4:/_ +------------------------------------------------------------------------------ -Cat:antibacterial;EN:Sulfamerazine;MW:264.303;EXA:1 +Cat:antibacterial;EN:Sulfamerazine;MW:264.303;EXA:- + <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,Ph,{2,6}:N,3:/_ +------------------------------------------------------------------------------ @@ -2005,7 +2057,7 @@ Cat:antibacterial;EN:Ofloxacin;MW:361.373;EXA:1 <30,Ph,{3,(2,7)}=?6,9=dl,7:N,11:O, 6:/F,9:/COOH,10://O,13:/_,@1,\,|,?6,{1,4}:N,4:/_ +------------------------------------------------------------------------------ -Cat:antibacterial;EN:Ciprofloxacin;MW:331.347;EXA:1 +Cat:antibacterial;EN:Ciprofloxacin;MW:331.347;EXA:- + <30,Ph,-4=?6,9=dl,7:N,6:/F,7:/?3,9:/COOH,10://O,@1,\,|,?6,1:N,4:NH +------------------------------------------------------------------------------ @@ -2022,7 +2074,7 @@ Cat:antibacterial;EN:Ormetoprim;MW:274.324;EXA:1 + <30,Ph,{1,5}:N,{2,6}:/NH2,@3,\,!,|,Ph,2:/_,{4,5}:/O! +------------------------------------------------------------------------------ -Cat:antibacterial;EN:Sulfadimidine;MW:278.33;EXA:1 +Cat:antibacterial;EN:Sulfadimidine;MW:278.33;EXA:- + <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,Ph,{2,4}:N,{3,5}:/_ +------------------------------------------------------------------------------ @@ -2035,7 +2087,7 @@ Cat:antibacterial;EN:Sulfamethoxypyridazine;MW:280.302;EXA:- + <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,Ph,{5,6}:N,4:/O! +------------------------------------------------------------------------------ -Cat:antibacterial;EN:Sarafloxacin;MW:385.371;EXA:1 +Cat:antibacterial;EN:Sarafloxacin;MW:385.371;EXA:- + <30,Ph,3=?6,9=dl,7:N,6:/F,9:/COOH,10://O,@1,\,?6,-6:N,-3:NH,@7,\,Ph,-3:/F +------------------------------------------------------------------------------ diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mp index 550589d530f..9465d835bca 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mp @@ -1,8 +1,8 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2022.01.02 +% Molecular Coding Format by Akira Yamaji 2022.01.17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -input mcf2graph.mf; %%% it must be version 4.77 -message "* mcf_exa_soc 2022.01.02"; +input mcf2graph.mp; %%% it must be version 4.78 +message "* mcf_exa_soc 2022.01.17"; message ""; %------------------------------------------------------------------------------ fsize:=(35mm,24mm); @@ -14,30 +14,26 @@ tag1:="J"; tag2:="C"; tag3:="fm"; tag4:="mw"; tag5:="EN"; tag6:="MW"; %------------------------------------------------------------------------------ %% outputformat:="png"; hppp:=vppp:=0.1; outputtemplate:="%j-%3c.png"; %------------------------------------------------------------------------------ -%%%%ext(defaultfont:="uhvr8r"; defaultscale:=.3; label.rt(inf_EN,(0,0));) +%%%%ext(defaultfont:=mpfont; defaultscale:=.3; label.rt(inf_EN,(0,0));) %------------------------------------------------------------------------------ %sw_output:=Font+Info; -%ext(defaultfont:="uhvr8r"; defaultscale:=.3; +%ext(defaultfont:=mpfont; defaultscale:=.3; %label.rt(inf_EN&" / "&cal_MW&" / "&decimal(num_MW-scantokens(inf_MW)),(0,0));) %------------------------------------------------------------------------------ -if f_MP=0: input mcf_exa_soc-mf.aux; % (metafont) make aux file before typeset -else: % mpost -s ahlength=7 mcf_exa_soc.mf -%------------------------------------------------------------------------------ %%%%query("Cat=biological","MW<200","s:MW"); %%%%query("Cat=biological","MW<150.0","s:EN"); %%%%query("MW>=150","MW<=250","s:MW"); %****************************************************************************** -%%%% beginfont("t:EN","v:Caffeine") % select EN=Caffeine +%%%% beginfigm("t:EN","v:Caffeine") % select EN=Caffeine forever: -%%%% beginfont("f:mcf_data_base","v+:*") % 'mcf_data_base.mcf'(default) -%%%% beginfont("f:temp","v+:*") % use query output -%%%% beginfont("v+:*") % select all - beginfont("t:EXA","v+:1") % 'v+:1': select EXA=1 +%%%% beginfigm("f:mcf_data_base","v+:*") % 'mcf_data_base.mcf'(default) +%%%% beginfigm("f:temp","v+:*") % use query output +%%%% 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 - endfont + endfigm exitif f_EOF=1; % exit if file end endfor %****************************************************************************** -fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bye 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 32af758ce53..15186cb82e8 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 70da8707d50..c07aa1aa1cf 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex @@ -1,77 +1,85 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2021.12.12 +% Example of MCF Typeset with LuaLaTeX(luamplib) by A.Yamaji 2022.01.17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\documentclass[a4paper]{article} -\usepackage{graphicx} -\makeatletter% -%-------------------------------- -\edef\jobname{mcf_exa_soc}% -\usepackage{mcf_setup} -%-------------------------------- -%%%%\pdfpkresolution=1200 -%-------------------------------- -%%%%\edef\f@ext{pk}% -\edef\f@ext{mps}% -%-------------------------------- +% ** mcf2graph.mf must be version 4.78 +% ** use mcf_data_base.mcf +% ** typeset by LuaLaTeX(luamplib) +\documentclass{article} +\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:=8bp; + defaultscale:=1; +}% +%------------------------------------------------------------------------- \pagestyle{empty} \topmargin=-24mm \oddsidemargin=-12mm -\textwidth=190mm +\textwidth=192mm \textheight=280mm \parindent=0mm -\setlength\columnsep{8mm} -%-------------------------------- -\newbox \f@box% -\newcount \f@num% -\newcount \tnum% -\tnum=0% -\font\labelM=cmtt8 at 6pt\relax% -%-------------------------------- -\newif\ifCONT@% -\newread\@auxf% -%-------------------------------- -\f@num=1% -\unitlength=0.01mm% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%------------------------------------------------------------------------- \begin{document} \begin{center} {\Huge\sf Molecular Coding Format examples} \vspace{5mm} \\ Author : Akira Yamaji \quad Date : \today \\ - Located at : http://www.ctan.org/pkg/mcf2graph \vspace{3mm} \\ + Located at : http://www.ctan.org/pkg/mcf2graph \end{center} -{\small * use molecular data base file 'mcf\_data\_base.mcf' \\ - ** FM(fm):molecular formula (calculated) - * MW(mw):molecular weight (calculated) - \vspace{3mm} \\ -%------------------------------------------------------------------------ +{\small *typeset with LuaLaTeX \quad + *use molecular data base file 'mcf\_data\_base.mcf' \\ + ** FM(fm):molecular formula (calculated) \quad + * MW(mw):molecular weight (calculated)} \vspace{3mm} \\ +%------------------------------------------------------------------------- \noindent% -\openin\@auxf=\jobname-info.aux% +\makeatletter +\newbox \f@box% +\newcount \f@num% +\newcount \t@num% +\font\labelM=cmtt8 at 6pt\relax% +%------------------------------------------------------------------------- +\f@num=0% +\t@num=0% +\unitlength=0.01mm% +\noindent% +%------------------------------------------------------------------------- +\newif\ifCONT@% \CONT@true% \loop% -\read\@auxf to \info% -\ifeof\@auxf\CONT@false\else% - \infotovar{\info}% - \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){% - \ifx\f@ext\@pk{\font\@font=\jobname\@font\char\f@num}% - \else% - \edef\f@file{\jobname-\z@num\f@num.\f@ext}% - \includegraphics{\f@file}% - \fi% - }% - }% - \end{picture}% - %------------------------------------------------------------ - \advance\f@num1\relax% - \advance\tnum1\relax% - \ifnum\tnum=5 \\ \tnum=0 \fi% -\fi% -\ifCONT@ \repeat% -\closein\@auxf% +\sbox{\f@box}{% +\begin{mplibcode} + beginfigm("t:EXA","v+:1") + if check(mc)=0: + MC(scantokens(mc)) + VerbatimTeX("\gdef\EN{"&inf_EN&"}"); + VerbatimTeX("\gdef\MW{"&inf_MW&"}"); + VerbatimTeX("\gdef\mw{"&cal_MW&"}"); + VerbatimTeX("\gdef\fm{"&cal_FM&"}"); + fi + endfigm +\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}% %------------------------------------------------------------------------ +\advance\f@num\@ne\relax% +\advance\t@num\@ne\relax% +\ifnum\t@num=5 \\ \t@num=\z@ \fi% +\ifnum\f@num=155 \CONT@false \fi% +\ifCONT@ \repeat% +%------------------------------------------------------------------------------ \end{document} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mp index 383ff8b8594..535df597fc8 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf +++ 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.01.02 +% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2022.01.17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -input mcf2graph.mf; %% it must be version 4.77 +input mcf2graph.mp; %% it must be version 4.78 % ** use data base file 'mcf_data_base.mcf' -message "mcf_man_soc 2022.01.02"; message ""; +message "mcf_man_soc 2022.01.17"; message ""; %------------------------------------------------------------------------ sw_mframe:=0; sw_expand:=0; @@ -12,122 +12,122 @@ sw_expand:=0; fsize:=(40mm,25mm); blength:=6mm; %*********************************************************************** -beginfont("EN:Glycine",":<30,NH2,!2,COOH") +beginfigm("EN:Glycine",":<30,NH2,!2,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Alanine",":<30,NH2,!~wb,/_,!,COOH") +beginfigm("EN:L-Alanine",":<30,NH2,!~wb,/_,!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Valine",":<30,NH2,!~wb,/?!,!,COOH") +beginfigm("EN:L-Valine",":<30,NH2,!~wb,/?!,!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Leucine",":<30,NH2,!~wb,/'(!,?!),!,COOH") +beginfigm("EN:L-Leucine",":<30,NH2,!~wb,/'(!,?!),!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Isoleucine",":<30,NH2,!~wb,/'(/*_,!2),!,COOH") +beginfigm("EN:L-Isoleucine",":<30,NH2,!~wb,/'(/*_,!2),!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Serine",":<30,NH2,!~wb,/!OH,!,COOH") +beginfigm("EN:L-Serine",":<30,NH2,!~wb,/!OH,!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Threonine",":<30,NH2,!~wb,/'(/_,!~wf,OH),!,COOH") +beginfigm("EN:L-Threonine",":<30,NH2,!~wb,/'(/_,!~wf,OH),!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Cysteine",":<30,NH2,!~wb,/!SH,!,COOH") +beginfigm("EN:L-Cysteine",":<30,NH2,!~wb,/!SH,!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Methionine",":<30,NH2,!~wb,/'(!2,S,!),!,COOH") +beginfigm("EN:L-Methionine",":<30,NH2,!~wb,/'(!2,S,!),!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Phenylalanine",":<30,NH2,!~wb,/!Ph,!,COOH") +beginfigm("EN:L-Phenylalanine",":<30,NH2,!~wb,/!Ph,!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Tyrosine",":<30,NH2,!~wb,/'(!Ph,-3:/OH),!,COOH") +beginfigm("EN:L-Tyrosine",":<30,NH2,!~wb,/'(!Ph,-3:/OH),!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Triptophan", +beginfigm("EN:L-Triptophan", ":<30,NH2,!~wb,!,COOH,@2,\,!,<24,|,?5,-4=Ph,2=dr,5=dl,4:NH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Prorine",":<18,?5,3:NH,4:*/COOH") +beginfigm("EN:L-Prorine",":<18,?5,3:NH,4:*/COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Glutamine", +beginfigm("EN:L-Glutamine", ":<30,NH2,!~wb,!,COOH,@2,\`1,!`1,!,//O,!,NH2") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Asparagine",":<30,NH2,!~wb,/'(!,//O,!,NH2),!,COOH") +beginfigm("EN:L-Asparagine",":<30,NH2,!~wb,/'(!,//O,!,NH2),!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Aspartic acid",":<30,NH2,!~wb,/!COOH,!,COOH") +beginfigm("EN:L-Aspartic acid",":<30,NH2,!~wb,/!COOH,!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Glutamic acid",":<30,NH2,!~wb,/'(!2,COOH),!,COOH") +beginfigm("EN:L-Glutamic acid",":<30,NH2,!~wb,/'(!2,COOH),!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Lysine",":<30,NH2,!~wb,/'(!4,NH2),!,COOH") +beginfigm("EN:L-Lysine",":<30,NH2,!~wb,/'(!4,NH2),!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Arginine", +beginfigm("EN:L-Arginine", ":<30,NH2,!~wb,!,COOH,@2,\`1,!`1,!2,NH,!,//NH,!,NH2") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Hystidine", +beginfigm("EN:L-Hystidine", ":<30,NH2,!~wb,!,COOH,@2,\,!,|,?5,{1,3}=dl,3:N,5:NH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-DOPA",":<30,NH2,!~wb,!,COOH,@2,\,!,Ph,{-3,-4}:/OH") +beginfigm("EN:L-DOPA",":<30,NH2,!~wb,!,COOH,@2,\,!,Ph,{-3,-4}:/OH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:Ornithine",":<30,NH2,!~wb,/'(!3,NH2),!,COOH") +beginfigm("EN:Ornithine",":<30,NH2,!~wb,/'(!3,NH2),!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:Citrulline",":<30,NH2,!~wb,/'(!3,NH,!,//O,!,NH2),!,COOH") +beginfigm("EN:Citrulline",":<30,NH2,!~wb,/'(!3,NH,!,//O,!,NH2),!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:GABA",":<30,NH2,!4,COOH") +beginfigm("EN:GABA",":<30,NH2,!4,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:amino Levulinic acid",":<30,NH2,!2,//O,!3,COOH") +beginfigm("EN:amino Levulinic acid",":<30,NH2,!2,//O,!3,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:4-amino benzoic acid",":<30,Ph,1:/NH2,4:/COOH") +beginfigm("EN:4-amino benzoic acid",":<30,Ph,1:/NH2,4:/COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Carboxyl glutamic acid", +beginfigm("EN:L-Carboxyl glutamic acid", ":<30,NH2,!~wb,/'(!,/COOH,!,COOH),!,COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:L-Hydroxy Prorine",":<18,?5,1:/OH,3:NH,4:*/COOH") +beginfigm("EN:L-Hydroxy Prorine",":<18,?5,1:/OH,3:NH,4:*/COOH") if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fsize:=(60mm,35mm); @@ -138,7 +138,7 @@ ratio_atom_bond:=0.36; sw_frame:=Outside; fmargin:=(2mm,1mm); %*********************************************************************** -beginfont("EN:Chain 1") +beginfigm("EN:Chain 1") fsize:=(60mm,17mm); sw_numbering:=Bond; numbering_end:=6; @@ -155,9 +155,9 @@ beginfont("EN:Chain 1") drawarrow B9/*.7{B9right}..{B3right}B3/*.7; label.ulft("-45",B9/*.7); drawarrow B10/*.7{B10left}..{B4left}B4/*.7; label.llft("60",B10/*.7); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:Chain 2") +beginfigm("EN:Chain 2") fsize:=(60mm,17mm); sw_numbering:=Bond; numbering_end:=6; @@ -176,9 +176,9 @@ beginfont("EN:Chain 2") drawarrow B11/*.7{B11right}..{B5right}B5/*.7; label.ulft("-60",B11/*.7); drawarrow B12/*.7{B12left}..{B6left}B6/*.7; label.llft("60",B12/*.7); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:Jump and Branch") +beginfigm("EN:Jump and Branch") fsize:=(60mm,16mm); fmargin:=(2mm,2mm); sw_trimming:=1; @@ -186,9 +186,9 @@ beginfont("EN:Jump and Branch") ratio_chain_ring:=1; %---------------------------------------------------------------------- MC(<-30,!6,@3,0,!,@5,-30) -endfont +endfigm %*********************************************************************** -beginfont("EN:Jump and Branch") +beginfigm("EN:Jump and Branch") fsize:=(60mm,16mm); fmargin:=(2mm,2mm); sw_numbering:=Atom; @@ -196,9 +196,9 @@ beginfont("EN:Jump and Branch") ratio_chain_ring:=1; %---------------------------------------------------------------------- MC(<-30,!6,@3,\,!) -endfont +endfigm %*********************************************************************** -beginfont("EN:branch1") +beginfigm("EN:branch1") fsize:=(60mm,16mm); fmargin:=(2mm,2mm); sw_numbering:=Atom; @@ -207,9 +207,9 @@ beginfont("EN:branch1") ratio_chain_ring:=1; %---------------------------------------------------------------------- MC(<30,!10,@2,\,!,@4,*\,!,@6,\*,!,@8,\\,!,@10,*\*,!) -endfont +endfigm %*********************************************************************** -beginfont("EN:branch2") +beginfigm("EN:branch2") fsize:=(60mm,20mm); fmargin:=(2mm,2mm); sw_trimming:=1; @@ -218,9 +218,9 @@ beginfont("EN:branch2") ratio_chain_ring:=1; %---------------------------------------------------------------------- MC(<30,!6,@2,\~dr,!,@4,\`1.5,-90,@6,15,-60) -endfont +endfigm %*********************************************************************** -beginfont("EN:Connect atom") +beginfigm("EN:Connect atom") fsize:=(60mm,20mm); fmargin:=(2mm,2mm); sw_trimming:=1; @@ -228,18 +228,18 @@ beginfont("EN:Connect atom") ratio_chain_ring:=1; %---------------------------------------------------------------------- MC(<-30,!6,@3,\,!3,&6~bd,@9,&4~bz) -endfont +endfigm %*********************************************************************** -beginfont("EN:ring") +beginfigm("EN:ring") fsize:=(60mm,20mm); sw_trimming:=1; fmargin:=(2mm,3mm); sw_numbering:=Bond; %---------------------------------------------------------------------- MC(?6) -endfont +endfigm %*********************************************************************** -beginfont("EN:rotate 1") +beginfigm("EN:rotate 1") fsize:=(60mm,20mm); fmargin:=(2mm,3mm); sw_trimming:=1; @@ -254,9 +254,9 @@ beginfont("EN:rotate 1") drawarrow B8/*.7{B8left}..{B3left}B3/*.7; label.urt("90",B8/*.7); drawarrow B9/*.7{B9right}..{B4right}B4/*.7; label.urt("-90",B9/*.7); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:change bond 1") +beginfigm("EN:change bond 1") fsize:=(70mm,10mm); fmargin:=(2mm,2mm); sw_trimming:=0; @@ -266,13 +266,13 @@ beginfont("EN:change bond 1") label.rt("(dm)",A1+(0,-0.7l)); label.rt("(dl)",A3+(0,-0.7l)); label.rt("(dr)",A5+(0,-0.7l)); - label.rt("(db)",A6+(0,-0.7l)); + label.rt("(db)",A6+(0,-0.2l)); label.rt("(db)",A7+(0,-0.7l)); label.rt("(tm)",A9+(0,-0.7l)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:change bond 2") +beginfigm("EN:change bond 2") fsize:=(70mm,10mm); fmargin:=(2mm,2mm); sw_trimming:=0; @@ -286,9 +286,9 @@ beginfont("EN:change bond 2") label.rt("(vf)",A9+(0,-0.7l)); label.rt("(vb)",A11+(0,-0.7l)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:change bond 3") +beginfigm("EN:change bond 3") fsize:=(70mm,10mm); fmargin:=(2mm,2mm); blength:=9mm; @@ -301,18 +301,18 @@ beginfont("EN:change bond 3") label.rt("(bd)",A5+(0,-0.6l)); label.rt("(bz)",A7+(0,-0.6l)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:over line") +beginfigm("EN:over line") sw_trimming:=1; fsize:=(75mm,20mm); ratio_chain_ring:=1; MC(<30,!18,$90`1.5,90`15.5, {2~si_,4~wf_,6~wb_,8~zf_,10~zb_, 12~bd_,14~dl_,16~dr_,18~dm_}:/_`2) -endfont +endfigm %*********************************************************************** -beginfont("EN:Steric ring") +beginfigm("EN:Steric ring") fsize:=(75mm,16mm); MCat(0.05,0.5)(#1.25,-30~wf_r,30~bd_r`1,30~wb_r,120,O,30,&1,##, #.5,{1^$-90,2^$90,3^$-90,4^$90}:/OH,6^$90:/!OH) @@ -323,126 +323,126 @@ beginfont("EN:Steric ring") MCat(0.75,0.2)(0~bd) add(label.lft("bd:",A1);) MCat(1,0.7)(0~wb_r) add(label.lft("wb_r:",A1);) MCat(1,0.2)(0~wb) add(label.lft("wb:",A1);) -endfont +endfigm %*********************************************************************** -beginfont("EN:change multi bond") +beginfigm("EN:change multi bond") fsize:=(60mm,8mm); fmargin:=(2mm,3mm); ratio_chain_ring:=1; MC(<30,!9,{2,4,6,8'}=dl) -endfont +endfigm %*********************************************************************** -beginfont("EN:change bond length1") +beginfigm("EN:change bond length1") fsize:=(55mm,8mm); sw_numbering:=Bond; MC(<-30,!2,!4`1.2,!2) -endfont +endfigm %*********************************************************************** -beginfont("EN:change bond length2") +beginfigm("EN:change bond length2") fsize:=(55mm,8mm); sw_numbering:=Bond; MC(<-30,!2,#1.2,!4,##,!2) -endfont +endfigm %*********************************************************************** -beginfont("EN:change ring length") +beginfigm("EN:change ring length") fsize:=(60mm,16mm); fmargin:=(2mm,2mm); sw_trimming:=1; sw_numbering:=Bond; MC(?6,@4,\,?6`1.2) -endfont +endfigm %*********************************************************************** -beginfont("EN:Insert atom") +beginfigm("EN:Insert atom") sw_trimming:=1; fsize:=(50mm,7mm); MC(<-30,!2,O,!2,N,!2) -endfont +endfigm %*********************************************************************** -beginfont("EN:change atom") +beginfigm("EN:change atom") fsize:=(70mm,10mm); msize:=(0.48,1); MCat(0,0.5)(<30,!5,2:O,{3:5}:N) sw_numbering:=Atom; MCat(1,0.5)(<30,!5,2:O,{3:5}:N) -endfont +endfigm %*********************************************************************** -beginfont("EN:change atom brock address 1") +beginfigm("EN:change atom brock address 1") fsize:=(70mm,14mm); fmargin:=(3mm,1.5mm); MCat(0,.5)(?6,@4,\,|,?6,2:O) sw_numbering:=Atom; msize:=(1,.88); MCat(1,.5)(?6,@4,\,?6) -endfont +endfigm %*********************************************************************** -beginfont("EN:change atom brock address 2") +beginfigm("EN:change atom brock address 2") fsize:=(70mm,14mm); fmargin:=(3mm,1.5mm); MCat(0,.5)(?6,@4,\,|,?6,||,2:N) sw_numbering:=Atom; msize:=(1,.88); MCat(1,.5)(?6,@4,\,?6) -endfont +endfigm %*********************************************************************** -beginfont("EN:change atom absolute address") +beginfigm("EN:change atom absolute address") fsize:=(70mm,14mm); fmargin:=(3mm,1.5mm); MCat(0,.5)(?6,@4,\,?6,$2:N) sw_numbering:=Atom; msize:=(1,.88); MCat(1,.5)(?6,@4,\,?6) -endfont +endfigm %*********************************************************************** -beginfont("EN:change atom relative adress") +beginfigm("EN:change atom relative adress") fsize:=(70mm,14mm); fmargin:=(3mm,1.5mm); MCat(0,.5)(?6,@4,\,?6,-2:N) sw_numbering:=Atom+Inverse; msize:=(1,.88); MCat(1,.5)(?6,@4,\,?6) -endfont +endfigm %*********************************************************************** -beginfont("EN:Charged atom") +beginfigm("EN:Charged atom") sw_trimming:=1; fsize:=(60mm,12mm); MC(<-30,!2,N,??,p_,!2,S,n_^180,!6,7:N,7:??,9:S,7:p_,9:n_^180) -endfont +endfigm %*********************************************************************** -beginfont("EN:fused ring") +beginfigm("EN:fused ring") fsize:=(60mm,18mm); fmargin:=(2mm,1.5mm); sw_trimming:=1; sw_numbering:=Bond; MC(<30,?6,3=?6,3=dt,{7:11}=bd_r) -endfont +endfigm %----------------------------------------------------------------------- -beginfont("EN:change ring length") +beginfigm("EN:change ring length") fsize:=(60mm,25mm); fmargin:=(2mm,2mm); sw_trimming:=1; sw_numbering:=Bond; MC(?6,@4,\,?6`1.2,5=?6,11=?6, {14:23}=bd_r,{5,11}=dt) -endfont +endfigm %----------------------------------------------------------------------- -beginfont("EN:fused large 6 ring") +beginfigm("EN:fused large 6 ring") fsize:=(60mm,18mm); fmargin:=(2mm,1.5mm); margin_top_bottom:=1.5mm; sw_numbering:=Bond; sw_trimming:=1; MC(<30,?6,3=?6[13],3=dt,{7:11}=bd_r) -endfont +endfigm %----------------------------------------------------------------------- -beginfont("EN:fuse multi ring") +beginfigm("EN:fuse multi ring") fsize:=(70mm,20mm); fmargin:=(2mm,2mm); sw_numbering:=Bond; sw_trimming:=1; MC(<30,?6,{-3,-4,-4,-2,-2,-4,-4}=?6,{4,8,13,20,25,28,33}=dt) -endfont +endfigm %*********************************************************************** -beginfont("EN:fused ring 2") +beginfigm("EN:fused ring 2") fsize:=(75mm,20mm); fmargin:=(2mm,2mm); sw_numbering:=Bond; @@ -455,9 +455,9 @@ beginfont("EN:fused ring 2") msize:=(1,.9); MCat( 1,.5)(<30,?6,3=?6,(11,4)=?4,{11,4}=dt,{12,13}=bd_r) add(defaultscale:=0.4; label("(3)",p0);) -endfont +endfigm %*********************************************************************** -beginfont("EN:fused ring 3") +beginfigm("EN:fused ring 3") fsize:=(60mm,20mm); fmargin:=(2mm,2mm); sw_numbering:=Bond; @@ -465,30 +465,29 @@ beginfont("EN:fused ring 3") add(defaultscale:=0.4; label("(1)",p0);) MCat(1,0)(?6,{3,10}=?6,(16,4)=?5[2],{16,4}=dt,{17,18}=bd_r) add(defaultscale:=0.4; label("(2)",p0);) -endfont +endfigm %*********************************************************************** -beginfont("EN:fused ring 4") +beginfigm("EN:fused ring 4") fsize:=(60mm,20mm); fmargin:=(2mm,2mm); - sw_trimming:=1; sw_numbering:=Bond; MC(<-30,?6,{3,10,15}=?6,(21,4)=?6[2],{21,4}=dt,{22,23}=bd_r) -endfont +endfigm %*********************************************************************** -beginfont("EN:Spiro ring ") +beginfigm("EN:Spiro ring ") fsize:=(40mm,15mm); sw_numbering:=Atom; numbering_end:=7; ratio_chain_ring:=1; MC(<30,!6,@4,?5) -endfont +endfigm %*********************************************************************** -beginfont("EN:group 1") +beginfigm("EN:group 1") fsize:=(75mm,18mm); MC(<30,!,/_,!2,/!,!2,/!,!4,/?!,!4,/??!,!2,/'(Ph`0.8)^-60,!) -endfont +endfigm %*********************************************************************** -beginfont("EN:group 2") +beginfigm("EN:group 2") fsize:=(70mm,14mm); MC(<30,!`1,//O,!2`1,*/H,!2`1,/*H,!2`1,*/*H,!2`1,**?3,!`1) add(defaultscale:=0.75; @@ -498,39 +497,39 @@ beginfont("EN:group 2") label("*/*",A8-(0,0.45l)); label("**",A10-(0,0.45l)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:group 3") +beginfigm("EN:group 3") fsize:=(60mm,16mm); sw_trimming:=1; MC(<-30,#1,!2,/_`2^30,!2,/!2>lr,!2,/!2>rl,!) -endfont +endfigm %*********************************************************************** -beginfont("EN:group 3") +beginfigm("EN:group 3") fsize:=(75mm,25mm); fmargin:=(2mm,2mm); sw_numbering:=Atom; numbering_end:=17; MC(<30,!17,2:/_,3:/!,4:/!2,7:/iPr,8:/tBu,10:/'(Ph`0.6)^-15, {11,12,13'}:*/_,{15,16,17'}:/*_) -endfont +endfigm %*********************************************************************** -beginfont("EN:group 4") +beginfigm("EN:group 4") fsize:=(60mm,18mm); sw_trimming:=1; fmargin:=(2mm,2mm); sw_numbering:=Atom; numbering_end:=9; MC(<30,!8`1,{2~wf,4~zf,6^-30,8^$120}:/_) -endfont +endfigm %*********************************************************************** -beginfont("EN:group 5") +beginfigm("EN:group 5") fsize:=(60mm,16mm); sw_trimming:=1; sw_numbering:=Atom; numbering_end:=8; MC(<-30,!7`1,3:/_`2^30,5:/!2>lr,7:/!2>rl) -endfont +endfigm %*********************************************************************** -beginfont("EN:chain strech direction mode 1") +beginfigm("EN:chain strech direction mode 1") fsize:=(50mm,25mm); sw_trimming:=1; ratio_chain_ring:=1; @@ -538,9 +537,9 @@ beginfont("EN:chain strech direction mode 1") ?4,{3^-90,3^-30,3^90}:/'(!3,"{hz}")>hz, {1^-60,1,1^60}:/'(!3,"{vt}")>vt ) -endfont +endfigm %*********************************************************************** -beginfont("EN:chain strech direction mode 2") +beginfigm("EN:chain strech direction mode 2") fsize:=(60mm,20mm); sw_trimming:=1; ratio_chain_ring:=1; @@ -548,47 +547,47 @@ beginfont("EN:chain strech direction mode 2") <-30,!6,{3^-30,3,3^30}:/'(!,!,!,"{lr}")>lr, {5^-30,5,5^30}:/'(!,!,!,"{rl}")>rl ) -endfont +endfigm %*********************************************************************** -beginfont("EN:chain strech direction mode 3") +beginfigm("EN:chain strech direction mode 3") fsize:=(40mm,20mm); sw_trimming:=1; MC(<30,!4,2:/!6>30,4:/!4>-45) -endfont +endfigm %*********************************************************************** -beginfont("EN:chain strech direction mode 4") +beginfigm("EN:chain strech direction mode 4") fsize:=(60mm,20mm); sw_trimming:=1; MC(<30,!6,6>'(90,-90,90,-90,90):/!5) -endfont +endfigm %*********************************************************************** -beginfont("EN:change atom and group") +beginfigm("EN:change atom and group") fsize:=(60mm,12mm); sw_trimming:=1; MC(<-30,!2,NH,!2,N!,!2,N!2,!2,SO,!2,SOO,!) -endfont +endfigm %*********************************************************************** -beginfont("EN:methyl*2,isopropyl,tert-butyl") +beginfigm("EN:methyl*2,isopropyl,tert-butyl") fsize:=(60mm,12mm); sw_trimming:=1; MC(<30,!9`1,?!,!,??,!,2:??,4:/?!,6:/??!,8:/N?!) -endfont +endfigm %*********************************************************************** -beginfont("EN:User definition") +beginfigm("EN:User definition") fsize:=(60mm,13mm); sw_trimming:=1; iBuOH:='(!,/_,!,OH); MC(<30,?6,{4,6}:/iBuOH) -endfont +endfigm %*********************************************************************** -beginfont("EN:Inline definition") +beginfigm("EN:Inline definition") fsize:=(60mm,13mm); fmargin:=(2mm,1mm); sw_trimming:=1; MC(<30,!8,{2,6}:/'(!,/_,!,OH)) -endfont +endfigm %*********************************************************************** -beginfont("EN:Move position") +beginfigm("EN:Move position") fsize:=(70mm,16mm); fmargin:=(2mm,1mm); sw_trimming:=1; @@ -601,32 +600,32 @@ beginfont("EN:Move position") draw A1--(A1+(0,1l))--A1+(6l,1l); draw (A1+(0,1l))--(A1+(-3bp,1l)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:Serial number") +beginfigm("EN:Serial number") fsize:=(75mm,14mm); max_blength:=8mm; sw_numbering:=Atom; numbering_end:=15; MC(<30,!14,{2,6:10,14}:/_~bd_r`0.5) -endfont +endfigm %*********************************************************************** -beginfont("EN:Change color") +beginfigm("EN:Change color") fsize:=(50mm,20mm); max_blength:=8mm; MC( <30,Ph,{2,5}:N,3:/NH2,4:/COOH, 2:red,5:blue,3=green ) -endfont +endfigm %*********************************************************************** -beginfont("EN:Change font") +beginfigm("EN:Change font") fsize:=(50mm,20mm); max_blength:=8mm; atomfont:="cmr8"; MC(<30,Ph,{2,5}:N,3:/NH2,4:/COOH) -endfont +endfigm %*********************************************************************** -beginfont("EN:mangle") +beginfigm("EN:mangle") fsize:=(50mm,15mm); blength:=6mm; mangle:=0; @@ -635,9 +634,9 @@ beginfont("EN:mangle") mangle:=30; MCat(0.8,0.5)(Ph) add(drawarrow((A1 shifted (aw,0)) rotated A1ang..A1);) -endfont +endfigm %*********************************************************************** -beginfont("EN:blength=0") +beginfigm("EN:blength=0") sw_frame:=Bothside; fsize:=(40mm,15mm); MC(<30,Ph) @@ -647,9 +646,9 @@ beginfont("EN:blength=0") for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor ) -endfont +endfigm %----------------------------------------------------------------------- -beginfont("EN:0<blength=<1") +beginfigm("EN:0<blength=<1") sw_frame:=Bothside; fsize:=(40mm,15mm); blength:=0.1; @@ -660,9 +659,9 @@ beginfont("EN:0<blength=<1") for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor ) -endfont +endfigm %----------------------------------------------------------------------- -beginfont("EN:blength>1") +beginfigm("EN:blength>1") sw_frame:=Bothside; fsize:=(40mm,15mm); blength:=8mm; @@ -673,9 +672,9 @@ beginfont("EN:blength>1") for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor ) -endfont +endfigm %*********************************************************************** -beginfont("EN:msize=(1)") +beginfigm("EN:msize=(1)") sw_frame:=Bothside+Mol; fsize:=(40mm,15mm); msize:=(1,1); @@ -686,9 +685,9 @@ beginfont("EN:msize=(1)") for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor ) -endfont +endfigm %------------------------------------------------------ -beginfont("EN:msize=(0.25,1)") +beginfigm("EN:msize=(0.25,1)") sw_frame:=Bothside+Mol; fsize:=(40mm,15mm); msize:=(0.25,1); @@ -699,9 +698,9 @@ beginfont("EN:msize=(0.25,1)") for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor ) -endfont +endfigm %------------------------------------------------------ -beginfont("EN:msize=(11mm,11mm)") +beginfigm("EN:msize=(11mm,11mm)") sw_frame:=Bothside+Mol; fsize:=(40mm,15mm); msize:=(11mm,11mm); @@ -712,25 +711,25 @@ beginfont("EN:msize=(11mm,11mm)") for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor ) -endfont +endfigm %*********************************************************************** -beginfont("EN:mposition") +beginfigm("EN:mposition") sw_frame:=Bothside+Mol; fsize:=(40mm,15mm); msize:=(1,0.8); mposition:=(0.5,0.5); MC(<30,Ph) -endfont +endfigm %----------------------------------------------------- -beginfont("EN:mposition") +beginfigm("EN:mposition") sw_frame:=Bothside+Mol; fsize:=(40mm,15mm); msize:=(1,0.8); mposition:=(1,0); MC(<30,Ph) -endfont +endfigm %----------------------------------------------------- -beginfont("EN:mposition") +beginfigm("EN:mposition") sw_frame:=sw_frame+Mol; fsize:=(40mm,15mm); msize:=(1,0.8); @@ -743,9 +742,9 @@ beginfont("EN:mposition") for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor ) -endfont +endfigm %*********************************************************************** -beginfont("EN:Font size") +beginfigm("EN:Figure size") fsize:=(40mm,12mm); sw_frame:=Outside; MC(<30,Ph) @@ -755,9 +754,9 @@ beginfont("EN:Font size") for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor ) -endfont +endfigm %*********************************************************************** -beginfont("EN:fmargin") +beginfigm("EN:fmargin") fsize:=(40mm,12mm); sw_frame:=Bothside+Mol; fmargin:=(10mm,1mm); @@ -769,9 +768,9 @@ beginfont("EN:fmargin") for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor drawdot p0 withpen pencircle scaled 3pt; ) -endfont +endfigm %*********************************************************************** -beginfont("EN:offset_thickness") +beginfigm("EN:offset_thickness") fsize:=(60mm,12mm); offset_thickness:=0.0pt; MCat(0.1,0.5)(<30,Ph) offset_thickness:=0.2pt; MCat(0.55,0.5)(<30,Ph) @@ -781,9 +780,9 @@ beginfont("EN:offset_thickness") label.urt("0.2pt",(0.36w,1bp)); label.urt("0.5pt",(0.7w,1bp)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:offset_bond_gap") +beginfigm("EN:offset_bond_gap") fsize:=(60mm,12mm); offset_bond_gap:=0.0pt; MCat(0.1, .5)(<30,Ph) @@ -796,9 +795,9 @@ beginfont("EN:offset_bond_gap") label.urt("0.3pt",(0.36w,1bp)); label.urt("1.0pt",(0.7w,1bp)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:offset_atom") +beginfigm("EN:offset_atom") fsize:=(60mm,12mm); offset_atom:=0.0pt; MCat(0.1, .5)(<30,?6,3:O) @@ -811,9 +810,9 @@ beginfont("EN:offset_atom") label.urt("0.8pt",(0.36w,1bp)); label.urt("2.0pt",(0.7w,1bp)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:offset_wedge") +beginfigm("EN:offset_wedge") fsize:=(60mm,12mm); offset_wedge:=0.0pt; MCat(0.1,0.5)(<30,?6,5:*/_) @@ -826,9 +825,9 @@ beginfont("EN:offset_wedge") label.urt("0.4pt",(0.36w,1bp)); label.urt("1.0pt",(0.7w,1bp)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:max_blength") +beginfigm("EN:max_blength") fsize:=(60mm,20mm); sw_frame:=sw_frame+Mol; max_blength:=5mm; @@ -842,9 +841,9 @@ beginfont("EN:max_blength") label("8mm", (0.42w,0.5h)); label("10mm",(0.82w,0.5h)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:ratio_thickness_bond") +beginfigm("EN:ratio_thickness_bond") fsize:=(60mm,12mm); ratio_thickness_bond:=0.005; MCat(0.1,0.5)(<30,Ph) @@ -857,9 +856,9 @@ beginfont("EN:ratio_thickness_bond") label.urt("0.015",(0.36w,1bp)); label.urt("0.030",(0.7w,1bp)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:ratio_char_bond") +beginfigm("EN:ratio_char_bond") fsize:=(60mm,12mm); ratio_char_bond:=1.0; MCat(0, .5)(<30,?6,6:O,3:NH) @@ -872,9 +871,9 @@ beginfont("EN:ratio_char_bond") label.urt("1.5",(0.36w,1bp)); label.urt("2.0",(0.7w,1bp)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:ratio_bondgap_bond") +beginfigm("EN:ratio_bondgap_bond") fsize:=(60mm,12mm); ratio_bondgap_bond:=0.10; MCat(0.1, .5)(<30,Ph) @@ -887,9 +886,9 @@ beginfont("EN:ratio_bondgap_bond") label.urt("0.15",(0.36w,1bp)); label.urt("0.20",(0.7w,1bp)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:ratio_atom_bond") +beginfigm("EN:ratio_atom_bond") fsize:=(60mm,12mm); ratio_atom_bond:=0.25; MCat(0.1, .5)(<30,?6,3:O) @@ -902,9 +901,9 @@ beginfont("EN:ratio_atom_bond") label.urt("0.33",(0.36w,1bp)); label.urt("0.45",(0.7w,1bp)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:ratio_wedge_bond") +beginfigm("EN:ratio_wedge_bond") fsize:=(70mm,12mm); ratio_wedge_bond:=0.1; MCat(0.05, .5)(?6,4:*/_) @@ -917,9 +916,9 @@ beginfont("EN:ratio_wedge_bond") label.urt("0.12",(0.36w,1bp)); label.urt("0.20",(0.7w,1bp)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:ratio_atomgap_atom") +beginfigm("EN:ratio_atomgap_atom") fsize:=(70mm,12mm); sw_frame:=sw_frame+Atom; ratio_atomgap_atom:=0.00; @@ -933,9 +932,9 @@ beginfont("EN:ratio_atomgap_atom") label.urt("0.05",(0.45w,1bp)); label.urt("0.12",(0.85w,1bp)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:ratio_chain_ring") +beginfigm("EN:ratio_chain_ring") fsize:=(70mm,12mm); ratio_chain_ring:= 0.4; MCat(0.05, .5)(<30,?6,4:/!) @@ -948,9 +947,9 @@ beginfont("EN:ratio_chain_ring") label.urt("0.66",(0.3w,1bp)); label.urt("1.0" ,(0.62w,1bp)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:ratio_hashgap_bond") +beginfigm("EN:ratio_hashgap_bond") fsize:=(70mm,15mm); ratio_hashgap_bond:=0.06; MCat(0.08, .5)(<30,!2,2:/*_`1.5) @@ -963,134 +962,134 @@ beginfont("EN:ratio_hashgap_bond") label.urt("0.12",(0.4w,1bp)); label.urt("0.20",(0.77w,1bp)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:Switwch numbering atom") +beginfigm("EN:Switwch numbering atom") fsize:=(60mm,20mm); ratio_chain_ring:=1; numbering_start:=3; numbering_end:=8; sw_numbering:=Atom; MCat(.5,.9)(<-30,!9) sw_numbering:=Atom+Brock; MCat(.5,.5)(<-30,!9) sw_numbering:=Atom+Inverse; MCat(.5,.1)(<-30,!9) -endfont +endfigm %*********************************************************************** -beginfont("EN:Switwch numbering bond") +beginfigm("EN:Switwch numbering bond") fsize:=(60mm,20mm); ratio_chain_ring:=1; numbering_start:=3; numbering_end:=8; sw_numbering:=Bond; MCat(.5,.9)(<-30,!9) sw_numbering:=Bond+Brock; MCat(.5,.5)(<-30,!9) sw_numbering:=Bond+Inverse; MCat(.5,.1)(<-30,!9) -endfont +endfigm %*********************************************************************** -beginfont("EN:Switwch trimming") +beginfigm("EN:Switwch trimming") fsize:=(60mm,20mm); sw_frame:=Bothside+Mol; msize:=(1,.7); MCat(.2,.3)(Ph) MCat(.8,.7)(Ph) -endfont +endfigm %----------------------------------------------------------------------- -beginfont("EN:Switwch trimming") +beginfigm("EN:Switwch trimming") fsize:=(60mm,20mm); sw_frame:=Bothside+Mol; sw_trimming:=1; msize:=(1,.7); MCat(.2,.3)(Ph) MCat(.8,.7)(Ph) -endfont +endfigm %*********************************************************************** -beginfont("EN:Switwch Expand") +beginfigm("EN:Switwch Expand") fsize:=(60mm,20mm); MCat(0, .5)(<30,Ph,4:/COOH,3:/NH2) sw_expand:=1; MCat(1, .5)(<30,Ph,4:/COOH,3:/NH2) -endfont +endfigm %*********************************************************************** -beginfont("EN:Switwch abbreviate group") +beginfigm("EN:Switwch abbreviate group") fsize:=(60mm,12mm); MCat(.15, .5)(<30,Ph,4:/Cl,3:/F) sw_abbreviate:=Group; MCat(.85, .5)(<30,Ph,4:/Cl,3:/F) -endfont +endfigm %*********************************************************************** -beginfont("EN:Switwch abbreviate bondtype") +beginfigm("EN:Switwch abbreviate bondtype") fsize:=(60mm,12mm); MCat(.15, .5)(<30,Ph,4:/Cl,3:/F) sw_abbreviate:=Bond; MCat(.85, .5)(<30,Ph,4:/Cl,3:/F) -endfont +endfigm %*********************************************************************** -beginfont("EN:Switwch font frame 1") +beginfigm("EN:Switwch font frame 1") fsize:=(30mm,10mm); fmargin:=(5mm,1.5mm); sw_frame:=Outside; MC(<30,Ph) -endfont -beginfont("EN:Switwch font frame 2") +endfigm +beginfigm("EN:Switwch font frame 2") fsize:=(30mm,10mm); fmargin:=(5mm,1.5mm); sw_frame:=Inside; MC(<30,Ph) -endfont -beginfont("EN:Switwch font frame 3") +endfigm +beginfigm("EN:Switwch font frame 3") fsize:=(30mm,10mm); fmargin:=(5mm,1.5mm); sw_frame:=Bothside; MC(<30,Ph) -endfont +endfigm %*********************************************************************** -beginfont("EN:Switwch molecular frame") +beginfigm("EN:Switwch molecular frame") sw_frame:=Outside; fsize:=(40mm,11mm); msize:=(1,1); sw_frame:=sw_frame+Mol; MC(<30,Ph) -endfont +endfigm %*********************************************************************** -beginfont("EN:Switwch atom frame") +beginfigm("EN:Switwch atom frame") fsize:=(60mm,10mm); sw_frame:=sw_frame+Atom; MC(<30,COOH,!,COOH) -endfont +endfigm %*********************************************************************** -beginfont("EN:Local setting 1") +beginfigm("EN:Local setting 1") fsize:=(15mm,12mm); MC(Ph) -endfont -beginfont("EN:Local setting 2") +endfigm +beginfigm("EN:Local setting 2") fsize:=(15mm,12mm); ratio_thickness_bond:=0.05; MC(Ph) -endfont -beginfont("EN:Local setting 3") +endfigm +beginfigm("EN:Local setting 3") fsize:=(15mm,12mm); MC(Ph) -endfont +endfigm %*********************************************************************** save_ratio:=ratio_thickness_bond; -beginfont("EN:Global setting 1") +beginfigm("EN:Global setting 1") fsize:=(15mm,12mm); MC(Ph) -endfont +endfigm ratio_thickness_bond:=0.05; -beginfont("EN:Global setting 2") +beginfigm("EN:Global setting 2") fsize:=(15mm,12mm); MC(Ph) -endfont -beginfont("EN:Global setting 3") +endfigm +beginfigm("EN:Global setting 3") fsize:=(15mm,12mm); MC(Ph) -endfont +endfigm ratio_thickness_bond:=save_ratio; %*********************************************************************** -beginfont("EN:MC() ") +beginfigm("EN:MC() ") fmargin:=(0.5mm,0.5mm); fsize:=(40mm,15mm); sw_frame:=Outside+Mol; MC(<30,Ph,4:/Cl,3:/F) -endfont +endfigm %----------------------------------------------------------------------- -beginfont("EN:MCat()") +beginfigm("EN:MCat()") defaultsize:=5bp; fsize:=(60mm,40mm); fmargin:=(3mm,3mm); @@ -1107,21 +1106,21 @@ beginfont("EN:MCat()") mangle:=mangle+30; endfor endfor -endfont +endfigm %*********************************************************************** -beginfont("EN:Pyridine",":<30,Ph,2:N") +beginfigm("EN:Pyridine",":<30,Ph,2:N") sw_trimming:=0; fsize:=(12mm,12mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %----------------------------------------------------------------------- -beginfont("EN:Pyridine",":<30,Ph,2):N") +beginfigm("EN:Pyridine",":<30,Ph,2):N") sw_trimming:=0; fsize:=(12mm,12mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:add() 1") +beginfigm("EN:add() 1") fsize:=(70mm,40mm); sw_frame:=sw_frame+Atom+Mol; max_blength:=10mm; @@ -1150,9 +1149,9 @@ beginfont("EN:add() 1") " l="&decimal(l), p0+(-9em,-3em)); ) -endfont +endfigm %*********************************************************************** -beginfont("EN:add() 2") +beginfigm("EN:add() 2") fsize:=(70mm,20mm); msize:=(1,0.85); MCat(0,0)(<30,Ph,3=dl,4:/NH2) add(labeloffset:=.7aw; @@ -1167,9 +1166,9 @@ beginfont("EN:add() 2") label(lonepair A3ang,A3+A3up**.7aw); ) ext(drawdblarrow (0.4w,0.4h)..(0.55w,0.4h);) -endfont +endfigm %*********************************************************************** -beginfont("EN:ext()") +beginfigm("EN:ext()") fsize:=(70mm,30mm); blength:=0.065; sw_label_emu:=1; @@ -1192,61 +1191,61 @@ beginfont("EN:ext()") ratio_thickness_char:=0.125; label.bot("Diels-Alder Reaction",(0.5w,h)); ) -endfont +endfigm %*********************************************************************** % Global ext() setting 1 save_defaultsize:=defaultsize; defaultsize:=5bp; -beginfont("EN:?3") +beginfigm("EN:?3") fsize:=(12mm,15mm); MCat(0.5,1)(<30,?3) -endfont -beginfont("EN:?4") +endfigm +beginfigm("EN:?4") fsize:=(12mm,15mm); MCat(0.5,1)(?4) %------------------------------- ext(label.top(inf_EN,(0.5w,0));) %------------------------------- -endfont -beginfont("EN:?5") +endfigm +beginfigm("EN:?5") fsize:=(12mm,15mm); MCat(0.5,1)(?5) -endfont -beginfont("EN:?5") +endfigm +beginfigm("EN:?5") fsize:=(12mm,15mm); MCat(0.5,1)(?6) -endfont +endfigm %----------------------------------------------------------------------- -beginfont("EN:?3") +beginfigm("EN:?3") fsize:=(12mm,15mm); MCat(0.5,1)(<30,?3) -endfont +endfigm %------------------------------- ext(label.top(inf_EN,(0.5w,0));) %------------------------------- -beginfont("EN:?4") +beginfigm("EN:?4") fsize:=(12mm,15mm); MCat(0.5,1)(?4) -endfont -beginfont("EN:?5") +endfigm +beginfigm("EN:?5") fsize:=(12mm,15mm); MCat(0.5,1)(?5) -endfont +endfigm %--------- ext_clear; %--------- -beginfont("EN:?6") +beginfigm("EN:?6") fsize:=(12mm,15mm); MCat(0.5,1)(?6) -endfont +endfigm defaultsize:=save_defaultsize; %*************************************************************************** -beginfont("t:EN","v:Luciferin") +beginfigm("t:EN","v:Luciferin") fsize:=(50mm,15mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*************************************************************************** -beginfont("EN:Colchicine","MW:385.41", +beginfigm("EN:Colchicine","MW:385.41", %--------------------------------------- ": <30,Ph,{1,2,6}:/O!,{-4,-5}=?7, ", ": {-1,-4,-6}=dl,-2://O,-3:/O!, ", @@ -1254,9 +1253,9 @@ beginfont("EN:Colchicine","MW:385.41", %--------------------------------------- fsize:=(50mm,20mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*************************************************************************** -beginfont("EN:Paclitaxel","MW:853.91", +beginfigm("EN:Paclitaxel","MW:853.91", %------------------------------------------------------ ": ?6,5=dl,@3,#1,36,45,45,45,45,##, ", ": &($5),-4=?6,-4=?4,-1=wb,-3=wf,-1:O,||, ", @@ -1268,9 +1267,9 @@ beginfont("EN:Paclitaxel","MW:853.91", %------------------------------------------------------ fsize:=(50mm,25mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*************************************************************************** -beginfont("EN:Maltose","MW:342.3", +beginfigm("EN:Maltose","MW:342.3", %------------------------------------------------------ ": #1.25,-30~wf_r,30~bd_r`1,30~wb_r,120,O,30,&1,##, ", ": #.5,{1^$-90,2^$90,3^$-90}:/OH,6^$90:/!OH,##, ", @@ -1280,9 +1279,9 @@ beginfont("EN:Maltose","MW:342.3", %------------------------------------------------------ fsize:=(50mm,20mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %*********************************************************************** -beginfont("EN:Cellobiose","MW:342.3", +beginfigm("EN:Cellobiose","MW:342.3", %------------------------------------------------------ ": #1.25,-30~wf_r,30~bd_r`1,30~wb_r,120,O,30,&1,##, ", ": #.5,{1^$-90,2^$90,3^$-90}:/OH,6^$90:/!OH,##, ", @@ -1292,48 +1291,6 @@ beginfont("EN:Cellobiose","MW:342.3", %------------------------------------------------------ fsize:=(50mm,20mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont -%*************************************************************************** -ext(defaultfont:="uhvr8r"; defaultscale:=.75; - label.urt("NO = "&decimal(char_num),(0.01w,0.55h)); - label.urt("EN = "&inf_EN ,(0.01w,0.52h)); - label.urt("MW(D) = "&inf_MW ,(0.01w,0.49h)); - label.urt("MW(C) = "&cal_MW ,(0.01w,0.46h)); - label.urt("FM(C) = "&cal_FM ,(0.01w,0.43h)); - label.urt("w = "&decimal(w) ,(0.01w,0.40h)); - label.urt("h = "&decimal(h) ,(0.01w,0.37h)); - label.urt("n = "&decimal(n) ,(0.01w,0.34h)); - label.urt("ratio_thickness_bond = "&decimal(ratio_thickness_bond), - (0.01w,0.31h)); - label.urt("ratio_atom_bond = "&decimal(ratio_atom_bond), - (0.01w,0.28h)); - label.urt("ratio_bondgap_bond = "&decimal(ratio_bondgap_bond), - (0.01w,0.25h)); - label.urt("ratio_chain_ring = "&decimal(ratio_chain_ring), - (0.01w,0.22h)); - label.urt("sw_trimming = "&decimal(sw_trimming),(0.01w,0.13h)); - label.urt("mc1= "&mc1,(0.01w,0.09h)); - label.urt("mc2= "&mc2,(0.01w,0.06h)); - label.urt("mc3= "&mc3,(0.01w,0.03h)); -) -%*************************************************************************** -beginfont("EN:Ampicillin","MW:349.405", -": <45,?4,-3=?5,2:N,7:S,", -": 3^45:/*H,1://O^15,5:/*COOH^-18,6:??,", -": @4,*\^15,NH,!,//O,!,/*NH2,!,Ph" -) - fsize:=(72mm,85mm); - blength:=6mm; - if check(mc)=0: MCat(0.5,0.95)(scantokens(mc)) fi -endfont -%*************************************************************************** -beginfont("EN:Cholesterol","MW:386.65", - ": <30,?6,{-4,-2}=?6,-4=?5,7=dl, ", - ": 10:/*H^180,11:/*H^-60,17:/*H^-54, ", - ": 1:*/OH,{4,12}:*/_^60,@-1,18,/*_,-60,!3,?!") - fsize:=(72mm,85mm); - blength:=5.5mm; - if check(mc)=0: MCat(0.5,0.95)(scantokens(mc)) fi -endfont +endfigm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bye 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 4f08e5ee8cc..ace4ec61709 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 95598c2162c..426fcd12d90 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.01.02 +% Molecular Coding Format manual by Akira Yamaji 2022.01.16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage[pdftex]{graphicx} @@ -48,8 +48,6 @@ \end{picture}% }% %---------------------------------------------------------------------------- -\def\INFO#1{\@for\@temp:=#1\do{\tag@var\@temp}\put@char}% -%---------------------------------------------------------------------------- \begin{document} \title{\Huge\sf Molecular Coding Format manual} \author{Akira Yamaji} @@ -81,7 +79,7 @@ Molecular Coding Format(MCF) is new linear notation represent chemical structure diagrams. This Coding is named from programing technique such as operator, array, scope, macro, adressing, etc. -mcf2graph convert from MCF to pk font, PNG, SVG, EPS, MOL file. +mcf2graph convert from MCF to PNG, SVG, EPS, MOL file. It is also able to calculate molecular weight, exact mass, molecular formula. %----------------------------------------------------------------------------- @@ -675,29 +673,28 @@ MC(<30,?6,{4,6}:/iBuOH) \index{blue}% \index{green}% \begin{verbatim} -(use with metapost only) -beginfont() - MC(<30,Ph,{2,5}:N,3:/NH2,4:/COOH, - %--------------------- - 2:red, % red A2 - 5:blue, % blue A5 - 3=green % green B3 - %--------------------- +beginfigm() + MC( + <30,Ph,{2,5}:N,3:/NH2,4:/COOH, + %--------------------- + 2:red, % red A2 + 5:blue, % blue A5 + 3=green % green B3 + %--------------------- ) -endfont +endfigm \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- \subsubsection{Change font} \index{atomfont}% \begin{verbatim} -(use with metapost only) -beginfont() +beginfigm() %---------------- atomfont:="cmr8"; %---------------- MC(<30,Ph,{2,5}:N,3:/NH2,4:/COOH) -endfont +endfigm \end{verbatim} \MCFgraph %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -719,13 +716,13 @@ MCat(0.8,0.5)(Ph) \subsubsection{Bond length} \index{blength}% \begin{verbatim} -(fit to font size) +(fit to figure size) blength=0 ** default \end{verbatim} \MCFgraph %----------------------------------------- \begin{verbatim} -(ratio bond/font width) +(ratio bond/figure width) blength=0.1 ** (0<blength<=1) blength=60mm(width)*0.1=6mm \end{verbatim} @@ -775,17 +772,17 @@ mposition=(10mm,4mm) %------------------------------------------------------------------------------ \subsection{Size parameter} %----------------------------------------------------------------------------- -\subsubsection{Font size} +\subsubsection{Figure size} \index{fsize}% \begin{verbatim} -fsize=(font width,font height) +fsize=(figure width,figure height) ** default: (30mm,20mm) fsize=(40mm,15mm) \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- -\subsubsection{Font margin} +\subsubsection{Figure margin} \index{fmargin}% \begin{verbatim} fmargin=(margin left rigth,top bottom) @@ -867,7 +864,7 @@ default: ratio_wedge_bond=0.12 \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- -\subsubsection{Font atom gap/atom length} +\subsubsection{Figure atom gap/atom length} \index{ratio\_atomgap\_atom}% \begin{verbatim} default: ratio_atomgap_atom= 0.050 @@ -973,14 +970,14 @@ MCat(1, .5)(<30,Ph,4:/COOH,3:/NH2) %----------------------------------------------------------------------------- \subsection{Frame} %----------------------------------------------------------------------------- -\subsubsection{Font frame} +\subsubsection{Figure frame} \index{sw\_frame}% \index{Bothside}% \index{Inside}% \index{Outside}% \begin{verbatim} ** default:sw_frame=0 -(Draw font frame) +(Draw figure frame) fmargin:=(5mm,2mm); sw_frame=Outside \end{verbatim} @@ -1016,38 +1013,38 @@ MC(<30,COOH,!,COOH) %----------------------------------------------------------------------------- \subsection{Parameter setting} \subsubsection{Local parameter setting} -\index{beginfont()}% -\index{endfont}% +\index{beginfigm()}% +\index{endfigm}% \begin{verbatim} -beginfont() +beginfigm() MC(Ph) -endfont -beginfont() +endfigm +beginfigm() %-------------------------- ratio_thickness_bond:=0.05; %-------------------------- MC(Ph) -endfont -beginfont() +endfigm +beginfigm() MC(Ph) -endfont +endfigm \end{verbatim} \MCFgraph\MCFgraph\MCFgraph %----------------------------------------------------------------------------- \subsubsection{Global parameter setting} \begin{verbatim} -beginfont() +beginfigm() MC(Ph) -endfont +endfigm %-------------------------- ratio_thickness_bond:=0.05; %-------------------------- -beginfont() +beginfigm() MC(Ph) -endfont -beginfont() +endfigm +beginfigm() MC(Ph) -endfont +endfigm \end{verbatim} \MCFgraph\MCFgraph\MCFgraph %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1061,14 +1058,14 @@ endfont msize=(a,b) **default (1,1) mposition=(c,d) **default (0.5,0.5) -a: ratio molecular width/font width -b: ratio molecular hight/font hight +a: ratio molecular width/figure width +b: ratio molecular hight/figure hight c: x axis position d: y axis position -beginfont() +beginfigm() MC(<30,Ph,3:/F,4:/Cl) -endfont +endfigm \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- @@ -1107,18 +1104,18 @@ endfor \begin{verbatim} (immediately compile) -beginfont("EN:Pyridine") +beginfigm("EN:Pyridine") MC(<30,Ph,2:N) -endfont +endfigm (check mcf and compile) ** check(mc) : error count -beginfont("EN:Pyridine", +beginfigm("EN:Pyridine", ":<30,Ph,}2:N") % ** extra '}' if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm \end{verbatim} \MCFgraph\hspace{22mm}\MCFgraph @@ -1206,7 +1203,7 @@ lonepair r: ':' rotated r << : rotated a /* b : point b of a -beginfont("EN:add() 1") +beginfigm("EN:add() 1") fsize:=(70mm,40mm); sw_frame:=Bothside; max_blength:=10mm; @@ -1235,11 +1232,11 @@ beginfont("EN:add() 1") " l="&decimal(l), p0+(-9em,-3em)); ) -endfont +endfigm \end{verbatim} \MCFgraph \begin{verbatim} -beginfont("EN:add() 2") +beginfigm("EN:add() 2") fsize:=(60mm,20mm); msize:=(1,0.85); %--------------------------------------- @@ -1266,7 +1263,7 @@ beginfont("EN:add() 2") %--------------------------------------- ext(drawdblarrow (.4w,.4h)..(.55w,.4h);) %--------------------------------------- -endfont +endfigm \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- @@ -1281,12 +1278,12 @@ endfont \index{ratio\_thickness\_char}% \index{defaultscale}% \begin{verbatim} -(Extra label to font) +(Extra label to figure) -w: font width -h: font height -w0: font width-2xpart(fmargin) -h0: font height-2ypart(fmargin) +w: figure width +h: figure height +w0: figure width-2xpart(fmargin) +h0: figure height-2ypart(fmargin) aw: atom font size em: label font size p0: fmargin @@ -1299,7 +1296,7 @@ h[m]: molecular height ratio_thickness_char: pen thickness / char width %---------------------------------------- -beginfont() +beginfigm() fsize:=(70mm,30mm;); blength:=0.065; %--------------------------------------- @@ -1329,31 +1326,31 @@ beginfont() (.5w,h)); ) %--------------------------------------- -endfont +endfigm \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- \subsubsection{Local ext() setting} \begin{verbatim} -beginfont("EN:?3") +beginfigm("EN:?3") fsize:=(12mm,15mm); MCat(0.5,1)(<30,?3) -endfont -beginfont("EN:?4") +endfigm +beginfigm("EN:?4") fsize:=(12mm,15mm); MCat(0.5,1)(?4) %------------------------------- ext(label.top(inf_EN,(0.5w,0));) %------------------------------- -endfont -beginfont("EN:?5") +endfigm +beginfigm("EN:?5") fsize:=(12mm,15mm); MCat(0.5,1)(?5) -endfont -beginfont("EN:?5") +endfigm +beginfigm("EN:?5") fsize:=(12mm,15mm); MCat(0.5,1)(?6) -endfont +endfigm \end{verbatim} \MCFgraph\MCFgraph\MCFgraph\MCFgraph \subsubsection{Global ext() setting} @@ -1361,28 +1358,28 @@ endfont \begin{verbatim} ext_clear: reset global ext() -beginfont("EN:?3") +beginfigm("EN:?3") fsize:=(12mm,15mm); MCat(0.5,1)(<30,?3) -endfont +endfigm %------------------------------- ext(label.top(inf_EN,(0.5w,0));) %------------------------------- -beginfont("EN:?4") +beginfigm("EN:?4") fsize:=(12mm,15mm); MCat(0.5,1)(?4) -endfont -beginfont("EN:?5") +endfigm +beginfigm("EN:?5") fsize:=(12mm,15mm); MCat(0.5,1)(?5) -endfont +endfigm %--------- ext_clear; %--------- -beginfont("EN:?6") +beginfigm("EN:?6") fsize:=(12mm,15mm); MCat(0.5,1)(?6) -endfont +endfigm \end{verbatim} \MCFgraph\MCFgraph\MCFgraph\MCFgraph %----------------------------------------------------------------------------- @@ -1394,17 +1391,17 @@ endfont \index{check()}% \begin{verbatim} (use data base file 'mcf_data_base') -beginfont("f:mcf_data_base", +beginfigm("f:mcf_data_base", "t:EN","v:Luciferin") fsize:=(50mm,15mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- \subsection{Colchicine} \begin{verbatim} -beginfont("EN:Colchicine","MW:385.41", +beginfigm("EN:Colchicine","MW:385.41", %------------------------------------- ": <30,Ph,{1,2,6}:/O!,{-4,-5}=?7, ", ": {-1,-4,-6}=dl,-2://O,-3:/O!, ", @@ -1412,13 +1409,13 @@ beginfont("EN:Colchicine","MW:385.41", %------------------------------------- fsize:=(50mm,20mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- \subsection{Paclitaxel} \begin{verbatim} -beginfont("EN:Paclitaxel","MW:853.91", +beginfigm("EN:Paclitaxel","MW:853.91", %------------------------------------ ": ?6,5=dl,@3,#1,36,45,45,45,45,##, ", ": &5", ", @@ -1434,7 +1431,7 @@ beginfont("EN:Paclitaxel","MW:853.91", %------------------------------------ fsize:=(50mm,25mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- @@ -1446,7 +1443,7 @@ endfont arc_lb : arc left > bottom arc_br : arc bottom right -beginfont("EN:Maltose","MW:342.3", +beginfigm("EN:Maltose","MW:342.3", %----------------------------------------- ": #1.25,-30~wf_r,30~bd_r`1,30~wb_r, ", ": 120,O,30,&1,##, ", @@ -1460,7 +1457,7 @@ beginfont("EN:Maltose","MW:342.3", %----------------------------------------- fsize:=(50mm,20mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- @@ -1472,7 +1469,7 @@ endfont arc_lbr : arc left > bottom > right arc_ltr : arc left > top > right -beginfont("EN:Cellobiose","MW:342.3", +beginfigm("EN:Cellobiose","MW:342.3", %----------------------------------------- ": #1.25,-30~wf_r,30~bd_r`1,30~wb_r, ", ": 120,O,30,&1,##, ", @@ -1486,25 +1483,25 @@ beginfont("EN:Cellobiose","MW:342.3", %----------------------------------------- fsize:=(50mm,20mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm \end{verbatim} \MCFgraph %------------------------------------------------------------------------ \onecolumn \section{Example to use mcf2graph} -\subsection{Metafont/Metapost souce file} -\index{mcf2graph.mf}% +\subsection{MetaPost souce file} +\index{mcf2graph.mp}% \index{sw\_output}% \index{tag}% \index{var}% \begin{verbatim} %------------------------------------------------------------------------- -input mcf2graph.mf; > input main macro +input mcf2graph; > input main macro %------------------------------------------------------------------------- sw_output:=Info; % aux(information) file output on > global setting %%%% sw_output:=Report; > report output %%%% sw_output:=MOL2k; > MOL file output -fsize:=(60mm,40mm); % (font width,font height) > +fsize:=(60mm,40mm); % (figure width,figure height) > tag1:="J"; > jobname tag2:="C"; > char No tag3:="mw"; % calculated molecular weight > @@ -1512,13 +1509,13 @@ tag4:="fm"; % calculated molecular formula > outputformat:="png"; hppp:=vppp:=0.1; > PNG output outputtemplate:="%j-%3c.png"; > %------------------------------------------------------------------------- -beginfont("EN:Ampicillin","MW:349.405") > information +beginfigm("EN:Ampicillin","MW:349.405") > information MC(<45,?4,-3=?5,2:N,7:S, > immediately compile 3^45:/*H,1://O^15,5:/*COOH^-18,6:??, > @4,*\^15,NH,!,//O,!,/*NH2,!,Ph) > -endfont > +endfigm > %------------------------------------------------------------------------ -beginfont("EN:Cholesterol","MW:386.65", >information +beginfigm("EN:Cholesterol","MW:386.65", >information %---------------------------------------- > ": <30,?6,{-4,-2}=?6,-4=?5,7=dl, ", > mc1 ": 10:/*H^180,11:/*H^-60,17:/*H^-54, ", > mc2 @@ -1526,29 +1523,29 @@ beginfont("EN:Cholesterol","MW:386.65", >information ": @-1,18,/*_,-60,!3,?! ") > mc4 %---------------------------------------- > if check(mc)=0: MC(scantokens(mc)) fi > mc=mc1 - mc4 -endfont > +endfigm > %------------------------------------------------------------------------------ -beginfont("f:mcf_data_base.mcf","t:EN","v:Adenine") > from mcf_data_base.mcf +beginfigm("f:mcf_data_base.mcf","t:EN","v:Adenine") > from mcf_data_base.mcf if check(mc)=0: MC(scantokens(mc)) fi > select EN="Adenine" -endfont > +endfigm > %------------------------------------------------------------------------------ -beginfont("t:EN","v:Guanine") > select EN="Guanine" +beginfigm("t:EN","v:Guanine") > select EN="Guanine" if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm %------------------------------------------------------------------------------ -beginfont("t:EN","v:Cytosine") > select EN="Cytosine" +beginfigm("t:EN","v:Cytosine") > select EN="Cytosine" if check(mc)=0: MC(scantokens(mc)) fi > -endfont > +endfigm > %------------------------------------------------------------------------------ -beginfont("t:n","v+:4") > v+:4 = select No.4 +beginfigm("t:n","v+:4") > v+:4 = select No.4 if check(mc)=0: MC(scantokens(mc)) fi > keep file open -endfont > +endfigm > %------------------------------------------------------------------------------ forever: -%%%%%%%%%% beginfont("f:mcf_data_base","v+:*") > select all - beginfont("f:mcf_data_base","t:EXA","v+:1") > 'v+:1'= select EXA=1 +%%%%%%%%%% beginfigm("f:mcf_data_base","v+:*") > select all + beginfigm("f:mcf_data_base","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 - endfont > + endfigm > exitif f_EOF=1; > exit if file end endfor %------------------------------------------------------------------------------ @@ -1640,9 +1637,9 @@ query("s:EN", "Cat=biological","MW>=285","MW<=295"); %-------------------------------------------------------------- forever: - beginfont("f:temp","v+:*") % use file temp.mcf / select all + beginfigm("f:temp","v+:*") % use file temp.mcf / select all if f_EOF=0: if check(mc)=0: MC(scantokens(mc)) fi fi - endfont + endfigm exitif f_EOF=1; endfor %--------------------------------------------------------------- @@ -1677,7 +1674,7 @@ Cat:biological;EN:Piperine;MW:285.343;EXA:1 \noindent% \newpage \subsection{Information aux file output} -\paragraph{(Insert option parameter setting)} +\paragraph{(Option parameter setting)} \index{J}% \index{C}% \index{NO}% @@ -1696,12 +1693,8 @@ Cat:biological;EN:Piperine;MW:285.343;EXA:1 \index{Table}% \index{Temp}% \begin{verbatim} - sw_output:=Info; %% tag1:var1;tag2:var2 - sw_output:=Info+Table; %% tag1;tag2 var1;var2 - sw_output:=Info+Temp; %% tag1:var1;tag2:var2 / output 'temp-info.aux' - sw_output:=Info+Mcode; %% output jobname&'.aux' - sw_output:=Info+Mcode+Temp; %% output 'temp-info.aux','temp-mc.aux' - sw_output:=Font+Info+Temp; %% output font,'temp-info.aux','temp-mc.aux' + sw_output:=Info; %% tag1:var1;tag2:var2 + sw_output:=Info+Table; %% tag1;tag2 var1;var2 \end{verbatim} \paragraph{(Command line)} \begin{verbatim} @@ -1710,10 +1703,10 @@ Cat:biological;EN:Piperine;MW:285.343;EXA:1 \end{verbatim} \paragraph{(Sourse)} \begin{verbatim} -beginfont("EN:Ampicillin") .... endfont -beginfont("EN:Cholesterol") .... endfont -beginfont("EN:Limonin") .... endfont -beginfont("EN:beta-Carotene") .... endfont +beginfigm("EN:Ampicillin") .... endfigm +beginfigm("EN:Cholesterol") .... endfigm +beginfigm("EN:Limonin") .... endfigm +beginfigm("EN:beta-Carotene") .... endfigm \end{verbatim} \paragraph{(Setting)} \begin{verbatim} @@ -1755,96 +1748,26 @@ USE : the use mw : molecular weight calculated mi : monoisotopic mass calculated fm : molecular formula calculated -w : font width -h : font height -\end{verbatim} -%------------------------------------------------------------------------ -\noindent% -\newpage -\subsection{Metafont aux file output} -\index{Mfont}% -\paragraph{(Insert option parameter setting)} -\begin{verbatim} - sw_output:=Mfont; -\end{verbatim} -\paragraph{(Command line)} -\begin{verbatim} - >mpost -s ahlength=7 FILENAME (sw_output=Mfont) -\end{verbatim} -\paragraph{(Output)} -\begin{verbatim} -beginfont("Cat:biological","EN:Adenine","MW:135.13", -": <30,?6,3=?5,{1,3,5,9}=dl,{2,6,9}:N,5:/NH2,7:NH") -if check(mc)=0: MC(scantokens(mc)) fi -endfont -beginfont("Cat:biological","EN:Guanine","MW:151.13", -": <30,?6,3=?5,{1,3,9}=dl,{2,9}:N,{6,7}:NH,5://O,1:/NH2") -if check(mc)=0: MC(scantokens(mc)) fi -endfont -beginfont("Cat:biological","EN:Cytosine","MW:111.10", -": <30,?6,{4,6}=dl,4:N,3://O,2:NH,5:/NH2") -if check(mc)=0: MC(scantokens(mc)) fi -endfont -beginfont("Cat:biological","EN:Thymine","MW:126.11", -": <30,?6,3=dl,{2,6}:NH,{1,5}://O,4:/_") -if check(mc)=0: MC(scantokens(mc)) fi -endfont -beginfont("Cat:biological","EN:Adenine","MW:135.13", -": <30,?6,3=?5,{1,3,5,9}=dl,{2,6,9}:N,5:/NH2,7:NH") -if check(mc)=0: MC(scantokens(mc)) fi -endfont -beginfont("Cat:biological","EN:Guanine","MW:151.13", -": <30,?6,3=?5,{1,3,9}=dl,{2,9}:N,{6,7}:NH,5://O,1:/NH2") -if check(mc)=0: MC(scantokens(mc)) fi -endfont -beginfont("Cat:biological","EN:Cytosine","MW:111.10", -": <30,?6,{4,6}=dl,4:N,3://O,2:NH,5:/NH2") -if check(mc)=0: MC(scantokens(mc)) fi -endfont -beginfont("Cat:biological","EN:Thymine","MW:126.11", -": <30,?6,3=dl,{2,6}:NH,{1,5}://O,4:/_") -if check(mc)=0: MC(scantokens(mc)) fi -endfont -beginfont("Cat:biological","EN:Uracil","MW:112.09", -": <30,?6,6=dl,{3,5}://O,{2,4}:NH") -if check(mc)=0: MC(scantokens(mc)) fi -endfont -beginfont("Cat:biological","EN:Geraniol","MW:154.25", -": <30,!8,OH,{2,6}=dr,{2,6}:/_") -if check(mc)=0: MC(scantokens(mc)) fi -endfont -beginfont("Cat:biological","EN:Limonene","MW:136.24", -": <30,?6,2=dl,2:/_,@5,*\,/_,!!") -if check(mc)=0: MC(scantokens(mc)) fi -endfont -beginfont("Cat:biological","EN:l-Menthol","MW:156.27", -": <30,?6,2:/*?!,5:*/_,3:*/OH") -if check(mc)=0: MC(scantokens(mc)) fi -endfont +w : figure width +h : figure height \end{verbatim} %------------------------------------------------------------------------ \noindent% \newpage \subsection{MCF aux file output} -\paragraph{(Insert option parameter setting)} +\paragraph{(Option parameter setting)} \index{Mcode}% \index{Temp}% \begin{verbatim} -sw_output:=Mcode; %% output 'jobname-nnn-EN-mc.aux' -sw_output:=Mcode+Temp; %% output 'temp-mc.aux' -sw_output:=Info+Mcode; %% output 'jobname-data.aux' -sw_output:=Info+Mcode+Temp; %% output 'temp-info.aux','temp-mc.aux' -sw_output:=Font+Mcode+Temp; %% output font,'temp-mc.aux' -sw_output:=Font+Info+Mcode+Temp; %% output font,'temp-info.aux','temp-mc.aux' +sw_output:=Mcode; %% output 'temp-mc.aux' \end{verbatim} \paragraph{(Command line)} \begin{verbatim} - >mpost -s ahlength=8 FILENAME (sw_output=Info+Mcode) + >mpost -s ahlength=3 FILENAME (sw_output=Info+Mcode) \end{verbatim} -\paragraph{(Output temporary file)} +\paragraph{(Output mcf file)} \begin{verbatim} -sw_output=Mcode ** file name = 'jobname-nnn-EN-mc.aux' -sw_output=Mcode+Temp ** file name = 'temp-mc.aux' +sw_output=Mcode %% file name = 'temp-mc.aux' (result) <30,?6,3=?5,{1,3,5,9}=dl,{2,6,9}:N,5:/NH2,7:NH @@ -1852,7 +1775,7 @@ sw_output=Mcode+Temp ** file name = 'temp-mc.aux' \end{verbatim} \paragraph{(Output data-base file)} \begin{verbatim} -sw_output=Mcode+Info ** file name = 'jobname-data.aux' +sw_output=Info+Mcode %% file name = 'jobname-data.aux' (result) Cat:biological;EN:Adenine;MW:135.13;EXA:1 @@ -1862,20 +1785,14 @@ Cat:biological;EN:Adenine;MW:135.13;EXA:1 \end{verbatim} %------------------------------------------------------------------------ -\paragraph{(Lualatex example)} -%----------------------------------------------------------------------- -\begin{verbatim} -beginfont("t:EN","v:Adenine") - sw_output:=Mcode+Temp; -endfont -\end{verbatim} +\paragraph{(LuaLaTeX example)} %----------------------------------------------------------------------- \begin{verbatim} %----------------------------------------------------------------------- \begin{mplibcode} - beginfont("t:EN","v:Vancomycin") - sw_output:=Mcode+Temp; %%%% output temp-mc.aux %%%% - endfont; + beginfigm("t:EN","v:Vancomycin") + sw_output:=Mcode; %%%% output temp-mc.aux %%%% + endfigm; \end{mplibcode} %----------------------------------------------------------------------- \verbatiminput{temp-mc.aux} @@ -1895,16 +1812,15 @@ file name = 'temp-mc.aux' \newpage \noindent% \subsection{Report output} -\paragraph{(Insert option parameter setting)} +\paragraph{(Option parameter setting)} \index{sw\_output}% \index{Report}% \begin{verbatim} - sw_output:=Report; ** file name = 'jobname-report.aux' - sw_output:=Report+Temp; ** file name = 'temp-report.aux' + sw_output:=Report; %% file name = 'jobname-report.aux' \end{verbatim} \paragraph{(Command line)} \begin{verbatim} - >mpost -s ahlength=3 FILENAME + >mpost -s ahlength=7 FILENAME \end{verbatim} \paragraph{(Output)} \begin{verbatim} @@ -1959,7 +1875,7 @@ file name = 'temp-mc.aux' %------------------------------------------------------------------------ \noindent% \subsection{MOL file output} -\paragraph{(Insert option parameter setting)} +\paragraph{(Option parameter setting)} \index{sw\_output}% \index{MOL2k}% \index{MOL3k}% @@ -2013,7 +1929,7 @@ M END %---------------------------------------------------------------------------- \newpage \subsection{LuaTeX file example} -\index{Font}% +\index{Fig}% %############################################################################ \begin{verbatim} \documentclass{article} @@ -2024,8 +1940,8 @@ M END \mplibverbatim{enable}% \mplibnumbersystem{double}% \everymplib{% - if unknown Ph1: input mcf2graph.mf; fi - sw_output:=Font; max_blength:=4.5mm; + if unknown Ph1: input mcf2graph; fi + sw_output:=Fig; max_blength:=4.5mm; defaultfont:="uhvr8r"; defaultsize:=8bp; defaultscale:=1; }% \begin{document} @@ -2033,7 +1949,7 @@ M END %-------------------------------------------------------------------- \begin{mplibcode} fsize:=(50mm,50mm); - beginfont("NO:1","EN:Limonin","MW:470.51", + beginfigm("NO:1","EN:Limonin","MW:470.51", %---------------------------------------- ": <30,?6,{-3,-4}=?6, ", ": -5=?3,-2=wf,-1=wb,6=?5,-4=?6,-5=wf, ", @@ -2043,12 +1959,12 @@ M END ": @14,\*,|,?5,{1,4}=dl,3:O ") %---------------------------------------- if check(mc)=0: MC(scantokens(mc)) fi - endfont + endfigm \end{mplibcode}\\ %-------------------------------------------------------------------- \begin{mplibcode} fsize:=(80mm,50mm); - beginfont("NO:2","EN:beta-carotene","MW:536.87", + beginfigm("NO:2","EN:beta-carotene","MW:536.87", %------------------------------------------ ": <30,?6,3=dl,{3,5^35,5^-35}:/_, ", ": @4,\,|,!18,{1,3,5,7,9,11,13,15,17}=dr, ", @@ -2056,12 +1972,12 @@ M END ": |,?6,6=dl,{6,2^35,2^-35}:/_ ") %------------------------------------------ if check(mc)=0: MC(scantokens(mc)) fi - endfont + endfigm \end{mplibcode}\\ %-------------------------------------------------------------------- \begin{mplibcode} fsize:=(50mm,50mm); - beginfont("NO:3","EN:Gibberellin A3","MW:346.37", + beginfigm("NO:3","EN:Gibberellin A3","MW:346.37", %------------------------------------ ": <18,?5,3=?7,5=?6[12], ", ": @8,160`1.3,&3,13=dl,6=wf,8=wb, ", @@ -2070,49 +1986,13 @@ M END ": 14:*/_,{1^60,4^60}:*/H ") %------------------------------------ if check(mc)=0: MC(scantokens(mc)) fi -endfont; +endfigm; %-------------------------------------------------------------------- \end{mplibcode}\\ \end{document} \end{verbatim}% %############################################################################ %------------------------------------------------------------------------ -\newpage -\subsection{LaTeX file example} -%############################################################################ -\index{mcf\_setup.sty}% -\begin{verbatim} -%-------------------------------------------------------------------- -\documentclass[a4paper]{article} -\usepackage{graphicx} -\makeatletter% -%--------------------- -\usepackage{mcf_setup} -%--------------------- -\pagestyle{empty} -%-------------------------------------------------------------------- -\def\put@char{% - \begin{picture}(84,42)% - \put(0,38){\bf [\MOLnum]\EN{ }\small\tt/FM:\fm/MW:\mw}% - \put(10,0){\font\@strufont=\File\relax% - \hbox{\@strufont\char\Char}}% - \end{picture}% -}% -\def\INFO#1{\@for\@temp:=#1\do{\tag@var\@temp}\put@char}% -\makeatother -%-------------------------------------------------------------------- -\begin{document} -\unitlength=1mm% -\INFO{J:mcf_man_soc,C:141,NO:1,mw:349.40462,fm:C16H19N3O4S,EN:Ampicillin}% -\INFO{J:mcf_man_soc,C:142,NO:2,mw:386.6532,fm:C27H46O,EN:Cholesterol}% -\end{document} -%-------------------------------------------------------------------- -\end{verbatim}% -%############################################################################ -%------------------------------------------------------------------------ -\INFO{J:mcf_man_soc,C:141,NO:1,mw:349.40462,fm:C16H19N3O4S,EN:Ampicillin}% -\INFO{J:mcf_man_soc,C:142,NO:2,mw:386.6532,fm:C27H46O,EN:Cholesterol}% -%------------------------------------------------------------------------ \texttt{\printindex} %------------------------------------------------------------------------ \end{document} 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 6aa46dabdcd..9b273954bb1 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 de9633a4d01..60ec165ac8a 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex @@ -1,23 +1,23 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2022.01.02 +% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2022.01.17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% ** mcf2graph.mf must be version 4.77 +% ** mcf2graph.mp must be version 4.78 % ** use mcf_data_base.mcf \documentclass{article} %------------------------------------------------------------------------------ \usepackage{luamplib}% \usepackage[T1]{fontenc}% -\usepackage{textcomp,verbatim,mcf_setup}% +\usepackage{textcomp,verbatim}% \mplibcodeinherit{enable}% \mplibverbatim{enable}% \mplibnumbersystem{double}% +\mpliblegacybehavior{disabled}% \everymplib{% - if unknown Ph1: input mcf2graph.mf; fi + if unknown Ph1: input mcf2graph; fi outputformat:="eps"; - sw_output:=Font+Info+Temp; + sw_output:=Fig+Calc; tag1:="J"; tag2:="C"; tag3:="fm"; tag4:="mw"; tag5:="EN"; tag6:="MW"; max_blength:=4.5mm; - defaultfont:="uhvr8r"; defaultsize:=8bp; defaultscale:=1; }% @@ -43,98 +43,50 @@ {{\tt FM(fm) :} molecular formula (calculated) \\ {{\tt MW(mw) :} molecular weight (calculated) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\subsection{Chlorophyll a} -\noindent% -\begin{verbatim} -beginfont("f:mcf_data_base.mcf","t:EN","v:Chlorophyll a","NO:-", - ":,||,{4,11,17,23}:red,27:green") %%%% change color of atoms %%%% - fsize:=(100mm,45mm); - if check(mc)=0: MC(scantokens(mc)) fi - ext(defaultscale:=0.8; - label.lrt("fm: "&cal_FM,(0,h-5mm)); - label.lrt("mw: "&cal_MW,(0,h-9mm)); - label.lrt("MW: "&inf_MW,(0,h-13mm));) -endfont -\end{verbatim} -%------------------------------------------------------------------------------------ -\begin{mplibcode} -beginfont("f:mcf_data_base.mcf","t:EN","v:Chlorophyll a","NO:-", - ":,||,{4,11,17,23}:red,27:green") %%%% change color of atoms %%%% - fsize:=(100mm,45mm); - if check(mc)=0: MC(scantokens(mc)) fi - ext(defaultscale:=0.8; - label.lrt("fm: "&cal_FM,(0,h-5mm)); - label.lrt("mw: "&cal_MW,(0,h-9mm)); - label.lrt("MW: "&inf_MW,(0,h-13mm));) -endfont -\end{mplibcode} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\subsection{Dinophysistoxin-1} +\subsection{Erythromycin} \noindent% +%---------------------------------------------------------------------------- +( pass mcf to MC() ) \begin{verbatim} -beginfont("t:EN","v:Okadaic acid","EN:Dinophysistoxin-1", - "MW:819",":,38:*/_,65=red") %%%% add methyl group (color red) %%%% - fsize:=(150mm,35mm); - if check(mc)=0: MC(scantokens(mc)) fi +beginfigm("EN:Erythromycin","MW:733.93") + fsize:=(120mm,30mm); + MC( + <30,#1,<-120,60,60,60,-60,60,60,-60,60,60,60,-60,60,60,##,&1, + 14:O,13:/*Et,{1,9}://O,{2',4,6^-35,8,10',12^35}:/*_, + {6^35,11,12^-35}:*/OH, + @$3,\*,O,30~zb,|,?6`.7,6:O,#.5,{5~wf,3^35}:/_,4:/*OH,3^-35:/*O!,##, + @$5,\*^30`1.7,O,!~zb,|,?6`.7,6:O,#.5,5:/*_,2:*/OH,3:/*N?! + ) ext(defaultscale:=0.8; label.lrt("fm: "&cal_FM,(0,h-5mm)); label.lrt("mw: "&cal_MW,(0,h-9mm)); label.lrt("MW: "&inf_MW,(0,h-13mm));) -endfont; +endfigm; \end{verbatim} %---------------------------------------------------------------------------- \begin{mplibcode} -beginfont("t:EN","v:Okadaic acid","EN:Dinophysistoxin-1", - "MW:819",":,38:*/_,65=red") %%%% add methyl group (color red) %%%% - fsize:=(150mm,35mm); - if check(mc)=0: MC(scantokens(mc)) fi - ext(defaultscale:=0.8; - label.lrt("fm: "&cal_FM,(0,h-5mm)); - label.lrt("mw: "&cal_MW,(0,h-9mm)); - label.lrt("MW: "&inf_MW,(0,h-13mm));) -endfont; -\end{mplibcode} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newpage -\subsection{Erythromycin} -\noindent% -%---------------------------------------------------------------------------- -\begin{verbatim} -beginfont("EN:Erythromycin","MW:733.93", - %------------------------------------------------------------------------ - ": <30,#1,<-120,60,60,60,-60,60,60,-60,60,60,60,-60,60,60,##,&1, ", - ": 14:O,13:/*Et,{1,9}://O,{2',4,6^-35,8,10',12^35}:/*_, ", - ": {6^35,11,12^-35}:*/OH, ", - ": @$3,\*,O,30~zb,|,?6`.7,6:O,#.5,{5~wf,3^35}:/_,4:/*OH,3^-35:/*O!,##, ", - ": @$5,\*^30`1.7,O,!~zb,|,?6`.7,6:O,#.5,5:/*_,2:*/OH,3:/*N?! ") - %------------------------------------------------------------------------ +beginfigm("EN:Erythromycin","MW:733.93") fsize:=(120mm,30mm); - if check(mc)=0: MC(scantokens(mc)) fi -endfont; -\end{verbatim} -%---------------------------------------------------------------------------- -\begin{mplibcode} -beginfont("EN:Erythromycin","MW:733.93", - %------------------------------------------------------------------------ - ": <30,#1,<-120,60,60,60,-60,60,60,-60,60,60,60,-60,60,60,##,&1, ", - ": 14:O,13:/*Et,{1,9}://O,{2',4,6^-35,8,10',12^35}:/*_, ", - ": {6^35,11,12^-35}:*/OH, ", - ": @$3,\*,O,30~zb,|,?6`.7,6:O,#.5,{5~wf,3^35}:/_,4:/*OH,3^-35:/*O!,##, ", - ": @$5,\*^30`1.7,O,!~zb,|,?6`.7,6:O,#.5,5:/*_,2:*/OH,3:/*N?! ") - %------------------------------------------------------------------------ - fsize:=(120mm,30mm); - if check(mc)=0: MC(scantokens(mc)) fi + MC( + <30,#1,<-120,60,60,60,-60,60,60,-60,60,60,60,-60,60,60,##,&1, + 14:O,13:/*Et,{1,9}://O,{2',4,6^-35,8,10',12^35}:/*_, + {6^35,11,12^-35}:*/OH, + @$3,\*,O,30~zb,|,?6`.7,6:O,#.5,{5~wf,3^35}:/_,4:/*OH,3^-35:/*O!,##, + @$5,\*^30`1.7,O,!~zb,|,?6`.7,6:O,#.5,5:/*_,2:*/OH,3:/*N?! + ) ext(defaultscale:=0.8; label.lrt("fm: "&cal_FM,(0,h-5mm)); label.lrt("mw: "&cal_MW,(0,h-9mm)); - label.lrt("MW: "&inf_MW,(0,h-13mm));) -endfont; + label.lrt("MW: "&inf_MW,(0,h-13mm)); + ) +endfigm; \end{mplibcode} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Paclitaxel} \noindent% +( pass mcf to beginfigm() ) \begin{verbatim} -beginfont("EN:Paclitaxel","MW:853.918", +beginfigm("EN:Paclitaxel","MW:853.918", %--------------------------------------------------------------------- ": ?6,5=dl,@3,#1,36,45,45,45,45,##,&5,-4=?6,-4=?4,-1=wb,-3=wf,-1:O, ", ": 4:??,6:/_,{3^-60,15}:*/OH,8:/*H^-60,9:*/_^60,10://O, ", @@ -143,11 +95,11 @@ beginfont("EN:Paclitaxel","MW:853.918", %--------------------------------------------------------------------- fsize:=(120mm,30mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm \end{verbatim} %---------------------------------------------------------------------------- \begin{mplibcode} -beginfont("EN:Paclitaxel","MW:853.918", +beginfigm("EN:Paclitaxel","MW:853.918", %--------------------------------------------------------------------- ": ?6,5=dl,@3,#1,36,45,45,45,45,##,&5,-4=?6,-4=?4,-1=wb,-3=wf,-1:O, ", ": 4:??,6:/_,{3^-60,15}:*/OH,8:/*H^-60,9:*/_^60,10://O, ", @@ -160,83 +112,105 @@ beginfont("EN:Paclitaxel","MW:853.918", label.lrt("fm: "&cal_FM,(0,h-5mm)); label.lrt("mw: "&cal_MW,(0,h-9mm)); label.lrt("MW: "&inf_MW,(0,h-13mm));) -endfont +endfigm \end{mplibcode} %---------------------------------------------------------------------------- -\subsection{Kekulene} +\newpage +\subsection{Chlorophyll a} \noindent% +( read data-base file ) \begin{verbatim} -beginfont("EN:Kekulene","MW:600.7", - %------------------------------------------------------------------------------ - ": <30,?6,{3,-3,-2,-3,-2,-3,-2,-3,-2,-3,(-2',5'),(5',-4')}=?6, ", - ": {1,5',7,9,11,13,17,19,21,23,27,29,31,33,37,39,41,43,47,49,51,53,57,60}=dl ") - %------------------------------------------------------------------------------ - fsize:=(120mm,25mm); +beginfigm("f:mcf_data_base.mcf","t:EN","v:Chlorophyll a","NO:-") + sw_output:=Fig+Calc+Mcode; %%%% output temp-mc.aux %%%% + fsize:=(100mm,30mm); if check(mc)=0: MC(scantokens(mc)) fi -endfont +endfigm +\end{mplibcode} +\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%% \end{verbatim} -%---------------------------------------------------------------------------- +%------------------------------------------------------------------------------------ \begin{mplibcode} -beginfont("EN:Kekulene","MW:600.7", - ": <30,?6,{3,-3,-2,-3,-2,-3,-2,-3,-2,-3,(-2',5'),(5',-4')}=?6, ", - ": {1,5',7,9,11,13,17,19,21,23,27,29,31,33,37,39,41,43,47,49,51,53,57,60}=dl ") - fsize:=(120mm,25mm); +beginfigm("f:mcf_data_base.mcf","t:EN","v:Chlorophyll a","NO:-") + sw_output:=Fig+Calc+Mcode; fsize:=(100mm,30mm); if check(mc)=0: MC(scantokens(mc)) fi - ext(defaultscale:=0.8; - label.lrt("fm: "&cal_FM,(0,h-5mm)); - label.lrt("mw: "&cal_MW,(0,h-9mm)); - label.lrt("MW: "&inf_MW,(0,h-13mm));) -endfont +endfigm \end{mplibcode} +\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsection{Dinophysistoxin-1} +\noindent% +( read data-base 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) %%%% + sw_output:=Fig+Calc+Mcode; %%%% output temp-mc.aux %%%% + fsize:=(120mm,20mm); + if check(mc)=0: MC(scantokens(mc)) + VerbatimTeX("\gdef\EN{"&inf_EN&"}"); + VerbatimTeX("\gdef\MW{"&inf_MW&"}"); + VerbatimTeX("\gdef\mw{"&cal_MW&"}"); + VerbatimTeX("\gdef\fm{"&cal_FM&"}"); + fi +endfigm; +\end{mplibcode} +\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%% +{\tt ** EN:\EN \quad mw:\MW \quad MW:\mw \quad fm:\fm}% +\end{verbatim} +%---------------------------------------------------------------------------- +\begin{mplibcode} +beginfigm("t:EN","v:Okadaic acid","EN:Dinophysistoxin-1", + "MW:819",":,38:*/_,65=red") %%%% add methyl group (color red) %%%% + sw_output:=Fig+Calc+Mcode; %%%% output temp-mc.aux %%%% + fsize:=(120mm,20mm); + if check(mc)=0: MC(scantokens(mc)) + VerbatimTeX("\gdef\EN{"&inf_EN&"}"); + VerbatimTeX("\gdef\MW{"&inf_MW&"}"); + VerbatimTeX("\gdef\mw{"&cal_MW&"}"); + VerbatimTeX("\gdef\fm{"&cal_FM&"}"); + fi +endfigm; +\end{mplibcode} +\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%% +{\tt ** EN:\EN \quad mw:\MW \quad MW:\mw \quad fm:\fm}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newpage %---------------------------------------------------------------------------- \subsection{Maitotoxin} \noindent% +( read data-base file ) %-------------------------------------------------------------------------------- \begin{verbatim} %-------------------------------------------------------------------------------- \begin{mplibcode} - beginfont("t:EN","v:Maitotoxin") - sw_output:=Info+Mcode+Temp; %%%% output temp-info,temp-mc.aux %%%% - endfont; -\end{mplibcode} -\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%% -\begin{mplibcode} - beginfont("t:EN","v:Maitotoxin") + beginfigm("t:EN","v:Maitotoxin") + sw_output:=Fig+Calc+Mcode; %%%% output temp-mc.aux %%%% fsize:=(120mm,60mm); fmargin:=(0,3mm); sw_frame:=Outside; - if check(mc)=0: MC(scantokens(mc)) fi %%%% output font %%%% - endfont + if check(mc)=0: MC(scantokens(mc)) + VerbatimTeX("\gdef\EN{"&inf_EN&"}"); + VerbatimTeX("\gdef\MW{"&inf_MW&"}"); + VerbatimTeX("\gdef\mw{"&cal_MW&"}"); + VerbatimTeX("\gdef\fm{"&cal_FM&"}"); + fi + endfigm \end{mplibcode} -%-------------------------------------------------------------------------------- -\newread\auxfile% -\openin\auxfile=temp-info.aux %%%% input temp-info.aux %%%% -\read\auxfile to \info% -\infotovar{\info} %%%% info to variables %%%% -\closein\auxfile% +\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%% {\tt ** EN:\EN \quad mw:\MW \quad MW:\mw \quad fm:\fm}% %-------------------------------------------------------------------------------- \end{verbatim} %-------------------------------------------------------------------------------- \begin{mplibcode} - beginfont("t:EN","v:Maitotoxin") - sw_output:=Info+Mcode+Temp; %%%% output temp-info.aux %%%% - if check(mc)=0: MC(scantokens(mc)) fi - endfont -\end{mplibcode} -\begin{mplibcode} - beginfont("t:EN","v:Maitotoxin") + beginfigm("t:EN","v:Maitotoxin") + sw_output:=Fig+Calc+Mcode; fsize:=(120mm,60mm); fmargin:=(0,3mm); sw_frame:=Outside; - if check(mc)=0: MC(scantokens(mc)) fi %%%% output font %%%% - endfont + if check(mc)=0: MC(scantokens(mc)) + VerbatimTeX("\gdef\EN{"&inf_EN&"}"); + VerbatimTeX("\gdef\MW{"&inf_MW&"}"); + VerbatimTeX("\gdef\mw{"&cal_MW&"}"); + VerbatimTeX("\gdef\fm{"&cal_FM&"}"); + fi + endfigm \end{mplibcode} -%-------------------------------------------------------------------------------- -\newread\auxfile% -\openin\auxfile=temp-info.aux %%%% input temp-info.aux %%%% -\read\auxfile to \info% -\infotovar{\info} %%%% info to variables %%%% -\closein\auxfile% -\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%% +\verbatiminput{temp-mc.aux} {\tt ** EN:\EN \quad mw:\MW \quad MW:\mw \quad fm:\fm}% %-------------------------------------------------------------------------------- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -244,7 +218,7 @@ endfont \subsection{TCA cycle} \noindent% \begin{mplibcode} -beginfont("EN:TCA cycle") +beginfigm("EN:TCA cycle") fsize:=(160mm,75mm); max_blength:=5mm; %-------------------------------------------------------------------------------- @@ -306,11 +280,11 @@ r_arrow(10mm)( 0)(p10+( 1.1w10,0.3h10))("NAD+",1)("NADH2+",1.5); defaultscale:=1.5; label("TCA-cycle",(0.5w,0.5h)); ) -endfont +endfigm \end{mplibcode} %------------------------------------------------------------------------ \begin{verbatim} -beginfont("EN:TCA cycle") +beginfigmy"EN:TCA cycle") fsize:=(160mm,75mm); max_blength:=5mm; COOH:='(//O,!,OH); @@ -350,7 +324,7 @@ r_arrow(10mm)( 0)(p10+( 1.1w10,0.3h10))("NAD+",1)("NADH2+",1.5); defaultscale:=1.5; label("TCA-cycle",(0.5w,0.5h)); ) -endfont +endfigm \end{verbatim} %---------------------------------------------------------------------------- \end{document} diff --git a/Master/texmf-dist/tex/latex/mcf2graph/mcf_setup.sty b/Master/texmf-dist/tex/latex/mcf2graph/mcf_setup.sty deleted file mode 100644 index 2b05d871381..00000000000 --- a/Master/texmf-dist/tex/latex/mcf2graph/mcf_setup.sty +++ /dev/null @@ -1,90 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf_setup.sty for input aux file by Akira Yamaji 2021.09.20 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%------------------------------------ -\edef\@J{J} \edef\Job{}% 1 -\edef\@C{C} \edef\Char{}% 2 -%------------------------------------ -\edef\@NO{NO} \edef\NO{}% 3 -\edef\@EN{EN} \edef\EN{}% 4 -\edef\@JN{JN} \edef\JN{}% 5 -\edef\@CAS{CAS} \edef\CAS{}% 6 -%------------------------------------ -\edef\@MW{MW} \edef\MW{}% 7 -\edef\@mw{mw} \edef\mw{}% 8 -\edef\@MI{MI} \edef\MI{}% 9 -\edef\@mi{mi} \edef\mi{}% 10 -\edef\@FM{FM} \edef\FM{}% 11 -\edef\@fm{fm} \edef\fm{}% 12 -%------------------------------------ -\edef\@Wd{w} \edef\Wd{}% 13 -\edef\@Ht{h} \edef\Ht{}% 14 -\edef\@Wone{w1} \edef\Wone{}% 15 -\edef\@Hone{h1} \edef\Hone{}% 16 -%------------------------------------ -\edef\@Use{Use} \edef\Use{}% 17 -\edef\@LogP{LogP} \edef\LogP{}% 18 -%------------------------------------ -\edef\@EXA{EXA} \edef\EXA{}% 19 -\edef\@EXB{EXB} \edef\EXB{}% 20 -%------------------------------------ -\edef\@Cat{Cat} \edef\Cat{}% 21 -%--------------------------------------------------------------------------- -\edef\@pk{pk}% -\edef\@mps{mps}% -\edef\@eps{eps}% -\edef\@png{png}% -\edef\@png{svg}% -%--------------------------------------------------------------------------- -\def\@tag@param#1:#2;{#1}% -\def\@var@param#1:#2;{#2}% -%---------------------------------------- -\def\tag@var#1{% -\if#1\empty\relax\else% - \edef\@tag{\expandafter\@tag@param#1;}% - \edef\@var{\expandafter\@var@param#1;}% - %---------------------------------------- - \ifx\@tag\@J\edef\Job{\@var}\fi% 1 - %---------------------------------------- - \ifx\@tag\@C\edef\Char{\@var}\fi% 2 - %---------------------------------------- - \ifx\@tag\@NO\edef\NO{\@var}\fi% 3 - \ifx\@tag\@EN\edef\EN{\@var}\fi% 4 - \ifx\@tag\@JN\edef\JN{\@var}\fi% 5 - \ifx\@tag\@CAS\edef\CAS{\@var}\fi% 6 - %---------------------------------------- - \ifx\@tag\@MW\edef\MW{\@var}\fi% 7 - \ifx\@tag\@mw\edef\mw{\@var}\fi% 8 - \ifx\@tag\@MI\edef\MI{\@var}\fi% 9 - \ifx\@tag\@mi\edef\mi{\@var}\fi% 10 - \ifx\@tag\@FM\edef\FM{\@var}\fi% 11 - \ifx\@tag\@fm\edef\fm{\@var}\fi% 12 - %---------------------------------------- - \ifx\@tag\@Wd\edef\Wd{\@var}\fi% 13 - \ifx\@tag\@Ht\edef\Ht{\@var}\fi% 14 - \ifx\@tag\@Wone\edef\Wone{\@var}\fi% 15 - \ifx\@tag\@Hone\edef\Hone{\@var}\fi% 16 - %---------------------------------------- - \ifx\@tag\@Use\edef\Use{\@var}\fi% 17 - \ifx\@tag\@LogP\edef\LogP{\@var}\fi% 18 - %---------------------------------------- - \ifx\@tag\@EXA\edef\EXA{\@var}\fi% 19 - \ifx\@tag\@EXB\edef\EXB{\@var}\fi% 20 - %---------------------------------------- - \ifx\@tag\@Cat\edef\Cat{\@var}\fi% 21 -\fi% -}% -%----------------------------------------------------------------------------- -\def\z@num#1{\ifnum#1<10 00\the#1\else\ifnum#1<100 0\the#1\else \the#1\fi\fi}% -%----------------------------------------------------------------------------- -\def\infotovar#1{\@sfor#1{\tag@var\@list}}% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% sfor : modified latex2e kernel program control -% @for => @sfor delimiter ',' => ';' -%----------------------------------------------------------------------------- -\def\@sfor#1#2{\expandafter\def\expandafter\@tmp\expandafter{#1}% - \ifx\@tmp\@empty\else\expandafter\@rep#1;\@nil;\@@\@list{#2}\fi}% -%------------------------------------------------------------------ -\def\@rep#1;#2\@@#3#4{\def#3{#1}\ifx#3\@nnil% - \expandafter\@fornoop\else#4\relax\expandafter\@rep\fi#2\@@#3{#4}}% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |