1

My MWE:

\documentclass{article}
\usepackage{xcolor,amssymb}
\usepackage[ampersand]{easylist}
\usepackage{changepage}
\usepackage{etoolbox}
\usepackage{lipsum}

\begin{document}
\begin{adjustwidth}{2cm}{}
    \lipsum[1]
    \begin{easylist}
          \ListProperties(Hide=100,Progressive=1cm,
              Style1*=\textbullet,
              Style2*=$\ast$,
              Style3*=$\square$,
              Style4*=$\square$)
          & First thingy   
          && Second thingy  
          &&& Third thingy
          &&&& Fourth thingy  
    \end{easylist}
    \lipsum[1]   
\end{adjustwidth} 
\end{document}

enter image description here

I am using adjustwidth inside whole document because I need indentation of 2cm. But when I use easylist inside adjustwidth there is no progressive function. Command \begin{itemize} ; \end{itemize} is working well inside adjustwidth but its too complicated because in a lot of occasions I need to jump from different bullet level, then is easier to use easylist.

enter image description here

2
  • adjustwidth relies on the standard LaTeX list making tools, while easylist deliberately uses a non-standard method. You can't nest easylist in enumerate, for instance; so you can't in adjustwidth as well.
    – egreg
    Jul 19 '18 at 8:21
  • @egreg Hi, thanks for answer. Is there any other option instead of easylist which is making easier to use multi level bullet and which is compatibile with adjustwidth? Thanks in advance. :)
    – Beginner
    Jul 19 '18 at 8:35
1

The adjustwidth environment is defined via list which internally uses the primitiva \parshape. On the other hand, easylist relies on the primitives \hangindent and \hangafter.

When concurrent nonzero \parshape and \hangindent\hangafter declarations are found when TeX is finishing a paragraph, the former wins, which is why you get left alignment for all items in the easylist.

Simply put: you can't directly nest easylist in an adjustwidth environment, like you can't in enumerate or itemize.

You may use a minipage (but no page break is allowed):

\documentclass{article}
\usepackage{amssymb}
\usepackage[ampersand]{easylist}
\usepackage{changepage}
\usepackage{lipsum}

\begin{document}
\begin{adjustwidth}{2cm}{}
\lipsum[1]
\noindent\begin{minipage}[t]{\linewidth}
    \begin{easylist}
          \ListProperties(Hide=100,Progressive=1cm,
              Style1*=\textbullet,
              Style2*=$\ast$,
              Style3*=$\square$,
              Style4*=$\square$)
          & First thingy
          && Second thingy
          &&& Third thingy
          &&&& Fourth thingy
    \end{easylist}\xdef\tpd{\the\prevdepth}
\end{minipage}\par\prevdepth\tpd
    \lipsum[1]
\end{adjustwidth}
\end{document}

enter image description here

With some effort, no minipage is necessary and page breaks are allowed.

\documentclass{article}
\usepackage{amssymb}
\usepackage[ampersand]{easylist}
\usepackage{changepage}
\usepackage{lipsum}

\makeatletter
\newbox\Easylist@box
\newenvironment{Easylist}
 {\par\xdef\Easylist@tpd{\the\prevdepth}%
  \setbox\Easylist@box=\vbox\bgroup
  \dimen@=\@totalleftmargin
  \@parboxrestore
  \leftskip=\dimen@
  \prevdepth\Easylist@tpd
  \begin{easylist}}
 {\end{easylist}\xdef\Easylist@tpd{\the\prevdepth}\egroup
  \unvbox\Easylist@box\par\prevdepth\Easylist@tpd}
\makeatother

\begin{document}
\begin{adjustwidth}{2cm}{}
\lipsum[1]
    \begin{Easylist}
          \ListProperties(Hide=100,Progressive=1cm,
              Style1*=\textbullet,
              Style2*=$\ast$,
              Style3*=$\square$,
              Style4*=$\square$)
          & First thingy   
          && Second thingy  
          &&& Third thingy
          &&&& Fourth thingy  
    \end{Easylist}
    \lipsum[1]   
\end{adjustwidth} 
\end{document}
3
  • Is it possible to make new command Easylist, or to modify current easylist which includes \noindent\begin{minipage}[t]{\linewidth} \begin{easylist} %%bullet level \end{easylist}\xdef\tpd{\the\prevdepth} \end{minipage}\par\prevdepth\tpd so I can only type \begin{Easylist} %%bullet \end{Easylist}. I will define Listproperties in preamble
    – Beginner
    Jul 19 '18 at 8:49
  • 1
    @Beginner I did better. ;-O
    – egreg
    Jul 19 '18 at 8:51
  • @ereg you did it perfect, thank you very much. :)
    – Beginner
    Jul 20 '18 at 8:11

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.