# 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 class LinearExtensionOfPoset(ClonableArr sage: P = Poset(([1,2,3,4], [[1,3],[1,4],[2,3]])) sage: p = P.linear_extension([1,2,3,4]) sage: p._latex_() '\\texttt{(1, 2, 3, 4)}' '\\mathtt{(1, 2, 3, 4)}' """ return "\\texttt{"+str(tuple(self))+"}" return "\\mathtt{"+str(tuple(self))+"}" def to_poset(self): r"""
• ## sage/modules/vector_space_morphism.py

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