From 9972e37fd3e5a817598b98e769559f4cfd6cba82 Mon Sep 17 00:00:00 2001
From: ocelot-inc <pgulutzan@ocelot.ca>
Date: Sun, 3 Jul 2016 21:15:18 -0600
Subject: [PATCH] follow filename-tag convention for old anchors

---
 doc/sphinx/book/administration.rst            | 20 ++++----
 doc/sphinx/book/app/b_internals.rst           | 10 ++--
 doc/sphinx/book/app/c_lua_tutorial.rst        | 22 ++++----
 doc/sphinx/book/app/d_plugins.rst             | 12 ++---
 doc/sphinx/book/app/e_sophia/index.rst        |  2 +-
 doc/sphinx/book/box/atomic.rst                | 30 +++++------
 doc/sphinx/book/box/authentication.rst        | 12 ++---
 doc/sphinx/book/box/box_index.rst             | 50 +++++++++----------
 doc/sphinx/book/box/box_introspection.rst     |  6 +--
 doc/sphinx/book/box/box_schema.rst            | 10 ++--
 doc/sphinx/book/box/box_session.rst           |  4 +-
 doc/sphinx/book/box/box_space.rst             | 50 +++++++++----------
 doc/sphinx/book/box/index.rst                 | 28 +++++------
 doc/sphinx/book/box/limitations.rst           | 24 ++++-----
 doc/sphinx/book/box/sophia_diff.rst           | 12 ++---
 doc/sphinx/book/box/triggers.rst              |  4 +-
 doc/sphinx/book/configuration/cfg_basic.rst   |  4 +-
 .../book/configuration/cfg_replication.rst    |  4 +-
 doc/sphinx/book/configuration/index.rst       | 26 +++++-----
 doc/sphinx/book/connectors/__c.rst            |  2 +-
 doc/sphinx/book/connectors/__perl.rst         |  2 +-
 doc/sphinx/book/connectors/__php.rst          |  2 +-
 doc/sphinx/book/connectors/__python.rst       |  2 +-
 doc/sphinx/book/connectors/__results.rst      |  2 +-
 doc/sphinx/book/connectors/index.rst          | 10 ++--
 doc/sphinx/book/replication/index.rst         | 16 +++---
 .../book/user_guide_getting_started.rst       | 15 +++---
 doc/sphinx/dev_guide/box_protocol.rst         |  4 +-
 .../dev_guide/building_documentation.rst      |  4 +-
 doc/sphinx/dev_guide/building_from_source.rst |  2 +-
 doc/sphinx/reference/box_once.rst             |  2 +-
 doc/sphinx/reference/console.rst              |  8 +--
 doc/sphinx/reference/digest.rst               |  6 +--
 doc/sphinx/reference/expirationd.rst          |  4 +-
 doc/sphinx/reference/fun.rst                  |  2 +-
 doc/sphinx/reference/json.rst                 |  8 +--
 doc/sphinx/reference/msgpack.rst              |  6 +--
 doc/sphinx/reference/net_box.rst              | 12 ++---
 doc/sphinx/reference/os.rst                   |  2 +-
 doc/sphinx/reference/shard.rst                |  2 +-
 doc/sphinx/reference/socket.rst               |  4 +-
 doc/sphinx/reference/strict.rst               |  2 +-
 doc/sphinx/reference/yaml.rst                 |  4 +-
 43 files changed, 227 insertions(+), 226 deletions(-)

diff --git a/doc/sphinx/book/administration.rst b/doc/sphinx/book/administration.rst
index 91c05dae6f..bf55d6fcd8 100644
--- a/doc/sphinx/book/administration.rst
+++ b/doc/sphinx/book/administration.rst
@@ -34,7 +34,7 @@ Other signals will result in behavior defined by the operating system. Signals
 other than SIGKILL may be ignored, especially if the server is executing a
 long-running procedure which prevents return to the main thread event loop.
 
-.. _book-proctitle:
+.. _administration-proctitle:
 
 =====================================================================
                         Process title
@@ -53,7 +53,7 @@ A Tarantool server's process title has these components:
     **program_name** [**initialization_file_name**] **<role_name>** [**custom_proc_title**]
 
 * **program_name** is typically "tarantool".
-* **initialization_file_name** is the name of an :ref:`initialization file <init-label>` if one was specified.
+* **initialization_file_name** is the name of an :ref:`initialization file <index-init_label>` if one was specified.
 * **role_name** is:
   - "running" (ordinary node "ready to accept requests"),
   - "loading" (ordinary node recovering from old snap and wal files),
@@ -70,7 +70,7 @@ For example:
     1000     17337 16716  1 91362  6916   0 11:07 pts/5    00:00:13 tarantool script.lua <running>
 
 
-.. _using-tarantool-as-a-client:
+.. _administration-using_tarantool_as_a_client:
 
 =====================================================================
                         Using ``tarantool`` as a client
@@ -78,7 +78,7 @@ For example:
 
 .. program:: tarantool
 
-If ``tarantool`` is started without an :ref:`initialization file <init-label>`,
+If ``tarantool`` is started without an :ref:`initialization file <index-init_label>`,
 or if the initialization file contains :ref:`console.start() <console-start>`, then ``tarantool``
 enters interactive mode. There will be a prompt ("``tarantool>``") and it will
 be possible to enter requests. When used this way, ``tarantool`` can be
@@ -87,7 +87,7 @@ a client for a remote server.
 This section shows all legal syntax for the tarantool program, with short notes
 and examples. Other client programs may have similar options and request
 syntaxes. Some of the information in this section is duplicated in the
-:ref:`book-cfg` chapter.
+:ref:`book-cfg <index-book_cfg>` chapter.
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             Conventions used in this section
@@ -162,7 +162,7 @@ Single-byte tokens are: , or ( or ) or arithmetic operators. Examples: * , ( ).
 Tokens must be separated from each other by one or more spaces, except that
 spaces are not necessary around single-byte tokens or string literals.
 
-.. _setting delimiter:
+.. _administration-setting_delimiter:
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                         Requests
@@ -953,7 +953,7 @@ Finally, clients make a CALL to ``myapp.api_for_call`` and other API functions.
 
 In the case of ``tarantool-http``, there is no need to start the binary protocol at all.
 
-.. _modules-luarocks-and-requiring-packages:
+.. _administration-modules_luarocks_and_requiring_packages:
 
 =====================================================================
        Modules, LuaRocks, and requiring packages
@@ -969,10 +969,10 @@ before reading this section.
 
 The modules that come from Tarantool developers and community contributors are
 on rocks.tarantool.org_. Some of them
--- :ref:`expirationd <package-expirationd>`,
+-- :ref:`expirationd <expirationd-package>`,
 :ref:`mysql <d_plugins-mysql-example>`,
 :ref:`postgresql <d_plugins-postgresql-example>`,
-:ref:`shard <package-shard>` --
+:ref:`shard <shard-package>` --
 are discussed elsewhere in this manual.
 
 Step 1: Install LuaRocks.
@@ -1165,7 +1165,7 @@ directories.
 
 **Continuous remote backup**
 
-In essence: :ref:`replication <box-replication>`
+In essence: :ref:`replication <index-box_replication>`
 is useful for backup as well as for load balancing.
 Therefore taking a backup is a matter of ensuring that any given
 replica is up to date, and doing a cold backup on it.
diff --git a/doc/sphinx/book/app/b_internals.rst b/doc/sphinx/book/app/b_internals.rst
index 64945ba891..b6b13d2b93 100644
--- a/doc/sphinx/book/app/b_internals.rst
+++ b/doc/sphinx/book/app/b_internals.rst
@@ -1,4 +1,4 @@
-.. _box-internals:
+.. _b_internals:
 
 -------------------------------------------------------------------------------
                             Appendix B. Internals
