Text FormattingCustomize Subitem

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
joost90
Posts: 2
Joined: Sun Dec 27, 2009 12:48 pm

Customize Subitem

Post by joost90 »

My (minimized) code:

Code: Select all

\documentclass[a4paper,10pt]{article}

\begin{document}

\begin{itemize}

\item[Vraag 2] Judith gaat haar kerstboom versieren. Ze denkt 30 kerstballen nodig te hebben. In de winkel koopt Judith 4 dozen. In \'e\'en doos zitten 8 kerstballen. Bij de kassa moet ze 64 betalen.

\subitem Bij vraag a hebben we berekend dat een doos kerstballen 16 euro kost. Omdat er 8 kerstballen in een doos gaan berekenen we: $16 : 8 = 2$. Dus de kerstballen kosten per stuk 2 euro.

\end{itemize}
\end{document}
(Dutch language)

My problem: I would like to have the entire sentence after the subitem to have 1 tab extra (compared to the item sentence, which do gets an extre tab for every line). At this moment, it only gives an extra tab to the first line of the subitem sentence.

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

joost90
Posts: 2
Joined: Sun Dec 27, 2009 12:48 pm

Re: Customize Subitem

Post by joost90 »

Solved with \parbox

Topic can be closed
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Customize Subitem

Post by localghost »

A nested itemize environment should also do.

Code: Select all

\documentclass[11pt,a4paper,dutch]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[official,right]{eurosym}
\usepackage{lmodern}

\begin{document}
  \begin{itemize}
    \item[Vraag 2] Judith gaat haar kerstboom versieren. Ze denkt 30 kerstballen nodig te hebben. In de winkel koopt Judith 4 dozen. In één doos zitten 8 kerstballen. Bij de kassa moet ze 64 betalen.
      \begin{itemize}
        \item[] Bij vraag a hebben we berekend dat een doos kerstballen \EUR{16} kost. Omdat er 8 kerstballen in een doos gaan berekenen we: $16 : 8 = 2$. Dus de kerstballen kosten per stuk \EUR{2}.
      \end{itemize}
  \end{itemize}
\end{document}
Further customization of list environments can be done with enumitem.


Best regards and welcome to the board
Thorsten
Post Reply