Text FormattingHorizontal space of inline-listed labels

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
bstex
Posts: 69
Joined: Mon Oct 23, 2017 10:22 am

Horizontal space of inline-listed labels

Post by bstex »

Hi.
I'm trying to make all the labels of the inline list to have equal space between them, just like this:
Screen Shot 2018-01-19 at 11.24.20.png
Screen Shot 2018-01-19 at 11.24.20.png (17.7 KiB) Viewed 7087 times
I've tried all of the commands of enumitem*, like itemsep, labelsep, labelwidth etc, but no lack.

My MWE is this:

Code: Select all

\documentclass[a4paper]{book}
\newtheorem{exercise}{}[chapter]
\usepackage[inline]{enumitem}

\begin{document}

\begin{exercise}
Text text text\\
\begin{enumerate*}[font=\bfseries]
\item [A.] 1 \item [D.] 12345 \item [E.] 123 \item [T.] 1412312
\end{enumerate*}
\end{exercise}

\begin{exercise}
Text text text\\
\begin{enumerate*}[font=\bfseries]
\item [B.] 1234154 \item [R.] 12435246523 \item [S.] 5 \item [Z.] 1
\end{enumerate*}
\end{exercise}

\end{document}
Any help, please?
Last edited by bstex on Fri Jan 19, 2018 3:21 pm, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Horizontal space of inline-listed labels

Post by Johannes_B »

Hi, i gave you a link in my answer yesterday. This was also covered on that page.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
bstex
Posts: 69
Joined: Mon Oct 23, 2017 10:22 am

Horizontal space of inline-listed labels

Post by bstex »

Johannes_B wrote:Hi, i gave you a link in my answer yesterday. This was also covered on that page.
Hi,
I know there was a solution,
I just wanted to do it with the enumitem package.
Thank you very much. ;)
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Horizontal space of inline-listed labels

Post by Johannes_B »

Package tasks was developed because this is hard to do with enumitem.
Both should work together just nice.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
bstex
Posts: 69
Joined: Mon Oct 23, 2017 10:22 am

Horizontal space of inline-listed labels

Post by bstex »

Then... tasks it is.
Thank you very much!
bstex
Posts: 69
Joined: Mon Oct 23, 2017 10:22 am

Horizontal space of inline-listed labels

Post by bstex »

Why is there so much vertical space between the "Text text text" and the "task items"?
Screen Shot 2018-01-19 at 15.19.00.png
Screen Shot 2018-01-19 at 15.19.00.png (15.89 KiB) Viewed 7089 times

Code: Select all

\documentclass[a4paper]{book}
\newtheorem{exercise}{}[chapter]
\usepackage{tasks}

\begin{document}

\begin{exercise}
Text text text
\begin{tasks}[label-format=\bfseries](4)
\task [A.] 1 \task [D.] 12345 \task [E.] 123 \task [T.] 1412312
\end{tasks}
\end{exercise}

\begin{exercise}
Text text text
\begin{tasks}[label-format=\bfseries](4)
\task [B.] 1234154 \task [R.] 12435246523 \task [S.] 5 \task [Z.] 1
\end{tasks}
\end{exercise}

\end{document}
I can't find anything on the documentation of tasks package about the vertical space above the task items.

Also, is there any way to make the "A. 1" and the "B. 1234154" to be left-aligned with the "Text text text"?
Post Reply