# Ticket #12156: 12156_jhp.patch

File 12156_jhp.patch, 1.7 KB (added by jhpalmieri, 10 years ago)
• ## sage/misc/latex.py

# HG changeset patch
# User J. H. Palmieri <palmieri@math.washington.edu>
# Date 1324429568 28800
# Node ID 8f7bfe31c9dbce64102fc70526a8062d9a906f9a
# Parent  3fcf20d4cc7711b795be39b19e2688be2b2b3076
#12156: reword a few docstrings

diff --git a/sage/misc/latex.py b/sage/misc/latex.py
 a class LatexExpr(str): Normally, objects of this class are created by a :func:latex call. It is also possible to generate :class:LatexExpr directly from a string, which must contain valid LaTeX code for typesetting in math mode (without dollar signs). In the Sage Notebook, use :func:pretty_print or the "Typeset" checkbox to actually see the typeset LaTeX code. signs). In the Sage notebook, use :func:pretty_print or the "Typeset" checkbox to actually see the typeset LaTeX code; alternatively, from either the command-line or the notebook, use the :func:view function. INPUT: class Latex: %latex_debug to get debugging output. Use latex(...) to typeset a Sage object.  Use :class:LatexExpr to typeset LaTeX code that you created by hand. to typeset LaTeX code that you create by hand. Use %slide instead to typeset slides. class Latex: sage: LatexExpr(r"\frac{x^2 - 1}{x + 1} = x - 1") \frac{x^2 - 1}{x + 1} = x - 1 LaTeX expressions can be added, note that a space is automatically added:: LaTeX expressions can be added; note that a space is automatically inserted:: sage: LatexExpr(r"y \neq") + latex(x^20 + 1) y \neq x^{20} + 1