summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-03-13 20:46:46 +0000
committerKarl Berry <karl@freefriends.org>2022-03-13 20:46:46 +0000
commitc3546bd2d946b41075498bb11ca8a7201616a594 (patch)
tree680fddb829f4ab51c38a530410e81c5872ff3c95 /Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
parentbf71906aa9c83fbd475657fc543e8bc185aee435 (diff)
mcf2graph (13mar22) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2021.final@62679 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex')
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex82
1 files changed, 46 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
index b4239bfccd6..8508fc134fd 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
@@ -1,25 +1,24 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of MCF Typeset with LuaLaTeX(luamplib) by A.Yamaji 2022.02.27
+% Example of MCF Typeset with LuaLaTeX(luamplib) by A.Yamaji 2022.03.13
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% ** mcf2graph.mf must be version 4.81
-% ** use mcf_data_base.mcf
+% ** mcf2graph.mf must be version 4.82
+% ** use mcf_library.mcf
% ** typeset by LuaLaTeX(luamplib)
\documentclass{article}
-\usepackage{luamplib}%
-\usepackage[T1]{fontenc}%
-\mplibcodeinherit{enable}%
-\mplibnumbersystem{double}%
-\mpliblegacybehavior{disabled}%
+\usepackage{luamplib}
+\usepackage[T1]{fontenc}
+\mplibcodeinherit{enable}
+\mplibnumbersystem{double}
+\mpliblegacybehavior{disabled}
%-------------------------------------------------------------------------
-\everymplib{%
- if unknown Ph1: input mcf2graph; fi
- outputformat:="eps";
- sw_output:=Fig+Calc;
- fsize:=(35mm,24mm);
- max_blength:=4mm;
- defaultfont:="uhvr8r";
- defaultsize:=8;
- defaultscale:=1;
+\everymplib{
+ if unknown Ph1:
+ input mcf2graph;
+ outputformat:="eps";
+ sw_output:=Fig+Calc;
+ fsize:=(35mm,24mm);
+ max_blength:=4mm;
+ fi
}%
%-------------------------------------------------------------------------
\pagestyle{empty}
@@ -28,34 +27,41 @@
\textwidth=192mm
\textheight=280mm
\parindent=0mm
+\newcount\headeroff
+\headeroff=0
+\makeatletter
%-------------------------------------------------------------------------
\begin{document}
+\ifnum\z@=\headeroff%
\begin{center}
{\Huge\sf Molecular Coding Format examples} \vspace{5mm} \\
Author : Akira Yamaji \quad Date : \today \\
Located at : http://www.ctan.org/pkg/mcf2graph
\end{center}
{\small *typeset with LuaLaTeX \quad
- *use molecular data base file 'mcf\_data\_base.mcf' \\
+ *use molecular library file 'mcf\_library.mcf' \\
** FM(fm):molecular formula (calculated) \quad
* MW(mw):molecular weight (calculated)} \vspace{3mm} \\
+\fi%
%-------------------------------------------------------------------------
\noindent%
-\makeatletter
-\newbox \f@box%
-\newcount \f@num%
-\newcount \t@num%
+\newbox \fig@box%
+\newcount \fig@num%
+\newcount \col@num%
\font\labelM=cmtt8 at 6pt\relax%
%-------------------------------------------------------------------------
-\f@num=1%
-\t@num=0%
+\fig@num=0%
+\col@num=0%
\unitlength=0.01mm%
+\edef\zero{0}%
\noindent%
%-------------------------------------------------------------------------
\newif\ifCONT@%
\CONT@true%
\loop%
-\sbox{\f@box}{%
+\advance\fig@num\@ne\relax%
+\advance\col@num\@ne\relax%
+\sbox{\fig@box}{%
\begin{mplibcode}
beginfigm("t:EXA","v+:1")
if check(mc)=0:
@@ -64,22 +70,26 @@
VerbatimTeX("\gdef\MW{"&inf_MW&"}");
VerbatimTeX("\gdef\mw{"&cal_MW&"}");
VerbatimTeX("\gdef\fm{"&cal_FM&"}");
- fi
+ fi
endfigm
+ VerbatimTeX("\gdef\EOF{"&decimal(f_EOF)&"}");
\end{mplibcode}
}%
%------------------------------------------------------------------------
-\begin{picture}(3750,3350)%
- \put(20,3000){\footnotesize\bf \EN}%
- \put(20,2750){\labelM mw:\mw { / }fm:\fm}%
- \put(20,2530){\labelM MW:\MW { / }[\the\f@num]}%
- \put(0,0){\makebox(3750,2530){\usebox{\f@box}}}%
-\end{picture}%
+\ifx\EOF\zero%
+ \begin{picture}(3750,3350)%
+ \put(20,3000){\footnotesize\bf \EN}%
+ \put(20,2750){\labelM mw:\mw { / }fm:\fm}%
+ \put(20,2530){\labelM MW:\MW { / }[\the\fig@num]}%
+ \put(0,0){\makebox(3750,2530){\usebox{\fig@box}}}%
+ \end{picture}%
+ \ifnum\col@num=5 \\ \col@num=\z@ \fi%
+\else%
+ \CONT@false%
+\fi%
%------------------------------------------------------------------------
-\advance\f@num\@ne\relax%
-\advance\t@num\@ne\relax%
-\ifnum\t@num=5 \\ \t@num=\z@ \fi%
-\ifnum\f@num=156 \CONT@false \fi%
+%%%%%%%%\ifnum\fig@num=10 \CONT@false \fi%
+\message{[\the\fig@num:\EN]}%
\ifCONT@ \repeat%
%------------------------------------------------------------------------------
\end{document}