How to add a function to show so that in a matrix latex is shown

Hi dear community :slight_smile:

I created my own ModInt type and want to use it in a Matrix. I want to show it as rendered latex like:

julia> [ModInt{5}(i+j) for i in 1:2, j in 1:2]
2ร—2 Array{ModInt{5},2}:
 2โ‚… 3โ‚…
 3โ‚… 4โ‚…

How would I do that?

See if Types ยท The Julia Language helps