Opened 6 years ago
Closed 20 months ago
#19657 closed defect (duplicate)
latex names
Reported by:  fwclarke  Owned by:  

Priority:  minor  Milestone:  sageduplicate/invalid/wontfix 
Component:  number fields  Keywords:  latex_name 
Cc:  tscrim, ghkliem  Merged in:  
Authors:  Reviewers:  Travis Scrimshaw  
Report Upstream:  N/A  Work issues:  
Branch:  Commit:  
Dependencies:  #30372  Stopgaps: 
Description (last modified by )
As pointed out in http://ask.sagemath.org/question/31223, there are various problems with defining latex_name for the generators of number fields. For example
sage: K.<a> = NumberField(x^3  5, latex_name='alpha') sage: latex(a), K.latex_variable_name() (alpha, 'alpha') sage: y = polygen(K, 'y') sage: L.<b> = K.extension(y^3 + a  1, latex_name='beta') sage: latex(b), L.latex_variable_name() (b, 'beta') sage: M.<c> = NumberField(y^3 + a  1, latex_name='gamma') sage: latex(c), M.latex_variable_name() (c, 'c')
These, and some other, inconsistencies need ironing out.
Change History (16)
comment:1 Changed 6 years ago by
 Component changed from PLEASE CHANGE to number fields
 Description modified (diff)
 Keywords latex_name added
 Type changed from PLEASE CHANGE to defect
comment:2 Changed 6 years ago by
 Branch set to u/fwclarke/latex_names
comment:3 Changed 6 years ago by
 Commit set to 65fb4a27977c6ebb53b34eb5e34a4a79c6383e09
comment:4 Changed 6 years ago by
First we ensure that NumberFieldFactory
passes latex_name
on in every case. Now
sage: K.<a> = NumberField(x^3  5) sage: y = polygen(K, 'y') sage: M.<c> = NumberField(y^3 + a  1, latex_name='gamma') sage: latex(c), M.latex_variable_name() (c, 'gamma')
comment:5 Changed 6 years ago by
 Commit changed from 65fb4a27977c6ebb53b34eb5e34a4a79c6383e09 to 807b378cb5a744195ab8b5099ac0749916524944
Branch pushed to git repo; I updated commit sha1. New commits:
807b378  fix latex_name for variable fields and latex_variable_names

comment:6 Changed 6 years ago by
Now require that the extension
method passes on latex_name
, that the NumberField_generic
class defines the _latex_names
attribute so that the latex_variable_names
method works as it should, and similarly that the NumberField_relative
class defines that attribute appropriately. This gives
sage: K.<a> = NumberField(x^3  6, latex_name='alpha') sage: K.latex_variable_names() ['alpha'] sage: L.<b> = K.extension(x^2  5, latex_name='beta') sage: L.latex_variable_names() ['beta', 'alpha']
comment:7 Changed 6 years ago by
 Commit changed from 807b378cb5a744195ab8b5099ac0749916524944 to 71bfd965f5f257321ddebc4e11689547818fc640
Branch pushed to git repo; I updated commit sha1. New commits:
71bfd96  adjust _latex for elements of relative number fields

comment:8 Changed 6 years ago by
 Commit changed from 71bfd965f5f257321ddebc4e11689547818fc640 to f0abaf35de14494429aba16c60c6aea2161da875
Branch pushed to git repo; I updated commit sha1. New commits:
f0abaf3  Treat latex_names in a similar manner to names

comment:9 Changed 6 years ago by
 Commit changed from f0abaf35de14494429aba16c60c6aea2161da875 to 794f6bb08b41622767d31c0b05ee7a74d45e1434
Branch pushed to git repo; I updated commit sha1. New commits:
794f6bb  doctests

comment:10 Changed 6 years ago by
 Description modified (diff)
 Priority changed from major to minor
 Status changed from new to needs_review
comment:11 Changed 6 years ago by
 Status changed from needs_review to needs_work
 Work issues set to merge conflict
comment:12 Changed 21 months ago by
 Milestone changed from sage6.10 to sage9.2
See also #30372  Replace NumberField_generic.__latex_variable_name
by ._latex_names
comment:13 Changed 21 months ago by
 Dependencies set to #30372
 Work issues changed from merge conflict to merge with #30372
comment:14 Changed 21 months ago by
 Cc tscrim ghkliem added
 Milestone changed from sage9.2 to sageduplicate/invalid/wontfix
 Status changed from needs_work to needs_review
I have taken some of the commits here and merged/reworked them in #30360, where I did similar work. This ticket can be closed.
comment:15 Changed 21 months ago by
 Reviewers set to Travis Scrimshaw
 Status changed from needs_review to positive_review
 Work issues merge with #30372 deleted
comment:16 Changed 20 months ago by
 Branch u/fwclarke/latex_names deleted
 Commit 794f6bb08b41622767d31c0b05ee7a74d45e1434 deleted
 Resolution set to duplicate
 Status changed from positive_review to closed
Branch pushed to git repo; I updated commit sha1. New commits:
fix NumberFieldFactory