%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Molecular Coding Format manual      by  Akira Yamaji 2016.01.16
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
\usepackage[dvipdfmx]{graphicx}
%%%%\usepackage[pdftex]{graphicx}
%%%%\usepackage{epstopdf}
\topmargin=-20mm
\textheight=25.5cm
\textwidth=16.8cm
\oddsidemargin=0mm
\unitlength=1mm%
\makeatletter
%----------------------------------------------------------------------------
\newcount \fontnum%
\newcount \tempnum%
\fontnum=0%
\tempnum=1%
%----------------------------------------------------------------------------
\font\@strufont=mcf_man_soc\relax%
%----------------------------------------------------------------------------
\def\MCFtitle#1{\framebox{\sf No.\the\tempnum}\hspace{2mm}\bf #1}
%----------------------------------------------------------------------------
\def\MCFstru{%
 \rlap{\makebox(77,3.5)[t]{\makebox(68,43.27){\@strufont\char\fontnum}}}%
 \advance\fontnum\@ne\relax}%
\def\MCFstructure{%
 \makebox(77,3.5)[t]{\frame{\makebox(68,43.27){\@strufont\char\fontnum}}}%
 \advance\fontnum\@ne\relax\advance\tempnum\@ne\relax}%
%----------------------------------------------------------------------------
\begin{document}
\begin{center}
 {\LARGE\bf Molecular Coding Format manual}\vspace{3mm}\\
 Author : Akira Yamaji \quad Date : \today\\
 Located at : http://www.ctan.org/pkg/mcf2graph\\
\end{center}
\hspace{8mm}%
\begin{minipage}{145mm}
\quad Molecular Coding Format(MCF) is new linear notation represent chmical 
 structure diagram. This 'Coding' is named from coding(programing) technique
 like adressing,grouping,macro,etc. There are no Meta language commands in MCF.
 mcf2graph.mf(metapost/metafont macro) convert MCF file to graphics file
 pk font,PNG,SVG,EPS or MDL MOL file(V2000). \\
\end{minipage}\vspace{3mm}\\
\linethickness{0.08mm}%
%----------------------------------------------------------------------------
\noindent%
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Chain}
\begin{verbatim}
plus(+):anticlockwize,minus(-):clockwize
! : take value depend on
        current angle and enviroment

  <30,-60,60,-60,60,-60,60
  <30,!,!,!,!,!,!

\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Ring}
\begin{verbatim}
six membered ring

  ?6

  ** ?6 : <-120,60,60,60,60,60,&1
  ** &1 : make bond connect to A1
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Rotate current angle}
\begin{verbatim}
<angle : rotate current angle

   <30,!4,<30,?6

  ** !4: !,!,!,!
  ** bold arrow is default angle and position
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Change bond type (1)}
\begin{verbatim}
~bond : change bond 
  dm:double,dl:double left,dr:double right,
  wf:wedge forward,wb:wedge backward,
  zf:wedge dotted,zb:wedge dotted backward

  <30,!~dm,!~dl,!~dr,!~wf,!~wb,!~zf,!~zb
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Change bond type (2)}
\begin{verbatim}
  Bn=bond type : change bond type at Bn
  vf:vector forward, vb:vector backward,
  tm:triple, wv:waved, bd:broad single,
  ov:over line

  <30,!9,1=vf,2=vb,3=tm,4=dt,5=wv,
  @(7~bd^-45`2,9~ov^45`2)/Me
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Change bond length (1)}
\begin{verbatim}
Bn`length : change bond length at Bn

  <30,!2,!2`1.2,!2
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Change bond length (2)}
\begin{verbatim}
``length : change all bond length after

  <30,!2,``1.2,!4
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Change chain length (3)}
\begin{verbatim}
?n`length : change ring length

  <30,?6,3\,|,?6`1.2,4=?6
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Change atom (1)}
\begin{verbatim}
Insert hetero atom

  <30,!2,O,!2
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Change atom (2)}
\begin{verbatim}
2:O : change A2 C to O
@(3,5)N : change  A3,A5 C to N

  <30,!6,2:O,@(3,5)N

