On 9/23/07, Ted Kosan <[EMAIL PROTECTED]> wrote: > > William wrote: > > > Here's an example that does it: > > > > {{{ > > a = matrix(QQ,2,range(4))^(-1); a > > /// > > [-3/2 1/2] > > [ 1 0] > > }}} > > > > {{{ > > %latex > > $$\sage{a}$$ > > }}} > > Hmmm, this code produced the following error ( I am using 2.8.4.1).
What operating system (linux distro, etc.) exactly? Unfortunately the log below doesn't contain anything that helps me figure out that problem. Do you have dvipng installed on your computer (it's *not* there by default in Ubuntu, even if you install latex)? What happens if you try this (from the sage command prompt): sage: !dvipng This is dvipng 1.9 Copyright 2002-2006 Jan-Ake Larsson Usage: dvipng [OPTION]... FILENAME[.dvi] Another temporary option for you in the meantime is that you could just do latex(your math object) to see what the latex repr is, then paste that it into a big latex file and run latex on it. And if none of that works, here's a complete function that turns an object into png -- it requires dvipng though: def png(obj): open("tmp.tex","w").write(""" \\documentclass[12pt]{article} \\thispagestyle{empty}\LARGE \\begin{document} $$%s$$ \\end{document}"""%latex(obj)) os.system("latex tmp.tex >/dev/null") os.system('dvipng tmp.dvi >/dev/null') os.system('rm *.aux *.log *.tex *.dvi') -- William > > Ted > > -------- > > An error occured. > This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5) (format=latex > 2007.2.3) 23 SEP 2007 17:15 > entering extended mode > **\nonstopmode \input{sage36.tex} > (./sage36.tex (/usr/share/texmf/tex/latex/base/article.cls > Document Class: article 2004/02/16 v1.4f Standard LaTeX document class > (/usr/share/texmf/tex/latex/base/size10.clo > File: size10.clo 2004/02/16 v1.4f Standard LaTeX file (size option) > ) > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > \abovecaptionskip=\skip41 > \belowcaptionskip=\skip42 > \bibindent=\dimen102 > ) > (/usr/share/texmf/tex/latex/preprint/fullpage.sty > Package: fullpage 1999/02/23 1.1 (PWD) > [EMAIL PROTECTED] > ) > (/usr/share/texmf/tex/latex/amsmath/amsmath.sty > Package: amsmath 2000/07/18 v2.13 AMS math features > [EMAIL PROTECTED] > > For additional information on amsmath, use the `?' option. > (/usr/share/texmf/tex/latex/amsmath/amstext.sty > Package: amstext 2000/06/29 v2.01 > > (/usr/share/texmf/tex/latex/amsmath/amsgen.sty > File: amsgen.sty 1999/11/30 v2.0 > [EMAIL PROTECTED] > [EMAIL PROTECTED] > )) > (/usr/share/texmf/tex/latex/amsmath/amsbsy.sty > Package: amsbsy 1999/11/29 v1.2d > [EMAIL PROTECTED] > ) > (/usr/share/texmf/tex/latex/amsmath/amsopn.sty > Package: amsopn 1999/12/14 v2.01 operator names > ) > [EMAIL PROTECTED] > LaTeX Info: Redefining \frac on input line 211. > [EMAIL PROTECTED] > [EMAIL PROTECTED] > LaTeX Info: Redefining \overline on input line 307. > [EMAIL PROTECTED] > [EMAIL PROTECTED] > LaTeX Info: Redefining \ldots on input line 379. > LaTeX Info: Redefining \dots on input line 382. > LaTeX Info: Redefining \cdots on input line 467. > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > LaTeX Font Info: Redeclaring font encoding OML on input line 567. > LaTeX Font Info: Redeclaring font encoding OMS on input line 568. > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > \multlinegap=\skip45 > \multlinetaggap=\skip46 > [EMAIL PROTECTED] > LaTeX Info: Redefining \[ on input line 2666. > LaTeX Info: Redefining \] on input line 2667. > ) > (/usr/share/texmf/tex/latex/amsfonts/amssymb.sty > Package: amssymb 2002/01/22 v2.2d > > (/usr/share/texmf/tex/latex/amsfonts/amsfonts.sty > Package: amsfonts 2001/10/25 v2.2f > \symAMSa=\mathgroup4 > \symAMSb=\mathgroup5 > LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version > `bold' > (Font) U/euf/m/n --> U/euf/b/n on input line 132. > )) > (/usr/share/texmf/tex/latex/graphics/graphicx.sty > Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR) > > (/usr/share/texmf/tex/latex/graphics/keyval.sty > Package: keyval 1999/03/16 v1.13 key=value parser (DPC) > [EMAIL PROTECTED]@=\toks19 > ) > (/usr/share/texmf/tex/latex/graphics/graphics.sty > Package: graphics 2001/07/07 v1.0n Standard LaTeX Graphics (DPC,SPQR) > > (/usr/share/texmf/tex/latex/graphics/trig.sty > Package: trig 1999/03/16 v1.09 sin cos tan (DPC) > ) > (/usr/share/texmf/tex/latex/graphics/graphics.cfg > File: graphics.cfg 2005/02/03 v1.3 graphics configuration of > teTeX/TeXLive > ) > Package graphics Info: Driver file: dvips.def on input line 80. > > (/usr/share/texmf/tex/latex/graphics/dvips.def > File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR) > )) > [EMAIL PROTECTED]@height=\dimen112 > [EMAIL PROTECTED]@width=\dimen113 > ) > (/usr/share/texmf/tex/latex/pstricks/pstricks.sty > Package: pstricks 2004/05/12 v0.2l LaTeX wrapper for `PSTricks' (RN,HV) > > (/usr/share/texmf/tex/generic/pstricks/pstricks.tex > `PSTricks' v1.04 <2004/06/22> (tvz) > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > (/usr/share/texmf/tex/generic/pstricks/pstricks.con) > \psunit=\dimen120 > \psxunit=\dimen121 > \psyunit=\dimen122 > \pslinewidth=\dimen123 > [EMAIL PROTECTED] > \pslinearc=\dimen124 > \everypsbox=\toks22 > \psframesep=\dimen125 > \pslabelsep=\dimen126 > \theoverlaybox=\box30 > ) > File: pstricks.tex 2004/06/22 v1.04 `PSTricks' (tvz) > > (/usr/share/texmf/tex/latex/xcolor/xcolor.sty > Package: xcolor 2004/07/04 v2.00 LaTeX color extensions (UK) > > (/usr/share/texmf/tex/latex/graphics/color.cfg > File: color.cfg 2005/02/03 v1.3 color configuration of teTeX/TeXLive > ) > Package xcolor Info: Package option `override' ignored on input line > 128. > Package xcolor Info: Driver file: dvips.def on input line 136. > Package xcolor Info: Color model `cmy' added on input line 972. > Package xcolor Info: Color model `HTML' added on input line 1000. > Package xcolor Info: Color model `HSB' added on input line 1006. > Package xcolor Info: Color model `Gray' added on input line 1012. > )) > No file sage36.aux. > \openout1 = `sage36.aux'. > > LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4. > LaTeX Font Info: ... okay on input line 4. > LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4. > LaTeX Font Info: ... okay on input line 4. > LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4. > LaTeX Font Info: ... okay on input line 4. > LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4. > LaTeX Font Info: ... okay on input line 4. > LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4. > LaTeX Font Info: ... okay on input line 4. > LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4. > LaTeX Font Info: ... okay on input line 4. > LaTeX Font Info: Try loading font information for U+msa on input line > 5. > (/usr/share/texmf/tex/latex/amsfonts/umsa.fd > File: umsa.fd 2002/01/19 v2.2g AMS font definitions > ) > LaTeX Font Info: Try loading font information for U+msb on input line > 5. > > (/usr/share/texmf/tex/latex/amsfonts/umsb.fd > File: umsb.fd 2002/01/19 v2.2g AMS font definitions > ) [1 > > ] (./sage36.aux) ) > Here is how much of TeX's memory you used: > 2575 strings out of 94433 > 28828 string characters out of 1175590 > 93061 words of memory out of 1000000 > 5798 multiletter control sequences out of 10000+50000 > 5339 words of font info for 22 fonts, out of 500000 for 2000 > 580 hyphenation exceptions out of 1000 > 30i,7n,40p,284b,112s stack positions out of > 1500i,500n,5000p,200000b,5000s > > Output written on sage36.dvi (1 page, 904 bytes). > > Error latexing slide. > > An error occured. > This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5) > (format=latex 2007.2.3) 23 SEP 2007 17:15 > entering extended mode > **\nonstopmode \input{sage36.tex} > (./sage36.tex (/usr/share/texmf/tex/latex/base/article.cls > Document Class: article 2004/02/16 v1.4f Standard LaTeX document class > (/usr/share/texmf/tex/latex/base/size10.clo > File: size10.clo 2004/02/16 v1.4f Standard LaTeX file (size option) > ) > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > \abovecaptionskip=\skip41 > \belowcaptionskip=\skip42 > \bibindent=\dimen102 > ) > (/usr/share/texmf/tex/latex/preprint/fullpage.sty > Package: fullpage 1999/02/23 1.1 (PWD) > [EMAIL PROTECTED] > ) > (/usr/share/texmf/tex/latex/amsmath/amsmath.sty > Package: amsmath 2000/07/18 v2.13 AMS math features > [EMAIL PROTECTED] > > For additional information on amsmath, use the `?' option. > (/usr/share/texmf/tex/latex/amsmath/amstext.sty > Package: amstext 2000/06/29 v2.01 > > (/usr/share/texmf/tex/latex/amsmath/amsgen.sty > File: amsgen.sty 1999/11/30 v2.0 > [EMAIL PROTECTED] > [EMAIL PROTECTED] > )) > (/usr/share/texmf/tex/latex/amsmath/amsbsy.sty > Package: amsbsy 1999/11/29 v1.2d > [EMAIL PROTECTED] > ) > (/usr/share/texmf/tex/latex/amsmath/amsopn.sty > Package: amsopn 1999/12/14 v2.01 operator names > ) > [EMAIL PROTECTED] > LaTeX Info: Redefining \frac on input line 211. > [EMAIL PROTECTED] > [EMAIL PROTECTED] > LaTeX Info: Redefining \overline on input line 307. > [EMAIL PROTECTED] > [EMAIL PROTECTED] > LaTeX Info: Redefining \ldots on input line 379. > LaTeX Info: Redefining \dots on input line 382. > LaTeX Info: Redefining \cdots on input line 467. > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > LaTeX Font Info: Redeclaring font encoding OML on input line 567. > LaTeX Font Info: Redeclaring font encoding OMS on input line 568. > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > \multlinegap=\skip45 > \multlinetaggap=\skip46 > [EMAIL PROTECTED] > LaTeX Info: Redefining \[ on input line 2666. > LaTeX Info: Redefining \] on input line 2667. > ) > (/usr/share/texmf/tex/latex/amsfonts/amssymb.sty > Package: amssymb 2002/01/22 v2.2d > > (/usr/share/texmf/tex/latex/amsfonts/amsfonts.sty > Package: amsfonts 2001/10/25 v2.2f > \symAMSa=\mathgroup4 > \symAMSb=\mathgroup5 > LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold' > (Font) U/euf/m/n --> U/euf/b/n on input line 132. > )) > (/usr/share/texmf/tex/latex/graphics/graphicx.sty > Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR) > > (/usr/share/texmf/tex/latex/graphics/keyval.sty > Package: keyval 1999/03/16 v1.13 key=value parser (DPC) > [EMAIL PROTECTED]@=\toks19 > ) > (/usr/share/texmf/tex/latex/graphics/graphics.sty > Package: graphics 2001/07/07 v1.0n Standard LaTeX Graphics (DPC,SPQR) > > (/usr/share/texmf/tex/latex/graphics/trig.sty > Package: trig 1999/03/16 v1.09 sin cos tan (DPC) > ) > (/usr/share/texmf/tex/latex/graphics/graphics.cfg > File: graphics.cfg 2005/02/03 v1.3 graphics configuration of teTeX/TeXLive > ) > Package graphics Info: Driver file: dvips.def on input line 80. > > (/usr/share/texmf/tex/latex/graphics/dvips.def > File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR) > )) > [EMAIL PROTECTED]@height=\dimen112 > [EMAIL PROTECTED]@width=\dimen113 > ) > (/usr/share/texmf/tex/latex/pstricks/pstricks.sty > Package: pstricks 2004/05/12 v0.2l LaTeX wrapper for `PSTricks' (RN,HV) > > (/usr/share/texmf/tex/generic/pstricks/pstricks.tex > `PSTricks' v1.04 <2004/06/22> (tvz) > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > (/usr/share/texmf/tex/generic/pstricks/pstricks.con) > \psunit=\dimen120 > \psxunit=\dimen121 > \psyunit=\dimen122 > \pslinewidth=\dimen123 > [EMAIL PROTECTED] > \pslinearc=\dimen124 > \everypsbox=\toks22 > \psframesep=\dimen125 > \pslabelsep=\dimen126 > \theoverlaybox=\box30 > ) > File: pstricks.tex 2004/06/22 v1.04 `PSTricks' (tvz) > > (/usr/share/texmf/tex/latex/xcolor/xcolor.sty > Package: xcolor 2004/07/04 v2.00 LaTeX color extensions (UK) > > (/usr/share/texmf/tex/latex/graphics/color.cfg > File: color.cfg 2005/02/03 v1.3 color configuration of teTeX/TeXLive > ) > Package xcolor Info: Package option `override' ignored on input line 128. > Package xcolor Info: Driver file: dvips.def on input line 136. > Package xcolor Info: Color model `cmy' added on input line 972. > Package xcolor Info: Color model `HTML' added on input line 1000. > Package xcolor Info: Color model `HSB' added on input line 1006. > Package xcolor Info: Color model `Gray' added on input line 1012. > )) > No file sage36.aux. > \openout1 = `sage36.aux'. > > LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4. > LaTeX Font Info: ... okay on input line 4. > LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4. > LaTeX Font Info: ... okay on input line 4. > LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4. > LaTeX Font Info: ... okay on input line 4. > LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4. > LaTeX Font Info: ... okay on input line 4. > LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4. > LaTeX Font Info: ... okay on input line 4. > LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4. > LaTeX Font Info: ... okay on input line 4. > LaTeX Font Info: Try loading font information for U+msa on input line 5. > (/usr/share/texmf/tex/latex/amsfonts/umsa.fd > File: umsa.fd 2002/01/19 v2.2g AMS font definitions > ) > LaTeX Font Info: Try loading font information for U+msb on input line 5. > > (/usr/share/texmf/tex/latex/amsfonts/umsb.fd > File: umsb.fd 2002/01/19 v2.2g AMS font definitions > ) [1 > > ] (./sage36.aux) ) > Here is how much of TeX's memory you used: > 2575 strings out of 94433 > 28828 string characters out of 1175590 > 93061 words of memory out of 1000000 > 5798 multiletter control sequences out of 10000+50000 > 5339 words of font info for 22 fonts, out of 500000 for 2000 > 580 hyphenation exceptions out of 1000 > 30i,7n,40p,284b,112s stack positions out of 1500i,500n,5000p,200000b,5000s > > Output written on sage36.dvi (1 page, 904 bytes). > > Error latexing slide. > > sage36.aux sage36.dvi sage36.log sage36.tex > > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---