texlive[65666] Master/texmf-dist/doc/metapost/mcf2graph: mcf2graph

commits+karl at tug.org commits+karl at tug.org
Sun Jan 29 22:17:44 CET 2023


Revision: 65666
          http://tug.org/svn/texlive?view=revision&revision=65666
Author:   karl
Date:     2023-01-29 22:17:43 +0100 (Sun, 29 Jan 2023)
Log Message:
-----------
mcf2graph (29jan23)

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/mcf2graph.mp
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mp
    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_library.mcf
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_code.pdf
    trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_code.tex

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG	2023-01-29 21:17:25 UTC (rev 65665)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG	2023-01-29 21:17:43 UTC (rev 65666)
@@ -1,6 +1,14 @@
 *******************************************************************************
- Changelog of mcf2graph software package          by Akira Yamaji 2023-01-09
+ Changelog of mcf2graph software package          by Akira Yamaji 2023-01-29
 *******************************************************************************
+[ver. 4.92  / 2023-01-29]
+  -change default output
+   eps => svg
+  -update MCFexample
+   include mcf_exa_code.tex
+  -delete mcf_exa_code.tex
+  -delete mcf_exa_code.pdf
+
 [ver. 4.91  / 2023-01-09]
   -update MCF manual
    from this version typeset with LuaTeX

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/README
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/README	2023-01-29 21:17:25 UTC (rev 65665)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/README	2023-01-29 21:17:43 UTC (rev 65666)
@@ -1,7 +1,7 @@
 ********************************************************************************
  mcf2graph  : Convert Molecular Coding Format to graphics with MetaPost
  Author     : Akira Yamaji
- version    : 4.91 2023-01-09
+ version    : 4.92 2023-01-29
  E-mail     : mcf2graph at gmail.com
  Located at : http://www.ctan.org/pkg/mcf2graph
 ********************************************************************************
@@ -11,39 +11,37 @@
  chemical structure diagrams.
  This Coding is named from programing technique
  such as operator, array, scope, macro, adressing, etc.
- mcf2graph convert from MCF to PNG, SVG, EPS, MOL file.
+ mcf2graph convert from MCF to SVG, PNG, EPS, MOL file.
  It is also able to calculate molecular weight, exact mass, molecular formula.
 
 2. The distribution of software
- ( 1) README              This file
- ( 2) CHANGELOG           Changelog file of mcf2graph
- ( 3) mcf2graph.mp        Main macro of Metapost
- ( 4) mcf_library.mcf     Molecular data library
- ( 5) mcf_exa_soc.mp      Molecular difinition file example
- ( 6) mcf_manual.tex      MCF syntax manual
- ( 7) mcf_manual.pdf      PDF of ( 6) typeset with LuaLaTeX,makeindex
- ( 8) mcf_example.tex     MCF example
- ( 9) mcf_example.pdf     PDF of ( 8) typeset with LuaLaTeX
- (10) mcf_exa_code.tex    MCF example include code
- (11) mcf_exa_code.pdf    PDF of (10) typeset with LuaLaTeX 
+ (1) README              This file
+ (2) CHANGELOG           Changelog file of mcf2graph
+ (3) mcf2graph.mp        Main macro of Metapost
+ (4) mcf_library.mcf     Molecular data library
+ (5) mcf_exa_soc.mp      Molecular difinition file example
+ (6) mcf_manual.tex      MCF syntax manual
+ (7) mcf_manual.pdf      PDF of (6) typeset with LuaLaTeX,makeindex
+ (8) mcf_example.tex     MCF example
+ (9) mcf_example.pdf     PDF of (8) typeset with LuaLaTeX
 
 3. How to use mcf2graph with MetaPost
  Minimum requirement to use mcf2graph : mpost.exe,mpost.dll,mpost.mp,plain.mp
