Bullet list inside a table cell - latex

I want to create a table like what is shown in the figure, i.e. to have a bullet list of items in some of the table cells.
I tried to use simply the "itemize" environment within the "tabular" environment, like this:
\documentclass[12pt]{extarticle}
\begin{document}
\begin{table}
\centering
\begin{tabular}{| l | l | l | l |}
\hline
Verticals & Drivers & Enablers & 5G requirement \\
\hline
Education &
\begin{itemize}
\item Remote delivery
\item Immersive experiences
\end{itemize} &
\begin{itemize}
\item Video streaming
\item Augmented reality
\item Virtual reality
\end{itemize} &
\begin{itemize}
\item Large bandwidth
\item Low latency
\end{itemize} \\
\hline
\end{tabular}
\end{table}
\end{document}
But it doesn't work and pops up this error:
! LaTeX Error: Something's wrong--perhaps a missing \item.
Does anyone know the cause of the error? By search, I realized that this technique is correct and using items inside a table is possible. But I cannot figure out the problem in my code.

You need a column of fixed width, e.g. m{4cm} instead of l
\documentclass[12pt]{extarticle}
\usepackage{geometry}
\usepackage{array}
\begin{document}
\begin{table}
\centering
\setlength{\leftmargini}{0.4cm}
\begin{tabular}{| m{2cm} | m{4cm} | m{4cm} | m{4cm} |}
\hline
Verticals & Drivers & Enablers & 5G requirement \\
\hline
Education &
\begin{itemize}
\item Remote delivery
\item Immersive experiences
\end{itemize} &
\begin{itemize}
\item Video streaming
\item Augmented reality
\item Virtual reality
\end{itemize} &
\begin{itemize}
\item Large bandwidth
\item Low latency
\end{itemize} \\
\hline
\end{tabular}
\end{table}
\end{document}

Related

How to remove the spacing in the itemize function in a table

I am trying to use the following code in the table using latex
\begin{table}[htb!]
\caption {Table}
\begin{center}
\small\setlength\tabcolsep{5.2pt}
\renewcommand{\arraystretch}{0.005}
\begin{tabular}{|p{0.14\textwidth}|p{0.14\textwidth}|p{0.14\textwidth}|}
\hline
\textbf{Text}& \textbf{Text} & \textbf{Text}\\
\hline
Text & \begin{itemize} \item{Text} \item {Text} \item \end{itemize} & Text \\
\hline
\hline
\end{tabular}
\label{tab1}
\end{center}
\end{table}
How to make the Text using the itemize to align to the left and remove the spacing between each bullet points as shown in the photo
How to remove or decrease the row spacing in the table
The following code should align the itemize text to the left and remove the spacing between bullet points:
\begin{itemize}[leftmargin=*, noitemsep, topsep=0pt]
\item Text
\item Text
\end{itemize}
To decrease the row spacing in the table, you can use the following command in the preamble:
\renewcommand{\arraystretch}{0.5}
Or you can adjust the number in the argument to set the desired row spacing.
You need to load enumitem to gain access to addition options. Then, either apply settings in-place for a specific list or clone itemize with additional settings.
In settings, you have to negate vertical spacing added by environments. But then, this messes up with the lists which you want to mix with a regular texts. So, one workaround is to clone itemize into two separate lists you use with or without surrounding text--you can still apply global settings common for two lists. Here's an example:
\documentclass{article}
\usepackage{array}
\usepackage{tabularx}
\usepackage{enumitem}
\newlist{tabitemize}{itemize}{1}
\newlist{soloitemize}{itemize}{1}
\setlist[tabitemize,soloitemize]{
nosep, nolistsep,
topsep=6pt,
align=left,
left=0pt,
label=$\bullet$,
}
\setlist*[soloitemize]{
before=\vspace{\dimexpr-6pt-\topsep},
after=\vspace{-10pt},
}
\begin{document}
Regular text with a regular itemize:
\begin{itemize}
\item Text
\item Text
\item X
\end{itemize}
\begin{table}[htb!]
\renewcommand*{\arraystretch}{1.25}
\caption {Table with custom itemize}
\begin{center}
\small\setlength\tabcolsep{5.2pt}
\begin{tabular}{|p{0.14\textwidth}|p{0.14\textwidth}|p{0.14\textwidth}|}
\hline
\textbf{Text} & \textbf{Text} & \textbf{Text}\\
\hline
Text & \begin{soloitemize}
\item Text
\item Text
\item Text
\item Text
\item X
\end{soloitemize} & Text text
\begin{tabitemize}
\item Text
\item X
\end{tabitemize}
Text \\
\hline
\hline
\end{tabular}
\label{tab1}
\end{center}
\end{table}
Regular text.
\end{document}

