Ticket #13713: trac_13713-examples-jhp.patch

File trac_13713-examples-jhp.patch, 2.9 KB (added by jhpalmieri, 6 years ago)
  • sage/misc/latex.py

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1364927480 25200
    # Node ID a148d376110bddb11b20b19af6eebae5875d5106
    # Parent  a746135c76dc7ea94e97d10d3e073a1625c313ca
    use engine 'pdflatex' by default: fix descriptions of latex examples
    
    diff --git a/sage/misc/latex.py b/sage/misc/latex.py
    a b  
    26502650            """
    26512651            return r"""LaTeX example for testing display of graphs.
    26522652
    2653 To use, first try calling 'view' on this object -- you should get
    2654 gibberish.  Now, make sure that you have the most recent version of
    2655 the TeX package pgf installed, along with the LaTeX package tkz-graph.
    2656 Run 'latex.add_to_preamble("\\usepackage{tkz-graph}")', and try viewing
    2657 it again.  From the command line, this should pop open a nice window
    2658 with a picture of a graph.  In the notebook, you should get a MathJax
    2659 error.  Finally, run 'latex.add_to_mathjax_avoid_list("tikzpicture")'
    2660 and try again from the notebook -- you should get a nice picture.
     2653To use, first try calling 'view' on this object -- it won't work.
     2654Now, make sure that you have the most recent version of the TeX
     2655package pgf installed, along with the LaTeX package tkz-graph.  Run
     2656'latex.add_to_preamble("\\usepackage{tkz-graph}")', and try viewing it
     2657again.  From the command line, this should pop open a nice window with
     2658a picture of a graph.  In the notebook, it still won't work.  Finally,
     2659run 'latex.add_to_mathjax_avoid_list("tikzpicture")' and try again
     2660from the notebook -- you should get a nice picture.
    26612661
    26622662(LaTeX code taken from http://altermundus.com/pages/graph.html)
    26632663"""
     
    27302730            """
    27312731            return """LaTeX example for testing display of pstricks output.
    27322732
    2733 To use, first try calling 'view' on this object -- you
    2734 should get gibberish.  Now, make sure that you have the most
    2735 recent version of the TeX package pstricks installed. Run
    2736 'latex.add_to_preamble("\\usepackage{pstricks}")' and try
    2737 viewing it again. From the command line, this should pop
    2738 open a nice window with a picture of forces acting on a mass
    2739 on a pendulum. In the notebook, you should get an error.
    2740 Finally, run
    2741 'latex.add_to_mathjax_avoid_list("pspicture")' and try again
    2742 -- you should get a nice picture."""
     2733To use, first try calling 'view' on this object -- it won't work. Now,
     2734make sure that you have the most recent version of the TeX package
     2735pstricks installed.  Run 'latex.add_to_preamble("\\usepackage{pstricks}")'
     2736and try viewing it again. Call 'view' with the option `engine='latex'`
     2737-- the default behavior is to use pdflatex, which doesn't work with
     2738pstricks.  From the command line, this should pop open a nice window
     2739with a picture of forces acting on a mass on a pendulum.  In the
     2740notebook, it still won't work, so run
     2741'latex.add_to_mathjax_avoid_list("pspicture")' and try again -- you
     2742should get a nice picture."""
    27432743
    27442744        def _latex_(self):
    27452745            """