- ( 1) >mpost               filename => output eps(.mps) file
- ( 2) >mpost -s ahangle=1  filename => output png file (600dpi)
- ( 3) >mpost -s ahangle=11 filename => output png file (1200dpi)
- ( 4) >mpost -s ahangle=2  filename => output svg file 
- ( 5) >mpost -s ahangle=3  filename => output eps(.eps) file
- ( 6) >mpost -s ahlength=1 filename => output information-aux file(for tex)
- ( 7) >mpost -s ahlength=2 filename => output information-aux file
-                                               (for spread sheet)
- ( 8) >mpost -s ahlength=3 filename => output library-aux file
- ( 9) >mpost -s ahlength=5 filename => output mol file(V2000)
+ (1)  >mpost               filename => output svg file
+ (2)  >mpost -s ahangle=1  filename => output png file (600dpi)
+ (3)  >mpost -s ahangle=11 filename => output png file (1200dpi)
+ (4)  >mpost -s ahangle=2  filename => output eps(.mps) file
+ (5)  >mpost -s ahangle=3  filename => output eps(.eps) file
+ (6)  >mpost -s ahlength=1 filename => output information-aux file(for tex)
+ (7)  >mpost -s ahlength=2 filename => output information-aux file
+                                              (for spread sheet)
+ (8)  >mpost -s ahlength=3 filename => output library-aux file
+ (9)  >mpost -s ahlength=5 filename => output mol file(V2000)
  (10) >mpost -s ahlength=6 filename => output mol file(V3000)
  (11) >mpost -s ahlength=7 filename => output report file
 
 4. License
- mcf2graph ver 4.91    Copyright (c) 2013-2023   Akira Yamaji
+ mcf2graph ver 4.92   Copyright (c) 2013-2023   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

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf2graph.mp
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf2graph.mp	2023-01-29 21:17:25 UTC (rev 65665)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf2graph.mp	2023-01-29 21:17:43 UTC (rev 65666)
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 4.91    Copyright (c) 2013-2023   Akira Yamaji
+% mcf2graph ver 4.92    Copyright (c) 2013-2023   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,
@@ -17,23 +17,23 @@
 % OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %  mcf2graph is MetaPost macro package convert Molecular Coding Format(MCF) to graphic file
-%  eps/sgv/png/mdl molfile
+%  sgv/eps/png/mdl molfile
 %--------------------------------------------------------------------------------------------------
 % This package is located at : http://www.ctan.org/pkg/mcf2graph
 % Suggestion or request mail to : mcf2graph at gmail.com 
 %--------------------------------------------------------------------------------------------------
-% Set outputformat to "eps" (.mps)                      : mpost                   FILENAME
-% Set outputformat to "png" (.png)                      : mpost -s ahangle=1      FILENAME
-% Set outputformat to "svg" (.svg)                      : mpost -s ahangle=2      FILENAME
-% Set outputformat to "eps" (.eps)                      : mpost -s ahangle=3      FILENAME
-% Set output information aux file (for TeX)             : mpost -s ahlength=1     FILENAME
-% Set output information aux file (for spread sheet)    : mpost -s ahlength=2     FILENAME
-% Set output aux library file                           : mpost -s ahlength=3     FILENAME
-% Set output MOL file (V2000)                           : mpost -s ahlength=5     FILENAME
-% Set output MOL file (V3000)                           : mpost -s ahlength=6     FILENAME
-% Set output report                                     : mpost -s ahlength=7     FILENAME
+% Set outputformat to "svg" (.svg)                    : mpost                FILENAME  *default
+% Set outputformat to "png" (.png)                    : mpost -s ahangle=1   FILENAME
+% Set outputformat to "eps" (.eps)                    : mpost -s ahangle=2   FILENAME
+% Set outputformat to "eps" (.mps)                    : mpost -s ahangle=3   FILENAME
+% Set output information aux file (for TeX)           : mpost -s ahlength=1  FILENAME
+% Set output information aux file (for spread sheet)  : mpost -s ahlength=2  FILENAME
+% Set output aux library file                         : mpost -s ahlength=3  FILENAME
+% Set output MOL file (V2000)                         : mpost -s ahlength=5  FILENAME
+% Set output MOL file (V3000)                         : mpost -s ahlength=6  FILENAME
+% Set output report                                   : mpost -s ahlength=7  FILENAME
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-message "* This is mcf2graph ver 4.91  2023.01.09";
+message "* This is mcf2graph ver 4.92  2023.01.29";
 tracingstats:=1; prologues:=3; warningcheck:=0;
 %-------------------------------------------------------------------------------------------------
 newinternal string EN_;
