Since this is reST, you need to be careful with line numbers. To make
autonumbered sub-items, you just need use the normal auto number (#.), but
have blank lines and indentations around each level change, eg:
#. An Item
#. A Subitem
#. A subsub item
#. Another subsub item
#. Another sub item
Each time you indent to a new level, it gives you the next level of sub
items.
As for referring to a specific one, I don't know of an obvious/easy one. A
guess of a non-obvious one would be to declare a reST replacement node that
defines a new anchor, then include that inline with the item you want (like
trying to declare an inline image), then try to link to it (you can try
:numref: or :any:). But I don't think that will give you the item number.
Also, it maydepend on which version of Sphinx you are using. 1.4.x doesn't
have a method to get the section number for headers, I think that was added
in 1.5.x. I'm not sure that extends to numbered lists as well.
--Peter
On Sunday, June 18, 2017 at 11:35:13 PM UTC-7, kworm wrote:
>
> Hi Daniele,
>
> Thanks for the answer. You seem to indicate that it was in answer to my
> second question, which was how to make sub-numbered list. I fail to see how
> to do that though. The link you posted explains how I can create a list
> like this
> 1. An item
> 1. A sub item
> 1. A sub sub item
> 2. Another sub sub item
> 2. Another sub item
> 2. Another item
>
> but not how to get sub-numbers.
>
> It did however, partially explain my other question which is how to link
> to a list item. I.e. I can do so by putting the label at the right
> indentation. It still does not include the number though which is what I
> would like.
>
> Thanks
>
>
>
> On Thursday, 15 June 2017 17:42:56 UTC+10, daniele wrote:
>>
>> 2017-06-15 4:41 GMT+02:00 kworm <[email protected]>:
>> > A second question is whether it is possible to create sub-numbered
>> lists.
>> > Something that renders like this:
>>
>>
>> stackoverflow.com/questions/34450064/how-to-make-nested-lists-with-automatic-numbering-in-sphinx
>>
>>
>> regards
>>
>> --
>>
>> Daniele
>>
>> www.fugamatematica.blogspot.com
>>
>> giusto!
>> nel verso
>> forse è perché non guardiamo le cose
>> Quando non ci capiamo,
>>
>
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.