texlive[49588] Master/texmf-dist: mcf2graph (3jan19)

commits+karl at tug.org commits+karl at tug.org
Thu Jan 3 22:58:34 CET 2019


Revision: 49588
          http://tug.org/svn/texlive?view=revision&revision=49588
Author:   karl
Date:     2019-01-03 22:58:34 +0100 (Thu, 03 Jan 2019)
Log Message:
-----------
mcf2graph (3jan19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/README
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-064.mps
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
    trunk/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG	2019-01-03 21:58:12 UTC (rev 49587)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG	2019-01-03 21:58:34 UTC (rev 49588)
@@ -1,6 +1,10 @@
 *******************************************************************************
- Changelog of mcf2graph software package          by Akira Yamaji 2018-11-11
+ Changelog of mcf2graph software package          by Akira Yamaji 2019-01-03
 *******************************************************************************
+[ver. 4.35  / 2019-01-03]
+  -fix bug in numbering bond
+  -update MCF manual
+
 [ver. 4.34  / 2018-11-11]
   -change default driver(graphicx,hyperref)
    dvipdfmx => pdftex

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/README
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/README	2019-01-03 21:58:12 UTC (rev 49587)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/README	2019-01-03 21:58:34 UTC (rev 49588)
@@ -1,7 +1,7 @@
 ********************************************************************************
  mcf2graph  : Convert Molecular Coding Format to graphics with METAFONT/METAPOST
  Author     : Akira Yamaji
- version    : 4.34 2018-11-11
+ version    : 4.35 2019-01-03
  E-mail     : mcf2graph at gmail.com
  Located at : http://www.ctan.org/pkg/mcf2graph
 ********************************************************************************
@@ -19,13 +19,13 @@
  ( 3) mcf2graph.mf           Macro of Metafont / Metapost
  ( 4) mcf_manual.tex         MCF syntax manual(LaTeX file)
  ( 5) mcf_man_soc.mf         Molecular difinition file for mcf_manual.tex
- ( 6) mcf_man_soc-064.mps    No.64 EPS(with color) file of (4)
- ( 7) mcf_manual.pdf         PDF of (4) (used LaTeX,dvipdfmx)
+ ( 6) mcf_man_soc-064.mps    No.64 eps(with color) file of (4)
+ ( 7) mcf_manual.pdf         PDF of (4) (used pdftex(LaTeX))
  ( 8) mcf_example.tex        LaTeX example,
                                Make file 'mcf_exa_soc-info.aux' before typeset
                                >mpost -s ahlength=1 -s bboxmargin=0 mcf_exa_soc.mf
  ( 9) mcf_exa_soc.mf         Molecular difinition file for mcf_example.tex
- (10) mcf_example.pdf        PDF of (8) (used LaTeX,dvipdfmx)
+ (10) mcf_example.pdf        PDF of (8) (used pdftex(LaTeX))
  (11) mcf_mplib_exa.tex      luamplib(LuaLaTeX) example
  (12) mcf_example.pdf        PDF of (11) typeset with LuaTeX(LuaLaTeX)
 
@@ -33,15 +33,16 @@
  Minimum requirement to run mcf2graph : mpost.exe,mpost.dll,mpost.mp,plain.mp
  ( 1) >mpost -s bboxmargin=0  FILENAME  => output no graphic file
  ( 2) >mpost -s bboxmargin=1  FILENAME  => output first font only (for test)
- ( 3) >mpost -s ahangle=1     FILENAME  => output PNG file (default:eps)
- ( 4) >mpost -s ahangle=2     FILENAME  => output SVG file 
- ( 5) >mpost -s ahangle=3     FILENAME  => output EPS file 
- ( 6) >mpost -s ahlength=1    FILENAME  => output aux file
- ( 7) >mpost -s ahlength=2    FILENAME  => output report file
- ( 8) >mpost -s ahlength=5    FILENAME  => output MDL Molfile(V2000)
- ( 9) >mpost -s ahlength=6    FILENAME  => output MDL Molfile(V3000)
- (10) >mpost -s labeloffset=1 FILENAME  => use plain.mp 'label','drawarrow'
- (11) >mpost -s labeloffset=2 FILENAME  => atomfont="uhvr8r"
+ ( 3) >mpost -s ahangle=0     FILENAME  => output eps file (.mps default)
+ ( 4) >mpost -s ahangle=1     FILENAME  => output png file 
+ ( 5) >mpost -s ahangle=2     FILENAME  => output svg file 
+ ( 6) >mpost -s ahangle=3     FILENAME  => output eps file (.eps)
+ ( 7) >mpost -s ahlength=1    FILENAME  => output aux file
+ ( 8) >mpost -s ahlength=2    FILENAME  => output report file
+ ( 9) >mpost -s ahlength=5    FILENAME  => output mol file(V2000)
+ (10) >mpost -s ahlength=6    FILENAME  => output mol file(V3000)
+ (11) >mpost -s labeloffset=1 FILENAME  => use plain.mp 'label','drawarrow'
+ (12) >mpost -s labeloffset=2 FILENAME  => atomfont="uhvr8r"
 
 4. License
  Permission is hereby granted, free of charge, to any person obtaining a copy

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf	2019-01-03 21:58:12 UTC (rev 49587)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf	2019-01-03 21:58:34 UTC (rev 49588)
@@ -1,7 +1,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format for mcf_example.tex   by Akira Yamaji  2018.11.11
+% Molecular Coding Format for mcf_example.tex   by Akira Yamaji  2019.01.03
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-input mcf2graph.mf;   %%% it must be version 4.34 or later
+input mcf2graph.mf;   %%% it must be version 4.35 or later
 %-------------------------------------------------------------------------
 font_wd:=33mm;
 font_ht:=24mm;

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex	2019-01-03 21:58:12 UTC (rev 49587)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex	2019-01-03 21:58:34 UTC (rev 49588)
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of MCF typeset by LaTeX   mcf_examples.tex   by A.Yamaji  2018.11.11
+% Example of MCF typeset by LaTeX   mcf_examples.tex   by A.Yamaji  2019.01.03
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \documentclass[a4paper]{article}
 \usepackage{graphicx}

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-064.mps
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-064.mps	2019-01-03 21:58:12 UTC (rev 49587)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-064.mps	2019-01-03 21:58:34 UTC (rev 49588)
@@ -2,7 +2,7 @@
 %%BoundingBox: -1 -1 212 60 
 %%HiResBoundingBox: -0.09962 -0.09962 211.90288 59.64348 
 %%Creator: MetaPost 2.00
-%%CreationDate: 2018.11.10:1325
+%%CreationDate: 2018.12.31:0844
 %%Pages: 1
 %%DocumentResources: procset mpost-minimal
 %%+ font NJFVSO-NimbusSanL-Regu ICXWUR-CMR8
@@ -471,9 +471,9 @@
  closepath fill
  0 0.48956 dtransform truncate idtransform setlinewidth pop [] 0 setdash
  1 setlinecap 1 setlinejoin 10 setmiterlimit
-newpath 16.65692 12.80867 moveto
+newpath 16.65692 12.80875 moveto
 29.14793 5.59703 lineto stroke
-newpath 18.2579 15.58165 moveto
+newpath 18.2579 15.58173 moveto
 29.07265 9.3378 lineto stroke
 newpath 29.14793 5.59703 moveto
 45.9096 15.27437 lineto stroke
@@ -497,7 +497,7 @@
 newpath 45.9096 15.27437 moveto
 56.46082 9.18266 lineto stroke
 newpath 45.9096 34.62903 moveto
-56.46082 40.7208 lineto stroke
+56.46082 40.72072 lineto stroke
  1 0 0 setrgbcolor
 newpath 8.89218 11.78027 moveto
 9.62653 11.78027 lineto
@@ -601,9 +601,9 @@
 10.60391 52.25127 moveto
 (\(draw\)) uhvr8r 9.96265 fshow
  0 0.48956 dtransform truncate idtransform setlinewidth pop 1 setlinecap
-newpath 132.84317 12.80867 moveto
+newpath 132.84317 12.80875 moveto
 145.33418 5.59703 lineto stroke
-newpath 134.44415 15.58165 moveto
+newpath 134.44415 15.58173 moveto
 145.2589 9.3378 lineto stroke
 newpath 145.33418 5.59703 moveto
 162.09586 15.27437 lineto stroke
@@ -626,7 +626,7 @@
 newpath 162.09586 15.27437 moveto
 172.64706 9.18266 lineto stroke
 newpath 162.09586 34.62903 moveto
-172.64706 40.7208 lineto stroke
+172.64706 40.72072 lineto stroke
 126.2985 11.39201 moveto
 (N) cmr8 7.73563 fshow
 141.45183 40.42401 moveto

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf	2019-01-03 21:58:12 UTC (rev 49587)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf	2019-01-03 21:58:34 UTC (rev 49588)
@@ -1,7 +1,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format file for mcf_manual.tex  by Akira.Yamaji 2018.11.11
+% Molecular Coding Format file for mcf_manual.tex  by Akira.Yamaji 2019.01.03
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-input mcf2graph.mf;   %% it must be version 4.34 or later
+input mcf2graph.mf;   %% it must be version 4.35 or later
 %------------------------------------------------------------------------
 sw_aux_out:=0;
 sw_mol_frame:=0;

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex	2019-01-03 21:58:12 UTC (rev 49587)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex	2019-01-03 21:58:34 UTC (rev 49588)
@@ -1,11 +1,11 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%  Molecular Coding Format manual           by  Akira Yamaji 2018.11.11
+%  Molecular Coding Format manual           by  Akira Yamaji 2019.01.03
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \documentclass[a4paper]{article}
 %%%%\documentclass[a4paper,twoside]{article}
 %%%%\usepackage{graphicx}
 \usepackage[pdftex]{graphicx}
-\usepackage{epstopdf}
+%%%%\usepackage{epstopdf}
 %%%%\usepackage[dvipdfmx]{graphicx}
 \usepackage[pdftex]{hyperref}
 %%%%\usepackage[dvipdfmx]{hyperref}
@@ -24,6 +24,9 @@
 \newdimen \htman%
 \newdimen \wdman%
 \newdimen \htmans%
+%----------------------------------------------------------------------------
+\newcount \MCFformat%
+\newbox \box at strufont%
 \htman=45mm%
 \wdman=94mm%
 \htmans=42mm%
@@ -30,10 +33,44 @@
 \fontnum=21%
 \tempnum=1%
 %----------------------------------------------------------------------------
-\font\@strufont=mcf_man_soc\relax%
+\edef\MCFjobname{mcf_man_soc}%
 %----------------------------------------------------------------------------
-\def\MCFstructure{\hspace{5mm}{\@strufont\char\fontnum}\advance\fontnum\@ne\relax}%
-%--------------------------------------------------------------------
+\MCFformat=-1%   use pkfont
+%%\MCFformat=0%    \includegraphics{jobname-nnn.mps}
+%%\MCFformat=1%    \includegraphics[width= ]{jobname-nnn.png}
+%%\MCFformat=2%    \includegraphics{jobname-nnn.svg}
+%%\MCFformat=3%    \includegraphics{jobname-nnn.eps}
+%----------------------------------------------------------------------------
+\font\@strufont=\MCFjobname\relax%
+%----------------------------------------------------------------------------
+\def\MCFgraph{%
+\ifnum\MCFformat<0{\hspace{5mm}\@strufont\char\fontnum}%
+\else%
+\ifnum\MCFformat=0\edef\stru at ext{mps}\fi
+\ifnum\MCFformat=1\edef\stru at ext{png}\fi
+\ifnum\MCFformat=2\edef\stru at ext{svg}\fi
+\ifnum\MCFformat=3\edef\stru at ext{eps}\fi
+%
+\ifnum\fontnum<100%
+\ifnum\fontnum<10\edef\zero at cnt{00}% jobname-00n.ext
+\else\edef\zero at cnt{0}\fi%           jobname-0nn.ext
+\else\edef\zero at cnt{}%               jobname-nnn.ext
+\fi%
+%
+\edef\file at name{\MCFjobname-\zero at cnt\the\fontnum.\stru at ext}%
+%
+\ifnum\MCFformat=1%
+\setbox\box at strufont=\hbox{\@strufont\char\fontnum}%
+\hspace{5mm}\includegraphics[width=\wd\box at strufont]{\file at name}%
+\else%
+\hspace{5mm}\includegraphics\file at name%
+\fi%
+%
+\fi%
+%
+\global\advance\fontnum\@ne\relax%
+}%
+%---------------------------------------------------------------------------
 \def\@F{F}\def\@C{C}\def\@EN{EN}\def\@NO{NO}\def\@cMW{cMW}\def\@cFM{cFM}%
 \def\@fst#1:#2;{#1}\def\@sec#1:#2;{#2}%
 \def\mol at sel#1{%
@@ -92,7 +129,7 @@
 like adressing,grouping,macro,etc. 
 There are no Meta language commands in MCF.
 mcf2graph convert MCF file to graphics file
-pk font,PNG,SVG,EPS or MDL MOL file.\\
+pk font,PNG,SVG,EPS or MDL MOL file.
 %-----------------------------------------------------------------------------
 \section{MCF syntax}
 \subsection{Make bond}
@@ -103,7 +140,7 @@
 
   <10,-30,45,-45,30,-30,60
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \begin{verbatim}
   ! : take value 60 or -60 depend on
@@ -113,7 +150,7 @@
   <30,!,!,!,!,!,!
   <30,!6
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Jump and branch bond}
 \begin{verbatim}
@@ -122,7 +159,7 @@
        
   <30,!6,3:@,0,!,5:@,-30
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %------------------------------------
 \begin{verbatim}
   3:\ : 3:@,0
@@ -129,7 +166,7 @@
 
   <30,!6,3:\,!
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Branch bond}
 \begin{verbatim}
@@ -142,7 +179,7 @@
   <30,!8,
   2:\,!,4:*\,!,6:\*,!,8:\\,!,10:*\*,!
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \begin{verbatim}
   <-30,!6,
@@ -150,7 +187,7 @@
   4:\`1.5,-90,   : 4:@,0`1.5,-90
   6:\^15,-60     : 6:@,0^15,-60
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Connect atom}
 \begin{verbatim}
@@ -158,7 +195,7 @@
 
   <30,!6,3:\,!,5~bd:#
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Ring}
 \begin{verbatim}
@@ -166,7 +203,7 @@
   ?6 : <-120,60,60,60,60,60,1:#
    ?6
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Rotate current angle}
 \begin{verbatim}
@@ -174,7 +211,7 @@
 
   0,0,<90,0,<-90,0,0,{1,2,3,4,5}=vf 
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Change bond type}
 \subsubsection{Double,triple}
@@ -190,7 +227,7 @@
   <30,!~dm,!,!~dl,!,!~dr,!~db,!~db,!,!~tm
   <30,!~dm,!,!~dl,!,!~dr,!!  ,!!  ,!,!!!
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
     dm      dl     dr   db  db      tm
@@ -204,7 +241,7 @@
 
   <30,!~wf,!,!~wb,!,!~zf,!,!~zb
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
     wf       wb       zf       zb
@@ -216,7 +253,7 @@
 
   <30,!~vf,!,!~vb
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
     vf        vb
@@ -230,7 +267,7 @@
 
   <30,!7,1=dt,3=wv,5=bd,7=bz
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
     dt      wv       bd       bz
@@ -242,7 +279,7 @@
 
   <30,!7,{2,4,6}=dr
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Over line}
 \begin{verbatim}
@@ -254,7 +291,7 @@
   <-30,!8,!,60,90`8,
   {2~si_,4~wf_,6~wb_,8~bd_}:/_`2
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Change bond length}
 \subsubsection{Chain length}
@@ -265,7 +302,7 @@
 
   ** !2`1.2 : '`1.2,!2
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \begin{verbatim}
 ``length : change all bond length after
@@ -272,7 +309,7 @@
 
   <30,!2,``1.2,!4
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Ring length}
 \begin{verbatim}
@@ -280,7 +317,7 @@
 
   ?6,4:\,?6`1.2
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Change atom}
 \subsubsection{Insert atom}
@@ -289,7 +326,7 @@
 
   <30,!2,O,!2,N,!2
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Addressed atom}
 \begin{verbatim}
@@ -298,7 +335,7 @@
 
   <30,!4,2:O,{3,4}:N
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Brock address}
 \begin{verbatim}
@@ -306,7 +343,7 @@
 
   ?6,4:\,|,?6,2:O
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \begin{verbatim}
   || : reset brock adress
@@ -313,7 +350,7 @@
 
   ?6,4:\,|,?6,||,2:N
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Absolute address}
 \begin{verbatim}
@@ -322,7 +359,7 @@
 
   ?6,4:\,|,?6,$2:N
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Relative address}
 \begin{verbatim}
@@ -331,7 +368,7 @@
 
   ?6,4:\,?6,-2:N
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Charged atom}
 \begin{verbatim}
@@ -340,7 +377,7 @@
   <-30,!2,N[1],!2,O[-1],
        !2,&"-",!2,N,&"+"^180,!
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Fuse ring}
 \subsubsection{Attached 1 bond}
@@ -350,7 +387,7 @@
 
   ?6,3=?6
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \begin{verbatim}
   ** fused ring size depend on 
@@ -358,7 +395,7 @@
 
   ?6,4:\,?6`1.2,5=?6,11=?6
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \begin{verbatim}
   ?6,3=?6[13] : fuse ?6[13] at B3
@@ -367,13 +404,13 @@
 
   ?6,3=?6[13]
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \begin{verbatim}
   ?6,{-3,-4,-4,-2,-2,-4,-4}=?6
   ?6,{4,8,13,20,25,28,33}=?6
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Attached 2 bond}
 \begin{verbatim}
@@ -386,7 +423,7 @@
 2:MCd(1,.6)(.54,1)(<30,?6,3=?6,(11,4)=?5[3])
 3:MCd(1,.6)(  1,0)(<30,?6,3=?6,(11,4)=?4[2])
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
         1             2             3
@@ -401,7 +438,7 @@
 1:MCd(1,.55)(0,0)(?6,{3,10}=?6,(16,4)=?6[3])
 2:MCd(1,.55)(1,0)(?6,{3,10}=?6,(16,4)=?5[2])
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
          1                 2
@@ -415,7 +452,7 @@
 
   ** ?m[n] (m=6,n=2)
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Spiro ring}
 \begin{verbatim}
@@ -425,7 +462,7 @@
 
   An:@ : jump to An
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Substituent}
 \subsubsection{Insert substituent}
@@ -438,7 +475,7 @@
      Pr:propyl(/!2) iPr:isopropyl
      tBu:tertial buthyl Ph:phenyl
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Insert modified substituent}
 \begin{verbatim}
@@ -450,7 +487,7 @@
 
   <30,!,//O,!2,/*H,!2,*/H,!2,*/*H,!2,**?3,!
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
       //      /*     */     */*     **
@@ -465,7 +502,7 @@
   <30,``1,!,
    /_`2^30,!2,/!2>lr,!2,/!2>rl,!)
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Add substituent}
 \begin{verbatim}
@@ -472,7 +509,7 @@
   <-30,!17,2:/_,4:/!,6:/!2,
    10:/iPr,14:/tBu,16:/Ph^-60
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Add modified substituent}
 \begin{verbatim}
@@ -481,7 +518,7 @@
   <-30,!6,
   {2~wf,4~zf,6^-30}:/_
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \begin{verbatim}
 
@@ -490,7 +527,7 @@
   <30,!7`1,
   3:/_`2^30,5:/!2>lr,7:/!2>rl
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Chain environment}
 \subsubsection{Horizontal,vertical}
@@ -501,7 +538,7 @@
   ?4,{3^-90,3^-30,3^90}:/'(!3,"{hz}")>hz,
      {1^-60,1`2,1^60}:/'(!2,"{vt}")>vt
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Left-right,right-left}
 \begin{verbatim}
@@ -512,7 +549,7 @@
   {3^-30,3,3^30}:/'(!3,"{lr}")>lr,
   {5^-30,5,5^30}:/'(!3,"{rl}")>rl
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Fixed angle,multi angle}
 \begin{verbatim}
@@ -522,7 +559,7 @@
   <-30,!6,2>45:/'(!3,"{45}"),
   {6>'(-90,90,-90)}:/'(!3,"{(-90,90,-90)}")
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Miscellaneous}
 %-----------------------------------------------------------------------------
@@ -534,7 +571,7 @@
 
   <30,!2,NH,!,SO,!,SOO,!
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Change color, atom font}
 \begin{verbatim}
@@ -552,11 +589,7 @@
   MCa(1,0.5)(<30,Ph,{1,5}:N,3:/COOH,4:/NO2)
   ext(label.urt("(cmr8)",p0+(0,h));)
 \end{verbatim}
-\hspace{5mm}\includegraphics{mcf_man_soc-064.mps}%  for pdftex
-%%%%\hspace{5mm}\includegraphics{mcf_man_soc-064.eps}%  for dvipdfmx
-%%%%\hspace{5mm}\includegraphics[width=7cm]{mcf_man_soc-064.png}%  for dvipdfmx
-%%%%\MCFstructure   % for Metafont
-\advance\fontnum\@ne\relax\advance\tempnum\@ne\relax%
+{\MCFformat=0 \MCFgraph}
 %-----------------------------------------------------------------------------
 \subsubsection{Make block}
 \begin{verbatim}
@@ -567,7 +600,7 @@
   <30,!2,|<,``1.2,!2,>|,!2
   <30,!2,|<=1.2,!2,>|,!2
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Chain start multiple characters}
 \begin{verbatim}
@@ -576,11 +609,11 @@
 
   MCf(<30,COOH,!0,!3,COOH)
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \begin{verbatim}
   MCf(<30,COOH,!4,COOH)
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{User definition}
 \begin{verbatim}
@@ -588,13 +621,13 @@
    iBuOH:='(!,/_,!,OH)
    <30,?6,{4,6}:/iBuOH
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \begin{verbatim}
   Insert user defined substructure
    <30,!3,/'(!,/_,!,OH),!3
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \newpage
 \section{Option parameter}
@@ -608,13 +641,13 @@
     MCf(<30,?6,-4=?5,{3,8}=dl,{2,6,7,9}:N,
        {2,6,9}:/_,{1,5}://O)  endfont
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Margin left and right}
 \begin{verbatim}
  default: margin_left_right=0.4mm
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \begin{picture}(12,20)
 \put(1,14){\makebox(10,6)[r]{\tt 0mm}}
 \put(1, 7){\makebox(10,6)[r]{\tt 0.4mm}}
@@ -625,7 +658,7 @@
 \begin{verbatim}
  default: margin_top_bottom=0.4mm
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
       0mm       0.4mm       5mm
@@ -635,7 +668,7 @@
 \begin{verbatim}
   default: offset_thickness=0.2pt
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
       0pt       0.2pt       0.5pt
@@ -645,7 +678,7 @@
 \begin{verbatim}
   default: offset_bond_gap=0.3pt
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
       0.0pt      0.3pt      1.0pt
@@ -655,7 +688,7 @@
 \begin{verbatim}
   default: offset_atom=0.8pt
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
       0.0pt      0.8pt      2.0pt
@@ -665,7 +698,7 @@
 \begin{verbatim}
   default:  offset_wedge=0.4pt
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
       0.0pt      0.4pt      1.0pt
@@ -675,7 +708,7 @@
 \begin{verbatim}
   default:  max_bond_length=10mm
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
      6mm       8mm         20mm
@@ -687,7 +720,7 @@
 \begin{verbatim}
   default:  ratio_thickness_bond=0.015
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
       0.005      0.015      0.030
