GeneralProblems with itemize in tabular and footnotes

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

Problems with itemize in tabular and footnotes

Post by avp3000 »

Hi,

I have to quick questions:

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

Code: Select all

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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 :-)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Problems with itemize in tabular and footnotes

Post by Stefan Kottwitz »

Hi,

1. you could use \parbox or minipages or just p-columns:

Code: Select all

\begin{tabular}{|p{0.4\textwidth}|p{0.4\textwidth}|}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2. In my opinion the spacing is ok (without additional space), test the other case how it would look like with space:

Code: Select all

Some Text~\footnote{Test}.
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Stefan
LaTeX.org admin
User avatar
black-wolf
Posts: 7
Joined: Wed Jul 02, 2008 10:58 pm

Problems with itemize in tabular and footnotes

Post by black-wolf »

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
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Problems with itemize in tabular and footnotes

Post by gmedina »

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:

Code: Select all

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1,1,2,3,5,8,13,21,34,55,89,144,233,...
avp3000
Posts: 49
Joined: Thu Nov 15, 2007 4:22 pm

Problems with itemize in tabular and footnotes

Post by avp3000 »

Hello everybody,

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

Code: Select all

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Problems with itemize in tabular and footnotes

Post by gmedina »

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:

Code: Select all

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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

Problems with itemize in tabular and footnotes

Post by jpaez »

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 ... 00630.html
LatexMaster
Posts: 2
Joined: Mon Aug 23, 2010 12:48 pm

Problems with itemize in tabular and footnotes

Post by LatexMaster »

Hi all,
I found out why sometimes it works and sometimes not:

The following code works:

Code: Select all

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
while this does not:

Code: Select all

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Problems with itemize in tabular and footnotes

Post by gmedina »

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.
Did you even bother to read the answer I gave two replies before your post?
1,1,2,3,5,8,13,21,34,55,89,144,233,...
LatexMaster
Posts: 2
Joined: Mon Aug 23, 2010 12:48 pm

Problems with itemize in tabular and footnotes

Post by LatexMaster »

gmedina wrote:Did you even bother to read the answer I gave two replies before your post?
Oops, sorry I actually oversaw your last sentence.
Post Reply