summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-10-30 21:47:32 +0000
committerKarl Berry <karl@freefriends.org>2016-10-30 21:47:32 +0000
commit89a0d8d836136e5468c566d1953f5e5e6f4bd853 (patch)
treecbed6b6077859a7e2fe66d1afa4263e9a8033d27 /Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
parent58fc5888acdab56053b3c486a4cee71a43cadc87 (diff)
mcf2graph (30oct16)
git-svn-id: svn://tug.org/texlive/trunk@42385 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.tex197
1 files changed, 147 insertions, 50 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
index f3fc19b2fee..ee720dc7eca 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 2016.10.23
+% Molecular Coding Format manual by Akira Yamaji 2016.10.30
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
%%%%\usepackage{graphicx}
@@ -711,21 +711,26 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
%-----------------------------------------------------------------------------
\subsubsection{Solid mode}
\begin{verbatim}
- sw_solid=1 :
+ (sw_solid=0 : fit to font size)
+ ** default
+\end{verbatim}
+\MCFstructure
+%-----------------------------------------
+\begin{verbatim}
+ (sw_solid=1 : solid ratio bond/font width)
ratio_bond_width=0.1
- font_width=70mm
- (bond_len#=70mm*0.1=7mm)
+ font_width=60mm
+ (bond_len#=60mm#*0.1=6mm#)
** ignore bond_len#
-
- sw_solid=2 :
- bond_len#=6mm#
+\end{verbatim}
+\MCFstructure
+%-----------------------------------------
+\begin{verbatim}
+ (sw_solid=2 : solid bond length)
+ bond_len#=10mm#
** ignore ratio_bond_width
\end{verbatim}
-\MCFstructure\\
-\makebox[5mm]{}%
-\makebox[25mm]{\tt 0 :default}%
-\makebox[25mm]{\tt 1}%
-\makebox[20mm]{\tt 2}%
+\MCFstructure
%-----------------------------------------------------------------------------
\subsubsection{Expand mode}
\begin{verbatim}
@@ -754,27 +759,33 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
\makebox[30mm]{\tt 0 :default}%
\makebox[30mm]{\tt 1}%
%-----------------------------------------------------------------------------
-\subsection{Frame,vector}
-%-----------------------------------------------------------------------------
-\subsubsection{Start vector}
-\begin{verbatim}
- default: sw_start_vector=0
-\end{verbatim}
-\MCFstructure\\
-\makebox[5mm]{}%
-\makebox[30mm]{\tt 0 :default}%
-\makebox[30mm]{\tt 1}%
+\newpage
+\subsection{Frame}
%-----------------------------------------------------------------------------
\subsubsection{Font frame}
\begin{verbatim}
- sw_font_frame=0 : no frame **default
- sw_font_frame=1 : draw frame of font
- sw_font_frame=2 : draw frame inside margin
- sw_font_frame=3 : draw both
-
- sw_font_frame:=3;
+ (No font frame)
margin_left_right:=5mm;
margin_top_bottom:=2mm;
+ sw_font_frame:=0; ** default
+ MCf(<30,Ph,4:/Cl,3:/F)
+\end{verbatim}
+\MCFstructure
+\begin{verbatim}
+ (Draw font frame)
+ sw_font_frame:=1;
+ MCf(<30,Ph,4:/Cl,3:/F)
+\end{verbatim}
+\MCFstructure
+\begin{verbatim}
+ (Draw frame inside margin)
+ sw_font_frame:=2;
+ MCf(<30,Ph,4:/Cl,3:/F)
+\end{verbatim}
+\MCFstructure
+\begin{verbatim}
+ (Draw both frame)
+ sw_font_frame:=3;
MCf(<30,Ph,4:/Cl,3:/F)
\end{verbatim}
\MCFstructure
@@ -798,44 +809,105 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
\subsection{Clipping font}
\begin{verbatim}
beginfont()
- sw_clip:=0;
- MCf(<30,Ph,4:/Cl,3:/F) endfont
+ sw_clip:=0;
+ MCf(<30,Ph,4:/Cl,3:/F)
+ endfont
** default: sw_clip=0
\end{verbatim}
\MCFstructure
\begin{verbatim}
beginfont()
- sw_clip:=1;
- MCf(<30,Ph,4:/Cl,3:/F) endfont
+ sw_clip:=1;
+ MCf(<30,Ph,4:/Cl,3:/F)
+ endfont
\end{verbatim}
\MCFstructure
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newpage
-\section{MCF draw function}
-\subsection{Function MCd (draw)}
+\section{Function}
+\subsection{Function MCd()}
\begin{verbatim}
+ (Draw molecular structure)
+
MCd(a,b)(c,d)(...)
a: ratio molecular width/font width
b: ratio molecular hight/font hight
c: x axis position
d: y axis position
- MCd(1,0.8)(0.2,0.9)(<30,Ph,3:/F,4:/Cl)
- MCd(1,0.8)(0.8,0.1)(<30,Ph,3:/F,4:/Cl)
+ beginfont()
+ MCd(1,0.8)(0.2,0.9)(<30,Ph,3:/F,4:/Cl)
+ MCd(1,0.8)(0.8,0.1)(<30,Ph,3:/F,4:/Cl)
+ endfont
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection{Function MCf (fit draw)}
+\subsection{Function MCf()}
\begin{verbatim}
+ (Draw fit to font size)
+
MCf(...) : MCd(1,1)(0.5,0.5)(...)
- sw_font_frame:=1;
+ beginfont()
+ MCf(<30,Ph,3:/F,4:/Cl)
+ endfont
+\end{verbatim}
+\MCFstructure
+%-----------------------------------------------------------------------------
+\newpage
+\subsection{Function EXT()}
+\begin{verbatim}
+ (Extra graphic to font)
+
+ w: font width
+ h: font height
+ wd: font width-margin_left_right*2
+ ht: font height-margin_top_bottom*2
+ p0: x=margin_left_right
+ y=margin_top_bottom
+ n: molecular number
+ p[m]: molecular origin position
+ (1<=m<=molecular count)
+
+ beginfont()
sw_mol_frame:=1;
- MCf(<30,Ph,3:/F,4:/Cl)
+ MCd(1,1)(0,0.5)(<30,Ph,2:/OH,5:/OH)
+ MCd(1,1)(1,0.5)
+ (<30,?6,$(3,6)dl,@(2,5)//O)
+ EXT(
+ draw ((0,0)--(26mm,0)--(22mm,2mm))
+ shifted (0.3w,0.5h);
+ drawdot p1 withpen pencircle scaled 2mm;
+ drawdot p2 withpen pensquare scaled 2mm;
+ )
+ endfont
+\end{verbatim}
+\MCFstructure
+%-----------------------------------------------------------------------------
+\subsection{Function ext()}
+\begin{verbatim}
+ (Extra graphic to molecule)
+
+ wd: molecular width
+ ht: molecular height
+ p0: origin of molecular structure
+ n: atom number
+ p[m]: atom position of A[m]
+ a[m]: branch angle of A[m]
+ (1<=m<=atom count)
+ draw_vector(pos,ang,len) :
+ pos:position ang:angle len:length
+
+ beginfont()
+ MCf(<30,Ph,3:/F,4:/Cl)
+ ext(draw p0--(p0+(wd,0))
+ --(p0+(wd,ht);
+ draw_vector(p6,a6-180,8mm);
+ )
+ endfont
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection{Local setting}
+\subsection{Local parameter setting}
\begin{verbatim}
beginfont() MCf(Ph) endfont
beginfont()
@@ -844,16 +916,18 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
endfont
beginfont() MCf(Ph) endfont
\end{verbatim}
-\MCFstructure
+\MCFstructure\MCFstructure\MCFstructure
%-----------------------------------------------------------------------------
-\subsection{Global setting}
+\subsection{Global parameter setting}
\begin{verbatim}
ratio_thickness_bond:=0.05;
beginfont() MCf(Ph) endfont
beginfont() MCf(Ph) endfont
beginfont() MCf(Ph) endfont
\end{verbatim}
-\MCFstructure
+\MCFstructure\MCFstructure\MCFstructure
+%-----------------------------------------------------------------------------
+\section{Output infomation}
%-----------------------------------------------------------------------------
\subsection{Output molecular information}
\begin{verbatim}
@@ -870,10 +944,14 @@ cFM:calculated molecular formula
\subsection{Output additional information}
\begin{verbatim}
beginfont("EN:Tocopherol","CAS:59-02-9")
- MCf(...) endfont
+ MCf(<30,Ph,3=?6,
+ 7:O,@(1,2,5)/Me,8:/*Me^60,6:/OH,
+ 8\,|,!12,@(4,8)/*Me,12:/Me)
+endfont
%% Output to mcf_man_soc-info.aux %%
F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
+............................................
*F:filename *C:char number EN:molecular name
CAS:CAS number *:default output
@@ -884,10 +962,19 @@ CAS:CAS number *:default output
\begin{verbatim}
aux_delimiter:="/";
beginfont("EN:Ampicillin","CAS:69-53-4")
- MCf(...) endfont
+ MCf(<45,?4,2:N,2=?5,-1:S,
+ @(3^45,4^-45)/*H,1://O^15,
+ 5:/*COOH^-18,@(6^35,6^-35)/Me,
+ 4*\^75,NH,!,//O,!,/*NH2,!,Ph)
+endfont
+beginfont(......)
+ ...........
+endfont
+..............
%% Output to mcf_man_soc-info.aux %%
F:mcf_man_soc/C:90/EN:Ampicillin/CAS:69-53-4
+............................................
**default aux_delimiter=";"
\end{verbatim}
@@ -899,11 +986,21 @@ F:mcf_man_soc/C:90/EN:Ampicillin/CAS:69-53-4
tag4:="EN"; var4:="inf_EN";
sw_auxfix:=1; auxtag_out;
beginfont("EN:Cholesterol","NO:1")
- ..... endfont
+ MCf(<30,?6,$(-4,-2)?6,-4=?5,7=dl,
+ 1:*/OH,@(4,12)*/Me^60,9:*/H^60,
+ 10:/*H^180,11:/*H^-60,17:/*H^-54,
+ -1\^18,/*Me,-60,!3,/Me,!)
+ endfont
+ beginfont(......)
+ ...........
+ endfont
+ ..............
%% Output to mcf_man_soc-info.aux %%
F;C;NO;EN
mcf_man_soc;91;1;Ampicillin
+ ...........................
+
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
@@ -1203,7 +1300,7 @@ M END
\end{verbatim}%
\newpage
%----------------------------------------------------------------------------
-\subsection{\LaTeX file example}
+\subsection{LaTeX file example}
%############################################################################
\begin{verbatim}
%--------------------------------------------------------------------
@@ -1243,7 +1340,7 @@ M END
\end{verbatim}%
%############################################################################
%------------------------------------------------------------------------
-\INFO{F:mcf_man_soc,C:103,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}%
-\INFO{F:mcf_man_soc,C:104,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}%
+\INFO{F:mcf_man_soc,C:113,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}%
+\INFO{F:mcf_man_soc,C:114,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}%
%------------------------------------------------------------------------
\end{document}