diff options
author | Karl Berry <karl@freefriends.org> | 2015-08-14 22:37:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-08-14 22:37:14 +0000 |
commit | b52c087654644bf3129e35c766b5359e86bd3356 (patch) | |
tree | 10c329604b12727d096a740983039a0e93531a46 /Master | |
parent | 4877d5e5d365e505f6ed41141c84481c19087d6c (diff) |
mcf2graph (14aug15)
git-svn-id: svn://tug.org/texlive/trunk@38124 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/README | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf | bin | 255342 -> 255269 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex | 74 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf | bin | 218676 -> 218677 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf | bin | 107480 -> 107401 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex | 61 | ||||
-rw-r--r-- | Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf | 77 | ||||
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 1 |
9 files changed, 103 insertions, 120 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README index bb51260b7db..c326baf4c98 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.55 / 2015-08-07 + version : 3.57 / 2015-08-14 E-mail : akira.yamaji5@gmail.com Located at : http://mirror.ctan.org/pkg/graphics/mcf2graph Home page : http://molecoding.cocolog-nifty.com/blog/ @@ -17,7 +17,7 @@ 2. The distribution of software ( 1) README This file - ( 2) mcf_graph.mf Macro of Metafont / Metapost + ( 2) mcf2graph.mf Macro of Metafont / Metapost ( 3) mcf_manual.tex MCF syntax manual(LaTeX file) ( 4) mcf_man_soc.mf Molecular difinition file for mcf_manual.tex ( 5) mcf_man_soc-032.eps No.32 EPS(with color) file of (4) @@ -59,8 +59,7 @@ ********************************************************** % insert part of info.aux file %------------------------------------------------------------------------- - \MOLinfo{EN:Acetamiprid}{:}{:}{:}{:}{:}{:}{:}{:}{:}{:}{:}% - \MCFinfo{MCF_SOC2}{0}{MCF_SOC2-000.eps}{419.14972}{145.32037}{159.04236}{12}{0}{}% + \INFO{{F:MCF_SOC2}{C:0}{EN:Acetamiprid}}% %------------------------------------------------------------------------- % or insert next line \input mcf_exa_soc-info.aux % filename of souce file : mcf_exa_soc.mf @@ -111,3 +110,4 @@ ver. 3.53 / 2015-07-29 support luamplib(LuaLaTeX) ver. 3.54 / 2015-08-03 maximum item number of MOLinfo can be changed ver. 3.55 / 2015-08-04 support luamplib(v2.11), renew mcf_mplib_exa.tex + ver. 3.57 / 2015-08-14 improve AUX file format 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 3c1e910592b..106785ec022 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf @@ -14,6 +14,8 @@ sw_numberB:=0; sw_expand:=0; sw_start_vector:=0; %%%%sw_checklist:=1; +%%%%sw_info_fm:=1; +%%%%sw_info_mw:=1; %%%%sw_MOLfile:=1; %********************************************************************** beginfont("EN:Acetamiprid") 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 00b3bc86ea2..1d401e46f4a 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 a9f6a37c336..71403126466 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.7 +% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2015.8.14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage{graphicx} @@ -12,68 +12,54 @@ \setlength\columnsep{8mm} %------------------------------------------------------------------------------- \makeatletter% -\newbox \@stringbox% +\newbox \@stringbox% \newcount \fontnum% \newcount \tnum% -\newcount \Cnt@xlen% -\newcount \Cnt@row% -\newcount \fontw% -\newdimen \font@dim% %------------------------------------------------------------------------------- \def\mol@sel#1{% - \if#1\empty\relax\else% - \edef\@first{\expandafter\@first@param#1;}% - \edef\@second{\expandafter\@second@param#1;}% - \ifx\@first\@EN@ \edef\MOLnameE{\@second}\fi% - \ifx\@first\@JN@ \edef\MOLnameJ{\@second}\fi% - \ifx\@first\@NO@ \edef\MOLnumber{\@second}\fi% - \ifx\@first\@CAS@ \edef\MOLcas{\@second}\fi% - \ifx\@first\@MW@ \edef\MOLmw{\@second}\fi% - \ifx\@first\@FM@ \edef\MOLfomura{\@second}\fi% - \ifx\@first\@USE@ \edef\MOLuse{\@second}\fi% - \ifx\@first\@XLogP@ \edef\MOLXLogP{\@second}\fi% - \ifx\@first\@EXA@ \edef\MOLextA{\@second}\fi% - \ifx\@first\@EXB@ \edef\MOLextB{\@second}\fi% - \fi% -}% +\if#1\empty\relax\else% + \edef\@fst{\expandafter\@fst@param#1;}% + \edef\@sec{\expandafter\@sec@param#1;}% + \ifx\@fst\@F\edef\MOLfile{\@sec}\fi \ifx\@fst\@C\edef\MOLchar{\@sec}\fi% + \ifx\@fst\@Lx\edef\MOLlenx{\@sec}\fi \ifx\@fst\@Ly\edef\MOLleny{\@sec}\fi% + \ifx\@fst\@EN\edef\MOLnameE{\@sec}\fi \ifx\@fst\@JN\edef\MOLnameJ{\@sec}\fi% + \ifx\@fst\@CAS\edef\MOLcas{\@sec}\fi \ifx\@fst\@MW\edef\MOLmw{\@sec}\fi% + \ifx\@fst\@FM\edef\MOLfomura{\@sec}\fi \ifx\@fst\@USE\edef\MOLuse{\@sec}\fi% + \ifx\@fst\@logP\edef\MOLlogP{\@sec}\fi \ifx\@fst\@EXA\edef\MOLextA{\@sec}\fi% + \ifx\@fst\@EXB\edef\MOLextB{\@sec}\fi \ifx\@fst\@NO\edef\MOLnum{\@sec}\fi\fi}% +%------------------------------------------------------------------------------- +\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@JN{JN}\def\@CAS{CAS}\def\@MW{MW}% +\def\@FM{FM}\def\@Lx{Lx}\def\@Ly{Ly}\def\@NO{NO}% +\def\@USE@{USE}\def\@logP@{logP}\def\@EXA@{EXA}\def\@EXB@{EXB}% %------------------------------------------------------------------------------- -\def\@first@param#1:#2;{#1}\def\@second@param#1:#2;{#2}% -\def\@EN@{EN}\def\@JN@{JN}\def\@CAS@{CAS}\def\@NO@{NO}\def\@MW@{MW}\def\@FM@{FM}% -\def\@USE@{USE}\def\@XLogP@{XLogP}\def\@EXA@{EXA}\def\@EXB@{EXB}% -\def\MOL@info@aux#1#2#3{\mol@sel{#1}\mol@sel{#2}\mol@sel{#3}}% -\def\MOLinfo#1#2#3#4#5#6#7#8#9{% - \edef\MOLnameE{}\edef\MOLnameJ{}\edef\MOLnumber{}\edef\MOLcas{}\edef\MOLmw{}% - \edef\MOLfomura{}\edef\MOLuse{}\edef\MOLXLogP{}\edef\MOLextA{}\edef\MOLextB{}% - \mol@sel{#1}\mol@sel{#2}\mol@sel{#3}\mol@sel{#4}\mol@sel{#5}\mol@sel{#6}% - \mol@sel{#7}\mol@sel{#8}\mol@sel{#9}\MOL@info@aux}% -%-------------------------------------------------------------------------------- +\def\@fst@param#1:#2;{#1}\def\@sec@param#1:#2;{#2}% \def\@stru#1[#2]{\font\@strufont=#1\relax\hbox{\@strufont\char#2}}% -\def\MCFinfo#1#2#3#4#5#6#7#8#9{% +%------------------------------------------------------------------------------- +\def\put@char{% \unitlength=0.01mm\relax \@tempcnta=3200\relax \@tempcntb=3800\relax% \begin{picture}(\@tempcntb,\@tempcnta)% \advance\@tempcnta -300\relax% \put(20,\@tempcnta){\tiny\bf [\the\fontnum] \MOLnameE}% -%--------------------------------------------------------------------------- -% for METAFONT - \put( 0,0){\makebox(\@tempcntb,\@tempcnta){\@stru{#1}[#2]}}% -%%%% for METAPOST -%%%% \put( 0,0){\makebox(\@tempcntb,\@tempcnta){\includegraphics{#3}}}% -%--------------------------------------------------------------------------- + \put( 0,0){\makebox(\@tempcntb,\@tempcnta){\@stru{\MOLfile}[\MOLchar]}}% \end{picture}% \advance\fontnum\@ne\relax\advance\tnum\@ne\relax% \ifnum\tnum=5 \\ \tnum=0\relax \fi% - }% +} +%------------------------------------------------------------------------------- +\def\INFO#1{% + \edef\MOLnameE{}% + \@tfor\@temp:=#1\do{\mol@sel{\@temp}}% + \put@char% +}% +%------------------------------------------------------------------------------- \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} {\hspace{20mm} \LARGE\bf Molecular Coding Format examples \hspace{10mm} }% -{\footnotesize\bf by Akira Yamaji 2015.8.3} \vspace{5mm}\\ +{\footnotesize\bf by Akira Yamaji 2015.8.14} \vspace{5mm}\\ \fontnum=1% \noindent% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%% Copy & Paste here from log-file %%%%%%%%%%%%%%% -%%%%%%%%% or \input 'filename'-info.log %%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% \input 'filename'-info.log %------------------------------------------------------------------------ \input mcf_exa_soc-info.aux %------------------------------------------------------------------------ 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 bd1d98404b8..825bb62d07c 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_mplib_exa.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf Binary files differindex 57a4d837976..2247082795e 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/doc/metapost/mcf2graph/mcf_mplib_exa.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex index fdce25becf4..fdcc5d97980 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex @@ -1,47 +1,46 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2015.8.7 +% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2015.8.14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass{article} %------------------------------------------------------------------------------- \usepackage{luamplib}% \mplibcodeinherit{enable}% \mplibverbatim{enable}% -\everymplib{if unknown Ph1: input mcf2graph.mf; sw_logout:=1;% +\everymplib{if unknown Ph1: input mcf2graph.mf; sw_logout:=1; sw_info_lenx:=1;% mp_log_name:="temp-info.aux"; fi}% \everyendmplib{write EOF to mp_log_name;}% %------------------------------------------------------------------------------- \makeatletter% \newdimen \MOLwidth% %------------------------------------------------------------------------------- +\def\@fst@param#1:#2;{#1}\def\@sec@param#1:#2;{#2}% \def\mol@sel#1{% - \if#1\empty\relax\else% - \edef\@first{\expandafter\@first@param#1;}% - \edef\@second{\expandafter\@second@param#1;}% - \ifx\@first\@EN@ \edef\MOLnameE{\@second}\fi% - \ifx\@first\@JN@ \edef\MOLnameJ{\@second}\fi% - \ifx\@first\@NO@ \edef\MOLnumber{\@second}\fi% - \ifx\@first\@CAS@ \edef\MOLcas{\@second}\fi% - \ifx\@first\@MW@ \edef\MOLmw{\@second}\fi% - \ifx\@first\@FM@ \edef\MOLfomura{\@second}\fi% - \ifx\@first\@USE@ \edef\MOLuse{\@second}\fi% - \ifx\@first\@XLogP@ \edef\MOLXLogP{\@second}\fi% - \ifx\@first\@EXA@ \edef\MOLextA{\@second}\fi% - \ifx\@first\@EXB@ \edef\MOLextB{\@second}\fi\fi}% +\if#1\empty\relax\else% + \edef\@fst{\expandafter\@fst@param#1;}% + \edef\@sec{\expandafter\@sec@param#1;}% + \ifx\@fst\@F\edef\MOLfile{\@sec}\fi \ifx\@fst\@C\edef\MOLchar{\@sec}\fi% + \ifx\@fst\@Lx\edef\MOLlenx{\@sec}\fi \ifx\@fst\@Ly\edef\MOLleny{\@sec}\fi% + \ifx\@fst\@EN\edef\MOLnameE{\@sec}\fi \ifx\@fst\@JN\edef\MOLnameJ{\@sec}\fi% + \ifx\@fst\@CAS\edef\MOLcas{\@sec}\fi \ifx\@fst\@MW\edef\MOLmw{\@sec}\fi% + \ifx\@fst\@FM\edef\MOLfomura{\@sec}\fi \ifx\@fst\@USE\edef\MOLuse{\@sec}\fi% + \ifx\@fst\@logP\edef\MOLlogP{\@sec}\fi \ifx\@fst\@EXA\edef\MOLextA{\@sec}\fi% + \ifx\@fst\@EXB\edef\MOLextB{\@sec}\fi \ifx\@fst\@NO\edef\MOLnum{\@sec}\fi\fi}% %------------------------------------------------------------------------------- -\def\@first@param#1:#2;{#1}\def\@second@param#1:#2;{#2}% -\def\@EN@{EN}\def\@JN@{JN}\def\@CAS@{CAS}\def\@NO@{NO}\def\@MW@{MW}\def\@FM@{FM}% -\def\@USE@{USE}\def\@XLogP@{XLogP}\def\@EXA@{EXA}\def\@EXB@{EXB}% -\def\MOL@info@aux#1#2#3{\mol@sel{#1}\mol@sel{#2}\mol@sel{#3}}% -\def\MOLinfo#1#2#3#4#5#6#7#8#9{% %%%% max item number = 12 %%%% - \edef\MOLnameE{}\edef\MOLnameJ{}\edef\MOLnumber{}\edef\MOLcas{}\edef\MOLmw{}% - \edef\MOLfomura{}\edef\MOLuse{}\edef\MOLXLogP{}\edef\MOLextA{}\edef\MOLextB{}% - \mol@sel{#1}\mol@sel{#2}\mol@sel{#3}\mol@sel{#4}\mol@sel{#5}\mol@sel{#6}% - \mol@sel{#7}\mol@sel{#8}\mol@sel{#9}\MOL@info@aux}% +\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@JN{JN}\def\@CAS{CAS}\def\@MW{MW}% +\def\@FM{FM}\def\@Lx{Lx}\def\@Ly{Ly}\def\@NO{NO}\def\@USE@{USE}\def\@logP@{logP}% +\def\@EXA@{EXA}\def\@EXB@{EXB}% +%------------------------------------------------------------------------------- +\newdimen\MOLwidth% +\def\INFO#1{% + \edef\MOLnum{}\edef\MOLnameE{}\edef\MOLlenx{}\edef\MOLmw{}% + \@tfor\@temp:=#1\do{\mol@sel{\@temp}} +}% %-------------------------------------------------------------------------------- -\def\MCFinfo#1#2#3#4#5#6#7#8#9{\MOLwidth#4pt\relax}% -\def\MOLcaption#1#2{\input temp-info.aux\relax\advance\MOLwidth -#1\relax% +\def\MOLcaption#1#2{\input temp-info.aux\relax % +\MOLwidth=\MOLlenx pt% +\advance\MOLwidth -#1\relax% \llap{\makebox[\MOLwidth][l]{\raisebox{#2}% -{\sf NO.\MOLnumber{ }\MOLnameE{ }\tiny (MW:\MOLmw)}}}}% +{\sf NO.\MOLnum{ }\MOLnameE{ }\tiny (MW:\MOLmw)}}}}% \makeatother% %------------------------------------------------------------------------------------ \pagestyle{empty} @@ -53,7 +52,7 @@ %------------------------------------------------------------------------------------ \begin{document} {\LARGE MCF example for luamplib(LuaLaTeX) }% - \hspace{20mm}by Akira Yamaji 2015.8.7\vspace{8mm}\\ + \hspace{20mm}by Akira Yamaji 2015.8.14\vspace{8mm}\\ %------------------------------------------------------------------------------------ \begin{mplibcode} font_wd:=100mm; font_ht:=50mm; @@ -101,8 +100,8 @@ \begin{mplibcode} font_wd:=50mm; font_ht:=40mm; beginfont("NO:4","EN:Gibberellin","MW:346.37"); - MCf( - ^^12,?6`1.3,3=??5,9=??7,12\^160`1.6,&8, + MCf(^^12, + ?6`1.3,3=??5,9=??7,12\^160`1.6,&8, 4\^155~zf`-1.2,O,55,//O^180`1,&2~zb, 3=dr,11=wf,13=wb,7:/COOH,11://Me,1:*/OH,12:/*OH,2:*/Me, @(3^-60,9^60)*/H @@ -158,7 +157,7 @@ endfont; @(5,7,15,16,23,24,32,40,41,48,49,58,59,72,73,82,83,90,91,99, 100,107,113,114,122,123,130,131,140,141,148,149)O, @(1^60,2,26,28,29,51,54,61,63,68,75^60,78,109)*/OH, - @(11,20,35,45,52,55,65,69,86)/*OH,@(^^60,47,57,71)/*H, + @(11,20,35,45,52,55,65,69,86)/*OH,@(47,57,71)/*H^60, @(3,8,13,17,21,33,38,42,56,70,84,92,101,106,111,128,138,142,146,150)/*H^-60, @(4,14,22,34,39,43,81,89,98,102,116,121,125,129,133)*/H^60, @(6,46,50,53,60,67,74)*/H^-60, diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf index c1862e2cb2b..b7a841c9ca2 100644 --- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf +++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf @@ -1,6 +1,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 3.55 Copyright (c) 2013-2015 Akira Yamaji -% +% mcf2graph ver 3.57 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, % including without limitation the rights to use, copy, modify, merge, publish, distribute, @@ -44,6 +44,7 @@ picture atom_font[],chem_structure,temp_picture; %------------------------------------------------------------------------------------------------- sw_numberA:=sw_numberB:=sw_frame:=sw_logout:=sw_solid:=sw_expand:=sw_start_vector:=0; sw_atom_frame:=sw_checklist:=sw_MOLfile:=char_num:=str_cnt:=size_changed:=proc_end:=0; +sw_info_file:=sw_info_char:=1; sw_info_lenx:=sw_info_leny:=sw_info_mw:=sw_info_fm:=0; if known green: f_MP:=1; mp_log_name:=jobname&"-info.aux"; if ahlength=1: proc_end:=1; fi % first molecular only @@ -85,27 +86,25 @@ 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_frame,sw_logout,sw_solid,sw_expand, sw_MOLfile,sw_start_vector,sw_atom_frame,lr_margin,tb_margin,ratio_atom_bond,ratio_thickness_bond, ratio_cr,offset_atom,max_bond_width,ratio_pen_wd,ratio_bondgap_bond,ratio_zebra_black, - ratio_zebra_gap,ratio_wedge_bond,font_gap,offset_zebra_gap,offset_gap,offset_thick -enddef; + ratio_zebra_gap,ratio_wedge_bond,font_gap,offset_zebra_gap,offset_gap,offset_thick enddef; %------------------------------------------------------------------------------------------------- nA:=0; for list=parameter_list: st_p[incr nA]:=list; endfor def store_par(text t)= nA:=0; for list=t: if st_p[incr nA]<>list: st_p[nA]:=list; fi endfor enddef; 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:=""; len_x:=len_y:=cntA:=0; +def beginfont(text s)= mol_name:=""; len_x:=len_y:=cntA:=info_num:=0; store_par(parameter_list); ratio_bond_width:=1mm#/font_wd#; - for i:=1 upto 12: if info[i]<>":": info[i]:=":"; fi endfor - for list=s: cntA:=cntA+1; info[cntA]:=list; - if substring (0,2) of list="EN": - mol_name:=substring (3,length(list)) of list; fi exitif cntA=11; endfor - beginchar(char_num,font_wd#,font_ht#,0); clearit; -enddef; + 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 endfor + beginchar(char_num,font_wd#,font_ht#,0); clearit; enddef; %------------------------------------------------------------------------------------------------- def endfont= if sw_frame=1: AUX(draw_frame(len_x,len_y,(min_x,min_y),0.2pt);) fi - if sw_start_vector=1: AUX(start_vector) fi if sw_logout=1: logfile_out; fi - if sw_checklist=1: mol_check; checklist_out; fi if sw_MOLfile=1: mol_check; MOL_out; fi + if sw_start_vector=1: AUX(start_vector) fi + if sw_checklist=1: mol_check; checklist_out; fi + if sw_MOLfile=1: mol_check; MOL_out; fi + if sw_logout=1: logfile_out; fi char_num:=char_num+1; currentpicture:=chem_structure; chem_structure:=nullpicture; restore_par(parameter_list); if size_changed=1: font_wd#:=stock_wd#; font_ht#:=stock_ht#; size_changed:=0; fi @@ -121,8 +120,7 @@ def size_setup= BL# := font_wd#*ratio_bond_width; pen_wd# := ratio_thickness_bond*BL#+offset_thick#; Apen_wd# := ratio_pen_wd*pen_wd#; define_pixels(BL,zebra_gap,wedge_wd,AL,gap,pen_wd,Apen_wd,font_wd,font_ht); - font_size_setup; -enddef; + font_size_setup; enddef; %------------------------------------------------------------------------------------------------- def scaling= min_x:=min_y:= 4095.999; max_x:=max_y:=-4095.999; for i=1 upto cntA: xpos:=xpart(posA[i]); ypos:=ypart(posA[i]); @@ -148,16 +146,14 @@ 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 - ratio_bond_width:=ratio_bond_width*factor; len_x:=len_x*factor; len_y:=len_y*factor; -enddef; + ratio_bond_width:=ratio_bond_width*factor; len_x:=len_x*factor; len_y:=len_y*factor; enddef; %------------------------------------------------------------------------------------------------- for i=1 upto 128: f_FON[i]=0; endfor asc0:=ASCII("0"); asc9:=ASCII("9"); def font_use_check= for i=1 upto 128: if f_FON[i]<>0: f_FON[i]:=0; fi endfor if (sw_numberA=1)or(sw_numberB=1): for j=asc0 upto asc9: f_FON[j]:=1; endfor else: for i=1 upto cntA: if strA[i]<>0: for j=0 upto length(com_str[strA[i]])-1: - f_FON[ASCII(pic_c(j,com_str[strA[i]]))]:=1; endfor fi endfor fi -enddef; + f_FON[ASCII(pic_c(j,com_str[strA[i]]))]:=1; endfor fi endfor fi enddef; %------------------------------------------------------------------------------------------------- vardef '(text s)= ''(incr mc_num)(s); mc_num enddef; def set_def_MC= @@ -198,16 +194,14 @@ enddef; %------------------------------------------------------------------------------------------------- def !?(expr a)(expr b)(expr c) = PB(_jp_bond,a) PB(_get_len,a) PB(_push,c) PB(_chg_len,_ring_len) for i==1 upto b-2:: PB(_mk_bond,360 DIV b) endfor PB(_pop,c) - if a>=1:: PB(_cyc_eB,0) elseif a<=0:: PB(_cyc_eB,a-b+2) else:: PB(_cyc_eB,a) fi -enddef; + if a>=1:: PB(_cyc_eB,0) elseif a<=0:: PB(_cyc_eB,a-b+2) else:: PB(_cyc_eB,a) fi enddef; %------------------------------------------------------------------------------------------------- def !!?(expr a)(expr b)(expr c)(expr n) = PB(_jp_bond,xpart(a)) PB(_push,n) if b==6:: PB(_chg_len,0) for i==1 upto c-1:: PB(_mk_bond,60) endfor elseif b==5:: if c==2:: PB(_chg_len,1.25) PB(_mk_bond,80) elseif c==3:: PB(_chg_len,1.1) PB(_mk_bond,78) PB(_mk_bond,72) fi elseif b==4:: PB(_chg_len,1.225) PB(_mk_bond,105) fi - PB(_pop,n) if ypart(a)<=0:: PB(_cyc_eB,ypart(a)-c+1) else:: PB(_cyc_eB,ypart(a)) fi -enddef; + PB(_pop,n) if ypart(a)<=0:: PB(_cyc_eB,ypart(a)-c+1) else:: PB(_cyc_eB,ypart(a)) fi enddef; %------------------------------------------------------------------------------------------------- def PB(expr b,c)= comMC[ab_num][incr cntBS]:=b; parMC[ab_num][cntBS]:=c; enddef; def $$(text t)(expr e) = begingroup save cntBS; cntBS:=0; ab_num:=ab_num+1; @@ -269,8 +263,7 @@ def ps_get(expr n)= cntC:=cntMC[0]; cntPS:=cntP; for j=1 upto cntMC[ps_com[i]]: PS(comMC[ps_com[i]][j],parMC[ps_com[i]][j]) endfor PS(_pop,1) PS(_term,0) endfor - proc_atom(cntC+1); if cntP>cntPS: ps_get(cntPS+1); fi -enddef; + proc_atom(cntC+1); if cntP>cntPS: ps_get(cntPS+1); fi enddef; %------------------------------------------------------------------------------------------------- def AUX(text s)=s addto chem_structure also currentpicture shifted(sft_X,sft_Y); clearit; enddef; def MCf(text s)= MCd(1,1)(.5,.5)(s); enddef; @@ -302,8 +295,7 @@ def draw_frame(expr LX,LY,PS,PN)= draw unitsquare xscaled LX yscaled LY shifted PS wpcs PN; enddef; def start_vector= draw (posA[1] shifted (-1mm,0))--(posA[1] shifted (-4mm,0)) withpen penrazor rotated 90 scaled .8mm; - fill (posA[1] shifted (-2mm,-1mm))--posA[1]--(posA[1] shifted (-2mm,1mm))--cycle; -enddef; + fill (posA[1] shifted (-2mm,-1mm))--posA[1]--(posA[1] shifted (-2mm,1mm))--cycle; enddef; %------------------------------------------------------------------------------------------------ def proc_atom(expr n)= f_Br:=f_En:=f_T:=rotT:=adrS:=f_lineT:=f_rotT:=f_lenT:=f_envT:=envT:=env:=0; @@ -356,15 +348,13 @@ enddef; def ps_put(expr n,p)= ps_adr[incr cntP]:=n; ps_com[cntP]:=p; ps_len[cntP]:=lenT; ps_line[cntP]:=lineT; ps_rot[cntP]:=rotT; ps_env[cntP]:=envT; if f_lineT=0: lineT:=si; fi if f_lenT=0: lenT:=ratio_cr; fi - if f_rotT=0: rotT:=0; fi if f_envT=0: envT:=hz; fi -enddef; + if f_rotT=0: rotT:=0; fi if f_envT=0: envT:=hz; fi enddef; %------------------------------------------------------------------------------------------------- def add_atom= lineB[incr cntB]:=lineT; lineT:=si; if lenT=ratio_cr: lenB[cntB]:=B_len; else: lenB[cntB]:=lenT; lenT:=ratio_cr; fi if f_Br=0: cntA:=cntA+1; sB[cntB]:=cntA; strA[cntA]:=strAT; strAT:=0; if f_MP=1: colorA[cntA]:=colorB[cntA]:=0; fi else: f_Br:=0; fi - if f_En=0: eB[cntB]:=cntA+1; f_T:=0; else: eB[cntB]:=f_En; f_En:=0; f_T:=1; fi -enddef; + if f_En=0: eB[cntB]:=cntA+1; f_T:=0; else: eB[cntB]:=f_En; f_En:=0; f_T:=1; fi enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def proc_skelton= stkA[1]:=stkB[1]:=1; envT:=env:=f_lineT:=f_rotT:=f_lenT:=f_envT:=0; adrA:=adrB:=cntA:=cntB:=angT:=adrS:=f_En:=f_Br:=rotT:=f_T:=0; @@ -461,8 +451,7 @@ def clipping(expr SA,SB,PA,PB,LEN)= pT:=PA--PB; tn:=0.6AL/LEN; elseif SB=0: Ls:= cut_off(pT,AL*strW[SA],AL,PA); Le:=PB; pA:=Ls--Le; pB:=tn[PA,PB]--Le; pC:=Ls--(0.1)[PB,PA]; else: Ls:=cut_off(pT,AL*strW[SA],AL,PA); Le:=cut_off(pT,AL*strW[SB],AL,PB); - pB:=tn[PA,PB]--tn[PB,PA]; pC:=pA:=Ls--Le; fi -enddef; + pB:=tn[PA,PB]--tn[PB,PA]; pC:=pA:=Ls--Le; fi enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def draw_wv= nB:=3pen_wd; nA:=nB/length(Le-Ls); draw Le for i=1 upto 1/nA: if odd(i): ..controls(((i-.5)*nA)[sfB(Le,nB,ap),sfB(Ls,nB,ap)]) @@ -494,11 +483,15 @@ if (nC>0)and(LN<>0): ww:=wedge_wd; hpt:=.5pen_wd; ap:=ANG+90; am:=ANG-90; enddef; %------------------------------------------------------------------------------------------------- vardef fit_zero(expr n)=if n<=9: "00" elseif n<=99: "0" fi enddef; +def info_c(expr sw,c,cc)= if sw=1: &"{"&c&":"&cc&"}" fi enddef; +def info_n(expr sw,c,n)= if sw=1: &"{"&c&":"&decimal(n)&"}" fi enddef; def logfile_out= - printf "%"; - printf "\MOLinfo" for i=1 upto max_info_num: &"{"&info[i]&"}" endfor &"%"; - printf "\MCFinfo{"&jobname&"}{"&decimal(char_num)&"}{"&mp_filename&"}{"&decimal(len_x) - &"}{"&decimal(len_y)&"}{"&decimal(ratio_bond_width)&"}{"&decimal(cntA)&"}{}{}%"; enddef; + printf "\INFO{" + info_c(sw_info_file,"F",jobname) info_n(sw_info_char,"C",char_num) + info_n(sw_info_lenx,"Lx",len_x) info_n(sw_info_leny,"Ly",len_y) + info_n(sw_info_mw,"Mw",Mol_wt) info_c(sw_info_fm,"Fm",fomula_str) + for i=1 upto info_num: &"{"&info[i]&"}" endfor &"}%"; +enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% mc_num:=first_def_number; lr:='(60 for i==1 upto 10:: ,-60,60 endfor); rl:='(-60,lr); @@ -564,7 +557,7 @@ if f_FON[ASCII(c)]=1: 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); - clearxy; save x,y; clearit; fi enddef; + clearxy; save x,y; clearit; fi enddef; %------------------------------------------------------------------------------------------------- def font_setup= pickup pencircle scaled Apen_wd; fP:=Apen_wd; hP:=.5Apen_wd; FD(" ")(); @@ -663,7 +656,7 @@ def STa(expr a,b)= tblA[incr tbl_cnt]:=a; tblN[tbl_cnt]:=0; wtA[tbl_cnt]:=b; end def STb(expr a)(text s)= tblA[incr tbl_cnt]:=a; tblN[tbl_cnt]:=0; for list=s: tblN[tbl_cnt]:=tblN[tbl_cnt]+1; for j=1 upto tbl_max: if list=tblA[j]: tblB[tbl_cnt][tblN[tbl_cnt]]:=j; fi endfor - endfor enddef; + endfor enddef; %------------------------------------------------------------------------------------------------- tbl_cnt:=0; STa("C",12.0107); STa("H",1.00794); STa("{Al}",26.9815); STa("{As}",74.9236); STa("B",10.811); @@ -696,7 +689,8 @@ def mol_check= hide_H:=warning_cnt:=0; for i=1 upto tbl_max: sumA[i]:=0; endfor knownA:=1; fi endfor if knownA=0: warning(" Unknown Str("&com_str[strA[i]]&") is used "&decimal(i)); fi endfor - sumA[2]:=sumA[2]+hide_H; enddef; + sumA[2]:=sumA[2]+hide_H; +enddef; %------------------------------------------------------------------------------------------------- def checklist_out= Mol_wt:=Mol_wtp:=nA:=0; fomula_str:=""; message "% There were "&fdr(3)(warning_cnt)&" warnings"; @@ -724,7 +718,8 @@ def checklist_out= Mol_wt:=Mol_wtp:=nA:=0; fomula_str:=""; if Mol_wtp<=40: &fdr(10)(Mol_wt); else: &fdr(10)(Mol_wtp)&" * 100"; fi message "% --------------------------------------"; message "% Molecular Fomula: "&fomula_str; - message "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"; enddef; + message "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"; +enddef; %------------------------------------------------------------------------------------------------ def MOL_out= mp_log_name:=jobname&"-"&fit_zero(char_num)&decimal(char_num)&"-"&mol_name&".mol"; printf ""; printf " -MCFtoMOL- "&fixed_l(20)(info[1]); printf ""; diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 38dcec84eec..8cd85ac55b4 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -349,6 +349,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`); 'dtxtut', "&setup", # straight copy 'duplicat', "die 'skipping, use piff'", 'dutchcal', "&MAKEcopy", + 'e-french', "&MAKEflatten", 'easy', "&MAKEeasy", 'easylatex', "die 'skipping, complicated perl modules, sorry'", 'ean13isbn', "&MAKEcopy", |