@@ -43,8 +43,8 @@
         file_input,file_output,default_temp_file,mpfont,atomfont,tempc,temps,blanks;
 pair    save_pair[],msize,mposition,fsize,fmargin,dum,save_mposition;
 %-------------------------------------------------------------------------------------------------
-fig_num:=str_cnt:=tbl_cnt:=mangle:=sw_expand:=sw_frame:=sw_trimming:=sw_ext_all:=0;
-sw_abbreviate:=sw_numbering:=sw_output:=0; numbering_start:=1; numbering_end:=4095;
+fig_num:=str_cnt:=tbl_cnt:=mangle:=sw_expand:=sw_frame:=sw_trimming:=sw_ext_all:=sw_abbreviate:=0;
+sw_numbering:=sw_output:=0; numbering_start:=1; numbering_end:=4095;
 %-------------------------------------------------------------------------------------------------
 aux_max:=max_inf_num:=20; aux_delimiter:=";"; blanks:= "            "; dum:=(-4091,0);
 for i=1 upto aux_max: tag[i]:=""; endfor
@@ -83,18 +83,17 @@
 default_library:="mcf_library.mcf"; default_temp_file:="temp.mcf";
 mpfont:="uhvr8r"; atomfont:="draw"; defaultfont:=mpfont;
 %--default ahangle=45---------------------------------------------------------------------
-if ahangle=0:  outputformat:="eps";                     % eps format(.mps)
-ef ahangle=1:  outputformat:="png"; hppp:=vppp:=0.12;   % png format(600dpi)
+if ahangle=1:  outputformat:="png"; hppp:=vppp:=0.12;   % png format(600dpi)
 ef ahangle=11: outputformat:="png"; hppp:=vppp:=0.06;   % png format(1200dpi)
-ef ahangle=2:  outputformat:="svg";                     % svg format
-ef ahangle=3:  outputformat:="eps";                     % eps format(.eps)
-ef ahangle=45: outputformat:="eps";                     % eps format(.mps) *default
+ef ahangle=2:  outputformat:="eps";                     % eps format(.eps)
+ef ahangle=3:  outputformat:="eps";                     % eps format(.mps)
+ef ahangle=45: outputformat:="svg";                     % svg format  *default
 fi
 %--default ahlength=4---------------------------------------------------------------------
 if ahlength=1:  sw_output:=Info;                        % output aux file
 ef ahlength=2:  sw_output:=Info+Table;                  % output aux file(Table mode)
 ef ahlength=3:  sw_output:=Info+Mcode;                  % output aux library
-ef ahlength=4:  sw_output:=Fig;                         % *default
+ef ahlength=4:  sw_output:=Fig;                         % output figure *default
 ef ahlength=5:  sw_output:=MOL2k;                       % output MOL(V2000)
 ef ahlength=6:  sw_output:=MOL3k;                       % output MOL(V3000)
 ef ahlength=7:  sw_output:=Report;                      % output report
@@ -104,11 +103,11 @@
 ef bboxmargin=4: sw_output:=Fig+Calc;
   ext(defaultfont:=mpfont; defaultscale:=.3;
   label.rt(inf_EN&" / "&cal_MW&" / "&decimal(num_MW-scantokens(inf_MW)),(0,0));) fi
