diff options
author | Karl Berry <karl@freefriends.org> | 2015-08-30 20:49:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-08-30 20:49:54 +0000 |
commit | 633ddebf6e38c4c7056d98b02896cf8693fabafe (patch) | |
tree | 60f3e97822530278b060370262fe2a493588ff45 | |
parent | 0fbd23a11cda5bc0444a84d9da29aa004f08dc9f (diff) |
mcf2graph (30aug15)
git-svn-id: svn://tug.org/texlive/trunk@38247 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/README | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf | bin | 257821 -> 260066 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf | 165 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf | bin | 261290 -> 308530 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex | 322 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf | bin | 121154 -> 120942 bytes | |||
-rw-r--r-- | Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf | 44 |
9 files changed, 394 insertions, 148 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README index 9ef938a6e31..fde20ffe328 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/README +++ b/Master/texmf-dist/doc/metapost/mcf2graph/README @@ -1,7 +1,7 @@ ******************************************************************************** mcf2graph : Convert Molecular Coding Format to graphics with Metafont/Metapost Author : Akira Yamaji - version : 3.59 / 2015-08-23 + version : 3.595 / 2015-08-30 E-mail : akira.yamaji5@gmail.com Located at : http://mirror.ctan.org/pkg/graphics/mcf2graph Home page : http://molecoding.cocolog-nifty.com/blog/ @@ -113,3 +113,4 @@ ver. 3.57 / 2015-08-14 improve AUX file format ver. 3.58 / 2015-08-18 improve calculation of molecular formula and weight ver. 3.59 / 2015-08-23 update MCF syntax manual + ver. 3.595 / 2015-08-30 update MCF syntax manual 2 diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf index 8487a05ac79..b08865cd267 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2015.8.7 +% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2015.8.30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% input mcf2graph.mf; %------------------------------------------------------------------------- @@ -18,7 +18,7 @@ sw_start_vector:=0; %%%%sw_checklist:=1; %%%%sw_MOLfile:=1; %********************************************************************** -beginfont("EN:Acetamiprid","FM:C5H9","MW:89") +beginfont("EN:Acetamiprid") MCf(^^30, Ph,4\,!,NH,!,!~dr,N,!,CN ) diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf Binary files differindex 7e89736b122..97e771ce0ac 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex index fc6d451f06d..718e9f64326 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2015.8.14 +% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2015.8.28 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage{graphicx} @@ -57,7 +57,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} {\hspace{20mm} \LARGE\bf Molecular Coding Format examples \hspace{10mm} }% -{\footnotesize\bf by Akira Yamaji 2015.8.18} \vspace{5mm}\\ +{\footnotesize\bf by Akira Yamaji 2015.8.28} \vspace{5mm}\\ \fontnum=1% \noindent% %------------------------------------------------------------------------ diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf index a54ac1373d1..043880f96a4 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2015.8.22 +% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2015.8.28 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% input mcf2graph.mf; %----------------------------------------------------------------------- @@ -286,72 +286,128 @@ endfont %*********************************************************************** beginfont("EN:ratio_thickness_bond") ratio_thickness_bond:=0.005; - MCd(.6,.6)(0, .5)(^^30,Ph) + MCd(1,.6)(0, .5)(^^30,Ph) ratio_thickness_bond:=0.015; - MCd(.6,.6)(.5, .5)(^^30,Ph) + MCd(1,.6)(.5, .5)(^^30,Ph) ratio_thickness_bond:=0.03; - MCd(.6,.6)(1, .5)(^^30,Ph) + MCd(1,.6)(1, .5)(^^30,Ph) endfont %*********************************************************************** +beginfont("EN:offset_thickness") + offset_thickness#:=0.0pt#; MCd(1,.3)( 0,0.5)(^^30,Ph) endfont +beginfont() offset_thickness#:=0.2pt#; MCd(1,.3)(.5,0.5)(^^30,Ph) endfont +beginfont() offset_thickness#:=0.5pt#; MCd(1,.3)( 1,0.5)(^^30,Ph) endfont +%*********************************************************************** beginfont("EN:ratio_char_bond") ratio_char_bond:=1.0; - MCd(.6,.6)(0, .5)(^^30,?6,5:O,2:NH) + MCd(1,.6)(0, .5)(^^30,?6,5:O,2:NH) ratio_char_bond:=1.5; - MCd(.6,.6)(.5, .5)(^^30,?6,5:O,2:NH) + MCd(1,.6)(.5, .5)(^^30,?6,5:O,2:NH) ratio_char_bond:=2.0; - MCd(.6,.6)(1, .5)(^^30,?6,5:O,2:NH) + MCd(1,.6)(1, .5)(^^30,?6,5:O,2:NH) endfont %*********************************************************************** beginfont("EN:ratio_bondgap_bond") ratio_bondgap_bond:=0.10; - MCd(.6,.6)(0, .5)(^^30,Ph) + MCd(1,.6)(0, .5)(^^30,Ph) ratio_bondgap_bond:=0.15; - MCd(.6,.6)(.5, .5)(^^30,Ph) + MCd(1,.6)(.5, .5)(^^30,Ph) ratio_bondgap_bond:=0.20; - MCd(.6,.6)(1, .5)(^^30,Ph) + MCd(1,.6)(1, .5)(^^30,Ph) endfont %*********************************************************************** +beginfont("EN:offset_bond_gap") offset_bond_gap#:=0.0pt#; +MCd(1,.3)(0, .5)(^^30,Ph) endfont +beginfont() offset_bond_gap#:=0.3pt#; %<<== default +MCd(1,.3)(.5, .5)(^^30,Ph) endfont +beginfont() offset_bond_gap#:=1.0pt#; +MCd(1,.3)(1, .5)(^^30,Ph) endfont +%*********************************************************************** beginfont("EN:ratio_atom_bond") ratio_atom_bond:=0.25; - MCd(.6,.6)(0, .5)(^^30,?6,@(2,5)O) + MCd(1,.6)(0, .5)(^^30,?6,@(2,5)O) ratio_atom_bond:=0.33; - MCd(.6,.6)(.5, .5)(^^30,?6,@(2,5)O) + MCd(1,.6)(.5, .5)(^^30,?6,@(2,5)O) ratio_atom_bond:=0.45; - MCd(.6,.6)(1, .5)(^^30,?6,@(2,5)O) + MCd(1,.6)(1, .5)(^^30,?6,@(2,5)O) +endfont +%*********************************************************************** +beginfont("EN:offset_atom") offset_atom#:=0.0pt#; +MCd(1,.3)(0, .5)(^^30,?6,@(2,5)O) endfont +beginfont() offset_atom#:=0.8pt#; %<<== default +MCd(1,.3)(.5, .5)(^^30,?6,@(2,5)O) endfont +beginfont() offset_atom#:=2.0pt#; +MCd(1,.3)(1, .5)(^^30,?6,@(2,5)O) endfont +%*********************************************************************** +beginfont("EN:ratio_wedge_bond") + ratio_wedge_bond:=0.1; + 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.2;; + MCd(1,.6)(1, .5)(^^30,?6,5:*/Me) +endfont +%*********************************************************************** +beginfont("EN:offset_wedge") offset_wedge#:=0.0pt#; +MCd(1,.3)(0, .5)(^^30,?6,5:*/Me) endfont +beginfont() offset_wedge#:=0.4pt#; %<<== default +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 +%*********************************************************************** +beginfont("EN:ratio_atomgap_atom") + sw_atom_frame:=1; + ratio_atomgap_atom:=0.00; + 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) endfont %*********************************************************************** beginfont("EN:ratio_chain_ring") ratio_chain_ring:= 0.4; - MCd(.6,.6)(0, .5)(^^30,?6,5:/Et) + MCd(1,.6)(0, .5)(^^30,?6,5:/Et) ratio_chain_ring:= 0.66; - MCd(.6,.6)(.5, .5)(^^30,?6,5:/Et) + MCd(1,.6)(.5, .5)(^^30,?6,5:/Et) ratio_chain_ring:= 1; - MCd(.6,.6)(1, .5)(^^30,?6,5:/Et) + MCd(1,.6)(1, .5)(^^30,?6,5:/Et) endfont %*********************************************************************** -beginfont("EN:ratio_wedge_bond") - ratio_wedge_bond:=0.1; - MCd(.6,.6)(0, .5)(^^30,?6,5:*/Me) - ratio_wedge_bond:=0.15; - MCd(.6,.6)(.5, .5)(^^30,?6,5:*/Me) - ratio_wedge_bond:=0.2;; - MCd(.6,.6)(1, .5)(^^30,?6,5:*/Me) +beginfont("EN:ratio_zebragap_bond") + 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) +endfont +%*********************************************************************** +beginfont("EN:margin_left_right") + sw_font_frame:=sw_mol_frame:=1; + margin_left_right:=0mm; + MCd(1,1)(0.5, .9)(^^30,CH3,!0,!17,CH3) + margin_left_right:=0.4mm; + MCd(1,1)(0.5, .5)(^^30,CH3,!0,!17,CH3) + margin_left_right:=2mm; + MCd(1,1)(0.5, .1)(^^30,CH3,!0,!17,CH3) endfont %*********************************************************************** -beginfont("EN:ratio_zebra_gap") - ratio_zebra_gap:=0.06; - MCd(.6,.6)(0, .5)(^^30,Ph,5:/*Me`1) - ratio_zebra_gap:=0.12; - MCd(.6,.6)(.5, .5)(^^30,Ph,5:/*Me`1) - ratio_zebra_gap:=0.20; - MCd(.6,.6)(1, .5)(^^30,Ph,5:/*Me`1) +beginfont("EN:margin_top_bottom") + sw_font_frame:=sw_mol_frame:=1; + margin_top_bottom:=0mm; + MCd(1,1)(0.1, .5)(^^30,Ph,2:/OH,5:/NH2) + margin_top_bottom:=0.4mm; + MCd(1,1)(0.5, .5)(^^30,Ph,2:/OH,5:/NH2) + margin_top_bottom:=2mm; + MCd(1,1)(0.9, .5)(^^30,Ph,2:/OH,5:/NH2) endfont %*********************************************************************** beginfont("EN:Switwch start vector") sw_start_vector:=0; - MCd(.7,.7)( 0, 0)(^^30,Ph,4:/Cl,3:/F) + MCd(1,.7)( 0, 0)(^^30,Ph,4:/Cl,3:/F) sw_start_vector:=1; - MCd(.7,.7)( 1, 1)(^^30,Ph,4:/Cl,3:/F) + MCd(1,.7)( 1, 1)(^^30,Ph,4:/Cl,3:/F) endfont %*********************************************************************** beginfont("EN:Switwch numberingA") @@ -372,26 +428,26 @@ beginfont("EN:Switwch font frame") endfont %*********************************************************************** beginfont("EN:Switwch molecular frame") - MCd(.7,.7)( 0, 0)(^^30,Ph,4:/Cl,3:/F) + MCd(1,.7)( 0, 0)(^^30,Ph,4:/Cl,3:/F) sw_mol_frame:=1; - MCd(.7,.7)( 1, 1)(^^30,Ph,4:/Cl,3:/F) + MCd(1,.7)( 1, 1)(^^30,Ph,4:/Cl,3:/F) endfont %*********************************************************************** -%%beginfont("EN:Switwch atom frame") -%% sw_atom_frame:=1; -%% MCf(^^30,Ph,4:/COOH,3:/OH) -%%endfont +beginfont("EN:Switwch atom frame") + sw_atom_frame:=1; + MCf(^^30,Ph,4:/COOH,3:/OH) +endfont %*********************************************************************** beginfont("EN:Switwch Solid ratio") - MCd(.7,.7)( 0, 0)(^^30,Ph,4:/Cl,3:/F) + MCd(1,.7)( 0, 0)(^^30,Ph,4:/Cl,3:/F) sw_solid:=1; ratio_bond_width:=0.08; - MCd(.7,.7)( 1, 1)(^^30,Ph,4:/Cl,3:/F) + MCd(1,.7)( 1, 1)(^^30,Ph,4:/Cl,3:/F) endfont %*********************************************************************** beginfont("EN:Switwch Expand") - MCd(.6,.6)(0, 0)(^^30,Ph,4:/COOH,3:/NH2) + MCd(1,.6)(0, 0)(^^30,Ph,4:/COOH,3:/NH2) sw_expand:=1; - MCd(.6,.6)(1, 1)(^^30,Ph,4:/COOH,3:/NH2) + MCd(1,.6)(1, 1)(^^30,Ph,4:/COOH,3:/NH2) endfont %*********************************************************************** beginfont("EN:MCd()") @@ -408,4 +464,29 @@ beginfont("EN:MCf()") MCf(^^30,Ph,2:/OH,5:/NH2) endfont %*********************************************************************** +beginfont("EN:Local setting") + sw_mol_frame:=1; + MCd(1,.5)(0.0,0.5)(^^30,Ph,@(2)N) endfont +beginfont() MCd(1,.5)(0.5,0.5)(^^30,Ph,@(2,4)N) endfont +beginfont() MCd(1,.5)(1.0,0.5)(^^30,Ph,@(2,4,6)N) endfont +%*********************************************************************** +sw_mol_frame:=1; +beginfont("EN:Global setting") + MCd(1,.5)(0.0,0.5)(^^30,Ph,@(2)N) endfont +beginfont() MCd(1,.5)(0.5,0.5)(^^30,Ph,@(2,4)N) endfont +beginfont() MCd(1,.5)(1.0,0.5)(^^30,Ph,@(2,4,6)N) endfont +sw_mol_frame:=0; +%*********************************************************************** +%% Output molecular infomation +beginfont() +sw_logout:=sw_info_weight:=sw_info_formula:=1; +MCf(^^30,?6,-4=??5,$(3,8)dl,@(2,6,7,9)N,@(2,6,9)/Me,@(1,5)//O) +endfont +%*********************************************************************** +%% Output additional infomation +beginfont("EN:Caffeine","CAS:58-08-2") +sw_logout:=1; +MCf(^^30,?6,-4=??5,$(3,8)dl,@(2,6,7,9)N,@(2,6,9)/Me,@(1,5)//O) +endfont +%*********************************************************************** bye diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf Binary files differindex e698bd9a2d8..45889b0718a 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex index 2896e9e0a06..62429c969d3 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex @@ -1,12 +1,12 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format manual by Akira Yamaji 2015.8.16 +% Molecular Coding Format manual by Akira Yamaji 2015.8.30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage[dvipdfmx]{graphicx} %%%%\usepackage[pdftex]{graphicx} %%%%\usepackage{epstopdf} \pagestyle{empty} -\topmargin=-17mm +\topmargin=-18mm \textheight=27.5cm \textwidth=18cm \oddsidemargin=-9mm @@ -21,19 +21,21 @@ %---------------------------------------------------------------------------- \font\@strufont=mcf_man_soc\relax% %---------------------------------------------------------------------------- -\def\MCFtitle#1{\framebox{\bf No.\the\tempnum}\hspace{2mm}#1} +\def\MCFtitle#1{\framebox{\sf No.\the\tempnum}\hspace{2mm}\bf #1} %---------------------------------------------------------------------------- +\def\MCFstru{% + \rlap{\makebox(75,0)[t]{\makebox(70,35){\@strufont\char\fontnum}}}% + \advance\fontnum\@ne\relax}% \def\MCFstructure{% - \makebox(75,0)[t]{\frame{\makebox(70,35){\@strufont\char\fontnum}}} - \advance\fontnum\@ne\relax\advance\tempnum\@ne\relax% -}% + \makebox(75,0)[t]{\frame{\makebox(70,35){\@strufont\char\fontnum}}}% + \advance\fontnum\@ne\relax\advance\tempnum\@ne\relax}% %---------------------------------------------------------------------------- \begin{document} \noindent% \begin{picture}(180,0) - \put(35,12){{\LARGE Molecular Coding Format manual}\hspace{10mm} - by Akira Yamaji 2015.8.16} -\end{picture}\vspace{-6mm}\\ + \put(25,12){{\LARGE Molecular Coding Format manual}\hspace{10mm} + by Akira Yamaji 2015.8.30} +\end{picture}\vspace{-4.2mm}\\ %---------------------------------------------------------------------------- \begin{minipage}[t][38mm]{100mm} \MCFtitle{Chain (1)} @@ -78,7 +80,7 @@ six membered ring \vspace{6mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][38mm]{100mm} -\MCFtitle{rotate} +\MCFtitle{Rotate} \begin{verbatim} ^^angle:rotate current angle @@ -221,9 +223,9 @@ Insert hetero atom \begin{minipage}[t][38mm]{100mm} \MCFtitle{Fused ring (1)} \begin{verbatim} -?6,3=?6 : fuse ?6 at B3 +?6,3=?5 : fuse ?5 at B3 - ?6,3=?6 + ?6,3=?5 \end{verbatim} \end{minipage} @@ -300,8 +302,7 @@ Insert hetero atom \begin{minipage}[t][38mm]{100mm} \MCFtitle{Branch (1)} \begin{verbatim} -/ : branch bond -/ : process at last +/ : branch bond(make at last) ^^30,!3,/!2,!3 \end{verbatim} @@ -594,7 +595,7 @@ Insert user defined substructure \begin{verbatim} max_bond_width:=0.10; MCd(1,1)(0, .5)(^^30,Ph) - max_bond_width:=0.15; %<<== default ==>> + max_bond_width:=0.15; %<<== default MCd(1,1)(.33, .5)(^^30,Ph) max_bond_width:=0.30; MCd(1,1)(1, .5)(^^30,Ph) @@ -607,25 +608,39 @@ Insert user defined substructure \MCFtitle{Ratio thickness/bond length} \begin{verbatim} ratio_thickness_bond:= 0.005; -MCd(.6,.6)(0, .5)(^^30,Ph) -ratio_thickness_bond:= 0.015; %<<== default ==>> -MCd(.6,.6)(.5, .5)(^^30,Ph) +MCd(1,.6)(0, .5)(^^30,Ph) +ratio_thickness_bond:= 0.015; %<<== default +MCd(1,.6)(.5, .5)(^^30,Ph) ratio_thickness_bond:= 0.030; -MCd(.6,.6)(1, .5)(^^30,Ph) +MCd(1,.6)(1, .5)(^^30,Ph) \end{verbatim} \end{minipage} \MCFstructure \vspace{6mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][38mm]{100mm} +\MCFtitle{Offset thickness of bond} +\begin{verbatim} +beginfont() offset_thickness#:=0pt#; +MCd(1,.3)(0, .5)(^^30,Ph) endfont +beginfont() offset_thickness#:=0.2pt#; %<<== default +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{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} \MCFtitle{Ratio char/bond thickness} \begin{verbatim} ratio_char_bond:=1.0; -MCd(.6,.6)(0, .5)(^^30,?6,5:O,2:NH) -ratio_char_bond:=1.5; %<<== default ==>> -MCd(.6,.6)(.5, .5)(^^30,?6,5:O,2:NH) +MCd(1,.6)(0, .5)(^^30,?6,5:O,2:NH) +ratio_char_bond:=1.5; %<<== default +MCd(1,.6)(.5, .5)(^^30,?6,5:O,2:NH) ratio_char_bond:=2.0; -MCd(.6,.6)(1, .5)(^^30,?6,5:O,2:NH) +MCd(1,.6)(1, .5)(^^30,?6,5:O,2:NH) \end{verbatim} \end{minipage} \MCFstructure @@ -635,53 +650,110 @@ MCd(.6,.6)(1, .5)(^^30,?6,5:O,2:NH) \MCFtitle{Ratio bondgap/bond length} \begin{verbatim} ratio_bondgap_bond:= 0.10; -MCd(.6,.6)(0, .5)(^^30,Ph) -ratio_bondgap_bond:= 0.15; %<<== default ==>> -MCd(.6,.6)(.5, .5)(^^30,Ph) +MCd(1,.6)(0, .5)(^^30,Ph) +ratio_bondgap_bond:= 0.15; %<<== default +MCd(1,.6)(.5, .5)(^^30,Ph) ratio_bondgap_bond:= 0.20; -MCd(.6,.6)(1, .5)(^^30,Ph) +MCd(1,.6)(1, .5)(^^30,Ph) \end{verbatim} \end{minipage} \MCFstructure \vspace{6mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][38mm]{100mm} +\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#; %<<== default +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{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} \MCFtitle{Ratio atom/bond length} \begin{verbatim} ratio_atom_bond:= 0.25; -MCd(.6,.6)(0, .5)(^^30,?6,@(2,5)O) -ratio_atom_bond:= 0.36; %<<== default ==>> -MCd(.6,.6)(.5, .5)(^^30,?6,@(2,5)O) +MCd(1,.6)(0, .5)(^^30,?6,@(2,5)O) +ratio_atom_bond:= 0.36; %<<== default +MCd(1,.6)(.5, .5)(^^30,?6,@(2,5)O) ratio_atom_bond:= 0.45; -MCd(.6,.6)(1, .5)(^^30,?6,@(2,5)O) +MCd(1,.6)(1, .5)(^^30,?6,@(2,5)O) \end{verbatim} \end{minipage} \MCFstructure \vspace{6mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][38mm]{100mm} -\MCFtitle{Ratio chain/ring length} +\MCFtitle{Offset of atom width} \begin{verbatim} -ratio_chain_ring:= 0.4; -MCd(.6,.6)(0, .5)(^^30,?6,5:/Et) -ratio_chain_ring:= 0.66; %<<== default ==>> -MCd(.6,.6)(.5, .5)(^^30,?6,5:/Et) -ratio_chain_ring:= 1.0; -MCd(.6,.6)(1, .5)(^^30,?6,5:/Et) +beginfont() offset_atom#:=0.0pt#; +MCd(1,.3)(0, .5)(^^30,Ph,@(2,4,6)N) endfont +beginfont() offset_atom#:=0.8pt#; %<<== default +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} -\MCFstructure +\MCFstru\MCFstru\MCFstructure% \vspace{6mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][38mm]{100mm} \MCFtitle{Ratio wedge/bond length} \begin{verbatim} ratio_wedge_bond:=0.10; -MCd(.6,.6)(0, .5)(^^30,?6,5:*/Me) -ratio_wedge_bond:=0.15; %<<== default ==>> -MCd(.6,.6)(.5, .5)(^^30,?6,5:*/Me) +MCd(1,.6)(0, .5)(^^30,?6,5:*/Me) +ratio_wedge_bond:=0.12; %<<== default +MCd(1,.6)(.5, .5)(^^30,?6,5:*/Me) ratio_wedge_bond:=0.20;; -MCd(.6,.6)(1, .5)(^^30,?6,5:*/Me) +MCd(1,.6)(1, .5)(^^30,?6,5:*/Me) +\end{verbatim} +\end{minipage} +\MCFstructure +\vspace{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\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#; %<<== default +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{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\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; %<<== default +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{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\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; %<<== default +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 @@ -690,12 +762,40 @@ MCd(.6,.6)(1, .5)(^^30,?6,5:*/Me) \begin{minipage}[t][38mm]{100mm} \MCFtitle{Ratio zebra gap/bond length} \begin{verbatim} -ratio_zebra_gap:=0.06; -MCd(.6,.6)(0, .5)(^^30,Ph,5:/*Me`1) -ratio_zebra_gap:=0.12; %<<== default ==>> -MCd(.6,.6)(.5, .5)(^^30,Ph,5:/*Me`1) -ratio_zebra_gap:=0.20; -MCd(.6,.6)(1, .5)(^^30,Ph,5:/*Me`1) +ratio_zebragap_bond:=0.06; +MCd(1,.6)(0, .5)(^^30,Ph,5:/*Me`1) +ratio_zebragap_bond:=0.12; %<<== default +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{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\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; %<<== default +MCd(1,1)(0.5,0.5)(^^30,CH3,!0,!17,CH3) +margin_left_right:=2mm; +MCd(1,1)(0.5,0.1)(^^30,CH3,!0,!17,CH3) +\end{verbatim} +\end{minipage} +\MCFstructure +\vspace{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\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; %<<== default +MCd(1,1)(0.5,0.5)(^^30,Ph,2:/OH,5:/NH2) +margin_top_bottom:=2mm; +MCd(1,1)(0.9,0.5)(^^30,Ph,2:/OH,5:/NH2) \end{verbatim} \end{minipage} \MCFstructure @@ -705,9 +805,9 @@ MCd(.6,.6)(1, .5)(^^30,Ph,5:/*Me`1) \MCFtitle{Switch Start Vector} \begin{verbatim} - MCd(.8,.8)( 0, 0)(^^30,Ph,4:/Cl,3:/F) + MCd(1,.8)( 0, 0)(^^30,Ph,4:/Cl,3:/F) sw_start_vector:=1; - MCd(.8,.8)( 1, 1)(^^30,Ph,4:/Cl,3:/F) + MCd(1,.8)( 1, 1)(^^30,Ph,4:/Cl,3:/F) \end{verbatim} \end{minipage} \MCFstructure @@ -716,10 +816,9 @@ MCd(.6,.6)(1, .5)(^^30,Ph,5:/*Me`1) \begin{minipage}[t][38mm]{100mm} \MCFtitle{Switch NumberingA} \begin{verbatim} - sw_numberA:=1; - MCf(^^30, - Ph,-4=Ph1,-3\,!,Ph,10:/Et) + + MCf(^^30,Ph,-4=Ph1,-3\,!,Ph,10:/Et) \end{verbatim} \end{minipage} \MCFstructure @@ -728,10 +827,9 @@ MCd(.6,.6)(1, .5)(^^30,Ph,5:/*Me`1) \begin{minipage}[t][38mm]{100mm} \MCFtitle{Switch NumberingB} \begin{verbatim} - sw_numberB:=1; - MCf(^^30, - Ph,-4=Ph1,-3\,!,Ph,10:/Et) + + MCf(^^30,Ph,-4=Ph1,-3\,!,Ph,10:/Et) \end{verbatim} \end{minipage} \MCFstructure @@ -740,8 +838,8 @@ MCd(.6,.6)(1, .5)(^^30,Ph,5:/*Me`1) \begin{minipage}[t][38mm]{100mm} \MCFtitle{Switch font frame} \begin{verbatim} - sw_font_frame:=1; + MCf(^^30,Ph,4:/Cl,3:/F) \end{verbatim} \end{minipage} @@ -752,32 +850,33 @@ MCd(.6,.6)(1, .5)(^^30,Ph,5:/*Me`1) \MCFtitle{Switch molecular frame} \begin{verbatim} - MCd(.8,.8)(0,0)(^^30,Ph,4:/Cl,3:/F) + MCd(1,.8)(0,0)(^^30,Ph,4:/Cl,3:/F) sw_mol_frame:=1; - MCd(.8,.8)(1,1)(^^30,Ph,4:/Cl,3:/F) + MCd(1,.8)(1,1)(^^30,Ph,4:/Cl,3:/F) \end{verbatim} \end{minipage} \MCFstructure \vspace{6mm}\\ %----------------------------------------------------------------------------- -%%\begin{minipage}[t][38mm]{100mm} -%%\MCFtitle{Switch atom frame} -%%\begin{verbatim} -%% -%% sw_atom_frame:=1; -%% MCf(^^30,Ph,4:/COOH,3:/OH) -%%\end{verbatim} -%%\end{minipage} -%%\MCFstructure -%%\vspace{6mm}\\ +\begin{minipage}[t][38mm]{100mm} +\MCFtitle{Switch atom frame} +\begin{verbatim} + + sw_atom_frame:=1; + + MCf(^^30,Ph,4:/COOH,3:/OH) +\end{verbatim} +\end{minipage} +\MCFstructure +\vspace{6mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][38mm]{100mm} -\MCFtitle{Switch Solid ratio} +\MCFtitle{Switch solid mode} \begin{verbatim} - MCd(.8,.8)( 0, 0)(^^30,Ph,4:/Cl,3:/F) + MCd(1,.8)( 0, 0)(^^30,Ph,4:/Cl,3:/F) sw_solid:=1; ratio_bond_width:=0.08; - MCd(.8,.8)( 1, 1)(^^30,Ph,4:/Cl,3:/F) + MCd(1,.8)( 1, 1)(^^30,Ph,4:/Cl,3:/F) \end{verbatim} \end{minipage} \MCFstructure @@ -787,9 +886,9 @@ MCd(.6,.6)(1, .5)(^^30,Ph,5:/*Me`1) \MCFtitle{Switch Expand} \begin{verbatim} - MCd(.6,.6)(0,0)(^^30,Ph,4:/COOH,3:/NH2) + MCd(1,.6)(0,0)(^^30,Ph,4:/COOH,3:/NH2) sw_expand:=1; - MCd(.6,.6)(1,1)(^^30,Ph,4:/COOH,3:/NH2) + MCd(1,.6)(1,1)(^^30,Ph,4:/COOH,3:/NH2) \end{verbatim} \end{minipage} \MCFstructure @@ -798,13 +897,13 @@ MCd(.6,.6)(1, .5)(^^30,Ph,5:/*Me`1) \begin{minipage}[t][38mm]{100mm} \MCFtitle{Function MCd} \begin{verbatim} - 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) - - MCd(a,b)(c,d)(MCF) + 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 @@ -813,14 +912,73 @@ MCd(.6,.6)(1, .5)(^^30,Ph,5:/*Me`1) \begin{minipage}[t][38mm]{100mm} \MCFtitle{Function MCf} \begin{verbatim} + MCf(...) : MCd(1,1)(0.5,0.5)(...) - MCf(^^30,Ph,2:/OH,5:/NH2) - - MCf(MCF) : MCd(1,1)(0.5,0.5)(MCF) + sw_font_frame:=1; sw_mol_frame:=1; + MCf(^^30,Ph,2:/OH,5:/NH2) \end{verbatim} \end{minipage} \MCFstructure \vspace{6mm}\\ %----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\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{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\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{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\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{6mm}\\ +%----------------------------------------------------------------------------- +\begin{minipage}[t][38mm]{100mm} +\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:111-111-111}}% +*F:filename *C:char number EN:molecular name +CAS:CAS number *:default output +\end{verbatim} +\end{minipage} +\MCFstructure +%----------------------------------------------------------------------------- \end{document} diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf Binary files differindex 3c4a208015f..d7ab27f6662 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf index 8576614b35c..ae32d1dd010 100644 --- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf +++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 3.59 Copyright (c) 2013-2015 Akira Yamaji +% mcf2graph ver 3.595 Copyright (c) 2013-2015 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, @@ -70,11 +70,12 @@ clearit; chem_structure:=currentpicture; let DIV= /; let MUL= *; let LT= <; let GT= >; let AND= &; let :: = : ; let == = =; ?3:=?20:=??3:=??20:=Ph:=Ph1:=Ph2:=ph:=ph1:=ph2:=hz:=0; vt:=1; first_def_number:=500; user_def_number:=2500; ab_def_number:=3000; unit_e:=1/2048; -lr_margin:=tb_margin:=0.4mm; ratio_chain_ring:= 0.66; ratio_atom_bond:=0.36; +margin_left_right:=margin_top_bottom:=0.4mm; ratio_chain_ring:= 0.66; ratio_atom_bond:=0.36; ratio_thickness_bond:=0.015; offset_atom#:=0.8pt#; max_bond_width:=0.25; -ratio_char_bond:=1.5; ratio_bondgap_bond:=0.15; ratio_zebra_gap:=0.12; -ratio_zebra_black:=0.4; ratio_wedge_bond:=0.15; font_gap:=.066; -offset_thick#:=0.2pt#; offset_gap#:=0.3pt#; offset_zebra_gap#:=0.1pt#; +ratio_char_bond:=1.5; ratio_bondgap_bond:=0.15; ratio_zebragap_bond:=0.12; +ratio_zebra_black:=0.4; ratio_wedge_bond:=0.12; ratio_atomgap_atom:=.050; +offset_thickness#:=0.2pt#; offset_bond_gap#:=0.3pt#; offset_zebra_gap#:=0.1pt#; +offset_wedge#:=0.4pt#; par_s=ASCII("{"); par_e=ASCII("}"); score_u=ASCII("_"); hat=ASCII("^"); max_info_num:=12; for i:=1 upto max_info_num: info[i]:=":"; endfor def def_com(expr n)(text tx)= nA:=n; forsuffixes list=tx:: list:=nA; nA:=nA+1; endfor enddef; @@ -84,11 +85,14 @@ def_com(-4000)(_term,_jp_atom,_jp_atom_abs,_jp_bond,_cyc,_cyc_sB,_cyc_eB,_set_li _set_clr,_set_adr,_mk_bond,_set_atom,_arg_ang,_chg_atom,_tmp_rot,_fuse,_push,_pop,_size_a); def_com(1)(si,dl,dr,dm,tm,wf,wb,bd,zf,zb,ov,dt,no,ar,vf,vb,wv,nl); %------------------------------------------------------------------------------------------------- -def parameter_list= sw_checklist,sw_numberA,sw_numberB,sw_mol_frame,sw_logout,sw_solid,sw_expand, +def parameter_list= + sw_checklist,sw_numberA,sw_numberB,sw_mol_frame,sw_logout,sw_solid,sw_expand, sw_MOLfile,sw_start_vector,sw_atom_frame,sw_font_frame, - lr_margin,tb_margin,ratio_atom_bond,ratio_thickness_bond,ratio_char_bond, - ratio_chain_ring,offset_atom,max_bond_width,ratio_bondgap_bond,ratio_zebra_black, - ratio_zebra_gap,ratio_wedge_bond,font_gap,offset_zebra_gap,offset_gap,offset_thick + margin_left_right,margin_top_bottom,ratio_atom_bond,ratio_thickness_bond,ratio_char_bond, + ratio_chain_ring,offset_atom,offset_atom#,max_bond_width,ratio_bondgap_bond,ratio_zebra_black, + ratio_zebragap_bond,ratio_wedge_bond,ratio_atomgap_atom,offset_wedge,offset_wedge#, + offset_zebra_gap,offset_zebra_gap#,offset_bond_gap,offset_bond_gap#, + offset_thickness,offset_thickness# enddef; %------------------------------------------------------------------------------------------------- nA:=0; for list=parameter_list: st_p[incr nA]:=list; endfor @@ -97,8 +101,10 @@ def restore_par(text t)= nA:=0; forsuffixes list=t: if list<>st_p[incr nA]: list:=st_p[nA]; fi endfor enddef; %------------------------------------------------------------------------------------------------- -def beginfont(text s)= mol_name:=mol_formula:=""; len_x:=len_y:=cntA:=info_num:=mol_weight:=0; - store_par(parameter_list); ratio_bond_width:=1mm#/font_wd#; +def beginfont(text s)= + mol_name:=mol_formula:=""; len_x:=len_y:=cntA:=info_num:=mol_weight:=0; + store_par(parameter_list); + ratio_bond_width:=1mm#/font_wd#; for list=s: info_num:=info_num+1; info[info_num]:=list; if substring (0,2) of list="EN": mol_name:=substring (3,length(list)) of list; fi if substring (0,2) of list="FM": mol_formula:=substring (3,length(list)) of list; fi @@ -121,11 +127,11 @@ def endfont= enddef; %------------------------------------------------------------------------------------------------- def size_setup= BL# := font_wd#*ratio_bond_width; - wedge_wd# := ratio_wedge_bond*BL#; - zebra_gap# := ratio_zebra_gap*BL#+offset_zebra_gap#; + wedge_wd# := ratio_wedge_bond*BL#+offset_wedge#; + zebra_gap# := ratio_zebragap_bond*BL#+offset_zebra_gap#; AL# := ratio_atom_bond*BL#+offset_atom#; - gap# := ratio_bondgap_bond*BL#+offset_gap#; - bond_pen_wd# := ratio_thickness_bond*BL#+offset_thick#; + gap# := ratio_bondgap_bond*BL#+offset_bond_gap#; + bond_pen_wd# := ratio_thickness_bond*BL#+offset_thickness#; char_pen_wd# := ratio_char_bond*bond_pen_wd#; define_pixels(BL,zebra_gap,wedge_wd,AL,gap,bond_pen_wd,char_pen_wd,font_wd,font_ht); font_size_setup; @@ -153,8 +159,8 @@ for i=1 upto cntA: xpos:=xpart(posA[i]); ypos:=ypart(posA[i]); enddef; %------------------------------------------------------------------------------------------------- def resize(expr WD,HT)= - if (len_y/len_x)>(font_ht/font_wd): factor:=(font_ht*HT-2tb_margin)/len_y; - else: factor:=(font_wd*WD-2lr_margin)/len_x; fi + if (len_y/len_x)>(font_ht/font_wd): factor:=(font_ht*HT-2margin_top_bottom)/len_y; + else: factor:=(font_wd*WD-2margin_left_right)/len_x; fi ratio_bond_width:=ratio_bond_width*factor; len_x:=len_x*factor; len_y:=len_y*factor; enddef; %------------------------------------------------------------------------------------------------- @@ -577,12 +583,12 @@ enddef; def POh= (hP,.25aH)..z19..(fW,.25aH)..(hW,hH)..cycle enddef; def FD(expr c)(text s)= if f_FON[ASCII(c)]=1: - aW:=atom_w[ASCII(c)]*(1-font_gap*2); aH:=atom_h[ASCII(c)]*(1-font_gap*2); + aW:=atom_w[ASCII(c)]*(1-ratio_atomgap_atom*2); aH:=atom_h[ASCII(c)]*(1-ratio_atomgap_atom*2); fW:=aW-hP; hW:=.5aW; fH:=aH-hP; hH:=.5aH; z01=( 0,hP); z02=(hP, 0); z03=(hP,hP); z05=(aW,hP); z07=(fW, 0); z08=( 0,hH); z09=(hP,hH); z10=(fW,hH); z12=( 0,fH); z13=(hP,fH); z14=(hW,fH); z16=(aW,fH); z18=(hP,aH); z19=(hW,hP); s; - atom_font[ASCII(c)]:=currentpicture shifted (font_gap*AL,font_gap*AL); + atom_font[ASCII(c)]:=currentpicture shifted (ratio_atomgap_atom*AL,ratio_atomgap_atom*AL); clearxy; save x,y; clearit; fi enddef; %------------------------------------------------------------------------------------------------- |