@@ -697,7 +730,7 @@
 \begin{verbatim}
   default:  ratio_char_bond=1.5
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
       1.0        1.5        2.0
@@ -707,7 +740,7 @@
 \begin{verbatim}
   default:  ratio_bondgap_bond= 0.15
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
       0.10       0.15       0.20
@@ -717,7 +750,7 @@
 \begin{verbatim}
   default:  ratio_atom_bond= 0.36
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
        0.25      0.36      0.46
@@ -727,7 +760,7 @@
 \begin{verbatim}
   default:  ratio_wedge_bond=0.12
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
       0.10       0.12       0.20
@@ -737,7 +770,7 @@
 \begin{verbatim}
   default:  ratio_atomgap_atom= 0.050
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
       0.0       0.050       0.12
@@ -747,7 +780,7 @@
 \begin{verbatim}
   default:  ratio_chain_ring= 0.66
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
        0.4         0.65        1.0
@@ -757,7 +790,7 @@
 \begin{verbatim}
   default:  ratio_zebragap_bond=0.12
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \vspace{-3mm}%
 \begin{verbatim}
        0.06      0.12      0.20
@@ -771,7 +804,7 @@
   default: sw_numberA=0 :
     numberA_start=1 numberA_end=4095
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \begin{picture}(5,20)
 \put(0,14){\makebox[5mm]{\tt 1}}
 \put(0, 8){\makebox[5mm]{\tt 2}}
@@ -784,7 +817,7 @@
   default: sw_numberB=0 :
     numberB_start=1 numberB_end=4095
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \begin{picture}(5,20)
 \put(0,14){\makebox[5mm]{\tt 1}}
 \put(0, 8){\makebox[5mm]{\tt 2}}
@@ -798,13 +831,13 @@
   MCd(1,0.7)(0.8,0.7)(Ph)
   ** default: sw_clip=0
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \begin{verbatim}
   sw_clip:=1;
   MCd(1,0.7)(0.2,0.3)(Ph)
   MCd(1,0.7)(0.8,0.7)(Ph)
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Solid mode}
 \begin{verbatim}
@@ -811,7 +844,7 @@
   (fit to font size)
   sw_solid=0   ** default
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------
 \begin{verbatim}
   (solid ratio bond/font width)
@@ -821,7 +854,7 @@
   (bond_len=60mm*0.1=6mm)
   ** ignore bond_len
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------
 \begin{verbatim}
   (solid bond length)
@@ -829,7 +862,7 @@
   bond_len=10mm
   ** ignore ratio_bond_width
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------
 \begin{verbatim}
   (solid bond length and clip)
@@ -837,13 +870,13 @@
   sw_clip:=1;
   bond_len=10mm
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Expand mode}
 \begin{verbatim}
   default:  sw_expand=0
 \end{verbatim}
-\MCFstructure\\
+\MCFgraph\\
 \makebox[5mm]{}%
 \makebox[30mm]{\tt 0 :default}%
 \makebox[30mm]{\tt 1}%
@@ -852,7 +885,7 @@
 \begin{verbatim}
   default:  sw_subst_off=0
 \end{verbatim}
-\MCFstructure\\
+\MCFgraph\\
 \makebox[5mm]{}%
 \makebox[30mm]{\tt 0 :default}%
 \makebox[30mm]{\tt 1}%
@@ -861,7 +894,7 @@
 \begin{verbatim}
   default:  sw_bond_single=0
 \end{verbatim}
-\MCFstructure\\
+\MCFgraph\\
 \makebox[5mm]{}%
 \makebox[30mm]{\tt 0 :default}%
 \makebox[30mm]{\tt 1}%
@@ -876,17 +909,17 @@
   sw_font_frame:=1;
   MCf(<30,Ph,4:/Cl,3:/F)
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \begin{verbatim}
   (Draw frame inside margin)
   sw_font_frame=2
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \begin{verbatim}
   (Draw both frame)
   sw_font_frame=3
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Molecular frame}
 \begin{verbatim}
@@ -894,7 +927,7 @@
   MCd(1,.5)(1,0.5)(<30,Ph,4:/Cl,3:/F)
   ** default: sw_mol_frame=0
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsubsection{Atom frame}
 \begin{verbatim}
@@ -902,7 +935,7 @@
   MCf(<30,COOH,!0,COOH)
   ** default: sw_atom_frame=0
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Local parameter setting}
 \begin{verbatim}
@@ -919,7 +952,7 @@
     MCf(Ph)
   endfont
 \end{verbatim}
-\MCFstructure\MCFstructure\MCFstructure
+\MCFgraph\MCFgraph\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Global parameter setting}
 \begin{verbatim}
@@ -936,7 +969,7 @@
     MCf(Ph)
   endfont
 \end{verbatim}
-\MCFstructure\MCFstructure\MCFstructure
+\MCFgraph\MCFgraph\MCFgraph
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \newpage
 \section{Function}
@@ -955,7 +988,7 @@
     MCd(1,0.8)(0.8,0.1)(<30,Ph,3:/F,4:/Cl)
   endfont
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Function MCa()}
 \begin{verbatim}
@@ -970,7 +1003,7 @@
     MCa(0.8,0.5)(<30,Ph,3:/F,4:/Cl)
   endfont
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Function MCc()}
 \begin{verbatim}
@@ -986,7 +1019,7 @@
     MCc(0.5 ,0.5 )(?6)
   endfont
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Function MCf()}
 \begin{verbatim}
@@ -1002,7 +1035,7 @@
     MCf(<30,Ph)
   endfont
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \begin{verbatim}
 
   beginfont()
@@ -1011,7 +1044,7 @@
     MCf(<90,Ph,3:/F,4:/Cl)
   endfont
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \begin{verbatim}
 
   (Draw molecule fit to font width)
@@ -1022,7 +1055,7 @@
     MCf(<30,Ph)
   endfont
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \begin{verbatim}
 
   beginfont()
@@ -1031,7 +1064,7 @@
     MCf(<30,Ph,3:/F,4:/Cl)
   endfont
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \newpage
 \subsection{Function EXT()}
@@ -1085,7 +1118,7 @@
  %---------------------------------------
 endfont
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \newpage
 \subsection{Function ext()}
@@ -1131,7 +1164,7 @@
  %---------------------------------------
 endfont
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 \begin{verbatim}
 label:
  defaultfont: label font
@@ -1152,7 +1185,7 @@
   <30,Ph,2:N,1:/Cl,
      4:\,!,N,/_,!,/_,!!,N,!,CN
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Fenitrothion}
 \begin{verbatim}
@@ -1159,7 +1192,7 @@
   <30,!,O,!,P,//S,/O!^160,!,O,!,
       |,Ph,3:/_,4:/NO2
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Permethrin}
 \begin{verbatim}
@@ -1168,7 +1201,7 @@
      3:\,//O,!,O,!2,Ph,
     -4:\,O,-60,Ph
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Endosulfan}
 \begin{verbatim}
@@ -1176,7 +1209,7 @@
       10=d,{3,5}:O,4:S,4://O,
       {8,9,10,11,12^-210,12^-150}:/Cl
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Luciferin}
 \begin{verbatim}
@@ -1184,7 +1217,7 @@
      {9,14}:N,{7,11}:S,
      1:/OH,-2:*/COOH
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Warfarin}
 \begin{verbatim}
