diff options
author | Karl Berry <karl@freefriends.org> | 2015-07-30 21:59:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-07-30 21:59:50 +0000 |
commit | b6f4cf0741ace7ba3bc432bead24db36b84985af (patch) | |
tree | 61116ed575f3bae2ab0891b5e9ebd69c33eb7be8 /Master/texmf-dist | |
parent | 6dc0ccac671319a03fa217782f7cbd746556c426 (diff) |
mcf2graph (30jul15)
git-svn-id: svn://tug.org/texlive/trunk@38004 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/README | 57 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf | 14 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf | bin | 255197 -> 255216 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-032.eps (renamed from Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-030.eps) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf | 53 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf | bin | 188181 -> 218677 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex | 130 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf | bin | 0 -> 91079 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex | 149 | ||||
-rw-r--r-- | Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf | 47 |
11 files changed, 356 insertions, 102 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README index def4b21389e..c7ed270341e 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/README +++ b/Master/texmf-dist/doc/metapost/mcf2graph/README @@ -1,40 +1,42 @@ ******************************************************************************* - mcf2graph : Convert Molecular Coding Format to graphic with Metafont/Metapost - Author : Akira Yamaji - version : 3.52 / 2015-07-20 - E-mail : akira.yamaji5@gmail.com - Web site : http://molecoding.cocolog-nifty.com/blog/ + mcf2graph : Convert Molecular Coding Format to graphic with Metafont/Metapost + Author : Akira Yamaji + version : 3.53 / 2015-07-30 + E-mail : akira.yamaji5@gmail.com + Located at : http://mirror.ctan.org/pkg/graphics/mcf2graph + Home page : http://molecoding.cocolog-nifty.com/blog/ ******************************************************************************* 1. Introduction Molecular Coding Format(MCF) is new linear notation represent chmical - structure diagram.This 'Coding' is from coding(programing) technique like - adressing,grouping,macro. There are no commands of Meta language in MCF. - mcf2graph.mf(metapost/metafont macro) convert MCF file to - graphic file(pk font/PNG/SVG/EPS) or MDL MOL file(V2000). + structure diagram. This 'Coding' is named from coding(programing) technique + like adressing,grouping,macro. There are no commands of Meta language in MCF. + mcf2graph.mf(metapost/metafont macro) convert MCF file to graphic file + (pk font/PNG/SVG/EPS) or MDL MOL file(V2000). The software,MCF manual,TeX example can get from authors web site. - 2. The distribution of software - (1) README This file - (2) mcf_graph.mf Macro of Metafont / Metapost - (3) mcf_manual.tex MCF syntax manual(LaTeX file) - (4) mcf_man_soc.mf Molecular difinition file for mcf_manual.tex - (5) mcf_man_soc-030.eps No.30 EPS(with color) file of (4) - (6) mcf_manual.pdf PDF of (3) (used LaTeX,dvipdfmx) - (7) mcf_example.tex LaTeX example, - Make 'mcf_exa_soc-info.log' before typeset - mpost -s ahangle=0 mcf_exa_soc.mf - (8) mcf_exa_soc.mf Molecular difinition file for mcf_example.tex - (9) mcf_example.pdf PDF of (7) (used LaTeX,dvipdfmx) + ( 1) README This file + ( 2) mcf_graph.mf Macro of Metafont / Metapost + ( 3) mcf_manual.tex MCF syntax manual(LaTeX file) + ( 4) mcf_man_soc.mf Molecular difinition file for mcf_manual.tex + ( 5) mcf_man_soc-032.eps No.32 EPS(with color) file of (4) + ( 6) mcf_manual.pdf PDF of (3) (used LaTeX,dvipdfmx) + ( 7) mcf_example.tex LaTeX example, + Make 'mcf_exa_soc-info.log' before typeset + mpost -s ahangle=0 mcf_exa_soc.mf + ( 8) mcf_exa_soc.mf Molecular difinition file for mcf_example.tex + ( 9) mcf_example.pdf PDF of (7) (used LaTeX,dvipdfmx) + (10) mcf_mplib_exa.tex LuaLaTeX example, use package luamplib.sty,fancyvrv.sty + (11) mcf_example.pdf PDF of (10) (used LuaLaTeX) 3. How to use mcf2graph with Metapost - (1) mpost -s ahangle=1 FILENAME output PNG file. (default value is eps) - (2) mpost -s ahangle=2 FILENAME output SVG file. - (3) mpost -s ahangle=3 FILENAME output MDL Molfile(V2000) - (4) mpost -s ahangle=0 FILENAME output no graphic file. - (5) mpost -s ahlength=1 FILENAME output first definition only (for test) - (6) mpost -s ahlength=2 FILENAME output checklist. + ( 1) mpost -s ahangle=1 FILENAME output PNG file. (default value is eps) + ( 2) mpost -s ahangle=2 FILENAME output SVG file. + ( 3) mpost -s ahangle=3 FILENAME output MDL Molfile(V2000) + ( 4) mpost -s ahangle=0 FILENAME output no graphic file. + ( 5) mpost -s ahlength=1 FILENAME output first definition only (for test) + ( 6) mpost -s ahlength=2 FILENAME output checklist. 4. Molecular definition file example input mcf2graph.mf; % input main system @@ -89,3 +91,4 @@ ver. 3.50 / 2015-07-11 first version uploaded to ctan. ver. 3.51 / 2015-07-19 '?6`2' can use as '{,``2,?6,}' ver. 3.52 / 2015-07-20 '!4`2' can use as '{,``2,!4,}' + ver. 3.53 / 2015-07-29 support LuaLaTeX(MPlib) diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf index fafa3585a76..4adf8d9f1bc 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2015.7.19 +% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2015.7.24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% input mcf2graph.mf; %------------------------------------------------------------------------- @@ -533,7 +533,7 @@ endfont %********************************************************************** beginfont("EN:Morphine") MCf(^^30, - {,Ph,2=?6,-4=?6,(#1,#12)=?5[2],1:O,},-1=zb, + Ph,2=??6,-4=??6,(#1,#12)=??5[2],-1:O,-1=zb, 7*,60~wf`0.75,70~ov`1.3,45,N,/Me,&9~wb, 15=d,6:/OH,8^180:*/H,12:/*OH ) @@ -554,11 +554,11 @@ beginfont("EN:Quinine") endfont %*********************************************************************** beginfont("EN:Atoropin") - MCf(^^-30, - O,!,//O,!,!,Ph, - #1\~zb^-120,?7,-2*\^-170`1.2,N,/Me,&-5~wb, - #3\~wv,!,OH - ) + MCf(^^-30, + O,!,//O,!,!,Ph, + #1\~zb^-120,?7,-2*\^-170`1.2,N,/Me,&-5~wb, + #3\~wv,!,OH + ) endfont %*********************************************************************** 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 fc33cf1613d..19041dde5f8 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 dc4ef24a7aa..b16fe054707 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format file for mcf_examples.tex by A.Yamaji 2015.7 +% Molecular Coding Format file for mcf_examples.tex by A.Yamaji 2015.7.25 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage{graphicx} @@ -65,8 +65,8 @@ }% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} -{\hspace{20mm} \LARGE\bf Molecular Coding Format examples \hspace{20mm} }% -{\footnotesize\bf by Akira Yamaji 2015.7} \vspace{5mm}\\ +{\hspace{20mm} \LARGE\bf Molecular Coding Format examples \hspace{10mm} }% +{\footnotesize\bf by Akira Yamaji 2015.7.25} \vspace{5mm}\\ \fontnum=1% \noindent% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-030.eps b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-032.eps index a8c40f49460..5e2cd1b6539 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-030.eps +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-032.eps @@ -2,7 +2,7 @@ %%BoundingBox: 47 7 112 78 %%HiResBoundingBox: 47.18906 7.2196 111.88002 77.81963 %%Creator: MetaPost 1.999 -%%CreationDate: 2015.07.20:0717 +%%CreationDate: 2015.07.25:0953 %%Pages: 1 %%BeginProlog %%EndProlog diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf index 209747c69cc..df008deb152 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2015.7 +% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2015.7.25 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% input mcf2graph.mf; %----------------------------------------------------------------------- @@ -48,16 +48,22 @@ beginfont("EN:change bond 2") MCf(^^30,!9,1=vf,2=vb,3=tm,4=dt,5=wv,@(7~bd^-45`2,9~ov^45`2)/Me) endfont %*********************************************************************** -beginfont("EN:change bond length") +beginfont("EN:change bond length1") sw_start_vector:=1; sw_numberB:=1; - MCf(^^30,!3,!`1.2,!2) + MCf(^^30,!2,!2`1.2,!) endfont %*********************************************************************** -beginfont("EN:change bond length") +beginfont("EN:change bond length2") sw_start_vector:=1; sw_numberB:=1; - MCf(^^30,!3,``1.2,!3) + MCf(^^30,!2,``1.2,!2,!) +endfont +%*********************************************************************** +beginfont("EN:change bond length3") + sw_start_vector:=1; + sw_numberB:=1; + MCf(^^30,?6,3\,?6`1.2,4=??6) endfont %*********************************************************************** beginfont("EN:change atom 1") @@ -93,6 +99,12 @@ endfont beginfont("EN:fused ring 1") sw_start_vector:=1; sw_numberB:=1; + MCf(^^30,?6,3=?5) +endfont +%*********************************************************************** +beginfont("EN:fused ring 1") + sw_start_vector:=1; + sw_numberB:=1; MCf(^^30,?6,$(3,3,3)?6) endfont %*********************************************************************** @@ -250,7 +262,7 @@ beginfont("EN:Ampicillin") ) endfont %*********************************************************************** -beginfont("EN:Cholesterol","MW:386.65") +beginfont("EN:Cholesterol") MCf( ^^30,?6,$(-4,-2)??6,-4=??5,7=dl, 1:*/OH,@(4,12)*/Me^60,9:*/H^60, @@ -259,4 +271,33 @@ beginfont("EN:Cholesterol","MW:386.65") ) endfont %*********************************************************************** +beginfont("EN:alfa-Tocopherol") + MCf(^^30, + Ph,3=??6,7:O,@(1,2,5)/Me,8:/*Me^60,6:/OH, + 8\,!12,@(4,8)/*Me,12:/Me + ) +endfont +%*********************************************************************** +beginfont("EN:Caffeine") + MCf(^^30, + ?6,-4=??5,$(3,8)dl,@(2,6,7,9)N,@(2,6,9)/Me,@(1,5)//O + ) +endfont +%*********************************************************************** +beginfont("EN:Lycorine") + MCf(^^30, + Ph,-4=??6,-2=??6,6=??5,(9,12)=??5[3],13=dl,8:N,@(15,17)O, + 9:/*H^180,10:*/H^60,13:*/OH,14:/*OH + ) +endfont +%*********************************************************************** +beginfont("EN:Gibberellin"); + MCf( + ^^12,?6`1.3,3=??5,9=??7,12\^160`1.6,&8, + 4\^155~zf`-1.2,O,55,//O^180`1,&2~zb, + 3=dr,11=wf,13=wb,7:/COOH,11://Me,1:*/OH,12:/*OH,2:*/Me, + @(3^-60,9^60)*/H + ) +endfont; +%*********************************************************************** 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 c8c472981a1..c7c575c6835 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 04aa16a1dc5..e1cd21a844e 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex @@ -1,9 +1,10 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format manual by Akira Yamaji 2015.7 +% Molecular Coding Format manual by Akira Yamaji 2015.7.25 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage[dvipdfmx]{graphicx} -%%%%%\usepackage[pdftex]{graphicx} +%%%%\usepackage[pdftex]{graphicx} +%%%%\usepackage{epstopdf} \pagestyle{empty} \topmargin=-17mm \textheight=27.5cm @@ -27,19 +28,11 @@ \advance\fontnum\@ne\relax\advance\tempnum\@ne\relax% }% %---------------------------------------------------------------------------- -%%%\def\MCFstructure{% -%%% \makebox(75,0)[t]% -%%% {\frame{\makebox(70,35){% -%%% \ifnum\fontnum<10\includegraphics{mcf_man_soc-00\the\fontnum}% -%%% \else\ifnum\fontnum<100\includegraphics{mcf_man_soc-0\the\fontnum}\fi\fi}}}% -%%% \advance\fontnum\@ne\relax\advance\tempnum\@ne\relax% -%%%}% -%---------------------------------------------------------------------------- \begin{document} \noindent% \begin{picture}(180,0) - \put(45,12){{\LARGE Molecular Coding Format manual}\hspace{10mm} - by Akira Yamaji 2015.7} + \put(35,12){{\LARGE Molecular Coding Format manual}\hspace{10mm} + by Akira Yamaji 2015.7.25} \end{picture}\vspace{-6mm}\\ %---------------------------------------------------------------------------- \begin{minipage}[t][38mm]{100mm} @@ -113,9 +106,9 @@ six membered ring \MCFtitle{Change bond (2)} \begin{verbatim} Bn=bond : change bond - dm:double,dl:double(left),dr:double(right), - wf:wedge forward,wb:wedge backward, - zf:wedge dotted,zb:wedge dotted backward + vf:vector forward, vb:vector backward, + tm:triple, wv:waved, bd:broad single, + ov:over line ^^30,!9,1=vf,2=vb,3=tm,4=dt,5=wv, @(7~bd^-45`2,9~ov^45`2)/Me @@ -129,7 +122,7 @@ six membered ring \begin{verbatim} B`length : change bond length of B - ^^30,!3,!`1.2,!2 + ^^30,!2,!2`1.2,! \end{verbatim} \end{minipage} \MCFstructure @@ -140,7 +133,18 @@ B`length : change bond length of B \begin{verbatim} ``length : change all bond length after - ^^30,!3,``1.2,!3 + ^^30,!2,``1.2,!2,! +\end{verbatim} +\end{minipage} +\MCFstructure +\vspace{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\MCFtitle{Change chain length (3)} +\begin{verbatim} +?n`length : change ring length + + ^^30,?6,3\,?6`1.2,4=??6 \end{verbatim} \end{minipage} \MCFstructure @@ -217,6 +221,18 @@ Insert hetero atom \begin{minipage}[t][38mm]{100mm} \MCFtitle{Fused ring (1)} \begin{verbatim} +?6,3=?6 : fuse ?6 at B3 + + ?6,3=?6 + +\end{verbatim} +\end{minipage} +\MCFstructure +\vspace{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\MCFtitle{Fused ring (2)} +\begin{verbatim} ?6,$(3,3,3)??6 NG ?6,$(3,9,14)??6 OK @@ -229,7 +245,7 @@ Insert hetero atom \vspace{6mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][38mm]{100mm} -\MCFtitle{Fused ring (2)} +\MCFtitle{Fused ring (3)} \begin{verbatim} ?6,$(3,3,3)?6 OK @@ -243,7 +259,7 @@ Insert hetero atom \vspace{6mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][38mm]{100mm} -\MCFtitle{Fused ring (3)} +\MCFtitle{Fused ring (4)} \begin{verbatim} (4,11)=??6[4] : fuse 4/6 ring to B4 ..B11 (16,17)=??6[3] : fuse 3/6 ring to B16..B17 @@ -258,7 +274,7 @@ Insert hetero atom \vspace{6mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][38mm]{100mm} -\MCFtitle{Fused ring (4)} +\MCFtitle{Fused ring (5)} \begin{verbatim} (20,5)=??5[3] : fuse 3/5 ring to B20..B5 (16,17)=??5[2] : fuse 2/5 ring to B16..B17 @@ -436,7 +452,7 @@ $(3)red : change color of B3 red \end{minipage} %%%%\MCFstructure % for Metafont \makebox(75,0)[t]{\frame{\makebox(70,35)% -{\includegraphics{mcf_man_soc-030.eps}}}}% for dvipdfmx +{\includegraphics{mcf_man_soc-032.eps}}}}% for dvipdfmx %%%%{\includegraphics[width=30mm]{mcf_man_soc-030.png}}}}% for pdfLaTeX \advance\fontnum\@ne\relax\advance\tempnum\@ne\relax% \vspace{6mm}\\ @@ -553,10 +569,12 @@ Insert user defined substructure \begin{minipage}[t][38mm]{100mm} \MCFtitle{Example(1) Ampicillin} \begin{verbatim} - ^^45,?4,2:N,2=??5,-1:S, - @(3^45,4^-45)/*H,1://O^15, - 5:/*COOH^-18,@(6^35,6^-35)/Me, - 4\^75,NH,!,//O,!,NH,!,Ph + + ^^45, + ?4,2:N,2=??5,-1:S, + @(3^45,4^-45)/*H,1://O^15, + 5:/*COOH^-18,@(6^35,6^-35)/Me, + 4\^75,NH,!,//O,!,NH,!,Ph \end{verbatim} \end{minipage} \MCFstructure @@ -565,10 +583,64 @@ Insert user defined substructure \begin{minipage}[t][38mm]{100mm} \MCFtitle{Example(2) Cholesterol} \begin{verbatim} - ^^30,?6,$(-4,-2)??6,-4=??5,7=dl, - 1:*/OH,@(4,12)*/Me^60,9:*/H^60, - 10:/*H^180,@(11,-1)/*H^-60, - -1\^17,/*Me,!4,/Me,!, + + ^^30, + ?6,$(-4,-2)??6,-4=??5,7=dl, + 1:*/OH,@(4,12)*/Me^60,9:*/H^60, + 10:/*H^180,@(11,-1)/*H^-60, + -1\^17,/*Me,!4,/Me,!, +\end{verbatim} +\end{minipage} +\MCFstructure +\vspace{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\MCFtitle{Example(3) alfa-Tocopherol} +\begin{verbatim} + + ^^30, + Ph,3=??6, + 7:O,@(1,2,5)/Me,8:/*Me^60,6:/OH, + 8\,!12,@(4,8)/*Me,12:/Me +\end{verbatim} +\end{minipage} +\MCFstructure +\vspace{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\MCFtitle{Example(4) Caffeine} +\begin{verbatim} + + ^^30, + ?6,-4=??5,$(3,8)dl,@(2,6,7,9)N, + @(2,6,9)/Me,@(1,5)//O +\end{verbatim} +\end{minipage} +\MCFstructure +\vspace{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\MCFtitle{Example(5) Lycorine} +\begin{verbatim} + + ^^30, + Ph,-4=??6,-2=??6,6=??5,(9,12)=??5[3], + 13=dl,8:N,@(15,17)O, + 9:/*H^180,10:*/H^60,13:*/OH,14:/*OH +\end{verbatim} +\end{minipage} +\MCFstructure +\vspace{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\MCFtitle{Example(6) Gibberellin} +\begin{verbatim} + + ^^12, + ?6`1.3,3=??5,9=??7,12\^160`1.6,&8, + 4\^155~zf`-1.2,O,55,//O^180`1,&2~zb, + 3=dr,11=wf,13=wb,7:/COOH,11://Me,1:*/OH, + 12:/*OH,2:*/Me,@(3^-60,9^60)*/H \end{verbatim} \end{minipage} \MCFstructure 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 differnew file mode 100644 index 00000000000..2c32d0ac78c --- /dev/null +++ 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 new file mode 100644 index 00000000000..ba0d89e3ad9 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex @@ -0,0 +1,149 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% MCF Lualatex(luamplib) Example by A.Yamaji 2015.7.30 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\documentclass{article} +\usepackage{luamplib} +\usepackage{fancyvrb} +\pagestyle{empty} +\topmargin=-25mm +\oddsidemargin=0mm +\textwidth=180mm +\textheight=280mm +\unitlength=1mm +%------------------------------------------------------------------------------------ +\begin{document} +% +{\LARGE MCF example for LuaLaTeX(luamplib) }% + \hspace{20mm}by Akira Yamaji 2015.7.30\vspace{8mm}\\ +% +\everymplib{verbatimtex \leavevmode etex; input mcf2graph.mf; input temp_file.aux;}% +%------------------------------------------------------------------------------------ +\rlap{\raisebox{35mm}{No.1 Chlorophyll a}}% +\begin{VerbatimOut}{temp_file.aux} + font_wd:=100mm; + font_ht:=50mm; + beginfont("NO:1","EN:Chlorophyll a","MW:893.49") + MCf(^^54, + {,``1,?5,$(2,5)d,4:N,3\,54~dl,?5,$(2,4)d,5:N, + -2\,54~dl,?5,2=d,5:N,-2\~dl,54,?5,5=d,5:N,-2\~dl,&(#5), + -1*,24,/*COOMe^15,72,//O,&(#1),}, + 4\`1.45,Mg,&17,-1*,&11~vb,-1*,&23~vb, + @(2,9,15,20~zf)/Me,8:/Et,14\,!~dr, + 21*,-6~wf,!2,//O,!,O,!2,!~dl,!13,@(1,5,9,13)/Me, + ) + endfont +\end{VerbatimOut} +\begin{mplibcode}\end{mplibcode}% +\hspace{8mm}% +%---------------------------------------------------------------------------- +\rlap{\raisebox{38mm}{No.2 Limonin}}% +\begin{VerbatimOut}{temp_file.aux} + font_wd:=60mm; + font_ht:=40mm; + beginfont("NO:2","EN:Limonin") + MCf(^^30, + ?6,$(-3,-4)??6,-5=??3,-2=wf,-1=wb,6=??5,-4=??6,-5=wf, + @(13,15,17,20,25)O,@(3,12,21)//O, + @(4~wf^60,8~zf^60,18^35,18^-35)/Me,@(1^60,5^180,16^60)/*H, + 14\*,?5,$(1,4)d + ) + endfont +\end{VerbatimOut} +\begin{mplibcode}\end{mplibcode}\vspace{8mm}\\% +%---------------------------------------------------------------------------- +\rlap{\raisebox{25mm}{No.3 beta-Carotene}}% +\begin{VerbatimOut}{temp_file.aux} + font_wd:=90mm; + font_ht:=30mm; + beginfont("NO:3","EN:beta-Carotene") + MCf(^^30, + ?6,3:d,@(3,5^35,5^-35)/Me, + 4\,!18,$(1,3,5,7,9,11,13,15,17)dr,@(3,7,12,16)/Me, + ?6,6:d,@(6,2^35,2^-35)/Me + ) + endfont +\end{VerbatimOut} +\begin{mplibcode}\end{mplibcode}\hspace{8mm}% +%---------------------------------------------------------------------------- +\rlap{\raisebox{25mm}{No.4 Gibberellin}}% +\begin{VerbatimOut}{temp_file.aux} +font_wd:=50mm; +font_ht:=40mm; +beginfont("NO:4","EN:Gibberellin"); + MCf( + ^^12,?6`1.3,3=??5,9=??7,12\^160`1.6,&8, + 4\^155~zf`-1.2,O,55,//O^180`1,&2~zb, + 3=dr,11=wf,13=wb,7:/COOH,11://Me,1:*/OH,12:/*OH,2:*/Me, + @(3^-60,9^60)*/H + ) +endfont; +\end{VerbatimOut} +\begin{mplibcode}\end{mplibcode}\vspace{10mm}\\% +%---------------------------------------------------------------------------- +\rlap{\raisebox{55mm}{No.5 Erythromycin}}% +\begin{VerbatimOut}{temp_file.aux} +font_wd:=60mm; +font_ht:=70mm; +beginfont("NO:5","EN:Erythromycin"); +MCf(^^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,10)*/Me,@(4,6^-35,8,12^35)/*Me, + @(6^35,11,12^-35)*/OH, + #3\*,O,30,?6`.7,2:O,@(3,5^35)/Me,4:/OH,5^-35:/OMe, + #5\*^30`1.7,O,!,?6`.7,6:O,5:/Me,2:/OH,3:/NMeMe +) +endfont; +\end{VerbatimOut} +\begin{mplibcode}\end{mplibcode}\hspace{8mm}% +%---------------------------------------------------------------------------- +\rlap{\raisebox{70mm}{No.6 Vancomycin}}% +\begin{VerbatimOut}{temp_file.aux} +font_wd:=100mm; +font_ht:=70mm; +beginfont("NO:6","EN:Vancomycin"); + MCf(^^30, + {,``1,!12,$(1,3,12)zf,7=wf,/H^-60,60,*/OH,60, + Ph,-4:/Cl,-3\,O,!,Ph,-4\,O,!,Ph,-1^15:/Cl,-3\,/*OH,*/H^-60,&(#1), + #7*,&(#26),#1\^120,//O,60,NH,60,/*H,*/COOH^180,-60, + Ph,@(-2,-4)/OH,-1\,Ph,-5:/OH,-2*,&(#4),}, + @(3^40,6,9,12)//O,@(2,5,8,11)NH, + @(1^180,4^180)*/H,@(7^-60,10^60,14^60)/*H, + #10*\^-60,60,//O,!,NH2, + #13*\,NH,!,//O,!,/'(!,iPr)^-35>60,*/H^60,!~zf,NH,!, + #23\,O,!,{,``.7,?6,2:O,3^10:/'(!,OH),@(4,5)/OH,}, + -1\,O,!,{,``.7,?6,6:O,@(3^35,5)/Me,3^-35:/NH2,4:/OH,} + ) +endfont; +\end{VerbatimOut} +\begin{mplibcode}\end{mplibcode}\vspace{8mm}\\% +%---------------------------------------------------------------------------- +\rlap{\raisebox{50mm}{No.7 Maitotoxin}}% +\begin{VerbatimOut}{temp_file.aux} + font_wd:=160mm; + font_ht:=90mm; + beginfont("NO:7","EN:Maitotoxin") + MCf(^^55.8, + ?6,-4=??7 ,$(-4,-3,-3,-3)??6,-3\,!!3,??6,$(-4,-3,-3,-3)??6, + -3\,??6,-3=??6,-3\,!!3,60,^^-30,??6,-3=??6, + -3\^30,^^30,??6,$(-3,-3)??6,-3=??7,$(-4,-3,-3)??6, + -2\,??6,-3=??6,-3=??7,$(-3,-3)??6,-3=??8,-3=dl,$(-5,-3,-3,-3)??6, + @(5,7,15,16,23,24,32,40,41,48,49,58,59,72,73,82,83,90,91,99, + 100,107,113,114,122,123,130,131,140,141,148,149)O, + @(1^60,2,26,28,29,51,54,61,63,68,75^60,78,109)*/OH, + @(11,20,35,45,52,55,65,69,86)/*OH,@(^^60,47,57,71)/*H, + @(3,8,13,17,21,33,38,42,56,70,84,92,101,106,111,128,138,142,146,150)/*H^-60, + @(4,14,22,34,39,43,81,89,98,102,116,121,125,129,133)*/H^60, + @(6,46,50,53,60,67,74)*/H^-60, + @(9,18,85,93,112,139,143,147)*/Me`1^60, + @(80,88,97,115,120,124)/*Me`1^-60,108:*/Me`1^-60, + @(36~zf^-45>30)/'(O,!,SOO,!,"O{Na}"), + #6\,!11,60~dr,-60,60,OH,2:/*OH,@(7,10)*/OH,@(1,3)*/Me,@(8~zf,11~dm,12)/Me, + @(6>30)/'(O,!,SOO,!,"O{Na}"), + #150\,!7,@(1,2)/*OH,4:*/Me,5:/*Me,7=dl + ) + endfont +\end{VerbatimOut} +\begin{mplibcode}\end{mplibcode}\\% +%---------------------------------------------------------------------------- +% +\end{document} diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf index 05f69ae860b..03890a729b2 100644 --- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf +++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 3.52 Copyright (c) 2013-2015 Akira Yamaji +% mcf2graph ver 3.53 Copyright (c) 2013-2015 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, @@ -19,8 +19,8 @@ % mcf2graph is METAFONT/METAPOST macro package convert % Molecular Coding Format(MCF) to font/eps/sgv/png/mdl molfile(V2000) %---------------------------------------------------------------------------------------------- -% Web page of author: http://molecoding.cocolog-nifty.com/blog/ -% Suggestion or request mail to: akira.yamaji5@gmail.com +% This package is located at : http://mirror.ctan.org/pkg/graphics/mcf2graph +% Suggestion or request mail to : akira.yamaji5@gmail.com %---------------------------------------------------------------------------------------------- % Set outputformat to "png" : mpost -s ahangle=1 FILENAME % Set outputformat to "svg" : mpost -s ahangle=2 FILENAME @@ -44,30 +44,25 @@ picture atom_font[],chem_structure,temp_picture; %------------------------------------------------------------------------------------------------- sw_numberA:=sw_numberB:=sw_frame:=sw_logout:=sw_solid:=sw_expand:=sw_start_vector:=0; sw_atom_frame:=sw_checklist:=sw_MOLfile:=char_num:=str_cnt:=size_changed:=proc_end:=0; -if known outputtemplate: - f_MP:=1; - if known SAVfile: % for MePoTeX - mp_log_name:="@MCF_INFO.log"; outputtemplate:="%j.%c."; - def beginchar(text s)= enddef; def endchar = enddef; sw_logout:=1; - else: % for METAPOST - mp_log_name:=jobname&"-info.log"; - if ahlength=1: proc_end:=1; fi % first molecular only - if ahlength=2: sw_checklist:=1; def shipit = enddef; fi % checklist on - if ahangle=0: def shipit = enddef; % No image file - elseif ahangle=1: outputformat:="png"; hppp:=vppp:=0.1; % PNG format - elseif ahangle=2: outputformat:="svg"; % SVG format - elseif ahangle=3: sw_MOLfile:=1; def shipit = enddef; % MDL Molefile on - fi - outputtemplate:="%j-%3c."&outputformat; - def beginchar(text s)= beginfig(char_num) enddef; def endchar = endfig enddef; +if known green: f_MP:=1; + mp_log_name:=jobname&"-info.log"; + if ahlength=1: proc_end:=1; fi % first molecular only + if ahlength=2: sw_checklist:=1; def shipit = enddef; fi % checklist on + if ahangle=0: def shipit = enddef; % No image file + elseif ahangle=1: outputformat:="png"; hppp:=vppp:=0.1; % PNG format + elseif ahangle=2: outputformat:="svg"; % SVG format + elseif ahangle=3: sw_MOLfile:=1; def shipit = enddef; % MDL Molefile on fi + outputtemplate:="%j-%3c."&outputformat; + def beginchar(text s)= beginfig(char_num) enddef; def endchar = endfig enddef; vardef mp_filename = jobname&"-"&fit_zero(char_num)&decimal(char_num)&"."&outputformat enddef; def printf expr s= write s to mp_log_name enddef; ahangle:=45; ahlength:=4; def # = enddef; color color_list[]; def Cp(expr s) = if known s: if s<>0: withcolor color_list[s] fi fi enddef; def define_pixels(text s) = enddef; -else: f_MP:=0; def Cp(expr s) = enddef; def color = transform enddef; - mode_setup; def printf expr s= message s enddef; def mp_filename= "" enddef; fi +else: f_MP:=0; + def Cp(expr s) = enddef; def color = transform enddef; + mode_setup; def printf expr s= message s enddef; def mp_filename= "" enddef; fi clearit; chem_structure:=currentpicture; %------------------------------------------------------------------------------------------------- let DIV= /; let MUL= *; let LT= <; let GT= >; let AND= &; let :: = : ; let == = =; @@ -104,12 +99,6 @@ def beginfont(text s)= mol_name:=""; len_x:=len_y:=cntA:=0; for list=s: cntA:=cntA+1; info[cntA]:=list; if substring (0,2) of list="EN": mol_name:=substring (3,length(list)) of list; fi exitif cntA=11; endfor - ratio_hw:=font_ht#/font_wd#; - if f_MP=0: - if mode=proof: - if font_wd#>=font_ht#: - if font_wd#>35mm#:font_wd#:=35mm#;font_ht#:=ratio_hw*35mm#; fi - else: if font_ht#>35mm#:font_ht#:=35mm#;font_wd#:=35mm#/ratio_hw; fi fi fi fi beginchar(char_num,font_wd#,font_ht#,0); clearit; enddef; %------------------------------------------------------------------------------------------------- @@ -157,8 +146,8 @@ for i=1 upto cntA: xpos:=xpart(posA[i]); ypos:=ypart(posA[i]); enddef; %------------------------------------------------------------------------------------------------- def resize(expr WD,HT)= - if (len_y/len_x)>ratio_hw: factor:=(font_ht*HT-2tb_margin)/len_y; - else: factor:=(font_wd*WD-2lr_margin)/len_x; fi + if (len_y/len_x)>(font_ht/font_wd): factor:=(font_ht*HT-2tb_margin)/len_y; + else: factor:=(font_wd*WD-2lr_margin)/len_x; fi ratio_bond_width:=ratio_bond_width*factor; len_x:=len_x*factor; len_y:=len_y*factor; enddef; %------------------------------------------------------------------------------------------------- |