Humm.. I thought I fixed it when I review texim code.. I guess not! maybe you can do : eval exec cd $tmp \; $tex... this way, it will 'cd' inside the tex process.. humm.. wrong, it happens if the 'cd' is inside a script... so maybe have a script.. then you'll need a .bat for windows.. argh, no sorry, no 'real' idea! but it might be a good lead!
KKRT On Mon, Jul 24, 2006 at 01:40:03PM -0700, [EMAIL PROTECTED] wrote: > Revision: 7078 > Author: billiob > Date: 2006-07-24 13:39:54 -0700 (Mon, 24 Jul 2006) > ViewCVS: http://svn.sourceforge.net/amsn/?rev=7078&view=rev > > Log Message: > ----------- > small update to try to remove the effect of bugs caused by the use of cd. If > someone has a clue for it, tell me. > > Modified Paths: > -------------- > trunk/amsn-extras/plugins/TeXIM/TeXIM.tcl > trunk/amsn-extras/plugins/TeXIM/datas/other.xml > trunk/amsn-extras/plugins/TeXIM/plugininfo.xml > Modified: trunk/amsn-extras/plugins/TeXIM/TeXIM.tcl > =================================================================== > --- trunk/amsn-extras/plugins/TeXIM/TeXIM.tcl 2006-07-24 20:16:50 UTC (rev > 7077) > +++ trunk/amsn-extras/plugins/TeXIM/TeXIM.tcl 2006-07-24 20:39:54 UTC (rev > 7078) > @@ -185,13 +185,13 @@ > > set oldpwd [pwd] > if { [info exists ::env(TEMP) ] } { > - cd [file join $::env(TEMP) TeXIM] > + set tmp [file join $::env(TEMP) TeXIM] > } else { > - cd [file join /tmp TeXIM] > + set tmp [file join /tmp TeXIM] > } > > plugins_log "TeXIM" "creating a GIF with the tex > code:\n$texText" > - set fileXMLtex [open "TeXIM.tex" w] > + set fileXMLtex [open [file join $tmp "TeXIM.tex"] w] > puts $fileXMLtex "${::TeXIM::config(header)}" > if { [file exists $::TeXIM::config(path_preamble) ] } { > set chan_pre [open $::TeXIM::config(path_preamble) r] > @@ -205,39 +205,34 @@ > puts $fileXMLtex "${::TeXIM::config(footer)}" > flush $fileXMLtex > close $fileXMLtex > - > + #the following "cd" are needed due to a restriction of TeX :( > + #no way to use TEXMFOUTPUT on windows for example. > + cd $tmp > if { [ catch { exec ${::TeXIM::config(path_latex)} > -interaction=nonstopmode TeXIM.tex } msg ] == 0 } { > + cd $oldpwd > variable tex_errors > set tex_errors $msg > - if { [file exists TeXIM.dvi ] } { > - if { [ catch { exec > ${::TeXIM::config(path_dvips)} -f -E -o TeXIM.ps -q TeXIM.dvi } msg ] == 0 } > { > - if { [info exists ::env(TEMP) ] } { > - catch {file delete [file join > $::env(TEMP) TeXIM "TeXIM.dvi"]} > - } else { > - catch {file delete [file join > /tmp TeXIM "TeXIM.dvi"]} > - } > + if { [file exists [file join $tmp TeXIM.dvi] ] } { > + if { [ catch { exec > ${::TeXIM::config(path_dvips)} -f -E -o [file join $tmp TeXIM.ps] -q [file > join $tmp TeXIM.dvi] } msg ] == 0 } { > + catch {file delete [file join $tmp > "TeXIM.dvi"]} > if { [ catch { exec > ${::TeXIM::config(path_convert)} -density ${::TeXIM::config(resolution)} \ > - TeXIM.ps TeXIM.gif } > msg ] == 0 } { > - set tmp [image create photo > -file TeXIM.gif] > - if {[image height $tmp] > 1000} > { > + [file join $tmp > TeXIM.ps] [file join $tmp TeXIM.gif] } msg ] == 0 } { > + set tempimg [image create photo > -file [file join $tmp TeXIM.gif]] > + if {[image height $tempimg] > > 1000} { > set bool > [::TeXIM::show_bug_dialog $tex_errors] > if { $bool == 0 } { > - image delete > $tmp > + image delete > $tempimg > return 0 > } > } > - image delete $tmp > - if { [info exists ::env(TEMP) ] > } { > - catch {file delete > [file join $::env(TEMP) TeXIM "TeXIM.dvi"]} > - return [file join > $::env(TEMP) TeXIM "TeXIM.gif"] > - } else { > - catch {file delete [file join > /tmp TeXIM "TeXIM.dvi"]} > - return [file join /tmp TeXIM > "TeXIM.gif"] > - } > + image delete $tempimg > + catch {file delete [file join > $tmp "TeXIM.dvi"]} > + return [file join $tmp > "TeXIM.gif"] > } else { append msg "\n^^Error in > CONVERT" } > } else { append msg "\n^^Error in DVIPS" } > } > } else { append msg "\n^^Error in LATEX" } > + cd $oldpwd > plugins_log "TeXIM" $msg > return 0 > } > > Modified: trunk/amsn-extras/plugins/TeXIM/datas/other.xml > =================================================================== > --- trunk/amsn-extras/plugins/TeXIM/datas/other.xml 2006-07-24 20:16:50 UTC > (rev 7077) > +++ trunk/amsn-extras/plugins/TeXIM/datas/other.xml 2006-07-24 20:39:54 UTC > (rev 7078) > @@ -1,13 +1,13 @@ > <PART> > <item> > - <tex>$$$\left[ \begin{array}{cc} a & b \\ c & d \end{array} > \right]$$$</tex> > + <tex>$$\left[ \begin{array}{cc} a & b \\ c & d \end{array} > \right]$$</tex> > <img>ex_det</img> > </item><item> > - <tex>$$$\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & > 0 & 1\\ \end{array} \right)$$$</tex> > + <tex>$$\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & > 0 & 1\\ \end{array} \right)$$</tex> > <img>ex_mat</img> > </item> > <item> > - <tex>$$$ {\mathcal A} = \left( \begin{array}{cccc} a_{11} & > a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & > \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \\ \end{array} > \right)$$$</tex> > + <tex>$$ {\mathcal A} = \left( \begin{array}{cccc} a_{11} & > a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & > \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \\ \end{array} > \right)$$</tex> > <img>ex_mat2</img> > </item> > <item> > @@ -15,7 +15,7 @@ > <img>ex_sum</img> > </item> > <item> > - <tex>$$$\begin{eqnarray*}\int_2^3 x \, dx & = & \left[ > \frac{x^2}{2} \right]_2^3 \\ & = & \frac{3^2}{2} - \frac{2^2}{2} \\ & = & > \frac{9}{2} - \frac{4}{2} \\ & = & \frac{5}{2} \end{eqnarray*}$$$</tex> > + <tex>\begin{eqnarray*}\int_2^3 x \, dx & = & \left[ > \frac{x^2}{2} \right]_2^3 \\ & = & \frac{3^2}{2} - \frac{2^2}{2} \\ & = & > \frac{9}{2} - \frac{4}{2} \\ & = & \frac{5}{2} \end{eqnarray*}</tex> > <img>ex_equations</img> > </item> > -</PART> > \ No newline at end of file > +</PART> > > Modified: trunk/amsn-extras/plugins/TeXIM/plugininfo.xml > =================================================================== > --- trunk/amsn-extras/plugins/TeXIM/plugininfo.xml 2006-07-24 20:16:50 UTC > (rev 7077) > +++ trunk/amsn-extras/plugins/TeXIM/plugininfo.xml 2006-07-24 20:39:54 UTC > (rev 7078) > @@ -4,12 +4,12 @@ > <author>Andrei Barbu & Boris FAURE</author> > <description>Renders LaTeX if it's prepended by \tex or by using the > TeX Advanced Window</description> > <amsn_version>0.95</amsn_version> > - <plugin_version>0.7</plugin_version> > + <plugin_version>0.8</plugin_version> > <plugin_file>TeXIM.tcl</plugin_file> > <plugin_namespace>TeXIM</plugin_namespace> > <init_procedure>Init</init_procedure> > <deinit_procedure>DeInit</deinit_procedure> > - <cvs_version>1.16</cvs_version> > + <cvs_version>7078</cvs_version> > > <file> > <path>datas/greek_letters.xml</path> > @@ -33,7 +33,7 @@ > </file> > <file> > <path>datas/other.xml</path> > - <version>1.1</version> > + <version>7078</version> > </file> > <file> > <path>datas/spaces.xml</path> > > > This was sent by the SourceForge.net collaborative development platform, the > world's largest Open Source development site. > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Amsn-commits mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/amsn-commits ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Amsn-devel mailing list Amsn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amsn-devel