Nemocas / AbstractAlgebra.jl

Generic abstract algebra functionality in pure Julia (no C dependencies)
https://nemocas.github.io/AbstractAlgebra.jl/dev/index.html
Other
160 stars 61 forks source link

Remove non-ASCII chars from partitions #773

Closed wbhart closed 3 years ago

wbhart commented 3 years ago

Non-ASCII chars appear in the partitions as implemented in src/generic/GenericTypes.jl

We decided to ban such characters, so these should now be removed:

https://github.com/Nemocas/Nemo.jl/issues/1013

wbhart commented 3 years ago

The characters currently display as follows:

julia> p = Partition([4,2,1,1,1])
4₁2₁1₃

Suggestions for how the output should look are welcome.

@kalmarek

wbhart commented 3 years ago

There are also non-ASCII chars in Generic._border in src/generic/YoungTabs.jl

There are options to control the output format of permutations and youngtabs, one of which is 100% ASCII:

Generic.setpermstyle(::Symbol)
Generic.setyoungtabstyle(::Symbol)

these accept :cycles or :array, or :diagram or :array, respectively to change the output style, which would be sufficient in this case to entirely remove non-ASCII from their code/doctests (the actual show methods don't contain non-ASCII characters, even though they display them).

Partitions don't have such an option.

wbhart commented 3 years ago

Subscripts are defined in Generic/YoungTabs.jl

wbhart commented 3 years ago

As mentioned in https://github.com/Nemocas/Nemo.jl/issues/1013 there is not a strong concensus on removal of the existing non-ASCII code. Either way, it's not urgent.

wbhart commented 3 years ago

Shall I close this? It doesn't look like it's really bothering anyone.