-
Notifications
You must be signed in to change notification settings - Fork 39
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
Markdown backend ignores title
keyword argument
#234
Comments
AFAIK there is no way to set a title in a markdown table natively. |
Can it just be text above the table?
|
I am not sure because it will not behave like a table title in LaTeX and HTML when rendered. |
Okay, I have table metadata that I need to include and am trying to figure out a good way to do that with markdown. Right now I am just using the title and text backend: function print_polyfit_table(io::IO, table::DataFrame, title::String)
subtitle = "t₀ = " * metadata(table, "t₀") *
"\n" *
"RMSE = " * metadata(table, "RMSE") *
"\n" *
"knots = " * metadata(table, "knots")
pretty_table(io,
table,
show_subheader = false,
title = title * "\n" * subtitle,
backend = Val(:text),
)
println(io, "")
end
The |
In Markdown, the best way would be rendering the table to a string:
Yes, this is something we have to change if we decide that a title is not suitable for Markdown. |
It looks like Quarto and Pandoc have syntax for markdown table captions, which is simply a colon underneath the table. It might be worth supporting that with Refs: |
The problem of supporting features that are not in the standard is that people will not get the desired effect if they past the tables, for example, here in Github or in https://markdownlivepreview.com |
Hi @nathanrboyer ! I propose to let this open! I am not sure yet the best approach, let's see if anyone can bring more information for us. I really want to support titles in Markdown, I am not sure what is the optimal way to do so. |
Sounds good. Well, the nice thing about markdown is that it still looks pretty good even if some elements aren't completely transformed, so I don't think people will get too upset. The example from the Quarto documentation looks like this here on Github:
: Demonstration of pipe table syntax If you want to support multiple standards, then that may just need to be a new markdown-specific keyword argument:
|
Yes! Probably we can add a keyword to change the style (not only for the title, but maybe for other features as well). |
Switching from the
:text
to:markdown
backend yielded mostly the same table, except my title was removed.The text was updated successfully, but these errors were encountered: