1

The code

\documentclass{article}
\usepackage[body={20em,100ex}]{geometry}
\newcommand{\abc}{\rule{0.95em}{1ex}\kern.05em\allowbreak}
\newcommand{\abcd}{\abc\abc\abc\abc\abc}
\newcommand{\abcde}{\abcd\abcd\abcd\abcd\abcd}
\begin{document}
\noindent\abcde
\begin{list}{$\bullet$}{%
\setlength{\labelwidth}{1em}%
\setlength{\labelsep}{1em}%
\setlength{\leftmargin}{2em}%
\setlength{\itemindent}{2em}}
\item\abcde
\item
\begin{list}{\ddag}{%
\setlength{\labelsep}{1em}%
\setlength{\labelwidth}{1em}%
\setlength{\leftmargin}{1em}%
\setlength{\itemindent}{1em}}
\item\abcde
\item\abcde
\end{list}
\end{list}
\end{document}

get the left side:

How could I get the right side?

1

It is possible to achieve what you want without too much fiddling if you can put the inner list in a minipage (hence, not compatible with page breaks). And it is also possible with a bit of fiddling to do it without this restriction of no page break. First method:

\documentclass{article}
\usepackage[body={20em,100ex}]{geometry}
\newcommand{\abc}{\makebox[1em][l]{\rule{.9em}{1ex}}\allowbreak}
\newcommand{\abcd}{\abc\abc\abc\abc\abc}
\newcommand{\abcde}{\abcd\abcd\abcd\abcd\abcd}
\begin{document}
\noindent\abcde\par
%% testing the \abc building block: 20 times 1em = 20em
%% \noindent\rule{\linewidth}{1ex}\par
%% \noindent------------------------------------%
%% -----------------------------------\par
\begin{list}{$\bullet$}{%
\setlength{\labelwidth}{1em}%
\setlength{\labelsep}{1em}%
\setlength{\leftmargin}{2em}%
\setlength{\itemindent}{2em}}
\item \abcde\par\abcde
\item\begin{minipage}[t]{\dimexpr\linewidth-\itemindent}
        \begin{list}{\ddag}{%
        \setlength{\labelsep}{1em}%
        \setlength{\labelwidth}{1em}%
        \setlength{\leftmargin}{0em}% note the 0em here and the stuff below
        \setlength{\itemindent}{\dimexpr\labelsep+\labelwidth}}
    \item\abcde\par\abcde
    \item\abcde
    \end{list}
  \end{minipage}
\item hello
\end{list}
\end{document}

Please note how I modified your \abc macro. Because, as I have encountered also on another occasion, and do not understand why, the \kern.05em\allowbreak from your original code leads to one box too many, which goes into the right margin. Whereas my method here does not. Anyway this code produces:

tex outcome

The second method is :

\documentclass{article}
\usepackage[body={20em,100ex}]{geometry}
\newcommand{\abc}{\makebox[1em][l]{\rule{.9em}{1ex}}\allowbreak}
\newcommand{\abcd}{\abc\abc\abc\abc\abc}
\newcommand{\abcde}{\abcd\abcd\abcd\abcd\abcd}
\begin{document}
\noindent\abcde
\newdimen\mydimen
\begin{list}{$\bullet$}{%
\setlength{\labelwidth}{1em}%
\setlength{\labelsep}{1em}%
\setlength{\leftmargin}{2em}%
\setlength{\itemindent}{2em}}
\item \abcde
\item \setlength{\mydimen}{\itemindent}%
      \begin{list}{\ddag}{%
        \setlength{\labelsep}{1em}%
        \setlength{\labelwidth}{1em}%
        \setlength{\leftmargin}{\mydimen}%
        \setlength{\itemindent}{\dimexpr\labelsep+\labelwidth}}
    \item[]\hskip-\mydimen\hskip-\labelsep\llap{\ddag}\hskip\labelsep
           \abcde
    \item\abcde
    \end{list}
\item hello
\end{list}
\end{document}
0

In your first list environment change \itemindent to 0em, and in your second list environment change \itemindent to 2em.

  • But I DON'T want change the first list environment! That will change the first bullet item shape. – user4822 Apr 14 '11 at 6:51
  • You seem to be requesting that the two items in the second list start at the same horizontal position. Alas, the first of those two items starts an item from the first list, and the \itemindent of the first list indents the first line of that first item, but not of the second item (since the second item isn't the first line of a item in the first list). You can probably get what you want by kludging in a kern somewhere... – Phil Hirschhorn Apr 14 '11 at 7:01

Your Answer

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