An(n:numeric): atom number
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Change atom (3)}
\begin{verbatim}
2:N : change A2 C to N

  ?6,4\,?6,2:N
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Change atom (brock address)}
\begin{verbatim}
2:N : change A2(brock address) C to N

?6,4\,|,?6,2:N

| : divide brock
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Change atoma (absolute address)}
\begin{verbatim}
#2:N : change A#2 C to N

  ?6,4\,|,?6,#2:N
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Change atom (relative address)}
\begin{verbatim}
-2:N : change A(-2) C to N

  ?6,4\,?6,-2:N
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Fuse ring (attached 1 bond)}
\begin{verbatim}
?6,3=?5 : fuse ?5 at B3

  ?6,3=?5

Bn(n:numeric): bond number
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Fuse multi ring (attached 1 bond)}
\begin{verbatim}

?6,$(-3,-4,-4,-2,-2,-4,-4)?6
?6,$(4,8,13,20,25,28,33)?6

\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Fuse ring (attached 2 bond)}
\begin{verbatim}
(4,11)=?6[4]  : fuse 4/6 ring to B11..B4
(4,11)=?5[3]  : fuse 3/5 ring to B11..B4
(4,11)=?4[2]  : fuse 2/4 ring to B11..B4

MCd(1,.7)(  0,0)(<30,?6,3=?6,(11,4)=?6[4])
MCd(1,.6)(.54,1)(<30,?6,3=?6,(11,4)=?5[3])
MCd(1,.6)(  1,0)(<30,?6,3=?6,(11,4)=?4[2])
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Fuse ring (attached 3,4 bond)}
\begin{verbatim}
(16,4)=?6[3] : fuse 3/6 ring to B16..B4
(16,4)=?5[2] : fuse 2/5 ring to B16..B4
(21,3)=?6[2] : fuse 2/6 ring to B21..B3

MCd(1,.55)( 0, 0)(?6,$(3,10)?6,(16,4)=?6[3])
MCd(1,.55)(.43,1)(?6,$(3,10)?6,(16,4)=?5[2])
MCd(1,.53)(1,0)(<30,?6,$(2,10,15)?6,(21,3)=?6[2])
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Spiro ring}
\begin{verbatim}
4*,?5 : add ?5(5 membered ring) at A4

<30,!6,4*,?5

An* : jump to An
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Branch bond (1)}
\begin{verbatim}
2\  : 2*,0     4*\ : 4*,0~wf
6\* : 6*,0~zf  8\\ : 8*,0~dm

MCf(<30,!8,2\,!,4*\,!,6\*,!,8\\,!)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Branch bond (2)}
\begin{verbatim}
2\~dr  : 2*,0~dr
4\`1.5 : 4*,0`1.5
6\^15 : 6*,0^15

