4

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
    & I am sad
    && because the parenthesis appears as subscript
\end{easylist}

\end{document}

Output: Issue with bad parenthesis

6
  • Please post a compilable document, i.e. with \documentclass... \begin{document}...\end{document}
    – user31729
    Mar 7, 2017 at 19:33
  • 1
    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}.
    – Dai Bowen
    Mar 7, 2017 at 19:44
  • @DaiBowen: I think the post isn't a question but a solution already.
    – user31729
    Mar 7, 2017 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.
    – Lokinou
    Mar 7, 2017 at 21:33
  • 1
    @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, 2017 at 21:34

2 Answers 2

3

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}

enter image description here

2

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}

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

\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: Correct output with parenthesis

You must log in to answer this question.

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