# Tables in Literate.jl

**URL:** <https://discourse.julialang.org/t/tables-in-literate-jl/87564>\
**Category:** General Usage\
**Tags:** question, literate\
**Created:** [September 21, 2022, 10:03am UTC](https://discourse.julialang.org/t/tables-in-literate-jl/87564 "2022-09-21T10:03:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [September 21, 2022, 10:03am UTC](https://discourse.julialang.org/t/tables-in-literate-jl/87564/1 "2022-09-21T10:03:17Z")

</div>

I would like to display a computed table in a file marked up with Literate.jl. I managed to do it with

```julia
using Tables, PrettyTables, DisplayAs

tab = [(a = 1, b = 2), (a = 3, b = 4)];
pretty_table(String, tab; tf = tf_markdown) |> Vector{UInt8} |> DisplayAs.Raw.MD #hide

```

which injects

```julia
| a | b |
| Int64 | Int64 |
|-------|-------|
| 1 | 2 |
| 3 | 4 |

```

into the resulting Markdown, but I am wondering if there is something simpler.

(In any case, I can make a simple utility function for this).

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [September 21, 2022, 2:01pm UTC](https://discourse.julialang.org/t/tables-in-literate-jl/87564/2 "2022-09-21T14:01:18Z")

</div>

There is now

```julia
using MarkdownTables
tab |> markdown_table()

```

with

> **[GitHub - tpapp/MarkdownTables.jl: Lightweigth package to print a table that...](https://github.com/tpapp/MarkdownTables.jl/)**
>
> Lightweigth package to print a table that implements the Tables.jl interface in Markdown. - GitHub - tpapp/MarkdownTables.jl: Lightweigth package to print a table that implements the Tables.jl inte...
