diff options
author | Karl Berry <karl@freefriends.org> | 2015-08-07 21:44:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-08-07 21:44:34 +0000 |
commit | ca94b24a2e8f17e576b1d2499a06e63b29f3ee14 (patch) | |
tree | c3912690319d4ced1609265015cb1d32cb49842c | |
parent | 0c3e778e17510573c58cc88ba0f8370c20edd7cc (diff) |
mcf2graph (7aug15)
git-svn-id: svn://tug.org/texlive/trunk@38069 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/README | 58 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf | bin | 255342 -> 255342 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf | bin | 218682 -> 218676 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf | bin | 107562 -> 107480 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex | 124 | ||||
-rw-r--r-- | Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf | 42 |
10 files changed, 119 insertions, 113 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README index b22359edfdf..bb51260b7db 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 Author : Akira Yamaji - version : 3.54 / 2015-08-03 + version : 3.55 / 2015-08-07 E-mail : akira.yamaji5@gmail.com Located at : http://mirror.ctan.org/pkg/graphics/mcf2graph Home page : http://molecoding.cocolog-nifty.com/blog/ @@ -11,7 +11,7 @@ Molecular Coding Format(MCF) is new linear notation represent chmical structure diagram. This 'Coding' is named from coding(programing) technique like adressing,grouping,macro. There are no Meta language commands in MCF. - mcf2graph.mf(metapost/metafont macro) convert MCF file to graphic file + mcf2graph.mf(metapost/metafont macro) convert MCF file to graphics file (pk font/PNG/SVG/EPS) or MDL MOL file(V2000). The software,MCF manual,TeX example can get from authors web site. @@ -27,7 +27,7 @@ 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,fancyvrv.sty + (10) mcf_mplib_exa.tex luamplib v2.11(LuaLaTeX) example (11) mcf_example.pdf PDF of (10) typeset with LuaTeX(LuaLaTeX) 3. How to use mcf2graph with Metapost @@ -39,25 +39,24 @@ ( 6) mpost -s ahlength=2 FILENAME output checklist. 4. Molecular definition file example - input mcf2graph.mf; % input main system - font_wd#:=30mm#; % font width - font_ht#:=20mm#; % font height - max_bond_width:=0.2; % max fond length/font width - sw_logout:=1; % log file out - %*********************************************************************** + + input mcf2graph.mf; % input main system + font_wd#:=30mm#; font_ht#:=20mm#; % font width,font height + max_bond_width:=0.2; % max fond length/font width + %----------------------------------------------------------------------- beginfont("EN:Acetamiprid") % Molecular name 1 MCf(^^30,Ph,4\,!,NH,!,!~dr,N,!,CN)% % Molecular Coding Format endfont - %*********************************************************************** + %----------------------------------------------------------------------- bye 5. How to use mcf2graph with TeX(latex) Large number of molecular structures can be gathering by using TEX. mcf_example.tex is example of using LaTeX. - \documentclass[a4paper]{article} + \documentclass{article} \usepackage[dvipdfmx]{graphicx}% Change option depend on your tex system - + ********************************************************** % insert part of info.aux file %------------------------------------------------------------------------- \MOLinfo{EN:Acetamiprid}{:}{:}{:}{:}{:}{:}{:}{:}{:}{:}{:}% @@ -66,7 +65,27 @@ % or insert next line \input mcf_exa_soc-info.aux % filename of souce file : mcf_exa_soc.mf -6. License + +6. How to use mcf2graph with luamplib(LuaLaTeX) + It is possible to write MCF in LaTeX text with luamplib(ver.2.11). + mcf_mplib_exa.tex is example of using luamplib(LuaLaTeX). + +\documentclass{article} +%------------------------------------------------------------------------------- +\mplibcodeinherit{enable}% +\mplibverbatim{enable}% +\everymplib{if unknown Ph1: input mcf2graph.mf; fi}% +%------------------------------------------------------------------------------- + ********************************************************** +\begin{mplibcode} + font_wd:=100mm; font_ht:=50mm; + beginfont("EN:Acetamiprid") % Molecular name 1 + MCf(^^30,Ph,4\,!,NH,!,!~dr,N,!,CN)% % Molecular Coding Format + endfont +\end{mplibcode} +%---------------------------------------------------------------------------- + +7. License 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, including without limitation the rights @@ -85,9 +104,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -7. Changelog - 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 luamplib(LuaLaTeX) - ver. 3.54 / 2015-08-03 maximum number of MOLinfo can be changed +8. Changelog + 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 luamplib(LuaLaTeX) + ver. 3.54 / 2015-08-03 maximum item number of MOLinfo can be changed + ver. 3.55 / 2015-08-04 support luamplib(v2.11), renew mcf_mplib_exa.tex 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 4adf8d9f1bc..3c1e910592b 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.24 +% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2015.8.7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% input mcf2graph.mf; %------------------------------------------------------------------------- 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 94878b06240..00b3bc86ea2 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 28bf937f457..a9f6a37c336 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.8.3 +% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2015.8.7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage{graphicx} 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 df008deb152..0d1e07b8bb6 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.25 +% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2015.8.7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% input mcf2graph.mf; %----------------------------------------------------------------------- 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 4ecb6e7f43e..bd1d98404b8 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 e1cd21a844e..11b737bafa6 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 2015.7.25 +% Molecular Coding Format manual by Akira Yamaji 2015.8.7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage[dvipdfmx]{graphicx} 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 4f2d4f2fe71..57a4d837976 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 b90ce3a9d9a..fdce25becf4 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex @@ -1,13 +1,13 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% MCF luamplib(LuaLaTeX) Example by A.Yamaji 2015.8.3 +% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2015.8.7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass{article} -\usepackage{luamplib} -\usepackage{fancyvrb} -\def\tempaux{temp_file.aux}% %------------------------------------------------------------------------------- -\everymplib{verbatimtex \leavevmode etex; input mcf2graph.mf; sw_logout:=1; - mp_log_name:="temp-info.aux"; input \tempaux;}% +\usepackage{luamplib}% +\mplibcodeinherit{enable}% +\mplibverbatim{enable}% +\everymplib{if unknown Ph1: input mcf2graph.mf; sw_logout:=1;% + mp_log_name:="temp-info.aux"; fi}% \everyendmplib{write EOF to mp_log_name;}% %------------------------------------------------------------------------------- \makeatletter% @@ -26,9 +26,7 @@ \ifx\@first\@USE@ \edef\MOLuse{\@second}\fi% \ifx\@first\@XLogP@ \edef\MOLXLogP{\@second}\fi% \ifx\@first\@EXA@ \edef\MOLextA{\@second}\fi% - \ifx\@first\@EXB@ \edef\MOLextB{\@second}\fi% - \fi% -}% + \ifx\@first\@EXB@ \edef\MOLextB{\@second}\fi\fi}% %------------------------------------------------------------------------------- \def\@first@param#1:#2;{#1}\def\@second@param#1:#2;{#2}% \def\@EN@{EN}\def\@JN@{JN}\def\@CAS@{CAS}\def\@NO@{NO}\def\@MW@{MW}\def\@FM@{FM}% @@ -55,9 +53,9 @@ %------------------------------------------------------------------------------------ \begin{document} {\LARGE MCF example for luamplib(LuaLaTeX) }% - \hspace{20mm}by Akira Yamaji 2015.8.3\vspace{8mm}\\ + \hspace{20mm}by Akira Yamaji 2015.8.7\vspace{8mm}\\ %------------------------------------------------------------------------------------ -\begin{VerbatimOut}{\tempaux} +\begin{mplibcode} font_wd:=100mm; font_ht:=50mm; beginfont("NO:1","EN:Chlorophyll a","MW:893.49") MCf(^^54, @@ -69,25 +67,25 @@ 21*,-6~wf,!2,//O,!,O,!2,!~dl,!13,@(1,5,9,13)/Me, ) endfont -\end{VerbatimOut} -\begin{mplibcode}\end{mplibcode} +\end{mplibcode} +\input{temp-info.aux}% \MOLcaption{0mm}{35mm}\hspace{8mm}% %---------------------------------------------------------------------------- -\begin{VerbatimOut}{\tempaux} +\begin{mplibcode} font_wd:=60mm; font_ht:=40mm; beginfont("NO:2","EN:Limonin","MW:470.51") 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 + 14\*,?5,$(1,4)dl ) endfont -\end{VerbatimOut} -\begin{mplibcode}\end{mplibcode}% +\end{mplibcode} +\input{temp-info.aux}% \MOLcaption{0mm}{43mm}\vspace{8mm}\\% %---------------------------------------------------------------------------- -\begin{VerbatimOut}{\tempaux} +\begin{mplibcode} font_wd:=90mm; font_ht:=30mm; beginfont("NO:3","EN:beta-Carotene","MW:536.87") MCf(^^30, @@ -96,11 +94,11 @@ ?6,6:d,@(6,2^35,2^-35)/Me ) endfont -\end{VerbatimOut} -\begin{mplibcode}\end{mplibcode}% +\end{mplibcode} +\input{temp-info.aux}% \MOLcaption{0mm}{25mm}\hspace{8mm}% %---------------------------------------------------------------------------- -\begin{VerbatimOut}{\tempaux} +\begin{mplibcode} font_wd:=50mm; font_ht:=40mm; beginfont("NO:4","EN:Gibberellin","MW:346.37"); MCf( @@ -110,70 +108,70 @@ beginfont("NO:4","EN:Gibberellin","MW:346.37"); @(3^-60,9^60)*/H ) endfont; -\end{VerbatimOut} -\begin{mplibcode}\end{mplibcode}% +\end{mplibcode} +\input{temp-info.aux}% \MOLcaption{0mm}{25mm}\vspace{10mm}\\% %---------------------------------------------------------------------------- -\begin{VerbatimOut}{\tempaux} +\begin{mplibcode} font_wd:=60mm; font_ht:=70mm; beginfont("NO:5","EN:Erythromycin","MW:733.93"); -MCf(^^30, - {,``1,^^-120,60,60,60,-60,60,60,-60,60,60,60,-60,60,60,},&1, + 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}% + ) + endfont; +\end{mplibcode} +\input{temp-info.aux}% \MOLcaption{0mm}{55mm}\hspace{8mm}% %---------------------------------------------------------------------------- -\begin{VerbatimOut}{\tempaux} +\begin{mplibcode} font_wd:=100mm; font_ht:=70mm; beginfont("NO:6","EN:Vancomycin","MW:1449.25"); 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,!,?6`.7,2:O,3^10:/'(!,OH),@(4,5)/OH,, - -1\,O,!,?6`.7,6:O,@(3^35,5)/Me,3^-35:/NH2,4:/OH + {,``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,!,?6`.7,2:O,3^10:/'(!,OH),@(4,5)/OH,, + -1\,O,!,?6`.7,6:O,@(3^35,5)/Me,3^-35:/NH2,4:/OH ) endfont; -\end{VerbatimOut} -\begin{mplibcode}\end{mplibcode}% +\end{mplibcode} +\input{temp-info.aux}% \MOLcaption{0mm}{70mm}\vspace{8mm}\\% %---------------------------------------------------------------------------- -\begin{VerbatimOut}{\tempaux} +\begin{mplibcode} font_wd:=160mm; font_ht:=90mm; beginfont("NO:7","EN:Maitotoxin","MW:3425.86") 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,-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 - ) + #150\,!7,@(1,2)/*OH,4:*/Me,5:/*Me,7=dl + ) endfont -\end{VerbatimOut} -\begin{mplibcode}\end{mplibcode}% +\end{mplibcode} +\input{temp-info.aux}% \MOLcaption{0mm}{50mm}\\% %---------------------------------------------------------------------------- \end{document} diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf index 9aee49e6677..c1862e2cb2b 100644 --- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf +++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 3.54 Copyright (c) 2013-2015 Akira Yamaji +% mcf2graph ver 3.55 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, @@ -426,8 +426,7 @@ vardef proc_env(expr n,m,a,b)= r:=(n mod 360); if m>=first_def_number: parMC[m][cntB-temp_cntB-1] else: if m=hz:if r=0:a elseif r<=90:b elseif r<=180:a elseif r<270:b else:a fi elseif m=vt:if r=0:b elseif r<90:a elseif r<=180:b elseif r<=271:a else:b fi - elseif (m>=-180)and(m<=180): m fi fi -enddef; + elseif (m>=-180)and(m<=180): m fi fi enddef; %------------------------------------------------------------------------------------------------- def pic_c(expr i,s)= substring(i,i+1) of s enddef; def put_string(expr n,p,r,s,w)= @@ -443,8 +442,7 @@ def put_string(expr n,p,r,s,w)= if (sw_numberA=1)or(sw_numberB=1): erase fill unitsquare xscaled nA yscaled AL shifted pairA wpcs 0.01pt; fi addto currentpicture also atom_font[nB] shifted (pairA-(0,atom_d[nB])) Cp(colorA[n]); - pairT:=pairT+(nA*dx,0); fi endfor -enddef; + pairT:=pairT+(nA*dx,0); fi endfor enddef; %------------------------------------------------------------------------------------------------- def wpcs expr n= withpen pencircle scaled n enddef; def sqr(expr WD,HT)= ((0,0)--(WD,0)--(WD,HT)--(0,HT)--cycle) enddef; @@ -453,8 +451,7 @@ def z_put(expr PA,PB,PD,CL)= save nA,nC,nD; nC:=length(Le-Ls); for i=0 upto nC/zebra_gap: nA:=zebra_gap*i/nC; nD:=(zebra_gap*i+ratio_zebra_black*zebra_gap)/nC; if nD>((nC-zebra_gap)/nC): nD:=1; fi - fill nA[PB,PA]--nA[PD,PA]--nD[PD,PA]--nD[PB,PA]--cycle Cp(CL); endfor -enddef; + fill nA[PB,PA]--nA[PD,PA]--nD[PD,PA]--nD[PB,PA]--cycle Cp(CL); endfor enddef; def cut_off(expr p,w,h,s)= p intersectionpoint sqr(1.1w,1.1h) shifted (s-(.5(1.1w),.5(1.1h))); enddef; def clipping(expr SA,SB,PA,PB,LEN)= pT:=PA--PB; tn:=0.6AL/LEN; @@ -501,8 +498,7 @@ def logfile_out= printf "%"; printf "\MOLinfo" for i=1 upto max_info_num: &"{"&info[i]&"}" endfor &"%"; printf "\MCFinfo{"&jobname&"}{"&decimal(char_num)&"}{"&mp_filename&"}{"&decimal(len_x) - &"}{"&decimal(len_y)&"}{"&decimal(ratio_bond_width)&"}{"&decimal(cntA)&"}{}{}%"; -enddef; + &"}{"&decimal(len_y)&"}{"&decimal(ratio_bond_width)&"}{"&decimal(cntA)&"}{}{}%"; enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% mc_num:=first_def_number; lr:='(60 for i==1 upto 10:: ,-60,60 endfor); rl:='(-60,lr); @@ -546,15 +542,13 @@ enddef; def font_size_set(expr m)(expr n)(expr o)(expr s)=% for j=0 upto length(s)-1: num_a:=ASCII(pic_c(j,s)); if f_FON[num_a]=1: atom_w[num_a]:=m*AL; atom_h[num_a]:=n*AL; atom_d[num_a]:=o*AL; fi - endfor -enddef; + endfor enddef; def font_size_setup= font_size_set( 1)( 1)(0)("CGHMNOQ"); font_size_set( .9)( 1)(0)("ABDEFIJKLPRSTUVWXYZ-+/><m"); font_size_set( .7)( 1)(0)(" ()0123456789nhj=*bdiltf"); font_size_set( .7)( 1)(.15)("pqg"); font_size_set( .7)( .8)(0)("acekosuvxzwry"); - font_size_set( .4)( 1)(0)(".,:;'`"); -enddef; + font_size_set( .4)( 1)(0)(".,:;'`"); enddef; %------------------------------------------------------------------------------------------------ def SP(expr a,b)expr p=subpath(a*length(p),b*length(p)) of p enddef; def vL= withpen penrazor scaled fP enddef; def hL= withpen penrazor rotated 90 scaled fP enddef; @@ -570,8 +564,7 @@ if f_FON[ASCII(c)]=1: z10=(fW,hH); z12=( 0,fH); z13=(hP,fH); z14=(hW,fH); z16=(aW,fH); z18=(hP,aH); z19=(hW,hP); s; atom_font[ASCII(c)]:=currentpicture shifted (font_gap*AL,font_gap*AL); - clearxy; save x,y; clearit; fi -enddef; + clearxy; save x,y; clearit; fi enddef; %------------------------------------------------------------------------------------------------- def font_setup= pickup pencircle scaled Apen_wd; fP:=Apen_wd; hP:=.5Apen_wd; FD(" ")(); @@ -670,8 +663,7 @@ def STa(expr a,b)= tblA[incr tbl_cnt]:=a; tblN[tbl_cnt]:=0; wtA[tbl_cnt]:=b; end def STb(expr a)(text s)= tblA[incr tbl_cnt]:=a; tblN[tbl_cnt]:=0; for list=s: tblN[tbl_cnt]:=tblN[tbl_cnt]+1; for j=1 upto tbl_max: if list=tblA[j]: tblB[tbl_cnt][tblN[tbl_cnt]]:=j; fi endfor - endfor -enddef; + endfor enddef; %------------------------------------------------------------------------------------------------- tbl_cnt:=0; STa("C",12.0107); STa("H",1.00794); STa("{Al}",26.9815); STa("{As}",74.9236); STa("B",10.811); @@ -704,8 +696,7 @@ def mol_check= hide_H:=warning_cnt:=0; for i=1 upto tbl_max: sumA[i]:=0; endfor knownA:=1; fi endfor if knownA=0: warning(" Unknown Str("&com_str[strA[i]]&") is used "&decimal(i)); fi endfor - sumA[2]:=sumA[2]+hide_H; -enddef; + sumA[2]:=sumA[2]+hide_H; enddef; %------------------------------------------------------------------------------------------------- def checklist_out= Mol_wt:=Mol_wtp:=nA:=0; fomula_str:=""; message "% There were "&fdr(3)(warning_cnt)&" warnings"; @@ -727,16 +718,14 @@ def checklist_out= Mol_wt:=Mol_wtp:=nA:=0; fomula_str:=""; else: Mol_wtp:=Mol_wtp+tmp_wtp; fi fomula_str:=fomula_str&stripP(tblA[i])&decimal(sumA[i]); message "% "&fixed_l(4)(stripP(tblA[i]))&"("&fdr(9)(wtA[i])&") * "&fdr(6)(sumA[i])&" = " - if tmp_wtp<=40: &fdr(12)(wtA[i]*sumA[i]); else: &fdr(12)(tmp_wtp)&" * 100"; fi fi - endfor + if tmp_wtp<=40: &fdr(12)(wtA[i]*sumA[i]); else: &fdr(12)(tmp_wtp)&" * 100"; fi fi endfor message "% Hide H = "&fdr(3)(hide_H); message "% Molecular Weight: " if Mol_wtp<=40: &fdr(10)(Mol_wt); else: &fdr(10)(Mol_wtp)&" * 100"; fi message "% --------------------------------------"; message "% Molecular Fomula: "&fomula_str; - message "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"; -enddef; -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + message "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"; enddef; +%------------------------------------------------------------------------------------------------ def MOL_out= mp_log_name:=jobname&"-"&fit_zero(char_num)&decimal(char_num)&"-"&mol_name&".mol"; printf ""; printf " -MCFtoMOL- "&fixed_l(20)(info[1]); printf ""; printf fdr(3)(cntA)&fdr(3)(cntB)&" 0 0 0 0 0 0 0 0999 V2000"; @@ -749,6 +738,5 @@ def MOL_out= mp_log_name:=jobname&"-"&fit_zero(char_num)&decimal(char_num)&"-"& elseif (lineB[i]=zf)or(lineB[i]=wb)or(lineB[i]=dt): nB:=6; elseif lineB[i]=wv: nB:=4; else: nA:=1; nB:=0; fi printf fdr(3)(sB[i])&fdr(3)(eB[i])&fdr(3)(nA)&fdr(3)(nB)&" 0 0"; fi endfor - printf "M END"; -enddef; -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + printf "M END"; enddef; +%------------------------------------------------------------------------------------------------ |