diff options
author | Norbert Preining <norbert@preining.info> | 2020-08-31 03:02:58 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-08-31 03:02:58 +0000 |
commit | 568fe838cef40f671837d9348dd73c93d9ea962b (patch) | |
tree | ba2b2c6ab585927a89adae8c1cc2a594010ab933 /graphics | |
parent | c6a1b1f6422e10f363a9de80c4f103f0c155d8bb (diff) |
CTAN sync 202008310302
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/mcf2graph/CHANGELOG | 6 | ||||
-rw-r--r-- | graphics/mcf2graph/README | 2 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf2graph.mf | 105 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_exa_soc.mf | 6 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_example.pdf | bin | 306240 -> 306332 bytes | |||
-rw-r--r-- | graphics/mcf2graph/mcf_example.tex | 38 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_man_soc.mf | 31 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_manual.pdf | bin | 576529 -> 575278 bytes | |||
-rw-r--r-- | graphics/mcf2graph/mcf_manual.tex | 48 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_mplib_exa.pdf | bin | 201822 -> 201949 bytes | |||
-rw-r--r-- | graphics/mcf2graph/mcf_mplib_exa.tex | 4 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_setup.sty | 12 |
12 files changed, 149 insertions, 103 deletions
diff --git a/graphics/mcf2graph/CHANGELOG b/graphics/mcf2graph/CHANGELOG index e314506053..b3bcfd022e 100644 --- a/graphics/mcf2graph/CHANGELOG +++ b/graphics/mcf2graph/CHANGELOG @@ -1,6 +1,10 @@ ******************************************************************************* - Changelog of mcf2graph software package by Akira Yamaji 2020-08-10 + Changelog of mcf2graph software package by Akira Yamaji 2020-08-30 ******************************************************************************* +[ver. 4.52 / 2020-08-30] + -improve aux file output,input + -update MCF manual,example + [ver. 4.51 / 2020-08-10] -improve aux file output,input -add style file mcf_setup.sty diff --git a/graphics/mcf2graph/README b/graphics/mcf2graph/README index 016dcd6c04..7f830cef14 100644 --- a/graphics/mcf2graph/README +++ b/graphics/mcf2graph/README @@ -1,7 +1,7 @@ ******************************************************************************** mcf2graph : Convert Molecular Coding Format to graphics with METAFONT/METAPOST Author : Akira Yamaji - version : 4.51 2020-08-10 + version : 4.52 2020-08-30 E-mail : mcf2graph@gmail.com Located at : http://www.ctan.org/pkg/mcf2graph ******************************************************************************** diff --git a/graphics/mcf2graph/mcf2graph.mf b/graphics/mcf2graph/mcf2graph.mf index 6011d247e6..e28af21d62 100644 --- a/graphics/mcf2graph/mcf2graph.mf +++ b/graphics/mcf2graph/mcf2graph.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 4.51 Copyright (c) 2013-2020 Akira Yamaji +% mcf2graph ver 4.52 Copyright (c) 2013-2020 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, @@ -42,7 +42,7 @@ newinternal com,par,nA,nB,nC,nD,nE,nF,nP; numeric save_num[],comD[][],parD[][],adrD[][],cntD[],tbl_atom[],tbl_group[][],f_char[], tbl_atom_wt[],tbl_atom_mi[],tbl_char_wd[],tbl_char_ht[],andA[],and_rot[],chargeA[], com_group[][],par_group[][],cnt_group[],colorA[],colorB[]; -string save_str[],tbl_atom_str[],strD[],var[],tag[],mpc_name[],out_file_name,out_file_aux, +string save_str[],tbl_atom_str[],strD[],tag[],mpc_name[],out_file_name,out_file_aux, out_file_rep,out_file_mpc,aux_delimiter,atomfont,save_atomfont,save_defaultfont; pair save_pair[],msize,mposition,fsize,fmargin,save_mposition,posBs,posBe; picture mol_stru[],save_picture,temp_picture; @@ -55,7 +55,7 @@ numberA_start:=numberB_start:=1; numberA_end:=numberB_end:=4095; %------------------------------------------------------------------------------------------------- aux_max:=max_inf_num:=20; aux_delimiter:=";"; -for i=1 upto aux_max: var[i]:=tag[i]:=""; endfor +for i=1 upto aux_max: tag[i]:=""; endfor %================================================================================================= if (known green)and(known ahlength): f_MP:=1; @@ -126,7 +126,7 @@ fi clearit; %-------------------------------------------------------------------------------------------------- message "---------------------------------------------"; -message "This is mcf2graph ver 4.51 2020.08"; +message "This is mcf2graph ver 4.52 2020.08"; if f_MP=1: if bboxmargin=0: message "output no image file"; elseif bboxmargin=1: message "output first font only"; @@ -254,7 +254,7 @@ def beginfont(text s)= def ext=ext_to_font enddef; def add=add_to_molecule enddef; %------------------------------------------------------------------------------------------------ - inf_NO:=inf_EN:=inf_JN:=inf_MW:=inf_FM:=inf_CAS:=inf_USE:=inf_EXA:=inf_EXB:=""; + inf_NO:=inf_EN:=inf_JN:=inf_MW:=inf_FM:=inf_CAS:=inf_USE:=inf_EXA:=inf_EXB:="-"; cal_MW:=cal_MW_str:=cal_MI:=cal_MI_str:=cal_FM:=""; %------------------------------------------------------------------------------------------------ char_num:=char_num+1; @@ -299,7 +299,7 @@ def endfont= fi if (sw_fframe=1)or(sw_fframe=3): ext(draw_frame((0,0),w,h,thickness_fframe);) fi if (sw_fframe=2)or(sw_fframe=3): ext(draw_frame(p0,w0,h0,thickness_fframe);) fi - if sw_fframe=4: ext(drawdot(0,0); drawdot(w,0); drawdot(w,h); drawdot(0,h);) fi + if sw_fframe=4: ext(draw_corner((0,0),w,h,0.2bp);) fi for i=1 upto cntM: addto currentpicture also mol_stru[i] shifted posM[0][i]; mol_stru[i]:=nullpicture; if sw_mframe=1: ext(draw_frame(p[i],w[i],h[i],thickness_mframe)) fi @@ -909,6 +909,13 @@ def draw_frame(expr PS,LX,LY,PN)= draw ((0,0)--(LX,0)--(LX,LY)--(0,LY)--cycle) shifted PS withpen pensquare scaled PN; enddef; %------------------------------------------------------------------------------------------------- +def draw_corner(expr PS,LX,LY,PN)= + draw( 0, 0) shifted PS withpen pencircle scaled PN; + draw(LX, 0) shifted PS withpen pencircle scaled PN; + draw(LX,LY) shifted PS withpen pencircle scaled PN; + draw( 0,LY) shifted PS withpen pencircle scaled 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; @@ -1105,13 +1112,13 @@ def termA= f_term:=1; fi enddef; -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- def termB= if f_term=0: if f_bra=0: cntA:=cntA+1; angX[cntA]:=angT mod 360; else:f_bra:=0; fi f_term:=1; fi enddef; -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- def proc_cyc(expr n)= add_bond(angle(posA[n]-posBs)-angT); enddef; -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- vardef glu_atom(expr NUM)= if numS[NUM]<>0: nE:=angT mod 90; nF:=0.5atom_wd;(iif(nE<45,sind(nE),cosd(nE))*nF)++nF else: 0 fi enddef; @@ -1278,7 +1285,7 @@ COMe:=CO!:='(//O,!); COEt:=CO!2:='(//O,!,!); COPr:=CO!3:='(//O,!,!,!); OCOMe:=OCO!:='(O,!,//O,!); NMeMe:=NMe!:='(N!,!); NMeEt:=NMe!2:='(N!,!,!); NMePr:=NMe!3:='(N!,!,!,!); NHCOMe:=NHCO!:='(NH,!,//O,!); NHiPr:=NHMe!:='(NH,!,iPr); NHtBu:='(NH,!,tBu); NHMe:=NH!:='(NH,!); NHEt:=NH!2:='(NH,!,!); NHPr:=NH!3:='(NH,!,!,!); -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- !OH:='(!,OH); !SH:='(!,SH); !NH2:='(!,NH2); !COMe:=!CO!:='(!,//O,!); !COEt:=!CO!2:='(!,CO!2); !COPr:=!CO!3:='(!,CO!3); !OMe:=!O!:='(!,O!); !OEt:=!O!2:='(!,O!2); !OPr:=!O!3:='(!,O!3); !OiPr:=!OMe!:='(!,OMe!); @@ -1290,29 +1297,29 @@ NHEt:=NH!2:='(NH,!,!); NHPr:=NH!3:='(NH,!,!,!); !CH3:='(!,CH3); !CN:='(!,CN); !iPr:=!Me!:='(!,iPr); !tBu:='(!,tBu); !CHO:='(!,CHO); !NO2:='(!,NO2); !Cl:='(!,Cl); !Br:='(!,Br); !F:='(!,F); !?3:='(!,?3); !?4:='(!,?4); !?5:='(!,?5); !?6:='(!,?6); !?7:='(!,?7); !?8:='(!,?8); !Ph:='(!,Ph); -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- !2OH:='(!,!,OH); !2COOH:='(!,!,COOH); !2NH2:='(!,!,NH2); !2CN:='(!,!,CN); !2NO2:='(!,!,NO2); !2CH3:='(!,!,CH3); !2CHO:='(!,!,CHO); !2SH:='(!,!SH); !2tBu:='(!,!,tBu); !2Cl:='(!,!,Cl); !2?5:='(!,!,?5); !2?6:='(!,!,?6); !2Ph:='(!,!,Ph); -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- CF2:='(/F,60,F); CCl2:='(/Cl,60,Cl); CBr2:='(/Br,60,Br); CF3:='(/F,/F^60,60,F); CCl3:='(/Cl,/Cl^60,60,Cl); CBr3:='(/Br,/Br^60,60,Br); -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- xCH3:='(/H,/H^60,60,H); xNH:='(N,/H); xNH2:='(N,/H,60,H); xNO2:='(N,//O,60~dm,O); xOH:='(O,!,H); xCHO:='(//O,!,H); xCOOH:='(//O,!,O,!,H); xCN:='(!~tm,N); xSH:='(S,!,H); -%================================================================================================== +%================================================================================================= init_par(parameter_list); -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- parts_emb_end:=parts_usr; %%%%% message "parts_emb =" & decimal(parts_emb_start) &" => " & decimal(parts_emb_end); -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- def expand_set= CH3:=xCH3; NH:=xNH; NH2:=xNH2; NO2:=xNO2; OH:=xOH; CHO:=xCHO; COOH:=xCOOH; CN:=xCN; SH:=xSH; !CH3:='(!,CH3); !OH:='(!,OH); !NH2:='(!,NH2); !CHO:='(!,CHO); !COOH:='(!,COOH); !CN:='(!,CN); !SH:='(!,SH); !NO2:='(!,NO2); !2CH3:='(!,!CH3); !2OH:='(!,!OH); !2NH2:='(!,!NH2); !2CHO:='(!,!CHO); !2COOH:='(!,!COOH); !2CN:='(!,!CN); !2SH:='(!,!SH); !2NO2:='(!,!NO2); enddef; -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def char_size_set(expr WD)(expr HT)(expr STR)= for j=0 upto length(STR)-1: nA:=ASCII(pic_c(j,STR)); tbl_char_wd[nA]:=WD; tbl_char_ht[nA]:=HT; @@ -1334,7 +1341,7 @@ char_size_set(.35)( .9)("i"); char_size_set( .5)( .9)("j"); char_size_set(.35)( 1)("!|"); char_size_set( .4)( 1)(".,:;'`^"); -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def draw_char(expr CHR,POS,WD,PEN,NUM)= begingroup save Z,aW,aH,fW,fH,hW,hW,hH,fP,hP,zO,zOh,pos,dw,dwh,dwv,cdw,ppcs,sbp,sC; @@ -1470,28 +1477,28 @@ else: fi endgroup enddef; -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def blank_str:= " " enddef; vardef fixed_r(expr n)(expr s)= (substring(0,n-length(s)) of blank_str)&s enddef; vardef fixed_l(expr n)(expr s)= s&(substring(0,n-length(s)) of blank_str) enddef; vardef fdr(expr n)(expr s)=fixed_r(n)(decimal(s)) enddef; vardef fdl(expr n)(expr s)=fixed_l(n)(decimal(s)) enddef; def warning(expr s)= message "% "&decimal(char_num)&fdr(3)(incr warning_cnt)&")"&s; enddef; -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- def bond_check(expr a)(text s)= nF:=0; for list=s: if list=bond_cnt: nF:=1; fi endfor if nF=0: warning("A"&decimal(a)&" ( "&fixed_l(8)(strD[numS[a]])&") has"&fdr(2)(bond_cnt)&" bonds"); fi enddef; -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- vardef stripP(expr ATOM)= if length(ATOM)=4: substring (1,3) of ATOM elseif length(ATOM)=6: substring (1,2) of ATOM else: ATOM fi enddef; -%================================================================================================== +%================================================================================================= def STa(expr ATOM,WT,MI)= tbl_cnt:=tbl_cnt+1; tbl_atom_str[tbl_cnt]:=ATOM; @@ -1511,7 +1518,7 @@ def STb(expr ATOM)(text TXT)= endfor endfor enddef; -%================================================================================================== +%================================================================================================= tbl_cnt:=0; STa("C" ,12.0107, 12.0000000); STa("H" , 1.00794, 1.00782503223); STa("{Al}",26.9815, 26.98153853); STa("{As}",74.9216, 74.92159457); @@ -1533,12 +1540,12 @@ STa("{S^m^}",32.065, 31.9720711744); STa("{Se}",78.971, 79.9165218); STa("{Si}",28.0855, 27.97692653465); STa("{Sn}",118.71, 119.90220163); STa("{Ti}",47.867, 47.94794198); STa("{Zn}",65.409, 63.92914201); -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- STb("{H_2_}")("H","H"); STb("OH")("O","H"); STb("O{Na}")("O","{Na}"); STb("CN")("C","N"); STb("SH")("S","H"); STb("CHO")("C","H","O"); STb("N{O_2_}")("N","O","O"); STb("N{H_2_}")("N","H","H"); STb("S{O_3_}")("S","O","O","O"); STb("COOH")("C","O","O","H"); STb("C{H_3_}")("C","H","H","H"); STb("C{F_3_}")("C","F","F","F"); -%================================================================================================== +%================================================================================================= def proc_calc= begingroup save warning_cnt,MWp,knownA,bondC,tmp_wtp,bond_cnt,cnt_hide_H; @@ -1602,7 +1609,7 @@ def proc_calc= if sw_mol_out>=1: proc_mol_out; fi endgroup enddef; -%================================================================================================== +%================================================================================================= def proc_auxfile_out= message "["&decimal(char_num)&"]:"&inf_EN; out_file_name:=out_file_aux; @@ -1613,29 +1620,39 @@ def proc_auxfile_out= %-------------------------------------------------------------------------------------- for i=1 upto aux_max: exitif tag[i]=""; if i=1: printf "" else: &aux_delimiter fi - if sw_aux_out=1: &tag[i]&":" fi - if tag[i]="F": & jobname - elseif tag[i]="C": & decimal(char_num) - elseif tag[i]="mw": & cal_MW - elseif tag[i]="fm": & cal_FM - elseif tag[i]="mi": & cal_MI - elseif tag[i]="w": & decimal(xpart(fsize)) - elseif tag[i]="h": & decimal(ypart(fsize)) - elseif tag[i]="w1": & decimal(mol_wd) - elseif tag[i]="h1": & decimal(mol_ht) - elseif tag[i]="An": & decimal(cntA) - elseif tag[i]="Bn": & decimal(cntB) - else: + if (sw_aux_out=1)or(sw_aux_out=3): &tag[i]&":" fi + if tag[i]="F": & jobname + elseif tag[i]="C": & decimal(char_num) + elseif tag[i]="mw": & cal_MW + elseif tag[i]="fm": & cal_FM + elseif tag[i]="mi": & cal_MI + elseif tag[i]="w": & decimal(xpart(fsize)) + elseif tag[i]="h": & decimal(ypart(fsize)) + elseif tag[i]="w1": & decimal(mol_wd) + elseif tag[i]="h1": & decimal(mol_ht) + elseif tag[i]="An": & decimal(cntA) + elseif tag[i]="Bn": & decimal(cntB) + %------------------------------------------- + elseif tag[i]="NO": & inf_NO + elseif tag[i]="EN": & inf_EN + elseif tag[i]="JN": & inf_JN + elseif tag[i]="MW": & inf_MW + elseif tag[i]="MI": & inf_MI + elseif tag[i]="FM": & inf_FM + elseif tag[i]="CAS": & inf_CAS + elseif tag[i]="USE": & inf_USE + elseif tag[i]="EXA": & inf_EXA + elseif tag[i]="EXB": & inf_EXB fi endfor - if (sw_aux_out=1)or(sw_aux_out=3): for i=1 upto inf_num: &aux_delimiter&info[i] endfor; fi + if sw_aux_out=3: for i=1 upto inf_num: &aux_delimiter&info[i] endfor; fi enddef; -%================================================================================================== +%================================================================================================= vardef round_auto(expr n)= if (n<4) and(n>-4): round(n*1000)/1000 elseif (n<40) and(n>-40): round(n*100)/100 elseif (n<400)and(n>-400): round(n*10)/10 else: round(n) fi enddef; -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- def proc_report_out= message "["&decimal(char_num)&"]:"&inf_EN; out_file_name:=out_file_rep; @@ -1693,7 +1710,7 @@ def proc_report_out= if inf_FM<>"": &inf_FM&" / "& iif(inf_FM=cal_FM,"MACTCH","NOT MACTCH") fi; printf "=================================================================="; enddef; -%================================================================================================== +%================================================================================================= def proc_mol_out= begingroup save chg_cnt,chg_atm,chg_chg,nA,nB; @@ -1765,4 +1782,4 @@ def proc_bond_class(expr n)= else: nA:=1; nB:=0; fi enddef; -%-------------------------------------------------------------------------------------------------- +%------------------------------------------------------------------------------------------------- diff --git a/graphics/mcf2graph/mcf_exa_soc.mf b/graphics/mcf2graph/mcf_exa_soc.mf index f2a973c7cf..8cbd78defe 100644 --- a/graphics/mcf2graph/mcf_exa_soc.mf +++ b/graphics/mcf2graph/mcf_exa_soc.mf @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2020.08.10 +% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2020.08.30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -input mcf2graph.mf; %%% it must be version 4.51 or later +input mcf2graph.mf; %%% it must be version 4.52 or later %------------------------------------------------------------------------- fsize:=(33mm,24mm); max_blength:=4.5mm; @@ -11,7 +11,7 @@ max_blength:=4.5mm; %%%%sw_aframe:=1; %%%%sw_mframe:=1; %%%%sw_expand:=1; -tag1:="F"; tag2:="C"; tag3:="fm"; tag4:="mw"; +tag1:="F"; tag2:="C"; tag3:="fm"; tag4:="mw"; tag5:="EN"; tag6:="MW"; %%%%tag5:="mi"; %%%%tag6:="w1"; %%%%tag7:="h1"; diff --git a/graphics/mcf2graph/mcf_example.pdf b/graphics/mcf2graph/mcf_example.pdf Binary files differindex 709aff0809..b412a69a43 100644 --- a/graphics/mcf2graph/mcf_example.pdf +++ b/graphics/mcf2graph/mcf_example.pdf diff --git a/graphics/mcf2graph/mcf_example.tex b/graphics/mcf2graph/mcf_example.tex index fcbacc1ec8..784d2d61a2 100644 --- a/graphics/mcf2graph/mcf_example.tex +++ b/graphics/mcf2graph/mcf_example.tex @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2020.08.10 +% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2020.08.30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage{graphicx} @@ -13,19 +13,24 @@ \textheight=280mm \parindent=0mm \setlength\columnsep{8mm} -%------------------------------------------------------------------------------- +%----------------------------------------------------------------------------- \makeatletter% -\newbox \@stringbox% -\newcount \fontnum% +\newbox \f@box% +\newcount \f@num% \newcount \tnum% \tnum=0% \font\labelM=cmtt8 at 6pt\relax% -%------------------------------------------------------------------------------- +%----------------------------------------------------------------------------- \newif\ifCONT@% \newread\@auxf% %------------------------------------------------------------------------ -\fontnum=1% +\f@num=1% \unitlength=0.01mm% +%------------------------------------------------------------------------ +\edef\jobname{mcf_exa_soc}% +\edef\f@ext{pk}% +%%%%\edef\f@ext{mps}% +%%%%\edef\f@ext{png}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{center} @@ -37,24 +42,30 @@ ** MW:Molecular weight calculated by mcf2graph}\vspace{3mm}\\ %------------------------------------------------------------------------ \noindent% -\openin\@auxf=mcf_exa_soc-info.aux% +\openin\@auxf=\jobname-info.aux% \CONT@true% \loop% \read\@auxf to \@info% \ifeof\@auxf\CONT@false\else\@sfor\@info{\tag@var\@list}% %------------------------------------------------------------ \begin{picture}(3750,3300)% - \put(20,3000){\footnotesize\bf \the\fontnum:\EN}% + \put(20,3000){\footnotesize\bf \the\f@num:\EN}% \put(20,2750){\labelM MW:\mw { / }FM:\fm}% \put(20,2530){\labelM MW:\MW(data)}% \put( 0,0){% \makebox(3750,2530){% - \font\@strufont=\File\relax\hbox{\@strufont\char\Char}% + \ifx\f@ext\@pk{\font\@font=\jobname\@font\char\f@num}% + \else% + \edef\f@file{\jobname-\z@num\f@num.\f@ext}% + \setbox\f@box=\hbox{\font\@font=\jobname\@font\char\f@num}% + \includegraphics[width=\wd\f@box,height=\ht\f@box]{\f@file}% +%%%% \includegraphics{\f@file}% + \fi% }% }% \end{picture}% %------------------------------------------------------------ - \advance\fontnum1\relax% + \advance\f@num1\relax% \advance\tnum1\relax% \ifnum\tnum=5 \\ \tnum=0 \fi% \fi% @@ -63,3 +74,10 @@ %------------------------------------------------------------------------ \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +tnum=5 \\ \tnum=0 \fi% +\fi% +\ifCONT@ \repeat% +\closein\@auxf% +%------------------------------------------------------------------------ +\end{document} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/graphics/mcf2graph/mcf_man_soc.mf b/graphics/mcf2graph/mcf_man_soc.mf index e2ff60943e..ea8912bda7 100644 --- a/graphics/mcf2graph/mcf_man_soc.mf +++ b/graphics/mcf2graph/mcf_man_soc.mf @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2020.08.10 +% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2020.08.30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -input mcf2graph.mf; %% it must be version 4.51 or later +input mcf2graph.mf; %% it must be version 4.52 or later %------------------------------------------------------------------------ sw_mframe:=0; sw_expand:=0; @@ -869,48 +869,55 @@ beginfont("EN:Switwch Expand") endfont %*********************************************************************** beginfont("EN:Switwch group off") - fsize:=(60mm,15mm); + fsize:=(60mm,12mm); MCat(.15, .5)(<30,Ph,4:/Cl,3:/F) sw_group_off:=1; MCat(.85, .5)(<30,Ph,4:/Cl,3:/F) endfont %*********************************************************************** beginfont("EN:Switwch bondtype off") - fsize:=(60mm,15mm); + fsize:=(60mm,12mm); MCat(.15, .5)(<30,Ph,4:/Cl,3:/F) sw_single:=1; MCat(.85, .5)(<30,Ph,4:/Cl,3:/F) endfont %*********************************************************************** beginfont("EN:Switwch font frame 1") - fsize:=(40mm,12mm); - fmargin:=(5mm,2mm); + fsize:=(40mm,10mm); + fmargin:=(5mm,1.5mm); sw_fframe:=1; MC(<30,Ph) endfont beginfont("EN:Switwch font frame 2") - fsize:=(40mm,12mm); - fmargin:=(5mm,2mm); + fsize:=(40mm,10mm); + fmargin:=(5mm,1.5mm); sw_fframe:=2; MC(<30,Ph) endfont beginfont("EN:Switwch font frame 3") - fsize:=(40mm,12mm); - fmargin:=(5mm,2mm); + fsize:=(40mm,10mm); + fmargin:=(5mm,1.5mm); sw_fframe:=3; MC(<30,Ph) endfont +beginfont("EN:Switwch font frame 4") + fsize:=(40mm,10mm); + fmargin:=(5mm,1.5mm); + sw_fframe:=4; + MC(<30,Ph) + ext(drawdot(0,0);drawdot(w,0);drawdot(w,h);drawdot(0,h);) +endfont %*********************************************************************** beginfont("EN:Switwch molecular frame") sw_fframe:=1; - fsize:=(40mm,15mm); + fsize:=(40mm,11mm); msize:=(1,1); sw_mframe:=1; MC(<30,Ph) endfont %*********************************************************************** beginfont("EN:Switwch atom frame") - fsize:=(60mm,15mm); + fsize:=(60mm,10mm); sw_aframe:=1; MC(<30,COOH,!,COOH) endfont diff --git a/graphics/mcf2graph/mcf_manual.pdf b/graphics/mcf2graph/mcf_manual.pdf Binary files differindex 19f2435a1b..233e70eecd 100644 --- a/graphics/mcf2graph/mcf_manual.pdf +++ b/graphics/mcf2graph/mcf_manual.pdf diff --git a/graphics/mcf2graph/mcf_manual.tex b/graphics/mcf2graph/mcf_manual.tex index 9f33673c13..4664a2eea0 100644 --- a/graphics/mcf2graph/mcf_manual.tex +++ b/graphics/mcf2graph/mcf_manual.tex @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format manual by Akira Yamaji 2020.08.10 +% Molecular Coding Format manual by Akira Yamaji 2020.08.30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} %%%%\documentclass[a4paper,twoside]{article} @@ -34,7 +34,6 @@ \fnum=29% %---------------------------------------------------------------------------- \edef\MCFjobname{mcf_man_soc}% -\edef\@pk{pk}% %---------------------------------------------------------------------------- \edef\fext{pk}% %%\edef\fext{mps}% @@ -47,10 +46,7 @@ \def\MCFgraph{% \ifx\fext\@pk{\hspace{5mm}\@strufont\char\fnum}% \else% -\ifnum\fnum<10\edef\pre@zero{00}% -\else\ifnum\fnum<100\edef\pre@zero{0}% -\else\edef\pre@zero{}\fi\fi% -\edef\file@name{\MCFjobname-\pre@zero\the\fnum.\fext}% +\edef\file@name{\MCFjobname-\z@num\fnum.\fext}% \setbox\fbox=\hbox{\@strufont\char\fnum}% \hspace{5mm}\includegraphics[width=\wd\fbox,height=\ht\fbox]{\file@name}% \fi% @@ -865,27 +861,18 @@ MCat(1, .5)(<30,Ph,4:/COOH,3:/NH2) ** default: sw_expand=0 \end{verbatim} \MCFgraph\\ -\makebox[5mm]{}% -\makebox[30mm]{\tt 0 :default}% -\makebox[30mm]{\tt 1}% %----------------------------------------------------------------------------- \subsubsection{Group off mode} \begin{verbatim} ** default: sw_group_off=0 \end{verbatim} -\MCFgraph\\ -\makebox[5mm]{}% -\makebox[30mm]{\tt 0 :default}% -\makebox[30mm]{\tt 1}% +\MCFgraph %----------------------------------------------------------------------------- \subsubsection{Single bond mode} \begin{verbatim} ** default: sw_single=0 \end{verbatim} -\MCFgraph\\ -\makebox[5mm]{}% -\makebox[30mm]{\tt 0 :default}% -\makebox[30mm]{\tt 1}% +\MCFgraph %----------------------------------------------------------------------------- \subsection{Frame} %----------------------------------------------------------------------------- @@ -906,6 +893,11 @@ MCat(1, .5)(<30,Ph,4:/COOH,3:/NH2) sw_fframe=3 \end{verbatim} \MCFgraph +\begin{verbatim} + (Draw small dot at corner) + sw_fframe=4 +\end{verbatim} +\MCFgraph %----------------------------------------------------------------------------- \subsubsection{Molecular frame} \begin{verbatim} @@ -1391,7 +1383,7 @@ beginfont("EN:beta-Carotene") .... endfont \end{verbatim} \paragraph{(Setting)} \begin{verbatim} -tag1:="F"; tag2:="C"; tag3:="mw"; tag4:="fm"; +tag1:="F"; tag2:="C"; tag3:="mw"; tag4:="fm"; tag5:="EN"; \end{verbatim} \paragraph{(Output)} \begin{verbatim} @@ -1401,12 +1393,12 @@ F:mcf_man_soc;C:2;mw:386.6532;fm:C27H46O;EN:Cholesterol F:mcf_exa_soc;C:3;mw:470.5113;fm:C26H30O8;EN:Limonin F:mcf_exa_soc;C:4;mw:536.8722;fm:C40H56;EN:beta-Carotene -(sw_aux_out=2 (3)) -F;C;mw;fm(;EN) -mcf_man_soc;1;349.40462;C16H19N3O4S(;Ampicillin) -mcf_man_soc;2;386.6532;C27H46O(;Cholesterol) -mcf_exa_soc;3;470.5113;C26H30O8(;Limonin) -mcf_exa_soc;4;536.8722;C40H56(;beta-Carotene) +(sw_aux_out=2) +F;C;mw;fm +mcf_man_soc;1;349.40462;C16H19N3O4S;Ampicillin +mcf_man_soc;2;386.6532;C27H46O;Cholesterol +mcf_exa_soc;3;470.5113;C26H30O8;Limonin +mcf_exa_soc;4;536.8722;C40H56;beta-Carotene (aux_delimiter="/") F:mcf_man_soc/C:1/mw:349.40462/fm:C16H19N3O4S/EN:Ampicillin @@ -1632,14 +1624,14 @@ endfont; %-------------------------------------------------------------------- \begin{document} \unitlength=1mm% -\INFO{F:mcf_man_soc,C:138,NO:1,mw:349.40462,fm:C16H19N3O4S,EN:Ampicillin}% -\INFO{F:mcf_man_soc,C:139,NO:2,mw:386.6532,fm:C27H46O,EN:Cholesterol}% +\INFO{F:mcf_man_soc,C:139,NO:1,mw:349.40462,fm:C16H19N3O4S,EN:Ampicillin}% +\INFO{F:mcf_man_soc,C:140,NO:2,mw:386.6532,fm:C27H46O,EN:Cholesterol}% \end{document} %-------------------------------------------------------------------- \end{verbatim}% %############################################################################ %------------------------------------------------------------------------ -\INFO{F:mcf_man_soc,C:138,NO:1,mw:349.40462,fm:C16H19N3O4S,EN:Ampicillin}% -\INFO{F:mcf_man_soc,C:139,NO:2,mw:386.6532,fm:C27H46O,EN:Cholesterol}% +\INFO{F:mcf_man_soc,C:139,NO:1,mw:349.40462,fm:C16H19N3O4S,EN:Ampicillin}% +\INFO{F:mcf_man_soc,C:140,NO:2,mw:386.6532,fm:C27H46O,EN:Cholesterol}% %------------------------------------------------------------------------ \end{document} diff --git a/graphics/mcf2graph/mcf_mplib_exa.pdf b/graphics/mcf2graph/mcf_mplib_exa.pdf Binary files differindex 3275834c6b..314b6cbe23 100644 --- a/graphics/mcf2graph/mcf_mplib_exa.pdf +++ b/graphics/mcf2graph/mcf_mplib_exa.pdf diff --git a/graphics/mcf2graph/mcf_mplib_exa.tex b/graphics/mcf2graph/mcf_mplib_exa.tex index e6fc0eb02d..d35a55eed2 100644 --- a/graphics/mcf2graph/mcf_mplib_exa.tex +++ b/graphics/mcf2graph/mcf_mplib_exa.tex @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2020.08.10 +% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2020.08.30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% mcf2graph.mf it must be version 4.51 or later +%%% mcf2graph.mf it must be version 4.52 or later \documentclass{article} %------------------------------------------------------------------------------ \usepackage{luamplib}% diff --git a/graphics/mcf2graph/mcf_setup.sty b/graphics/mcf2graph/mcf_setup.sty index 37945f1662..c308967b89 100644 --- a/graphics/mcf2graph/mcf_setup.sty +++ b/graphics/mcf2graph/mcf_setup.sty @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf_setup.sty for input aux file by Akira Yamaji 2020.08.10 +% mcf_setup.sty for input aux file by Akira Yamaji 2020.08.30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \edef\@F{F} \edef\File{}% 1 \edef\@C{C} \edef\Char{}% 2 @@ -27,6 +27,12 @@ \edef\@EXA{EXA} \edef\EXA{}% 19 \edef\@EXB{EXB} \edef\EXB{}% 20 %--------------------------------------------------------------------------- +\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}% %---------------------------------------- @@ -63,10 +69,12 @@ %---------------------------------------- \fi% }% +%----------------------------------------------------------------------------- +\def\z@num#1{\ifnum#1<10 00\the#1\else\ifnum#1<100 0\the#1\else \the#1\fi\fi}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 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}% %------------------------------------------------------------------ |