# Can we have a unified LaTex output interface for StatsKit?

**URL:** <https://discourse.julialang.org/t/can-we-have-a-unified-latex-output-interface-for-statskit/55695>\
**Category:** General Usage\
**Tags:** question\
**Created:** [February 20, 2021, 7:37pm UTC](https://discourse.julialang.org/t/can-we-have-a-unified-latex-output-interface-for-statskit/55695 "2021-02-20T19:37:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yifan\_Liu](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Post date:** [February 20, 2021, 7:37pm UTC](https://discourse.julialang.org/t/can-we-have-a-unified-latex-output-interface-for-statskit/55695/1 "2021-02-20T19:37:31Z")

</div>

It would be great if we could have a unified LaTex output interface for the packages in StatsKit, so we can conveniently convert tabular data, statistical test results, and regression results into LaTex.

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [February 20, 2021, 7:43pm UTC](https://discourse.julialang.org/t/can-we-have-a-unified-latex-output-interface-for-statskit/55695/2 "2021-02-20T19:43:40Z")

</div>

DataFrames depends on PrettyTables, so this should be an easy thing to add.

However that wouldn’t necessarily help the printing of regression tables. I wonder if we need a new package that does regression tables but uses PrettyTables as a backend, and allows for more compliance with anything StatsModels-related.

---

<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:** [February 20, 2021, 7:48pm UTC](https://discourse.julialang.org/t/can-we-have-a-unified-latex-output-interface-for-statskit/55695/3 "2021-02-20T19:48:43Z")

</div>

I thought PrettyTables already has a (simple) LaTeX backend, what’s missing is to use LaTeXString as headers/titles?

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [February 20, 2021, 7:51pm UTC](https://discourse.julialang.org/t/can-we-have-a-unified-latex-output-interface-for-statskit/55695/4 "2021-02-20T19:51:38Z")

</div>

It also doesn’t currently allow multi-column headers, which is probably necessary for it to be the backend of a real regression table package.

@Ronis_BR is doing a great job though. And I think its important to emphasize that they have maintained feature parity across HTML, text, and LaTex outputs, so new features for latex are tough to add.

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [February 20, 2021, 9:32pm UTC](https://discourse.julialang.org/t/can-we-have-a-unified-latex-output-interface-for-statskit/55695/5 "2021-02-20T21:32:48Z")

</div>

Don’t forget about RegressionTables.jl

> **[GitHub - jmboehm/RegressionTables.jl: Journal-style regression tables](https://github.com/jmboehm/RegressionTables.jl)**
>
> Journal-style regression tables. Contribute to jmboehm/RegressionTables.jl development by creating an account on GitHub.

---

<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 21, 2021, 2:04am UTC](https://discourse.julialang.org/t/can-we-have-a-unified-latex-output-interface-for-statskit/55695/6 "2021-02-21T02:04:50Z")

</div>

> [@pdeffebach](#):
>
> It also doesn’t currently allow multi-column headers, which is probably necessary for it to be the backend of a real regression table package.
> 
> @Ronis_BR is doing a great job though. And I think its important to emphasize that they have maintained feature parity across HTML, text, and LaTex outputs, so new features for latex are tough to add.

Yes, features like this (multi-columns) that is not specific for a backend, I think it is better to implement to the 3 backends at the same time. However, if there is demand, I won’t oppose to do something only for LaTeX, for example.

Merge columns is extremely easy for LaTeX (we just need to think about a good API). For text backend, it will be extremely difficult, probably requiring to rewrite part of the cropping mechanism.
