Correct way to use "enumitem" (or its alternatives) for itemize in Latex Beamer - latex

I'm trying to customize my itemize list in a Beamer slide using the noitemsep and topsep settings available in the enumitem package. However, using enumitem with Beamer causes the bullet points to disappear (images attached below). I also came to know that enumitem isn't really compatible with Beamer, and should not be used alongside the enumerate package, but I can't figure out what alternatives are available for my use case.
When I don't use enumitem
\begin{frame}
\begin{itemize}
\item Apples
\item Oranges
\item Bananas
\end{itemize}
\end{frame}
Output (contains bullet points):
When I use enumitem:
\usepackage{enumitem}
\begin{frame}
\begin{itemize}[noitemsep]
\item Apples
\item Oranges
\item Bananas
\end{itemize}
\end{frame}
Output (the bullets have disappeared):
Any hints regarding what settings I should use with enumitem when using Beamer, or what other alternative packages I can use (which is more compatible with Beamer) which can fulfill my objective, would be greatly appreciated.

Don't use enumitem with beamer, it is not compatible.
You can adjust the spacing in various ways, either locally or globally.
\documentclass{beamer}
\begin{document}
\begin{frame}
text
\vskip-1ex
\begin{itemize}
\addtolength{\itemsep}{-1ex}
\item Apples
\item Oranges
\item Bananas
\end{itemize}
\end{frame}
\end{document}
\documentclass{beamer}
\usepackage{xpatch}
\xpatchcmd{\itemize}
{\def\makelabel}
{%
\addtolength{\itemsep}{-1ex}%
\def\makelabel%
}
{}
{}
\BeforeBeginEnvironment{itemize}{\vskip-1ex}
\begin{document}
\begin{frame}
text
\begin{itemize}
\item Apples
\item Oranges
\item Bananas
\end{itemize}
\end{frame}
\end{document}

Related

Equation and bulleted list

I would like create an bulleted list that contain and equation, how can I do? I have tru this but is not working and it gives me error. The package is already present in the code
\usepackage{amsmath}
\begin{itemize}
\begin{align*}
\item X_i it is a ...
\end{align*}
\end{itemize}
This is my base:
https://it.overleaf.com/latex/templates/template-lucas/tnzgmxxqppwh
Your items seem to be mainly normal text, so I suggest to use inline math for the math parts:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{itemize}
\item $X_i$ it is a ...
\end{itemize}
\end{document}

Switch Overlay Specification in Latex Beamer

I have a beamer document with
\beamerdefaultoverlayspecification{<+->}
in the preamble to make \items appear separately. However, this seems to also make \bibitems
appear separately. How can I switch back to 'normal' within the document, such that all bibitems appear on one slide?
You can change the default overlay specification before the bibliography:
\documentclass{beamer}
\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}
\beamerdefaultoverlayspecification{<+->}
\begin{document}
\begin{frame}
\begin{itemize}
\item content...
\item content...
\end{itemize}
\end{frame}
\beamerdefaultoverlayspecification{}
\begin{frame}
\nocite{knuth:ct,angenendt}
\printbibliography
\end{frame}
\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}

I want to use figures as [item] in latex

In latex, I can use itemize and \item as follows.
\begin{itemize}
\item ...
\end{itemize}
I also can write as follows.
\begin{itemize}
\item[(any strings)] ...
\end{itemize}
However I can't write as follows.
\begin{itemize}
\item[\includegraphics{imagename}] ...
\end{itemize}
I want to use figures as \item of itemize in latex.
Any ideas?
The more robust way of doing this is to enclose the \includegraphics within braces. This way, you can also set optional parameters if you need to.
\begin{itemize}
\item[{\includegraphics{imagename}}]
\item[{\includegraphics[scale=.5]{imagename}}]
\end{itemize}
I think the solution is to switch from
\item[\includegraphics{imagename}] ...
to
\item \includegraphics{imagename} ...
The following code, for example, should compile smoothly:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{itemize}
\item \includegraphics{test.jpg} some text
\item \includegraphics{test.jpg} some other
\end{itemize}
\end{document}
(make sure you have a test image file test.jpg in the same folder of your .tex file before compiling).
Other thing is to use \item[...] to change the item mark:
\begin{itemize}
\item[$\bullet$] \includegraphics{test.jpg} some text
\item[$\diamond$] \includegraphics{test.jpg} some other
\end{itemize}
Finally, if you have a small/icon size image in your folder (one, test.jpg, or more), you can try this variation:
\begin{itemize}
\item[] \includegraphics{test.jpg} some text
\item[] \includegraphics{test.jpg} some other
\end{itemize}
Although Matt solution solved your problem, I believe that it is not exactly what you was looking for. From what I understand you want to use your own images instead of default dots of \item in \itemize. Best solution 3 leads to "space_aka_different_dot image text", so your image won't be exactly in dot place - emptiness will. You should try instead:
\begin{itemize}
\item[$\includegraphics{test.jpg}$] text
\end{itemize}

Latex Remove Spaces Between Items in List

What is the best way to format a list as to remove the spaces between list items.
It's easier with the enumitem package:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
Less space:
\begin{itemize}[noitemsep]
\item foo
\item bar
\item baz
\end{itemize}
Even more compact:
\begin{itemize}[noitemsep,nolistsep]
\item foo
\item bar
\item baz
\end{itemize}
\end{document}
The enumitem package provides a lot of features to customize bullets, numbering and lengths.
The paralist package provides very compact lists: compactitem, compactenum and even lists within paragraphs like inparaenum and inparaitem.
You could do something like this:
\documentclass{article}
\begin{document}
Normal:
\begin{itemize}
\item foo
\item bar
\item baz
\end{itemize}
Less space:
\begin{itemize}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
\item foo
\item bar
\item baz
\end{itemize}
\end{document}
This question was already asked on https://tex.stackexchange.com/questions/10684/vertical-space-in-lists. The highest voted answer also mentioned the enumitem package (here answered by Stefan), but I also like this one, which involves creating your own itemizing environment instead of loading a new package:
\newenvironment{myitemize}
{ \begin{itemize}
\setlength{\itemsep}{0pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt} }
{ \end{itemize} }
Which should be used like this:
\begin{myitemize}
\item one
\item two
\item three
\end{myitemize}
Source: https://tex.stackexchange.com/a/136050/12065
compactitem does the job.
\usepackage{paralist}
...
\begin{compactitem}[$\bullet$]
\item Element 1
\item Element 2
\end{compactitem}
\vspace{\baselineskip} % new line after list

Resources