center and align item within enumerate latex

I would like to align my equations for nicely in latex. My problem is that those equations represent conditions with that they need to be numerated. What I have now numerates my equation but my first equation is not align with the others. Any suggestion?
\begin{center}
\begin{enumerate}
\centering
\item $f_k(x_k)=y_k$
\item $f_k(x_{k+1})=f_{k+1}(x_{k+1})$
\item $f^\prime_k(x_{k+1})=f^\prime_{k+1}(x_{k+1})$
\item $f^{\prime\prime}_k(x_{k+1})=f^{\prime\prime}_{k+1}(x_{k+1})$
\end{enumerate}
\end{center}
Blockquote
Hello you may use a minipage and delete the \centering.
I also added the \fbox just to see the borders of the minipage, you may take it out if you wish.
\begin{center}
\fbox{
\begin{minipage}{2in}
\begin{enumerate}
\item $f_k(x_k)=y_k$
\item $f_k(x_{k+1})=f_{k+1}(x_{k+1})$
\item $f^\prime_k(x_{k+1})=f^\prime_{k+1}(x_{k+1})$
\item $f^{\prime\prime}_k(x_{k+1})=f^{\prime\prime}_{k+1}(x_{k+1})$
\end{enumerate}
\end{minipage}
}
\end{center}

Overfull \hbox (1.38991pt too wide) in paragraph at lines, Latex warning even though PDF is getting generated

This below latex code has warning saying Overfull \hbox (1.38991pt too wide) in paragraph at lines; pdf is getting generated without any issue, I am trying to find out where exactly I am making a mistake to see that warning.
Latex code1:
\begin{document}
\setbeamertemplate{caption}[numbered]
\begin{frame}
\titlepage
\end{frame}
Latex code2:
%\section{Literature Review}%
\begin{frame}{OBJECTIVE}
\begin{table}[h!]
\centering
\begin{tabular}{ p{3cm}|p{7cm}}
\hline
\vspace{1pt}
Title & “CompaRob:The shopping cart assistance robot" \textit{’ Int. J. Distrib. Sensor Netw., vol. 12,no. 2, Feb. 2016, Art. no. 4781280.} \\
\hline
\vspace{6mm}
Methodology &
\begin{itemize}
\item Radio and ultrasound signals
\item Provide freedom of movements for elderly people
\end{itemize}\\
\hline
\vspace{1pt}
Demerit &
\begin{itemize}
\item Not able to show how to find a product
\end{itemize}\\
\hline
\end{tabular}
\end{table}
\end{frame}
There is not enough space to fit 10 cm worth of columns and the default padding before and after the columns. Either remove the padding by using #{}p{2.9cm}|p{7cm}#{} or make the columns a bit smaller:
\documentclass{beamer}
\begin{document}
\setbeamertemplate{caption}[numbered]
\begin{frame}
\titlepage
\end{frame}
%\section{Literature Review}%
\begin{frame}{OBJECTIVE}
\begin{table}[h!]
\centering
\begin{tabular}{ p{2.9cm}|p{7cm}}
\hline
\vspace{1pt}
Title & “CompaRob:The shopping cart assistance robot" \textit{’ Int. J. Distrib. Sensor Netw., vol. 12,no. 2, Feb. 2016, Art. no. 4781280.} \\
\hline
\vspace{6mm}
Methodology &
\begin{itemize}
\item Radio and ultrasound signals
\item Provide freedom of movements for elderly people
\end{itemize}\\
\hline
\vspace{1pt}
Demerit &
\begin{itemize}
\item Not able to show how to find a product
\end{itemize}\\
\hline
\end{tabular}
\end{table}
\end{frame}
\end{document}

