Open friosavila opened 1 year ago
Yeah, HTML support in esttab
is very primitive. I would suggest to pack the header into thead
, then each equation into a separate tbody
, the footer containing the summary stats also in a tbody
, and the notes at the end either in tfoot
or in tbody
(tfoot
would seem natural, but tfoot
is repeated when a table is larger than a page, I believe; this seem not what one usually would want, even it it is only relevant for printing; so tend to tbody
for the notes, not to tfoot
).
It is not much of an issue to add an improved HTML option, but I would not want to change the default (changing defaults in esttab
does not seem like a good idea because the program has been around so long and so many people are using it). So I could either add another format type, like html2
(do you have a suggestion for a better name?) or add an extra option that changes the behavior of html
(do you have a suggestion for a good name for such an option?). Yet another possibility would be to add thead
, tbody
, etc. once the user types option nolines
, an option that already exists. This would maybe be slightly unintuitive, but it would do the trick... Do you have any thoughts on this?
Hi Ben Thank you for your quick reply. My main motivation for changing the older behaivior to one that uses "thead" and "tbody" is that im trying to use Quarto combined with Stata (nbstata) to make more dynamic texts. Right now, im still exploring few options, including table creations using tex, as well as html. This is how i found the problem/suggestion I mentioned.
I think using html2 would suffice. However, If i may,it would be extremely convinient if one other things could be added.
To easily add html tables in quarto syntax, i find that one can use {{< include name.html>}}. However, for it to work correctly with Quarto, the HTML file needs to start with ```{=html} and finalize with ``` Could something like that be added? perhaps under "quarto" option?
Thank you! Fernando
On Wed, Aug 23, 2023 at 4:33 PM Ben Jann @.***> wrote:
Yeah, HTML support in esttab is very primitive. I would suggest to pack the header into thead, then each equation into a separate tbody, the footer containing the summary stats also in a tbody, and the notes at the end either in tfoot or in tbody (tfoot would seem natural, but tfoot is repeated when a table is larger than a page, I believe; this seem not what one usually would want, even it it is only relevant for printing; so tend to tbody for the notes, not to tfoot).
It is not much of an issue to add an improved HTML option, but I would not want to change the default (changing defaults in esttab does not seem like a good idea because the program has been around so long and so many people are using it). So I could either add another format type, like html2 (do you have a suggestion for a better name?) or add an extra option that changes the behavior of html (do you have a suggestion for a good name for such an option?). Yet another possibility would be to add thead, tbody, etc. once the user types option nolines, an option that already exists. This would maybe be slightly unintuitive, but it would do the trick... Do you have any thoughts on this?
— Reply to this email directly, view it on GitHub https://github.com/benjann/estout/issues/60#issuecomment-1690598943, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZKKFWZRE72ZWA7KVQMXUTXWZSH5ANCNFSM6AAAAAA334GSO4 . You are receiving this because you authored the thread.Message ID: @.***>
Hi Ben, I was wondering if I could request a "small" change (or option) for esttab when exporting regression results to HTML (although it may also affect other type of tasks)
Consider the following example:
which produces the following:
* p < 0.05, ** p < 0.01, *** p < 0.001
You will notice those lines between the heading and body of the table. So, would it be possible to change lines like
<tr><td colspan=2><hr></td></tr>
with<thead><\thead>
and<body><\tbody>
, so something like the following would be produced?* p < 0.05, ** p < 0.01, *** p < 0.001
Modified HTML file