On Sunday, January 21, 2018 at 5:42:09 AM UTC-5, Komiya Takeshi wrote:
>
> AFAIK, Sphinx goes to resolve xrefs independently for other documents. 
> And it dumps the result after processing.


I don't think that's relevant. My proposal was to copy the *unresolved* 
nodes into the TOC and resolve them later. Sure, it's duplicating work, but 
going back and fixing up the TOC is probably much harder; too much so to 
justify the extra effort.
 

> For this reason, we can never access the resolved xrefs whole of the 
> project. 
> So I feel introducing xtext might be difficult.


It turns out the tricky part is getting the TOC to resolve them. Normally, 
sections get turned into a TOC that gets shoved aside and is not subject to 
the usual transforms. However, that's fixable.
 

> It might be better to implement better astext() instead.
>

I don't see how this can work. Leaving aside that this would be a 
fundamental change to the bowels of *docutils* (which already makes the 
change questionable, because *docutils* has no notion of external 
references), it can't solve the problem. The TOC *must* store the 
unresolved xref, because it gets built on reading the document, and the 
xref can't possibly be resolved at that point.

I have a working (read: appears to WFM) patch at 
https://github.com/sphinx-doc/sphinx/pull/4475.

-- 
Matthew

-- 
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 sphinx-users+unsubscr...@googlegroups.com.
To post to this group, send email to sphinx-users@googlegroups.com.
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to