# Pluto: highlighters in PrettyTables not working

**URL:** <https://discourse.julialang.org/t/pluto-highlighters-in-prettytables-not-working/73742>\
**Category:** General Usage\
**Tags:** pluto, prettytables\
**Created:** [December 29, 2021, 12:05am UTC](https://discourse.julialang.org/t/pluto-highlighters-in-prettytables-not-working/73742 "2021-12-29T00:05:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![VivMendes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vivmendes/32/16477_2.png) [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Post date:** [December 29, 2021, 12:05am UTC](https://discourse.julialang.org/t/pluto-highlighters-in-prettytables-not-working/73742/1 "2021-12-29T00:05:31Z")

</div>

Hi,

I am using Pluto. I have a matrix, and I want to highlight some of its entries using `highlighters` in `PrettyTables`. I can get the matrix printed out in the REPL, but unfortunately, the `highlighters` seem to be not working inside Pluto. Some help would be very much appreciated.

MWE:

```julia
pretty_table(randn(8,8), crop = :none, highlighters = (hl_lt(0.0), hl_gt(0.0)))

```

The output is this:

 ![aaa](https://global.discourse-cdn.com/julialang/original/3X/e/e/ee2ba81265b6831749fd085136d575e530723c54.png)

---

<div class="post-metadata">

**Author:** ![yha](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yha/32/3502_2.png) [@yha](https://discourse.julialang.org/u/yha)\
**Post date:** [December 29, 2021, 5:03pm UTC](https://discourse.julialang.org/t/pluto-highlighters-in-prettytables-not-working/73742/2 "2021-12-29T17:03:13Z")

</div>

You can use `@with_terminal` from `PlutoUI` to see the terminal-printed table inside `Pluto` (including color highlights).  
You can also do `pretty_table(HTML,...`) to render the table as HTML inside Pluto, but apparently highlighters are not supported for this HTML output.

---

<div class="post-metadata">

**Author:** ![VivMendes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vivmendes/32/16477_2.png) [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Post date:** [December 29, 2021, 6:17pm UTC](https://discourse.julialang.org/t/pluto-highlighters-in-prettytables-not-working/73742/3 "2021-12-29T18:17:11Z")

</div>

@yha, thank you very much. It does work inside Pluto, using

```julia
with_terminal() do
	pretty_table(randn(8,8), crop = :none, formatters = ft_printf("%5.3f"), highlighters = (hl_lt(0.0), hl_gt(0.0)))
end

```

---

<div class="post-metadata">

**Author:** ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Post date:** [January 13, 2022, 4:59pm UTC](https://discourse.julialang.org/t/pluto-highlighters-in-prettytables-not-working/73742/4 "2022-01-13T16:59:04Z")

</div>

Sorry! I completely missed this post. You can use highlighters for HTML backend, but not those created for the text backend. In this case, you must pass the HTML decoration you want. For example:

```julia
pretty_table(HTML, rand(8, 8); highlighters = hl_lt(0.5, HTMLDecoration(color = "red")))

```

 ![Captura de Tela 2022-01-13 às 13.58.50](https://global.discourse-cdn.com/julialang/original/3X/6/2/621ab3307be54bba1c1c7a4e93035b5d9844d5f7.png)

---

<div class="post-metadata">

**Author:** ![VivMendes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vivmendes/32/16477_2.png) [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Post date:** [January 16, 2022, 9:18pm UTC](https://discourse.julialang.org/t/pluto-highlighters-in-prettytables-not-working/73742/5 "2022-01-16T21:18:58Z")

</div>

@Ronis_BR, that will solve the problem, without having to resort to the terminal. Thanks a lot.
