summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex')
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex70
1 files changed, 41 insertions, 29 deletions
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 fdcc5d97980..63286aa6549 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 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2015.8.14
+% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2015.8.18
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
%-------------------------------------------------------------------------------
\usepackage{luamplib}%
\mplibcodeinherit{enable}%
\mplibverbatim{enable}%
-\everymplib{if unknown Ph1: input mcf2graph.mf; sw_logout:=1; sw_info_lenx:=1;%
- mp_log_name:="temp-info.aux"; fi}%
+\everymplib{if unknown Ph1: input mcf2graph.mf; mp_log_name:="temp-info.aux";
+ sw_logout:=sw_info_lenx:=sw_info_weight:=sw_info_formula:=1; fi}%
\everyendmplib{write EOF to mp_log_name;}%
%-------------------------------------------------------------------------------
\makeatletter%
@@ -21,26 +21,35 @@
\ifx\@fst\@F\edef\MOLfile{\@sec}\fi \ifx\@fst\@C\edef\MOLchar{\@sec}\fi%
\ifx\@fst\@Lx\edef\MOLlenx{\@sec}\fi \ifx\@fst\@Ly\edef\MOLleny{\@sec}\fi%
\ifx\@fst\@EN\edef\MOLnameE{\@sec}\fi \ifx\@fst\@JN\edef\MOLnameJ{\@sec}\fi%
- \ifx\@fst\@CAS\edef\MOLcas{\@sec}\fi \ifx\@fst\@MW\edef\MOLmw{\@sec}\fi%
- \ifx\@fst\@FM\edef\MOLfomura{\@sec}\fi \ifx\@fst\@USE\edef\MOLuse{\@sec}\fi%
+ \ifx\@fst\@CAS\edef\MOLcas{\@sec}\fi \ifx\@fst\@USE\edef\MOLuse{\@sec}\fi%
+ \ifx\@fst\@FM\edef\MOLfm{\@sec}\fi \ifx\@fst\@FMc\edef\CALfm{\@sec}\fi%
+ \ifx\@fst\@MW\edef\MOLmw{\@sec}\fi \ifx\@fst\@MWc\edef\CALmw{\@sec}\fi%
\ifx\@fst\@logP\edef\MOLlogP{\@sec}\fi \ifx\@fst\@EXA\edef\MOLextA{\@sec}\fi%
\ifx\@fst\@EXB\edef\MOLextB{\@sec}\fi \ifx\@fst\@NO\edef\MOLnum{\@sec}\fi\fi}%
%-------------------------------------------------------------------------------
-\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@JN{JN}\def\@CAS{CAS}\def\@MW{MW}%
-\def\@FM{FM}\def\@Lx{Lx}\def\@Ly{Ly}\def\@NO{NO}\def\@USE@{USE}\def\@logP@{logP}%
-\def\@EXA@{EXA}\def\@EXB@{EXB}%
+\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@JN{JN}\def\@CAS{CAS}%
+\def\@MW{MW}\def\@MWc{MWc}\def\@FM{FM}\def\@FMc{FMc}\def\@Lx{Lx}\def\@Ly{Ly}%
+\def\@NO{NO}\def\@USE@{USE}\def\@logP@{logP}\def\@EXA@{EXA}\def\@EXB@{EXB}%
%-------------------------------------------------------------------------------
-\newdimen\MOLwidth%
\def\INFO#1{%
\edef\MOLnum{}\edef\MOLnameE{}\edef\MOLlenx{}\edef\MOLmw{}%
\@tfor\@temp:=#1\do{\mol@sel{\@temp}}
}%
%--------------------------------------------------------------------------------
+\newdimen\MOLwidth%
+\newdimen\heightCap%
\def\MOLcaption#1#2{\input temp-info.aux\relax %
\MOLwidth=\MOLlenx pt%
\advance\MOLwidth -#1\relax%
-\llap{\makebox[\MOLwidth][l]{\raisebox{#2}%
-{\sf NO.\MOLnum{ }\MOLnameE{ }\tiny (MW:\MOLmw)}}}}%
+\heightCap=#2%
+\llap{\makebox[\MOLwidth][l]{\raisebox{\heightCap}{\sf NO.\MOLnum{ }\MOLnameE{ }}}}%
+\advance\heightCap -5mm\relax%
+\llap{\makebox[\MOLwidth][l]{\raisebox{\heightCap}{\small\tt FM(C):\CALfm}}}%
+\advance\heightCap -4mm\relax%
+\llap{\makebox[\MOLwidth][l]{\raisebox{\heightCap}{\small\tt MW(C):\CALmw}}}%
+\advance\heightCap -4mm\relax%
+\llap{\makebox[\MOLwidth][l]{\raisebox{\heightCap}{\small\tt MW(D):\MOLmw}}}%
+}%
\makeatother%
%------------------------------------------------------------------------------------
\pagestyle{empty}
@@ -52,8 +61,11 @@
%------------------------------------------------------------------------------------
\begin{document}
{\LARGE MCF example for luamplib(LuaLaTeX) }%
- \hspace{20mm}by Akira Yamaji 2015.8.14\vspace{8mm}\\
+ \hspace{20mm}by Akira Yamaji 2015.8.18\vspace{6mm}\\
%------------------------------------------------------------------------------------
+{{\small {\tt FM(C) :} molecular formula calculated by mcf2graph}\\
+{{\small {\tt MW(C) :} molecular weight calculated by mcf2graph}\\
+{{\small {\tt MW(D) :} molecular weight from literature data}\\
\begin{mplibcode}
font_wd:=100mm; font_ht:=50mm;
beginfont("NO:1","EN:Chlorophyll a","MW:893.49")
@@ -68,48 +80,48 @@
endfont
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{35mm}\hspace{8mm}%
+\MOLcaption{0mm}{40mm}\hspace{8mm}%
%----------------------------------------------------------------------------
\begin{mplibcode}
- font_wd:=60mm; font_ht:=40mm;
+ font_wd:=60mm; font_ht:=35mm;
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,
+ @(13,15,17,20)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)dl
+ 14\*,?5,$(1,4)dl,3:O
)
endfont
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{43mm}\vspace{8mm}\\%
+\MOLcaption{0mm}{48mm}\vspace{6mm}\\%
%----------------------------------------------------------------------------
\begin{mplibcode}
font_wd:=90mm; font_ht:=30mm;
- beginfont("NO:3","EN:beta-Carotene","MW:536.87")
+ beginfont("NO:3","EN:beta-carotene","MW:536.87")
MCf(^^30,
- ?6,3:d,@(3,5^35,5^-35)/Me,
+ ?6,3=dl,@(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
+ ?6,6=dl,@(6,2^35,2^-35)/Me
)
endfont
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{25mm}\hspace{8mm}%
+\MOLcaption{0mm}{35mm}\hspace{8mm}%
%----------------------------------------------------------------------------
\begin{mplibcode}
font_wd:=50mm; font_ht:=40mm;
-beginfont("NO:4","EN:Gibberellin","MW:346.37");
+beginfont("NO:4","EN:Gibberellin A3","MW:346.37");
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,
+ 5=dl,11=wf,13=wb,7:/COOH,11://Me,1:*/OH,12:/*OH,2:*/Me,
@(3^-60,9^60)*/H
)
endfont;
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{25mm}\vspace{10mm}\\%
+\MOLcaption{0mm}{38mm}\vspace{5mm}\\%
%----------------------------------------------------------------------------
\begin{mplibcode}
font_wd:=60mm; font_ht:=70mm;
@@ -124,10 +136,10 @@ beginfont("NO:5","EN:Erythromycin","MW:733.93");
endfont;
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{55mm}\hspace{8mm}%
+\MOLcaption{20mm}{56mm}\hspace{8mm}%
%----------------------------------------------------------------------------
\begin{mplibcode}
-font_wd:=100mm; font_ht:=70mm;
+font_wd:=90mm; font_ht:=55mm;
beginfont("NO:6","EN:Vancomycin","MW:1449.25");
MCf(^^30,
{,``1,!12,$(1,3,12)zf,7=wf,/H^-60,60,*/OH,60,
@@ -144,10 +156,10 @@ beginfont("NO:6","EN:Vancomycin","MW:1449.25");
endfont;
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{70mm}\vspace{8mm}\\%
+\MOLcaption{52mm}{58mm}\vspace{6mm}\\%
%----------------------------------------------------------------------------
\begin{mplibcode}
- font_wd:=160mm; font_ht:=90mm;
+ font_wd:=150mm; font_ht:=80mm;
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,
@@ -171,6 +183,6 @@ endfont;
endfont
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{50mm}\\%
+\MOLcaption{0mm}{53mm}\\%
%----------------------------------------------------------------------------
\end{document}