I'd like to generate a table, using tabular, that looks like this
+-----------------+---------------+
| header1 | header2 | <--- header, centered
|1. djkfjsdalfkj |1. djhfjdhf |
|2. asdfdsjkfasd |2. sadhfdsj | <--- enumeration list
+----------------+----------------+
.
.
.
rest of table like the above
But I do not want to use paragraph option to tabular, since
then I would have to specify a size for the width. I do
not want to do this, since I'll process this .tex file with
latex2html (l2h), and I do not want the web page to
have fixed width in the browser. (I do not know
how big a window there will be), and I'd like the table
to resize with the window size automatically.
Is there a way to do it, using tabular, and just using 'c'?
(I need to stay with tabular since I know l2h supports this. If I go to fancy table packages, it might not work).
The problem is I can't add \begin{enumerate} when I
use 'c'. Hence this does not work:
\documentclass{article}
\begin{document}
\begin{tabular}{|c|c|}\hline
header1
\begin{enumerate}
\item dhfkjdshafkjds
\item hfdsjkhdsjkafsdaf
\end{enumerate}
&
header2
\begin{enumerate}
\item dhfkjdshafkjds
\item hfdsjkhdsjkafsdaf
\end{enumerate}
\\\hline
\end{tabular}
\end{document}
But if I replace {|c|c|} above by {|p{4in}|p{4in}|}
then it work since one can use \begin{enumerate} in a paragraph.
I looked at the examples here http://en.wikibooks.org/wiki/LaTeX/Tables and do not see how to do it.
Question is: How to use enumeration list in tabular without using p{size}
thanks
update: As I mentioned above, I'd like the solution to only use tabular. I am using latex2html to process the latex document to convert to HTML. And l2h does not support all the latex packages.
Warning: No implementation found for package: tabularx.
Warning: No implementation found for package: paralist..
This is the HTML page I get from running the solution below on latex2html

varwidthenvironment that would shrink to the natural width of its contents. Or you could even use aminipage. Is that an option? – Werner May 15 '12 at 18:12