Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Peter Grill Feb 28 at 5:54
    
@PeterGrill, thanks for letting me know, I have updated the example. –  acharuva Feb 28 at 5:59

2 Answers 2

up vote 5 down vote accepted

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}
share|improve this answer
    
thank you for the answer. –  acharuva Feb 28 at 18:39

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

share|improve this answer
    
Thank you for the answer. –  acharuva Feb 28 at 18:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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