diff options
Diffstat (limited to 'Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex')
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex | 111 |
1 files changed, 63 insertions, 48 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex index a3468a88fc1..d9636c5d350 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.01.29 +% Molecular Coding Format manual by Akira Yamaji 2017.02.13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} %%%%\usepackage{graphicx} @@ -927,27 +927,28 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\ \newpage \subsection{Function EXT()} \begin{verbatim} -(Extra graphic to font) +(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 + em: embedded font size p0: x=margin_left_right y=margin_top_bottom n: molecular number p[m]: molecular origin position - (1<=m<=molecular count) -(Function) - puts(pos)(string): - put string at pos - use_font(wd#): - make string font for puts() - (font width = wd#) - draw_vector(pos,angle,length): +(Function for EXT(),ext()) + draw_vector(pos,angle,thickness,length): draw vector at pos + use_font(wd#): + make font for 'label' + label: + sw_label_mp=0: ** default + use embedded font + sw_label_mp=1: + use original metapost 'label' - %---------------------------------- beginfont() sw_font_frame:=3; %---------------------------------- @@ -957,20 +958,19 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\ (<30,?6,$(3,6)dl,@(2,5)//O) %---------------------------------- EXT( - draw ((0,0)--(25mm,0)--(21mm,2mm)) - shifted (0.3w,0.52h); - draw ((4mm,-2mm)--(0,0)--(25mm,0)) - shifted (0.3w,0.48h) - draw fullcircle scaled 3mm - shifted p0; - drawdot p1 - withpen pencircle scaled 2mm; - drawdot p2 - withpen pensquare scaled 2mm; - %---------------------------------- - use_font(5pt#); - puts((0.4w,0.6h))("Oxidation"); - puts((0.4w,0.35h))("Reduction"); + draw_vector((0.7w,0.48h), 0,0.2mm,0.4w): + draw_vector((0.3w,0.52h),180,0.2mm,0.4w): + drawdot p0 withpen pencircle scaled 3pt; + drawdot p1 withpen pencircle scaled 3pt; + drawdot p2 withpen pencircle scaled 3pt; + %---------------------------------- + label.bot("p0",p0); + label.bot("p1",p1); + label.bot("p2",p2); + label("Ox",(0.5w,0.6h)); + label("Red",(0.5w,0.4h)); + use_font(6pt#); % **defalt 5pt# + label("Reaction example",(0.5w,0.8h)); ) %---------------------------------- endfont @@ -980,31 +980,33 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\ \newpage \subsection{Function ext()} \begin{verbatim} -(Extra graphic to molecule) - wd: molecular width - ht: molecular height - p0: origin of molecular structure - n: atom number - l: bond length - p[m]: atom position of A[m] - a[m]: branch angle of A[m] - (1<=m<=atom count) +(Add extra graphic to molecule) + wd: molecular width + ht: molecular height + 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() - %------------------------------- + %---------------------------------- MCd(1,0.9)(0.1,0.5)(<30,Ph,3:/F,4:/Cl) ext( - drawdot p0 withpen pencircle scaled 2mm; - draw p0--(p0+(wd,0))--(p0+(wd,ht)); + drawdot p0 withpen pencircle scaled 3pt; + drawdot A6 withpen pencircle scaled 3pt; + drawdot B3 withpen pencircle scaled 3pt; + label.bot("p0",p0); + label.ulft("A6",A6); + label.rt("B3",B3); ) - %------------------------------- + %---------------------------------- MCd(1,0.9)(0.9,0.5)(<30,Ph,3:/F,4:/Cl) - ext( - draw_vector(p6,a6-180,l); - drawdot p0 withpen pensquare scaled 2mm; - draw p0--(p0+(wd,0))--(p0+(wd,ht)); - ) - %------------------------------- + ext(draw p0--(p0+(wd,0))--(p0+(wd,ht));) + %---------------------------------- endfont \end{verbatim} \MCFstructure @@ -1036,16 +1038,20 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\ \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"; @@ -1063,13 +1069,22 @@ beginfont("EN:Tocopherol","CAS:59-02-9") 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 ............................................ -*F:filename *C:char number EN:molecular name -CAS:CAS number *:default output +1* F:filename +2* C:char number +3 EN:molecular name +4 CAS:CAS number + +*:default output + \end{verbatim} \MCFstructure %----------------------------------------------------------------------------- |