@@ -1192,7 +1225,7 @@
   10:O,7:/OH,9://O,
   8:\,/Ph`1,60,!,//O,!
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Limonin}
 \begin{verbatim}
@@ -1203,7 +1236,7 @@
   {1^60,5^180,16^60}:/*H,
   14:\*,|,?5,{1,4}=dl,3:O
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Sesamine}
 \begin{verbatim}
@@ -1212,7 +1245,7 @@
  5:*\^-12,Ph,-3=?5,{-1,-3}:O,
  8:*\^-12,Ph,-3=?5,{-1,-3}:O
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Colchicine}
 \begin{verbatim}
@@ -1221,7 +1254,7 @@
   {-1,-4,-6}=dl,-2://O,-3:/O!,
   9:\,NH,!,//O,!
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Lycorine}
 \begin{verbatim}
@@ -1232,7 +1265,7 @@
   9:/*H^180,10:*/H^60,
   13:*/OH,14:/*OMe
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Gibberellin}
 \begin{verbatim}
@@ -1243,7 +1276,7 @@
   2:/COOH,7://_,13:*/OH,8:/*OH,
   14:*/_,{1,4}:*/H^60
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Quinine}
 \begin{verbatim}
@@ -1253,7 +1286,7 @@
    4:*\,!!,
    2:@,165~zf,60,5~zb:#
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Atoropin}
 \begin{verbatim}
@@ -1262,7 +1295,7 @@
   |,?7,6:*\^190`1.02,N,/_,3~wb:#,
   $3:*\*,!,OH
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Rotenone}
 \begin{verbatim}
@@ -1271,7 +1304,7 @@
   {2,13,16}:O,10://O,{11^-60,12^60}:*/H,
   {-2,-3}:/O!,1:*\,/_,!!
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Pyrethrin I}
 \begin{verbatim}
@@ -1279,7 +1312,7 @@
   1:*\,!!,iPr,2:\*,//O,!,O,-36~zb,|,
   ?5,-2=d,-1:/_,-3://O,-2\,!4,{-1,-3}=dl
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Validamycin}
 \begin{verbatim}
@@ -1287,7 +1320,7 @@
   $4:\,O,-60,|,?6,2:O,{3,4,5}:/OH,6:/!OH,
   $1:\,NH,!,|,?6,2=dl,{4,5,6}:/OH,3:/!OH
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \subsection{Paclitaxel}
 \begin{verbatim}
@@ -1300,7 +1333,7 @@
   7:\*,O,-45,//O,60,Ph,11:*\,O,-60,//O,60,
  12:\*^-15,O,60,//O,-60
 \end{verbatim}
-\MCFstructure
+\MCFgraph
 %-----------------------------------------------------------------------------
 \onecolumn
 \section{Example to use mcf2graph}

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex	2019-01-03 21:58:12 UTC (rev 49587)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex	2019-01-03 21:58:34 UTC (rev 49588)
@@ -1,7 +1,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of  MCF typest with LuaLaTeX(luamplib)     by A.Yamaji    2018.11.11
+% Example of  MCF typest with LuaLaTeX(luamplib)     by A.Yamaji    2019.01.03
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% mcf2graph.mf it must be version 4.34 or later
+%%% mcf2graph.mf it must be version 4.35 or later
 \documentclass{article}
 %------------------------------------------------------------------------------
 \usepackage{luamplib}%
@@ -9,15 +9,17 @@
 \usepackage{textcomp}%
 \mplibcodeinherit{enable}%
 \mplibverbatim{enable}%
-\everymplib{if unknown Ph1: input mcf2graph.mf; fi
-            sw_aux_out:=1;
-            sw_label_emu:=1;
-            sw_font_frame:=4;
-            max_bond_length:=4.5mm;
-            defaultfont:="uhvr8r";
-            defaultsize:=8bp;
-            defaultscale:=1;
-           }%
+\mplibnumbersystem{double}%
+\everymplib{%
+  if unknown Ph1: input mcf2graph.mf; fi
+  sw_aux_out:=1;
+  sw_label_emu:=1;
+  sw_font_frame:=4;
+  max_bond_length:=4.5mm;
+  defaultfont:="uhvr8r";
+  defaultsize:=8bp;
+  defaultscale:=1;
+}%
 %------------------------------------------------------------------------------
 \pagestyle{empty}
 \topmargin=-20mm

Modified: trunk/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
===================================================================
--- trunk/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf	2019-01-03 21:58:12 UTC (rev 49587)
+++ trunk/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf	2019-01-03 21:58:34 UTC (rev 49588)
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 4.34     Copyright (c) 2013-2018   Akira Yamaji
+% mcf2graph ver 4.35     Copyright (c) 2013-2019   Akira Yamaji
 %
 % Permission is hereby granted, free of charge, to any person obtaining a copy of this software
 % and associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -22,20 +22,21 @@
 % This package is located at : http://www.ctan.org/pkg/mcf2graph
 % Suggestion or request mail to : mcf2graph at gmail.com 
 %----------------------------------------------------------------------------------------------
-% Set output no image file             : mpost -s bboxmargin=0   FILENAME
-% Set output first font only           : mpost -s bboxmargin=1   FILENAME
-% Set outputformat to "png"            : mpost -s ahangle=1      FILENAME
-% Set outputformat to "svg"            : mpost -s ahangle=2      FILENAME
-% Set outputformat to "eps"            : mpost -s ahangle=3      FILENAME
-% Set output aux file                  : mpost -s ahlength=1     FILENAME
-% Set output report                    : mpost -s ahlength=2     FILENAME
-% Set output MOL(V2000)                : mpost -s ahlength=5     FILENAME
-% Set output MOL(V3000)                : mpost -s ahlength=6     FILENAME
-% Set to use plain.mp label,arrow      : mpost -s labeloffset=1  FILENAME
-% Set to use plain.mp label,arrow,atom : mpost -s labeloffset=2  FILENAME
+% Set output no image file                   : mpost -s bboxmargin=0   FILENAME
+% Set output first font only                 : mpost -s bboxmargin=1   FILENAME
+% Set outputformat to "eps"(.mps)            : mpost -s ahangle=0      FILENAME
+% Set outputformat to "png"                  : mpost -s ahangle=1      FILENAME
+% Set outputformat to "svg"                  : mpost -s ahangle=2      FILENAME
+% Set outputformat to "eps" (.eps)           : mpost -s ahangle=3      FILENAME
+% Set output aux file                        : mpost -s ahlength=1     FILENAME
+% Set output report                          : mpost -s ahlength=2     FILENAME
+% Set output MOL(V2000)                      : mpost -s ahlength=5     FILENAME
+% Set output MOL(V3000)                      : mpost -s ahlength=6     FILENAME
+% Set to use plain.mp (label,arrow)          : mpost -s labeloffset=1  FILENAME
+% Set to use plain.mp (label,arrow,atom)     : mpost -s labeloffset=2  FILENAME
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 tracingstats:=1;
-message " This is mcf2graph ver 4.3  2018.11";
+message " This is mcf2graph ver 4.35  2019.01";
 %-------------------------------------------------------------------------------------------------
 newinternal nA,nB,nC,nD,nE,nF,char_num,str_cnt,sub_usr,sub_int,tbl_cnt,sharp_char;
 numeric save_para[],comD[][],parD[][],cntD[],tbl_str_wd[],tbl_atom[],tbl_subst[][],tbl_atom_wt[],
@@ -59,13 +60,18 @@
   mp_log_name:=jobname&"-info.aux";
   prologues:=3;
   %-- default bboxmargin=2------------------------------------------------------------------
-  if     bboxmargin=0: def shipit = enddef;                  % No image file
-  elseif bboxmargin=1: proc_end:=1;                          % output first font only
+  if     bboxmargin=0: def shipit = enddef;                    % No image file
+  elseif bboxmargin=1: proc_end:=1;                            % output first font only
   fi
   %--default ahangle=45---------------------------------------------------------------------
-  if     ahangle=1: outputformat:="png"; hppp:=vppp:=0.1;    % png format
-  elseif ahangle=2: outputformat:="svg";                     % svg format
-  elseif ahangle=3: outputformat:="eps";                     % eps format(.eps)
+  if     ahangle=0:  outputformat:="eps";                      % eps format(.mps)
+  elseif ahangle=1:  outputformat:="png"; hppp:=vppp:=0.12;    % png format(600dpi)
+  elseif ahangle=2:  outputformat:="svg";                      % svg format
+  elseif ahangle=3:  outputformat:="eps";                      % eps format(.eps)
+  %
+  elseif ahangle=11: outputformat:="png"; hppp:=vppp:=0.24;    % png format(300dpi)
+  elseif ahangle=12: outputformat:="png"; hppp:=vppp:=0.10;    % png format(720dpi)
+  elseif ahangle=13: outputformat:="png"; hppp:=vppp:=0.06;    % png format(1200dpi)
   fi
   %--default ahlength=4---------------------------------------------------------------------
   if     ahlength=1: sw_aux_out:=1;          % output aux
@@ -153,9 +159,11 @@
 vardef pic_c(expr i,s)= substring(i,i+1) of s enddef;
 %--------------------------------------------------------------------------------------------------
 def store_par(text t)=
-  nA:=0; for list=t: if save_para[incr nA]<>list: save_para[nA]:=list; fi endfor enddef;
-def restore_par(text t)=  nA:=0;
-  forsuffixes list=t: if list<>save_para[incr nA]: list:=save_para[nA]; fi endfor enddef;
+  nA:=0; for list=t: nA:=nA+1; if save_para[nA]<>list: save_para[nA]:=list; fi endfor
+enddef;
+def restore_par(text t)=
+  nA:=0; forsuffixes list=t: nA:=nA+1; if list<>save_para[nA]: list:=save_para[nA]; fi endfor
+enddef;
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 def beginfont(text s)=
   char_num:=char_num+1;
@@ -174,7 +182,7 @@
   %------------------------------------------------------------------------------------------------
   for i:=1 upto max_inf_num: info[i]:=":"; endfor
   f_ext:=inf_num:=cntM:=0;
-  for list=s: info[incr inf_num]:=list; endfor
+  for list=s: inf_num:=inf_num+1; info[inf_num]:=list; endfor
 enddef;
 %==================================================================================================
 def endfont=
