Ticket #6591: trac_6591-doc.patch

File trac_6591-doc.patch, 3.2 KB (added by John Palmieri, 13 years ago)

apply on top of the other patch

  • sage/misc/latex.py

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1248298870 25200
    # Node ID 07914663fa0c7777f9237a506fa9ebe24f5e173b
    # Parent  8dc43ca8976a909e5fb7161f507fc464d13ae856
    documentation for #6591
    
    diff -r 8dc43ca8976a -r 07914663fa0c sage/misc/latex.py
    a b  
    14321432   
    14331433    -  ``pdflatex`` - bool (default: False): use pdflatex.
    14341434   
     1435    -  ``viewer`` - string or None (default: None): specify a viewer to
     1436       use; currently the only options are None and 'pdf'.
     1437   
     1438    -  ``tightpage`` - bool (default: False): use the LaTeX package
     1439       'preview' with the 'tightpage' option.
     1440   
    14351441    OUTPUT: Display typeset objects.
    14361442   
    14371443    This function behaves differently depending on whether in notebook
     
    14491455    adds a horizontal line between objects, and ``sep='\\newpage'``
    14501456    inserts a page break between objects.
    14511457
    1452     If ``pdflatex`` is True, then this produces a pdf file.
     1458    If ``pdflatex`` is ``True``, then this produces a pdf file.
    14531459    Otherwise, it produces a dvi file, and if the program dvipng is
    14541460    installed, it checks the dvi file by trying to convert it to a png
    14551461    file.  If this conversion fails, the dvi file probably contains
    14561462    some postscript special commands or it has other issues which
    14571463    might make displaying it a problem; in this case, the file is
    14581464    converted to a pdf file, which is then displayed.
     1465
     1466    All of the above behavior happens when ``viewer`` is equal to its
     1467    default value, ``None``.  If ``viewer`` is ``'pdf'``, then
     1468    ``pdflatex`` is set to ``True``, so from the command-line, this
     1469    behaves as just described.  (Thus, if the command
     1470    ``view(x, pdflatex=False, viewer='pdf')`` is executed, the setting
     1471    to ``pdflatex`` will be overridden by the ``viewer`` option.)
     1472
     1473    If in notebook mode with ``viewer`` equal to ``'pdf'``, then this
     1474    also behaves as above, producing and displaying a pdf file in a
     1475    separate window.
     1476
     1477    In any of the situations above (in which the output is displayed
     1478    in a separate window), setting the option ``tightpage`` to
     1479    ``True`` tells LaTeX to use the package 'preview' with the
     1480    'tightpage' option.  (More precisely, it adds
     1481
     1482      \\usepackage[tightpage,active,displaymath]{preview}
     1483
     1484    to the LaTeX preamble.)  Rather than produce a document which is a
     1485    full page, this produces a document cropped to just contain the
     1486    output.
    14591487   
    1460     If in notebook mode, this usually uses jsMath -- see the next
    1461     paragraph for the exception -- to display the output in the
    1462     notebook. Only the first argument, ``objects``, is relevant; the
    1463     others are ignored. If ``objects`` is a list, each object is
    1464     printed on its own line.
     1488    If in notebook mode with ``viewer`` equal to ``None``, this
     1489    usually uses jsMath -- see the next paragraph for the exception --
     1490    to display the output in the notebook. Only the first argument,
     1491    ``objects``, is relevant; the others are ignored. If ``objects``
     1492    is a list, each object is printed on its own line.
    14651493
    14661494    In the notebook, this *does* *not* use jsMath if the LaTeX code
    14671495    for ``objects`` contains a string in