beautiful list from indesign

Edit

My first solution was causing havoc with the way that enumitem aligns labels and the item text, so I have changed it slightly so that I now use the enumitem \SetLabelAlign command. This is, in fact, slightly easier than what I did previously.

Here is a different approach where I define a new enumerate like environment called underrated -- since we are underlining in an enumerate environment:

\newlist{underrated}{enumerate}{1}% define a new eumerate-like environment
\setlist[underrated]{%
    before=\let\item\underlineItem, % Set \item -> \underlineItem
    align=underline,% use underline "style" above
    label=\alph*),
    ref=\alph*,
    leftmargin=40mm,
    labelwidth=42mm,
}

The idea is to define a new "alignment style", underline, that will put the line before the item labels. There is a catch, however, in that when there is some text to be underlined, like the underline me in \item[underline me], we need to "pass" this text from \item back to the underline style. This is done by hijacking the \item command and replacing it with \underlineItem:

\let\realItem\item% save the original \item command for later use
\newcommand\underlineItem[1][]{%
   \def\underratedText{#1}%  
   \realItem\ignorespaces%
 }

So all that this really does is define \underratedText, which is used in the new label alignment style, and then call the real \item. To define this style we essentially just underline the text, following the example in the enumitem manual:

\SetLabelAlign{underline}{\parbox[t]\labelwidth{%
   \underline{\hbox to 36mm{\quad\texttt{\underratedText}}}\space#1}%
}

For good measure I also defined a new enumerate like environment, MyGroup, for the groups. With this set up, the code:

  \begin{MyGroup}
    \item\mbox{}
      \begin{underrated}
        \item A lunar eclipse is an omen of a coming disaster
        \item Superstitions have been around forever
        \item[an answer] People hold many superstitious beliefs about
        the moon
        \item[another answer] It is made of green cheese
      \end{underrated}

    \item\mbox{}
      \begin{underrated}
        \item The history of astronomy is interesting
        \item Ice age people recorded the appearance of new moons by
        making scratches in animal bones
        \item For example, Stonehenge in Britain,m build 3500 years
        ago to track the movement of the sun
        \item Ancient people observed and recorded lunar and solar
        events in different ways
      \end{underrated}
  \end{MyGroup}

produces

enter image description here

The \mbox's after the \item are necessary to force enumerate to start a new line; see Forcing new line after item number in enumerate environment.

Here is the full code:

\documentclass{book}
\usepackage{enumitem}

\let\realItem\item% save the original \item command for later use
\newcommand\underlineItem[1][]{%
   \def\underratedText{#1}\realItem\ignorespaces%
}
\SetLabelAlign{underline}{%
   \parbox[t]\labelwidth{%
      \underline{\hbox to 36mm{\quad\texttt{\underratedText}}}%
      \space#1%
   }%
 }

\newlist{underrated}{enumerate}{1}% define a new eumerate-like environment
\setlist[underrated]{%
    before=\let\item\underlineItem, % Set \item -> \underlineItem
    align=underline,% use underline "style" above
    label=\alph*),
    ref=\alph*,
    leftmargin=40mm,
    labelwidth=42mm,
}
\newlist{MyGroup}{enumerate}{1}
\setlist[MyGroup]{
   label=\bfseries Group \arabic*:,
   style=nextline,
   leftmargin=*,
   labelsep=2em,
   itemsep=2em
}

\begin{document}
  \begin{MyGroup}
    \item\mbox{}
      \begin{underrated}
        \item A lunar eclipse is an omen of a coming disaster
        \item Superstitions have been around forever
        \item[an answer] People hold many superstitious beliefs about
        the moon
        \item[another answer] It is made of green cheese
      \end{underrated}

    \item\mbox{}
      \begin{underrated}
        \item The history of astronomy is interesting
        \item Ice age people recorded the appearance of new moons by
        making scratches in animal bones
        \item For example, Stonehenge in Britain,m build 3500 years
        ago to track the movement of the sun
        \item Ancient people observed and recorded lunar and solar
        events in different ways
      \end{underrated}
  \end{MyGroup}
\end{document}

One version:

list

\documentclass{book}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label=Group \arabic*.]
\item 
\begin{enumerate}[leftmargin=3.75cm,label={\rule{3cm}{.5pt}~\alph*)}]
\item long sentence 1
\item long sentence 2
\item long sentence 3
\item long sentence 4
\end{enumerate}
\item
\begin{enumerate}[leftmargin=3.75cm,label={\rule{3cm}{.5pt}~\alph*)}]
\item long sentence 1
\item long sentence 2
\item long sentence 3
\item long sentence 4
\end{enumerate}
\end{enumerate}
\end{document}

Version 2:

list 2

\documentclass{book}
\usepackage{enumitem}

\newcounter{group}
\newenvironment{groupenv}{%
    \refstepcounter{group}%
    \noindent Group~\thegroup.
    \begin{enumerate}[leftmargin=3.75cm,label={\rule{3cm}{.5pt}~\alph*)}]
}{
    \end{enumerate}
}
\begin{document}
\begin{groupenv}
\item long sentence 1
\item long sentence 2
\item long sentence 3
\item long sentence 4
\end{groupenv}
\begin{groupenv}
\item long sentence 1
\item long sentence 2
\item long sentence 3
\item long sentence 4
\end{groupenv}
\end{document}

With simple overlays:

list with text

\documentclass{book}
\usepackage{enumitem}

\usepackage{tikz}
\usetikzlibrary{tikzmark}

\newcounter{group}
\newenvironment{groupenv}{%
    \refstepcounter{group}%
    \noindent Group~\thegroup.
    \begin{enumerate}[leftmargin=3.75cm,label={\rule{3cm}{.5pt}~\alph*)}]
}{
    \end{enumerate}
}
\begin{document}
\begin{groupenv}
\item\tikzmark{test1} long sentence 1
\item\tikzmark{test2} long sentence 2
\item\tikzmark{test3} long sentence 3
\item\tikzmark{test4} long sentence 4
\end{groupenv}
\begin{tikzpicture}[overlay,remember picture]
    \node at ([xshift=-2.25cm,yshift=.5\baselineskip]pic cs:test1) {this is test};
    \node at ([xshift=-2.25cm,yshift=.5\baselineskip]pic cs:test2) {this is tested};
    \node at ([xshift=-2.25cm,yshift=.5\baselineskip]pic cs:test3) {this is untested};
    \node at ([xshift=-2.25cm,yshift=.5\baselineskip]pic cs:test4) {this is a test};
\end{tikzpicture}
\begin{groupenv}
\item long sentence 1
\item long sentence 2
\item long sentence 3
\item long sentence 4
\end{groupenv}
\end{document}

Tags:

Lists

Enumitem