diff options
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.tex | 32 |
1 files changed, 19 insertions, 13 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 e44fc63a721..3309cb5bf90 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2016.3.24 +% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2016.4.2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass{article} %------------------------------------------------------------------------------ @@ -18,6 +18,8 @@ %------------------------------------------------------------------------------ \makeatletter% \newdimen \MOLwidth% +\newif\ifCONT@% +\newread\@auxf% %------------------------------------------------------------------------------ \def\@fst@param#1:#2;{#1}\def\@sec@param#1:#2;{#2}% \def\mol@sel#1{% @@ -37,14 +39,18 @@ \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}% %------------------------------------------------------------------------------- -\def\INFO#1{% - \edef\MOLnum{}\edef\MOLnameE{}\edef\MOLlenx{}\edef\MOLmw{}% - \@tfor\@temp:=#1\do{\mol@sel{\@temp}} -}% +\def\inputINFO#1{% +\openin\@auxf=#1% +\CONT@true% +\loop +\read\@auxf to \tempinfo% +\ifeof\@auxf\CONT@false\else \@for\@temp:=\tempinfo\do{\mol@sel\@temp} \fi% +\ifCONT@ \repeat +\closein\@auxf}% %-------------------------------------------------------------------------------- \newdimen\MOLwidth% \newdimen\heightCap% -\def\MOLcaption#1#2{\input temp-info.aux\relax % +\def\MOLcaption#1#2{% \MOLwidth=\MOLlenx pt% \advance\MOLwidth -#1\relax% \heightCap=#2% @@ -89,7 +95,7 @@ ) endfont \end{mplibcode} -\input{temp-info.aux}% +\inputINFO{temp-info.aux}% \MOLcaption{0mm}{35mm}\hspace{8mm}% %---------------------------------------------------------------------------- \begin{mplibcode} @@ -103,7 +109,7 @@ ) endfont \end{mplibcode} -\input{temp-info.aux}% +\inputINFO{temp-info.aux}% \MOLcaption{0mm}{45mm}\vspace{6mm}\\% %---------------------------------------------------------------------------- \begin{mplibcode} @@ -116,7 +122,7 @@ ) endfont \end{mplibcode} -\input{temp-info.aux}% +\inputINFO{temp-info.aux}% \MOLcaption{0mm}{35mm}\hspace{8mm}% %---------------------------------------------------------------------------- \begin{mplibcode} @@ -130,7 +136,7 @@ beginfont("NO:4","EN:Gibberellin A3","MW:346.37"); ) endfont; \end{mplibcode} -\input{temp-info.aux}% +\inputINFO{temp-info.aux}% \MOLcaption{0mm}{38mm}\vspace{5mm}\\% %---------------------------------------------------------------------------- \begin{mplibcode} @@ -145,7 +151,7 @@ beginfont("NO:5","EN:Erythromycin","MW:733.93"); ) endfont; \end{mplibcode} -\input{temp-info.aux}% +\inputINFO{temp-info.aux}% \MOLcaption{30mm}{52mm}\hspace{8mm}% %---------------------------------------------------------------------------- \begin{mplibcode} @@ -165,7 +171,7 @@ beginfont("NO:6","EN:Vancomycin","MW:1449.25"); ) endfont; \end{mplibcode} -\input{temp-info.aux}% +\inputINFO{temp-info.aux}% \MOLcaption{55mm}{50mm}\vspace{6mm}\\% %---------------------------------------------------------------------------- \begin{mplibcode} @@ -191,7 +197,7 @@ endfont; ) endfont \end{mplibcode} -\input{temp-info.aux}% +\inputINFO{temp-info.aux}% \MOLcaption{110mm}{70mm}\\% %---------------------------------------------------------------------------- \end{document} |