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

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}

Related

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}

How can I make a list with itemize in a cell of table?

I'm trying to make this table:
But I haven't found the possibility to include a list in a cell.
You can use itemize in all column types which allow linebreaks, e.g. in a p column of fixed with:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{tabular}{|l|p{3cm}|}
\hline
abc & \begin{itemize}[left=0pt,topsep=0pt]
\item abc
\item def
\end{itemize}\nointerlineskip\\
\hline
abc & abc\\
\hline
\end{tabular}
\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?

LaTex items left alignment in resume writing

I am trying to write a resume with LaTex. Does anyone know how to left flush items? The code I use is
\documentclass[11pt, letterpaper]{article}
\usepackage[letterpaper, margin=0.75in]{geometry}
\usepackage{mdwlist}
\usepackage{sectsty}
\allsectionsfont{\centering}
\newcommand{\headerrow}[2]
{\begin{tabular*}{\linewidth}{l#{\extracolsep{\fill}}r}
#1 &
#2 \\
\end{tabular*}}
\begin{document}
\hrule
\vspace{-0.4em}
\subsection*{experience}
\begin{itemize}
\item[]
\headerrow
{\textbf{Teaching Inc.}}
{\textbf{Chicago, IL}}
\\
\headerrow
{\emph{Look and See}}
{\emph{Vision}}
\begin{itemize*}
\item This is A
\item This is B
\end{itemize*}
\end{itemize}
\end{document}
And I get a results like
My question is, how can I left flush those items to align with the horizontal line. No indent and make them similar to the right flushed "Chicago, IL" and "vision". Thank you!
The left indent is created by your first itemize environment. Since you don't use the item symbols, you should remove it and everything would be flushed to the left.
With this code there is no left indent :
\documentclass[11pt, letterpaper]{article}
\usepackage[letterpaper, margin=0.75in]{geometry}
\usepackage{mdwlist}
\usepackage{sectsty}
\allsectionsfont{\centering}
\newcommand{\headerrow}[2]
{\begin{tabular*}{\linewidth}{l#{\extracolsep{\fill}}r}
#1 &
#2 \\
\end{tabular*}}
\begin{document}
\hrule
\vspace{-0.4em}
\subsection*{experience}
\headerrow
{\textbf{Teaching Inc.}}
{\textbf{Chicago, IL}}
\\
\headerrow
{\emph{Look and See}}
{\emph{Vision}}
\begin{itemize*}
\item This is A
\item This is B
\end{itemize*}
\end{document}
If you really want to keep the items, a lot of solutions are proposed here : How to disable indentation of LaTeX list items?
NOTE : this question should be on https://tex.stackexchange.com/

Resources