Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table display #304

Open
henry2004y opened this issue Sep 26, 2022 · 1 comment
Open

Table display #304

henry2004y opened this issue Sep 26, 2022 · 1 comment

Comments

@henry2004y
Copy link
Contributor

Hi,

What is the recommended way to display tables using Books.jl? A markdown style table is supported, but a LaTeX table (\begin{table} ... \end{table}) won't work with the default settings.

Another issue about DataFrames.jl tables is that the display cannot be easily set, e.g. customized formats, round-off digits, and LaTeX display. Maybe it can be done with PrettyTables.jl?

@rikhuijzer
Copy link
Collaborator

What is the recommended way to display tables using Books.jl? A markdown style table is supported, but a LaTeX table (\begin{table} ... \end{table}) won't work with the default settings.

The support for Markdown tables should be roughly the same as what Pandoc supports, see for example https://pandoc.org/MANUAL.html#tables. To tweak it more, you can manually embed html and pdf code. The first block will only be included in html and the second only in the tex (I think it should be {=pdf} at least, maybe it should be {=tex} or something):

<table>
  <tr>
    <th>Hello</th>
  </tr>
</table>
\begin{table} ... \end{table}

Another issue about DataFrames.jl tables is that the display cannot be easily set, e.g. customized formats, round-off digits, and LaTeX display. Maybe it can be done with PrettyTables.jl?

Rounding digits is possibly by converting them to the right strings first and keeping those in the table. It's not ideal, but it works. Maybe the same works for LaTeX? That is, first convert it to string manually?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants