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

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}

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}

An alternative to write multirow in latex's tabular?

In latex, I know we can use the multirow command like the following,
\begin{table}[!h]
\centering
\begin{tabular}{|c|l|}
\hline
\multirow{2}{*}{A}
& I want to place this sentence in multiple lines, \\
& but don't want to control the linebreak myself \\
\hline
\end{tabular}
\end{table}
I think it is so stupid to control the linebreak myself.
Any other alternative that fits the text width to line width?
\documentclass{article}
\usepackage{tabularx}
\renewcommand\tabularxcolumn[1]{m{#1}}
\begin{document}
\begin{table}[htbp]
\centering
\begin{tabularx}{\linewidth}{|c|X|}
\hline
A
& I want to place this sentence in multiple lines, but don't want to control the linebreak myself \\
\hline
\end{tabularx}
\end{table}
\end{document}

Bullet list inside a table cell

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}

How to rename tables?

I'm writing a paper in Spanish, and I need the name of my tables as "Tabla," not as "Cuadro" which is the current name.
I used the command:
\renewcommand{\tablename}{Tabla}
But it is not working, as nothing changes. I do not have any error when compiling, and the name of my table is still "Cuadro".
\documentclass[journal]{IEEEtran}
\usepackage[utf8]{inputenc}
\usepackage[spanish, english]{babel}
\usepackage{graphicx}
\usepackage{amsmath}
\spanishdecimal{.}
\begin{document}
\renewcommand{\tablename}{Tabla}
\newcommand\Tstrut{\rule{0pt}{2.6ex}}
\newcommand\Bstrut{\rule[-0.9ex]{0pt}{0pt}}
\begin{table}[h!]
\begin{center}
\caption{Title}
\label{label1}
\centering
\begin{tabular}{c}
\hline \rule[-1ex]{0pt}{2.5ex}something A \Tstrut\Bstrut\\
\rule[-1ex]{0pt}{2.5ex} Something B \Tstrut\Bstrut \\
\rule[-1ex]{0pt}{2.5ex}Something C\Tstrut\Bstrut \\
\hline
\end{tabular}
\end{center}
\end{table}
\end{document}
There is a special option es-tabla for the babel package.
Some other points:
if the main language of your document is Spanish, this should be the last language loaded in the options of the babel package, e.g. after english
the floating specifier [h!] is almost a guarantee for bad image placement, better use something like [htbp]
\documentclass[journal]{IEEEtran}
\usepackage[utf8]{inputenc}
\usepackage[english,spanish,es-tabla]{babel}
\usepackage{graphicx}
\usepackage{amsmath}
\spanishdecimal{.}
\newcommand\Tstrut{\rule{0pt}{2.6ex}}
\newcommand\Bstrut{\rule[-0.9ex]{0pt}{0pt}}
\begin{document}
\begin{table}[htbp]
\begin{center}
\caption{Title}
\label{label1}
\centering
\begin{tabular}{c}
\hline \rule[-1ex]{0pt}{2.5ex}something A \Tstrut\Bstrut\\
\rule[-1ex]{0pt}{2.5ex} Something B \Tstrut\Bstrut \\
\rule[-1ex]{0pt}{2.5ex}Something C\Tstrut\Bstrut \\
\hline
\end{tabular}
\end{center}
\end{table}
\end{document}

Resources