-%--default outputtemplate:="%j-%3c."&"mps"------------------------------------------------
-if (outputformat="eps")and(ahangle<>3): outputtemplate:="%j-%3c."&"mps";
-ef outputformat="svg":                  outputtemplate:="s%3c-%{EN_}.svg";
-ef outputformat="png":                  outputtemplate:="p%3c-%{EN_}.png";
-else:                                   outputtemplate:="%j-%3c."&outputformat; fi
+%--default outputtemplate:="%j-%3c."&"svg"------------------------------------------------
+if outputformat="svg":                 outputtemplate:="s%3c-%{EN_}.svg";
+ef outputformat="png":                 outputtemplate:="p%3c-%{EN_}.png";
+ef (outputformat="eps")and(ahangle=3): outputtemplate:="%j-%3c.mps";
+else:                                  outputtemplate:="%j-%3c."&outputformat; fi
 %-----------------------------------------------------------------------------------------
 if sw_output>=Info:
   message "* jobname="&jobname; message "* numbersystem="&numbersystem;
@@ -119,11 +118,9 @@
                  message "* library file name="&jobname&"-lib.aux";
   ef ahlength=5: message "* output MOL file(V2000)"; message "* "&jobname&"-nnn-"&"inf_EN"&".mol";
   ef ahlength=6: message "* output MOL file(V3000)"; message "* "&jobname&"-nnn-"&"inf_EN"&".mol";
-  ef ahlength=7: message "* output report file"; message "* file name="&jobname&"-report.txt"; fi
-  message "* outputformat="&outputformat;
-  if outputformat="png": message "* hppp="&decimal(hppp)&"/vppp="&decimal(vppp); fi
-  message "* outputtemplate="&outputtemplate;
-  message "* atomfont="&atomfont; message "* defaultfont="&defaultfont; fi
+  ef ahlength=7: message "* output report file"; message "* file name="&jobname&"-report.txt";
+  fi
+fi
 clearit;
 %--------------------------------------------------------------------------------------------------
 ?3:=?20:=Ph:=Ph1:=Ph2:=hz:=0; vt:=1;

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

