## LaTeX forum ⇒ General ⇒ Problems with itemize in tabular and footnotes

LaTeX specific issues not fitting into one of the other forums of this category.
avp3000
Posts: 49
Joined: Thu Nov 15, 2007 4:22 pm

### Problems with itemize in tabular and footnotes

Hi,

I have to quick questions:

1. Here the source code of a table I am trying to create:

\begin{table}\begin{tabular}{|l|l|}\hline\multicolumn{2}{c}{\textbf{Alternative Climate-Policy Approaches}}\\\hline\begin{itemize}     \item carbon taxes     \item carbon quotas\end{itemize}&\begin{itemize}     \item subsidies to R\&D in low-carbon technologies     \item public-sector R\&D in low-carbon technologies\end{itemize}\\ \hline\end{tabular}\end{table}

As you see, I want to have a heading, than two heading for the two columns and than a bullet list in every column. However, I get the messeage: "! Latex error: Something's wrong--perhaps a missing \item".

Any ideas why this happens?

2. To produce footnotes, I just use the \footnote{} command right after the word(e.g. dog\footnote{a black one}). However, in the compiles version, the footnotes appear, in my opinion, too close to the words with no space between the last letter of the word and the number of the footnote. Why is that?

Thank you very much

Stefan Kottwitz
Posts: 8075
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Hi,

1. you could use \parbox or minipages or just p-columns:
\begin{tabular}{|p{0.4\textwidth}|p{0.4\textwidth}|}

2. In my opinion the spacing is ok (without additional space), test the other case how it would look like with space:
Some Text~\footnote{Test}.

Stefan

black-wolf
Posts: 7
Joined: Wed Jul 02, 2008 10:58 pm
Hello,

As far as I know you can't have itemize environment inside a tabular one. (If anyone knows how to do it I would appreciate it )

You need to number it by hand.

Where's an example

Best regards

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Location: Colombia
black-wolf wrote:...As far as I know you can't have itemize environment inside a tabular one...

Of course you can. In the post immediately before yours, Stefan_K explained how it is possible to use the list-like environments inside a tabular:
\documentclass{article} \begin{document} \begin{tabular}{|p{5cm}|}   \hline   \begin{itemize}     \item First item   \end{itemize} \\ \hline   \begin{enumerate}     \item First item   \end{enumerate} \\ \hline   \begin{description}     \item[Descriptor] First item   \end{description} \\ \hline \end{tabular} \end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...

avp3000
Posts: 49
Joined: Thu Nov 15, 2007 4:22 pm
Hello everybody,

Thanks, Stephan_K, probably the \parbox and minipage are exactly what I need. The funny thing is the following works:

\begin{tabularx}{220mm}{|>{\centering\arraybackslash}X|>{\centering\arraybackslash}X|}     \hline{\center{\textbf{\emph{Rein öffentliches Gut}}}} & {\center{\textbf{\emph{Klubgüter}}}}\\  \begin{small}     \bxi   \item Nationale Verteidigung   \item Nicht überfüllte Straßen und Autobahnen ohne Maut   \item Rundfunk \& TV „over the air“   \item Software ohne Kopierschutz     \exi  \end{small}     &  \begin{small}     \begin{itemize}     \item Nicht überfüllte Strassen und Autobahnen mit Maut    \item Vorlesung mit freien Plätzen    \item Software mit Kopierschutz    \item Innovationen mit Patentschutz     \end{itemize}   \end{small}     \\ \hline \end{tabularx}

bxi and exi are \begin{itemize} with a modified interitem space. However, I just don't understand what's make this example work and the other not. The only difference I see is that there I use \begin{small}.

Gmedina, I thought about the method that you suggest. The problem with it, however, is that this way there is too much space between the single items and I should modify it manually, which, of course, makes the whole thing pointless - if I should do something manually, than better just put $\bullet$ in front of every line. But thanks again all of you for the advices.

Cheers,
Alex

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Location: Colombia
avp3000 wrote:...Gmedina, I thought about the method that you suggest. The problem with it, however, is that this way there is too much space between the single items and I should modify it manually, which, of course, makes the whole thing pointless - if I should do something manually, than better just put $\bullet$ in front of every line. But thanks again all of you for the advices.

Cheers,
Alex

Hi avp3000,

You can control this space automatically:
\documentclass{article} \begin{document} %Using the standar \itemsep value\begin{tabular}{|p{5cm}|}   \hline   \begin{itemize}     \item First item     \item Second item     \item Third item   \end{itemize} \\ \hline\end{tabular} \vspace{1cm} %Setting \itemsep to 0pt\begin{tabular}{|p{5cm}|}   \hline   \begin{itemize}     \setlength\itemsep{0pt}     \item First item     \item Second item     \item Third item   \end{itemize} \\ \hline\end{tabular} \end{document}

You can even use the enumitem package to further easily customise your list-like environments.

avp3000 wrote:...I just don't understand what's make this example work and the other not...

You are using the X specifier provided by tabularx package. Internally, after some calculations, this will be traduced as p{some value}, and as shown before, this allows using list-like environments. In the code in your first post you used the l specifier for the column format and this specifier (as c or r) does not allow the use of those list-like environments.
1,1,2,3,5,8,13,21,34,55,89,144,233,...

jpaez
Posts: 1
Joined: Sun Jul 27, 2008 7:57 pm
To enumerate and to label what your you want in an environment to tabulate, longtable .... it(he,she) looks at this link ... where a new environment of enumeration develops .... I believe that it is for what you look.....
http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2008-02/msg00630.html

LatexMaster
Posts: 2
Joined: Mon Aug 23, 2010 12:48 pm
Hi all,
I found out why sometimes it works and sometimes not:

The following code works:
\begin{tabular}{|c|p{5cm}|p{5cm}|}   \hline   blabla & \begin{itemize}      \item First item	  \item Second item	  \item 3 item   \end{itemize} &\begin{enumerate}\item item 1\item item 2\item item 3  \end{enumerate} \\ \hline  other bla bla & \begin{enumerate}      \item First item	  \item Second item	  \item 3 item   \end{enumerate} & bla bla\\ \hline\end{tabular}

while this does not:
\begin{tabular}{|c|c|p{5cm}|}   \hline   blabla & \begin{itemize}      \item First item	  \item Second item	  \item 3 item   \end{itemize} &\begin{enumerate}\item item 1\item item 2\item item 3  \end{enumerate} \\ \hline  other bla bla & \begin{enumerate}      \item First item	  \item Second item	  \item 3 item   \end{enumerate} & bla bla\\ \hline\end{tabular}

The only difference is \begin{tabular}{|c|p{5cm}|p{5cm}|} and \begin{tabular}{|c|c|p{5cm}|}. If you put p{..} on the column with the items it works whereas the c option seems to crash. Why? I have no idea , but this is at least an easy solution.

Jarod.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Location: Colombia
LatexMaster wrote:Hi all,
I found out why sometimes it works and sometimes not[...]
The only difference is \begin{tabular}{|c|p{5cm}|p{5cm}|} and \begin{tabular}{|c|c|p{5cm}|}. If you put p{..} on the column with the items it works whereas the c option seems to crash. Why? I have no idea , but this is at least an easy solution.

1,1,2,3,5,8,13,21,34,55,89,144,233,...

LatexMaster
Posts: 2
Joined: Mon Aug 23, 2010 12:48 pm