Ticket #13143: trac_13143-optional.patch

File trac_13143-optional.patch, 2.2 KB (added by jhpalmieri, 9 years ago)

optional patch, independent of the others

  • sage/combinat/posets/linear_extensions.py

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1351352243 25200
    # Node ID 135bb647b3bd39b1c9bf58a4f99779a49c999941
    # Parent  a8f2c52e36636b035e52367f3f6ef833c87d98b0
    Replace the text mode command '\texttt' with math mode commands.
    
    diff --git a/sage/combinat/posets/linear_extensions.py b/sage/combinat/posets/linear_extensions.py
    a b class LinearExtensionOfPoset(ClonableArr 
    163163            sage: P = Poset(([1,2,3,4], [[1,3],[1,4],[2,3]]))
    164164            sage: p = P.linear_extension([1,2,3,4])
    165165            sage: p._latex_()
    166             '\\texttt{(1, 2, 3, 4)}'
     166            '\\mathtt{(1, 2, 3, 4)}'
    167167        """
    168         return "\\texttt{"+str(tuple(self))+"}"
     168        return "\\mathtt{"+str(tuple(self))+"}"
    169169
    170170    def to_poset(self):
    171171        r"""
  • sage/modules/vector_space_morphism.py

    diff --git a/sage/modules/vector_space_morphism.py b/sage/modules/vector_space_morphism.py
    a b class VectorSpaceMorphism(free_module_mo 
    925925            sage: H = Hom(QQ^3, QQ^2)
    926926            sage: f = H(matrix(3, 2, range(6)))
    927927            sage: f._latex_().split(' ')
    928             ['\\texttt{vector', 'space', 'morphism', 'from',
    929             '}\n\\Bold{Q}^{3}\\texttt{', 'to', '}\n\\Bold{Q}^{2}\\texttt{',
     928            ['\\text{vector', 'space', 'morphism', 'from',
     929            '}\n\\Bold{Q}^{3}\\text{', 'to', '}\n\\Bold{Q}^{2}\\text{',
    930930            'represented', 'by', 'the', 'matrix',
    931931            '}\n\\left(\\begin{array}{rr}\n0', '&', '1',
    932932            '\\\\\n2', '&', '3', '\\\\\n4', '&', '5\n\\end{array}\\right)']
    933933        """
    934934        from sage.misc.latex import latex
    935         s = ('\\texttt{vector space morphism from }\n', self.domain()._latex_(),
    936              '\\texttt{ to }\n', self.codomain()._latex_(),
    937              '\\texttt{ represented by the matrix }\n', self.matrix()._latex_())
     935        s = ('\\text{vector space morphism from }\n', self.domain()._latex_(),
     936             '\\text{ to }\n', self.codomain()._latex_(),
     937             '\\text{ represented by the matrix }\n', self.matrix()._latex_())
    938938        return ''.join(s)
    939939
    940940    def _repr_(self):