Centering table in itemize environment

I would like to include a centered tabular inside an itemize environment item, is this possible? This is what I am working with, but I can't find a way to center the tabular. Paragraphs are not allowed inside items...
\documentclass{article}
\begin{document}
\begin{itemize}
\item Text before tabular
\newline
\begin{tabular}{ccc}
a & b & c \\
a & b & c \\
\end{tabular}
\newline
text after tabular
\item second item
\end{itemize}
\end{document}
Do you want the table centered relative to the other list contents or to the whole page?
For the whole page, what is wrong with the obvious solution:
\newenvironment{nscenter}
{\parskip=0pt\par\nopagebreak\centering}
{\par\noindent\ignorespacesafterend}
\begin{itemize}
\item Text before tabular
\begin{nscenter}
\begin{tabular}{ccc}
a & b & c \\
a & b & c \\
\end{tabular}
\end{nscenter}
text after tabular
\item second item
\end{itemize}
(with credit to this answer).
For centering relative to the other contents, this works:
\begin{itemize}
\item \begin{tabular}[t]{#{}l#{}}
Text before tabular\\
\multicolumn{1}{c}{
\begin{tabular}{ccc}
a & b & c \\
a & b & c \\
\end{tabular}}\\
Text after tabular\\
\end{tabular}
\item Second item
\end{itemize}
But I admit that it's not very pretty. Maybe someone else has a better solution?

How to display my table "outside" an itemize structure so it will be centered in the page?

I have a document with an itemize structure and some table to display inside it. It have 3 subitem and the table is in the third one.
Here is an example:
\documentclass{article}%
\usepackage{amsmath}%
\usepackage{amsfonts}%
\usepackage{amssymb}%
\usepackage{graphicx}
\begin{document}
\begin{itemize}
\item Item1
\begin{itemize}
\item Subitem1
\begin{itemize}
\item Subsubitem1
\begin{center}
\begin{tabular}{ |l|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c| }
\hline
S & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 17 & 18 & 19 & 20 & 21 & 22 & 23 & 24 & 25 & 26 & 27 & 28 \\
\hline
B & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
\hline
H & \multicolumn{4}{c|}{F} & \multicolumn{4}{c|}{0} & \multicolumn{4}{c|}{F} & \multicolumn{4}{c|}{0} & \multicolumn{4}{c|}{0} \\
\hline
\end{tabular}
\end{center}
\item Subsubitem2
\end{itemize}
\item Subitem2
\end{itemize}
\item Item2
\end{itemize}
\end{document}
My problem is, when I generate my document the table is aligned with the previous item while I would like it to be centered in the page.
I tried using \end{itemize} before the table and \begin{itemize} like that
\end{itemize}
\end{itemize}
\begin{center}
%the table
\end{center}
\begin{itemize}
\begin{itemize}
but my compiler (pdflatex) generates an error "Something's wrong--perhaps a missing \item" at the second \begin{itemize}
I also tried to use a minipage
\begin{minipage}[c]{\textwidth}
\end{itemize}
\begin{center}
%the table
\end{center}
\begin{itemize}
\end{minipage}
But with no more success.
So here is my question:
How to display my table "outside" the itemize so it will be centered in the page?
Thanks in advance
your first strategy works, you just missed one level of itemize (3, not 2).
\begin{document}
\begin{itemize}
\item Item1
\begin{itemize}
\item Subitem1
\begin{itemize}
\item Subsubitem1
\end{itemize}
\end{itemize}
\end{itemize}
\begin{center}
[table]
\end{center}
\begin{itemize}
\item[] % we need an item here so make one with no bullet
\begin{itemize}
\item[] % as above
\begin{itemize}
\item Subsubitem2
\end{itemize}
\item Subitem2
\end{itemize}
\item Item2
\end{itemize}
\end{document}

Resources