Suppose that I have 3 types of tables in an org file, A latex table, an org-table, and a html-table. How can we to export these table as html tables when org-exporting to html?
# #+BEGIN_LaTeX
# \begin{table}
# \begin{center}
# \begin{tabular}{l c }
# \hline
# & Model 1 \\
# \hline
# (Intercept) & $0.06$ \\
# & $(0.10)$ \\
# x & $1.02^{***}$ \\
# & $(0.10)$ \\
# \hline
# R$^2$ & 0.53 \\
# Adj. R$^2$ & 0.53 \\
# Num. obs. & 100 \\
# RMSE & 1.05 \\
# \hline
# \multicolumn{2}{l}{\scriptsize{$^{***}p<0.001$, $^{**}p<0.01$, $^*p<0.05$}}
# \end{tabular}
# \caption{Statistical models}
# \label{table:coefficients}
# \end{center}
# \end{table}
# #+END_LaTeX
|-----------+-----|
| groceries | qty |
|-----------+-----|
| apple | 1 |
| banana | 5 |
|-----------+-----|
#+BEGIN_HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<table cellspacing="0" align="center" style="border: none;">
<caption align="bottom" style="margin-top:0.3em;">Statistical models</caption>
<tr>
<th style="text-align: left; border-top: 2px solid black; border-bottom: 1px solid black; padding-right: 12px;"></th>
<th style="text-align: left; border-top: 2px solid black; border-bottom: 1px solid black; padding-right: 12px;"><b>Model 1</b></th>
</tr>
<tr>
<td style="padding-right: 12px; border: none;">(Intercept)</td>
<td style="padding-right: 12px; border: none;">-0.10</td>
</tr>
<tr>
<td style="padding-right: 12px; border: none;"></td>
<td style="padding-right: 12px; border: none;">(0.11)</td>
</tr>
<tr>
<td style="padding-right: 12px; border: none;">x</td>
<td style="padding-right: 12px; border: none;">1.33<sup style="vertical-align: 0px;">***</sup></td>
</tr>
<tr>
<td style="padding-right: 12px; border: none;"></td>
<td style="padding-right: 12px; border: none;">(0.11)</td>
</tr>
<tr>
<td style="border-top: 1px solid black;">R<sup style="vertical-align: 0px;">2</sup></td>
<td style="border-top: 1px solid black;">0.60</td>
</tr>
<tr>
<td style="padding-right: 12px; border: none;">Adj. R<sup style="vertical-align: 0px;">2</sup></td>
<td style="padding-right: 12px; border: none;">0.59</td>
</tr>
<tr>
<td style="padding-right: 12px; border: none;">Num. obs.</td>
<td style="padding-right: 12px; border: none;">100</td>
</tr>
<tr>
<td style="border-bottom: 2px solid black;">RMSE</td>
<td style="border-bottom: 2px solid black;">1.07</td>
</tr>
<tr>
<td style="padding-right: 12px; border: none;" colspan="2"><span style="font-size:0.8em"><sup style="vertical-align: 0px;">***</sup>p < 0.001, <sup style="vertical-align: 0px;">**</sup>p < 0.01, <sup style="vertical-align: 0px;">*</sup>p < 0.05</span></td>
</tr>
</table>
#+END_HTML
by-backend
macro which allows you to export the same block (of code) differently, depending on the backend (LaTeX blocks can be also inserted as blocks of code): orgmode.org/worg/org-contrib/babel/languages/…