LaTeX forum ⇒ Text FormattingHorizontal space of inline-listed labels

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

Horizontal space of inline-listed labels

Postby bstex » Fri Jan 19, 2018 11:29 am

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 1213 times


I've tried all of the commands of enumitem*, like itemsep, labelsep, labelwidth etc, but no lack.

My MWE is this:
  1. \documentclass[a4paper]{book}
  2. \newtheorem{exercise}{}[chapter]
  3. \usepackage[inline]{enumitem}
  4.  
  5. \begin{document}
  6.  
  7. \begin{exercise}
  8. Text text text\\
  9. \begin{enumerate*}[font=\bfseries]
  10. \item [A.] 1 \item [D.] 12345 \item [E.] 123 \item [T.] 1412312
  11. \end{enumerate*}
  12. \end{exercise}
  13.  
  14. \begin{exercise}
  15. Text text text\\
  16. \begin{enumerate*}[font=\bfseries]
  17. \item [B.] 1234154 \item [R.] 12435246523 \item [S.] 5 \item [Z.] 1
  18. \end{enumerate*}
  19. \end{exercise}
  20.  
  21. \end{document}

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

User avatar
Johannes_B
Site Moderator
Posts: 3795
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Jan 19, 2018 11:49 am

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: 65
Joined: Mon Oct 23, 2017 10:22 am

Postby bstex » Fri Jan 19, 2018 11:52 am

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: 3795
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Jan 19, 2018 11:54 am

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: 65
Joined: Mon Oct 23, 2017 10:22 am

Postby bstex » Fri Jan 19, 2018 11:56 am

Then... tasks it is.
Thank you very much!

bstex
Posts: 65
Joined: Mon Oct 23, 2017 10:22 am

Postby bstex » Fri Jan 19, 2018 1:04 pm

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 1215 times

  1. \documentclass[a4paper]{book}
  2. \newtheorem{exercise}{}[chapter]
  3. \usepackage{tasks}
  4.  
  5. \begin{document}
  6.  
  7. \begin{exercise}
  8. Text text text
  9. \begin{tasks}[label-format=\bfseries](4)
  10. \task [A.] 1 \task [D.] 12345 \task [E.] 123 \task [T.] 1412312
  11. \end{tasks}
  12. \end{exercise}
  13.  
  14. \begin{exercise}
  15. Text text text
  16. \begin{tasks}[label-format=\bfseries](4)
  17. \task [B.] 1234154 \task [R.] 12435246523 \task [S.] 5 \task [Z.] 1
  18. \end{tasks}
  19. \end{exercise}
  20.  
  21. \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"?


Return to “Text Formatting”

Who is online

Users browsing this forum: Baidu [Spider] and 8 guests