MCf(<-30,!6,2\~dr,!,4\`1.5,!,6\^15,-60)

\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Insert substituent(1)}
\begin{verbatim}
MCf(<30,
!,/Me,!,/Et,!3,/Pr,!,/iPr,!3,/tBu,!,/Ph^-30,!)

** Me:methyl Et:ethyl Pr:propyl iPr:isopropyl
   tBu:tertial buthyl Ph:phenyl
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Insert substituent(2)}
\begin{verbatim}
/  : single          // : double
*/ : wedge forward   /* : wedge backward
** : direct

MCf(<30,!,//O,!,/*H,!,*/H,!,/?3,!,**?3,!)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Insert substituent(3)}
\begin{verbatim}
~,^,`,> : change type,angle,length,enviroment
          of substituent

MCf(<30,!`1,/Me~zf`2^30,!`1,/Me~zf`2^30,
    !2`1,*/Pr>lr,!2`1,*/Pr>rl,!`1)

\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Add substituent(1)}
\begin{verbatim}
sw_numberA:=1; numberA_end:=_skeletonA_end;
MCf(<30,!11,
  2:/Me,3:/Et,6:/Pr,7:/iPr,10:/tBu,11:/Ph^-30)

** _skeletonA_end :
   end number of molecular skeleton atom 
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Add substituent(2)}
\begin{verbatim}
~,^,`,> : change type,angle,length,enviroment
          of substituent

MCf(<30,?6,
    @(3`2^30,3~wf,4~zf,6~wf^-30,6~zf^30)/H)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Add substituent(3)}
\begin{verbatim}
~,^,`,> : change type,angle,length,enviroment
          of substituent

MCF(<30,!7`1,
@(2,3)/*Me`2^30,5:*/Pr>lr,7:*/Pr>rl)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Chain strech direction environment (1)}
\begin{verbatim}
>hz : horizontal enviroment (default)
>vt : vertical enviroment

  ?4,
  @(3^-90,3^-30,3^90)/'(!3,"{>hz}")>hz,
  @(1^-60,1`2,1^60)/'(!2,"{>vt}")>vt

\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Chain strech direction environment (2)}
\begin{verbatim}
>lr : left-right enviroment
>rl : right-left enviroment

  <30,!6,
  @(3^-30,3,3^30)/'(!3,"{>lr}")>lr,
  @(5^-30,5,5^30)/'(!3,"{>rl}")>rl

\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Chain strech direction environment (3)}
\begin{verbatim}
 >45 : fixed angle enviroment
 >'(-90,90,-90) : multi angle enviroment

  <-30,!6,@(2>45)/'(!3,"{>45}"),
  @(6>'(-90,90,-90))/'(!3,"{>(-90,90,-90)}")
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Change atom and Substituent}
\begin{verbatim}
NH,SOO : inset hetero atom and substituent
         simultaneously

  <30,!3,NH,!,SOO,!3

\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Change color}
\begin{verbatim}
@(5)green : change color of A5 green
$(3)red :   change color of B3 red

  <30,Ph,@(2,5)N,
          2:red,5:blue,3=green

\end{verbatim}
\end{minipage}
%%%%\MCFstructure   % for Metafont
\makebox(77,3.5)[t]{\frame{\makebox(68,43.27)%
{\includegraphics{mcf_man_soc-031.eps}}}}%  for dvipdfmx
%%%%{\includegraphics[width=30mm]{mcf_man_soc-031.png}}}}%   for pdfLaTeX
\advance\fontnum\@ne\relax\advance\tempnum\@ne\relax%
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Chain start multiple characters}
\begin{verbatim}
if chain start multi charactor string,
use !0 instead of !

  MCd( 1,1)(0  ,0.9)(<30,COOH,!0,!3,COOH)

  MCd(.8,1)(0.3,0.1)(<30,COOH,!4,COOH)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{User definition}
\begin{verbatim}
iBuOH : user defined substructure

 iBuOH:='(!,/Me,!,OH)
 MCf(<30,?6,@(4,6)/iBuOH)

\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Inline definition}
\begin{verbatim}
Insert user defined substructure
 
  <30,!3,/'(!,/Me,!,OH),!3

\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Example(1) Ampicillin}
\begin{verbatim}

  <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,!,NH,!,Ph
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Example(2) Cholesterol}
\begin{verbatim}

  <30,?6,$(-4,-2)?6,-4=?5,7=dl,
  1:*/OH,@(4,12)*/Me^60,9:*/H^60,
  10:/*H^180,@(11,-1)/*H^-60,
  -1\^17,/*Me,!4,/Me,!,
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Example(3) alfa-Tocopherol}
\begin{verbatim}

  <30,Ph,3=?6,
  7:O,@(1,2,5)/Me,8:/*Me^60,6:/OH,
  8\,|,!12,@(4,8)/*Me,12:/Me
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Example(4) Caffeine}
\begin{verbatim}

  <30,?6,-4=?5,$(3,8)dl,
  @(2,6,7,9)N,@(2,6,9)/Me,
  @(1,5)//O
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Example(5) Lycorine}
\begin{verbatim}

  <30,Ph,-4=?6,-2=?6,6=?5,(9,12)=?5[3],
  13=dl,8:N,@(15,17)O,
  9:/*H^180,10:*/H^60,13:*/OH,14:/*OH
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Example(6) Gibberellin}
\begin{verbatim}

  <12,?6`1.3,3=?5,9=?7,12\^160`1.6,&8,
  4\^155~zf`1.2,O,55,//O^180`1,&2~zb,
  5=dl,11=wf,13=wb,7:/COOH,11://Me,1:*/OH,
  12:/*OH,2:*/Me,@(3^-60,9^60)*/H
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Font size}
\begin{verbatim}
  beginfont("EN:Caffeine")
    font_wd#:=30mm#;  %<==font width
    font_ht#:=20mm#;  %<==font height
    sw_font_frame:=1;
    MCf(<30,?6,-4=?5,$(3,8)dl,@(2,6,7,9)N,
       @(2,6,9)/Me,@(1,5)//O)
  endfont
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Max ratio bond/width length}
\begin{verbatim}
  max_bond_width:=0.10;
  MCd(1,1)( 0, .5)(<30,Ph)
  max_bond_width:=0.15;   %<<== : default
  MCd(1,1)(.33,.5)(<30,Ph)
  max_bond_width:=0.25;
  MCd(1,1)( 1, .5)(<30,Ph)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Ratio thickness/bond length}
\begin{verbatim}
ratio_thickness_bond:= 0.005;
MCd(1,.6)(0, .5)(<30,Ph)
ratio_thickness_bond:= 0.015;  %<<==
MCd(1,.6)(.5,.5)(<30,Ph)
ratio_thickness_bond:= 0.030;
MCd(1,.6)(1, .5)(<30,Ph)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Offset thickness of bond}
\begin{verbatim}
beginfont() offset_thickness#:=0pt#;
MCd(1,.3)(0, .5)(<30,Ph) endfont
beginfont() offset_thickness#:=0.2pt#;  %<<==
MCd(1,.3)(.5,.5)(<30,Ph) endfont
beginfont() offset_thickness#:=0.5pt#;
MCd(1,.3)(1, .5)(<30,Ph) endfont
\end{verbatim}
\end{minipage}
\MCFstru\MCFstru\MCFstructure%
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Ratio char/bond thickness}
\begin{verbatim}
ratio_char_bond:=1.0;
MCd(1,.6)(0, .5)(<30,?6,5:O,2:NH)
ratio_char_bond:=1.5; %<<==
MCd(1,.6)(.5,.5)(<30,?6,5:O,2:NH)
ratio_char_bond:=2.0;
MCd(1,.6)(1, .5)(<30,?6,5:O,2:NH)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Ratio bondgap/bond length}
\begin{verbatim}
ratio_bondgap_bond:= 0.10;
MCd(1,.6)(0, .5)(<30,Ph)
ratio_bondgap_bond:= 0.15; %<<==
MCd(1,.6)(.5,.5)(<30,Ph)
ratio_bondgap_bond:= 0.20;
MCd(1,.6)(1, .5)(<30,Ph)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Offset of doublebond gap}
\begin{verbatim}
beginfont() offset_bond_gap#:=0.0pt#;
MCd(1,.3)(0, .5)(<30,Ph) endfont
beginfont() offset_bond_gap#:=0.3pt#; %<<==
MCd(1,.3)(.5,.5)(<30,Ph) endfont
beginfont() offset_bond_gap#:=1.0pt#;
MCd(1,.3)(1, .5)(<30,Ph) endfont
\end{verbatim}
\end{minipage}
\MCFstru\MCFstru\MCFstructure%
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Ratio atom/bond length}
\begin{verbatim}
ratio_atom_bond:= 0.25;
MCd(1,.6)(0, .5)(<30,?6,@(2,5)O)
ratio_atom_bond:= 0.36;  %<<==
MCd(1,.6)(.5,.5)(<30,?6,@(2,5)O)
ratio_atom_bond:= 0.45;
MCd(1,.6)(1, .5)(<30,?6,@(2,5)O)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Offset of atom width}
\begin{verbatim}
beginfont() offset_atom#:=0.0pt#;
MCd(1,.3)(0, .5)(<30,Ph,@(2,4,6)N) endfont
beginfont() offset_atom#:=0.8pt#;  %<<==
MCd(1,.3)(.5,.5)(<30,Ph,@(2,4,6)N) endfont
beginfont() offset_atom#:=2.0pt#;
MCd(1,.3)(1, .5)(<30,Ph,@(2,4,6)N) endfont
\end{verbatim}
\end{minipage}
\MCFstru\MCFstru\MCFstructure%
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Ratio wedge/bond length}
\begin{verbatim}
ratio_wedge_bond:=0.10;
MCd(1,.6)(0, .5)(<30,?6,5:*/Me)
ratio_wedge_bond:=0.12; %<<==
MCd(1,.6)(.5,.5)(<30,?6,5:*/Me)
ratio_wedge_bond:=0.20;;
MCd(1,.6)(1, .5)(<30,?6,5:*/Me)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Offset of wedge width}
\begin{verbatim}
beginfont("EN:Offset_wedge")
offset_wedge#:=0.0pt#;
MCd(1,.3)(0, .5)(<30,?6,5:*/Me) endfont
beginfont() offset_wedge#:=0.4pt#;  %<<==
MCd(1,.3)(.5,.5)(<30,?6,5:*/Me) endfont
beginfont() offset_wedge#:=1.0pt#;
MCd(1,.3)(1, .5)(<30,?6,5:*/Me) endfont
\end{verbatim}
\end{minipage}
\MCFstru\MCFstru\MCFstructure%
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Ratio font atom gap/atom length}
\begin{verbatim}
ratio_atomgap_atom:=0.0;
MCd(1,.6)(0, .5)(<30,?6,@(2,5)O)
ratio_atomgap_atom:=0.050;  %<<==
MCd(1,.6)(.5,.5)(<30,?6,@(2,5)O)
ratio_atomgap_atom:=0.12;
MCd(1,.6)(1, .5)(<30,?6,@(2,5)O)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Ratio chain/ring length}
\begin{verbatim}
ratio_chain_ring:= 0.4;
MCd(1,.6)(0, .5)(<30,?6,5:/Et)
ratio_chain_ring:= 0.66; %<<==
MCd(1,.6)(.5,.5)(<30,?6,5:/Et)
ratio_chain_ring:= 1.0;
MCd(1,.6)(1, .5)(<30,?6,5:/Et)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Ratio zebra gap/bond length}
\begin{verbatim}
ratio_zebragap_bond:=0.06;
MCd(1,.6)(0, .5)(<30,Ph,5:/*Me`1)
ratio_zebragap_bond:=0.12;  %<<==
MCd(1,.6)(.5,.5)(<30,Ph,5:/*Me`1)
ratio_zebragap_bond:=0.20;
MCd(1,.6)(1, .5)(<30,Ph,5:/*Me`1)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Margin left and right}
\begin{verbatim}
margin_left_right:=0mm;
MCd(1,1)(0.5,0.9)(<30,CH3,!0,!17,CH3)
margin_left_right:=0.4mm;  %<<==
MCd(1,1)(0.5,0.5)(<30,CH3,!0,!17,CH3)
margin_left_right:=5mm;
MCd(1,1)(0.5,0.1)(<30,CH3,!0,!17,CH3)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Margin top and bottom}
\begin{verbatim}
margin_top_bottom:=0mm;
MCd(1,1)(0.1,0.5)(<30,Ph,2:/OH,5:/NH2)
margin_top_bottom:=0.4mm;  %<<==
MCd(1,1)(0.5,0.5)(<30,Ph,2:/OH,5:/NH2)
margin_top_bottom:=5mm;
MCd(1,1)(0.9,0.5)(<30,Ph,2:/OH,5:/NH2)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Switch Start Vector}
\begin{verbatim}

  MCd(1,.6)( 0,0.5)(<30,Ph,4:/Cl,3:/F)
  sw_start_vector:=1;
  MCd(1,.6)( 1,0.5)(<30,Ph,4:/Cl,3:/F)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Switch Numbering atom}
\begin{verbatim}
  numberA_start:=3; numberA_end:=8;

  sw_numberA:=1; MCd(1,1)(.5,.9)(<30,!9)
  sw_numberA:=2; MCd(1,1)(.5,.5)(<30,!9)
  sw_numberA:=3; MCd(1,1)(.5,.1)(<30,!9)

 ** default: numberA_start=1 numberA_end=4095
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Switch Numbering bond}
\begin{verbatim}
  numberB_start:=3; numberB_end:=8;

  sw_numberB:=1; MCd(1,1)(.5,.9)(<30,!9)
  sw_numberB:=2; MCd(1,1)(.5,.5)(<30,!9)
  sw_numberB:=3; MCd(1,1)(.5,.1)(<30,!9)

 ** default: numberB_start=1 numberB_end=4095
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Switch font frame}
\begin{verbatim}
  sw_font_frame:=1;

  MCf(<30,Ph,4:/Cl,3:/F)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Switch molecular frame}
\begin{verbatim}

  MCd(1,.6)(0,0.5)(<30,Ph,4:/Cl,3:/F)
  sw_mol_frame:=1;
  MCd(1,.6)(1,0.5)(<30,Ph,4:/Cl,3:/F)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Switch atom frame}
\begin{verbatim}

  sw_atom_frame:=1;

  MCf(<30,Ph,4:/COOH,3:/OH)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Switch solid mode}
\begin{verbatim}

  MCd(1,.8)( 0,0.5)(<30,Ph,4:/Cl,3:/F)
  sw_solid:=1; ratio_bond_width:=0.08;
  MCd(1,.8)( 1,0.5)(<30,Ph,4:/Cl,3:/F)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Switch Expand}
\begin{verbatim}

  MCd(1,.6)(0,0.5)(<30,Ph,4:/COOH,3:/NH2)
  sw_expand:=1;
  MCd(1,.6)(1,0.5)(<30,Ph,4:/COOH,3:/NH2)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Function MCd (draw)}
\begin{verbatim}
  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,2:/OH,5:/NH2)
  MCd(1,0.8)(0.8,0.1)(<30,Ph,2:/OH,5:/NH2)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Function MCf (fit draw)}
\begin{verbatim}
  MCf(...) : MCd(1,1)(0.5,0.5)(...)

  sw_font_frame:=1;  sw_mol_frame:=1;

  MCf(<30,Ph,2:/OH,5:/NH2)
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Local setting}
\begin{verbatim}
beginfont("NO:1")
  sw_mol_frame:=1; % <<== Local setting
  MCd(1,.5)(0.0,0.5)(<30,Ph,@(2)N) endfont
beginfont("NO:2")
  MCd(1,.5)(0.5,0.5)(<30,Ph,@(2,4)N) endfont
beginfont("NO:3")
  MCd(1,.5)(1.0,0.5)(<30,Ph,@(2,4,6)N) endfont
\end{verbatim}
\end{minipage}
\MCFstru\MCFstru\MCFstructure%
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Global setting}
\begin{verbatim}
sw_mol_frame:=1; % <<== Global setting
beginfont("NO:1")
  MCd(1,.5)(0.0,0.5)(<30,Ph,@(2)N) endfont
beginfont("NO:2")
  MCd(1,.5)(0.5,0.5)(<30,Ph,@(2,4)N) endfont
beginfont("NO:3")
  MCd(1,.5)(1.0,0.5)(<30,Ph,@(2,4,6)N) endfont
\end{verbatim}
\end{minipage}
\MCFstru\MCFstru\MCFstructure%
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Output molecular infomation}
\begin{verbatim}
beginfont() sw_info_weight:=sw_info_formula:=1;
MCf(...) endfont
%% Output to mcf_man_soc-info.aux %%
\INFO{{F:mcf_man_soc}{C:82}{MWc:194.19174}
      {FMc:C8H10N4O2}}%
MWc:calculated molecular weight
FMc:calculated molecular formula
\end{verbatim}
\end{minipage}
\MCFstructure
\vspace{5mm}\\
%-----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{90mm}
\MCFtitle{Output additional infomation}
\begin{verbatim}
beginfont("EN:Caffeine","CAS:58-08-2")
MCf(...) endfont
%% Output to mcf_man_soc-info.aux %%
\INFO{{F:mcf_man_soc}{C:83}{EN:Caffeine}
     {CAS:58-08-2}}%
*F:filename *C:char number EN:molecular name
CAS:CAS number *:default output
\end{verbatim}
\end{minipage}
\MCFstructure
%-----------------------------------------------------------------------------
\end{document}
