# Current state and the future of PrettyTables.jl

**URL:** <https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455>\
**Category:** Package Announcements\
**Tags:** prettytables\
**Created:** [August 21, 2024, 2:18pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455 "2024-08-21T14:18:22Z")\
**Posts on this page:** 20\
**Page:** 6

<div class="post-metadata">

**Author:** ![DoktorMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/doktormike/32/2736_2.png) [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)\
**Post date:** [September 26, 2024, 1:46pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/101 "2024-09-26T13:46:06Z")

</div>

Are the plots using UnicodePlots? 😊 Very cool feature

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 26, 2024, 1:47pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/102 "2024-09-26T13:47:18Z")

</div>

See the footnote (another great PrettyTables feature 😃 )

---

<div class="post-metadata">

**Author:** ![DoktorMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/doktormike/32/2736_2.png) [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)\
**Post date:** [September 26, 2024, 1:53pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/103 "2024-09-26T13:53:55Z")

</div>

Ahh I totally missed that footnote. 😂

---

<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:** [September 26, 2024, 6:20pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/104 "2024-09-26T18:20:50Z")

</div>

Yes! I used UnicodePlots.jl. This test was related to the `AnsiTextCell`, a custom cell type that you can pass any string with decorations and it renders it correctly inside the cell.

---

<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:** [September 27, 2024, 2:10am UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/105 "2024-09-27T02:10:27Z")

</div>

Hi!

I need to design the name for some predefined table formats in PrettyTables.jl. I have already asked here, and @xlxs4 suggestion was to keep what we have now. However, it will not be possible.

For example, now we have `tf_ascii_dots` to define a text table format that uses ASCII dots at borders. The name came from a far past when we only have a text back end. Now, I can rename to `tf_text_ascii_dots` , but it is not good also. In the new design, we have a `TextTableFormat` that stores all the variables related to table formatting (border style, where to draw vertical and horizontal lines, etc). The old `tf_text_ascii_dots` relates only to the border style. Now, we have the structure `TextTableBorder` for this purpose.

Hence, I have two options:

1. `tf_text_border_ascii_dots` , which is not the way things are called in English; or
2. the very verbose `text_table_border__ascii_dots`.

The latter uses two underscores to separate a “naming space” and I use it a lot internally. What do you think?

_Poll ([view on site](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/105))_

---

<div class="post-metadata">