Deleted: trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_code.tex
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_code.tex	2023-01-29 21:17:25 UTC (rev 65665)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_code.tex	2023-01-29 21:17:43 UTC (rev 65666)
@@ -1,119 +0,0 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Print out mcf data list                           by A.Yamaji   2023.01.09
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% ** mcf2graph.mf must be version 4.91
-% ** use mcf_library.mcf
-% ** typeset by LuaLaTeX(luamplib)
-\documentclass{article}
-\usepackage{luamplib}%
-\usepackage[T1]{fontenc}%
-\mplibcodeinherit{enable}%
-\mplibnumbersystem{double}%
-\mpliblegacybehavior{disabled}%
-%-------------------------------------------------------------------------
-\everymplib{%
-  if unknown Ph1:
-    input mcf2graph;
-    outputformat:="eps";
-    sw_output:=Fig+Calc;
-    fsize:=(35mm,34mm);
-    fmargin:=(1mm,1mm);
-    max_blength:=4mm;
-    row_h:=3.8mm;
-    header_h:=3.8mm;
-    def make_frame=
-      draw (0,0)--(185mm,0)--(185mm,h)--(0,h)--cycle wpcs thickness_frame;
-      draw (w,h-header_h)--(185mm,h-header_h) wpcs thickness_frame;
-      draw (w,h)--(w,0) wpcs thickness_frame;
-      for col_w=75mm,105mm,130mm,155mm:
-        draw (col_w,h)--(col_w,h-header_h) wpcs thickness_frame;
-      endfor
-    enddef;
-  fi
-}%
-%-------------------------------------------------------------------------
-\pagestyle{empty}
-\topmargin=-25mm
-\oddsidemargin=-12mm
-\textwidth=192mm
-\textheight=280mm
-\parindent=0mm
-\makeatletter
-%-------------------------------------------------------------------------
-\newcount \fig at num%
-\newif\ifCONT@%
-\edef\one{1}%
-\fig at num=0%
-%-------------------------------------------------------------------------
-\begin{document}
-\noindent%
-\begin{mplibcode}
-  beginfigm(":<0,0~nb")
-    if mc_check(mc)=0:
-      MC(scantokens(mc))
-      ext(
-        defaultfont:="cmtt9";
-        label.lrt("[(No)]",(0,h));
-        label.llft("(EXA)",(w,h));
-        label.lrt("(Structure)",(8mm,18mm));
-        label.lrt("(Name)",(w,h));
-        label.lrt("(Category)",(75mm,h));
-        label.lrt("(MW)*1",(105mm,h));
-        label.lrt("(mw)*2",(130mm,h));
-        label.lrt("(fm)*3",(155mm,h));
-        label.lrt("(Molecular_Coding_Format)",(46mm,18mm));
-        label.lrt("*1_(MW):Molecular_weight(data)",(105mm,26mm));
-        label.lrt("*2_(mw):Molecular_weight(calculated)",(105mm,21mm));
-        label.lrt("*3_(fm):Molecular_formula(calculated)",(105mm,16mm));
-        make_frame;
-      )
-  fi
-  endfigm
-  fig_num:=0;
-\end{mplibcode}\vspace{-1.2pt}\\
-%------------------------------------------------------------------------
-\CONT at true%
-\loop%
-\advance\fig at num\@ne\relax%
-\begin{mplibcode}%
-%%%%%%  beginfigm("t:EXA","v+:*")
-%%%%%%  beginfigm("t:EXA","v+:1")
-%%%%%%  beginfigm("t:EXA","v+:9")
-  beginfigm("t:EXA","v+:2")
-    if mc_check(mc)=0:
-      MC(scantokens(mc))
-      ext(
-        defaultfont:="cmtt9";
-        label.lrt("["&decimal(fig_num)&"]",(0,h));
-        label.llft(inf_EXA,(w,h));
-        if length(inf_EN)>23:
-          nA:=defaultscale;
-          defaultscale:=23/length(inf_EN); label.lrt(inf_EN, (w,h));
-          defaultscale:=nA;
-        else:
-          label.lrt(inf_EN, (w,h));
-        fi
-        label.lrt(inf_Cat,(75mm,h));
-        label.lrt(inf_MW,(105mm,h));
-        label.lrt(cal_MW,(130mm,h));
-        label.lrt(cal_FM,(155mm,h));
-        make_frame;
-        if mc_row>12: defaultscale:=0.6; row_h:=5.25;
-        ef mc_row>8:  defaultscale:=0.8; row_h:=6.5;
-        else: row_h:=10;
-        fi
-        for i=1 upto mc_row:
-          label.lrt(mc[i],(w+mc_indent[i]*4.25,h-(i-1)*row_h-11.5));
-        endfor
-      )
-      VerbatimTeX("\gdef\EN{"&inf_EN&"}");
-   fi
-  endfigm
-  VerbatimTeX("\gdef\EOF{"&decimal(f_EOF)&"}");
-\end{mplibcode}\vspace{-1.2pt}\\
-%------------------------------------------------------------------------
-\ifx\EOF\one \CONT at false \fi%
-\message{[\the\fig at num:\EN]}%
-\ifCONT@ \repeat%
-%------------------------------------------------------------------------------
-\end{document}

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mp
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mp	2023-01-29 21:17:25 UTC (rev 65665)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mp	2023-01-29 21:17:43 UTC (rev 65666)
@@ -1,8 +1,8 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format                      by Akira Yamaji  2023.01.09
+% Molecular Coding Format                      by Akira Yamaji  2023.01.29
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-if unknown Ph1: input mcf2graph; fi  %%% it must be version 4.91
-message "* mcf_exa_soc 2023.01.09";
+if unknown mcftograph: input mcf2graph; fi  %%% it must be version 4.92
+message "* mcf_exa_soc 2023.01.29";
 message "";
 %------------------------------------------------------------------------------
 %%%%sw_frame:=Outside;
