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

**URL:** <https://discourse.julialang.org/t/how-to-add-a-function-to-show-so-that-in-a-matrix-latex-is-shown/50578>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [November 22, 2020, 12:07pm UTC](https://discourse.julialang.org/t/how-to-add-a-function-to-show-so-that-in-a-matrix-latex-is-shown/50578 "2020-11-22T12:07:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [November 22, 2020, 12:07pm UTC](https://discourse.julialang.org/t/how-to-add-a-function-to-show-so-that-in-a-matrix-latex-is-shown/50578/1 "2020-11-22T12:07:20Z")

</div>

Hi dear community 🙂

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

```julia
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?

---

<div class="post-metadata">

**Author:** ![tomerarnon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomerarnon/32/3170_2.png) [@tomerarnon](https://discourse.julialang.org/u/tomerarnon)\
**Post date:** [November 22, 2020, 12:34pm UTC](https://discourse.julialang.org/t/how-to-add-a-function-to-show-so-that-in-a-matrix-latex-is-shown/50578/2 "2020-11-22T12:34:33Z")

</div>

See if [Types · The Julia Language](https://docs.julialang.org/en/v1/manual/types/#man-custom-pretty-printing) helps
