summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-03-26 21:46:13 +0000
committerKarl Berry <karl@freefriends.org>2017-03-26 21:46:13 +0000
commit839a9dc08f6a8824548041ebe1acc6f094d2d173 (patch)
treeb3214039fd80e7b4840248d0fafefcec390be8cb
parent9b12b69584cc4690748f60fdb60da823abcf4c14 (diff)
mcf2graph (26mar17)
git-svn-id: svn://tug.org/texlive/trunk@43604 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG11
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/README4
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf10
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdfbin235843 -> 235811 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf639
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdfbin461710 -> 468770 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex484
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdfbin174202 -> 174200 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex4
-rw-r--r--Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf199
10 files changed, 704 insertions, 647 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
index 25234efce8e..c0c9b264748 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
@@ -1,6 +1,15 @@
*******************************************************************************
- Changelog of mcf2graph software package by Akira Yamaji 2017-03-06
+ Changelog of mcf2graph software package by Akira Yamaji 2017-03-26
*******************************************************************************
+[ver. 4.20 / 2017-03-26]
+ -change length expression
+ length# => length
+ -add emulation commands
+ dotlabel,drawarrow,drawdblarrow
+ -add function MCa(),MCc()
+ -delete function draw_vector()
+ -update MCF syntax manual
+
[ver. 4.11 / 2017-03-06]
-improve function EXT(),ext()
-update MCF syntax manual
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README
index 61b56015bb6..8350956b822 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 : 4.11 2017-03-06
+ version : 4.20 2017-03-26
E-mail : mcf2graph@gmail.com
Located at : http://www.ctan.org/pkg/mcf2graph
********************************************************************************
@@ -37,7 +37,7 @@
( 4) >mpost -s ahangle=3 FILENAME => output MDL Molfile(V2000)
( 5) >mpost -s ahlength=1 FILENAME => output first definition only (for test)
( 6) >mpost -s ahlength=2 FILENAME => output report
- ( 7) >mpost -s ahlength=3 FILENAME => use Metapost 'label'
+ ( 7) >mpost -s ahlength=3 FILENAME => use metapost 'label','drawarrow'
4. License
Permission is hereby granted, free of charge, to any person obtaining a copy
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 4e2c7d60b49..fcc157f6902 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
@@ -1,11 +1,11 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2017.02.13
+% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2017.03.26
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-input mcf2graph.mf; %%% it must be version 4.11 or later
+input mcf2graph.mf; %%% it must be version 4.20 or later
%-------------------------------------------------------------------------
-font_wd#:=33mm#;
-font_ht#:=24mm#;
-max_bond_length#:=4.5mm#;
+font_wd:=33mm;
+font_ht:=24mm;
+max_bond_length:=4.5mm;
%-------------------------------------------------------------------------
sw_select:=1;
sw_auxout:=1;
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
index 5242e4c5f86..40e2e009df5 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
Binary files differ
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 7cce228786d..778404e8594 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
@@ -1,17 +1,18 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2017.03.05
+% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2017.03.26
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-input mcf2graph.mf; %% it must be version 4.11 or later
+input mcf2graph.mf; %% it must be version 4.20 or later
%------------------------------------------------------------------------
sw_auxout:=0;
sw_mol_frame:=0;
sw_expand:=0;
sw_solid:=2;
+%%%%%sw_arrow:=1;
%%%%%sw_report:=1;
%***********************************************************************
-font_wd#:=35mm#;
-font_ht#:=25mm#;
-bond_len#:=6mm#;
+font_wd:=35mm;
+font_ht:=25mm;
+bond_len:=6mm;
%***********************************************************************
beginfont("EN:Glycine")
MCf(<30,NH2,!0,!,COOH)
@@ -93,10 +94,10 @@ beginfont("EN:Hystidine")
MCf(<30,NH2,!0,!,COOH,2\,!,|,?5,$(1,3)dl,3:N,5:NH)
endfont
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-font_wd#:=60mm#;
-font_ht#:=35mm#;
-bond_len#:=8mm#;
-max_bond_length#:=10mm#;
+font_wd:=60mm;
+font_ht:=35mm;
+bond_len:=8mm;
+max_bond_length:=10mm;
ratio_thickness_bond:=0.015;
ratio_atom_bond:=0.36;
sw_solid:=0;
@@ -105,7 +106,7 @@ margin_left_right:=2mm;
margin_top_bottom:=1mm;
%***********************************************************************
beginfont("EN:Chain 1")
- font_ht#:=20mm#;
+ font_ht:=20mm;
sw_numberB:=1;
numberB_end:=6;
ratio_chain_ring:=1;
@@ -116,7 +117,7 @@ beginfont("EN:Chain 1")
endfont
%***********************************************************************
beginfont("EN:Chain 2")
- font_ht#:=20mm#;
+ font_ht:=20mm;
sw_numberB:=1;
numberB_end:=6;
ratio_chain_ring:=1;
@@ -127,7 +128,7 @@ beginfont("EN:Chain 2")
endfont
%***********************************************************************
beginfont("EN:Jump and Branch")
- font_ht#:=20mm#;
+ font_ht:=20mm;
margin_top_bottom:=2mm;
sw_clip:=1;
sw_numberA:=1;
@@ -137,7 +138,7 @@ beginfont("EN:Jump and Branch")
endfont
%***********************************************************************
beginfont("EN:Jump and Branch")
- font_ht#:=20mm#;
+ font_ht:=20mm;
margin_top_bottom:=2mm;
sw_numberA:=1;
sw_clip:=1;
@@ -147,7 +148,7 @@ beginfont("EN:Jump and Branch")
endfont
%***********************************************************************
beginfont("EN:branch1")
- font_ht#:=20mm#;
+ font_ht:=20mm;
margin_top_bottom:=2mm;
sw_numberA:=1;
sw_clip:=1;
@@ -158,7 +159,7 @@ beginfont("EN:branch1")
endfont
%***********************************************************************
beginfont("EN:branch2")
- font_ht#:=20mm#;
+ font_ht:=20mm;
margin_top_bottom:=2mm;
sw_clip:=1;
sw_numberA:=1;
@@ -169,7 +170,7 @@ beginfont("EN:branch2")
endfont
%***********************************************************************
beginfont("EN:Connect atom")
- font_ht#:=20mm#;
+ font_ht:=20mm;
margin_top_bottom:=2mm;
sw_clip:=1;
sw_numberA:=1;
@@ -179,7 +180,7 @@ beginfont("EN:Connect atom")
endfont
%***********************************************************************
beginfont("EN:ring")
- font_ht#:=20mm#;
+ font_ht:=20mm;
sw_clip:=1;
margin_top_bottom:=3mm;
sw_numberB:=1;
@@ -188,7 +189,7 @@ beginfont("EN:ring")
endfont
%***********************************************************************
beginfont("EN:rotate 1")
- font_ht#:=20mm#;
+ font_ht:=20mm;
margin_top_bottom:=3mm;
sw_clip:=1;
sw_numberB:=1;
@@ -197,9 +198,9 @@ beginfont("EN:rotate 1")
endfont
%***********************************************************************
beginfont("EN:change bond 1")
- font_wd#:=70mm#;
- font_ht#:=12mm#;
- bond_len#:=8mm#;
+ font_wd:=70mm;
+ font_ht:=12mm;
+ bond_len:=8mm;
sw_clip:=1;
ratio_chain_ring:=1;
margin_top_bottom:=3mm;
@@ -207,8 +208,8 @@ beginfont("EN:change bond 1")
endfont
%***********************************************************************
beginfont("EN:change bond 2")
- font_ht#:=12mm#;
- bond_len#:=8mm#;
+ font_ht:=12mm;
+ bond_len:=8mm;
margin_top_bottom:=3mm;
sw_clip:=1;
ratio_chain_ring:=1;
@@ -216,8 +217,8 @@ beginfont("EN:change bond 2")
endfont
%***********************************************************************
beginfont("EN:change bond 3")
- font_ht#:=12mm#;
- bond_len#:=8mm#;
+ font_ht:=12mm;
+ bond_len:=8mm;
margin_top_bottom:=3mm;
sw_clip:=1;
ratio_chain_ring:=1;
@@ -225,8 +226,8 @@ beginfont("EN:change bond 3")
endfont
%***********************************************************************
beginfont("EN:change bond 3")
- font_ht#:=12mm#;
- bond_len#:=8mm#;
+ font_ht:=12mm;
+ bond_len:=8mm;
sw_clip:=1;
ratio_chain_ring:=1;
margin_top_bottom:=3mm;
@@ -234,8 +235,8 @@ beginfont("EN:change bond 3")
endfont
%***********************************************************************
beginfont("EN:change bond 4")
- font_ht#:=12mm#;
- bond_len#:=8mm#;
+ font_ht:=12mm;
+ bond_len:=8mm;
sw_clip:=1;
ratio_chain_ring:=1;
margin_top_bottom:=3mm;
@@ -243,8 +244,8 @@ beginfont("EN:change bond 4")
endfont
%***********************************************************************
beginfont("EN:change bond 5")
- font_ht#:=12mm#;
- bond_len#:=8mm#;
+ font_ht:=12mm;
+ bond_len:=8mm;
margin_top_bottom:=3mm;
sw_clip:=1;
ratio_chain_ring:=1;
@@ -253,26 +254,26 @@ endfont
%***********************************************************************
beginfont("EN:over line")
sw_clip:=1;
- font_ht#:=20mm#;
+ font_ht:=20mm;
ratio_chain_ring:=1;
MCf(<-30,!8,!,60,90`8,@(2~si_,4~wf_,6~wb_,8~bd_)/_`2)
endfont
%***********************************************************************
beginfont("EN:change bond length1")
- font_ht#:=12mm#;
+ font_ht:=12mm;
sw_numberB:=1;
MCf(<30,!2,!2`1.2,!2)
endfont
%***********************************************************************
beginfont("EN:change bond length2")
- font_ht#:=12mm#;
+ font_ht:=12mm;
sw_numberB:=1;
MCf(<30,!2,``1.2,!4)
endfont
%***********************************************************************
beginfont("EN:change ring length")
margin_top_bottom:=2mm;
- font_ht#:=20mm#;
+ font_ht:=20mm;
sw_clip:=1;
sw_numberB:=1;
MCf(?6,4\,?6`1.2)
@@ -280,51 +281,51 @@ endfont
%***********************************************************************
beginfont("EN:Insert atom")
sw_clip:=1;
- font_ht#:=10mm#;
+ font_ht:=10mm;
MCf(<30,!2,O,!2,N,!2)
endfont
%***********************************************************************
beginfont("EN:change atom")
- font_ht#:=18mm#;
- MCd(1,1)(.5,1)(<30,!6,2:O,@(3,5)N)
+ font_ht:=18mm;
+ MCa(.5,1)(<30,!6,2:O,@(3,5)N)
sw_numberA:=1;
- MCd(1,1)(.5,.05)(<30,!6,2:O,@(3,5)N)
+ MCa(.5,.05)(<30,!6,2:O,@(3,5)N)
endfont
%***********************************************************************
beginfont("EN:change atom brock address 1")
- font_wd#:=70mm#;
- font_ht#:=15mm#;
- MCd(1,1)(0,.5)(?6,4\,|,?6,2:O)
+ font_wd:=70mm;
+ font_ht:=15mm;
+ MCa(0,.5)(?6,4\,|,?6,2:O)
sw_numberA:=1;
MCd(1,.88)(1,.5)(?6,4\,?6)
endfont
%***********************************************************************
beginfont("EN:change atom brock address 2")
- font_wd#:=70mm#;
- font_ht#:=15mm#;
- MCd(1,1)(0,.5)(?6,4\,|,?6,||,2:N)
+ font_wd:=70mm;
+ font_ht:=15mm;
+ MCa(0,.5)(?6,4\,|,?6,||,2:N)
sw_numberA:=1;
MCd(1,.88)(1,.5)(?6,4\,?6)
endfont
%***********************************************************************
beginfont("EN:change atom absolute address")
- font_wd#:=70mm#;
- font_ht#:=15mm#;
- MCd(1,1)(0,.5)(?6,4\,?6,#2:N)
+ font_wd:=70mm;
+ font_ht:=15mm;
+ MCa(0,.5)(?6,4\,?6,#2:N)
sw_numberA:=1;
MCd(1,.88)(1,.5)(?6,4\,?6)
endfont
%***********************************************************************
beginfont("EN:change atom relative adress")
- font_wd#:=70mm#;
- font_ht#:=15mm#;
- MCd(1,1)(0,.5)(?6,4\,?6,-2:N)
+ font_wd:=70mm;
+ font_ht:=15mm;
+ MCa(0,.5)(?6,4\,?6,-2:N)
sw_numberA:=3;
MCd(1,.88)(1,.5)(?6,4\,?6)
endfont
%***********************************************************************
beginfont("EN:fused ring")
- font_ht#:=18mm#;
+ font_ht:=18mm;
margin_top_bottom:=1.5mm;
sw_clip:=1;
sw_numberB:=1;
@@ -333,14 +334,14 @@ endfont
%-----------------------------------------------------------------------
beginfont("EN:change ring length")
margin_top_bottom:=2mm;
- font_ht#:=25mm#;
+ font_ht:=25mm;
sw_clip:=1;
sw_numberB:=1;
MCf(?6,4\,?6`1.2,5=?6,11=?6,$(14,15,16,17,18,19,20,21,22,23)bd,$(5,11)dt)
endfont
%-----------------------------------------------------------------------
beginfont("EN:fused large 6 ring")
- font_ht#:=18mm#;
+ font_ht:=18mm;
margin_top_bottom:=1.5mm;
sw_numberB:=1;
sw_clip:=1;
@@ -348,33 +349,33 @@ beginfont("EN:fused large 6 ring")
endfont
%-----------------------------------------------------------------------
beginfont("EN:fuse multi ring")
- font_wd#:=70mm#;
- font_ht#:=20mm#;
+ font_wd:=70mm;
+ font_ht:=20mm;
sw_numberB:=1;
sw_clip:=1;
MCf(<30,?6,$(-3,-4,-4,-2,-2,-4,-4)?6,$(4,8,13,20,25,28,33)dt)
endfont
%***********************************************************************
beginfont("EN:fused ring 2")
- font_wd#:=75mm#;
- font_ht#:=20mm#;
+ font_wd:=75mm;
+ font_ht:=20mm;
sw_numberB:=1;
- MCd(1,1)( 0,.5)(<30,?6,3=?6,(11,4)=?6[4],$(11,4)dt,$(12,13,14,15)bd)
+ MCa( 0,.5)(<30,?6,3=?6,(11,4)=?6[4],$(11,4)dt,$(12,13,14,15)bd)
MCd(1,.9)(.5,.5)(<30,?6,3=?6,(11,4)=?5[3],$(11,4)dt,$(12,13,14)bd)
MCd(1,.9)( 1,.5)(<30,?6,3=?6,(11,4)=?4[2],$(11,4)dt,$(12,13)bd)
endfont
%***********************************************************************
beginfont("EN:fused ring 3")
- font_ht#:=20mm#;
+ font_ht:=20mm;
margin_top_bottom:=2mm;
sw_numberB:=1;
- MCd(1,1)(0,1)(?6,$(3,10)?6,(16,4)=?6[3],$(16,4)dt,$(17,18,19)bd)
- MCd(1,1)(1,0)(?6,$(3,10)?6,(16,4)=?5[2],$(16,4)dt,$(17,18)bd)
+ MCa(0,1)(?6,$(3,10)?6,(16,4)=?6[3],$(16,4)dt,$(17,18,19)bd)
+ MCa(1,0)(?6,$(3,10)?6,(16,4)=?5[2],$(16,4)dt,$(17,18)bd)
endfont
%***********************************************************************
beginfont("EN:fused ring 4")
sw_clip:=1;
- font_ht#:=22mm#;
+ font_ht:=22mm;
margin_top_bottom:=2mm;
sw_numberB:=1;
MCf(<-30,?6,$(3,10,15)?6,(21,4)=?6[2],$(21,4)dt,$(22,23)bd)
@@ -382,7 +383,7 @@ endfont
%***********************************************************************
beginfont("EN:Spiro ring ")
sw_clip:=1;
- font_ht#:=18mm#;
+ font_ht:=18mm;
margin_top_bottom:=3mm;
sw_numberA:=1;
numberA_end:=7;
@@ -391,26 +392,26 @@ beginfont("EN:Spiro ring ")
endfont
%***********************************************************************
beginfont("EN:substituent 1")
- font_ht#:=25mm#;
+ font_ht:=25mm;
sw_clip:=1;
MCf(<30,!,/_,!,/!,!3,/!2,!,/iPr,!3,/tBu,!,/Ph^-30,!)
endfont
%***********************************************************************
beginfont("EN:substituent 2")
- font_ht#:=15mm#;
+ font_ht:=15mm;
sw_clip:=1;
MCf(<-30,!`1,//O,!2`1,/*H,!2`1,*/H,!2`1,**?3,!`1)
endfont
%***********************************************************************
beginfont("EN:substituent 3")
- font_ht#:=18mm#;
+ font_ht:=18mm;
sw_clip:=1;
MCf(<30,``1,!2,/_~zf`2^30,!2,*/!2>lr,!2,*/!2>rl,!)
endfont
%***********************************************************************
beginfont("EN:substituent 3")
- font_wd#:=70mm#;
- font_ht#:=18mm#;
+ font_wd:=70mm;
+ font_ht:=18mm;
margin_top_bottom:=2mm;
sw_numberA:=1;
sw_clip:=1;
@@ -419,7 +420,7 @@ beginfont("EN:substituent 3")
endfont
%***********************************************************************
beginfont("EN:substituent 4")
- font_ht#:=18mm#;
+ font_ht:=18mm;
sw_clip:=1;
margin_top_bottom:=2mm;
sw_numberA:=1; numberA_end:=7;
@@ -427,7 +428,7 @@ beginfont("EN:substituent 4")
endfont
%***********************************************************************
beginfont("EN:substituent 5")
- font_ht#:=18mm#;
+ font_ht:=18mm;
margin_top_bottom:=2mm;
sw_clip:=1;
sw_numberA:=1; numberA_end:=8;
@@ -435,7 +436,7 @@ beginfont("EN:substituent 5")
endfont
%***********************************************************************
beginfont("EN:chain strech direction mode 1")
- font_ht#:=27mm#;
+ font_ht:=27mm;
sw_clip:=1;
ratio_chain_ring:=1;
MCf(
@@ -445,7 +446,7 @@ beginfont("EN:chain strech direction mode 1")
endfont
%***********************************************************************
beginfont("EN:chain strech direction mode 2")
- font_ht#:=23mm#;
+ font_ht:=23mm;
sw_clip:=1;
ratio_chain_ring:=1;
MCf(
@@ -455,7 +456,7 @@ beginfont("EN:chain strech direction mode 2")
endfont
%***********************************************************************
beginfont("EN:chain strech direction mode 3")
- font_ht#:=25mm#;
+ font_ht:=25mm;
sw_clip:=1;
ratio_chain_ring:=1;
MCf(<-30,!6,@(6>45)/'(!3,"{45}"),
@@ -465,32 +466,32 @@ endfont
%***********************************************************************
beginfont("EN:change atom and substituent")
sw_clip:=1;
- font_ht#:=15mm#;
+ font_ht:=15mm;
MCf(<30,!2,NH,!2,SO,!2,SOO,!)
endfont
%***********************************************************************
beginfont("EN:Change color")
- font_ht#:=20mm#;
+ font_ht:=20mm;
sw_clip:=1;
margin_left_right:=5mm;
MCf(<30,Ph,@(2,5)N,2:red,5:blue,3=green)
endfont
%***********************************************************************
beginfont("EN:Make brock")
- font_ht#:=8mm#;
+ font_ht:=8mm;
sw_clip:=1;
sw_numberB:=1;
MCf(<30,!2,{,``1.2,!2,},!2)
endfont
%***********************************************************************
beginfont("EN:Chain start multi characters")
- font_ht#:=9mm#;
+ font_ht:=9mm;
sw_clip:=1;
sw_solid:=1;
MCf(<30,COOH,!0,!5,COOH)
endfont;
beginfont("EN:not good")
- font_ht#:=9mm#;
+ font_ht:=9mm;
margin_left_right:=5mm;
sw_solid:=1;
sw_clip:=1;
@@ -498,22 +499,22 @@ beginfont("EN:not good")
endfont;
%***********************************************************************
beginfont("EN:User definition")
- font_ht#:=15mm#;
+ font_ht:=15mm;
sw_clip:=1;
iBuOH:='(!,/_,!,OH);
MCf(<30,?6,@(4,6)/iBuOH)
endfont
%***********************************************************************
beginfont("EN:Inline definition")
- font_ht#:=15mm#;
+ font_ht:=15mm;
margin_left_right:=2mm;
sw_clip:=1;
MCf(<30,!3,/'(!,/_,!,OH),!3)
endfont
%***********************************************************************
beginfont("EN:Font size")
- font_wd#:=30mm#;%
- font_ht#:=20mm#;%
+ font_wd:=30mm;%
+ font_ht:=20mm;%
sw_font_frame:=1;
MCf(<30,
?6,-4=?5,$(3,8)dl,@(2,6,7,9)N,
@@ -521,177 +522,178 @@ beginfont("EN:Font size")
endfont
%***********************************************************************
beginfont("EN:margin_left_right")
- font_ht#:=20mm#;
+ font_ht:=20mm;
sw_font_frame:=sw_mol_frame:=1;
margin_left_right:=0mm;
margin_top_bottom:=1mm;
- MCd(1,1)(0.5, 1)(<30,CH3,!0,!17,CH3)
+ MCa(0.5, 1)(<30,CH3,!0,!17,CH3)
margin_left_right:=0.4mm;
- MCd(1,1)(0.5,.5)(<30,CH3,!0,!17,CH3)
+ MCa(0.5,.5)(<30,CH3,!0,!17,CH3)
margin_left_right:=5mm;
- MCd(1,1)(0.5, 0)(<30,CH3,!0,!17,CH3)
+ MCa(0.5, 0)(<30,CH3,!0,!17,CH3)
endfont
%***********************************************************************
beginfont("EN:margin_top_bottom")
- font_ht#:=20mm#;
+ font_ht:=20mm;
sw_font_frame:=sw_mol_frame:=1;
margin_left_right:=5mm;
margin_top_bottom:=0mm;
- MCd(1,1)(0.0, .5)(<30,Ph,5:/NH2)
+ MCa(0.0, .5)(<30,Ph,5:/NH2)
margin_top_bottom:=0.4mm;
- MCd(1,1)(0.5, .5)(<30,Ph,5:/NH2)
+ MCa(0.5, .5)(<30,Ph,5:/NH2)
margin_top_bottom:=5mm;
- MCd(1,1)(0.95, .5)(<30,Ph,5:/NH2)
+ MCa(0.95, .5)(<30,Ph,5:/NH2)
endfont
%***********************************************************************
beginfont("EN:offset_thickness")
- font_ht#:=12mm#;
- offset_thickness#:=0.0pt#; MCd(1,1)(0.08,0.5)(<30,Ph)
- offset_thickness#:=0.2pt#; MCd(1,1)(.5,0.5)(<30,Ph)
- offset_thickness#:=0.5pt#; MCd(1,1)(0.92,0.5)(<30,Ph) endfont
+ font_ht:=12mm;
+ offset_thickness:=0.0pt; MCa(0.08,0.5)(<30,Ph)
+ offset_thickness:=0.2pt; MCa(.5,0.5)(<30,Ph)
+ offset_thickness:=0.5pt; MCa(0.92,0.5)(<30,Ph) endfont
%***********************************************************************
beginfont("EN:offset_bond_gap")
- font_ht#:=12mm#;
- offset_bond_gap#:=0.0pt#;
- MCd(1,1)(0.08, .5)(<30,Ph)
- offset_bond_gap#:=0.3pt#; %<<== default
- MCd(1,1)(.50, .5)(<30,Ph)
- offset_bond_gap#:=1.0pt#;
- MCd(1,1)(0.92, .5)(<30,Ph)
+ font_ht:=12mm;
+ offset_bond_gap:=0.0pt;
+ MCa(0.08, .5)(<30,Ph)
+ offset_bond_gap:=0.3pt; %<<== default
+ MCa(.50, .5)(<30,Ph)
+ offset_bond_gap:=1.0pt;
+ MCa(0.92, .5)(<30,Ph)
endfont
%***********************************************************************
beginfont("EN:offset_atom")
- font_ht#:=14mm#;
- offset_atom#:=0.0pt#;
- MCd(1,1)(0.08, .5)(<30,?6,@(3)O)
- offset_atom#:=0.8pt#; %<<== default
- MCd(1,1)(.5, .5)(<30,?6,@(3)O)
- offset_atom#:=2.0pt#;
- MCd(1,1)(0.92, .5)(<30,?6,@(3)O)
+ font_ht:=14mm;
+ offset_atom:=0.0pt;
+ MCa(0.08, .5)(<30,?6,@(3)O)
+ offset_atom:=0.8pt; %<<== default
+ MCa(.5, .5)(<30,?6,@(3)O)
+ offset_atom:=2.0pt;
+ MCa(0.92, .5)(<30,?6,@(3)O)
endfont
%***********************************************************************
-beginfont("EN:offset_wedge") offset_wedge#:=0.0pt#;
- font_ht#:=14mm#;
- MCd(1,1)(0.08, .5)(<30,?6,5:*/_)
- offset_wedge#:=0.4pt#; %<<== default
- MCd(1,1)(.5, .5)(<30,?6,5:*/_)
- offset_wedge#:=1.0pt#;
- MCd(1,1)(0.92, .5)(<30,?6,5:*/_)
+beginfont("EN:offset_wedge")
+ offset_wedge:=0.0pt;
+ font_ht:=14mm;
+ MCa(0.08, .5)(<30,?6,5:*/_)
+ offset_wedge:=0.4pt; %<<== default
+ MCa(.5, .5)(<30,?6,5:*/_)
+ offset_wedge:=1.0pt;
+ MCa(0.92, .5)(<30,?6,5:*/_)
endfont
%***********************************************************************
beginfont("EN:max_bond_length")
- font_ht#:=25mm#;
+ font_ht:=25mm;
sw_mol_frame:=1;
- max_bond_length#:=6mm#;
- MCd(1,1)(0, .5)(<30,Ph)
- max_bond_length#:=8mm#;
- MCd(1,1)(.4, .5)(<30,Ph)
- max_bond_length#:=20mm#; %<<== default
- MCd(1,1)(1, .5)(<30,Ph)
+ max_bond_length:=6mm;
+ MCa(0, .5)(<30,Ph)
+ max_bond_length:=8mm;
+ MCa(.4, .5)(<30,Ph)
+ max_bond_length:=20mm; %<<== default
+ MCa(1, .5)(<30,Ph)
endfont
%***********************************************************************
beginfont("EN:ratio_thickness_bond")
- font_ht#:=12mm#;
+ font_ht:=12mm;
ratio_thickness_bond:=0.005;
- MCd(1,1)(0.08, .5)(<30,Ph)
+ MCa(0.08, .5)(<30,Ph)
ratio_thickness_bond:=0.015; %<<== default
- MCd(1,1)(.5, .5)(<30,Ph)
+ MCa(.5, .5)(<30,Ph)
ratio_thickness_bond:=0.03;
- MCd(1,1)(0.92, .5)(<30,Ph)
+ MCa(0.92, .5)(<30,Ph)
endfont
%***********************************************************************
beginfont("EN:ratio_char_bond")
- font_ht#:=15mm#;
+ font_ht:=15mm;
ratio_char_bond:=1.0;
- MCd(1,1)( 0, .5)(<30,?6,6:O,3:NH)
+ MCa( 0, .5)(<30,?6,6:O,3:NH)
ratio_char_bond:=1.5; %<<== default
- MCd(1,1)(.5, .5)(<30,?6,6:O,3:NH)
+ MCa(.5, .5)(<30,?6,6:O,3:NH)
ratio_char_bond:=2.0;
- MCd(1,1)( 1, .5)(<30,?6,6:O,3:NH)
+ MCa( 1, .5)(<30,?6,6:O,3:NH)
endfont
%***********************************************************************
beginfont("EN:ratio_bondgap_bond")
- font_ht#:=12mm#;
+ font_ht:=12mm;
ratio_bondgap_bond:=0.10;
- MCd(1,1)(0.08, .5)(<30,Ph)
+ MCa(0.08, .5)(<30,Ph)
ratio_bondgap_bond:=0.15; %<<== default
- MCd(1,1)(.5, .5)(<30,Ph)
+ MCa(.5, .5)(<30,Ph)
ratio_bondgap_bond:=0.20;
- MCd(1,1)(0.92, .5)(<30,Ph)
+ MCa(0.92, .5)(<30,Ph)
endfont
%***********************************************************************
beginfont("EN:ratio_atom_bond")
- font_ht#:=15mm#;
+ font_ht:=15mm;
ratio_atom_bond:=0.25;
- MCd(1,1)(0.08, .5)(<30,?6,@(3)O)
+ MCa(0.08, .5)(<30,?6,@(3)O)
ratio_atom_bond:=0.33; %<<== default
- MCd(1,1)(.5, .5)(<30,?6,@(3)O)
+ MCa(.5, .5)(<30,?6,@(3)O)
ratio_atom_bond:=0.45;
- MCd(1,1)(0.92, .5)(<30,?6,@(3)O)
+ MCa(0.92, .5)(<30,?6,@(3)O)
endfont
%***********************************************************************
beginfont("EN:ratio_wedge_bond")
- font_ht#:=15mm#;
+ font_ht:=15mm;
ratio_wedge_bond:=0.1;
- MCd(1,1)(0.08, .5)(<30,?6,5:*/_)
+ MCa(0.08, .5)(<30,?6,5:*/_)
ratio_wedge_bond:=0.12; %<<== default
- MCd(1,1)(.5, .5)(<30,?6,5:*/_)
+ MCa(.5, .5)(<30,?6,5:*/_)
ratio_wedge_bond:=0.2;;
- MCd(1,1)(0.92, .5)(<30,?6,5:*/_)
+ MCa(0.92, .5)(<30,?6,5:*/_)
endfont
%***********************************************************************
beginfont("EN:ratio_atomgap_atom")
- font_ht#:=8mm#;
+ font_ht:=8mm;
sw_atom_frame:=1;
ratio_atomgap_atom:=0.00;
- MCd(1,1)(0, .5)(<-30,!2,@(2)O)
+ MCa(0, .5)(<-30,!2,@(2)O)
ratio_atomgap_atom:=0.050; %<<== default
- MCd(1,1)(.5, .5)(<-30,!2,@(2)O)
+ MCa(.5, .5)(<-30,!2,@(2)O)
ratio_atomgap_atom:=0.12;
- MCd(1,1)(1, .5)(<-30,!2,@(2)O)
+ MCa(1, .5)(<-30,!2,@(2)O)
endfont
%***********************************************************************
beginfont("EN:ratio_chain_ring")
- font_wd#:=70mm#;
- font_ht#:=15mm#;
+ font_wd:=70mm;
+ font_ht:=15mm;
ratio_chain_ring:= 0.4;
- MCd(1,1)(0, .5)(<30,?6,4:/!)
+ MCa(0, .5)(<30,?6,4:/!)
ratio_chain_ring:= 0.66; %<<== default
- MCd(1,1)(.45, .5)(<30,?6,4:/!)
+ MCa(.45, .5)(<30,?6,4:/!)
ratio_chain_ring:= 1;
- MCd(1,1)(1, .5)(<30,?6,4:/!)
+ MCa(1, .5)(<30,?6,4:/!)
endfont
%***********************************************************************
beginfont("EN:ratio_zebragap_bond")
- font_ht#:=15mm#;
+ font_ht:=15mm;
ratio_zebragap_bond:=0.06;
- MCd(1,1)(0.08, .5)(<-30,!2,2:/*_`1)
+ MCa(0.08, .5)(<-30,!2,2:/*_`1)
ratio_zebragap_bond:=0.12; %<<== default
- MCd(1,1)( .5, .5)(<-30,!2,2:/*_`1)
+ MCa( .5, .5)(<-30,!2,2:/*_`1)
ratio_zebragap_bond:=0.20;
- MCd(1,1)(0.92, .5)(<-30,!2,2:/*_`1)
+ MCa(0.92, .5)(<-30,!2,2:/*_`1)
endfont
%***********************************************************************
beginfont("EN:Switwch numberingA")
- font_ht#:=20mm#;
+ font_ht:=20mm;
ratio_chain_ring:=1;
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)
+ sw_numberA:=1; MCa(.5,.9)(<30,!9)
+ sw_numberA:=2; MCa(.5,.5)(<30,!9)
+ sw_numberA:=3; MCa(.5,.1)(<30,!9)
endfont
%***********************************************************************
beginfont("EN:Switwch numberingB")
- font_ht#:=20mm#;
+ font_ht:=20mm;
ratio_chain_ring:=1;
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)
+ sw_numberB:=1; MCa(.5,.9)(<30,!9)
+ sw_numberB:=2; MCa(.5,.5)(<30,!9)
+ sw_numberB:=3; MCa(.5,.1)(<30,!9)
endfont
%***********************************************************************
beginfont("EN:Switwch clipping")
- font_ht#:=15mm#;
+ font_ht:=15mm;
sw_font_frame:=3;
sw_mol_frame:=1;
MCd(1,.7)(.2,.3)(Ph)
@@ -699,7 +701,7 @@ beginfont("EN:Switwch clipping")
endfont
%-----------------------------------------------------------------------
beginfont("EN:Switwch clipping")
- font_ht#:=15mm#;
+ font_ht:=15mm;
sw_font_frame:=3;
sw_mol_frame:=1;
sw_clip:=1;
@@ -708,71 +710,71 @@ beginfont("EN:Switwch clipping")
endfont
%***********************************************************************
beginfont("EN:Switwch Solid ratio=0")
- font_ht#:=18mm#;
- bond_len#:=8mm#;
+ font_ht:=18mm;
+ bond_len:=8mm;
MCf(<30,Ph)
endfont
%-----------------------------------------------------------------------
beginfont("EN:Switwch Solid ratio=1")
- font_ht#:=18mm#;
- bond_len#:=8mm#;
+ font_ht:=18mm;
+ bond_len:=8mm;
sw_solid:=1;
ratio_bond_width:=0.1;
MCf(<30,Ph)
endfont
%-----------------------------------------------------------------------
beginfont("EN:Switwch Solid ratio=2")
- font_ht#:=18mm#;
- bond_len#:=10mm#;
+ font_ht:=18mm;
+ bond_len:=10mm;
sw_solid:=2;
MCf(<30,Ph)
endfont
%-----------------------------------------------------------------------
beginfont("EN:sw_clip=1")
- font_ht#:=18mm#;
- bond_len#:=10mm#;
+ font_ht:=18mm;
+ bond_len:=10mm;
sw_solid:=2;
sw_clip:=1;
MCf(<30,Ph)
endfont
%***********************************************************************
beginfont("EN:Switwch Expand")
- font_ht#:=20mm#;
- MCd(1,1)(0, .5)(<30,Ph,4:/COOH,3:/NH2)
+ font_ht:=20mm;
+ MCa(0, .5)(<30,Ph,4:/COOH,3:/NH2)
sw_expand:=1;
- MCd(1,1)(1, .5)(<30,Ph,4:/COOH,3:/NH2)
+ MCa(1, .5)(<30,Ph,4:/COOH,3:/NH2)
endfont
%***********************************************************************
beginfont("EN:Switwch substituent off")
- font_ht#:=15mm#;
- MCd(1,1)(.15, .5)(<30,Ph,4:/Cl,3:/F)
+ font_ht:=15mm;
+ MCa(.15, .5)(<30,Ph,4:/Cl,3:/F)
sw_subst_off:=1;
- MCd(1,1)(.85, .5)(<30,Ph,4:/Cl,3:/F)
+ MCa(.85, .5)(<30,Ph,4:/Cl,3:/F)
endfont
%***********************************************************************
beginfont("EN:Switwch bondtype off")
- font_ht#:=15mm#;
- MCd(1,1)(.15, .5)(<30,Ph,4:/Cl,3:/F)
+ font_ht:=15mm;
+ MCa(.15, .5)(<30,Ph,4:/Cl,3:/F)
sw_bond_single:=1;
- MCd(1,1)(.85, .5)(<30,Ph,4:/Cl,3:/F)
+ MCa(.85, .5)(<30,Ph,4:/Cl,3:/F)
endfont
%***********************************************************************
beginfont("EN:Switwch font frame 1")
- font_ht#:=15mm#;
+ font_ht:=15mm;
margin_left_right:=5mm;
margin_top_bottom:=2mm;
sw_font_frame:=1;
MCf(<30,Ph,4:/Cl,3:/F)
endfont
beginfont("EN:Switwch font frame 2")
- font_ht#:=15mm#;
+ font_ht:=15mm;
margin_left_right:=5mm;
margin_top_bottom:=2mm;
sw_font_frame:=2;
MCf(<30,Ph,4:/Cl,3:/F)
endfont
beginfont("EN:Switwch font frame 3")
- font_ht#:=15mm#;
+ font_ht:=15mm;
margin_left_right:=5mm;
margin_top_bottom:=2mm;
sw_font_frame:=3;
@@ -780,19 +782,56 @@ beginfont("EN:Switwch font frame 3")
endfont
%***********************************************************************
beginfont("EN:Switwch molecular frame")
- font_ht#:=15mm#;
+ font_ht:=15mm;
sw_mol_frame:=1;
MCf(<30,Ph,4:/Cl,3:/F)
endfont
%***********************************************************************
beginfont("EN:Switwch atom frame")
- font_ht#:=12mm#;
+ font_ht:=12mm;
sw_atom_frame:=1;
MCf(<30,COOH,!0,COOH)
endfont
%***********************************************************************
+beginfont("EN:Local setting 1")
+ font_wd:=15mm;
+ font_ht:=12mm;
+ MCf(Ph)
+endfont
+beginfont("EN:Local setting 2")
+ font_wd:=15mm;
+ font_ht:=12mm;
+ ratio_thickness_bond:=0.05;
+ MCf(Ph)
+endfont
+beginfont("EN:Local setting 3")
+ font_wd:=15mm;
+ font_ht:=12mm;
+ MCf(Ph)
+endfont
+%***********************************************************************
+save_ratio:=ratio_thickness_bond;
+beginfont("EN:Local setting 1")
+ font_wd:=15mm;
+ font_ht:=12mm;
+ MCf(Ph)
+endfont
+ratio_thickness_bond:=0.05;
+beginfont("EN:Local setting 2")
+ font_wd:=15mm;
+ font_ht:=12mm;
+ MCf(Ph)
+endfont
+beginfont("EN:Local setting 3")
+ font_wd:=15mm;
+ font_ht:=12mm;
+ MCf(Ph)
+endfont
+ratio_thickness_bond:=save_ratio;
+%***********************************************************************
beginfont("EN:MCd()")
- font_ht#:=20mm#;
+ font_wd:=60mm;
+ font_ht:=20mm;
sw_font_frame:=1;
sw_mol_frame:=1;
MCd(1,0.8)(0.1,1)(<30,Ph,4:/Cl,3:/F)
@@ -800,161 +839,121 @@ beginfont("EN:MCd()")
MCd(1,0.8)(0.9,0)(<30,Ph,4:/Cl,3:/F)
endfont
%***********************************************************************
-beginfont("EN:MCf() ht")
+beginfont("EN:MCa()")
+ font_wd:=60mm;
+ font_ht:=20mm;
+ sw_font_frame:=1;
+ sw_mol_frame:=1;
+ MCa(0.1,0.5)(<30,Ph,4:/Cl,3:/F)
+ sw_mol_frame:=1;
+ MCa(0.9,0.5)(<30,Ph,4:/Cl,3:/F)
+endfont
+%***********************************************************************
+beginfont("EN:MCc()")
+ font_wd:=60mm;
+ font_ht:=20mm;
+ sw_font_frame:=1;
+ sw_mol_frame:=1;
+ MCc(1,1)(<30,?6)
+ sw_mol_frame:=1;
+ MCc(0.5,0.5)(<30,?6)
+endfont
+%***********************************************************************
+beginfont("EN:MCf() ht1")
margin_left_right:=margin_top_bottom:=0.5mm;
- font_wd#:=25mm#;
- font_ht#:=15mm#;
+ font_wd:=25mm;
+ font_ht:=15mm;
sw_font_frame:=1;
sw_mol_frame:=1;
MCf(<30,Ph)
endfont
+%-----------------------------------------------------------------------
+beginfont("EN:MCf() ht2")
+ margin_left_right:=margin_top_bottom:=0.5mm;
+ font_wd:=25mm;
+ font_ht:=15mm;
+ sw_font_frame:=1;
+ sw_mol_frame:=1;
+ MCf(<30,Ph,4:/Cl,3:/F)
+endfont
+%-----------------------------------------------------------------------
beginfont("EN:MCf() vt")
margin_left_right:=margin_top_bottom:=0.5mm;
- font_wd#:=13mm#;
- font_ht#:=25mm#;
+ font_wd:=15mm;
+ font_ht:=25mm;
sw_font_frame:=1;
sw_mol_frame:=1;
MCf(<30,Ph)
endfont
-%***********************************************************************
-beginfont("EN:EXT()")
- margin_left_right:=margin_top_bottom:=4mm;
- font_wd#:=60mm#;
- font_ht#:=30mm#;
- ratio_bond_width:=0.08;
- defaultscale:=0.6;
+%-----------------------------------------------------------------------
+beginfont("EN:MCf() vt2")
+ margin_left_right:=margin_top_bottom:=0.5mm;
+ font_wd:=15mm;
+ font_ht:=25mm;
sw_font_frame:=1;
- sw_solid:=1;
- MCd(1,0.8)(0.12,0.58)(<30,?6,$(3,6)dl,
- @(2^35,2^-35)/R,5://O)
- MCd(1,0.8)(0.88,0.48)(<30,Ph,@(2,3)/R,5:/OH)
- EXT(
- defaultscale:=0.6;
- draw_vector((0.6w,0.5h),0,0.2mm,0.25w);
- p3:=(0.48w,0.5h);
- label.top("H",p3);
- label.top("+",p3+(em,0.5em));
- drawdot p0 withpen pencircle scaled 3pt;
- drawdot p1 withpen pencircle scaled 3pt;
- drawdot p2 withpen pencircle scaled 3pt;
- label.bot("p0",p0);
- label.lft("p1",p1);
- label.ulft("p2",p2);
- defaultscale:=0.6;
- label.bot("Dienone-Phenol Rearrangement",(0.5w,1h));
- )
+ sw_mol_frame:=1;
+ MCf(<30,Ph,4:/Cl,3:/F)
endfont
%***********************************************************************
-beginfont("EN:ext()")
- font_wd#:=70mm#;
- font_ht#:=30mm#;
+beginfont("EN:EXT()")
+ font_wd:=70mm;
+ font_ht:=30mm;
ratio_bond_width:=0.065;
sw_solid:=1;
- MCd(1,1)(0.1,0.5)(<-210,60`1,60`1,60`1,$(1,3)dl,1:/R1,4:/R2^-60)
+ MCa(0.1,0.5)(<-210,60`1,60`1,60`1,$(1,3)dl,1:/R1,4:/R2^-60)
ext(
defaultscale:=0.6;
label.bot("Diene",p0+(0.5wd,0));
)
- MCd(1,1)(0.4,0.5)(<-30,-60`1,1=dl,1:/R3,2:/R4^60)
+ MCa(0.4,0.5)(<-30,-60`1,1=dl,1:/R3,2:/R4^60)
ext(
defaultscale:=0.6;
label.bot("Dienophile",p0+(0.5wd,0));
)
- MCd(1,1)(0.9,0.5)(<30,?6,6=dl,2:/R2,3:/R4,4:/R3,5:/R1)
- ext(
- defaultscale:=0.6;
- drawdot p0 withpen pencircle scaled 3pt;
- label.bot("p0",p0);
- )
+ MCa(0.9,0.5)(<30,?6,6=dl,2:/R2,3:/R4,4:/R3,5:/R1)
EXT(
- draw_vector((0.6w,0.5h),0,0.2mm,0.08w);
- defaultscale:=0.7;
- label("+",(0.25w,0.5h));
- label.bot("Diels-Alder Reaction",(0.5w,1h));
+ drawarrow (0.52w,0.5h)..(0.6w,0.5h);
+ defaultscale:=0.7;
+ label("+",(0.25w,0.5h));
+ label.bot("Diels-Alder Reaction",(0.5w,1h));
)
endfont
%***********************************************************************
-beginfont("EN:Local setting 1")
- font_wd#:=15mm#;
- font_ht#:=12mm#;
- MCf(Ph)
-endfont
-beginfont("EN:Local setting 2")
- font_wd#:=15mm#;
- font_ht#:=12mm#;
- ratio_thickness_bond:=0.05;
- MCf(Ph)
-endfont
-beginfont("EN:Local setting 3")
- font_wd#:=15mm#;
- font_ht#:=12mm#;
- MCf(Ph)
-endfont
-%***********************************************************************
-save_ratio:=ratio_thickness_bond;
-beginfont("EN:Local setting 1")
- font_wd#:=15mm#;
- font_ht#:=12mm#;
- MCf(Ph)
-endfont
-ratio_thickness_bond:=0.05;
-beginfont("EN:Local setting 2")
- font_wd#:=15mm#;
- font_ht#:=12mm#;
- MCf(Ph)
-endfont
-beginfont("EN:Local setting 3")
- font_wd#:=15mm#;
- font_ht#:=12mm#;
- MCf(Ph)
+beginfont("EN:ext()")
+ font_wd:=50mm;
+ font_ht:=20mm;
+ MCd(1,0.7)(0,0.5)(<30,?6,3=dl,4:/CH3)
+ ext(
+ label.top("+",A7);
+ drawarrow B3..((B7-B3) scaled 0.7 rotated -45 shifted B3)..B7;
+ )
+ MCd(1,0.7)(1,0.5)(<30,?6,4://CH3)
+ ext(
+ labeloffset:=0bp;
+ label.lrt("+",A3);
+ )
+ EXT(drawdblarrow (0.4w,0.5h)..(0.55w,0.5h);)
endfont
-ratio_thickness_bond:=save_ratio;
-%***********************************************************************
sw_clip:=1;
-%% Output molecular infomation
-beginfont("EN:Caffeine","FM:C8H10N4O2","MW:194.19")
- font_ht#:=15mm#;
- 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)/_,@(1,5)//O)
-endfont
-%***********************************************************************
-%% Output additional infomation
-beginfont("EN:Tocopherol","CAS:59-02-9","FM:C29H50O2","MW:430.71")
- font_ht#:=15mm#;
- sw_logout:=1;
- MCf(<30,Ph,3=?6,7:O,@(1,2,5)/_,8:/*_^60,6:/OH,8\,|,!12,@(4,8)/*_,12:/_)
-endfont
-%***********************************************************************
-beginfont("EN:Cholesterol","CAS:57-88-5","FM:C27H46O","MW:386.65")
- font_ht#:=15mm#;
- MCf(
- <30,?6,$(-4,-2)?6,-4=?5,7=dl,
- 1:*/OH,@(4,12)*/_^60,9:*/H^60,
- 10:/*H^180,11:/*H^-60,17:/*H^-54,
- -1\^18,/*_,-60,!3,/_,!,
- )
-endfont
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%***************************************************************************
beginfont("EN:Acetamiprid","MW:222.676")
- font_ht#:=20mm#;
+ font_ht:=20mm;
MCf(<30,Ph,2:N,1:/Cl,4\,!,N,/_,!,/_,!!,N,!,CN)
endfont
%***************************************************************************
beginfont("EN:Fenitrothion","MW:277.231")
- font_ht#:=20mm#;
+ font_ht:=20mm;
MCf(<30,!,O,!,P,//S,/O!^160,!,O,!,|,Ph,3:/_,4:/NO2)
endfont
%***************************************************************************
beginfont("EN:Permethrin","MW:391.288")
- font_ht#:=25mm#;
+ font_ht:=25mm;
MCf(<-30,?3,2^-35:*/_,2^35:/*_,1\,!!,/Cl,!,Cl,
3\,//O,!,O,!2,|,Ph,3\,O,-60,Ph)
endfont
%***************************************************************************
beginfont("EN:Endosulfan","MW:406.904");
- font_ht#:=25mm#;
+ font_ht:=25mm;
MCf(<26,?7,7=?6[13],11*,208~wf`1.45,&8~wb,10=d,@(3,5)O,4:S,4://O,
@(8,9,10,11,12^-210,12^-150)/Cl)
endfont;
@@ -965,12 +964,12 @@ beginfont("EN:Luciferin","MW:280.33")
endfont
%***************************************************************************
beginfont("EN:Warfarin","CAS:81-81-2","FM:C19H16O4","MW:308.33")
- font_ht#:=25mm#;
+ font_ht:=25mm;
MCf(<30,Ph,3=?6,8=dl,10:O,7:/OH,9://O,8\,/Ph`1,60,!,//O,!)
endfont
%***************************************************************************
beginfont("EN:Limonin")
- font_ht#:=30mm#;
+ font_ht:=30mm;
MCf(<30,?6,$(-3,-4)?6,-5=?3,-2=wf,-1=wb,6=?5,-4=?6,-5=wf,
@(13,15,17,20)O,@(3,12,21)//O,
@(4~wf^60,8~zf^60,18^35,18^-35)/_,@(1^60,5^180,16^60)/*H,
@@ -978,20 +977,20 @@ beginfont("EN:Limonin")
endfont
%***************************************************************************
beginfont("EN:Sesamine")
- font_ht#:=25mm#;
+ font_ht:=25mm;
MCf(<54,?5,1=?5,@(4,7)O,@(1^-54,2^54)*/H,
#5*\^-12,Ph,|,-3=?5,@(-1,-3)O,#8*\^-12,Ph,|,-3=?5,@(-1,-3)O)
endfont
%***************************************************************************
beginfont("EN:Colchicine","CAS:477-27-0","FM:C21H23NO6","MW:385.41")
- font_ht#:=25mm#;
+ font_ht:=25mm;
MCf(<30,Ph,@(1,2,6)/O!,|,-4=?7,
|,-5=?7,$(-1,-4,-6)dl,-2://O,-3:/O!,
#9\,NH,!,//O,!)
endfont
%***************************************************************************
beginfont("EN:Lycorine","CAS:476-28-8","FM:C16H17NO4","MW:287.31")
- font_ht#:=25mm#;
+ font_ht:=25mm;
MCf(<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
@@ -999,26 +998,26 @@ beginfont("EN:Lycorine","CAS:476-28-8","FM:C16H17NO4","MW:287.31")
endfont
%***********************************************************************
beginfont("EN:Gibberellin A3","CAS:77-06-5","FM:C19H22O6","MW:346.37");
- font_ht#:=20mm#;
+ font_ht:=20mm;
MCf(<18,?5,3=?7,5=?6[12],8*,160`1.3,&3,13=dl,6=wf,8=wb,
5*,40~zf`1,O,50,//O^180,&14~zb,
2:/COOH,7://_,13:*/OH,8:/*OH,14:*/_,@(1^60,4^60)*/H)
endfont
%***************************************************************************
beginfont("EN:Quinine","CAS:130-95-0","FM:C20H24N2O2","MW:324.42")
- font_ht#:=25mm#;
+ font_ht:=25mm;
MCf(<30,Ph,3=Ph,7:N,6:/O!,
10\,*/OH,/H~zf^-60,!,|,?6,2:N,1:*/H^60,4*\,!!,2*,165~zf,60,&5~zb)
endfont
%***************************************************************************
beginfont("EN:Atoropin","CAS:51-55-8","FM:C17H23NO3","MW:289.37")
- font_ht#:=25mm#;
+ font_ht:=25mm;
MCf(<-30,O,!,//O,!,!,Ph,
#1\~zb^-120,|,?7,6*\^190`1.12,N,/_,&3~wb,#3\~wv,!,OH)
endfont
%***************************************************************************
beginfont("EN:Rotenone");
- font_ht#:=30mm#;
+ font_ht:=30mm;
MCf(<-60,?5,$(-3,-2,-3,-4)?6,$(7,9,-2,-4)dl,$(3,17)dr,
@(2,13,16)O,10://O,@(11^-60,12^60)*/H,@(-2,-3)/O!,1*\,/_,!!)
endfont;
@@ -1029,7 +1028,7 @@ beginfont("EN:Pyrethrin I");
endfont;
%***************************************************************************
beginfont("EN:Validamycin")
- font_ht#:=20mm#;
+ font_ht:=20mm;
MCf(<30,?6,@(5,6)/OH,3:/!OH>rl,
#4\,O,-60,|,?6,2:O,@(3,4,5)/OH,6:/!OH,
#1\,NH,!,|,?6,2=dl,@(4,5,6)/OH,3:/!OH)
@@ -1042,7 +1041,23 @@ beginfont("EN:Paclitaxel","CAS:33069-62-4","FM:C47H51NO14","MW:853.91")
1\,O,!,//O,!,*/OH,!,/Ph,60~wf,NH,-60,//O,60,Ph,
7\*,O,-45,//O,60,Ph,11*\,O,-60,//O,60,12\*^-15,O,60,//O,-60)
endfont
-%***********************************************************************
-bye
-***************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+beginfont("EN:Ampicillin","MW:349.405")
+ font_ht:=15mm;
+ MCf(<45,?4,-3=?5,2:N,7:S,
+ @(3^45,4^-45)/*H,1://O^15,5:/*COOH^-18,@(6^35,6^-35)/_,
+ ,4*\^75,NH,!,//O,!,/*NH2,!,Ph)
+endfont
+%***************************************************************************
+beginfont("EN:Cholesterol","CAS:57-88-5","FM:C27H46O","MW:386.65")
+ font_ht:=15mm;
+ MCf(
+ <30,?6,$(-4,-2)?6,-4=?5,7=dl,
+ 1:*/OH,@(4,12)*/_^60,9:*/H^60,
+ 10:/*H^180,11:/*H^-60,17:/*H^-54,
+ -1\^18,/*_,-60,!3,/_,!,
+ )
+endfont
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bye
+ye
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
index bf917b47810..341b2fd9b2c 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
index c6bdf96d93e..db265456303 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 2017.03.06
+% Molecular Coding Format manual by Akira Yamaji 2017.03.26
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
%%%%\usepackage{graphicx}
@@ -592,8 +592,8 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
\subsubsection{Font size}
\begin{verbatim}
beginfont("EN:Caffeine")
- font_wd#:=30mm#; %<==font width
- font_ht#:=20mm#; %<==font height
+ font_wd:=30mm; %<==font width
+ font_ht:=20mm; %<==font height
MCf(<30,?6,-4=?5,$(3,8)dl,@(2,6,7,9)N,
@(2,6,9)/_,@(1,5)//O) endfont
\end{verbatim}
@@ -622,7 +622,7 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
%-----------------------------------------------------------------------------
\subsubsection{Offset thickness of bond}
\begin{verbatim}
- default: offset_thickness#=0.2pt#
+ default: offset_thickness=0.2pt
\end{verbatim}
\MCFstructure
\vspace{-3mm}%
@@ -632,7 +632,7 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
%-----------------------------------------------------------------------------
\subsubsection{Offset of doublebond gap}
\begin{verbatim}
- default: offset_bond_gap#=0.3pt#
+ default: offset_bond_gap=0.3pt
\end{verbatim}
\MCFstructure
\vspace{-3mm}%
@@ -642,7 +642,7 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
%-----------------------------------------------------------------------------
\subsubsection{Offset of atom width}
\begin{verbatim}
- default: offset_atom#=0.8pt#
+ default: offset_atom=0.8pt
\end{verbatim}
\MCFstructure
\vspace{-3mm}%
@@ -652,7 +652,7 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
%-----------------------------------------------------------------------------
\subsubsection{Offset of wedge width}
\begin{verbatim}
- default: offset_wedge#=0.4pt#
+ default: offset_wedge=0.4pt
\end{verbatim}
\MCFstructure
\vspace{-3mm}%
@@ -662,7 +662,7 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
%-----------------------------------------------------------------------------
\subsubsection{Max bond length}
\begin{verbatim}
- default: max_bond_length#=10mm#
+ default: max_bond_length=10mm
\end{verbatim}
\MCFstructure
\vspace{-3mm}%
@@ -807,15 +807,15 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
sw_solid:=1;
ratio_bond_width=0.1
font_width=60mm
- (bond_len#=60mm#*0.1=6mm#)
- ** ignore bond_len#
+ (bond_len=60mm*0.1=6mm)
+ ** ignore bond_len
\end{verbatim}
\MCFstructure
%-----------------------------------------
\begin{verbatim}
(solid bond length)
sw_solid:=2;
- bond_len#=10mm#
+ bond_len=10mm
** ignore ratio_bond_width
\end{verbatim}
\MCFstructure
@@ -824,7 +824,7 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
(solid bond length and clip)
sw_solid:=2;
sw_clip:=1;
- bond_len#=10mm#
+ bond_len=10mm
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
@@ -892,11 +892,46 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
** default: sw_atom_frame=0
\end{verbatim}
\MCFstructure
+%-----------------------------------------------------------------------------
+\subsection{Local parameter setting}
+\begin{verbatim}
+ beginfont()
+ MCf(Ph)
+ endfont
+ beginfont()
+ %--------------------------
+ ratio_thickness_bond:=0.05;
+ %--------------------------
+ MCf(Ph)
+ endfont
+ beginfont()
+ MCf(Ph)
+ endfont
+\end{verbatim}
+\MCFstructure\MCFstructure\MCFstructure
+%-----------------------------------------------------------------------------
+\subsection{Global parameter setting}
+\begin{verbatim}
+ beginfont()
+ MCf(Ph)
+ endfont
+ %--------------------------
+ ratio_thickness_bond:=0.05;
+ %--------------------------
+ beginfont()
+ MCf(Ph)
+ endfont
+ beginfont()
+ MCf(Ph)
+ endfont
+\end{verbatim}
+\MCFstructure\MCFstructure\MCFstructure
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newpage
\section{Function}
\subsection{Function MCd()}
\begin{verbatim}
- (Draw molecular structure)
+ (Draw molecule)
MCd(a,b)(c,d)(...)
a: ratio molecular width/font width
@@ -911,262 +946,207 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
+\subsection{Function MCa()}
+\begin{verbatim}
+ (Draw molecule at (x,y))
+
+ MCa(a,b)(...) : MCd(1,1)(a,b)(...)
+ a: x axis position
+ b: y axis position
+
+ beginfont()
+ MCa(0.2,0.5)(<30,Ph,3:/F,4:/Cl)
+ MCa(0.8,0.5)(<30,Ph,3:/F,4:/Cl)
+ endfont
+\end{verbatim}
+\MCFstructure
+%-----------------------------------------------------------------------------
+\subsection{Function MCc()}
+\begin{verbatim}
+ (Draw molecule to center of font)
+
+ MCc(a,b)(...) : MCd(a,b)(0.5,0.5)(...)
+ a: ratio molecular width/font width
+ b: ratio molecular hight/font hight
+
+ beginfont()
+ MCc(1,1)(<30,?6)
+ MCc(0.5,0.5)(<30,?6)
+ endfont
+\end{verbatim}
+\MCFstructure
+%-----------------------------------------------------------------------------
\subsection{Function MCf()}
\begin{verbatim}
- (Draw molecular fit to font size)
+ (Draw molecule fit to font size)
+
MCf(...) : MCd(1,1)(0.5,0.5)(...)
- beginfont() beginfont()
- font_wd#:=25mm#; font_wd#:=13mm#;
- font_ht#:=15mm#; font_ht#:=25mm#;
- MCf(<30,Ph) MCf(<30,Ph)
- endfont endfont
+ (Draw molecule fit to font height)
+
+ beginfont()
+ font_wd:=25mm;
+ font_ht:=15mm;
+ MCf(<30,Ph)
+ endfont
\end{verbatim}
-\MCFstructure\hspace{12mm}\MCFstructure
+\MCFstructure
+\begin{verbatim}
+
+ beginfont()
+ font_wd:=25mm;
+ font_ht:=15mm;
+ MCf(<90,Ph,3:/F,4:/Cl)
+ endfont
+\end{verbatim}
+\MCFstructure
+\begin{verbatim}
+
+ (Draw molecule fit to font width)
+
+ beginfont()
+ font_wd:=15mm;
+ font_ht:=25mm;
+ MCf(<30,Ph)
+ endfont
+\end{verbatim}
+\MCFstructure
+\begin{verbatim}
+
+ beginfont()
+ font_wd:=15mm;
+ font_ht:=25mm;
+ MCf(<30,Ph,3:/F,4:/Cl)
+ endfont
+\end{verbatim}
+\MCFstructure
%-----------------------------------------------------------------------------
\newpage
\subsection{Function EXT()}
\begin{verbatim}
(Add extra graphic to font)
- w: font width
- h: font height
- wd: font width-margin_left_right*2
- ht: font height-margin_top_bottom*2
- aw: atom font size
- em: label font size
- p0: x=margin_left_right
- y=margin_top_bottom
- n: molecular number
- p[m]: molecular origin position
-
-(Function for EXT(),ext())
- draw_vector(pos,angle,thick,length):
- draw vector at pos
- label:
- sw_label=0: use Metafont **default
- sw_label=1: use Metapost label
-
+
+ w: font width
+ h: font height
+ wd: font width-margin_left_right*2
+ ht: font height-margin_top_bottom*2
+ aw: atom font size
+ em: label font size
+ p0: x=margin_left_right
+ y=margin_top_bottom
+ n: molecular number
+ p[m]: molecular origin position
+
+%----------------------------------------
beginfont()
- margin_left_right:=margin_top_bottom:=4mm;
- font_wd#:=60mm#;
- font_ht#:=30mm#;
- ratio_bond_width:=0.08;
+ font_wd:=70mm;
+ font_ht:=30mm;
+ ratio_bond_width:=0.065;
sw_solid:=1;
- sw_font_frame:=3;
- %-----------------------------------------
- MCd(1,0.8)(0.12,0.58)
- (<30,?6,$(3,6)dl,@(2^35,2^-35)/R,5://O)
- MCd(1,0.8)(0.88,0.48)
- (<30,Ph,@(2,3)/R,5:/OH)
- %-----------------------------------------
+ %---------------------------------------
+ MCd(1,1)(0.1,0.5)
+ (<-210,60`1,60`1,60`1,$(1,3)dl,
+ 1:/R1,4:/R2^-60)
+ ext(
+ defaultscale:=0.6;
+ label.bot("Diene",p0+(0.5wd,0));
+ )
+ %---------------------------------------
+ MCd(1,1)(0.4,0.5)
+ (<-30,-60`1,1=dl,1:/R3,2:/R4^60)
+ ext(
+ defaultscale:=0.6;
+ label.bot("Dienophile",p0+(0.5wd,0));
+ )
+ %---------------------------------------
+ MCd(1,1)(0.9,0.5)
+ (<30,?6,6=dl,2:/R2,3:/R4,4:/R3,5:/R1)
+ %---------------------------------------
EXT(
- defaultscale:=0.6;
- draw_vector((0.6w,0.5h),0,0.2mm,0.25w);
- p3:=(0.48w,0.5h);
- label.top("H",p3);
- label.top("+",p3+(em,0.5em));
- drawdot p0 withpen pencircle scaled 3pt;
- drawdot p1 withpen pencircle scaled 3pt;
- drawdot p2 withpen pencircle scaled 3pt;
- label.bot("p0",p0);
- label.lft("p1",p1);
- label.ulft("p2",p2);
- defaultscale:=0.7;
- label.bot("Dienone-Phenol Rearrangement",
+ drawarrow (0.52w,0.5h)..(0.6w,0.5h);
+ defaultscale:=0.7;
+ label("+",(0.25w,0.5h));
+ label.bot("Diels-Alder Reaction",
(0.5w,1h));
- )
+ )
+ %---------------------------------------
endfont
\end{verbatim}
-\MCFstructure\\
+\MCFstructure
%-----------------------------------------------------------------------------
\newpage
\subsection{Function ext()}
\begin{verbatim}
(Add extra graphic to molecule)
- wd: molecular width
- ht: molecular height
- aw: atom font size
- em: label font size
- p0: origin of molecular structure
- l: bond length
- An: atom number
- A[m]: atom position
- A[m]bra: branch angle of A[m]
- Bn: bond number
- B[m]: bond position
- B[m]ang: bond angle
+ wd: molecular width
+ ht: molecular height
+ aw: atom font size
+ em: label font size
+ p0: origin of molecular structure
+ l: bond length
+ An: atom number
+ A[m]: atom position
+ A[m]bra: branch angle of A[m]
+ Bn: bond number
+ B[m]: bond position
+ B[m]ang: bond angle
+
+%----------------------------------------
beginfont()
- font_wd#:=70mm#;
- font_ht#:=30mm#;
- ratio_bond_width:=0.065;
- sw_solid:=1;
- %-------------------------------------
- MCd(1,1)(0.1,0.5)
- (<-210,60`1,60`1,60`1,$(1,3)dl,
- 1:/R1,4:/R2^-60)
+ font_wd:=50mm;
+ font_ht:=20mm;
+ %---------------------------------------
+ MCd(1,0.7)(0,0.5)(<30,?6,3=dl,4:/CH3)
ext(
- defaultscale:=0.6;
- label.bot("Diene",p0+(0.5wd,0));
- )
- %-------------------------------------
- MCd(1,1)(0.4,0.5)
- (<-30,-60`1,1=dl,1:/R3,2:/R4^60)
- ext(
- defaultscale:=0.6;
- label.bot("Dienophile",p0+(0.5wd,0));
- )
- %-------------------------------------
- MCd(1,1)(0.9,0.5)
- (<30,?6,6=dl,2:/R2,3:/R4,4:/R3,5:/R1)
+ label.top("+",A7);
+ drawarrow B3..((B7-B3) scaled 0.7
+ rotated -45 shifted B3)..B7;
+ )
+ %---------------------------------------
+ MCd(1,0.7)(1,0.5)(<30,?6,4://CH3)
ext(
- defaultscale:=0.6;
- drawdot p0 withpen pencircle scaled 3pt;
- label.bot("p0",p0);
+ labeloffset:=0bp;
+ label.lrt("+",A3);
)
- %-------------------------------------
+ %---------------------------------------
EXT(
- draw_vector((0.6w,0.5h),0,0.2mm,0.08w);
- defaultscale:=0.7;
- label("+",(0.25w,0.5h));
- label.bot("Diels-Alder Reaction",(0.5w,1h));
+ drawdblarrow (0.4w,0.5h)..(0.55w,0.5h);
)
+ %---------------------------------------
endfont
\end{verbatim}
\MCFstructure
-%-----------------------------------------------------------------------------
-\newpage
-\subsection{Local parameter setting}
-\begin{verbatim}
- beginfont() MCf(Ph) endfont
- %---------------------------
- beginfont()
- ratio_thickness_bond:=0.05;
- MCf(Ph)
- endfont
- %---------------------------
- beginfont() MCf(Ph) endfont
-\end{verbatim}
-\MCFstructure\MCFstructure\MCFstructure
-%-----------------------------------------------------------------------------
-\subsection{Global parameter setting}
-\begin{verbatim}
- beginfont() MCf(Ph) endfont
- %---------------------------
- ratio_thickness_bond:=0.05;
- %---------------------------
- beginfont() MCf(Ph) endfont
- beginfont() MCf(Ph) endfont
-\end{verbatim}
-\MCFstructure\MCFstructure\MCFstructure
-%-----------------------------------------------------------------------------
-\section{Output information}
-%-----------------------------------------------------------------------------
-\subsection{Output molecular information}
-\begin{verbatim}
-tag3:="cMW"; var3:="calc_weight";
-tag4:="cFM"; var4:="calc_formula";
-%--------------------------------
-beginfont()
- MCf(<30,?6,3=d,
- @(2,6)N,@(2,6)/_,@(1,5)//O,
- |,-4=?5,2=dl,@(1,3)N,3:/_)
-endfont
-%------------------------------------------
-beginfont(......)
- ...........
-endfont
-%------------------------------------------
-..............
-
-%% Output to mcf_man_soc-info.aux %%
-..... ;C:85;cMW:194.19174;cFM:C8H10N4O2
-.......................................
-
-** default value
- tag1:="F"; var1:="jobname";
- tag2:="C"; var2:="char_num";
-
-cMW:calculated molecular weight
-cFM:calculated molecular formula
-\end{verbatim}
-\MCFstructure
-%-----------------------------------------------------------------------------
-\subsection{Output additional information}
\begin{verbatim}
-%------------------------------------------
-beginfont("EN:Tocopherol","CAS:59-02-9")
- MCf(<30,Ph,3=?6,
- 7:O,@(1,2,5)/_,8:/*_^60,6:/OH,
- 8\,|,!12,@(4,8)/*_,12:/_)
-endfont
-%------------------------------------------
-beginfont(......)
- ...........
-endfont
-%------------------------------------------
-..............
-
-%% Output to mcf_man_soc-info.aux %%
-F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
-............................................
-
-1* F:filename * default output
-2* C:char number * default output
-3 EN:molecular name
-4 CAS:CAS number
+label:
+ sw_label=0: emulation mode
+ sw_label=1: metapost mode
+ **default sw_label=0
+drawarrow & drawdblarrow:
+ sw_arrow=0: emulation mode
+ sw_arrow=1: metapost mode
+ **default sw_arrow=0
\end{verbatim}
-\MCFstructure
-%-----------------------------------------------------------------------------
-\subsection{Fixed aux information}
-\begin{verbatim}
- tag3:="NO"; var3:="inf_NO";
- tag4:="EN"; var4:="inf_EN";
- sw_auxfix:=1; % ** default sw_auxfix=0
- auxtag_out; % output tag list
- %--------------------------------------
- beginfont("EN:Cholesterol","NO:1")
- MCf(
- <30,?6,$(-4,-2)?6,-4=?5,7=dl,
- 1:*/OH,@(4,12)*/_^60,9:*/H^60,
- 10:/*H^180,11:/*H^-60,17:/*H^-54,
- -1\^18,/*_,-60,!3,/_,!
- )
- endfont
- %--------------------------------------
- beginfont(......)
- ...........
- endfont
- %--------------------------------------
- ..............
-
- %% Output to mcf_man_soc-info.aux %%
- F;C;NO;EN
- mcf_man_soc;91;1;Ampicillin
- ...........................
-
-\end{verbatim}
-\MCFstructure
%-----------------------------------------------------------------------------
\newpage
\section{MCF example}
%-----------------------------------------------------------------------------
-\subsection*{Acetamiprid}
+\subsection{Acetamiprid}
\begin{verbatim}
<30,Ph,2:N,1:/Cl,
4\,!,N,/_,!,/_,!!,N,!,CN
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Fenitrothion}
+\subsection{Fenitrothion}
\begin{verbatim}
<30,!,O,!,P,//S,/O!^160,!,O,!,
|,Ph,3:/_,4:/NO2
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Permethrin}
+\subsection{Permethrin}
\begin{verbatim}
<-30,?3,2^-35:*/_,2^35:/*_,
1\,!!,/Cl,!,Cl,
@@ -1175,7 +1155,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Endosulfan}
+\subsection{Endosulfan}
\begin{verbatim}
<26,?7,7=?6[13],11*,208~wf`1.45,&8~wb,
10=d,@(3,5)O,4:S,4://O,
@@ -1183,7 +1163,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Luciferin}
+\subsection{Luciferin}
\begin{verbatim}
<30,Ph,3=?5,8\,?5,$(9,16)d,
@(9,14)N,@(7,11)S,
@@ -1191,7 +1171,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Warfarin}
+\subsection{Warfarin}
\begin{verbatim}
<30,Ph,3=?6,8=dl,
10:O,7:/OH,9://O,
@@ -1199,7 +1179,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Limonin}
+\subsection{Limonin}
\begin{verbatim}
<30,?6,$(-3,-4)?6,-5=?3,
-2=wf,-1=wb,6=?5,-4=?6,-5=wf,
@@ -1210,7 +1190,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Sesamine}
+\subsection{Sesamine}
\begin{verbatim}
<54,?5,1=?5,
@(4,7)O,@(1^-54,2^54)*/H,
@@ -1219,7 +1199,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Colchicine}
+\subsection{Colchicine}
\begin{verbatim}
<30,Ph,@(1,2,6)/O!,
-4=?7,-5=?7,
@@ -1228,7 +1208,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Lycorine}
+\subsection{Lycorine}
\begin{verbatim}
<30,Ph,
-4=?6,-2=?6,6=?5,(9,12)=?5[3],
@@ -1239,7 +1219,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Gibberellin}
+\subsection{Gibberellin}
\begin{verbatim}
<18,?5,3=?7,5=?6[12],
8*,160`1.3,&3,
@@ -1250,7 +1230,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Quinine}
+\subsection{Quinine}
\begin{verbatim}
<30,Ph,3=Ph,7:N,6:/O!,
10\,*/OH,/H~zf^-60,!,
@@ -1260,7 +1240,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Atoropin}
+\subsection{Atoropin}
\begin{verbatim}
<-30,O,!,//O,!,!,Ph,
#1\~zb^-120,
@@ -1269,7 +1249,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Rotenone}
+\subsection{Rotenone}
\begin{verbatim}
<-60,?5,$(-3,-2,-3,-4)?6,
$(7,9,-2,-4)dl,$(3,17)dr,
@@ -1278,7 +1258,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Pyrethrin I}
+\subsection{Pyrethrin I}
\begin{verbatim}
<30,?3,@(3^35~wf,3^-35~zf)/_,
1*\,!!,iPr,2\*,//O,!,O,-36~zb,|,
@@ -1286,7 +1266,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Validamycin}
+\subsection{Validamycin}
\begin{verbatim}
<30,?6,@(5,6)/OH,3:/!OH>rl,
#4\,O,-60,|,?6,2:O,@(3,4,5)/OH,6:/!OH,
@@ -1294,7 +1274,7 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsection*{Paclitaxel}
+\subsection{Paclitaxel}
\begin{verbatim}
?6,5=d,3*,{,``1,36,45,45,45,45,},&#5,
-4=?6,-4=?4,-1=wb,-3=wf,-1:O,||,
@@ -1315,8 +1295,8 @@ F:mcf_man_soc;C:86;EN:Tocopherol;CAS:59-02-9
input mcf2graph.mf; % input macro
%-------------------------------------------------------------------------
sw_auxout:=1; % aux(information) file output on > Gloval setting
-font_wd#:=60mm#; % font width >
-font_ht#:=40mm#; % font height >
+font_wd:=60mm; % font width >
+font_ht:=40mm; % font height >
var3:="cal_MW"; tag3:="cMW"; > AUX file table
var4:="cal_FM"; tag4:="cFM"; >
%%%% sw_report:=1; > Report output
@@ -1377,6 +1357,21 @@ bye
\begin{verbatim}
>mpost -s ahangle=0 FILENAME (molecular definition file)
\end{verbatim}
+\paragraph{(Sourse)}
+\begin{verbatim}
+beginfont("EN:Ampicillin")(....)
+beginfont("EN:Cholesterol")(....)
+beginfont("EN:Limonin")(....)
+beginfont("EN:beta-Carotene")(....)
+beginfont("EN:Gibberellin A3")(....)
+\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";
+\end{verbatim}
\paragraph{(Output)}
\begin{verbatim}
(sw_auxfix=0)
@@ -1385,8 +1380,6 @@ 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_exa_soc;C:5;cMW:346.3742;cFM:C19H22O6;EN:Gibberellin A3
- .....................................................
- .....................................................
(sw_auxfix=1)
F;C;cMW;cFM;EN
@@ -1395,8 +1388,6 @@ 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
mcf_exa_soc;5;346.3742;C19H22O6;Gibberellin A3
- ......................................
- ......................................
(aux_delimiter:="/";)
F:mcf_man_soc/C:1/cMW:349.40462/cFM:C16H19N3O4S/EN:Ampicillin
@@ -1404,10 +1395,9 @@ 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_exa_soc/C:5/cMW:346.3742/cFM:C19H22O6/EN:Gibberellin A3
- .....................................................
- .....................................................
-
-( Tag )
+\end{verbatim}
+\paragraph{(Tag)}
+\begin{verbatim}
F : filename
C : char number
NO : serial number
@@ -1632,14 +1622,14 @@ endfont;
%--------------------------------------------------------------------
\begin{document}
\unitlength=1mm%
-\INFO{F:mcf_man_soc,C:115,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}%
-\INFO{F:mcf_man_soc,C:116,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}%
+\INFO{F:mcf_man_soc,C:134,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}%
+\INFO{F:mcf_man_soc,C:135,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}%
\end{document}
%--------------------------------------------------------------------
\end{verbatim}%
%############################################################################
%------------------------------------------------------------------------
-\INFO{F:mcf_man_soc,C:115,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}%
-\INFO{F:mcf_man_soc,C:116,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}%
+\INFO{F:mcf_man_soc,C:134,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}%
+\INFO{F:mcf_man_soc,C:135,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}%
%------------------------------------------------------------------------
\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
index fd3a89279af..0e7c39b25e2 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
index de5e711d39c..0fc11629046 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2017.03.05
+% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2017.03.26
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% mcf2graph.mf it must be version 4.11 or later
+%%% mcf2graph.mf it must be version 4.20 or later
\documentclass{article}
%------------------------------------------------------------------------------
\usepackage{luamplib}%
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
index 4fea2752498..3228dc57951 100644
--- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
+++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 4.11 Copyright (c) 2013-2017 Akira Yamaji
+% mcf2graph ver 4.20 Copyright (c) 2013-2017 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,
@@ -28,16 +28,18 @@
% Set outputformat to MDL Molfile : mpost -s ahangle=3 FILENAME
% Set make first font only : mpost -s ahlength=1 FILENAME
% Set output report : mpost -s ahlength=2 FILENAME
-% Set 'label' to use Metapost : mpost -s ahlength=3 FILENAME
+% Set to use metapost label,arrow : mpost -s ahlength=3 FILENAME
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tracingstats:=1;
-message " This is mcf2graph ver 4.1 2017.3";
+message " This is mcf2graph ver 4.2 2017.3";
%-------------------------------------------------------------------------------------------------
newinternal nA,nB,nC,nD,nE,nF,char_num,str_cnt,def_num,def_int,tbl_cnt;
numeric save_para[],comD[][],parD[][],cntD[],tbl_str_wd[],tbl_atom[],tbl_subst[][],tbl_atom_wt[],
tbl_atom_mi[],tbl_char_wd[],tbl_char_ht[],tbl_char_dp[];
string tbl_atom_str[],strD[],var[],tag[],mp_log_name,aux_delimiter;
picture atom_font[],str_font[],mol_stru[],save_pict;
+pen save_pen;
+path arrow_path,arrow_head;
%-------------------------------------------------------------------------------------------------
char_num:=str_cnt:=proc_end:=0;
sw_numberA:=sw_numberB:=sw_mol_frame:=sw_auxout:=sw_solid:=sw_expand:=sw_font_frame:=sw_clip:=0;
@@ -52,7 +54,7 @@ if (known green)and(known ahlength):
mp_log_name:=jobname&"-info.aux";
if ahlength=1: proc_end:=1; fi % first molecular only
if ahlength=2: sw_report:=1; def shipit = enddef; fi % report on
- if ahlength=3: sw_label:=1; fi % use metapost label
+ if ahlength=3: sw_label:=1; sw_arrow:=1; fi % use metapost label
if ahangle=0: def shipit = enddef; % No image file
elseif ahangle=1: outputformat:="png"; hppp:=vppp:=0.1; % PNG format
elseif ahangle=2: outputformat:="svg"; % SVG format
@@ -64,19 +66,20 @@ if (known green)and(known ahlength):
def printf expr s= write s to mp_log_name enddef;
def # = enddef;
def Cp(expr s) = if known s: if s<>0: withcolor color_list[s] fi fi enddef;
- def define_pixels(text s) = enddef;
if unknown sw_label: sw_label:=0; fi
+ if unknown sw_arrow: sw_arrow:=0; fi
else: f_MP:=0;
string defaultfont;
- sw_label:=0;
+ dotlabeldiam:=3bp;
def Cp(expr s) = enddef;
def color = transform enddef;
def printf expr s= message s enddef;
- sw_label:=0;
- def label = label_mf enddef;
+ %-----------------------------------------------------------------------
+ sw_label:=sw_arrow:=0;
+ dotlabeldiam:=3bp;
+ %-----------------------------------------------------------------------
mode_setup;
fi
-ahangle:=45; ahlength:=4;
clearit;
for i=0 upto 20: mol_stru[i]:=nullpicture; endfor
%--------------------------------------------------------------------------------------------------
@@ -87,19 +90,21 @@ margin_left_right:=margin_top_bottom:=0.4mm; ratio_bond_width:=0.1;
ratio_chain_ring:= 0.66; ratio_atom_bond:=0.36; ratio_thickness_bond:=0.015;
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:=0.050;
-offset_thickness#:=0.2pt#; offset_bond_gap#:=0.3pt#; offset_zebra_gap#:=0.1pt#;
-offset_atom#:=0.8pt#; offset_wedge#:=0.4pt#; thickness_font_frame#:=0.2pt#;
-max_bond_length#:=10mm; bond_len#:=8mm#;
-font_wd#:=30mm#; font_ht#:=20mm#;
+offset_thickness:=0.2pt; offset_bond_gap:=0.3pt; offset_zebra_gap:=0.1pt;
+offset_atom:=0.8pt; offset_wedge:=0.4pt; thickness_font_frame:=0.2pt;
+max_bond_length:=10mm; bond_len:=8mm;
+font_wd:=30mm; font_ht:=20mm;
%==================================================================================================
defaultfont:="uhvr8r"; % Helvetica
%%%%defaultfont:="ucrr8r"; % Courier
%%%%defaultfont:="ucrb8r"; % Courier bold
%%%%defaultfont:="utmr8r"; % Times
-defaultsize#:=8pt#;
-ext_defaultscale:=1;
+ahangle:=45;
+ahlength:=4bp;
+defaultsize:=8bp;
+ext_defaultline:=0.5bp;
+ext_defaultscale:=defaultscale:=1;
labeloffset:=3bp;
-define_pixels(defaultsize);
%==================================================================================================
def_emb_start:=500; % 500 => 2499 for embedded definition (max 2000)
def_usr_start:=2500; % 2500 => 2999 for user definition (max 500)
@@ -114,12 +119,12 @@ def_com(1)(si,dl,dr,db,dm,tm,wf,wb,bd,bz,zf,zb,dt,wv,nl,vf,vb,si_,wf_,wb_,bd_);
%--------------------------------------------------------------------------------------------------
def parameter_list=
sw_report,sw_numberA,sw_numberB,sw_mol_frame,sw_auxout,sw_solid,sw_expand,sw_MOLout,
- sw_atom_frame,sw_font_frame,sw_subst_off,sw_bond_single,sw_clip,sw_label,
+ sw_atom_frame,sw_font_frame,sw_subst_off,sw_bond_single,sw_clip,sw_label,sw_arrow,
margin_left_right,margin_top_bottom,ratio_atom_bond,ratio_thickness_bond,ratio_char_bond,
- ratio_chain_ring,max_bond_width,ratio_bondgap_bond,ratio_zebra_black,ratio_zebragap_bond,
- ratio_wedge_bond,ratio_atomgap_atom,ratio_bond_width,font_wd#,font_ht#,labeloffset,
- bond_len#,offset_atom#,offset_wedge#,max_bond_length#,offset_zebra_gap#,offset_bond_gap#,
- thickness_font_frame#,offset_thickness#,numberA_start,numberA_end,numberB_start,numberB_end
+ ratio_chain_ring,ratio_bondgap_bond,ratio_zebra_black,ratio_zebragap_bond,
+ ratio_wedge_bond,ratio_atomgap_atom,ratio_bond_width,font_wd,font_ht,labeloffset,
+ bond_len,offset_atom,offset_wedge,max_bond_length,offset_zebra_gap,offset_bond_gap,
+ thickness_font_frame,offset_thickness,numberA_start,numberA_end,numberB_start,numberB_end
enddef;
%--------------------------------------------------------------------------------------------------
vardef pic_c(expr i,s)= substring(i,i+1) of s enddef;
@@ -154,14 +159,14 @@ def endfont=
if ypart(posM[1][i])<nC: nC:=ypart(posM[1][i]); fi
if ypart(posM[2][i])>nD: nD:=ypart(posM[2][i]); fi
endfor
- font_wd#:=font_wd#*((nB-nA+2margin_left_right)/font_wd);
- font_ht#:=font_ht#*((nD-nC+2margin_top_bottom)/font_ht);
+ font_wd:=nB-nA+2margin_left_right;
+ font_ht:=nD-nC+2margin_top_bottom;
for i=1 upto cntM:
posM[0][i]:=posM[0][i]+(margin_left_right-nA,margin_top_bottom-nC);
endfor
fi
%-----------------------------------------------------------------------------------------------
- beginchar(char_num,font_wd#,font_ht#,0)
+ beginchar(char_num,font_wd/bp*bp#,font_ht/bp*bp#,0)
if (sw_font_frame=1)or(sw_font_frame=3): draw_frame((0,0),w,h,thickness_font_frame); fi
if (sw_font_frame=2)or(sw_font_frame=3):
nA:=w-2margin_left_right; nB:=h-2margin_top_bottom;
@@ -321,17 +326,28 @@ vardef @@(text t)(expr s)=
def_int %------- Retern value -------
enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-def EXT(text s)=
- begingroup
- save w,h,wd,ht,n,p,am,em,currentscale;
- pair p[];
+def ext_setup=
+ pickup pencircle scaled ext_defaultline;
+ dotlabeldiam:=3bp;
+ labeloffset:=3bp;
em=defaultscale*defaultsize;
- %-----------------------------------------------------------------------------------------------
currentscale:=defaultscale:=ext_defaultscale;
if sw_label=0:
- def label = label_mf enddef;
- use_font(defaultscale*defaultsize#)(0.12defaultscale*defaultsize#);
+ def label = label_emu enddef;
+ def dotlabel = dotlabel_emu enddef;
+ ext_use_font(defaultscale*defaultsize)(0.12defaultscale*defaultsize);
fi
+ if sw_arrow=0:
+ def drawarrow = drawarrow_emu enddef;
+ def drawdblarrow = drawdblarrow_emu enddef;
+ fi
+enddef;
+%--------------------------------------------------------------------------------------------------
+def EXT(text s)=
+ begingroup
+ save w,h,wd,ht,n,p,am,em,aw,currentscale;
+ pair p[];
+ ext_setup;
w:=font_wd;
h:=font_ht;
wd:=w-2margin_left_right;
@@ -346,17 +362,10 @@ enddef;
%--------------------------------------------------------------------------------------------------
def ext(text s)=
begingroup
- save wd,ht,n,l,p,sp,ep,am,em,A,B,currentscale;
+ save wd,ht,n,l,p,sp,ep,am,em,aw,A,B,currentscale;
numeric A[]bra,B[]ang;
pair p[],A[],B[],sp,ep;
- em=defaultscale*defaultsize;
- %---------------------------------------------------------------------
- currentscale:=defaultscale:=ext_defaultscale;
- if sw_label=0:
- def label = label_mf enddef;
- use_font(defaultscale*defaultsize#)(0.12defaultscale*defaultsize#);
- fi
- %---------------------------------------------------------------------
+ ext_setup;
wd:=mol_wd;
ht:=mol_ht;
l:=bond_len;
@@ -369,15 +378,17 @@ def ext(text s)=
s addto mol_stru[cntM] also currentpicture; clearit;
endgroup;
enddef;
-%--------------------------------------------------------------------------------------------------
-def use_font(expr WD)(expr PEN)=
+%==================================================================================================
+def ext_use_font(expr WD)(expr PEN)=
save_pict:=currentpicture; clearit;
+ save_pen:=currentpen;
for i=1 upto 128: f_char[i]:=1; endfor
proc_char_setup(str_font)(WD)(PEN);
currentpicture:=save_pict;
+ currentpen:=save_pen;
enddef;
%--------------------------------------------------------------------------------------------------
-def puts(expr PA)(expr STR)=
+def ext_puts(expr PA)(expr STR)=
begingroup
save cp;
pair cp;
@@ -389,22 +400,25 @@ def puts(expr PA)(expr STR)=
if nA=ASCII("_"): if nB=0: nB:=-.5; else: nB:=0; fi
elseif nA=ASCII("^"): if nB=0: nB:= .5; else: nB:=0; fi
else:
- addto currentpicture also str_font[nA] shifted (cp+(0,em*(nB-tbl_char_dp[nA])));
- cp:=cp+(em*tbl_char_wd[nA],0);
+ addto currentpicture also str_font[nA]
+ shifted (cp+(0,defaultscale*defaultsize*(nB-tbl_char_dp[nA])));
+ cp:=cp+(defaultscale*defaultsize*tbl_char_wd[nA],0);
fi
endfor
endgroup;
enddef;
%--------------------------------------------------------------------------------------------------
-vardef label_mf@#(expr STR,POS) =
+vardef label_emu@#(expr STR,POS) = %% modified 'thelabel@#(expr s,z)' of plain.mp
save oft,fx,fy,wds;
pair oft,oft.lft,oft.rt,oft.top,oft.bot,oft.ulft,oft.llft,oft.urt,oft.lrt;
wds:=0;
if currentscale<>defaultscale:
- use_font(defaultscale*defaultsize#)(0.12defaultscale*defaultsize#);
- currentscale:=defaultscale;
+ ext_use_font(defaultscale*defaultsize)(0.12defaultscale*defaultsize);
+ currentscale:=defaultscale;
fi
- for i=0 upto length(STR)-1: wds:=wds+em*tbl_char_wd[ASCII(pic_c(i,STR))]; endfor
+ for i=0 upto length(STR)-1:
+ wds:=wds+defaultscale*defaultsize*tbl_char_wd[ASCII(pic_c(i,STR))];
+ endfor
oft:= ( 0, 0); fx:=0.5; fy:=0.5;
oft.lft:= ( -1, 0); fx.lft:=1; fy.lft:=0.5;
oft.rt := ( 1, 0); fx.rt :=0; fy.rt :=0.5;
@@ -414,15 +428,41 @@ vardef label_mf@#(expr STR,POS) =
oft.urt:= ( .7, .7); fx.urt:=0; fy.urt:=0;
oft.llft:=(-.7,-.7); fx.llft:=1; fy.llft:=1;
oft.lrt:= ( .7,-.7); fx.lrt:=0; fy.lrt:=1;
- puts(POS+(labeloffset*oft@#)-(wds*fx@#,em*fy@#))(STR);
+ ext_puts(POS+(labeloffset*oft@#)-(wds*fx@#,defaultscale*defaultsize*fy@#))(STR);
enddef;
%-------------------------------------------------------------------------------------------------
-def draw_vector(expr POS,ROT,THICK,LEN)=
- fill (-2mm,-(.5THICK+.4mm))--(0,0)--(-2mm,.5THICK+.4mm)--(-2mm,.5THICK)--(-LEN,.5THICK)--
- (-LEN,-.5THICK)--(-2mm,-.5THICK)--cycle rotated ROT shifted POS;
+vardef dotlabel_emu@#(expr STR,POS)=
+ label_emu@#(STR,POS);
+ draw POS withpen pencircle scaled dotlabeldiam;
+enddef;
+%==================================================================================================
+def drawarrow_emu expr PAT = arrow_path:=PAT; draw_arrow enddef;
+%-------------------------------------------------------------------------------------------------
+def draw_arrow text t = %% modified 'drawarrow' of plain.mp
+ filldraw arrow_head rotated ahead_angle(reverse arrow_path)
+ shifted point infinity of arrow_path t;
+ draw arrow_path t
+enddef;
+%-------------------------------------------------------------------------------------------------
+def drawdblarrow_emu expr PAT = arrow_path:=PAT; draw_dblarrow enddef;
+%-------------------------------------------------------------------------------------------------
+def draw_dblarrow text t =
+ filldraw arrow_head rotated ahead_angle(arrow_path) shifted point 0 of arrow_path t;
+ filldraw arrow_head rotated ahead_angle(reverse arrow_path)
+ shifted point infinity of arrow_path t;
+ draw arrow_path t
+enddef;
+%-------------------------------------------------------------------------------------------------
+arrow_head:=(ahlength,-(sind 0.5ahangle)*ahlength)--(0,0)--
+ (ahlength, (sind 0.5ahangle)*ahlength)--cycle;
+%-------------------------------------------------------------------------------------------------
+def ahead_angle(expr p) =
+ angle direction .5ahlength/length(point 1 of p - point 0 of p) of p
enddef;
%=================================================================================================
-def MCf(text s)= MCd(1,1)(.5,.5)(s) enddef; % MC fill draw
+def MCa(expr FW,FH)(text s)= MCd(1,1)(FW,FH)(s) enddef;
+def MCc(expr RW,RH)(text s)= MCd(RW,RH)(0.5,0.5)(s) enddef;
+def MCf(text s)= MCd(1,1)(0.5,0.5)(s) enddef;
%-------------------------------------------------------------------------------------------------
def MCd(expr RW,RH)(expr FW,FH)(text TX)=
begingroup
@@ -450,23 +490,22 @@ def MCd(expr RW,RH)(expr FW,FH)(text TX)=
''(0)(TX,(_term,0));
proc_bond_atom(1);
if (cntP>0)and(sw_subst_off=0): ps_get(1); fi
- define_pixels(font_wd,font_ht,thickness_font_frame);
char_use_check;
- if sw_solid=1: bond_len#:=font_wd#*ratio_bond_width;
+ if sw_solid=1: bond_len:=font_wd*ratio_bond_width;
proc_size_setup; proc_skeleton; proc_scaling;
elseif sw_solid=2: proc_size_setup; proc_skeleton; proc_scaling;
else:
- bond_len#:=3mm#; proc_size_setup;
+ bond_len:=3mm; proc_size_setup;
for i=1 upto 6: proc_skeleton; proc_scaling;
if (mol_ht/mol_wd)>(font_ht/font_wd): factor:=(font_ht*RH-2margin_top_bottom)/mol_ht;
else: factor:=(font_wd*RW-2margin_left_right)/mol_wd; fi
exitif factor=1;
- bond_len#:=bond_len#*factor; proc_size_setup;
+ bond_len:=bond_len*factor; proc_size_setup;
endfor
- if bond_len#>max_bond_length#:
- bond_len#:=max_bond_length#; proc_size_setup; proc_skeleton; proc_scaling; fi
+ if bond_len>max_bond_length:
+ bond_len:=max_bond_length; proc_size_setup; proc_skeleton; proc_scaling; fi
fi
- proc_char_setup(atom_font)(atom_wd#)(bond_pen_wd#*ratio_char_bond);
+ proc_char_setup(atom_font)(atom_wd)(bond_pen_wd*ratio_char_bond);
%-----------------------------------------------------------------------------------------------
for i=1 upto cntB: if lineB[i]<si_ : draw_bond(i,sB[i],eB[i],angB[i],lineB[i]); fi endfor
for i=1 upto cntB: if lineB[i]>=si_: draw_bond(i,sB[i],eB[i],angB[i],lineB[i]); fi endfor
@@ -528,14 +567,13 @@ def draw_corner(expr LX,LY,PN)=
enddef;
%-------------------------------------------------------------------------------------------------
def proc_size_setup=
- if (bond_len#*ratio_atom_bond+offset_atom#)<.8bond_len#:
- atom_wd#:=bond_len#*ratio_atom_bond+offset_atom#;
- else: atom_wd#:=.8bond_len#; ratio_chain_ring:= .5; fi
- wedge_wd#:= bond_len#*ratio_wedge_bond+offset_wedge#;
- zebra_gap#:= bond_len#*ratio_zebragap_bond+offset_zebra_gap#;
- bondgap#:= bond_len#*ratio_bondgap_bond+offset_bond_gap#;
- bond_pen_wd#:= bond_len#*ratio_thickness_bond+offset_thickness#;
- define_pixels(bond_len,zebra_gap,wedge_wd,atom_wd,bondgap,bond_pen_wd);
+ if (bond_len*ratio_atom_bond+offset_atom)<.8bond_len:
+ atom_wd:=bond_len*ratio_atom_bond+offset_atom;
+ else: atom_wd:=.8bond_len; ratio_chain_ring:= .5; fi
+ wedge_wd:= bond_len*ratio_wedge_bond+offset_wedge;
+ zebra_gap:= bond_len*ratio_zebragap_bond+offset_zebra_gap;
+ bondgap:= bond_len*ratio_bondgap_bond+offset_bond_gap;
+ bond_pen_wd:= bond_len*ratio_thickness_bond+offset_thickness;
enddef;
%-------------------------------------------------------------------------------------------------
def proc_scaling=
@@ -839,10 +877,15 @@ lr:='(60 for i==1 upto 10:: ,-60,60 endfor); rl:='(-60,lr);
def ring expr n= <((-180 DIV n)-90),(_chg_len,0),
for i==2 upto n:: ,(360 DIV n) endfor,(_cyc_sB,1-n) enddef;
for i=3 upto 20: ?[i]:='({{,ring i,}}); endfor
-Ph:=Ph1:='(?6,(_dl,-2),(_dl,-4),(_dl,-6)); Ph2:='(?6,(_dl,-1),(_dl,-3),(_dl,-5));
-!:='((_mk_bond,_arg_ang)); !0:='(<180,180);
-!!:='(!,(_mb,db)); !!!:='(!,(_mb,tm));
-for i=1 upto 20: ![i]:='({{,(_get_len,0),! for j==2 upto i::,! endfor,}}); endfor
+Ph:=Ph1:='(?6,(_dl,-2),(_dl,-4),(_dl,-6));
+Ph2:='(?6,(_dl,-1),(_dl,-3),(_dl,-5));
+!:=!1:='((_mk_bond,_arg_ang));
+for i=2 upto 20:
+ ![i]:='({{,(_get_len,0),! for j==2 upto i::,! endfor,}});
+endfor
+!!:='(!,(_mb,db));
+!!!:='(!,(_mb,tm));
+!0:='(<180,180);
Me:='(); Et:=!; Pr:=!2; Bu:=!3;
for i=4,5,6: for j=2 upto i-2: ?[i][j]:='((_fuse,i),(j,0)); endfor endfor
for i=5,6,7,8: for j=11 upto 15: ?[i][j]:='((_fuse,i),(j,0)); endfor endfor
@@ -902,11 +945,10 @@ pair Z[];
%---------------------------------------------------------------
def FD(expr c)(text s)=
if f_char[ASCII(c)]=1:
- fP#:=PEN_WD;
- hP#:=0.5PEN_WD;
- aW#:=SIZE*tbl_char_wd[ASCII(c)]*(1-ratio_atomgap_atom*2);
- aH#:=SIZE*tbl_char_ht[ASCII(c)]*(1-ratio_atomgap_atom*2);
- define_pixels(fP,hP,aW,aH);
+ fP:=PEN_WD;
+ hP:=0.5PEN_WD;
+ aW:=SIZE*tbl_char_wd[ASCII(c)]*(1-ratio_atomgap_atom*2);
+ aH:=SIZE*tbl_char_ht[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); Z04:=(aW,hP); Z05:=(fW, 0); Z08:=( 0,hH);
Z09:=(hP,hH); Z10:=(fW,hH); Z12:=( 0,fH); Z13:=(hP,fH); Z14:=(hW,fH); Z16:=(aW,fH);
@@ -1225,3 +1267,4 @@ enddef;
%-------------------------------------------------------------------------------------------------
vardef fit_zero(expr n)=if n<=9: "00" elseif n<=99: "0" fi enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%