Thanks! This works, and now I can build. However, the extension doesn't
seem to be working -- my refs still render as the titles not the section
numbers. Anyone on this list use the extension?
On Monday, 12 September 2016 08:24:24 UTC-7, Komiya Takeshi wrote:
>
> Hi,
>
> I've never used the extension, but it might work with following steps:
>
> 1. copy numsec.py into your project
> 2. rewrite your conf.py to add current directory into sys.path::
>
> sys.path.insert(0, os.path.abspath('.'))
>
> 3. add "numsec" (without .py suffix) into extensions list
>
> extensions = [..., 'numsec']
>
> Please try it out.
>
> Thanks,
> Takeshi KOMIYA
>
> 2016年9月9日金曜日 7時39分57秒 UTC+9 Fiona Hanington:
>>
>> Hi,
>>
>> I know there has been discussion here lately re: references to section
>> numbers (eg, see Section 2.3) rather than names.
>>
>> In the meantime, I am trying to install the numsec.py extension to get
>> this functionality. But I am a newby and am having some trouble.
>>
>> Where should I install it in my docs repo? How do I need to modify
>> conf.py to point to it?
>>
>> Here's how conf.py looks now, but the Sphinx build is failing. Note that
>> I put numsec.py into the same dir as conf.py - is this OK? and how do I
>> tell conf.py to look for it there?
>>
>>
>> import sys, os
>>
>> # If extensions (or modules to document with autodoc) are in another
>> directory,
>> # add these directories to sys.path here. If the directory is relative to
>> the
>> # documentation root, use os.path.abspath to make it absolute, like shown
>> here.
>> #sys.path.insert(0, os.path.abspath('.'))
>>
>>
>> # -- General configuration
>> -----------------------------------------------------
>>
>> # If your documentation needs a minimal Sphinx version, state it here.
>> #needs_sphinx = '1.0'
>>
>> # Add any Sphinx extension module names here, as strings. They can be
>> extensions
>> # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
>>
>> extensions = ['sphinx.ext.autodoc',
>> 'sphinx.ext.doctest',
>> 'sphinx.ext.intersphinx',
>> 'sphinx.ext.todo',
>> 'sphinx.ext.ifconfig',
>> 'sphinx.ext.viewcode',
>> 'sphinx.ext.mathjax',
>> * 'numsec.py'*]
>>
>
--
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.