@@ -13,7 +13,7 @@
 tag1:="J"; tag2:="C"; tag3:="fm"; tag4:="mw"; tag5:="EN"; tag6:="MW";
 %------------------------------------------------------------------------------
 %% outputformat:="png"; hppp:=vppp:=0.1; outputtemplate:="p%3c-%{EN_}.png";
-%% outputformat:="svg"; outputtemplate:="s%3c-%{EN_}.svg";
+%% outputformat:="eps"; outputtemplate:="%j-%3c.eps";
 %------------------------------------------------------------------------------
 %ext(defaultscale:=.3; label.rt(inf_EN,(0,0));)
 %------------------------------------------------------------------------------
@@ -30,6 +30,12 @@
 max_blength:=4mm;
 mc_length:=20;
 %------------------------------------------------------------------------------
+message "* outputformat="&outputformat;
+message "* outputtemplate="&outputtemplate;
+if outputformat="png": message "* hppp="&decimal(hppp)&"/vppp="&decimal(vppp); fi
+message "* atomfont="&atomfont; message "* defaultfont="&defaultfont;
+message "";
+%------------------------------------------------------------------------------
 %%%%  beginfigm("t:EN","v:Caffeine")          % select EN=Caffeine
 forever:
 %%%%  beginfigm("f:mcf_library","v+:*")       % 'mcf_library.mcf'(default)

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	2023-01-29 21:17:25 UTC (rev 65665)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex	2023-01-29 21:17:43 UTC (rev 65666)
@@ -1,9 +1,10 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of MCF   Typeset with LuaLaTeX(luamplib)   by A.Yamaji   2023.01.09
+% Example of MCF   Typeset with LuaLaTeX(luamplib)   by A.Yamaji   2023.01.29
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% ** mcf2graph.mf must be version 4.91
+% ** mcf2graph.mf must be version 4.92
 % ** use mcf_library.mcf
 % ** typeset by LuaLaTeX(luamplib)
+%-------------------------------------------------------------------------
 \documentclass{article}
 \usepackage{luamplib}
 \usepackage[T1]{fontenc}
@@ -10,17 +11,13 @@
 \mplibcodeinherit{enable}
 \mplibnumbersystem{double}
 \mpliblegacybehavior{disabled}
+\begin{mplibcode}
+  input mcf2graph;
+  sw_output:=Fig+Calc;
+  fsize:=(35mm,24mm);
+  max_blength:=4mm;
+\end{mplibcode}
 %-------------------------------------------------------------------------
-\everymplib{
-  if unknown Ph1:
-    input mcf2graph;
-    outputformat:="eps";
-    sw_output:=Fig+Calc;
-    fsize:=(35mm,24mm);
-    max_blength:=4mm;
-  fi
-}%
-%-------------------------------------------------------------------------
 \pagestyle{empty}
 \topmargin=-24mm
 \oddsidemargin=-12mm
@@ -88,8 +85,99 @@
   \CONT at false%
 \fi%
 %------------------------------------------------------------------------