@@ -26,7 +26,7 @@ same as in the binary protocol and is described in `doc/dev_guide/box-protocol.h
 each WAL record contains a header, some metadata, and then the data formatted
 according to `msgpack`_ rules. For example this is what the WAL file looks like
 after the first INSERT request ("s:insert({1})") for the introductory sandbox
-exercise ":ref:`Starting Tarantool and making your first database <first database>` “.
+exercise ":ref:`Starting Tarantool and making your first database <user_guide_getting_started-first_database>` “.
 On the left are the hexadecimal bytes that one would see with:
 
 .. code-block:: console
@@ -94,7 +94,7 @@ particular, SELECT performance, even for SELECTs running on a connection packed
 with UPDATEs and DELETEs, remains unaffected by disk load.
 
 The WAL writer employs a number of durability modes, as defined in configuration
-variable :ref:`wal_mode <wal_mode>`. It is possible to turn the write-ahead
+variable :ref:`wal_mode <index-wal_mode>`. It is possible to turn the write-ahead
 log completely off, by setting :ref:`wal_mode <cfg_binary_logging_snapshots-wal_mode>` to *none*. Even
 without the write-ahead log it's still possible to take a persistent copy of the
 entire data set with the :ref:`box.snapshot() <admin-snapshot>` request.
@@ -180,14 +180,14 @@ Step 3
 Step 4
     For the memtx engine, re-create all secondary indexes.
 
-.. _internals-replication:
+.. _b_internals-replication:
 
 ===============================
 Server Startup With Replication
 ===============================
 
 In addition to the recovery process described above, the server must take
-additional steps and precautions if :ref:`replication <box-replication>` is
+additional steps and precautions if :ref:`replication <index-box_replication>` is
 enabled.
 
 Once again the startup procedure is initiated by the ``box.cfg{}`` request.
diff --git a/doc/sphinx/book/app/c_lua_tutorial.rst b/doc/sphinx/book/app/c_lua_tutorial.rst
index e7058fe755..81cfaeee99 100644
--- a/doc/sphinx/book/app/c_lua_tutorial.rst
+++ b/doc/sphinx/book/app/c_lua_tutorial.rst
@@ -3,11 +3,11 @@
 -------------------------------------------------------------------------------
 
 There are three tutorials:
-:ref:`Insert one million tuples with a Lua stored procedure <tutorial-insert-one-million-tuples>`,
-:ref:`Sum a JSON field for all tuples <tutorial-sum-a-json-field>`,
-:ref:`Indexed pattern search <tutorial-indexed-pattern-search>`.
+:ref:`Insert one million tuples with a Lua stored procedure <c_lua_tutorial-insert_one_million_tuples>`,
+:ref:`Sum a JSON field for all tuples <c_lua_tutorial-sum_a_json_field>`,
+:ref:`Indexed pattern search <c_lua_tutorial-indexed_pattern_search>`.
 
-.. _tutorial-insert-one-million-tuples:
+.. _c_lua_tutorial-insert_one_million_tuples:
 
 =====================================================================
        Insert one million tuples with a Lua stored procedure
@@ -32,7 +32,7 @@ learning, type the statements in with the tarantool client while reading along.
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 We are going to use the "tarantool_sandbox" that was created in section
-:ref:`first database`. So there is a single space, and a numeric primary key,
+:ref:`first database <user_guide_getting_started-first_database>`. So there is a single space, and a numeric primary key,
 and a running tarantool server which also serves as a client.
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -44,7 +44,7 @@ enclosed within "delimiters". They are no longer necessary, and
 so they will not be used in this tutorial. However, they are still
 supported. Users who wish to use delimiters, or users of
 older versions of Tarantool, should check the syntax description for
-:ref:`declaring a delimiter <setting delimiter>` before proceeding.
+:ref:`declaring a delimiter <administration-setting_delimiter>` before proceeding.
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            Create a function that returns a string
@@ -476,7 +476,7 @@ What has also been shown is that inserting a million tuples took 37 seconds. The
 host computer was a Linux laptop. By changing :ref:`wal_mode <cfg_binary_logging_snapshots-wal_mode>` to 'none' before
 running the test, one can reduce the elapsed time to 4 seconds.
 
-.. _tutorial-sum-a-json-field:
+.. _c_lua_tutorial-sum_a_json_field:
 
 =====================================================================
                   Sum a JSON field for all tuples
@@ -565,7 +565,7 @@ the database is in perfect shape can skip this kind of thing.
 
 And the function is complete. Time to test it. Starting with an empty database,
 defined the same way as the sandbox database that was introduced in
-:ref:`first database`,
+:ref:`first database <user_guide_getting_started-first_database>`,
 
 .. code-block:: lua
 
@@ -603,7 +603,7 @@ that the "hard coding" assumptions could be removed, that there might have to be
 an overflow check if some field values are huge, and that the function should
 contain a "yield" instruction if the count of tuples is huge.
 
-.. _tutorial-indexed-pattern-search:
+.. _c_lua_tutorial-indexed_pattern_search:
 
 =====================================================================
        Indexed Pattern Search
@@ -619,7 +619,7 @@ which allows "magic characters" in regular expressions. |br|
 first magic character, will be used as an index search key.
 For each tuple that is found via the index, there will be
 a match of the whole pattern. |br|
-* To be :ref:`cooperative <cooperative_multitasking>`, the function should yield after every
+* To be :ref:`cooperative <atomic-cooperative_multitasking>`, the function should yield after every
 10 tuples, unless there is a reason to delay yielding. |br|
 With this function, we can take advantage of Tarantool's indexes
 for speed, and take advantage of Lua's pattern matching for flexibility.
@@ -764,7 +764,7 @@ them in the result set if they match the pattern.
 
 NOTE #4 "INNER LOOP: ITERATOR" |br|
 The for loop here is using pairs(), see the
-:ref:`explanation of what index iterators are <index-pairs>`. 
+:ref:`explanation of what index iterators are <box_index-index_pairs>`. 
 Within the inner loop,
 there will be a local variable named "tuple" which contains
 the latest tuple found via the index search key.
diff --git a/doc/sphinx/book/app/d_plugins.rst b/doc/sphinx/book/app/d_plugins.rst
index 9e3a9bc415..86d8b33cbc 100644
--- a/doc/sphinx/book/app/d_plugins.rst
+++ b/doc/sphinx/book/app/d_plugins.rst
@@ -1,4 +1,4 @@
-.. _dbms-plugins:
+.. _d_plugins-dbms_plugins:
 
 -------------------------------------------------------------------------------
                         Appendix D. Modules
@@ -34,7 +34,7 @@ also is useful for any operations, such as database copying and accelerating,
 which work best when the application can work on both SQL and Tarantool inside
 the same Lua routine.
 The methods for connect/select/insert/etc. are similar to the ones in the
-:ref:`net.box <package_net_box>` package.
+:ref:`net.box <net_box-package>` package.
 
 From a user's point of view the MySQL and PostgreSQL rocks are
 very similar, so the following sections -- "MySQL Example" and
@@ -62,7 +62,7 @@ statement to the server and receive results, including multiple result sets.
          Installation
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Check the instructions for :ref:`Downloading and installing a binary package <downloading-and-installing-a-binary-package>`
+Check the instructions for :ref:`Downloading and installing a binary package <user_guide_getting_started-downloading_and_installing_a_binary_package>`
 that apply for the environment where tarantool was installed. In addition to
 installing :code:`tarantool`, install :code:`tarantool-dev`. For example, on
 Ubuntu, add the line
@@ -94,7 +94,7 @@ For example:
 
     luarocks install mysql MYSQL_LIBDIR=/usr/local/mysql/lib
 
-See also :ref:`Modules, LuaRocks, and requiring packages <modules-luarocks-and-requiring-packages>`.
+See also :ref:`Modules, LuaRocks, and requiring packages <administration-modules_luarocks_and_requiring_packages>`.
 
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        With GitHub
@@ -418,7 +418,7 @@ any PostgreSQL statement to the server and receive results.
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Check the instructions for
-:ref:`Downloading and installing a binary package <downloading-and-installing-a-binary-package>`
+:ref:`Downloading and installing a binary package <user_guide_getting_started-downloading_and_installing_a_binary_package>`
 that apply for the environment where tarantool was installed. In addition to
 installing :code:`tarantool`, install :code:`tarantool-dev`. For example, on
 Ubuntu, add the line:
@@ -450,7 +450,7 @@ For example:
 
     luarocks install pg POSTGRESQL_LIBDIR=/usr/local/postgresql/lib
 
-See also :ref:`Modules, LuaRocks, and requiring packages <modules-luarocks-and-requiring-packages>`.
+See also :ref:`Modules, LuaRocks, and requiring packages <administration-modules_luarocks_and_requiring_packages>`.
 
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        With GitHub
diff --git a/doc/sphinx/book/app/e_sophia/index.rst b/doc/sphinx/book/app/e_sophia/index.rst
index ca169e158f..da729820bd 100644
--- a/doc/sphinx/book/app/e_sophia/index.rst
+++ b/doc/sphinx/book/app/e_sophia/index.rst
@@ -1,4 +1,4 @@
-.. _sophia:
+.. _index-sophia:
 
 -------------------------------------------------------------------------------
                         Appendix E. Sophia
diff --git a/doc/sphinx/book/box/atomic.rst b/doc/sphinx/book/box/atomic.rst
index 72a72ef52e..ba1839cb31 100644
--- a/doc/sphinx/book/box/atomic.rst
+++ b/doc/sphinx/book/box/atomic.rst
@@ -1,4 +1,4 @@
-.. _atomic_execution:
+.. _atomic-atomic_execution:
 
 -------------------------------------------------------------------------------
                             Atomic execution
@@ -9,7 +9,7 @@ fibers on a single thread. That is why there can be a guarantee of execution
 atomicity. That requires emphasis.
 
 
-.. _cooperative_multitasking:
+.. _atomic-cooperative_multitasking:
 
 ===========================================================
             Cooperative multitasking environment
@@ -40,7 +40,7 @@ some of the box calls, including the data-change requests
 :ref:`box.space...update <box_space-update>` or
 :ref:`box.space...delete <box_space-delete>`, will usually cause yielding;
 however, :ref:`box.space...select <box_space-select>` will not.
-A fuller description will appear in section :ref:`The Implicit Yield Rules <the-implicit-yield-rules>`.
+A fuller description will appear in section :ref:`The Implicit Yield Rules <atomic-the_implicit_yield_rules>`.
 
 Note re storage engine: sophia has different rules: insert or update or delete
 will very rarely cause a yield, but select can cause a yield.
@@ -59,7 +59,7 @@ account #2. If something interrupted after the withdrawal, then the institution
 would be out of balance. For such cases, the ``begin ... commit|rollback``
 block was designed.
 
-.. _box-begin:
+.. _atomic-box_begin:
 
 .. function:: box.begin()
 
@@ -68,14 +68,14 @@ block was designed.
     In effect the fiber which executes ``box.begin()`` is starting an "active
     multi-request transaction", blocking all other fibers.
 
-.. _box-commit:
+.. _atomic-box_commit:
 
 .. function:: box.commit()
 
     End the transaction, and make all its data-change
     operations permanent.
 
-.. _box-rollback:
+.. _atomic-box_rollback:
 
 .. function:: box.rollback()
 
@@ -117,7 +117,7 @@ tuple#1, deposit in tuple#2, and end the transaction, making its effects permane
     - "ok"
     ...
 
-.. _the-implicit-yield-rules:
+.. _atomic-the_implicit_yield_rules:
 
 ===========================================================
             The Implicit Yield Rules
@@ -133,17 +133,17 @@ The implicit yield requests are:
 and
 functions in package
 :ref:`fio <fio-section>`,
-:ref:`net_box <package_net_box>`,
-:ref:`console <package-console>`, or
-:ref:`socket <package-socket>` (the "os" and "network" requests).
+:ref:`net_box <net_box-package>`,
+:ref:`console <console-package>`, or
+:ref:`socket <socket-package>` (the "os" and "network" requests).
 Note re storage engine: with sophia :ref:`select <box_space-select>` is
 an implicit yield request, but data-change requests may not be.
 
 The yield occurs just before a blocking syscall, such as a write to the Write-Ahead Log (WAL)
 or a network message reception.
 
-Implicit yield requests are disabled by :ref:`begin <box-begin>`,
-and enabled again by :ref:`commit <box-commit>`.
+Implicit yield requests are disabled by :ref:`box.begin <atomic-box_begin>`,
+and enabled again by :ref:`commit <atomic-box_commit>`.
 Therefore the sequence` |br|
 :codenormal:`begin` |br|
 :codenormal:`implicit yield request #1` |br|
@@ -158,8 +158,8 @@ it only enables yields caused by earlier implicit yield requests.
 Despite their resemblance to implicit yield requests,
 :ref:`truncate <box_space-truncate>` and :ref:`drop <box_space-drop>` do not cause implicit yield.
 Despite their resemblance to functions of the fio package,
-functions of the :ref:`os <package-os>` package do not cause implicit yield.
-Despite its resemblance to commit, :ref:`rollback <box-rollback>` does not
+functions of the :ref:`os <os-package>` package do not cause implicit yield.
+Despite its resemblance to commit, :ref:`rollback <atomic-box_rollback>` does not
 enable yields.
 
 If :ref:`wal_mode <cfg_binary_logging_snapshots-wal_mode>` = 'none', then implicit yielding is disabled,
@@ -178,7 +178,7 @@ being executed on the server, but causes yielding if it
 is done as a series of transmissions from a client, including
 a client which operates via telnet, via one of the connectors,
 or via the MySQL and PostgreSQL rocks,
-or via the interactive mode when :ref:`"Using tarantool as a client" <using-tarantool-as-a-client>`.
+or via the interactive mode when :ref:`"Using tarantool as a client" <administration-using_tarantool_as_a_client>`.
 
 After a fiber has yielded and then has regained control,
 it immediately issues :ref:`testcancel <fiber-testcancel>`.
diff --git a/doc/sphinx/book/box/authentication.rst b/doc/sphinx/book/box/authentication.rst
index 1ae4b86a0d..b9055e1297 100644
--- a/doc/sphinx/book/box/authentication.rst
+++ b/doc/sphinx/book/box/authentication.rst
@@ -1,4 +1,4 @@
-.. _box-authentication:
+.. _authentication:
 
 -------------------------------------------------------------------------------
                               Access control
@@ -111,7 +111,7 @@ To create a new user, say:
     box.schema.user.create(*user-name*, {if_not_exists = true})
     box.schema.user.create(*user-name*, {password = *password*}).
 
-The :samp:`password={password}` specification is good because in a :ref:`URI` (Uniform Resource Identifier) it is
+The :samp:`password={password}` specification is good because in a :ref:`URI <index-uri>` (Uniform Resource Identifier) it is
 usually illegal to include a user-name without a password.
 
 To change the user's password, say:
@@ -172,7 +172,7 @@ tuple in the _user space, and then drops the user.
 
     The maximum number of users is 32.
 
-.. _privileges:
+.. _authentication-privileges:
 
 ===========================================================
                Privileges and the _priv space
@@ -347,9 +347,9 @@ purposes are:
     box.session.su(*user-name*) -- allows changing current user to 'user-name'
 
 If a user types requests directly on the Tarantool server in its interactive
-mode, or if a user connects via telnet to the administrative port (using :ref:`admin <admin_port>`
+mode, or if a user connects via telnet to the administrative port (using :ref:`admin <index-admin_port>`
 instead of listen), then the user by default is 'admin' and has many privileges.
-If a user connects from an application program via one of the :ref:`connectors <box-connectors>`, then
+If a user connects from an application program via one of the :ref:`connectors <index-box_connectors>`, then
 the user by default is 'guest' and has few privileges. Typically an admin user
 will set up and configure objects, then grant privileges to appropriate non-admin
 users. Typically a guest user will use ``box.session.su()`` to change into a non-generic
@@ -383,7 +383,7 @@ privileges in a role and then grant or revoke the role. Role information is
 in the _user space but the third field - the type field - is 'role' rather
 than 'user'.
 
-.. _rep-role:
+.. _authentication-rep_role:
 
 If a role R1 is granted a privilege X, and user U1 is granted a privilege
 "role R1", then user U1 in effect has privilege X. Then if a role R2 is
diff --git a/doc/sphinx/book/box/box_index.rst b/doc/sphinx/book/box/box_index.rst
index 02d6112a2c..e4c910bf3d 100644
--- a/doc/sphinx/book/box/box_index.rst
+++ b/doc/sphinx/book/box/box_index.rst
@@ -20,7 +20,7 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`.
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`.
 
         :rtype: boolean
 
@@ -30,7 +30,7 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`.
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`.
 
     .. data:: parts
 
@@ -38,7 +38,7 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`.
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`.
 
         :rtype: table
 
@@ -58,7 +58,7 @@ API is a direct binding to corresponding methods of index objects of type
               type: TREE
             ...
 
-.. _index-pairs:
+.. _box_index-index_pairs:
 
     .. method:: pairs(bitset-value | search-value, iterator-type)
 
@@ -77,18 +77,18 @@ API is a direct binding to corresponding methods of index objects of type
         iterator in Tarantool does not own a consistent read view. Instead, each
         procedure is granted exclusive access to all tuples and spaces until
         there is a "context switch": which may happen due to
-        :ref:`the-implicit-yield-rules <the-implicit-yield-rules>`,
+        :ref:`the-implicit-yield-rules <atomic-the_implicit_yield_rules>`,
         or by an
         explicit call to :ref:`fiber.yield <fiber-yield>`. When the execution flow returns
         to the yielded procedure, the data set could have changed significantly.
         Iteration, resumed after a yield point, does not preserve the read view,
         but continues with the new content of the database.
-        The tutorial :ref:`Indexed pattern search <tutorial-indexed-pattern-search>`
+        The tutorial :ref:`Indexed pattern search <c_lua_tutorial-indexed_pattern_search>`
         shows one way that iterators and yields can be used together.
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`;
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`;
         * :samp:`{bitset-value} | {search-value...}` = what to search for
         * :samp:`{iterator-type}` = as defined in tables below.
 
@@ -384,7 +384,7 @@ API is a direct binding to corresponding methods of index objects of type
               print(tuple)
             end
 
-    .. _index_object_select:
+    .. _box_index-select:
 
     .. method:: select(key, options)
 
@@ -396,7 +396,7 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`;
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`;
         * :samp:`field-value(s)` = values to be matched against the index key;
         * :samp:`option(s)` any or all of
             * :samp:`iterator = {iterator-type}`,
@@ -522,7 +522,7 @@ API is a direct binding to corresponding methods of index objects of type
             - - ['Tuple with bit value = 01', 1]
             ...
 
-    .. _index_min:
+    .. _box_index-min:
 
     .. method:: min([key-value])
 
@@ -530,7 +530,7 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`;
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`;
         * :samp:`key-value`.
 
         :return: the tuple for the first key in the index. If optional
@@ -553,7 +553,7 @@ API is a direct binding to corresponding methods of index objects of type
             - ['Alpha!', 55, 'This is the first tuple!']
             ...
 
-    .. _index_max:
+    .. _box_index-max:
 
     .. method:: max([key-value])
 
@@ -561,7 +561,7 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`;
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`;
         * :samp:`key-value`.
 
         :return: the tuple for the last key in the index. If optional ``key-value``
@@ -584,7 +584,7 @@ API is a direct binding to corresponding methods of index objects of type
             - ['Gamma!', 55, 'This is the third tuple!']
             ...
 
-    .. _index_random:
+    .. _box_index-random:
 
     .. method:: random(random-value)
 
@@ -594,7 +594,7 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`;
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`;
         * :samp:`random-value` (type = number) = an arbitrary non-negative integer.
 
         :return: the tuple for the random key in the index.
@@ -613,7 +613,7 @@ API is a direct binding to corresponding methods of index objects of type
             - ['Beta!', 66, 'This is the second tuple!']
             ...
 
-    .. _index_count:
+    .. _box_index-count:
 
     .. method:: count([key], [iterator])
 
@@ -622,7 +622,7 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`;
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`;
         * :samp:`{key-value}` (type = Lua table or scalar) =
           the value which must match the key(s) in the specified index. The type
           may be a list of field-values, or a tuple containing only the
@@ -658,7 +658,7 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`;
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`;
         * :samp:`{key}` (type = Lua table or scalar) = key to be matched against
           the index key;
         * :samp:`{operator, field_no, value}` (type = Lua table) = update
@@ -677,14 +677,14 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`;
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`;
         * :samp:`key` (type = Lua table or scalar) = key to be matched against
           the index key.
 
         :return: the deleted tuple.
         :rtype:  tuple
 
-    .. _index_alter:
+    .. _box_index-alter:
 
     .. method:: alter({options})
 
@@ -692,7 +692,7 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`;
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`;
         * :samp:`{options}` = options list, same as the options list for
           :ref:`create_index <box_space-create_index>`.
 
@@ -719,7 +719,7 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`.
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`.
 
         :return: nil.
 
@@ -740,7 +740,7 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`;
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`;
         * :samp:`{index-name}` (type = string) = new name for index.
 
         :return: nil
@@ -763,7 +763,7 @@ API is a direct binding to corresponding methods of index objects of type
 
         Parameters:
 
-        * :samp:`{index_object}` = an :ref:`object reference <object-reference>`.
+        * :samp:`{index_object}` = an :ref:`object reference <index-object_reference>`.
 
         :return: number of bytes
         :rtype: number
@@ -882,7 +882,7 @@ additional criteria.
       for i=1,#page,1 do print(page[i]) end
     end
 
-.. _RTREE:
+.. _box_index-rtree:
 
 =============================================================================
              Package `box.index` with index type = RTREE for spatial searches
diff --git a/doc/sphinx/book/box/box_introspection.rst b/doc/sphinx/book/box/box_introspection.rst
index 29233dd9a4..cc48e92a52 100644
--- a/doc/sphinx/book/box/box_introspection.rst
+++ b/doc/sphinx/book/box/box_introspection.rst
@@ -12,7 +12,7 @@
 
 The ``box.cfg`` package is for administrators to specify all the server
 configuration parameters; the full description of the parameters is in
-section :ref:`book-cfg`. Use ``box.cfg`` without braces to get read-only
+section :ref:`book-cfg <index-book_cfg>`. Use ``box.cfg`` without braces to get read-only
 access to those parameters.
 
 **Example:**
@@ -43,7 +43,7 @@ Some important ones:
 * **pid** is the process ID of the server. This value is also shown by the
   :ref:`tarantool <tarantool-build>` package.
 * **version** is the Tarantool version. This value is also shown by
-  :ref:`tarantool --version <tarantool-version>`.
+  :ref:`tarantool --version <index-tarantool_version>`.
 * **uptime** is the number of seconds since the server started.
 
 .. _box_introspection-box_info:
@@ -153,7 +153,7 @@ The arena_size and arena_used values are the amount of the % of
       slab_size: 16384
     ...
 
-.. _box_stat:
+.. _box_introspection-box_stat:
 
 =====================================================================
                          Package `box.stat`
diff --git a/doc/sphinx/book/box/box_schema.rst b/doc/sphinx/book/box/box_schema.rst
index fa14eb7974..c9c9348d43 100644
--- a/doc/sphinx/book/box/box_schema.rst
+++ b/doc/sphinx/book/box/box_schema.rst
@@ -45,7 +45,7 @@ for spaces, users, roles, and function tuples.
         +---------------+--------------------------------+---------+---------------------+
         | engine        | storage engine =               | string  | 'memtx'             |
         |               | :ref:`'memtx' or 'sophia'      |         |                     |
-        |               | <two-storage-engines>`         |         |                     |
+        |               | <index-two_storage_engines>`   |         |                     |
         +---------------+--------------------------------+---------+---------------------+
         | user          | user name                      | string  | current user's name |
         +---------------+--------------------------------+---------+---------------------+
@@ -141,7 +141,7 @@ available for insert, select, and all the other :ref:`box.space <box_space>` fun
 
 .. function:: box.schema.user.grant(user-name, privileges)
 
-    Grant :ref:`privileges <privileges>` to a user.
+    Grant :ref:`privileges <authentication-privileges>` to a user.
 
     :param string user-name: the name of the user
     :param string privileges: either privilege,object-type,object-name
@@ -159,7 +159,7 @@ available for insert, select, and all the other :ref:`box.space <box_space>` fun
 
 .. function:: box.schema.user.revoke(user-name, privileges)
 
-    Revoke :ref:`privileges <privileges>` from a user.
+    Revoke :ref:`privileges <authentication-privileges>` from a user.
 
     :param string user-name: the name of the user
     :param string privileges: either privilege,object-type,object-name
@@ -260,7 +260,7 @@ available for insert, select, and all the other :ref:`box.space <box_space>` fun
 
 .. function:: box.schema.role.grant(role-name, privileges)
 
-    Grant :ref:`privileges <privileges>` to a role.
+    Grant :ref:`privileges <authentication-privileges>` to a role.
 
     :param string role-name: the name of the role
     :param string privileges: either privilege,object-type,object-name
@@ -278,7 +278,7 @@ available for insert, select, and all the other :ref:`box.space <box_space>` fun
 
 .. function:: box.schema.role.revoke(role-name, privileges)
 
-    Revoke :ref:`privileges <privileges>` to a role.
+    Revoke :ref:`privileges <authentication-privileges>` to a role.
 
     :param string role-name: the name of the role
     :param string privileges: either privilege,object-type,object-name
diff --git a/doc/sphinx/book/box/box_session.rst b/doc/sphinx/book/box/box_session.rst
index a8a1159b7e..e540f676e2 100644
--- a/doc/sphinx/book/box/box_session.rst
+++ b/doc/sphinx/book/box/box_session.rst
@@ -81,9 +81,9 @@ client connection.
     - 'radius_of_mars=3396 random_memorandum=Don''t forget the eggs. '
     ...
 
-See the section :ref:`Triggers <box-triggers>`
+See the section :ref:`Triggers <triggers-box_triggers>`
 for instructions about defining triggers for connect and disconnect
 events with ``box.session.on_connect()`` and ``box.session.on_disconnect()``.
-See the section :ref:`Access control <box-authentication>`
+See the section :ref:`Access control <authentication>`
 for instructions about ``box.session`` functions that affect user
 identification and security.
diff --git a/doc/sphinx/book/box/box_space.rst b/doc/sphinx/book/box/box_space.rst
index 39fdd07a3b..ffcd853775 100644
--- a/doc/sphinx/book/box/box_space.rst
+++ b/doc/sphinx/book/box/box_space.rst
@@ -123,7 +123,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
         first created index, which will be used as the primary-key index, must be
         unique.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`;
         :codeitalic:`index_name` (type = string) = name of index, which should not be a number
         and should not contain special characters;
         :codeitalic:`options`.
@@ -183,7 +183,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
 
         Insert a tuple into a space.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`;
         :codeitalic:`tuple` (type = Lua table or tuple) = tuple to be inserted.
 
         :return: the inserted tuple
@@ -209,7 +209,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
 
         Search for a tuple or a set of tuples in the given space.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`;
         :codeitalic:`key` (type = Lua table or scalar) = key to be matched against the index key,
         which may be multi-part.
 
@@ -274,7 +274,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
         For examples of complex ``select`` requests, where one can specify which
         index to search and what condition to use (for example "greater than"
         instead of "equal to") and how many tuples to return, see the later section
-        :ref:`index_object:select <index_object_select>`.
+        :ref:`index_object:select <box_index-select>`.
 
     .. _box_space-get:
 
@@ -282,7 +282,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
 
         Search for a tuple in the given space.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`;
         :codeitalic:`key` (type = Lua table or scalar) = key to be matched against the index
         key, which may be multi-part.
 
@@ -314,7 +314,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
 
         Drop a space.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`.
 
         :return: nil
 
@@ -335,7 +335,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
 
         Rename a space.
 
-        Parameters::samp:`{space_object}` = an :ref:`object reference <object-reference>`;
+        Parameters::samp:`{space_object}` = an :ref:`object reference <index-object_reference>`;
         :codeitalic:`space-name` (type = string) = new name for space.
 
         :return: nil
@@ -364,7 +364,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
         ``box.space...:put()`` have the same effect; the latter is sometimes used
         to show that the effect is the converse of ``box.space...:get()``.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`;
         :codeitalic:`tuple` (type = Lua table or tuple) = tuple to be inserted.
 
         :return: the inserted tuple.
@@ -419,7 +419,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
         For ``!`` and ``=`` operations the field number can be ``-1``, meaning the last field in the tuple.
 
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`;
         :codeitalic:`key` (type = Lua table or scalar) = primary-key field values, must be passed as a Lua
         table if key is multi-part;
         :codeitalic:`{operator, field_no, value}` (type = table): a group of arguments for each
@@ -568,7 +568,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
         error checks before returning -- this is a design feature which
         enhances throughput but requires more caution on the part of the user.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`;
         :samp:`{tuple_value}` (type = Lua table or scalar) =
         field values, must be passed as a Lua table;
         :codeitalic:`{operator, field_no, value}` (type = Lua table) = a group of arguments for each
@@ -597,7 +597,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
 
         Delete a tuple identified by a primary key.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`
         :codeitalic:`key` (type = Lua table or scalar) = key to be matched against the index
         key, which may be multi-part.
 
@@ -634,7 +634,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
         ``box.space.tester:insert{0}`` and ``box.space[800]:insert{0}``
         are equivalent requests.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`.
 
         **Example:**
 
@@ -652,7 +652,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
         Whether or not this space is enabled.
         The value is ``false`` if the space has no index.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`.
 
     .. _box_space-field_count:
 
@@ -672,7 +672,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
 
         The default value is ``0``, which means there is no required field count.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`.
 
         **Example:**
 
@@ -689,7 +689,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
         :ref:`box.index <box_index>` with methods to search tuples and iterate over them in
         predefined order.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`.
 
         :rtype: table
 
@@ -710,7 +710,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
 
     .. method:: count([key], [iterator])
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`;
         :codeitalic:`key` (type = Lua table or scalar) = key to be matched against the primary index
         key, which may be multi-part; :codeitalic:`iterator` = comparison method.
 
@@ -732,7 +732,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
 
     .. method:: len()
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`.
 
         :return: Number of tuples in the space.
 
@@ -751,7 +751,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
 
         Deletes all tuples.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`.
 
         **Complexity Factors:** Index size, Index type, Number of tuples accessed.
 
@@ -782,7 +782,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
         value set to ``1``.
 
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`;
         :codeitalic:`field-value(s)` (type = Lua table or scalar) = values which must match the primary key.
 
         :return: the new counter value
@@ -822,7 +822,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
         ``field-value(s)``, a new one is not inserted. If the counter value drops
         to zero, the tuple is deleted.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`;
         :codeitalic:`field-value(s)` (type = Lua table or scalar) = values which must match the primary key.
 
         :return: the new counter value
@@ -865,7 +865,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
         primary-key field will be incremented before the insert.
         Note re storage engine: sophia does not support auto_increment.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`;
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`;
         :codeitalic:`field-value(s)` (type = Lua table or scalar) = tuple's fields, other than the primary-key field.
 
         :return: the inserted tuple.
@@ -895,7 +895,7 @@ A list of all ``box.space`` functions follows, then comes a list of all
 
         A helper function to prepare for iterating over all tuples in a space.
 
-        Parameters: :samp:`{space_object}` = an :ref:`object reference <object-reference>`.
+        Parameters: :samp:`{space_object}` = an :ref:`object reference <index-object_reference>`.
 
         :return: function which can be used in a for/end loop. Within the loop, a value is returned for each iteration.
         :rtype:  function, tuple
@@ -1115,21 +1115,21 @@ A list of all ``box.space`` functions follows, then comes a list of all
 .. data:: _user
 
     ``_user`` is a system tuple set for
-    support of the :ref:`authorization feature <box-authentication>`.
+    support of the :ref:`authorization feature <authentication>`.
 
 .. _box_space-priv:
 
 .. data:: _priv
 
     ``_priv`` is a system tuple set for
-    support of the :ref:`authorization feature <box-authentication>`.
+    support of the :ref:`authorization feature <authentication>`.
 
 .. _box_space-cluster:
 
 .. data:: _cluster
 
     ``_cluster`` is a system tuple set
-    for support of the :ref:`replication feature <box-replication>`.
+    for support of the :ref:`replication feature <index-box_replication>`.
 
 =============================================================================
           Example: use box.space functions to read _space tuples
diff --git a/doc/sphinx/book/box/index.rst b/doc/sphinx/book/box/index.rst
index 2308c22975..0a4ab51cea 100644
--- a/doc/sphinx/book/box/index.rst
+++ b/doc/sphinx/book/box/index.rst
@@ -12,7 +12,7 @@ Document data model
 ===================
 
 If you tried out the
-:ref:`Starting Tarantool and making your first database <first database>`
+:ref:`Starting Tarantool and making your first database <user_guide_getting_started-first_database>`
 exercise from the last chapter, then your database looks like this:
 
 .. code-block:: none
@@ -85,7 +85,7 @@ strings with single quotes, separates fields with commas,
 and encloses the tuple inside square brackets.
 For example: ``[ 3, 'length', 93 ]``.
 
-.. _box.index:
+.. _index-box_index:
 
 -----
 Index
@@ -116,7 +116,7 @@ An index definition may include identifiers of tuple fields
 and their expected types. The allowed types for indexed fields are NUM
 (unsigned integer between 0 and
 18,446,744,073,709,551,615), or STR (string, any sequence of octets), or ARRAY
-(a series of numbers for use with :ref:`RTREE indexes <RTREE>`.
+(a series of numbers for use with :ref:`RTREE indexes <box_index-rtree>`.
 Take our example, which has the request:
 
 .. code-block:: tarantoolsession
@@ -130,7 +130,7 @@ Space definitions and index definitions are stored permanently
 in system spaces. It is possible to add, drop, or alter the
 definitions at runtime, with some restrictions.
 The syntax details for defining spaces and indexes
-are in section :ref:`The box library <box-library>`.
+are in section :ref:`The box library <index-box_library>`.
 
 ----------
 Data types
@@ -206,7 +206,7 @@ The basic operations are: the five data-change operations
 (insert, update, upsert, delete, replace), and the data-retrieval
 operation (select). There are also minor operations like
 “ping” which can only be used with the binary protocol.
-Also, there are :ref:`index iterator <index-pairs>` operations, which can only
+Also, there are :ref:`index iterator <box_index-index_pairs>` operations, which can only
 be used with Lua code. (Index iterators are for traversing
 indexes one key at a time, taking advantage of features
 that are specific to an index type, for example evaluating
@@ -296,11 +296,11 @@ all computer instructions until a yield, then switch to execute
 the instructions of a different fiber. Thus (say) the thread reads
 row#x for the sake of fiber#1, then writes row#y for the sake of fiber#2.
 
-.. _yields_must_happen:
+.. _index-yields_must_happen:
 
 **FACT #3**: yields must happen, otherwise the transaction processor
 thread would stick permanently on the same fiber.
-There are :ref:`implicit yields <the-implicit-yield-rules>`: every data-change operation
+There are :ref:`implicit yields <atomic-the_implicit_yield_rules>`: every data-change operation
 or network-access causes an implicit yield, and every
 statement that goes through the tarantool client causes
 an implicit yield. And there are explicit yields:
@@ -326,7 +326,7 @@ to another fiber, and delete the tuple that was just updated.
 Note re storage engine: sophia handles yields differently, see
 :ref:`differences between memtx and sophia <sophia_diff>`.
 Note re multi-request transactions: there is a way to delay yields,
-see :ref:`Atomic execution <atomic_execution>`.
+see :ref:`Atomic execution <atomic-atomic_execution>`.
 
 Since locks don't exist, and disk writes only involve the write-ahead log,
 transactions are usually fast. Also the Tarantool server may not be using
@@ -340,7 +340,7 @@ A complete grammar of supported data-manipulation functions will come later in t
 
 Since not all Tarantool operations can be expressed with the data-manipulation
 functions, or with Lua, to gain complete access to data manipulation
-functionality one must use a :ref:`Perl, PHP, Python or other programming language connector <box-connectors>`.
+functionality one must use a :ref:`Perl, PHP, Python or other programming language connector <index-box_connectors>`.
 The client/server protocol is open and documented: an annotated BNF can be found
 in the source tree, file `doc/dev_guide/box-protocol.html`_.
 
@@ -372,7 +372,7 @@ Some snapshots are automatic, or users can make them at any time
 with the :ref:`box.snapshot() <admin-snapshot>` request.
 
 Details about the WAL writer and the recovery process
-are in the :ref:`Internals <box-internals>` section.
+are in the :ref:`Internals <b_internals>` section.
 
 -----------------
 Data manipulation
@@ -389,7 +389,7 @@ select a tuple set from a space named tester where the primary-key field value
 equals 1. For the examples there is an assumption that the numeric id of 'tester' is 512,
 which happens to be the case in our sandbox example only.
 
-.. _object-reference:
+.. _index-object_reference:
 
 First, there are five *object reference variations*:
 
@@ -572,7 +572,7 @@ because a rectangle whose corners are at coordinates
 are at coordinates 3,5,9,10. Searches on RTREE indexes
 can be for GT, GE, LT, LE, OVERLAPS, or NEIGHBOR.
 
-.. _box-library:
+.. _index-box_library:
 
 ---------------
 The box library
@@ -636,7 +636,7 @@ introspection (inspecting contents of spaces, accessing server configuration).
 In the discussion of each data-manipulation function there will be a note about
 which Complexity Factors might affect the function's resource usage.
 
-.. _two-storage-engines:
+.. _index-two_storage_engines:
 
 =====================================================================
             The two storage engines: memtx and sophia
@@ -650,7 +650,7 @@ The manual concentrates on memtx because it is the default and has been around
 longer. But sophia is a working key-value engine and will especially appeal to
 users who like to see data go directly to disk, so that recovery time might be
 shorter and database size might be larger. For architectural explanations and
-benchmarks, see `sphia.org`_ and Appendix E: :ref:`sophia <sophia>`.
+benchmarks, see `sphia.org`_ and Appendix E: :ref:`sophia <index-sophia>`.
 On the other hand, sophia lacks some functions and
 options that are available with memtx. Where that is the case, the relevant
 description will contain a note beginning with the words
diff --git a/doc/sphinx/book/box/limitations.rst b/doc/sphinx/book/box/limitations.rst
index cd00b22360..10487e2865 100644
--- a/doc/sphinx/book/box/limitations.rst
+++ b/doc/sphinx/book/box/limitations.rst
@@ -2,7 +2,7 @@
                             Limitations
 -------------------------------------------------------------------------------
 
-.. _lim_fields_in_index:
+.. _limitations_fields_in_index:
 
 **Number of parts in an index**
 
@@ -13,7 +13,7 @@
 
     Note re storage engine: sophia allows 8 parts in an index.
 
-.. _lim_indexes_in_space:
+.. _limitations_indexes_in_space:
 
 **Number of indexes in a space**
 
@@ -21,7 +21,7 @@
 
     Note re storage engine: sophia allows 1 index in a space.
 
-.. _lim_fields_in_tuple:
+.. _limitations_fields_in_tuple:
 
 **Number of fields in a tuple**
 
@@ -30,7 +30,7 @@
     :ref:`field_count <box_space-field_count>`
     member, or the maximum tuple length.
 
-.. _lim_bytes_in_tuple:
+.. _limitations_bytes_in_tuple:
 
 **Number of bytes in a tuple**
 
@@ -40,20 +40,20 @@
     specify a larger value. For example
     :code:`box.cfg{slab_alloc_maximal=2*1048576}`.
 
-.. _lim_number_of_spaces:
+.. _limitations_number_of_spaces:
 
 **Number of spaces**
 
     The theoretical maximum is 2147483647 (``box.schema.SPACE_MAX``).
 
-.. _lim_number_of_connections:
+.. _limitations_number_of_connections:
 
 **Number of connections**
 
     The practical limit is the number of file descriptors that one can set
     with the operating system.
 
-.. _lim_space_size:
+.. _limitations_space_size:
 
 **Space size**
 
@@ -61,32 +61,32 @@
     :ref:`slab_alloc_arena <cfg_storage-slab_alloc_arena>`, which in turn
     is limited by the total available memory.
 
-.. _lim_update_ops:
+.. _limitations_update_ops:
 
 **Update operations count**
 
     The maximum number of operations that can be in a single update
     is 4000 (``BOX_UPDATE_OP_CNT_MAX``).
 
-.. _lim_users_and_roles:
+.. _limitations_users_and_roles:
 
 **Number of users and roles**
 
     32 (BOX_USER_MAX).
 
-.. _lim_length:
+.. _limitations_length:
 
 **Length of an index name or space name or user name**
 
     32 (``box.schema.NAME_MAX``).
 
-.. _lim_replicas:
+.. _limitations_replicas:
 
 **Number of replicas in a cluster**
 
     32 (``box.schema.REPLICA_MAX``).
 
-.. _lim_sophia:
+.. _limitations_sophia:
 
 For additional limitations which apply only to the sophia
 storage engine, see section
diff --git a/doc/sphinx/book/box/sophia_diff.rst b/doc/sphinx/book/box/sophia_diff.rst
index ea4f76931c..33c83c3cc0 100644
--- a/doc/sphinx/book/box/sophia_diff.rst
+++ b/doc/sphinx/book/box/sophia_diff.rst
@@ -40,9 +40,9 @@
     With memtx, temporary spaces are supported. |br|
     With sophia, they are not.
 
-    With memtx, the :ref:`alter() <index_alter>` and :ref:`count() <index_count>`
-    and :ref:`min() <index_min>` and :ref:`max() <index_max>` and
-    :ref:`random() <index_random>` and :ref:`auto_increment() <box_space-auto_increment>`
+    With memtx, the :ref:`alter() <box_index-alter>` and :ref:`count() <box_index-count>`
+    and :ref:`min() <box_index-min>` and :ref:`max() <box_index-max>` and
+    :ref:`random() <box_index-random>` and :ref:`auto_increment() <box_space-auto_increment>`
     and :ref:`truncate() <box_space-truncate>` functions are supported. |br|
     With sophia, they are not.
 
@@ -53,10 +53,10 @@
     With sophia, it is not.
     (This is a minor matter because on a unique index EQ and REQ do the same thing.)
 
-    It was explained :ref:`earlier <yields_must_happen>` that memtx does not "yield" on a select request,
+    It was explained :ref:`earlier <index-yields_must_happen>` that memtx does not "yield" on a select request,
     it yields only on data-change requests. However, sophia does yield on a select
     request, or on an equivalent such as get() or pairs(). This has significance
-    for :ref:`cooperative multitasking <cooperative_multitasking>`.
+    for :ref:`cooperative multitasking <atomic-cooperative_multitasking>`.
 
-    For more about sophia, see Appendix E :ref:`sophia <sophia>`.
+    For more about sophia, see Appendix E :ref:`sophia <index-sophia>`.
 
diff --git a/doc/sphinx/book/box/triggers.rst b/doc/sphinx/book/box/triggers.rst
index d1f4fbd807..a5d749fdd7 100644
--- a/doc/sphinx/book/box/triggers.rst
+++ b/doc/sphinx/book/box/triggers.rst
@@ -1,4 +1,4 @@
-.. _box-triggers:
+.. _triggers-box_triggers:
 
 -------------------------------------------------------------------------------
                             Triggers
@@ -133,7 +133,7 @@ Here is what might appear in the log file in a typical installation:
     (1) The :ref:`console.connect <console-connect>` function includes an authentication check for all users except 'guest';
     for this case the on_auth trigger function is invoked after the on_connect trigger function,
     if and only if the connection has succeeded so far.
-    (2) The binary protocol has a separate :ref:`authentication packet <iproto-authentication>` --
+    (2) The binary protocol has a separate :ref:`authentication packet <box_protocol-authentication>` --
     for this case, connection and authentication are considered to be separate steps.
 
     Unlike other trigger types, on_auth trigger functions are invoked `before`
diff --git a/doc/sphinx/book/configuration/cfg_basic.rst b/doc/sphinx/book/configuration/cfg_basic.rst
index 069e264f6d..94fe871c59 100644
--- a/doc/sphinx/book/configuration/cfg_basic.rst
+++ b/doc/sphinx/book/configuration/cfg_basic.rst
@@ -20,7 +20,7 @@
 
 .. confval:: custom_proc_title
 
-    Add the given string to the server's :ref:`Process title <book-proctitle>`
+    Add the given string to the server's :ref:`Process title <administration-proctitle>`
     (what’s shown in the COMMAND column for :samp:`ps -ef` and :samp:`top -c` commands).
 
     For example, ordinarily :samp:`ps -ef` shows the Tarantool server process thus:
@@ -46,7 +46,7 @@
 
 .. confval:: listen
 
-    The read/write data port number or :ref:`URI` (Universal Resource Identifier)
+    The read/write data port number or :ref:`URI <index-uri>` (Universal Resource Identifier)
     string. Has no default value, so **must be specified** if connections will
     occur from remote clients that do not use “admin address” (the
     administrative host and port).
diff --git a/doc/sphinx/book/configuration/cfg_replication.rst b/doc/sphinx/book/configuration/cfg_replication.rst
index c4de4ca276..7aa5db0271 100644
--- a/doc/sphinx/book/configuration/cfg_replication.rst
+++ b/doc/sphinx/book/configuration/cfg_replication.rst
@@ -3,8 +3,8 @@
 .. confval:: replication_source
 
     If replication_source is not an empty string, the server is considered
-    to be a Tarantool :ref:`replica <box-replication>`. The replica server will try to connect to the
-    master which replication_source specifies with a :ref:`URI` (Universal
+    to be a Tarantool :ref:`replica <index-box_replication>`. The replica server will try to connect to the
+    master which replication_source specifies with a :ref:`URI <index-uri>` (Universal
     Resource Identifier), for example :samp:`{konstantin}:{secret_password}@{tarantool.org}:{3301}`.
 
     If there is more than one replication source in a cluster, specify an
diff --git a/doc/sphinx/book/configuration/index.rst b/doc/sphinx/book/configuration/index.rst
index 1a5325eca3..5629fdb0e0 100644
--- a/doc/sphinx/book/configuration/index.rst
+++ b/doc/sphinx/book/configuration/index.rst
@@ -1,4 +1,4 @@
-.. _book-cfg:
+.. _index-book_cfg:
 
 -------------------------------------------------------------------------------
                         Configuration reference
@@ -29,7 +29,7 @@ Tarantool is started by entering the command:
 
     Print an annotated list of all available options and exit.
 
-.. _tarantool-version:
+.. _index-tarantool_version:
 
 .. option:: -V, --version
 
@@ -67,7 +67,7 @@ Tarantool is started by entering the command:
 .. _git describe: http://www.kernel.org/pub/software/scm/git/docs/git-describe.html
 .. _git repository: http://github.com/tarantool/tarantool.git
 
-.. _URI:
+.. _index-uri:
 
 =====================================================================
                                 URI
@@ -106,7 +106,7 @@ In certain circumstances a Unix domain socket may be used
 where a URI is expected, for example "unix/:/tmp/unix_domain_socket.sock" or
 simply "/tmp/unix_domain_socket.sock".
 
-.. _init-label:
+.. _index-init_label:
 
 =====================================================================
                        Initialization file
@@ -152,15 +152,15 @@ Then the screen might look like this:
 If one wishes to start an interactive session on the same terminal after
 initialization is complete, one can use :ref:`console.start() <console-start>`.
 
-.. _local_hot_standby:
-.. _replication_port:
-.. _slab_alloc_arena:
-.. _replication_source:
-.. _admin_port:
-.. _snap_dir:
-.. _wal_dir:
-.. _wal_mode:
-.. _snapshot daemon:
+.. _index-local_hot_standby:
+.. _index-replication_port:
+.. _index-slab_alloc_arena:
+.. _index-replication_source:
+.. _index-admin_port:
+.. _index-snap_dir:
+.. _index-wal_dir:
+.. _index-wal_mode:
+.. _index-snapshot daemon:
 
 =====================================================================
                 Configuration parameters
diff --git a/doc/sphinx/book/connectors/__c.rst b/doc/sphinx/book/connectors/__c.rst
index 9a592aa03a..1adef38152 100644
--- a/doc/sphinx/book/connectors/__c.rst
+++ b/doc/sphinx/book/connectors/__c.rst
@@ -66,7 +66,7 @@ To compile and link the program, say:
 
 Before trying to run,
 check that the server is listening and that the space :code:`examples` exists, as 
-:ref:`described earlier <connector-setting>`.
+:ref:`described earlier <index-connector_setting>`.
 To run the program, say :code:`./example`. The program will connect
 to the server, and will send the request.
 If Tarantool is not running on localhost with listen address = 3301, the program
diff --git a/doc/sphinx/book/connectors/__perl.rst b/doc/sphinx/book/connectors/__perl.rst
index ac9851e36a..89a291d0c7 100644
--- a/doc/sphinx/book/connectors/__perl.rst
+++ b/doc/sphinx/book/connectors/__perl.rst
@@ -21,7 +21,7 @@ example, on Ubuntu, the installation could look like this:
 
 Here is a complete Perl program that inserts [99999,'BB'] into space[999] via
 the Perl API. Before trying to run, check that the server is listening and
-that :code:`examples` exists, as :ref:`described earlier <connector-setting>`. To run, paste the code into
+that :code:`examples` exists, as :ref:`described earlier <index-connector_setting>`. To run, paste the code into
 a file named example.pl and say :code:`perl example.pl`. The program will connect
 using an application-specific definition of the space. The program will open a
 socket connection with the tarantool server at localhost:3301, then send an
diff --git a/doc/sphinx/book/connectors/__php.rst b/doc/sphinx/book/connectors/__php.rst
index 478ac59f75..9d9b6e2fe5 100644
--- a/doc/sphinx/book/connectors/__php.rst
+++ b/doc/sphinx/book/connectors/__php.rst
@@ -28,7 +28,7 @@ line like :code:`extension=./tarantool.so`, or if PHP is started with the option
 
 Here is a complete PHP program that inserts [99999,'BB'] into a space named 'examples'
 via the PHP API. Before trying to run, check that the server is listening and that
-:code:`examples` exists, as :ref:`described earlier <connector-setting>`. To run, paste the code into a file named
+:code:`examples` exists, as :ref:`described earlier <index-connector_setting>`. To run, paste the code into a file named
 example.php and say :code:`php -d extension=~/tarantool-php/modules/tarantool.so example.php`. The program will open a socket connection with
 the tarantool server at localhost:3301, then send an INSERT request, then — if all is
 well — print "Insert succeeded". If the tuple already exists, the program will print
diff --git a/doc/sphinx/book/connectors/__python.rst b/doc/sphinx/book/connectors/__python.rst
index e195638593..d2c207d513 100644
--- a/doc/sphinx/book/connectors/__python.rst
+++ b/doc/sphinx/book/connectors/__python.rst
@@ -18,7 +18,7 @@ To prepare, paste the code into a file named example.py and install
 tarantool-python with either :code:`pip install tarantool\>0.4` to install
 in :code:`/usr` (requires **root** privilege) or :code:`pip install tarantool\>0.4 --user`
 to install in :code:`~` i.e. user's default directory. Before trying to run,
-check that the server is listening and that examples exists, as :ref:`described earlier <connector-setting>`.
+check that the server is listening and that examples exists, as :ref:`described earlier <index-connector_setting>`.
 To run the program, say :code:`python example.py`. The program will connect
 to the server, will send the request, and will not throw an exception if
 all went well. If the tuple already exists, the program will throw
diff --git a/doc/sphinx/book/connectors/__results.rst b/doc/sphinx/book/connectors/__results.rst
index 17d0f7de6b..e9869bd155 100644
--- a/doc/sphinx/book/connectors/__results.rst
+++ b/doc/sphinx/book/connectors/__results.rst
@@ -23,7 +23,7 @@ a :codenormal:`grant` of an execute privilege will be necessary.
 The function returns an empty array, a scalar string,
 two booleans, and a short integer. The values are
 the ones described in the msgpack section in the table
-:ref:`Common Types and MsgPack Encodings <common-types-and-msgpack-encodings>`.
+:ref:`Common Types and MsgPack Encodings <msgpack-common_types_and_msgpack_encodings>`.
 
 :codenormal:`tarantool>` :codebold:`box.cfg{listen=3301}` |br|
 :codenormal:`2016-03-03 18:45:52.802 [27381] main/101/interactive I> ready to accept requests` |br|
diff --git a/doc/sphinx/book/connectors/index.rst b/doc/sphinx/book/connectors/index.rst
index 0000896f75..d10f76f59e 100644
--- a/doc/sphinx/book/connectors/index.rst
+++ b/doc/sphinx/book/connectors/index.rst
@@ -1,4 +1,4 @@
-.. _box-connectors:
+.. _index-box_connectors:
 
 -------------------------------------------------------------------------------
                             Connectors
@@ -23,7 +23,7 @@ Unless implementing a client driver, one needn't concern oneself with the
 complications of the binary protocol. Language-specific drivers provide a
 friendly way to store domain language data structures in Tarantool. A complete
 description of the binary protocol is maintained in annotated Backus-Naur form
-in the source tree: please see :ref:`iproto protocol`.
+in the source tree: please see :ref:`iproto protocol <box_protocol-iproto_protocol>`.
 
 ====================================================================
                           Packet example
@@ -32,7 +32,7 @@ in the source tree: please see :ref:`iproto protocol`.
 The Tarantool API exists so that a client program can send a request packet to
 the server, and receive a response. Here is an example of a what the client
 would send for :code:`box.space[513]:insert{'A', 'BB'}`. The BNF description of the
-components is in file :ref:`iproto protocol`.
+components is in file :ref:`iproto protocol <box_protocol-iproto_protocol>`.
 
 .. _Language-specific drivers: `Connectors`_
 
@@ -62,13 +62,13 @@ components is in file :ref:`iproto protocol`.
         +---------------------------------+---------+---------+---------+---------+
 
 Now, one could send that packet to the tarantool server, and interpret the response
-(:ref:`iproto protocol` has a description of the packet format for responses as
+(:ref:`iproto protocol <box_protocol-iproto_protocol>` has a description of the packet format for responses as
 well as requests). But it would be easier, and less error-prone, if one could invoke
 a routine that formats the packet according to typed parameters. Something like
 :code:`response=tarantool_routine("insert",513,"A","B");`. And that is why APIs exist for
 drivers for Perl, Python, PHP, and so on.
 
-.. _connector-setting:
+.. _index-connector_setting:
 
 ====================================================================
           Setting up the server for connector examples
diff --git a/doc/sphinx/book/replication/index.rst b/doc/sphinx/book/replication/index.rst
index 5480525630..da58df3f4f 100644
--- a/doc/sphinx/book/replication/index.rst
+++ b/doc/sphinx/book/replication/index.rst
@@ -1,4 +1,4 @@
-.. _box-replication:
+.. _index-box_replication:
 
 -------------------------------------------------------------------------------
                     Replication
@@ -78,7 +78,7 @@ so that they are the same on both master and replica.
 NOTE:
 Replication requires privileges. Privileges for accessing spaces could be granted directly
 to the user who will start the replica. However, it is more usual to
-grant privileges for accessing spaces to a :ref:`role <rep-role>`, and then grant the
+grant privileges for accessing spaces to a :ref:`role <authentication-rep_role>`, and then grant the
 role to the user who will start the replica.
 
 =====================================================================
@@ -93,7 +93,7 @@ degraded state requires a human inspection.
 
 However, once a master failure is detected, the recovery is simple: declare
 that the replica is now the new master, by saying
-:codenormal:`box.cfg{... listen=`:codeitalic:`URI`:codenormal:`}`.
+:codenormal:`box.cfg{... listen=`:codeitalic:`URI <index-uri>`:codenormal:`}`.
 Then, if there are updates on the old master that were not propagated before
 the old master went down, they would have to be re-applied manually.
 
@@ -129,7 +129,7 @@ Step 3. Start the second server thus:
       replication_source = *uri#1*
     }
 
-... where ``uri#1`` = the :ref:`URI` that the first server is listening on.
+... where ``uri#1`` = the :ref:`URI <index-uri>` that the first server is listening on.
 
 That's all.
 
@@ -167,7 +167,7 @@ If a primary server is started with:
 then there will be lines in the log file, containing the word "relay",
 when a replica connects or disconnects.
 
-.. _preventing-duplicate-actions:
+.. _index-preventing_duplicate_actions:
 
 =====================================================================
                     Preventing Duplicate Actions
@@ -284,14 +284,14 @@ with the master by contacting it again (just say
 Q: What if replication causes security concerns? |br|
 A: Prevent unauthorized replication sources by associating a password with
 every user that has access privileges for the relevant spaces, and every
-user that has a replication :ref:`role <rep-role>`. That way,
-the :ref:`URI` for the ref:`replication_source <cfg_replication-replication_source>` parameter will
+user that has a replication :ref:`role <authentication-rep_role>`. That way,
+the :ref:`URI <index-uri>` for the ref:`replication_source <cfg_replication-replication_source>` parameter will
 always have to have the long form |br|
 ``replication_source='username:password@host:port'``
 
 Q: What if advanced users want to understand better how it all works? |br|
 A: See the description of server startup with replication in the
-:ref:`Internals <internals-replication>` appendix.
+:ref:`Internals <b_internals-replication>` appendix.
 
 .. _vector clock: https://en.wikipedia.org/wiki/Vector_clock
 
diff --git a/doc/sphinx/book/user_guide_getting_started.rst b/doc/sphinx/book/user_guide_getting_started.rst
index 90ba30c013..e07d48cf77 100644
--- a/doc/sphinx/book/user_guide_getting_started.rst
+++ b/doc/sphinx/book/user_guide_getting_started.rst
@@ -15,14 +15,15 @@ different parameters when building from source. The section about binaries is
 For development, you will want to download a source package and make the binary
 by yourself using a C/C++ compiler and common tools. Although this is a bit harder,
 it gives more control. And the source packages include additional files, for example
-the Tarantool test suite. The section about source is “:ref:`building-from-source`”.
+the Tarantool test suite. The section about source is “:ref:`building-from-source <building_from_source>`”.
 
 If the installation has already been done, then you should try it out. So we've
 provided some instructions that you can use to make a temporary “sandbox”. In a
 few minutes you can start the server and type in some database-manipulation
-statements. The section about the sandbox is “`Starting Tarantool and making your first database`_”.
+statements. The section about the sandbox is
+“`Starting Tarantool and making your first database <user_guide_getting_started-first_database>`”.
 
-.. _downloading-and-installing-a-binary-package:
+.. _user_guide_getting_started-downloading_and_installing_a_binary_package:
 
 =====================================================================
             Downloading and installing a binary package
@@ -37,7 +38,7 @@ start a shell (terminal) and enter the command-line instructions provided
 for your OS at http://tarantool.org/download.html.
 
 
-.. _first database:
+.. _user_guide_getting_started-first_database:
 
 =====================================================================
         Starting Tarantool and making your first database
@@ -103,7 +104,7 @@ interactive mode is just for administrators, but because it's
 convenient for learning it will be used for most examples in
 this manual. Tarantool is waiting for the user to type instructions.
 
-To create the first space and the first :ref:`index <box.index>`, try this:
+To create the first space and the first :ref:`index <index-box_index>`, try this:
 
 .. code-block:: tarantoolsession
 
@@ -171,7 +172,7 @@ In the previous section the first request was with :code:`box.cfg{listen = 3301}
 The :code:`listen` value can be any form of URI (uniform resource identifier);
 in this case it's just a local port: port 3301.
 It's possible to send requests to the listen URI via (a) telnet,
-(b) a connector (which will be the subject of the :ref:`Connectors <box-connectors>` chapter),
+(b) a connector (which will be the subject of the :ref:`Connectors <index-box_connectors>` chapter),
 or (c) another instance of Tarantool. Let's try (c).
 
 Switch to another terminal.
@@ -198,7 +199,7 @@ Try these requests:
     tarantool> console.connect('localhost:3301')
     tarantool> box.space.tester:select{2}
 
-The requests are saying "use the :ref:`console package <package-console>`
+The requests are saying "use the :ref:`console package <console-package>`
 to connect to the Tarantool server that's listening
 on ``localhost:3301``, send a request to that server,
 and display the result." The result in this case is
diff --git a/doc/sphinx/dev_guide/box_protocol.rst b/doc/sphinx/dev_guide/box_protocol.rst
index 1a801c62d0..bfb74df2b2 100644
--- a/doc/sphinx/dev_guide/box_protocol.rst
+++ b/doc/sphinx/dev_guide/box_protocol.rst
@@ -4,7 +4,7 @@
 :url: doc/box-protocol.html
 :template: documentation_rst
 
-.. _iproto protocol:
+.. _box_protocol-iproto_protocol:
 
 --------------------------------------------------------------------------------
                                IProto Protocol
@@ -169,7 +169,7 @@ may be absent in request's header, that means that there'll be no version
 checking, but it must be present in the response. If ``schema_id`` is sent in
 the header, then it'll be checked.
 
-.. _iproto-authentication:
+.. _box_protocol-authentication:
 
 ================================================================================
                             Authentication
diff --git a/doc/sphinx/dev_guide/building_documentation.rst b/doc/sphinx/dev_guide/building_documentation.rst
index c7a42b4134..515f01605e 100644
--- a/doc/sphinx/dev_guide/building_documentation.rst
+++ b/doc/sphinx/dev_guide/building_documentation.rst
@@ -1,4 +1,4 @@
-.. _building-documentation:
+.. _building_documentation:
 
 -------------------------------------------------------------------------------
 Building documentation
@@ -8,7 +8,7 @@ After building and testing your local instance of Tarantool, you can build a
 local version of this documentation and contribute to it.
 
 Documentation is based on the Python-based Sphinx generator. So, make sure
-install all Python modules indicated in the :ref:`building-from-source` section
+install all Python modules indicated in the :ref:`building-from-source <building_from_source>` section
 of this documentation. The procedure below implies that you already took those
 steps and successfully tested your instance of Tarantool.
 
diff --git a/doc/sphinx/dev_guide/building_from_source.rst b/doc/sphinx/dev_guide/building_from_source.rst
index 129482cc73..680df7622f 100644
--- a/doc/sphinx/dev_guide/building_from_source.rst
+++ b/doc/sphinx/dev_guide/building_from_source.rst
@@ -1,4 +1,4 @@
-.. _building-from-source:
+.. _building_from_source:
 
 -------------------------------------------------------------------------------
                              Building from source
diff --git a/doc/sphinx/reference/box_once.rst b/doc/sphinx/reference/box_once.rst
index f751b6cee2..bbdb0ff4e1 100644
--- a/doc/sphinx/reference/box_once.rst
+++ b/doc/sphinx/reference/box_once.rst
@@ -11,7 +11,7 @@ A passed value is checked to see whether the function has already
 been executed. If it has been executed before, nothing happens.
 If it has not been executed before, the function is invoked.
 For an explanation why ``box.once`` is useful, see the section
-:ref:`Preventing Duplicate Actions <preventing-duplicate-actions>`.
+:ref:`Preventing Duplicate Actions <index-preventing_duplicate_actions>`.
 
 Parameters: :codebold:`key` (:codeitalic:`string`) = a value that will be checked,
 :codebold:`function` = a function name.
diff --git a/doc/sphinx/reference/console.rst b/doc/sphinx/reference/console.rst
index 6095bea16c..9f8b3bcdd3 100644
--- a/doc/sphinx/reference/console.rst
+++ b/doc/sphinx/reference/console.rst
@@ -1,4 +1,4 @@
-.. _package-console:
+.. _console-package:
 
 -------------------------------------------------------------------------------
                                    Package `console`
@@ -14,7 +14,7 @@ host/port.
 
 .. function:: connect(uri)
 
-    Connect to the server at :ref:`URI`, change the prompt from ':samp:`tarantool>`' to
+    Connect to the server at :ref:`URI <index-uri>`, change the prompt from ':samp:`tarantool>`' to
     ':samp:`{uri}>`', and act henceforth as a client until the user ends the
     session or types :code:`control-D`.
 
@@ -60,7 +60,7 @@ host/port.
 
 .. function:: listen(uri)
 
-    Listen on :ref:`URI`. The primary way of listening for incoming requests
+    Listen on :ref:`URI <index-uri>`. The primary way of listening for incoming requests
     is via the connection-information string, or URI, specified in :code:`box.cfg{listen=...}`.
     The alternative way of listening is via the URI
     specified in :code:`console.listen(...)`. This alternative way is called
@@ -106,7 +106,7 @@ host/port.
     **Example:**
 
     A special use of ``console.start()`` is with
-    :ref:`initialization files <init-label>`.
+    :ref:`initialization files <index-init_label>`.
     Normally, if one starts the tarantool server with
     :samp:`tarantool {initialization file}`
     there is no console. This can be remedied by adding
diff --git a/doc/sphinx/reference/digest.rst b/doc/sphinx/reference/digest.rst
index 3f2b650f0d..b640c0b51d 100644
--- a/doc/sphinx/reference/digest.rst
+++ b/doc/sphinx/reference/digest.rst
@@ -94,7 +94,7 @@ Returns 32-bit checksum made with CRC32.
 
 :codebold:`digest.crc32.new()` |br|
 Initiates incremental crc32.
-See :ref:`incremental methods <incremental-digests>` notes.
+See :ref:`incremental methods <digest-incremental_digests>` notes.
 
 .. _digest-guava:
 
@@ -117,9 +117,9 @@ Returns 32-bit binary string = digest made with MurmurHash.
 
 :codebold:`digest.murmur.new([`:codeitalic:`seed`]) |br|
 Initiates incremental MurmurHash.
-See :ref:`incremental methods <incremental-digests>` notes.
+See :ref:`incremental methods <digest-incremental_digests>` notes.
 
-.. _incremental-digests:
+.. _digest-incremental_digests:
 
 =========================================
 Incremental methods in the digest package
diff --git a/doc/sphinx/reference/expirationd.rst b/doc/sphinx/reference/expirationd.rst
index 49e9b4d1d1..0539c2a0a7 100644
--- a/doc/sphinx/reference/expirationd.rst
+++ b/doc/sphinx/reference/expirationd.rst
@@ -1,4 +1,4 @@
-.. _package-expirationd: 
+.. _expirationd-package: 
 
 -------------------------------------------------------------------------------
                                    Package `expirationd`
@@ -48,7 +48,7 @@ process the tuple as an expired tuple.
 
 Ultimately the tuple-expiry process leads to ``default_tuple_drop()``
 which does a "delete" of a tuple from its original space.
-First the fun :ref:`fun <package-fun>` package is used,
+First the fun :ref:`fun <fun-package>` package is used,
 specifically fun.map_.
 Remembering that :codenormal:`index[0]` is always the space's primary key,
 and :codenormal:`index[0].parts[`:codeitalic:`N`:codenormal:`].fieldno`
diff --git a/doc/sphinx/reference/fun.rst b/doc/sphinx/reference/fun.rst
index b3a53734aa..1cc418ef3d 100644
--- a/doc/sphinx/reference/fun.rst
+++ b/doc/sphinx/reference/fun.rst
@@ -1,4 +1,4 @@
-.. _package-fun:
+.. _fun-package:
 
 -------------------------------------------------------------------------------
                                 Package `fun`
diff --git a/doc/sphinx/reference/json.rst b/doc/sphinx/reference/json.rst
index ffb057ca3a..d16012c8f9 100644
--- a/doc/sphinx/reference/json.rst
+++ b/doc/sphinx/reference/json.rst
@@ -1,4 +1,4 @@
-.. _package-json:
+.. _json-package:
 
 -------------------------------------------------------------------------------
                           Package `json`
@@ -135,7 +135,7 @@ Serializing 'A' and 'B' with different ``__serialize`` values causes different r
     ...
 
 
-.. _package-json-cfg:
+.. _json-package_cfg:
 
 A NOTE ABOUT CONFIGURATION SETTINGS:
 There are configuration settings which affect the way that Tarantool
@@ -157,8 +157,8 @@ The result of the json.encode request will look like this: |br|
 :codenormal:`---` |br|
 :codenormal:`- '[1,nan,inf,2]` |br|
 :codenormal:`...` |br|
-The same configuration settings exist for json, for :ref:`MsgPack <package-msgpack>`, and
-for :ref:`yaml <package-yaml>`.
+The same configuration settings exist for json, for :ref:`MsgPack <msgpack-package>`, and
+for :ref:`yaml <yaml-package>`.
 
 .. _Lua-CJSON package by Mark Pulford: http://www.kyne.com.au/~mark/software/lua-cjson.php
 .. _the official documentation: http://www.kyne.com.au/~mark/software/lua-cjson-manual.html
diff --git a/doc/sphinx/reference/msgpack.rst b/doc/sphinx/reference/msgpack.rst
index 950fd58c35..d522125e42 100644
--- a/doc/sphinx/reference/msgpack.rst
+++ b/doc/sphinx/reference/msgpack.rst
@@ -1,4 +1,4 @@
-.. _package-msgpack:
+.. _msgpack-package:
 
 -------------------------------------------------------------------------------
                                     Package `msgpack`
@@ -113,7 +113,7 @@ Here are examples for all the common types,
 with the Lua-table representation on the left,
 with the MsgPack format name and encoding on the right.
 
-.. _common-types-and-msgpack-encodings:
+.. _msgpack-common_types_and_msgpack_encodings:
 
     .. container:: table
 
@@ -152,7 +152,7 @@ with the MsgPack format name and encoding on the right.
         +--------------+-------------------------------------------------+
 
 Also, some MsgPack configuration settings for encoding can be changed, in the
-same way that they can be changed for :ref:`JSON <package-json-cfg>`.
+same way that they can be changed for :ref:`JSON <json-package_cfg>`.
 
 .. _MsgPack: http://msgpack.org/
 .. _Specification: http://github.com/msgpack/msgpack/blob/master/spec.md
diff --git a/doc/sphinx/reference/net_box.rst b/doc/sphinx/reference/net_box.rst
index a2b3e91ed3..b60472dbbe 100644
--- a/doc/sphinx/reference/net_box.rst
+++ b/doc/sphinx/reference/net_box.rst
@@ -1,4 +1,4 @@
-.. _package_net_box:
+.. _net_box-package:
 
 --------------------------------------------------------------------------------
                                 Package `net.box`
@@ -6,7 +6,7 @@
 
 The ``net.box`` package contains connectors to remote database systems. One
 variant, to be discussed later, is for connecting to MySQL or MariaDB or PostgreSQL —
-that variant is the subject of the :ref:`SQL DBMS plugins <dbms-plugins>` appendix.
+that variant is the subject of the :ref:`SQL DBMS plugins <d_plugins-dbms_plugins>` appendix.
 In this section the subject is the built-in variant, ``net.box``. This is for
 connecting to tarantool servers via a network.
 
@@ -40,11 +40,11 @@ necessary to prioritize requests or to use different authentication ids.
     can be replaced by :samp:`conn = {net_box}.self`. However, there is an important
     difference between the embedded connection and a remote one. With the
     embedded connection, requests which do not modify data do not yield.
-    When using a remote connection, due to :ref:`the implicit rules <the-implicit-yield-rules>`
+    When using a remote connection, due to :ref:`the implicit rules <atomic-the_implicit_yield_rules>`
     any request can yield, and database
     state may have changed by the time it regains control.
 
-    :param string URI: the :ref:`URI` of the target for the connection
+    :param string URI: the :ref:`URI <index-uri>` of the target for the connection
     :param options: a possible option is `wait_connect`
     :return: conn object
     :rtype:  userdata
@@ -114,7 +114,7 @@ necessary to prioritize requests or to use different authentication ids.
 
         :samp:`conn.space.{space-name}:select`:code:`{...}` is the remote-call equivalent
         of the local call :samp:`box.space.{space-name}:select`:code:`{...}`. Please note
-        this difference: due to :ref:`the implicit yield rules <the-implicit-yield-rules>`
+        this difference: due to :ref:`the implicit yield rules <atomic-the_implicit_yield_rules>`
         a local :samp:`box.space.{space-name}:select`:code:`{...}` does
         not yield, but a remote :samp:`conn.space.{space-name}:select`:code:`{...}` call
         does yield, so global variables or database tuples data may change when a remote
@@ -152,7 +152,7 @@ necessary to prioritize requests or to use different authentication ids.
 
         :samp:`conn:eval({Lua-string})` evaluates and executes the expression
         in Lua-string, which may be any statement or series of statements.
-        An :ref:`execute privilege <privileges>` is required; if the user does not have it,
+        An :ref:`execute privilege <authentication-privileges>` is required; if the user does not have it,
         an administrator may grant it with
         :samp:`box.schema.user.grant({username}, 'execute', 'universe')`.
 
diff --git a/doc/sphinx/reference/os.rst b/doc/sphinx/reference/os.rst
index b74bd51166..328242b232 100644
--- a/doc/sphinx/reference/os.rst
+++ b/doc/sphinx/reference/os.rst
@@ -1,4 +1,4 @@
-.. _package-os:
+.. _os-package:
 
 -------------------------------------------------------------------------------
                             Package `os`
diff --git a/doc/sphinx/reference/shard.rst b/doc/sphinx/reference/shard.rst
index 2a371478b3..56c4598570 100644
--- a/doc/sphinx/reference/shard.rst
+++ b/doc/sphinx/reference/shard.rst
@@ -1,4 +1,4 @@
-.. _package-shard:
+.. _shard-package:
 
 -------------------------------------------------------------------------------
                             Package `shard`
diff --git a/doc/sphinx/reference/socket.rst b/doc/sphinx/reference/socket.rst
index 2d0754ffad..22607168d3 100644
--- a/doc/sphinx/reference/socket.rst
+++ b/doc/sphinx/reference/socket.rst
@@ -1,4 +1,4 @@
-.. _package-socket:
+.. _socket-package:
 
 -------------------------------------------------------------------------------
                             Package `socket`
@@ -88,7 +88,7 @@ or more flags, will have a loop with sending and receiving functions, will
 end with the teardown functions -- as an example at the end of this section
 will show. Throughout, there may be error-checking and waiting functions for
 synchronization. To prevent a fiber containing socket functions from "blocking"
-other fibers, the :ref:`implicit yield rules <the-implicit-yield-rules>`
+other fibers, the :ref:`implicit yield rules <atomic-the_implicit_yield_rules>`
 will cause a yield so that other processes
 may take over, as is the norm for cooperative multitasking.
 
diff --git a/doc/sphinx/reference/strict.rst b/doc/sphinx/reference/strict.rst
index 48e49b83d8..6e88ae1112 100644
--- a/doc/sphinx/reference/strict.rst
+++ b/doc/sphinx/reference/strict.rst
@@ -11,7 +11,7 @@ had a value assigned to it. Often this is an indication of a programming error.
 
 By default strict mode is off, unless tarantool was built with the
 ``-DCMAKE_BUILD_TYPE=Debug`` option -- see the description of build options
-in section :ref:`building-from-source`.
+in section :ref:`building-from-source <building_from_source>`.
 
 **Example:**
 
diff --git a/doc/sphinx/reference/yaml.rst b/doc/sphinx/reference/yaml.rst
index 1f8f4f7fa8..fa52be83a1 100644
--- a/doc/sphinx/reference/yaml.rst
+++ b/doc/sphinx/reference/yaml.rst
@@ -1,4 +1,4 @@
-.. _package-yaml:
+.. _yaml-package:
 
 -------------------------------------------------------------------------------
                             Package `yaml`
@@ -106,7 +106,7 @@ different results:
     ...
 
 Also, some YAML configuration settings for encoding can be changed, in the
-same way that they can be changed for :ref:`JSON <package-json-cfg>`.
+same way that they can be changed for :ref:`JSON <json-package_cfg>`.
 
 
 .. _YAML: http://yaml.org/
-- 
GitLab