def get_target_uri(self, docname, typ=None):
#print 'GTU',docname,typ
# FIXME: production lists are not supported yet!
if typ == 'token':
# token references are always inside production lists and must be
# replaced by \token{} in LaTeX
return '@token'
if docname not in self.docnames:
# It can be a 'main' document:
for doc in self.document_data:
if doc[0]==docname:
return "pdf:"+doc[1]+'.pdf'
# It can be in some other document's toctree
for indexname, toctree in self.env.toctree_includes.items():
if docname in toctree:
for doc in self.document_data:
if doc[0]==indexname:
return "pdf:"+doc[1]+'.pdf'
# No idea
raise NoUri
else: # Local link
return ""
评论列表
文章目录