List bullet problems in latex - latex

I want the effect:
Stage 1 xxxx
Stage 2 xxxx
Stage 3 xxxx
but the latex setting code
\begin{enumerate}[Stage 1]
produces
Stage 1 xxxx
Stbge 2 xxxx
Stcge 3 xxxx
Obviously latex take the character 'a' in stage as bullet starter. So how to set static characters in the parameter?

You'll have to hide the non-enumerable content from enumerate. There are a number of ways to achieve this:
\documentclass{article}
\usepackage{enumerate}
\begin{document}
% Default enumeration
\begin{enumerate}[Stage 1]
\item First
\item Second
\item Last
\end{enumerate}
% Hide non-enumerable content using {braces}
\begin{enumerate}[{Stage} 1]
\item First
\item Second
\item Last
\end{enumerate}
% Hide non-enumerable content using macros
\newcommand{\enumprefix}{Stage}
\begin{enumerate}[\enumprefix{} 1]
\item First
\item Second
\item Last
\end{enumerate}
\end{document}
enumitem provides a more explicit way of identifying the enumeration:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label={Stage \arabic*}]
\item First
\item Second
\item Last
\end{enumerate}
\end{document}

Related

LaTeX Beamer -- Nested itemize, vertical spacing isn't constant

I'm working on a beamer template and I'm struggling to customize my itemize environment. More precisely, I've troubles with the itemsep in my itemize environment. In general, I'm changing the font size for deeper levels (-> the font size becomes smaller) and that's where the problems begin.
In the appendix you can see a picture with three itemize levels (itemsep_not_constant). If you look closely, then you can see that the vertical spacing between the penultimate and the last items of the same level becomes smaller. This applies for the first level and for the second level.
I've noticed that this problem only occurs, if I add a another (deeper) itemize level with a different font size. Therefore, you can see that the vertical spacing between the items in the third level remains constant.
To get rid of this problem I've tried different approaches, e.g. defining a \newlist. After some research in the internet I've found out that it is recommended to use the \setbeamertemplate for customizations and to avoid using the itemize package (\usepackage{itemize}) in beamer.
Here's my MWE:
\documentclass[aspectratio=169,xcolor=table,12pt]{beamer}
% compile in pdfLaTeX
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[type=none]{fgruler} % ruler
\usepackage{xcolor}
\renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}
\definecolor{footerGrey}{RGB}{135,135,135}
\setbeamercolor*{normal text}{fg=footerGrey}
\setbeamertemplate{itemize/enumerate body begin}{\normalsize}
\setbeamertemplate{itemize/enumerate subbody begin}{\footnotesize}
\setbeamertemplate{itemize/enumerate subsubbody begin}{\scriptsize}
\setbeamertemplate{itemize item}{\color{footerGrey}\rule[0.9mm]{0.6ex}{0.6ex}}
\setbeamertemplate{itemize subitem}{\color{footerGrey}\rule[0.8mm]{0.6ex}{0.6ex}}
\setbeamertemplate{itemize subsubitem}{\color{footerGrey}\rule[0.5mm]{0.6ex}{0.6ex}}
\begin{document}
\begin{frame}
\fgruler{upperleft}{0cm}{0cm}%
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\begin{itemize}
\item Item 4
\item Item 5
\item Item 6
\begin{itemize}
\item Item 7
\item Item 8
\item Item 9
\item Item 10
\end{itemize}
\end{itemize}
\end{itemize}
\end{frame}
\end{document}
I'm running out of ideas and I'd really appreciate any help! Thank you and
DIFFERENT APPROACHES THAT HAVE BEEN TRIED:
define \setbeamertemplate (see case description);
another approach:
create a newlist and change the settings for each level
\setlist[unthaItemize,1]{font=\sffamily\bfseries\Huge,
label=\color{footerGrey}\rule[0.9mm]{0.6ex}{0.6ex},
align = left,
leftmargin = 0.025\paperwidth,
labelsep = 0pt,
labelwidth = 8pt,
itemindent= -0.5pt,
topsep = 2.5pt,
itemsep = 2.5pt,
}
\setlist[unthaItemize,2]{label=\color{footerGrey}\rule[0.8mm]{0.6ex}{0.6ex},
align = left,
leftmargin = 0.025\paperwidth,
labelsep = 0pt,
labelwidth = 8pt,
itemindent= -0.5pt,
topsep = 2.5pt,
itemsep = 2.5pt,
%before* = \fontsize{10pt}{10pt}\selectfont
}
etc.
You have to finish the paragraph (e.g. by inserting an empty line) before you switch to a different font size (see also https://github.com/josephwright/beamer/issues/530):
\documentclass[aspectratio=169,xcolor=table,12pt]{beamer}
% compile in pdfLaTeX
\usepackage[T1]{fontenc}
%\usepackage[utf8]{inputenc}
\usepackage[type=none]{fgruler} % ruler
%\usepackage{xcolor}
\renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}
\definecolor{footerGrey}{RGB}{135,135,135}
\setbeamercolor*{normal text}{fg=footerGrey}
\setbeamertemplate{itemize/enumerate body begin}{\normalsize}
\setbeamertemplate{itemize/enumerate subbody begin}{\footnotesize}
\setbeamertemplate{itemize/enumerate subsubbody begin}{\scriptsize}
\setbeamertemplate{itemize item}{\color{footerGrey}\rule[0.9mm]{0.6ex}{0.6ex}}
\setbeamertemplate{itemize subitem}{\color{footerGrey}\rule[0.8mm]{0.6ex}{0.6ex}}
\setbeamertemplate{itemize subsubitem}{\color{footerGrey}\rule[0.5mm]{0.6ex}{0.6ex}}
\begin{document}
\begin{frame}
\fgruler{upperleft}{0cm}{0cm}%
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\begin{itemize}
\item Item 4
\item Item 5
\item Item 6
\begin{itemize}
\item Item 7
\item Item 8
\item Item 9
\item Item 10
\end{itemize}
\end{itemize}
\end{itemize}
\end{frame}
\end{document}

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}

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}

Itemized / Enumarte List structure in LaTeX

I was wondering, if there is any way to have an enumeration using LaTeX to have something like:
1. (a) Some text, some text
(b) Some more text
2. (a) Yet some more text
(b) Something more ...
Please note that I can very well have
1. Somethig here ...
(a) Some text
(b) Some more text
2. Another text
(a) Something here ...
(b) Etc. etc.
What you show is simply the default behaviour of enumerate:
\documentclass{article}
\begin{document}
\begin{enumerate}
\item
\begin{enumerate}
\item test
\item test
\end{enumerate}
\item
\begin{enumerate}
\item test
\item test
\end{enumerate}
\end{enumerate}
\end{document}

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