**Author:** ![davide](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davide/32/52136_2.png) [@davide](https://discourse.julialang.org/u/davide)\
**Post date:** [September 27, 2024, 6:32am UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/106 "2024-09-27T06:32:24Z")

</div>

To be less verbose, maybe something like

```julia
txt_tborder_ascii_dots

```

In any case, I will have to read the syntax, unless I use them often I cannot remember such strings.

---

<div class="post-metadata">

**Author:** ![barucden](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barucden/32/26154_2.png) [@barucden](https://discourse.julialang.org/u/barucden)\
**Post date:** [September 27, 2024, 8:12am UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/107 "2024-09-27T08:12:19Z")

</div>

What about

```julia
abstract type TxtPredefinedBorderFmt end
struct TxtDotsBorderFmt <: TxtPredefinedBorderFmt end
struct TxtOtherBorderFmt <: TxtPredefinedBorderFmt end

function TextTableBorder(fmt::TxtPredefinedBorderFmt)
    if isa(fmt, TxtDotsBorderFmt) # Or use dispatch
        return ....
    elseif isa(fmt, TxtOtherBorderFmt)
        return ....
    end
end

```

---

<div class="post-metadata">

**Author:** ![xlxs4](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xlxs4/32/223653_2.png) [@xlxs4](https://discourse.julialang.org/u/xlxs4)\
**Post date:** [September 30, 2024, 9:53am UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/108 "2024-09-30T09:53:44Z")

</div>

If `TextTableBorder` is used across a lot of names, a simple `ttb_ascii_dots` would help reduce the verbosity

---

<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:** [September 30, 2024, 12:44pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/109 "2024-09-30T12:44:49Z")

</div>

Thanks for the suggestion @xlxs4 ! However, I realized that probably I will not be able to create good acronyms for PrettyTables.jl at this stage. For example, if we use `ttb_` for the text back end, what would we use for the Typst back end when it is implemented ? The problem occurs because we do not have a final product yet.

My conclusion is to be verbose but clear. Afterward, maybe someone in the community can see the whole picture and create a PrettyTablesMeta.jl to make things easier like we have in DataFramesMeta.jl.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [October 21, 2024, 4:44pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/110 "2024-10-21T16:44:14Z")

</div>

Nice updates, like the merged columns!  
Hacked a simple wrapper to determine multilevel column headings automatically based on the dataset:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/2/0/20e79b29a0bf47a6f30272680537e44a0fccb07f.jpeg)  
Do you think this is within the scope of your package?

Also, cosmetic comments based on how these headings look:

- Would be nice to have some gap between the merged cell borders in the HTML format, otherwise the boundary between “name” and “flux” in this example is not clear
- For the terminal output, the secondary heading colors are almost invisible in some common colorscehemes (see the screenshot)

---

<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:** [October 21, 2024, 4:52pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/111 "2024-10-21T16:52:57Z")

</div>

Hi @aplavin !

Thanks!

> Do you think this is within the scope of your package?

Maybe not. I am really trying to make the scope as small as possible in this new rewrite. Otherwise, I will get the same maintainability problem in the current version.

> - Would be nice to have some gap between the merged cell borders in the HTML format, otherwise the boundary between “name” and “flux” in this example is not clear

How can we make this? I think it is only possible by customizing the CSS.

> - For the terminal output, the secondary heading colors are almost invisible in some common colorscehemes (see the screenshot)

What color scheme are you using?

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [October 21, 2024, 5:40pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/112 "2024-10-21T17:40:12Z")

</div>

> [@Ronis\_BR](#):
>
> Maybe not. I am really trying to make the scope as small as possible in this new rewrite.

_\* thinking if I should write PrettyTablesExtra.jl 🙂 \*_

> [@Ronis\_BR](#):
>
> How can we make this? I think it is only possible by customizing the CSS.

I think so indeed, just put some minimal CSS by default so that everything is distinguishable… Probably `border-spacing` is the right property here.

> [@Ronis\_BR](#):
>
> What color scheme are you using?

It’s the default one in Pluto, I didn’t change anything.

---

<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:** [October 21, 2024, 5:46pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/113 "2024-10-21T17:46:50Z")

</div>

> [@aplavin](#):
>
> - thinking if I should write PrettyTablesExtra.jl 🙂 \*

Please!! We need something like this (just like DataFramesMeta.jl).

> [@aplavin](#):
>
> I think so indeed, just put some minimal CSS by default so that everything is distinguishable… Probably `border-spacing` is the right property here.

The problem is that it will only work with `stand_alone = true`.

> [@aplavin](#):
>
> It’s the default one in Pluto, I didn’t change anything.

I will check. thanks!

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [October 21, 2024, 6:05pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/114 "2024-10-21T18:05:42Z")

</div>

> [@Ronis\_BR](#):
>
> The problem is that it will only work with `stand_alone = true`.

Hmm, why? What’s prohibiting `<th style="border-spacing: 1em">...` in embedded tables?

---

<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:** [October 21, 2024, 6:20pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/115 "2024-10-21T18:20:52Z")

</div>

I tried, and it does not work ☹

That option only works if you add `border-collapse: separate;`. However, this option introduces a lot of problems given how we render the borders.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [October 21, 2024, 6:22pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/116 "2024-10-21T18:22:08Z")

</div>

> [@Ronis\_BR](#):
>
> That option only works if you add `border-collapse: separate;`. However, this option introduces a lot of problems given how we render the borders.

What are the issues with applying `border-collapse` to the `table` or `tr`?

---

<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:** [October 21, 2024, 6:30pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/117 "2024-10-21T18:30:28Z")

</div>

I cannot remember, but there were a lot of problems. AFAIK, `border-collapse` can only be applied to table not to a specific row.

---

<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:** [October 21, 2024, 6:31pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/118 "2024-10-21T18:31:39Z")

</div>

However, you can always provide your custom CSS to adjust all those things using the `HtmlTableFormat` structure.

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [February 26, 2025, 12:38pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/119 "2025-02-26T12:38:00Z")

</div>

Hi @Ronis_BR , gentle bump here. Do you have an ETA for the v3 release?

---

<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:** [February 27, 2025, 10:51pm UTC](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455/120 "2025-02-27T22:51:58Z")

</div>

Hi @juliohm !

I am currently passing through some personal problems and I had little time to work on PrettyTables.jl ☹ However, all the backends are already implemented and I am now building the documentation and testing. I really hope to merge `v3` branch into `main` in the next week. After that, I will give some time for people to try and ask for missing features.

[Previous page](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455.md?page=5)

[Next page](https://discourse.julialang.org/t/current-state-and-the-future-of-prettytables-jl/118455.md?page=7)
