Ticket #14382: trac_14382-delta.patch

File trac_14382-delta.patch, 6.2 KB (added by jhpalmieri, 7 years ago)

for review only: diff between previous patches and texttt patch

  • doc/de/tutorial/latex.rst

    diff --git a/doc/de/tutorial/latex.rst b/doc/de/tutorial/latex.rst
    a b  
    6666    sage: latex(integrate(z^4, z))
    6767    \frac{1}{5} \, z^{5}
    6868    sage: latex('a string')
    69     \text{\tt a{ }string}
     69    \text{\texttt{a{ }string}}
    7070    sage: latex(QQ)
    7171    \Bold{Q}
    7272    sage: latex(matrix(QQ, 2, 3, [[2,4,6],[-1,-1,-1]]))
  • doc/en/tutorial/latex.rst

    diff --git a/doc/en/tutorial/latex.rst b/doc/en/tutorial/latex.rst
    a b  
    6363    sage: latex(integrate(z^4, z))
    6464    \frac{1}{5} \, z^{5}
    6565    sage: latex('a string')
    66     \text{\tt a{ }string}
     66    \text{\texttt{a{ }string}}
    6767    sage: latex(QQ)
    6868    \Bold{Q}
    6969    sage: latex(matrix(QQ, 2, 3, [[2,4,6],[-1,-1,-1]]))
  • sage/combinat/free_module.py

    diff --git a/sage/combinat/free_module.py b/sage/combinat/free_module.py
    a b  
    19401940        from sage.misc.latex import latex
    19411941
    19421942        s = latex(m)
    1943         if s.find(r'\text{\tt ') != -1:
     1943        if s.find('\\text{\\textt') != -1:
    19441944            # m contains "non-LaTeXed" strings, use string representation
    19451945            s = str(m)
    19461946
     
    25262526                sage: F.rename("F")
    25272527                sage: G.rename("G")
    25282528                sage: latex(tensor([F, F, G])) # indirect doctest
    2529                 \text{\tt F} \otimes \text{\tt F} \otimes \text{\tt G}
     2529                \text{\texttt{F}} \otimes \text{\texttt{F}} \otimes \text{\texttt{G}}
    25302530                sage: F._latex_ = lambda : "F"
    25312531                sage: G._latex_ = lambda : "G"
    25322532                sage: latex(tensor([F, F, G])) # indirect doctest
  • sage/groups/perm_gps/permgroup.py

    diff --git a/sage/groups/perm_gps/permgroup.py b/sage/groups/perm_gps/permgroup.py
    a b  
    14221422
    14231423            sage: S = SymmetricGroup(['a','b','c'])
    14241424            sage: latex(S)
    1425             \langle (\text{\tt a},\text{\tt b},\text{\tt c}), (\text{\tt a},\text{\tt b}) \rangle
     1425            \langle (\text{\texttt{a}},\text{\texttt{b}},\text{\texttt{c}}), (\text{\texttt{a}},\text{\texttt{b}}) \rangle
    14261426        """
    14271427        return '\\langle ' + \
    14281428               ', '.join([x._latex_() for x in self.gens()]) + ' \\rangle'
  • sage/groups/perm_gps/permgroup_element.pyx

    diff --git a/sage/groups/perm_gps/permgroup_element.pyx b/sage/groups/perm_gps/permgroup_element.pyx
    a b  
    590590           
    591591            sage: S = SymmetricGroup(['a', 'b'])
    592592            sage: latex(S.gens())
    593             \left[(\text{\tt a},\text{\tt b})\right]
     593            \left[(\text{\texttt{a}},\text{\texttt{b}})\right]
    594594        """
    595595        from sage.misc.latex import latex
    596596        return "".join(["(" + ",".join([latex(x) for x in cycle])+")" for cycle in self.cycle_tuples()])
  • sage/misc/latex.py

    diff --git a/sage/misc/latex.py b/sage/misc/latex.py
    a b  
    312312        sage: str_function('+34.5')
    313313        '+34.5'
    314314        sage: str_function('hello_world')
    315         '\\text{\\tt hello{\\char`\\_}world}'
     315        '\\text{\\texttt{hello{\\char`\\_}world}}'
    316316        sage: str_function('-1.00000?') # trac 12178
    317317        '-1.00000?'
    318318    """
     
    328328    # And dashes too, since it causes issues for the command line...
    329329    x = x.replace("-", "{-}")
    330330    # Make it work in math mode, but look like typewriter
    331     line_wrapper = r"\text{\tt %s}"
     331    line_wrapper = r"\text{\texttt{%s}}"
    332332    x = "\\\\\n".join(line_wrapper % line for line in x.split("\n"))       
    333333    # Preserve line breaks
    334334    if "\n" in x:
     
    949949        sage: latex(FiniteField(25,'a'))
    950950        \Bold{F}_{5^{2}}
    951951        sage: latex("hello")
    952         \text{\tt hello}
     952        \text{\texttt{hello}}
    953953        sage: LatexExpr(r"\frac{x^2 - 1}{x + 1} = x - 1")
    954954        \frac{x^2 - 1}{x + 1} = x - 1
    955955
     
    19241924        x = latex(x, combine_all=combine_all)
    19251925           
    19261926        # The following block, hopefully, can be removed in some future MathJax.
    1927         prefix = r"\text{\tt "
     1927        prefix = r"\text{\texttt{"
    19281928        parts = x.split(prefix)
    19291929        for i, part in enumerate(parts):
    19301930            if i == 0:
     
    19351935                    n += 1
    19361936                if c == "}" and part[closing - 1] != "\\":
    19371937                    n -= 1
    1938                 if n == 0:
     1938                if n == -1:
    19391939                    break
    1940             y = part[:closing]
     1940            # part should end in "}}", so omit the last two characters
     1941            # from y
     1942            y = part[:closing-1]
    19411943            for delimiter in """|"'`#%&,.:;?!@_~^+-/\=<>()[]{}0123456789E""":
    19421944                if delimiter not in y:
    19431945                    break
     
    23012303        sage: t = PolynomialRing(QQ, 't').0
    23022304        sage: from sage.misc.latex import repr_lincomb
    23032305        sage: repr_lincomb(['a', 's', ''], [-t, t - 2, t^12 + 2])
    2304         '-t\\text{\\tt a} + \\left(t - 2\\right)\\text{\\tt s} + \\left(t^{12} + 2\\right)'
     2306        '-t\\text{\\texttt{a}} + \\left(t - 2\\right)\\text{\\texttt{s}} + \\left(t^{12} + 2\\right)'
    23052307        sage: repr_lincomb(['a', 'b'], [1,1])
    2306         '\\text{\\tt a} + \\text{\\tt b}'
     2308        '\\text{\\texttt{a}} + \\text{\\texttt{b}}'
    23072309
    23082310    Verify that a certain corner case works (see :trac:`5707` and
    23092311    :trac:`5766`)::
  • sage/modular/hecke/algebra.py

    diff --git a/sage/modular/hecke/algebra.py b/sage/modular/hecke/algebra.py
    a b  
    408408        EXAMPLES::
    409409
    410410            sage: latex(CuspForms(3, 24).hecke_algebra()) # indirect doctest
    411             \mathbf{T}_{\text{\tt Cuspidal...Gamma0(3)...24...}
     411            \mathbf{T}_{\text{\texttt{Cuspidal...Gamma0(3)...24...}
    412412        """
    413413        from sage.misc.latex import latex
    414414        return "\\mathbf{T}_{%s}" % latex(self.__M)
  • sage/sets/set.py

    diff --git a/sage/sets/set.py b/sage/sets/set.py
    a b  
    252252        ::
    253253
    254254            sage: print latex(Primes())
    255             \text{\tt Set{ }of{ }all{ }prime{ }numbers:{ }2,{ }3,{ }5,{ }7,{ }...}
     255            \text{\texttt{Set{ }of{ }all{ }prime{ }numbers:{ }2,{ }3,{ }5,{ }7,{ }...}}
    256256            sage: print latex(Set([1,1,1,5,6]))
    257257            \left\{1, 5, 6\right\}
    258258        """