# Pretty Table does not display in Documenter.jl

**URL:** https://discourse.julialang.org/t/pretty-table-does-not-display-in-documenter-jl/100065
**Category:** General Usage
**Tags:** question, documentation, documenter, pretty-printing
**Created:** [June 8, 2023, 5:38pm UTC](https://discourse.julialang.org/t/pretty-table-does-not-display-in-documenter-jl/100065 "2023-06-08T17:38:08Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [June 8, 2023, 5:38pm UTC](https://discourse.julialang.org/t/pretty-table-does-not-display-in-documenter-jl/100065/1 "2023-06-08T17:38:08Z")

</div>

I use PrettyTables to format the printing of [structs](https://github.com/itsdfish/SequentialSamplingModels.jl/blob/83b422ce0130473558263c74dba2cc497a293903/src/utilities.jl#LL3C1-L3C1). It works in the REPL, but not in my documentation. The problem occurs in the subsection called [create model object.](https://itsdfish.github.io/SequentialSamplingModels.jl/dev/aDDM/#Create-Model-Object) I was wondering if anyone might now why its not working.

---

<div class="post-metadata">

### Author: ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)
#### Post date: [June 8, 2023, 5:49pm UTC](https://discourse.julialang.org/t/pretty-table-does-not-display-in-documenter-jl/100065/2 "2023-06-08T17:49:32Z")

</div>

because you had

```julia
::MIME"text/plain",

```

you want to remove this or make one for `text/html`

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [June 8, 2023, 6:14pm UTC](https://discourse.julialang.org/t/pretty-table-does-not-display-in-documenter-jl/100065/3 "2023-06-08T18:14:21Z")

</div>

> [@jling](#):
>
> text/html

Thanks for your reply. Unfortunately, that did not have the desired effect: The output field is now gone in the docs.

Additionally, in the REPL, text/plain produces:

```julia
julia> aDDM()
aDDM
┌───────────┬───────┐
│ Parameter │ Value │
├───────────┼───────┤
│ ν1 │ 5.00 │
│ ν2 │ 4.00 │
│ α │ 1.00 │
│ z │ 0.00 │
│ θ │ 0.30 │
│ σ │ 0.02 │
│ Δ │ 0.00 │
└───────────┴───────┘

```

With the change to text/html, it now prints

```julia

julia> aDDM()
aDDM{Float64, Float64, Float64, Float64, Float64, Float64, Float64}(ν1=5.0, ν2=4.0, α=1.0, z=0.0, θ=0.3, σ=0.02, Δ=0.0004)

```

---

<div class="post-metadata">

### Author: ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)
#### Post date: [June 8, 2023, 7:12pm UTC](https://discourse.julialang.org/t/pretty-table-does-not-display-in-documenter-jl/100065/4 "2023-06-08T19:12:20Z")

</div>

you need both, in REPL you need `text/plain`, for Documenter.jl I BELIEVE you need `text'html`

but I guess not, what about remove MIME argument and just let `pretty_table()` handle it?

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [June 8, 2023, 7:18pm UTC](https://discourse.julialang.org/t/pretty-table-does-not-display-in-documenter-jl/100065/5 "2023-06-08T19:18:37Z")

</div>

I tried removing MIME, but that did not work either. I noticed that the docs for prettytable use images to display output. So it seems that it doesn’t work with Documenter.jl.

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [June 8, 2023, 7:25pm UTC](https://discourse.julialang.org/t/pretty-table-does-not-display-in-documenter-jl/100065/6 "2023-06-08T19:25:36Z")

</div>

You are not printing to the `io` it looks like.

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [June 8, 2023, 7:53pm UTC](https://discourse.julialang.org/t/pretty-table-does-not-display-in-documenter-jl/100065/7 "2023-06-08T19:53:37Z")

</div>

Thank you. That was the problem. I passed `io` to `pretty_table(io,...)`.

Thank jling for your help too!
