diff options
author | Karl Berry <karl@freefriends.org> | 2020-08-10 21:03:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-08-10 21:03:24 +0000 |
commit | ac19f486a8738d31f57d8017a755088231008738 (patch) | |
tree | dad0a2ade0c0d28e9710a17e83fc5a7514a640d0 /Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex | |
parent | 6f5713565f4a97d90fca8a6cc5dfa14bf4a7bb42 (diff) |
mcf2graph (10aug20)
git-svn-id: svn://tug.org/texlive/trunk@56086 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.tex | 91 |
1 files changed, 34 insertions, 57 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex index 871b00e1b57..fcbacc1ec87 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex @@ -1,8 +1,11 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2019.12.13 +% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2020.08.10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage{graphicx} +%--------------------- +\usepackage{mcf_setup} +%--------------------- \pagestyle{empty} \topmargin=-20mm \oddsidemargin=-12mm @@ -15,61 +18,14 @@ \newbox \@stringbox% \newcount \fontnum% \newcount \tnum% +\tnum=0% +\font\labelM=cmtt8 at 6pt\relax% +%------------------------------------------------------------------------------- \newif\ifCONT@% \newread\@auxf% -%------------------------------------------------------------------------------- -\def\mol@sel#1{% -\if#1\empty\relax\else% - \edef\@tag{\expandafter\@fst@param#1;}% - \edef\@var{\expandafter\@sec@param#1;}% - \ifx\@tag\@F\edef\MOLfile{\@var}\fi \ifx\@tag\@C\edef\MOLchar{\@var}\fi% - \ifx\@tag\@Lx\edef\MOLlenx{\@var}\fi \ifx\@tag\@Ly\edef\MOLleny{\@var}\fi% - \ifx\@tag\@EN\edef\MOLnameE{\@var}\fi \ifx\@tag\@JN\edef\MOLnameJ{\@var}\fi% - \ifx\@tag\@CAS\edef\MOLcas{\@var}\fi \ifx\@tag\@USE\edef\MOLuse{\@var}\fi% - \ifx\@tag\@FM\edef\MOLfm{\@var}\fi \ifx\@tag\@cFM\edef\CALfm{\@var}\fi% - \ifx\@tag\@MW\edef\MOLmw{\@var}\fi \ifx\@tag\@cMW\edef\CALmw{\@var}\fi% - \ifx\@tag\@logP\edef\MOLlogP{\@var}\fi \ifx\@tag\@EXA\edef\MOLextA{\@var}\fi% - \ifx\@tag\@EXB\edef\MOLextB{\@var}\fi \ifx\@tag\@NO\edef\MOLnum{\@var}\fi\fi}% -%------------------------------------------------------------------------------- -\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@JN{JN}\def\@CAS{CAS}% -\def\@MW{MW}\def\@cMW{cMW}\def\@FM{FM}\def\@cFM{cFM}\def\@Lx{Lx}\def\@Ly{Ly}% -\def\@NO{NO}\def\@USE{USE}\def\@logP{logP}\def\@EXA{EXA}\def\@EXB{EXB}% -%------------------------------------------------------------------------------- -\def\@fst@param#1:#2;{#1}\def\@sec@param#1:#2;{#2}% -\def\@stru#1[#2]{\font\@strufont=#1\relax\hbox{\@strufont\char#2}}% -%------------------------------------------------------------------------------- -\font\labelM=cmtt8 at 6pt% -\def\put@char{% - \unitlength=0.01mm\relax \@tempcnta=3300\relax \@tempcntb=3750\relax% - \begin{picture}(\@tempcntb,\@tempcnta)% - \advance\@tempcnta -300\relax% - \put(20,\@tempcnta){\footnotesize\bf [\the\fontnum] \MOLnameE}% - \advance\@tempcnta -250\relax% - \put(20,\@tempcnta){\labelM MW:\CALmw { / }FM:\CALfm}% - \advance\@tempcnta -220\relax% - \put(20,\@tempcnta){\labelM MW:\MOLmw(data)}% - \put( 0,0){\makebox(\@tempcntb,\@tempcnta){\@stru{\MOLfile}[\MOLchar]}}% - \end{picture}% -} -%------------------------------------------------------------------------------- -% modified latex2e kernel program control (@for delimiter ','=>';') -\def\@sfor#1#2{\expandafter\def\expandafter\@tmp\expandafter{#1}% - \ifx\@tmp\@empty\else\expandafter\@rep#1;\@nil;\@@\@list{#2}\fi}% -\def\@rep#1;#2\@@#3#4{\def#3{#1}\ifx#3\@nnil% - \expandafter\@fornoop\else#4\relax\expandafter\@rep\fi#2\@@#3{#4}}% -%------------------------------------------------------------------------------- -\def\inputINFOS#1{\openin\@auxf=#1\CONT@true% -\loop -\read\@auxf to \@info% -\ifeof\@auxf\CONT@false\else\@sfor\@info{\mol@sel\@list}% - \put@char% - \advance\fontnum\@ne\relax\advance\tnum\@ne\relax% - \ifnum\tnum=5 \\ \tnum=0\relax \fi% -\fi% -\ifCONT@ \repeat -\closein\@auxf}% -%------------------------------------------------------------------------------- -\makeatother +%------------------------------------------------------------------------ +\fontnum=1% +\unitlength=0.01mm% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{center} @@ -79,10 +35,31 @@ \end{center} {\small ** FM:Molecular formula calculated by mcf2graph \quad ** MW:Molecular weight calculated by mcf2graph}\vspace{3mm}\\ -\fontnum=1% -\noindent% %------------------------------------------------------------------------ -\inputINFOS{mcf_exa_soc-info.aux}% +\noindent% +\openin\@auxf=mcf_exa_soc-info.aux% +\CONT@true% +\loop% +\read\@auxf to \@info% +\ifeof\@auxf\CONT@false\else\@sfor\@info{\tag@var\@list}% + %------------------------------------------------------------ + \begin{picture}(3750,3300)% + \put(20,3000){\footnotesize\bf \the\fontnum:\EN}% + \put(20,2750){\labelM MW:\mw { / }FM:\fm}% + \put(20,2530){\labelM MW:\MW(data)}% + \put( 0,0){% + \makebox(3750,2530){% + \font\@strufont=\File\relax\hbox{\@strufont\char\Char}% + }% + }% + \end{picture}% + %------------------------------------------------------------ + \advance\fontnum1\relax% + \advance\tnum1\relax% + \ifnum\tnum=5 \\ \tnum=0 \fi% +\fi% +\ifCONT@ \repeat% +\closein\@auxf% %------------------------------------------------------------------------ \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |