I use Sphinx to restructure text. The syntax of internal hyperlinks will be, for example,
.. step1:
.. code-block :: sql
create table table1
This is later text in which an internal hyperlink occurs. Note
the indention of create table table1. It is part
of the .. code-block:: sql directive, so it must be indented.
Now here comes the internal link. Please see :ref:`step1` as
to how to create the table.