Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm redoing my résumé and would like to produce a certain style of lists using enumitem, as shown in the image below.

If it isn't possible, it isn't the end of the world, but I'd really like it if enumitem could take care of all my formatting for me, while I could just focus on my content.

Basically, I want an inline list to be treated as one "item" in a normal itemized list.

Is it possible to produce the layout below strictly using enumitem?

MWE Image:

image of MWE output

MWE Code:

\documentclass{article}

\usepackage{setspace}
\onehalfspacing
\setlength{\parindent}{0mm}

\usepackage[inline]{enumitem}
\setlist[itemize]{%
  , label      = \textbullet
  , leftmargin = *
  , nosep      = true
}
\setlist[itemize,1]{%
  , leftmargin = 0mm
}
\setlist[itemize,2]{%
  , label      = \textasteriskcentered
}

\begin{document}

\section*{Normal lists (via \texttt{enumitem})}
%
\begin{itemize}
  \item fruits:
        \begin{itemize}
          \item apple
          \item banana
          \item cherry
        \end{itemize}
  \item vegetables:
        \begin{itemize}
          \item asparagus
          \item broccoli
          \item celery
        \end{itemize}
\end{itemize}

\section*{Inline lists (via \texttt{enumitem})}
%
\begin{itemize}
  \item fruits
        \begin{itemize*}[after={{.}}, before=\unskip{: }, itemjoin={{; }}]
          \item apple
          \item banana
          \item cherry
        \end{itemize*}
  \item vegetables
        \begin{itemize*}[after={{.}}, before=\unskip{: }, itemjoin={{; }}]
          \item asparagus
          \item broccoli
          \item celery
        \end{itemize*}
\end{itemize}

\section*{Desired list (manual)}
%
\begin{itemize}
  \item fruits:
        \begin{itemize}
          \item apple; \textasteriskcentered{} banana; \textasteriskcentered{} cherry.
        \end{itemize}
  \item vegetables:
        \begin{itemize}
          \item asparagus; \textasteriskcentered{} broccoli; \textasteriskcentered{} celery.
        \end{itemize}
\end{itemize}

\end{document}
share|improve this question

1 Answer 1

up vote 3 down vote accepted

Use a personal environment:

\documentclass{article}

\usepackage[inline]{enumitem}
\setlist[itemize]{%
  label      = \textbullet,
  leftmargin = *,
  nosep      = true,
}
\setlist[itemize,1]{%
  leftmargin = 0mm,
}
\setlist[itemize,2]{%
  label      = \textasteriskcentered,
}

\makeatletter
\newenvironment{resitemize}
  {\ifnum\@listdepth=\z@
     \def\final@command{itemize}%
     \begin{itemize}
   \else
     \def\final@command{itemize*}%
     \begin{itemize*}[after=., before=\unskip:\\, itemjoin=;\space]
   \fi
  }
  {\expandafter\end\expandafter{\final@command}}
\makeatother

\begin{document}

\section*{Normal lists}

\begin{resitemize}
  \item fruits
        \begin{resitemize}
          \item apple
          \item banana
          \item cherry
        \end{resitemize}
  \item vegetables
        \begin{resitemize}
          \item asparagus
          \item broccoli
          \item celery
        \end{resitemize}
\end{resitemize}

\end{document}

At level one it does itemize, at level two it does itemize* with the desired setup.

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.