Hello,
I have an alignment problem when using a too long sentence (as itemize) in a table. I have attached my code and would be very thankful if anyone could help me. The code shows my table two times ..the second table shows the problem ....
Cheers!!
\documentclass[final,5p,times,twocolumn,authoryear]{elsarticle}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{color}
\usepackage{longtable}
\usepackage{hyperref}
\usepackage{stfloats}
\newenvironment{zenumerate}{\newcounter{zitem}\setcounter{zitem}{0}}
{}
\newcommand\zitem{\refstepcounter{zitem}\thezitem. }
\usepackage{natbib}
\journal{Coastal and Marine Management}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\onecolumn
\begin{longtable}{p{0.4\textwidth}p{0.6\textwidth}}
\hline \hline\\
\begin{enumerate}[A.]
\item The sun is
\begin{enumerate}[1.]
\item The ocean is
\item Snow is?
\end{enumerate}
\item Coffee is
\end{enumerate} &
\begin{enumerate}[ ]
\item yellow
\begin{enumerate}[ ]
\item blue
\item white
\end{enumerate}
\item yammie
\end{enumerate}
\end{longtable}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{longtable}{p{0.4\textwidth}p{0.6\textwidth}}
\hline \hline\\
\begin{enumerate}[A.]
\item The sun is?
\begin{enumerate}[1.]
\item The ocean is
\item Snow is?
\end{enumerate}
\item Coffee is
\end{enumerate} &
\begin{enumerate}[ ]
\item yellow
\begin{enumerate}[ ]
\item blue
\item white! And when too many people walk on it, or cars drive over and over its really baehhhhhhh
\end{enumerate}
\item yammie
\end{enumerate}
\end{longtable}
\end{document}
General ⇒ table and itemize
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: table and itemize
what is the problem? is it running away from the paper? is the text aligned differently?
Re: table and itemize
Hey, thanks a lot for posting. The alignment is wrong. In my table if a sentence on the right column is too long, then it continues into the next line, which makes sense. But on the left side of the column there is already the next item instead of a empty line.
So it says in the table
left side: right side:
Snow is? white
Coffee is? yammie
now lets say there is a long answer:
Snow is ? white! And when too many people walk on it, or cars drive over and its
Coffee is ? really baehhhhhhh
yammie
I tried with "&" and all sort off other stuff..but I'm running out of ideas....thanks!
So it says in the table
left side: right side:
Snow is? white
Coffee is? yammie
now lets say there is a long answer:
Snow is ? white! And when too many people walk on it, or cars drive over and its
Coffee is ? really baehhhhhhh
yammie
I tried with "&" and all sort off other stuff..but I'm running out of ideas....thanks!
Re: table and itemize
sorry...the text in my example shifted a bit. yammie does appear on the right side of the column were it should be, just not with coffee.
Hope this makes sense...
Thanks in advance!
Hope this makes sense...
Thanks in advance!
Re: table and itemize
I am still not sure what you mean. Does this do any good?
http://en.wikibooks.org/wiki/LaTeX/Tabl ... _in_tables
http://en.wikibooks.org/wiki/LaTeX/Tabl ... _in_tables
Re: table and itemize
Hey, thanks a lot. I saw this page already and tried it with including an & to separate the lines, but it doesn't work as soon as I use the /item in a longtable I get an error message.
I love Latex, but this is so frustrating....
Thanks so much for your help though
I love Latex, but this is so frustrating....
Thanks so much for your help though