-%%%%%%%%\ifnum\fig at num=10 \CONT at false \fi%
 \message{[\the\fig at num:\EN]}%
 \ifCONT@ \repeat%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% MCF example with Mcode
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{mplibcode}
+  fsize:=(35mm,34mm);
+  fmargin:=(1mm,1mm);
+  max_blength:=4mm;
+  row_h:=3.8mm;
+  header_h:=3.8mm;
+  def make_frame=
+    draw (0,0)--(185mm,0)--(185mm,h)--(0,h)--cycle wpcs thickness_frame;
+    draw (w,h-header_h)--(185mm,h-header_h) wpcs thickness_frame;
+    draw (w,h)--(w,0) wpcs thickness_frame;
+    for col_w=75mm,105mm,130mm,155mm:
+      draw (col_w,h)--(col_w,h-header_h) wpcs thickness_frame;
+    endfor
+  enddef;
+\end{mplibcode}
+%-------------------------------------------------------------------------
+\newcount \fig at num%
+\edef\one{1}%
+\fig at num=0%
+%-------------------------------------------------------------------------
+\noindent%
+\begin{mplibcode}
+  beginfigm(":<0,0~nb")
+    if mc_check(mc)=0:
+      MC(scantokens(mc))
+      ext(
+        defaultfont:="cmtt9";
+        label.lrt("[(No)]",(0,h));
+        label.llft("(EXA)",(w,h));
+        label.lrt("(Structure)",(8mm,18mm));
+        label.lrt("(Name)",(w,h));
+        label.lrt("(Category)",(75mm,h));
+        label.lrt("(MW)*1",(105mm,h));
+        label.lrt("(mw)*2",(130mm,h));
+        label.lrt("(fm)*3",(155mm,h));
+        label.lrt("(Molecular_Coding_Format)",(46mm,18mm));
+        label.lrt("*1_(MW):Molecular_weight(data)",(105mm,26mm));
+        label.lrt("*2_(mw):Molecular_weight(calculated)",(105mm,21mm));
+        label.lrt("*3_(fm):Molecular_formula(calculated)",(105mm,16mm));
+        make_frame;
+      )
+  fi
+  endfigm
+  fig_num:=0;
+\end{mplibcode}\vspace{-1.2pt}\\
+%------------------------------------------------------------------------
+\CONT at true%
+\loop%
+\advance\fig at num\@ne\relax%
+\begin{mplibcode}%
+%%%%%%  beginfigm("t:EXA","v+:*")
+%%%%%%  beginfigm("t:EXA","v+:1")
+%%%%%%  beginfigm("t:EXA","v+:9")
+  beginfigm("t:EXA","v+:2")
+    if mc_check(mc)=0:
+      MC(scantokens(mc))
+      ext(
+        defaultfont:="cmtt9";
+        label.lrt("["&decimal(fig_num)&"]",(0,h));
+        label.llft(inf_EXA,(w,h));
+        if length(inf_EN)>23:
+          nA:=defaultscale;
+          defaultscale:=23/length(inf_EN); label.lrt(inf_EN, (w,h));
+          defaultscale:=nA;
+        else:
+          label.lrt(inf_EN, (w,h));
+        fi
+        label.lrt(inf_Cat,(75mm,h));
+        label.lrt(inf_MW,(105mm,h));
+        label.lrt(cal_MW,(130mm,h));
+        label.lrt(cal_FM,(155mm,h));
+        make_frame;
+        if mc_row>12: defaultscale:=0.6; row_h:=5.25;
+        ef mc_row>8:  defaultscale:=0.8; row_h:=6.5;
+        else: row_h:=10;
+        fi
+        for i=1 upto mc_row:
+          label.lrt(mc[i],(w+mc_indent[i]*4.25,h-(i-1)*row_h-11.5));
+        endfor
+      )
+      VerbatimTeX("\gdef\EN{"&inf_EN&"}");
+   fi
+  endfigm
+  VerbatimTeX("\gdef\EOF{"&decimal(f_EOF)&"}");
+\end{mplibcode}\vspace{-1.2pt}\\
+%------------------------------------------------------------------------
+\ifx\EOF\one \CONT at false \fi%
+\message{[\the\fig at num:\EN]}%
+\ifCONT@ \repeat%
 %------------------------------------------------------------------------------
 \end{document}

Modified: trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_library.mcf
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_library.mcf	2023-01-29 21:17:25 UTC (rev 65665)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_library.mcf	2023-01-29 21:17:43 UTC (rev 65666)
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% molecular library file    mcf_library.mcf   by Akira Yamaji   2022.11.12
+% molecular library file    mcf_library.mcf   by Akira Yamaji   2023.01.29
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %  tag1:var1;tag2:var2;tag3:var3 .....
 %  first character of line "%" comment out
@@ -25,7 +25,7 @@
  label.top("A9",A9) withcolor red;
 ;
 %==============================================================================
-% molecular data for mcf_example.tex   EXA:1[155] EXA:2[7]
+% molecular data for mcf_example.tex   EXA:1[155] EXA:2[7] EXA:*[525]
 %==============================================================================
 Cat:biological;EN:Adenine;MW:135.13;EXA:1
 :
