summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-01-17 20:54:44 +0000
committerKarl Berry <karl@freefriends.org>2022-01-17 20:54:44 +0000
commitcfbda5f99f31e4fa8bb06f60ee3511be9154b2fc (patch)
tree860a28011956c491e03eab60dd35ebcbd1055955 /Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
parentbd997a4c35d71bb2ba00908f6878953ae525d83e (diff)
mcf2graph (17jan22)
git-svn-id: svn://tug.org/texlive/trunk@61630 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.tex246
1 files changed, 110 insertions, 136 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 de9633a4d01..60ec165ac8a 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
@@ -1,23 +1,23 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2022.01.02
+% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2022.01.17
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% ** mcf2graph.mf must be version 4.77
+% ** mcf2graph.mp must be version 4.78
% ** use mcf_data_base.mcf
\documentclass{article}
%------------------------------------------------------------------------------
\usepackage{luamplib}%
\usepackage[T1]{fontenc}%
-\usepackage{textcomp,verbatim,mcf_setup}%
+\usepackage{textcomp,verbatim}%
\mplibcodeinherit{enable}%
\mplibverbatim{enable}%
\mplibnumbersystem{double}%
+\mpliblegacybehavior{disabled}%
\everymplib{%
- if unknown Ph1: input mcf2graph.mf; fi
+ if unknown Ph1: input mcf2graph; fi
outputformat:="eps";
- sw_output:=Font+Info+Temp;
+ sw_output:=Fig+Calc;
tag1:="J"; tag2:="C"; tag3:="fm"; tag4:="mw"; tag5:="EN"; tag6:="MW";
max_blength:=4.5mm;
- defaultfont:="uhvr8r";
defaultsize:=8bp;
defaultscale:=1;
}%
@@ -43,98 +43,50 @@
{{\tt FM(fm) :} molecular formula (calculated) \\
{{\tt MW(mw) :} molecular weight (calculated)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Chlorophyll a}
-\noindent%
-\begin{verbatim}
-beginfont("f:mcf_data_base.mcf","t:EN","v:Chlorophyll a","NO:-",
- ":,||,{4,11,17,23}:red,27:green") %%%% change color of atoms %%%%
- fsize:=(100mm,45mm);
- if check(mc)=0: MC(scantokens(mc)) fi
- ext(defaultscale:=0.8;
- label.lrt("fm: "&cal_FM,(0,h-5mm));
- label.lrt("mw: "&cal_MW,(0,h-9mm));
- label.lrt("MW: "&inf_MW,(0,h-13mm));)
-endfont
-\end{verbatim}
-%------------------------------------------------------------------------------------
-\begin{mplibcode}
-beginfont("f:mcf_data_base.mcf","t:EN","v:Chlorophyll a","NO:-",
- ":,||,{4,11,17,23}:red,27:green") %%%% change color of atoms %%%%
- fsize:=(100mm,45mm);
- if check(mc)=0: MC(scantokens(mc)) fi
- ext(defaultscale:=0.8;
- label.lrt("fm: "&cal_FM,(0,h-5mm));
- label.lrt("mw: "&cal_MW,(0,h-9mm));
- label.lrt("MW: "&inf_MW,(0,h-13mm));)
-endfont
-\end{mplibcode}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Dinophysistoxin-1}
+\subsection{Erythromycin}
\noindent%
+%----------------------------------------------------------------------------
+( pass mcf to MC() )
\begin{verbatim}
-beginfont("t:EN","v:Okadaic acid","EN:Dinophysistoxin-1",
- "MW:819",":,38:*/_,65=red") %%%% add methyl group (color red) %%%%
- fsize:=(150mm,35mm);
- if check(mc)=0: MC(scantokens(mc)) fi
+beginfigm("EN:Erythromycin","MW:733.93")
+ fsize:=(120mm,30mm);
+ MC(
+ <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',4,6^-35,8,10',12^35}:/*_,
+ {6^35,11,12^-35}:*/OH,
+ @$3,\*,O,30~zb,|,?6`.7,6:O,#.5,{5~wf,3^35}:/_,4:/*OH,3^-35:/*O!,##,
+ @$5,\*^30`1.7,O,!~zb,|,?6`.7,6:O,#.5,5:/*_,2:*/OH,3:/*N?!
+ )
ext(defaultscale:=0.8;
label.lrt("fm: "&cal_FM,(0,h-5mm));
label.lrt("mw: "&cal_MW,(0,h-9mm));
label.lrt("MW: "&inf_MW,(0,h-13mm));)
-endfont;
+endfigm;
\end{verbatim}
%----------------------------------------------------------------------------
\begin{mplibcode}
-beginfont("t:EN","v:Okadaic acid","EN:Dinophysistoxin-1",
- "MW:819",":,38:*/_,65=red") %%%% add methyl group (color red) %%%%
- fsize:=(150mm,35mm);
- if check(mc)=0: MC(scantokens(mc)) fi
- ext(defaultscale:=0.8;
- label.lrt("fm: "&cal_FM,(0,h-5mm));
- label.lrt("mw: "&cal_MW,(0,h-9mm));
- label.lrt("MW: "&inf_MW,(0,h-13mm));)
-endfont;
-\end{mplibcode}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newpage
-\subsection{Erythromycin}
-\noindent%
-%----------------------------------------------------------------------------
-\begin{verbatim}
-beginfont("EN:Erythromycin","MW:733.93",
- %------------------------------------------------------------------------
- ": <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',4,6^-35,8,10',12^35}:/*_, ",
- ": {6^35,11,12^-35}:*/OH, ",
- ": @$3,\*,O,30~zb,|,?6`.7,6:O,#.5,{5~wf,3^35}:/_,4:/*OH,3^-35:/*O!,##, ",
- ": @$5,\*^30`1.7,O,!~zb,|,?6`.7,6:O,#.5,5:/*_,2:*/OH,3:/*N?! ")
- %------------------------------------------------------------------------
+beginfigm("EN:Erythromycin","MW:733.93")
fsize:=(120mm,30mm);
- if check(mc)=0: MC(scantokens(mc)) fi
-endfont;
-\end{verbatim}
-%----------------------------------------------------------------------------
-\begin{mplibcode}
-beginfont("EN:Erythromycin","MW:733.93",
- %------------------------------------------------------------------------
- ": <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',4,6^-35,8,10',12^35}:/*_, ",
- ": {6^35,11,12^-35}:*/OH, ",
- ": @$3,\*,O,30~zb,|,?6`.7,6:O,#.5,{5~wf,3^35}:/_,4:/*OH,3^-35:/*O!,##, ",
- ": @$5,\*^30`1.7,O,!~zb,|,?6`.7,6:O,#.5,5:/*_,2:*/OH,3:/*N?! ")
- %------------------------------------------------------------------------
- fsize:=(120mm,30mm);
- if check(mc)=0: MC(scantokens(mc)) fi
+ MC(
+ <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',4,6^-35,8,10',12^35}:/*_,
+ {6^35,11,12^-35}:*/OH,
+ @$3,\*,O,30~zb,|,?6`.7,6:O,#.5,{5~wf,3^35}:/_,4:/*OH,3^-35:/*O!,##,
+ @$5,\*^30`1.7,O,!~zb,|,?6`.7,6:O,#.5,5:/*_,2:*/OH,3:/*N?!
+ )
ext(defaultscale:=0.8;
label.lrt("fm: "&cal_FM,(0,h-5mm));
label.lrt("mw: "&cal_MW,(0,h-9mm));
- label.lrt("MW: "&inf_MW,(0,h-13mm));)
-endfont;
+ label.lrt("MW: "&inf_MW,(0,h-13mm));
+ )
+endfigm;
\end{mplibcode}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Paclitaxel}
\noindent%
+( pass mcf to beginfigm() )
\begin{verbatim}
-beginfont("EN:Paclitaxel","MW:853.918",
+beginfigm("EN:Paclitaxel","MW:853.918",
%---------------------------------------------------------------------
": ?6,5=dl,@3,#1,36,45,45,45,45,##,&5,-4=?6,-4=?4,-1=wb,-3=wf,-1:O, ",
": 4:??,6:/_,{3^-60,15}:*/OH,8:/*H^-60,9:*/_^60,10://O, ",
@@ -143,11 +95,11 @@ beginfont("EN:Paclitaxel","MW:853.918",
%---------------------------------------------------------------------
fsize:=(120mm,30mm);
if check(mc)=0: MC(scantokens(mc)) fi
-endfont
+endfigm
\end{verbatim}
%----------------------------------------------------------------------------
\begin{mplibcode}
-beginfont("EN:Paclitaxel","MW:853.918",
+beginfigm("EN:Paclitaxel","MW:853.918",
%---------------------------------------------------------------------
": ?6,5=dl,@3,#1,36,45,45,45,45,##,&5,-4=?6,-4=?4,-1=wb,-3=wf,-1:O, ",
": 4:??,6:/_,{3^-60,15}:*/OH,8:/*H^-60,9:*/_^60,10://O, ",
@@ -160,83 +112,105 @@ beginfont("EN:Paclitaxel","MW:853.918",
label.lrt("fm: "&cal_FM,(0,h-5mm));
label.lrt("mw: "&cal_MW,(0,h-9mm));
label.lrt("MW: "&inf_MW,(0,h-13mm));)
-endfont
+endfigm
\end{mplibcode}
%----------------------------------------------------------------------------
-\subsection{Kekulene}
+\newpage
+\subsection{Chlorophyll a}
\noindent%
+( read data-base file )
\begin{verbatim}
-beginfont("EN:Kekulene","MW:600.7",
- %------------------------------------------------------------------------------
- ": <30,?6,{3,-3,-2,-3,-2,-3,-2,-3,-2,-3,(-2',5'),(5',-4')}=?6, ",
- ": {1,5',7,9,11,13,17,19,21,23,27,29,31,33,37,39,41,43,47,49,51,53,57,60}=dl ")
- %------------------------------------------------------------------------------
- fsize:=(120mm,25mm);
+beginfigm("f:mcf_data_base.mcf","t:EN","v:Chlorophyll a","NO:-")
+ sw_output:=Fig+Calc+Mcode; %%%% output temp-mc.aux %%%%
+ fsize:=(100mm,30mm);
if check(mc)=0: MC(scantokens(mc)) fi
-endfont
+endfigm
+\end{mplibcode}
+\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%%
\end{verbatim}
-%----------------------------------------------------------------------------
+%------------------------------------------------------------------------------------
\begin{mplibcode}
-beginfont("EN:Kekulene","MW:600.7",
- ": <30,?6,{3,-3,-2,-3,-2,-3,-2,-3,-2,-3,(-2',5'),(5',-4')}=?6, ",
- ": {1,5',7,9,11,13,17,19,21,23,27,29,31,33,37,39,41,43,47,49,51,53,57,60}=dl ")
- fsize:=(120mm,25mm);
+beginfigm("f:mcf_data_base.mcf","t:EN","v:Chlorophyll a","NO:-")
+ sw_output:=Fig+Calc+Mcode; fsize:=(100mm,30mm);
if check(mc)=0: MC(scantokens(mc)) fi
- ext(defaultscale:=0.8;
- label.lrt("fm: "&cal_FM,(0,h-5mm));
- label.lrt("mw: "&cal_MW,(0,h-9mm));
- label.lrt("MW: "&inf_MW,(0,h-13mm));)
-endfont
+endfigm
\end{mplibcode}
+\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Dinophysistoxin-1}
+\noindent%
+( read data-base file + pass mcf to beginfigm() )
+\begin{verbatim}
+beginfigm("t:EN","v:Okadaic acid","EN:Dinophysistoxin-1",
+ "MW:819",":,38:*/_,65=red") %%%% add methyl group (color red) %%%%
+ sw_output:=Fig+Calc+Mcode; %%%% output temp-mc.aux %%%%
+ fsize:=(120mm,20mm);
+ if check(mc)=0: MC(scantokens(mc))
+ VerbatimTeX("\gdef\EN{"&inf_EN&"}");
+ VerbatimTeX("\gdef\MW{"&inf_MW&"}");
+ VerbatimTeX("\gdef\mw{"&cal_MW&"}");
+ VerbatimTeX("\gdef\fm{"&cal_FM&"}");
+ fi
+endfigm;
+\end{mplibcode}
+\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%%
+{\tt ** EN:\EN \quad mw:\MW \quad MW:\mw \quad fm:\fm}%
+\end{verbatim}
+%----------------------------------------------------------------------------
+\begin{mplibcode}
+beginfigm("t:EN","v:Okadaic acid","EN:Dinophysistoxin-1",
+ "MW:819",":,38:*/_,65=red") %%%% add methyl group (color red) %%%%
+ sw_output:=Fig+Calc+Mcode; %%%% output temp-mc.aux %%%%
+ fsize:=(120mm,20mm);
+ if check(mc)=0: MC(scantokens(mc))
+ VerbatimTeX("\gdef\EN{"&inf_EN&"}");
+ VerbatimTeX("\gdef\MW{"&inf_MW&"}");
+ VerbatimTeX("\gdef\mw{"&cal_MW&"}");
+ VerbatimTeX("\gdef\fm{"&cal_FM&"}");
+ fi
+endfigm;
+\end{mplibcode}
+\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%%
+{\tt ** EN:\EN \quad mw:\MW \quad MW:\mw \quad fm:\fm}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
%----------------------------------------------------------------------------
\subsection{Maitotoxin}
\noindent%
+( read data-base file )
%--------------------------------------------------------------------------------
\begin{verbatim}
%--------------------------------------------------------------------------------
\begin{mplibcode}
- beginfont("t:EN","v:Maitotoxin")
- sw_output:=Info+Mcode+Temp; %%%% output temp-info,temp-mc.aux %%%%
- endfont;
-\end{mplibcode}
-\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%%
-\begin{mplibcode}
- beginfont("t:EN","v:Maitotoxin")
+ beginfigm("t:EN","v:Maitotoxin")
+ sw_output:=Fig+Calc+Mcode; %%%% output temp-mc.aux %%%%
fsize:=(120mm,60mm); fmargin:=(0,3mm); sw_frame:=Outside;
- if check(mc)=0: MC(scantokens(mc)) fi %%%% output font %%%%
- endfont
+ if check(mc)=0: MC(scantokens(mc))
+ VerbatimTeX("\gdef\EN{"&inf_EN&"}");
+ VerbatimTeX("\gdef\MW{"&inf_MW&"}");
+ VerbatimTeX("\gdef\mw{"&cal_MW&"}");
+ VerbatimTeX("\gdef\fm{"&cal_FM&"}");
+ fi
+ endfigm
\end{mplibcode}
-%--------------------------------------------------------------------------------
-\newread\auxfile%
-\openin\auxfile=temp-info.aux %%%% input temp-info.aux %%%%
-\read\auxfile to \info%
-\infotovar{\info} %%%% info to variables %%%%
-\closein\auxfile%
+\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%%
{\tt ** EN:\EN \quad mw:\MW \quad MW:\mw \quad fm:\fm}%
%--------------------------------------------------------------------------------
\end{verbatim}
%--------------------------------------------------------------------------------
\begin{mplibcode}
- beginfont("t:EN","v:Maitotoxin")
- sw_output:=Info+Mcode+Temp; %%%% output temp-info.aux %%%%
- if check(mc)=0: MC(scantokens(mc)) fi
- endfont
-\end{mplibcode}
-\begin{mplibcode}
- beginfont("t:EN","v:Maitotoxin")
+ beginfigm("t:EN","v:Maitotoxin")
+ sw_output:=Fig+Calc+Mcode;
fsize:=(120mm,60mm); fmargin:=(0,3mm); sw_frame:=Outside;
- if check(mc)=0: MC(scantokens(mc)) fi %%%% output font %%%%
- endfont
+ if check(mc)=0: MC(scantokens(mc))
+ VerbatimTeX("\gdef\EN{"&inf_EN&"}");
+ VerbatimTeX("\gdef\MW{"&inf_MW&"}");
+ VerbatimTeX("\gdef\mw{"&cal_MW&"}");
+ VerbatimTeX("\gdef\fm{"&cal_FM&"}");
+ fi
+ endfigm
\end{mplibcode}
-%--------------------------------------------------------------------------------
-\newread\auxfile%
-\openin\auxfile=temp-info.aux %%%% input temp-info.aux %%%%
-\read\auxfile to \info%
-\infotovar{\info} %%%% info to variables %%%%
-\closein\auxfile%
-\verbatiminput{temp-mc.aux} %%%% input temp-mc.aux %%%%
+\verbatiminput{temp-mc.aux}
{\tt ** EN:\EN \quad mw:\MW \quad MW:\mw \quad fm:\fm}%
%--------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -244,7 +218,7 @@ endfont
\subsection{TCA cycle}
\noindent%
\begin{mplibcode}
-beginfont("EN:TCA cycle")
+beginfigm("EN:TCA cycle")
fsize:=(160mm,75mm);
max_blength:=5mm;
%--------------------------------------------------------------------------------
@@ -306,11 +280,11 @@ r_arrow(10mm)( 0)(p10+( 1.1w10,0.3h10))("NAD+",1)("NADH2+",1.5);
defaultscale:=1.5;
label("TCA-cycle",(0.5w,0.5h));
)
-endfont
+endfigm
\end{mplibcode}
%------------------------------------------------------------------------
\begin{verbatim}
-beginfont("EN:TCA cycle")
+beginfigmy"EN:TCA cycle")
fsize:=(160mm,75mm);
max_blength:=5mm;
COOH:='(//O,!,OH);
@@ -350,7 +324,7 @@ r_arrow(10mm)( 0)(p10+( 1.1w10,0.3h10))("NAD+",1)("NADH2+",1.5);
defaultscale:=1.5;
label("TCA-cycle",(0.5w,0.5h));
)
-endfont
+endfigm
\end{verbatim}
%----------------------------------------------------------------------------
\end{document}