summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-02 21:42:47 +0000
committerKarl Berry <karl@freefriends.org>2016-04-02 21:42:47 +0000
commit0add57ee639971ed36026142db8ace9bb613d7af (patch)
tree74e65cdc7819210f1e7e2b4b24a5437d73dff0ec /Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
parent2d629dc1657a546dbe79d71fbfe89d81f15a5aec (diff)
mcf2graph (2apr16)
git-svn-id: svn://tug.org/texlive/trunk@40212 c570f23f-e606-0410-a88d-b1316a301751
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.tex32
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}