Text Formattingenumitem | Separation of in-line Items

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

enumitem | Separation of in-line Items

Post by ghostanime2001 »

Is there some command to separate inline items a little more in a enumerate* environment? without using \hspace ? I am using \usepackage[inline]{enumitem} options.

Here is my document code:

Code: Select all

\documentclass[fleqn]{article}
\usepackage[inline]{enumitem}
\usepackage{fullpage}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{amstext}
\usepackage[makeroom]{cancel}
\pagestyle{empty}
\setlength{\mathindent}{0pt}
\setlist[enumerate,2]{label=\alph*)}
\begin{document}
\begin{enumerate}
\item
\begin{enumerate*}
\item 
$\begin{aligned}[t]
\tau&=Fr\sin\theta \\
\tau&=(46.4)(1.26)\sin\SI{90}{\degree} \\
\tau&=\text{58.5 Nm}
\end{aligned}$
\item
$\begin{aligned}[t]
\tau&=(46.4)(1.26)\sin\SI{43}{\degree} \\
\tau&=\text{39.9 Nm}
\end{aligned}$
\item
$\begin{aligned}[t]
\tau&=(46.4)(1.26)\sin\SI{0}{\degree} \\
\tau&=0
\end{aligned}$
\end{enumerate*}
\item
$\begin{aligned}[t]
\tau&=Fr\sin\theta \\
\tau&=(55)(0.85)\sin\SI{90}{\degree} \\
\tau&=\text{46.75 Nm}
\end{aligned}$
\end{enumerate}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

enumitem | Separation of in-line Items

Post by frabjous »

When I try to compile your code, I get two errors: one that there is no "inline" option for enunitem (and indeed, searching the enumitem documentation for 'inline' turned up nothing), and also that there is no enumerate* environment defined. If I remove the option and change "enumerate*" to "enumerate", the result looks pretty good to me as is. But try the itemsep= option to the environment if you want to change the spacing between items. E.g.

Code: Select all

\begin{enumerate}[itemsep=1cm]
to put 1cm between each item.
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

enumitem | Separation of in-line Items

Post by ghostanime2001 »

Have a look at the current version of the enumitem manual. It seems to work with enumerate but not with the starred enumerate*.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

enumitem | Separation of in-line Items

Post by localghost »

There is an equivalent called »itemjoin« that separates items in in-line lists. Have a look at Section 4 of the enumitem manual.

Code: Select all

\documentclass[fleqn]{article}
\usepackage[T1]{fontenc}
\usepackage[inline]{enumitem}
\usepackage[margin=1in]{geometry}
\usepackage{mathtools}
\usepackage{siunitx}

\setlength{\mathindent}{0pt}
\setlist[enumerate,2]{label=\alph*)}

\begin{document}
\begin{enumerate}
\item
\begin{enumerate*}[itemjoin=\qquad]
\item
$\begin{aligned}[t]
\tau&=Fr\sin\theta \\
\tau&=(46.4)(1.26)\sin\SI{90}{\degree} \\
\tau&=\text{58.5 Nm}
\end{aligned}$
\item
$\begin{aligned}[t]
\tau&=(46.4)(1.26)\sin\SI{43}{\degree} \\
\tau&=\text{39.9 Nm}
\end{aligned}$
\item
$\begin{aligned}[t]
\tau&=(46.4)(1.26)\sin\SI{0}{\degree} \\
\tau&=0
\end{aligned}$
\end{enumerate*}
\item
$\begin{aligned}[t]
\tau&=Fr\sin\theta \\
\tau&=(55)(0.85)\sin\SI{90}{\degree} \\
\tau&=\text{46.75 Nm}
\end{aligned}$
\end{enumerate}
\end{document}

Thorsten
Post Reply