@@ -1262,7 +1262,7 @@
  @1,15,O,!,//O,!2,S,60,60,-60,N!2,60,-60
 ;
 %------------------------------------------------------------------------------
-Cat:antibiotics;EN:Rifampicin;MW:822.94;EXA:1
+Cat:antibiotics;EN:Rifampicin;MW:822.94;EXA:2
 :
 <30,Ph,6:/_^30,5:/OH,-6=?5,-3:O,-8=?6,{-2,-4}=dl,{-1,-4}:/OH,
  #1, at -2,\,NH,60,-60,60~dl,60,60~dl,-60,
@@ -2789,7 +2789,7 @@
 <-30,!,O,!,P,//S,/O!^160,!,O,!,Ph, at -3,\,SOO,!,N!,!
 ;
 %------------------------------------------------------------------------------
-Cat:antibacterial;EN:Lincomycin;MW:406.54;EXA:-
+Cat:antibacterial;EN:Lincomycin;MW:406.54;EXA:1
 :
 <6,?5,5:N,5:*/_,2:*/!2,
  @3,\*,//O,!,NH,!,!~wb,?6,-1:O,{-3',-4,-5}:*/OH,-2:/*S!, at 8,-30,/_,60,OH
@@ -2844,7 +2844,7 @@
  @-1,\*,O,!~wb,|,?6`.7,6:O,{3'^35,5}:*/_,3^-35:/NH2,4:/*OH,
 ;
 %------------------------------------------------------------------------------
-Cat:biological;EN:Maitotoxin;MW:3425.86;EXA:2
+Cat:biological;EN:Maitotoxin;MW:3425.86;EXA:-
 :
 <55.8,?6,-4=?7 ,{-4,-3,-3,-3}=?6, at -3,\,!3,?6,{-4,-3,-3,-3}=?6, at -3,\,?6,-3=?6,
  @-3,\,!3,60,<-30,?6,-3=?6, at -3,30,<30,?6,{-3,-3}=?6,-3=?7,{-4,-3,-3}=?6,

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	2023-01-29 21:17:25 UTC (rev 65665)
+++ trunk/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex	2023-01-29 21:17:43 UTC (rev 65666)
@@ -1,7 +1,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%  Molecular Coding Format manual                by  Akira Yamaji 2023.01.09
+%  Molecular Coding Format manual                by  Akira Yamaji 2023.01.29
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% ** mcf2graph.mf must be version 4.91
+% ** mcf2graph.mf must be version 4.92
 % ** use mcf_library.mcf
 % ** typeset by LuaLaTeX(luamplib)
 %----------------------------------------------------------------------------
@@ -18,11 +18,12 @@
 \mplibcodeinherit{enable}%
 \mplibverbatim{enable}%
 \mpliblegacybehavior{disabled}%
+\begin{mplibcode}
+  input mcf2graph;
+\end{mplibcode}
 \everymplib{%
-  if unknown Ph1: input mcf2graph; fi
   sw_output:=Fig+Calc;
   tag1:="J"; tag2:="C"; tag3:="fm"; tag4:="mw"; tag5:="EN"; tag6:="MW";
-  outputformat:="eps";
   fsize:=(60mm,35mm);
   blength:=0mm;
   max_blength:=10mm;
@@ -3482,11 +3483,11 @@
 \mplibcodeinherit{enable}%
 \mplibverbatim{enable}%
 \mplibnumbersystem{double}%
-\everymplib{%
-  if unknown Ph1: input mcf2graph; fi
+\begin{mplibcode}
+  input mcf2graph;
   sw_output:=Fig; max_blength:=4.5mm;
   defaultfont:="uhvr8r"; defaultsize:=8bp; defaultscale:=1;
-}%
+\end{mplibcode}
 \begin{document}
 \noindent%
 %--------------------------------------------------------------------



More information about the tex-live-commits mailing list.