id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,work_issues,upstream,reviewer,author,merged,dependencies,stopgaps
11315,remove pstricks from default latex preamble,saliola,"jason, was","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.",defect,closed,major,sage-4.7.1,graphics,fixed,"latex, days30",jhpalmieri,,N/A,John Palmieri,Franco Saliola,sage-4.7.1.alpha1,,
