summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-08-10 21:03:24 +0000
committerKarl Berry <karl@freefriends.org>2020-08-10 21:03:24 +0000
commitac19f486a8738d31f57d8017a755088231008738 (patch)
treedad0a2ade0c0d28e9710a17e83fc5a7514a640d0 /Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
parent6f5713565f4a97d90fca8a6cc5dfa14bf4a7bb42 (diff)
mcf2graph (10aug20)
git-svn-id: svn://tug.org/texlive/trunk@56086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex')
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex193
1 files changed, 79 insertions, 114 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
index 4c15bbafc19..9f33673c13a 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format manual by Akira Yamaji 2020.07.26
+% Molecular Coding Format manual by Akira Yamaji 2020.08.10
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
%%%%\documentclass[a4paper,twoside]{article}
@@ -9,6 +9,9 @@
%%%%\usepackage[dvipdfmx]{graphicx}
\usepackage[pdftex]{hyperref}
%%%%\usepackage[dvipdfmx]{hyperref}
+%---------------------
+\usepackage{mcf_setup}
+%---------------------
\hypersetup{colorlinks=true,linkcolor=blue}
\topmargin=-18mm
\textheight=254mm
@@ -19,81 +22,51 @@
\unitlength=1mm%
\makeatletter
%----------------------------------------------------------------------------
-\newcount \fontnum%
-\newcount \tempnum%
+\newcount \fnum%
\newdimen \htman%
\newdimen \wdman%
\newdimen \htmans%
+\newbox \fbox%
%----------------------------------------------------------------------------
-\newcount \MCFformat%
-\newbox \box@strufont%
\htman=45mm%
\wdman=94mm%
\htmans=42mm%
-\fontnum=29%
-\tempnum=1%
+\fnum=29%
%----------------------------------------------------------------------------
\edef\MCFjobname{mcf_man_soc}%
+\edef\@pk{pk}%
%----------------------------------------------------------------------------
-\MCFformat=-1% use pkfont
-%%\MCFformat=0% \includegraphics{jobname-nnn.mps}
-%%\MCFformat=1% \includegraphics[width=wd{jobname-nnn.png}}
-%%\MCFformat=2% \includegraphics{jobname-nnn.svg}
-%%\MCFformat=3% \includegraphics{jobname-nnn.eps}
+\edef\fext{pk}%
+%%\edef\fext{mps}%
+%%\edef\fext{png}%
+%%\edef\fext{svg}%
+%%\edef\fext{eps}%
%----------------------------------------------------------------------------
\font\@strufont=\MCFjobname\relax%
%----------------------------------------------------------------------------
\def\MCFgraph{%
-\ifnum\MCFformat<0{\hspace{5mm}\@strufont\char\fontnum}%
+\ifx\fext\@pk{\hspace{5mm}\@strufont\char\fnum}%
\else%
-\ifnum\MCFformat=0\edef\stru@ext{mps}\fi
-\ifnum\MCFformat=1\edef\stru@ext{png}\fi
-\ifnum\MCFformat=2\edef\stru@ext{svg}\fi
-\ifnum\MCFformat=3\edef\stru@ext{eps}\fi
-%
-\ifnum\fontnum<100%
-\ifnum\fontnum<10\edef\zero@cnt{00}% jobname-00n.ext
-\else\edef\zero@cnt{0}\fi% jobname-0nn.ext
-\else\edef\zero@cnt{}% jobname-nnn.ext
+\ifnum\fnum<10\edef\pre@zero{00}%
+\else\ifnum\fnum<100\edef\pre@zero{0}%
+\else\edef\pre@zero{}\fi\fi%
+\edef\file@name{\MCFjobname-\pre@zero\the\fnum.\fext}%
+\setbox\fbox=\hbox{\@strufont\char\fnum}%
+\hspace{5mm}\includegraphics[width=\wd\fbox,height=\ht\fbox]{\file@name}%
\fi%
-%
-\edef\file@name{\MCFjobname-\zero@cnt\the\fontnum.\stru@ext}%
-%
-\ifnum\MCFformat=1%
-\setbox\box@strufont=\hbox{\@strufont\char\fontnum}%
-\hspace{5mm}\includegraphics[width=\wd\box@strufont]{\file@name}%
-\else%
-\hspace{5mm}\includegraphics\file@name%
-\fi%
-%
-\fi%
-%
-\global\advance\fontnum\@ne\relax%
+\global\advance\fnum\@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@sel#1{%
-\if#1\empty\relax\else%
- \edef\@tag{\expandafter\@fst#1;}%
- \edef\@var{\expandafter\@sec#1;}%
- \ifx\@tag\@F\edef\MOLfile{\@var}\fi%
- \ifx\@tag\@C\edef\MOLchar{\@var}\fi%
- \ifx\@tag\@EN\edef\MOLnameE{\@var}\fi%
- \ifx\@tag\@NO\edef\MOLnum{\@var}\fi
- \ifx\@tag\@cMW\edef\CALmw{\@var}\fi
- \ifx\@tag\@cFM\edef\CALfm{\@var}\fi
-\fi}%
\def\put@char{%
- \begin{picture}(84,28)%
- \put(0,23){\bf [\MOLnum]\MOLnameE}%
- \put(5,18){\small\tt FM:\CALfm{ }MW:\CALmw}%
- \put(5,0){\font\@strufont=\MOLfile\relax%
- \hbox{\@strufont\char\MOLchar}}%
+ \begin{picture}(75,28)%
+ \put(0,23){\bf [\NO]\EN}%
+ \put(5,18){\small\tt FM:\fm{ }MW:\mw}%
+ \put(5,0){\font\@strufont=\File\relax%
+ \hbox{\@strufont\char\Char}}%
\end{picture}%
-}
+}%
%----------------------------------------------------------------------------
-\def\INFO#1{\@for\@temp:=#1\do{\mol@sel\@temp}\put@char}%
+\def\INFO#1{\@for\@temp:=#1\do{\tag@var\@temp}\put@char}%
%----------------------------------------------------------------------------
\begin{document}
\title{\Huge\sf Molecular Coding Format manual}
@@ -1353,28 +1326,30 @@ input mcf2graph.mf; % input macro
%-------------------------------------------------------------------------
sw_aux_out:=1; % aux(information) file output on > Global setting
fsize:=(60mm,40mm); % (font width,font height) >
-var3:="cal_MW"; tag3:="cMW"; > AUX file table
-var4:="cal_FM"; tag4:="cFM"; >
+tag1:="F"; > AUX file table
+tag2:="C"; >
+tag3:="mw"; >
+tag4:="fm"; >
%%%% sw_rep_out:=1; > Report output
%%%% sw_mol_out:=1; > MOL file output
outputformat:="png"; hppp:=vppp:=0.1; > PNG output
outputtemplate:="%j-%3c.png"; >
%-------------------------------------------------------------------------
-beginfont("NO:1","EN:Ampicillin") > begin font(information)
+beginfont("N:1","EN:Ampicillin") > begin font(information)
MC(<45,?4,2:N,2=?5,-1:S, > begin MCF (1)
{3^45,4^-45}:/*H,1://O^15,5:/*COOH^-18, >
{6^35,6^-35}:/_, >
4:@,75,NH,!,//O,!,/*NH,!,Ph) > end MCF
endfont > end font
%------------------------------------------------------------------------
-beginfont("NO:2","EN:Cholesterol") > begin font(information)
+beginfont("N:2","EN:Cholesterol") > begin font(information)
MC(<30,?6,{-4,-2}=?6,-4=?5,7=dl, > begin MCF (2)
1:*/OH,{4,12}:*/_^60,9:*/H^60, >
10:/*H^180,{11,-1}:/*H^-60, >
-1:@,17,/*_,!4,/_,!) > end MCF
endfont > end font
%------------------------------------------------------------------------
-beginfont("NO:3","EN:Limonin") > begin font(information)
+beginfont("N:3","EN:Limonin") > begin font(information)
MC(<30,?6,{-3,-4}=?6, > begin MCF (3)
-5=?3,-2=wf,-1=wb,6=?5,-4=?6,-5=wf, >
{13,15,17,20}:O,{3,12,21}://O, >
@@ -1383,7 +1358,7 @@ beginfont("NO:3","EN:Limonin") > begin font(information)
14:\*,|,?5,{1,4}=dl,3:O) > end MCF
endfont > end font
%------------------------------------------------------------------------
-beginfont("NO:4","EN:beta-carotene) > begin font(information)
+beginfont("N:4","EN:beta-carotene) > begin font(information)
MC(<30,?6,3=dl,{3,5^35,5^-35}:/_, > begin MCF (4)
4:\,|,!18,{1,3,5,7,9,11,13,15,17}=dr, >
{3,7,12,16}:/_, >
@@ -1409,42 +1384,39 @@ bye
\end{verbatim}
\paragraph{(Sourse)}
\begin{verbatim}
-beginfont("EN:Ampicillin")(....)
-beginfont("EN:Cholesterol")(....)
-beginfont("EN:Limonin")(....)
-beginfont("EN:beta-Carotene")(....)
+beginfont("EN:Ampicillin") .... endfont
+beginfont("EN:Cholesterol") .... endfont
+beginfont("EN:Limonin") .... endfont
+beginfont("EN:beta-Carotene") .... endfont
\end{verbatim}
\paragraph{(Setting)}
\begin{verbatim}
-tag1:="F"; var1:="jobname"; * default output
-tag2:="C"; var2:="char_num"; * default output
-tag3:="cMW"; var3:="calc_weight";
-tag4:="cFM"; var4:="calc_formula";
+tag1:="F"; tag2:="C"; tag3:="mw"; tag4:="fm";
\end{verbatim}
\paragraph{(Output)}
\begin{verbatim}
(sw_aux_out=1)
-F:mcf_man_soc;C:1;cMW:349.40462;cFM:C16H19N3O4S;EN:Ampicillin
-F:mcf_man_soc;C:2;cMW:386.6532;cFM:C27H46O;EN:Cholesterol
-F:mcf_exa_soc;C:3;cMW:470.5113;cFM:C26H30O8;EN:Limonin
-F:mcf_exa_soc;C:4;cMW:536.8722;cFM:C40H56;EN:beta-Carotene
-
-(sw_aux_out=2)
-F;C;cMW;cFM;EN
-mcf_man_soc;1;349.40462;C16H19N3O4S;Ampicillin
-mcf_man_soc;2;386.6532;C27H46O;Cholesterol
-mcf_exa_soc;3;470.5113;C26H30O8;Limonin
-mcf_exa_soc;4;536.8722;C40H56;beta-Carotene
-
-(aux_delimiter:="/";)
-F:mcf_man_soc/C:1/cMW:349.40462/cFM:C16H19N3O4S/EN:Ampicillin
-F:mcf_man_soc/C:2/cMW:386.6532/cFM:C27H46O/EN:Cholesterol
-F:mcf_exa_soc/C:3/cMW:470.5113/cFM:C26H30O8/EN:Limonin
-F:mcf_exa_soc/C:4/cMW:536.8722/cFM:C40H56/EN:beta-Carotene
+F:mcf_man_soc;C:1;mw:349.40462;fm:C16H19N3O4S;EN:Ampicillin
+F:mcf_man_soc;C:2;mw:386.6532;fm:C27H46O;EN:Cholesterol
+F:mcf_exa_soc;C:3;mw:470.5113;fm:C26H30O8;EN:Limonin
+F:mcf_exa_soc;C:4;mw:536.8722;fm:C40H56;EN:beta-Carotene
+
+(sw_aux_out=2 (3))
+F;C;mw;fm(;EN)
+mcf_man_soc;1;349.40462;C16H19N3O4S(;Ampicillin)
+mcf_man_soc;2;386.6532;C27H46O(;Cholesterol)
+mcf_exa_soc;3;470.5113;C26H30O8(;Limonin)
+mcf_exa_soc;4;536.8722;C40H56(;beta-Carotene)
+
+(aux_delimiter="/")
+F:mcf_man_soc/C:1/mw:349.40462/fm:C16H19N3O4S/EN:Ampicillin
+F:mcf_man_soc/C:2/mw:386.6532/fm:C27H46O/EN:Cholesterol
+F:mcf_exa_soc/C:3/mw:470.5113/fm:C26H30O8/EN:Limonin
+F:mcf_exa_soc/C:4/mw:536.8722/fm:C40H56/EN:beta-Carotene
\end{verbatim}
\paragraph{(Tag)}
\begin{verbatim}
-F : filename
+F : filename
C : char number
NO : serial number
EN : english name
@@ -1452,9 +1424,11 @@ JN : japanese name
FM : formula from literature data
MW : molecular weight from literature data
USE : the use
-cMW : molecular weight calculated
-cMI : monoisotopic mass calculated
-cFM : molecular formula calculated
+mw : molecular weight calculated
+mi : monoisotopic mass calculated
+fm : molecular formula calculated
+w : font width
+h : font height
\end{verbatim}
%------------------------------------------------------------------------
\newpage
@@ -1592,7 +1566,7 @@ M END
%--------------------------------------------------------------------
\begin{mplibcode}
fsize:=(50mm,50mm);
- beginfont("NO:2","EN:Limonin","MW:470.51")
+ beginfont("NO:1","EN:Limonin","MW:470.51")
MC(<30,
?6,{-3,-4}=?6,
-5=?3,-2=wf,-1=wb,6=?5,-4=?6,-5=wf,
@@ -1606,7 +1580,7 @@ M END
%--------------------------------------------------------------------
\begin{mplibcode}
fsize:=(80mm,50mm);
- beginfont("NO:3","EN:beta-carotene","MW:536.87")
+ beginfont("NO:2","EN:beta-carotene","MW:536.87")
MC(<30,
?6,3=dl,{3,5^35,5^-35}:/_,
4:\,|,!18,{1,3,5,7,9,11,13,15,17}=dr,
@@ -1618,7 +1592,7 @@ M END
%--------------------------------------------------------------------
\begin{mplibcode}
fsize:=(50mm,50mm);
- beginfont("NO:4","EN:Gibberellin A3","MW:346.37");
+ beginfont("NO:3","EN:Gibberellin A3","MW:346.37");
MC(<18,?5,3=?7,5=?6[12],
8:@,160`1.3,3:#,13=dl,6=wf,8=wb,
5:@,40~zf`1,O,60,//O^180,14~zb:#,
@@ -1640,41 +1614,32 @@ endfont;
%--------------------------------------------------------------------
\documentclass[a4paper]{article}
\usepackage{graphicx}
+%---------------------
+\usepackage{mcf_setup}
+%---------------------
\pagestyle{empty}
\makeatletter%
%--------------------------------------------------------------------
-\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@NO{NO}\def\@MW{MW}\def\@FMc{FMc}%
-\def\@fst@param#1:#2;{#1}\def\@sec@param#1:#2;{#2}%
-\def\mol@sel#1{%
-\if#1\empty\relax\else%
- \edef\@tag{\expandafter\@fst@param#1;}%
- \edef\@var{\expandafter\@sec@param#1;}%
- \ifx\@tag\@F\edef\MOLfile{\@var}\fi%
- \ifx\@tag\@C\edef\MOLchar{\@var}\fi%
- \ifx\@tag\@EN\edef\MOLnameE{\@var}\fi%
- \ifx\@tag\@NO\edef\MOLnum{\@var}\fi
- \ifx\@tag\@MW\edef\CALmw{\@var}\fi
- \ifx\@tag\@FMc\edef\CALfm{\@var}\fi
-\fi}%
\def\put@char{%
\begin{picture}(84,42)%
- \put(0,38){\bf [\MOLnum]\MOLnameE{ }\small\tt/FM:\CALfm/MW:\CALmw}%
- \put(10,0){\font\@strufont=\MOLfile\relax%
- \hbox{\@strufont\char\MOLchar}}%
+ \put(0,38){\bf [\MOLnum]\EN{ }\small\tt/FM:\fm/MW:\mw}%
+ \put(10,0){\font\@strufont=\File\relax%
+ \hbox{\@strufont\char\Char}}%
\end{picture}%
-\def\INFO#1{\@for\@temp:=#1\do{\mol@sel\@temp}\put@char}%
+}%
+\def\INFO#1{\@for\@temp:=#1\do{\tag@var\@temp}\put@char}%
\makeatother
%--------------------------------------------------------------------
\begin{document}
\unitlength=1mm%
-\INFO{F:mcf_man_soc,C:138,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}%
-\INFO{F:mcf_man_soc,C:139,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}%
+\INFO{F:mcf_man_soc,C:138,NO:1,mw:349.40462,fm:C16H19N3O4S,EN:Ampicillin}%
+\INFO{F:mcf_man_soc,C:139,NO:2,mw:386.6532,fm:C27H46O,EN:Cholesterol}%
\end{document}
%--------------------------------------------------------------------
\end{verbatim}%
%############################################################################
%------------------------------------------------------------------------
-\INFO{F:mcf_man_soc,C:138,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}%
-\INFO{F:mcf_man_soc,C:139,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}%
+\INFO{F:mcf_man_soc,C:138,NO:1,mw:349.40462,fm:C16H19N3O4S,EN:Ampicillin}%
+\INFO{F:mcf_man_soc,C:139,NO:2,mw:386.6532,fm:C27H46O,EN:Cholesterol}%
%------------------------------------------------------------------------
\end{document}