Hi Ed,

① thanks for pointing me to that `sphobjinv` tool. Very helpful!

② I used it to look into one of our `objects.inv` files. A drastically
shortened version looks like this:

# Sphinx inventory version 2
# Project: TYPO3 Explained
# Version: 11.0 (development)
# The remainder of this file is compressed using zlib.
About std:doc -1 About.html About This Manual
ApiOverview/Index std:doc -1 ApiOverview/Index.html API Overview
be-user std:label -1 ApiOverview/BackendUserObject/Index.html#$ Backend
User Object
be-user-admin std:label -1 ApiOverview/BackendUserObject/Index.html#$ Is
“admin”?

Then, in reStructuredText, we can write
   :doc:`About`

to create a link to the file https://.../About.html

and you can write
   :ref:`be-user`

to create a link to the bookmark
https://.../ApiOverview/BackendUserObject/Index.html#be-user

I know this just from experience and I'm still looking myself for
documentation why 'ref' is used for 'std:label' and 'doc' for 'std:doc'.

BTW, these are the real links:
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/About.html#about
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/BackendUserObject/Index.html#be-user


③ FYI: About six years ago I created a Sphinx-extension that we are
still using. I has a single directive:

.. ref-targets-list::

that will produce the content you see here:
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/Targets.html

Editors can consult that page to see what crossreferencing targets are
available.

See https://github.com/TYPO3-Documentation/sphinxcontrib.t3targets and
https://pypi.org/project/t3targets/

-- 

Martin Bless


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/12a42cd7-6cee-a609-e236-896929748728%40gmail.com.

Reply via email to