3

I'd like to create a ragged right inlist list, where each item is separated by either a bullet or a line break.

For example: I'd like the following

\usepackage{ragged2e}
\begin{minipage}[t]{0.31\textwidth}
  \begin{flushleft}
    \begin{mylist}
      \item Apple 
      \item Berry
      \item Rocky~Road 
      \item Cream
      \item Jello
      \item Fish 
    \end{mylist}
  \end{flushleft}

To yield this: enter image description here

So more specifically, each item should be separated by a bullet until we hit the end of a line, in which case a line break should be used instead.

Right now, I have to manually format the list like so:

\begin{flushleft}
  Apple \textbullet{} Berry\\
  Rocky~Road \textbullet{} Cream\\
  Jello \textbullet{} Fish 
\end{flushleft}

This latter way of doing it is extremely painful as any update to the list involves manually reformatting the whole list.

Paralist comes close to providing the functionality I need, but it precedes each item with a bullet, whereas I need to separate each item with either a bullet or a linebreak.

Thank you for your time!

4

enter image description here

\documentclass{article}

\newenvironment{mylist}{\def\item{\ifhmode\cleaders\hbox to 1.9em{\hss\textbullet\hss}\hskip2em\fi}}{}
\begin{document}


\begin{minipage}[t]{0.31\textwidth}
  \begin{flushleft}
    \begin{mylist}
      \item Apple 
      \item Berry
      \item Rocky~Road 
      \item Cream
      \item Jello
      \item Fish 
    \end{mylist}
  \end{flushleft}
\end{minipage}
\hfill\vrule\hfill
\begin{minipage}[t]{0.61\textwidth}
  \begin{flushleft}
    \begin{mylist}
      \item Apple 
      \item Berry
      \item Rocky~Road 
      \item Cream
      \item Jello
      \item Fish 
    \end{mylist}
  \end{flushleft}
\end{minipage}

\end{document}
14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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