Using subscript in easylist numbering

I just wanted to add a small issue I encountered with the use of easylists and subscript. Using easylist, I had an issue with my parenthesis appearing with subscript style.

\documentclass{article}
\usepackage[ampersand]{easylist}
\begin{document}

\begin{easylist}
\ListProperties(Style*={(H\textsubscript}, % i want my numbering to be (H\textsubscript{numbers})
Mark={}, % no markings
Numbers1=l, % level 1 are letters
Numbers2=a, % level 2 are numbers
Progressive=1em, % progressive margin 1em
FinalMark={)} ) % this is where i put my parenthesis
&& because the parenthesis appears as subscript
\end{easylist}

\end{document}


Output:

• Please post a compilable document, i.e. with \documentclass... \begin{document}...\end{document}
– user31729
Mar 7 '17 at 19:33
• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Mar 7 '17 at 19:44
• @DaiBowen: I think the post isn't a question but a solution already.
– user31729
Mar 7 '17 at 21:26
• @ChristianHupfer thank you for the first instructions, they were very helpful (for me as a beginner on this site). The goal was to provide a trace of the issue so anyone having it might find an answer. Mar 7 '17 at 21:33
• @Lokinou: I think you should restate your post as a question and post your solution in the answer box below. You can 'self-accept' your own - solution then
– user31729
Mar 7 '17 at 21:34

The value for the Style key can be a macro expecting an argument. Just put in it also the parentheses.

\documentclass{article}
\usepackage[ampersand]{easylist}

\newcommand{\mynumbering}[2]{%
(#1\textsubscript{#2})%
}

\begin{document}

\begin{easylist}
\ListProperties(Style*={\mynumbering{H}},
Mark={}, % no markings
Numbers1=l, % level 1 are letters
Numbers2=a, % level 2 are numbers
Progressive=1em, % progressive margin 1em
)
& I am happy
&& because the parentheses are right
\end{easylist}

\end{document}


I found the solution to this issue: I created a small command that wraps the current numbering after the subscript "brackets" ends:

\newcommand{\addpar}[1]{#1)} % adds a parenthesis ) after #1


Lets try again

\documentclass{article}
\usepackage[ampersand]{easylist}
\begin{document}

\begin{easylist}
\ListProperties(Style*={(H\textsubscript}, % i want my numbering to be (H\textsubscript{numbers})
Mark={}, % no markings
Numbers1=l, % level 1 are letters
Numbers2=a, % level 2 are numbers
Progressive=1em, % progressive margin 1em
FinalMark={}, % do not forget to remove it here
CtrCom=\addpar) %my little custom command will wraps the numbering, adding a parenthesis at the end
& I am happy
&& because the parenthesis appears with the correct size
\end{easylist}

\end{document}


Correct output: