[sage-devel] Re: partial success: notebook latex, adding \usepackage, using tikz

2009-04-24 Thread John H Palmieri

On Apr 16, 3:25 pm, John H Palmieri jhpalmier...@gmail.com wrote:
 On Apr 16, 2:31 pm, mabshoff mabsh...@googlemail.com wrote:



  On Apr 16, 1:41 pm, gerhard ge01...@yahoo.de wrote:

  Hi,

   This started out in grading notebooks, but does not really belong
   there.
   -
   I am happy to report the functionality to modify
   the latex header for notebook output is already present in sage:

   sage:  import sage.misc.latex as l

   sage:  l.LATEX_HEADER+='\\def \\pgfsysdriver {pgfsys-dvips.def}\n
 \\usepackage{tikz\n
 \\usetikzlibrary
   {shapes,fit,positioning}\n'
   sage:  print 'LATEX_HEADER\n', l.LATEX_HEADER

   does work as expected.

  Yes, but I would not call the above construct elegant, so having
  something cleaner and more accessible for the average user would be
  nice. John Palmieri posted a patch to trac, so hopefully it will be
  reviewed soon.

 Well, I *hope* to post a patch to trac soon, but I haven't actually
 done it yet.

   John

Try this out:

  http://trac.sagemath.org/sage_trac/ticket/5791

and see the pictures at

  http://sage.math.washington.edu/home/palmieri/misc/foobar.png
  http://sage.math.washington.edu/home/palmieri/misc/ext.png

I haven't tried it with tikz, by the way.

John

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: partial success: notebook latex, adding \usepackage, using tikz

2009-04-16 Thread John H Palmieri

On Apr 16, 1:41 pm, gerhard ge01...@yahoo.de wrote:
 This started out in grading notebooks, but does not really belong
 there.
 -
 I am happy to report the functionality to modify
 the latex header for notebook output is already present in sage:

     sage:  import sage.misc.latex as l

     sage:  l.LATEX_HEADER+='\\def \\pgfsysdriver {pgfsys-dvips.def}\n
                                               \\usepackage{tikz\n
                                               \\usetikzlibrary
 {shapes,fit,positioning}\n'
     sage:  print 'LATEX_HEADER\n', l.LATEX_HEADER

 does work as expected.
 Next, a cell with the following text:

    %latex
       \begin{tikzpicture}[=stealth]
       \draw[red,rotate=10,scale=.5,ultra thick] (0.375,0) ellipse
 (1.125 and 2.0945);
       \end{tikzpicture}
       oh?

 will produce an ellipse with the string oh? to the left.
 Without oh?, however, I get not output at all???

 -puzzled

I have no idea, but you could try %latex_debug instead of %latex to
get some more information about what's going on.

  John

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: partial success: notebook latex, adding \usepackage, using tikz

2009-04-16 Thread mabshoff



On Apr 16, 1:41 pm, gerhard ge01...@yahoo.de wrote:

Hi,

 This started out in grading notebooks, but does not really belong
 there.
 -
 I am happy to report the functionality to modify
 the latex header for notebook output is already present in sage:

     sage:  import sage.misc.latex as l

     sage:  l.LATEX_HEADER+='\\def \\pgfsysdriver {pgfsys-dvips.def}\n
                                               \\usepackage{tikz\n
                                               \\usetikzlibrary
 {shapes,fit,positioning}\n'
     sage:  print 'LATEX_HEADER\n', l.LATEX_HEADER

 does work as expected.

Yes, but I would not call the above construct elegant, so having
something cleaner and more accessible for the average user would be
nice. John Palmieri posted a patch to trac, so hopefully it will be
reviewed soon.

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: partial success: notebook latex, adding \usepackage, using tikz

2009-04-16 Thread John H Palmieri

On Apr 16, 2:31 pm, mabshoff mabsh...@googlemail.com wrote:
 On Apr 16, 1:41 pm, gerhard ge01...@yahoo.de wrote:

 Hi,

  This started out in grading notebooks, but does not really belong
  there.
  -
  I am happy to report the functionality to modify
  the latex header for notebook output is already present in sage:

      sage:  import sage.misc.latex as l

      sage:  l.LATEX_HEADER+='\\def \\pgfsysdriver {pgfsys-dvips.def}\n
                                                \\usepackage{tikz\n
                                                \\usetikzlibrary
  {shapes,fit,positioning}\n'
      sage:  print 'LATEX_HEADER\n', l.LATEX_HEADER

  does work as expected.

 Yes, but I would not call the above construct elegant, so having
 something cleaner and more accessible for the average user would be
 nice. John Palmieri posted a patch to trac, so hopefully it will be
 reviewed soon.

Well, I *hope* to post a patch to trac soon, but I haven't actually
done it yet.

  John

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---