6

I generally use easylist in the following manner

\documentclass[english]{article}
\usepackage[at]{easylist}
\begin{document}

    \begin{easylist}
    \ListProperties(Progressive*=3ex, Start1=1)
       @ item1
       @ item2 
       @ item3 
    \end{easylist}

\end{document}

every time, I have to set the list property by using \ListProperties(Progressive*=3ex, Start1=1), is there a way to set a global property for all the easylist entries, instead of repeating the properties every time I declare an easylist entry?

2
  • Welcome to TeX.SE. It would be helpful if you turned your code into a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem. Feb 28, 2014 at 5:54
  • @PeterGrill, thanks for letting me know, I have updated the example.
    – acharuva
    Feb 28, 2014 at 5:59

2 Answers 2

6

You can just specify the \ListProperties before any easylst environment:

enter image description here

Note that each easylist continues on from the last one.

If you want each instance of easlylist to have the same properties at the start, then you can redefine the easylist environment as in the code below to apply the specified \ListProperties and the start of each invocation of the environment:

enter image description here

Code:

\documentclass[english]{article}
\usepackage[at]{easylist}
\ListProperties(Progressive*=3ex, Start1=1)

\begin{document}
\begin{easylist}
   @ item1
   @ item2 
   @ item3 
\end{easylist}

\bigskip

\begin{easylist}
   @ item1
   @ item2 
   @ item3 
\end{easylist}
\end{document}

Code: \renewenvironment

\documentclass[english]{article}
\usepackage[at]{easylist}


\let\OldEasylist\easylist
\let\OldEndEasylist\endeasylist
\renewenvironment{easylist}{%
    \OldEasylist%
    \ListProperties(Progressive*=3ex, Start1=1)%
}{%
    \OldEndEasylist%
}%

\begin{document}
\begin{easylist}
   @ item1
   @ item2 
   @ item3 
\end{easylist}

\bigskip

\begin{easylist}
   @ item1
   @ item2 
   @ item3 
\end{easylist}

\end{document}
0
6

You can use \AtBeginEnvironment macro of etoolbox and do:

\AtBeginEnvironment{easylist}
        {\ListProperties(Progressive*=3ex, Start1=2,Style*=\color{green!60!black})}
        {}
        {}

Full code:

\documentclass[english]{article}
\usepackage[at]{easylist}
\usepackage{xcolor}
\usepackage{etoolbox}
\AtBeginEnvironment{easylist}
        {\ListProperties(Progressive*=3ex, Start1=2,Style*=\color{green!60!black})}
        {}
        {}

\begin{document}
One list
    \begin{easylist}    
       @ item1
       @ item2
       @ item3
    \end{easylist}
Another list    
    \begin{easylist}
       @ item1
       @ item2
       @ item3
    \end{easylist}

\end{document}

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .