[OS X TeX] enumitem list issues

Dr Alan Litchfield alan at alphabyte.co.nz
Thu Apr 15 04:34:44 EDT 2021


Hi Ross,

Fascinating!

Making that small change does correct the ordering. But then I thought 
that if the counter is correctly capturing the output, do I really even 
need the "ref=\arabic{... etc"?

So I removed the ref group from each \setlist group, and that also works 
except we are left with spacing between the numbers (RQ1 (a) i.), 
whereas the ref group eliminates them (RQ1(a)i.).

\newlist{enumrq}{enumerate}{3}
\setlist[enumrq,1]{align=left,labelsep=.25em,label=RQ\arabic*}
\setlist[enumrq,2]{align=left,leftmargin=*,labelsep=.25em,label*=~(\alph*)}
\setlist[enumrq,3]{align=left,leftmargin=*,labelsep=.25em,label*=~\roman*.}

So now I wonder which is more visually appealing in a cross reference.

I tried it with a dot numbering format and that works better.

\newlist{enumrq*}{enumerate}{3}
\setlist[enumrq*,1]{align=left,labelsep=.5em,label=RQ\arabic*}
\setlist[enumrq*,2]{align=left,leftmargin=*,labelsep=.25em,label*=.\arabic*}
\setlist[enumrq*,3]{align=left,leftmargin=*,labelsep=.25em,label*=.\arabic*}

Note that in this case, the *'s are still in place and the counter works 
as expected. So I think maybe there is an issue in how the \alph counter 
is working.

In this instance, the workaround provides what is required.

Cheers

Alan

On 15/04/21 7:27 pm, Ross Moore wrote:
> Hi Alan,
>
>> On 15 Apr 2021, at 4:56 pm, Dr Alan Litchfield <alan at alphabyte.co.nz 
>> <mailto:alan at alphabyte.co.nz>> wrote:
>>
>> Hi,
>>
>> I should have been more explicit.
>>
>> In the pdf, the cross references to the enumerated items do not 
>> correlate with their label numbers. Specifically, the 4th, 5th, 7th 
>> and 8th.
>>
>
> OK. I see it now.
>
> Here’s the issue:
>
> I inserted these lines before the 1st wrong item:
>
>>>> \show\theenumrqi
>>>> \show\theenumrqii
>>>> \show\theenumrqiii
>>>> \item reference is rq:4 \label{rq:4}
>>>> \end{enumrq}
>
> Here’s what you get:
>
>>> > \theenumrqi=macro:
>>> ->{RQ\arabic {enumrqi}}.
>>> l.20 \show\theenumrqi
>>> ?
>>> > \theenumrqii=macro:
>>> ->{RQ\arabic {enumrqii}(\alph {enumrqii})}.
>>> l.21 \show\theenumrqii
>>> ?
>>> > \theenumrqiii=macro:
>>> ->{RQ\arabic {enumrqiii}(\alph {enumrqiii})\roman {enumrqiii}.}.
>>> l.22 \show\theenumrqiii
>>> ?
>
> See how the expansions for the 2nd- and 3rd-level counters are wrong.
> It should be:
>
>>> > \theenumrqiii=macro:
>>> ->{RQ\arabic {enumrqi}(\alph {enumrqii})\roman {enumrqiii}.}.
>
>
> Here’s one way to get it correct:
>
> %\setlist[enumrq,1]{align=left,labelsep=.5em,label=RQ\arabic*
> %, ref=RQ\arabic*}
> %\setlist[enumrq,2]{align=left,leftmargin=*,labelsep=.25em,label=~(\alph*), 
> ref=RQ\arabic*(\alph*)}
> %\setlist[enumrq,3]{align=left,leftmargin=*,labelsep=.25em,label=~\roman*., 
> ref=RQ\arabic*(\alph*)\roman*.}
>
> \setlist[enumrq,1]{align=left,labelsep=.5em,label=RQ\arabic*, 
> ref=RQ\arabic*}
> \setlist[enumrq,2]{align=left,leftmargin=*,labelsep=.25em,label=~(\alph*), 
> ref=RQ\arabic{enumrqi}(\alph*)}
> \setlist[enumrq,3]{align=left,leftmargin=*,labelsep=.25em,label=~\roman*., 
> ref=RQ\arabic{enumrqi}(\alph{enumrqii})\roman*.}
>
>
> It seems that you cannot use multiple *s in the  ref=  field.
>
> That kind of makes sense, if * is meant to refer to a default counter.
> How will it know internally that you actually meant 3 different counters?
>
>>
>> Thanks
>>
>> Alan
>>
>
>
> Hope this helps.
>
> Ross
>
>
> Dr Ross Moore
> Department of Mathematics and Statistics
> 12 Wally’s Walk, Level 7, Room 734
> Macquarie University, NSW 2109, Australia
> T: +61 2 9850 8955  |  F: +61 2 9850 8114
> M:+61 407 288 255  |  E: ross.moore at mq.edu.au 
> <mailto:ross.moore at mq.edu.au>
> http://www.maths.mq.edu.au <http://www.maths.mq.edu.au>
>
> CRICOS Provider Number 00002J. Think before youprint.
> Please consider the environment before printing thisemail.
>
> This message is intended for the addressee namedand may
> contain confidential information. If you are not theintended
> recipient, please delete it and notify the sender. Viewsexpressed
> in this message are those of the individual sender, andare not
> necessarily the views of Macquarie University. <http://mq.edu.au/>
>
>
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
> List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
>                  https://email.esm.psu.edu/pipermail/macosx-tex/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

-- 
Dr Alan Litchfield
AlphaByte
PO Box 1941
Auckland, New Zealand 1140

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20210415/f0859e8f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4605 bytes
Desc: not available
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20210415/f0859e8f/attachment.png>


More information about the MacOSX-TeX mailing list