#11315: remove pstricks from default latex preamble
------------------------+---------------------------------------------------
   Reporter:  saliola   |          Owner:  jason, was    
       Type:  defect    |         Status:  new           
   Priority:  major     |      Milestone:  sage-4.7.1    
  Component:  graphics  |       Keywords:  latex         
Work_issues:            |       Upstream:  N/A           
   Reviewer:            |         Author:  Franco Saliola
     Merged:            |   Dependencies:                
------------------------+---------------------------------------------------
 At Sage Days 30 we noticed some problems with trying to ``view`` a
 graph using pdflatex on Mac OS X. It seems to be related to having
 pstricks loaded as part of the default latex preamble:
 {{{
    ! LaTeX Error: You have run the document with pdflatex, but PSTricks
                   requires latex->dvips->ps2pdf or alternatively the use
                   of the package `auto-pst-pdf'. Then you can run
                     `pdflatex -shell-escape <file>' (TeX Live)
                   or
                     `pdflatex -enable-write18 <file>' (MikTeX).

    See the LaTeX manual or LaTeX Companion for explanation.
    Type  H <return>  for immediate help.
     ...

    l.3 \begin{document}

    ?
 }}}

 If you have a Mac, you can test this on the following minimal example.
 (I have the latest version of MacTeX installed.)
 {{{
    \documentclass{article}
    \usepackage{pstricks}
    \begin{document}
    \begin{center}{\Large\bf SAGE}\end{center}
    \end{document}
 }}}

 This causes the following example to fail:
 {{{
    sage: g = sage.misc.latex.latex_examples.graph()
    sage: latex.add_to_preamble(r"\usepackage{tkz-graph}")
    sage: view(g, pdflatex=True, tightpage=True)
    ...
    Latex error
 }}}

 But it works if we remove pstricks from LATEX_HEADER:
 {{{
    sage: LATEX_HEADER = sage.misc.latex.LATEX_HEADER
    sage: sage.misc.latex.LATEX_HEADER =
 LATEX_HEADER.replace(r"\usepackage{pstricks}","")
    sage: view(g, pdflatex=True, tightpage=True)
 }}}

 So, we should remove pstricks from the default
 latex preamble.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11315>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to