@@ -240,24 +248,36 @@
   def **secondary n == (_postF,n) enddef;  def */*secondary n == (_postG,n) enddef;  
 enddef;
 %=================================================================================================
-vardef '(text s)= ''(incr sub_usr)(s); sub_usr enddef;
+vardef '(text TXT)= ''(incr sub_usr)(TXT); sub_usr enddef;
 %-------------------------------------------------------------------------------------------------
-def ''(expr k)(text TXT)=
+def ''(expr ADR)(text TXT)=
   begingroup
   if unknown inside_def_MC:: set_def_MC fi
-  cntD[k]:=0;
+  cntD[ADR]:=0;
   for list==TXT::
     if known list::
-      if pair list:: comD[k][incr cntD[k]]:=xpart(list); parD[k][cntD[k]]:=ypart(list);
+      if pair list::
+        cntD[ADR]:=cntD[ADR]+1;
+        comD[ADR][cntD[ADR]]:=xpart(list);
+        parD[ADR][cntD[ADR]]:=ypart(list);
       elseif numeric list::
         if list>=sub_emb_start::
           for i==1 upto cntD[list]::
-            comD[k][incr cntD[k]]:=comD[list][i]; parD[k][cntD[k]]:=parD[list][i];
+            cntD[ADR]:=cntD[ADR]+1;
+            comD[ADR][cntD[ADR]]:=comD[list][i];
+            parD[ADR][cntD[ADR]]:=parD[list][i];
           endfor 
-        else:: comD[k][incr cntD[k]]:=_mk_bond; parD[k][cntD[k]]:=list;
+        else::
+          cntD[ADR]:=cntD[ADR]+1;
+          comD[ADR][cntD[ADR]]:=_mk_bond;
+          parD[ADR][cntD[ADR]]:=list;
         fi
-      elseif string list:: strD[incr str_cnt]:=list;
-        comD[k][incr cntD[k]]:=_set_atom; parD[k][cntD[k]]:=str_cnt;
+      elseif string list::
+        str_cnt:=str_cnt+1;
+        strD[str_cnt]:=list;
+        cntD[ADR]:=cntD[ADR]+1;
+        comD[ADR][cntD[ADR]]:=_set_atom;
+        parD[ADR][cntD[ADR]]:=str_cnt;
         if pic_c(0,list)=="{":: tbl_str_wd[str_cnt]:=1.6; else:: tbl_str_wd[str_cnt]:=1; fi
       fi
     fi
@@ -270,9 +290,11 @@
   cntD[sub_int]:=0;
   for list==TXT:: cntD[sub_int]:=cntD[sub_int]+1;
     if     numeric list::
-      comD[sub_int][cntD[sub_int]]:=_numeric;    parD[sub_int][cntD[sub_int]]:=list;
+      comD[sub_int][cntD[sub_int]]:=_numeric;
+      parD[sub_int][cntD[sub_int]]:=list;
     elseif pair list::
-      comD[sub_int][cntD[sub_int]]:=xpart(list); parD[sub_int][cntD[sub_int]]:=ypart(list);
+      comD[sub_int][cntD[sub_int]]:=xpart(list);
+      parD[sub_int][cntD[sub_int]]:=ypart(list);
     fi
   endfor
   sub_int    %------- Retern value -------
@@ -400,13 +422,13 @@
   endgroup;
 enddef;
 %==================================================================================================
-def ext_puts(expr a)(expr STR)=
+def ext_puts(expr POS)(expr STR)=
   begingroup
-  save cp,sA,pC;
+  save cp,sA,pC,nB,nC;
   pair cp;
   string sA;
   picture pC;
-  cp:=a;
+  cp:=POS;
   nB:=defaultscale*defaultsize;
   nC:=0;
   %------------------------------------------------------------------------------------------------
@@ -435,6 +457,7 @@
 enddef;
 %--------------------------------------------------------------------------------------------------
 vardef label_emu@#(expr STR,POS) = %% modified 'thelabel@#(expr s,z)' of plain.mp
+  begingroup
   save oft,fx,fy,wds,sC,pC;
   pair oft,oft.lft,oft.rt,oft.top,oft.bot,oft.ulft,oft.llft,oft.urt,oft.lrt;
   string sC;
@@ -461,6 +484,7 @@
   oft.llft:=(-.7,-.7);   fx.llft:=1;   fy.llft:=1;
   oft.lrt:= ( .7,-.7);   fx.lrt:=0;    fy.lrt:=1;
   ext_puts(POS+(labeloffset*oft@#)-(wds*fx@#,defaultscale*defaultsize*fy@#))(STR);
+  endgroup
 enddef;
 %-------------------------------------------------------------------------------------------------
 vardef dotlabel_emu@#(expr STR,POS)=
@@ -514,11 +538,11 @@
   fi
 enddef;
 %=================================================================================================
-def MCa(expr FW,FH)(text s)= MCd(1,1)(FW,FH)(s) enddef;
-def MCc(expr RW,RH)(text s)= MCd(RW,RH)(0.5,0.5)(s) enddef;
-def MCf(text s)=             MCd(1,1)(0.5,0.5)(s) enddef;
+def MCa(expr FW,FH)(text TXT)= MCd(1,1)(FW,FH)(TXT) enddef;
+def MCc(expr RW,RH)(text TXT)= MCd(RW,RH)(0.5,0.5)(TXT) enddef;
+def MCf(text TXT)=             MCd(1,1)(0.5,0.5)(TXT) enddef;
 %-------------------------------------------------------------------------------------------------
-def MCd(expr RW,RH)(expr FW,FH)(text TX)=
+def MCd(expr RW,RH)(expr FW,FH)(text TXT)=
   begingroup
   save com,par,adrA,adrB,f_bra,envT,envB,lenT,lineT,strAT,stkA,stkB,stkL,stkM,cntP,bondL,temp_len,
        temp_cntB,f_end,f_term,rotT,adrS,f_at,f_lineT,f_rotT,f_lenT,f_envT,angT,tempB,tempA,
@@ -542,7 +566,7 @@
   par_s:=ASCII("{"); par_e:=ASCII("}"); score_u:=ASCII("_"); hat:=ASCII("^");
   cntA:=cntB:=cntP:=cntC:=0; strD[0]:=""; str_cnt:=2000; crR:=-ratio_chain_ring;
   %===============================================================================================
-  ''(0)(TX,(_term,0));
+  ''(0)(TXT,(_term,0));
   proc_bond_atom(1);
   if (cntP>0)and(sw_subst_off=0): ps_get(1); fi
   char_use_check;
@@ -569,7 +593,8 @@
   %-----------------------------------------------------------------------------------------------
   sftX:=margin_left_right-minX+(font_wd-mol_wd-2margin_left_right)*FW;
   sftY:=margin_top_bottom-minY+(font_ht-mol_ht-2margin_top_bottom)*FH;
-  posM[0][incr cntM]:=(sftX,sftY);
+  cntM:=cntM+1;
+  posM[0][cntM]:=(sftX,sftY);
   posM[1][cntM]:=(minX+sftX,minY+sftY);
   posM[2][cntM]:=(max_x+sftX,max_y+sftY);
   wdM[cntM]:=mol_wd;
@@ -587,7 +612,7 @@
 %-------------------------------------------------------------------------------------------------
 def ps_put=
   if f_at=1: An:=getA(adrT); check_adrA(An); else: An:=cntA+1; fi
-  ps_adr[incr cntP]:=An; ps_com[cntP]:=par; op_cnt[cntP]:=0;
+   cntP:=cntP+1; ps_adr[cntP]:=An; ps_com[cntP]:=par; op_cnt[cntP]:=0;
   if lineT<>0:  PO(_tmp_line,lineT) fi
   if rotT<>0:   PO(_rot_ang,rotT) fi
   if lenT<>crR: PO(_chg_len,lenT) fi
@@ -601,8 +626,8 @@
 enddef;
 %-------------------------------------------------------------------------------------------------
 def ps_get(expr n)=
-  save sub_int;
-  sub_int:=0; nA:=cntP; nB:=cntD[0];
+  sub_int:=0;
+  nA:=cntP; nB:=cntD[0];
   for i=n upto cntP:
     PA(_jp_atom_abs,ps_adr[i]) PA(_push,1)
     for j=1 upto op_cnt[i]: PA(op_com[i][j],op_par[i][j]) endfor
@@ -714,11 +739,11 @@
   for i=n upto cntD[0]:
   nC:=comD[0][i]; par:=parD[0][i];
   if     nC=_push: 
-    if     par=1: stkL[adrS]:=bondL; stkA[incr adrS]:=adrA:=cntA; stkB[adrS]:=adrB:=cntB;
+    if     par=1: stkL[adrS]:=bondL; adrS:=adrS+1; stkA[adrS]:=adrA:=cntA; stkB[adrS]:=adrB:=cntB;
     elseif par=0: temp_len:=bondL;
     elseif par=2: stkA[adrS+1]:=cntA; stkB[adrS+1]:=cntB;
     fi
-  ef nC=_pop: if     par=1: adrA:=stkA[decr adrS]; adrB:=stkB[adrS]; bondL:=stkL[adrS];
+  ef nC=_pop: if      par=1: adrS:=adrS-1; adrA:=stkA[adrS]; adrB:=stkB[adrS]; bondL:=stkL[adrS];
                    ef par=0: bondL:=temp_len;
                    ef par=2: stkA[adrS+1]:=0;
                    fi
@@ -772,7 +797,8 @@
 enddef;
 %-------------------------------------------------------------------------------------------------
 def add_atom=
-  lineB[incr cntB]:=lineT;
+  cntB:=cntB+1;
+  lineB[cntB]:=lineT;
   lineT:=si;
   if lenT=crR: lenB[cntB]:=bondL; else: lenB[cntB]:=lenT; lenT:=crR; fi
   if f_bra=0:  cntA:=cntA+1; sB[cntB]:=cntA; numS[cntA]:=strAT;
@@ -800,7 +826,7 @@
                 ef par=0: temp_len:=bondL;
                 ef par=2: stkA[adrS+1]:=cntA; stkB[adrS+1]:=cntB;
                 fi
-  ef nC=_pop:     if par=1: adrA:=stkA[decr adrS]; adrB:=stkB[adrS]; envB:=stkM[adrS];
+  ef nC=_pop:     if par=1: adrS:=adrS-1; adrA:=stkA[adrS]; adrB:=stkB[adrS]; envB:=stkM[adrS];
                        ef par=0: temp_len:=bondL;
                        ef par=2: stkA[adrS+1]:=0;
                        fi
@@ -827,8 +853,8 @@
   endfor
 enddef;
 %-------------------------------------------------------------------------------------------------
-def add_bond(expr m)=
-  if m=_arg_ang: nA:=proc_env(angT,envB,60,-60); else: nA:=m; fi
+def add_bond(expr ROT)=
+  if ROT=_arg_ang: nA:=proc_env(angT,envB,60,-60); else: nA:=ROT; fi
   if f_bra=0:
     adrT:=cntA:=cntA+1; posA[cntA]:=posBs; angA[cntA]:=angT;
     if nA>=0: ang_br[cntA]:=angT+nA/2-90; else: ang_br[cntA]:=angT+nA/2+90; fi
@@ -848,12 +874,12 @@
   cntB:=cntB+1; posBs:=posBe;
 enddef;
 %==================================================================================================
-vardef getA(expr n)=
- if n>=0: stkA[adrS+1]+n ef n>=-999: cntA+n+1 else: stkA[adrS]+n+4095 fi
+vardef getA(expr ADR)=
+ if ADR>=0: stkA[adrS+1]+ADR ef ADR>=-999: cntA+ADR+1 else: stkA[adrS]+ADR+4095 fi
 enddef;
 %--------------------------------------------------------------------------------------------------
-vardef getB(expr n)=
- if n>=1: stkB[adrS+1]+n ef n=0: tempB ef n>=-999: cntB+n+1 else: stkB[adrS]+n+4095 fi
+vardef getB(expr ADR)=
+ if ADR>=1: stkB[adrS+1]+ADR ef ADR=0: tempB ef ADR>=-999: cntB+ADR+1 else: stkB[adrS]+ADR+4095 fi
 enddef;
 %--------------------------------------------------------------------------------------------------
 def termA=
@@ -875,22 +901,33 @@
   fi
 enddef;
 %--------------------------------------------------------------------------------------------------
-def proc_cyc(expr n)= add_bond(angle(posA[n]-posBs)-angT);  enddef;
+def proc_cyc(expr ADR)= add_bond(angle(posA[ADR]-posBs)-angT);  enddef;
 %--------------------------------------------------------------------------------------------------
-def glu_c(expr n)= if numS[n]<>0: nB:=angT mod 90; nC:=.5tbl_str_wd[numS[n]]*atom_wd;
-                   if nB<45: glu:=glu+((sind(nB)*nC)++nC);
-                   else:     glu:=glu+((cosd(nB)*.5atom_wd)++.5atom_wd) fi fi  enddef;
+def glu_c(expr NUM)=
+  if numS[NUM]<>0:
+    nB:=angT mod 90;
+    nC:=0.5tbl_str_wd[numS[NUM]]*atom_wd;
+    if nB<45: glu:=glu+((sind(nB)*nC)++nC);
+    else:     glu:=glu+((cosd(nB)*.5atom_wd)++.5atom_wd);
+    fi
+  fi
+enddef;
 %--------------------------------------------------------------------------------------------------
-vardef proc_env(expr n,m,a,b)=  r:=(n mod 360);
-  if m>=sub_emb_start: parD[m][cntB-temp_cntB] else:
-    if     m=hz:if r=0:a ef r<=90:b ef r<=180:a ef r<270:b  else:a fi
-    ef m=vt:if r=0:b ef r<90:a  ef r<=180:b ef r<=271:a else:b fi
-    ef (m>=-180)and(m<=180): m fi fi
+vardef proc_env(expr ANG,ENV,CCW,CWS)=
+  nA:=(ANG mod 360);
+  if ENV>=sub_emb_start:
+    parD[ENV][cntB-temp_cntB]
+  else:
+    if ENV=hz: if nA=0:CCW ef nA<=90:CWS ef nA<=180:CCW ef nA<270:CWS  else:CCW fi
+    ef ENV=vt: if nA=0:CWS ef nA<90:CCW  ef nA<=180:CWS ef nA<=271:CCW else:CWS fi
+    ef (ENV>=-180)and(ENV<=180): ENV
+    fi
+  fi
 enddef;
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 def draw_atom(expr NUM,POS,ANG,STR,WD)=
   begingroup
-  save pA,pT,dx,pC,nE,nC;
+  save pA,pT,pC,sB,dx,nB,nC,nE;
   string sB;
   pair pA,pT;
   picture pC;
@@ -937,7 +974,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 def draw_bond(expr NN,BP,EP,ANG,LN)=
   begingroup
-  save ww,ap,am,hpt,Ls,Le,pA,pB,pC,pT,nL,nC;
+  save ww,ap,am,hpt,Ls,Le,pA,pB,pC,pT,nB,nC,nL;
   pair Ls,Le;
   path pA,pB,pC,pT;
   %----------------------------------------------------------------------------------------------
@@ -1058,7 +1095,7 @@
 !?3:='(!,?3); !?4:='(!,?4); !?5:='(!,?5); !?6:='(!,?6); CF2:='(/F,60,F); CCl2:='(/Cl,60,Cl);
 CBr2:='(/Br,60,Br); CF3:='(/F,/F^60,60,F); CCl3:='(/Cl,/Cl^60,60,Cl); CBr3:='(/Br,/Br^60,60,Br);
 %==================================================================================================
-nA:=0; for list=parameter_list: save_para[incr nA]:=list; endfor
+nA:=0; for list=parameter_list: nA:=nA+1; save_para[nA]:=list; endfor
 %--------------------------------------------------------------------------------------------------
 %%%%%%message "count of sub_usr =" & decimal(sub_usr);
 %--------------------------------------------------------------------------------------------------
@@ -1068,24 +1105,27 @@
   !NH2:='(!,NH2); !CHO:='(!,CHO); !COOH:='(!,COOH); !CN:='(!,CN); !SH:='(!,SH); !NO2:='(!,NO2);
 enddef;
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-def char_size_set(expr a)(expr b)(expr s)=
-  for j=0 upto length(s)-1: nA:=ASCII(pic_c(j,s));
-    tbl_char_wd[nA]:=a; tbl_char_ht[nA]:=b;
+def char_size_set(expr WD)(expr HT)(expr STR)=
+  for j=0 upto length(STR)-1:
+    nA:=ASCII(pic_c(j,STR));
+    tbl_char_wd[nA]:=WD;
+    tbl_char_ht[nA]:=HT;
   endfor
 enddef;
-%---------------------------------------------------------------
-char_size_set( 1)( 1)("CGHMNOQ");
-char_size_set(.9)( 1)("ABDEFIJKLPRSTUVWXYZ/><m");
-char_size_set(.7)( 1)(" ()[]0123456789nhj=_tfgpq");
-char_size_set(.7)(.7)("-+*");
+%-------------------------------------------------------------------------------------------------
+char_size_set(  1)(  1)("CGHMNOQ");
+char_size_set( .9)(  1)("ABDEFIJKLPRSTUVWXYZ/><m");
+char_size_set( .7)(  1)(" ()[]0123456789nhj=_tfgpq");
+char_size_set( .7)( .7)("-+*");
 char_size_set(.45)(.95)("l");
-char_size_set(.75)(.8)("o");
-char_size_set(.8)(.8)("e");
-char_size_set(.7)(.8)("abdcksuvxzwry");
-char_size_set(.35)(.9)("i");
-char_size_set(.4)( 1)(".,:;'`^");
+char_size_set(.75)( .8)("o");
+char_size_set( .8)( .8)("e");
+char_size_set( .7)( .8)("abdcksuvxzwry");
+char_size_set(.35)( .9)("i");
+char_size_set( .4)(  1)(".,:;'`^");
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 def draw_char(expr CHR,POS,WD,PEN,NUM)=
+begingroup
 save Z,aW,aH,fW,fH,hW,hW,hH,fP,hP,pathO,pathOh,pos,dw,dwh,dwv,cdw,ppcs,sbp,sC;
 path pathO,pathOh;
 string sC;
@@ -1199,6 +1239,7 @@
 ef sC="*": dw Z19--Z14; dw Z09--Z10; dw (.2aW,.2aH)--(.8aW,.8aH); dw (.2aW,.8aH)--(.8aW,.2aH);
 else:
 fi
+endgroup
 enddef;
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 def blank_str:= "            " enddef;
@@ -1215,21 +1256,27 @@
   fi
 enddef;
 %--------------------------------------------------------------------------------------------------
-vardef stripP(expr a)=
- if     length(a)=4: substring (1,3) of a
- elseif length(a)=6: substring (1,2) of a
- else: a
+vardef stripP(expr ATOM)=
+ if     length(ATOM)=4: substring (1,3) of ATOM
+ elseif length(ATOM)=6: substring (1,2) of ATOM
+ else: ATOM
  fi
 enddef;
 %==================================================================================================
-def STa(expr a,b,c)=
-  tbl_atom_str[incr tbl_cnt]:=a; tbl_atom[tbl_cnt]:=0;
-  tbl_atom_wt[tbl_cnt]:=b; tbl_atom_mi[tbl_cnt]:=c;
+def STa(expr ATOM,WT,MI)=
+  tbl_cnt:=tbl_cnt+1;
+  tbl_atom_str[tbl_cnt]:=ATOM;
+  tbl_atom[tbl_cnt]:=0;
+  tbl_atom_wt[tbl_cnt]:=WT;
+  tbl_atom_mi[tbl_cnt]:=MI;
 enddef;
 %----------------------------------------------------------------------------------
-def STb(expr a)(text s)=
-  tbl_atom_str[incr tbl_cnt]:=a; tbl_atom[tbl_cnt]:=0;
-  for list=s: tbl_atom[tbl_cnt]:=tbl_atom[tbl_cnt]+1;
+def STb(expr ATOM)(text TXT)=
+  tbl_cnt:=tbl_cnt+1;
+  tbl_atom_str[tbl_cnt]:=ATOM;
+  tbl_atom[tbl_cnt]:=0;
+  for list=TXT:
+    tbl_atom[tbl_cnt]:=tbl_atom[tbl_cnt]+1;
     for j=1 upto tbl_cnt:
       if list=tbl_atom_str[j]: tbl_subst[tbl_cnt][tbl_atom[tbl_cnt]]:=j; fi
     endfor
@@ -1319,9 +1366,12 @@
   sumA[2]:=sumA[2]+cnt_hide_H;
   for i=1 upto tbl_cnt:
     if sumA[i]>=1:
-      nA:=tbl_atom_wt[i]/100*sumA[i]; MWp:=MWp+nA;
-      if (MWp<40)and(nA<40): MW_num:= MW_num+tbl_atom_wt[i]*sumA[i];
-                             MI_num:= MI_num+tbl_atom_mi[i]*sumA[i]; fi
+      nA:=tbl_atom_wt[i]/100*sumA[i];
+      MWp:=MWp+nA;
+      if (MWp<40)and(nA<40):
+        MW_num:= MW_num+tbl_atom_wt[i]*sumA[i];
+        MI_num:= MI_num+tbl_atom_mi[i]*sumA[i];
+      fi
       cal_FM:=cal_FM&stripP(tbl_atom_str[i]) if sumA[i]>=2: &decimal(sumA[i]) fi;
     fi
   endfor
@@ -1410,6 +1460,7 @@
 enddef;
 %==================================================================================================
 def proc_mol_out=
+  begingroup
   save chg_cnt,chg_atm,chg_chg;
   numeric chg_atm,chg_chg;
   chg_cnt:=0;
@@ -1463,6 +1514,7 @@
   printf "M  V30 END CTAB";
   printf "M  END";
   fi
+  endgroup
 enddef;
 %-------------------------------------------------------------------------------------------------
 vardef fit_zero(expr n)=if n<=9: "00" elseif n<=99: "0" fi enddef;



More information about the tex-live-commits mailing list