Ticket #8938: trac_8938_latex_test_for_cyclotomic_fields.patch

File trac_8938_latex_test_for_cyclotomic_fields.patch, 1.3 KB (added by Andrey Novoseltsev, 11 years ago)
  • sage/rings/number_field/number_field.py

    # HG changeset patch
    # User Andrey Novoseltsev <novoselt@gmail.com>
    # Date 1311352453 -7200
    # Node ID b21c8aaedd74336eaa6873477bdeaadf6db075d9
    # Parent  16627cd96c572dc863ac1f3d9f735d2b6bec41a3
    A test verifying that a LaTeX bug has been fixed for CyclotomicField.
    
    diff -r 16627cd96c57 -r b21c8aaedd74 sage/rings/number_field/number_field.py
    a b  
    68376837            sage: latex(Z) # indirect doctest
    68386838            \Bold{Q}(\zeta_{4})
    68396839       
    6840         Latex printing respects the generator name.
    6841        
    6842         ::
     6840        Latex printing respects the generator name::
    68436841       
    68446842            sage: k.<a> = CyclotomicField(4)
    68456843            sage: latex(k)
     
    68486846            Cyclotomic Field of order 4 and degree 2
    68496847            sage: k.gen()
    68506848            a
     6849           
     6850        TESTS:
     6851       
     6852        We check that the bug reported on Trac #8938 is fixed::
     6853       
     6854            sage: C5.<z> = CyclotomicField(5)
     6855            sage: P.<s, t> = C5[]
     6856            sage: f = (z^2 + z)*s
     6857            sage: f
     6858            (z^2 + z)*s
     6859            sage: latex(f)
     6860            \left(z^{2} + z\right) s
    68516861        """
    68526862        v = self.latex_variable_name()
    68536863        if v.startswith('\\zeta_'):