From e58eb7ac27001dc3a6e95d9d54e78e854e6b2d54 Mon Sep 17 00:00:00 2001
From: luis_pereira87 <lpereira@allbesmart.pt>
Date: Wed, 12 Oct 2022 11:28:59 +0100
Subject: [PATCH] Add automatic Table Of Contents

---
 ci-scripts/doc/vm_based_simulator_build.md    |  6 ++---
 .../doc/vm_based_simulator_check_build.md     |  5 ++--
 ci-scripts/doc/vm_based_simulator_create.md   |  6 ++---
 ci-scripts/doc/vm_based_simulator_destroy.md  |  6 ++---
 ci-scripts/doc/vm_based_simulator_env.md      |  7 ++---
 .../doc/vm_based_simulator_main_scripts.md    |  6 ++---
 ci-scripts/doc/vm_based_simulator_sources.md  |  6 ++---
 ci-scripts/doc/vm_based_simulator_test.md     | 11 +++-----
 .../4g_rfsimulator_fdd_05MHz/README.md        | 17 +++---------
 .../yaml_files/5g_rfsimulator/README.md       | 19 +++-----------
 doc/FEATURE_SET.md                            | 26 +------------------
 doc/L1SIM.md                                  |  8 ++----
 doc/L2NFAPI_NOS1.md                           | 16 +++---------
 doc/L2NFAPI_S1.md                             | 18 +++----------
 doc/NR_SA_CN5G_gNB_USRP_COTS_UE_Tutorial.md   | 24 ++---------------
 doc/TESTBenches.md                            |  7 ++---
 doc/TESTING_5GSA_setup.md                     | 13 +++-------
 doc/TESTING_GNB_W_COTS_UE.md                  | 16 ++----------
 docker/README.md                              |  7 +----
 19 files changed, 42 insertions(+), 182 deletions(-)

diff --git a/ci-scripts/doc/vm_based_simulator_build.md b/ci-scripts/doc/vm_based_simulator_build.md
index 16faa3ce9bf..d75de463597 100644
--- a/ci-scripts/doc/vm_based_simulator_build.md
+++ b/ci-scripts/doc/vm_based_simulator_build.md
@@ -12,11 +12,9 @@
   </tr>
 </table>
 
-## Table of Contents ##
+**Table of Contents**
 
-1.  [Introduction](#1-introduction)
-2.  [Detailed Description](#2-detailed-description)
-3.  [Typical Usage](#3-typical-usage)
+[[_TOC_]]
 
 # 1. Introduction #
 
diff --git a/ci-scripts/doc/vm_based_simulator_check_build.md b/ci-scripts/doc/vm_based_simulator_check_build.md
index 86d26ff8ed9..a9d9177fab2 100644
--- a/ci-scripts/doc/vm_based_simulator_check_build.md
+++ b/ci-scripts/doc/vm_based_simulator_check_build.md
@@ -12,10 +12,9 @@
   </tr>
 </table>
 
-## Table of Contents ##
+**Table of Contents**
 
-1.  [Introduction](#1-introduction)
-2.  [Detailed Description](#2-detailed-description)
+[[_TOC_]]
 
 # 1. Introduction #
 
diff --git a/ci-scripts/doc/vm_based_simulator_create.md b/ci-scripts/doc/vm_based_simulator_create.md
index 46817380385..db5ba2daed7 100644
--- a/ci-scripts/doc/vm_based_simulator_create.md
+++ b/ci-scripts/doc/vm_based_simulator_create.md
@@ -12,11 +12,9 @@
   </tr>
 </table>
 
-## Table of Contents ##
+**Table of Contents**
 
-1.  [Introduction](#1-introduction)
-2.  [Detailed Description](#2-detailed-description)
-3.  [Typical Usage](#3-typical-usage)
+[[_TOC_]]
 
 # 1. Introduction #
 
diff --git a/ci-scripts/doc/vm_based_simulator_destroy.md b/ci-scripts/doc/vm_based_simulator_destroy.md
index d69e82a005d..945c4a64759 100644
--- a/ci-scripts/doc/vm_based_simulator_destroy.md
+++ b/ci-scripts/doc/vm_based_simulator_destroy.md
@@ -12,11 +12,9 @@
   </tr>
 </table>
 
-## Table of Contents ##
+**Table of Contents**
 
-1.  [Introduction](#1-introduction)
-2.  [Detailed Description](#2-detailed-description)
-3.  [Typical Usage](#3-typical-usage)
+[[_TOC_]]
 
 # 1. Introduction #
 
diff --git a/ci-scripts/doc/vm_based_simulator_env.md b/ci-scripts/doc/vm_based_simulator_env.md
index 95b9d920d59..066f63a24af 100644
--- a/ci-scripts/doc/vm_based_simulator_env.md
+++ b/ci-scripts/doc/vm_based_simulator_env.md
@@ -12,12 +12,9 @@
   </tr>
 </table>
 
-## Table of Contents ##
+**Table of Contents**
 
-1.  [Introduction](#1-introduction)
-2.  [Prerequisites](#2-prerequisites)
-    1.  [uvtool installation](#21-uvtool-installation)
-    2.  [apt-cacher-server installation](#22-apt-cacher-server-installation)
+[[_TOC_]]
 
 # 1. Introduction #
 
diff --git a/ci-scripts/doc/vm_based_simulator_main_scripts.md b/ci-scripts/doc/vm_based_simulator_main_scripts.md
index d5df27529c9..ccaf91ed128 100644
--- a/ci-scripts/doc/vm_based_simulator_main_scripts.md
+++ b/ci-scripts/doc/vm_based_simulator_main_scripts.md
@@ -12,11 +12,9 @@
   </tr>
 </table>
 
-## Table of Contents ##
+**Table of Contents**
 
-1.  [Introduction](#1-introduction)
-2.  [Sub BASH scripts](#2-sub-bash-scripts)
-3.  [Main script features](#3-main-script-features)
+[[_TOC_]]
 
 # 1. Introduction #
 
diff --git a/ci-scripts/doc/vm_based_simulator_sources.md b/ci-scripts/doc/vm_based_simulator_sources.md
index 4bba6a8a095..33954ec39ff 100644
--- a/ci-scripts/doc/vm_based_simulator_sources.md
+++ b/ci-scripts/doc/vm_based_simulator_sources.md
@@ -12,11 +12,9 @@
   </tr>
 </table>
 
-## Table of Contents ##
+**Table of Contents**
 
-1.  [Introduction](#1-introduction)
-2.  [Centralized Workspace](#2-centralized-workspace)
-3.  [Create the ZIP file](#3-create-the-zip-file)
+[[_TOC_]]
 
 # 1. Introduction #
 
diff --git a/ci-scripts/doc/vm_based_simulator_test.md b/ci-scripts/doc/vm_based_simulator_test.md
index ab281015438..52bf36e255a 100644
--- a/ci-scripts/doc/vm_based_simulator_test.md
+++ b/ci-scripts/doc/vm_based_simulator_test.md
@@ -12,14 +12,9 @@
   </tr>
 </table>
 
-## Table of Contents ##
-
-1.  [Introduction](#1-introduction)
-2.  [Detailed Description](#2-detailed-description)
-3.  [Typical Usage](#3-typical-usage)
-    1.  [Testing the physical simulators](#31-testing-the-physicals-simulators)
-    2.  [Testing the RF simulator](#33-testing-the-rf-simulator)
-    3.  [Testing the L2-nFAPI simulator](#33-testing-the-l2-nfapi-simulator)
+**Table of Contents**
+
+[[_TOC_]]
 
 # 1. Introduction #
 
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md
index 1a947d03890..d146c8abec7 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md
@@ -14,20 +14,9 @@
 
 This page is only valid for an `Ubuntu18` host.
 
-**TABLE OF CONTENTS**
-
-1. [Retrieving the images on Docker-Hub](#1-retrieving-the-images-on-docker-hub)
-2. [Deploy containers](#2-deploy-containers)
-   1. [Deploy and Configure Cassandra Database](#21-deploy-and-configure-cassandra-database)
-   2. [Deploy OAI CN4G containers](#22-deploy-oai-cn4g-containers)
-   3. [Deploy OAI eNB in RF simulator mode](#23-deploy-oai-enb-in-rf-simulator-mode)
-   4. [Deploy OAI LTE UE in RF simulator mode](#24-deploy-oai-lte-ue-in-rf-simulator-mode)
-3. [Check traffic](#3-check-traffic)
-4. [Un-deployment](#4-un-deployment)
-5. [Explanation on the configuration](#5-explanation-on-the-configuration)
-   1. [UE IMSI and Keys](#51-ue-imsi-and-keys)
-   2. [PLMN and TAI](#52-plmn-and-tai)
-   3. [Access to Internet](#53-access-to-internet)
+**Table of Contents**
+
+[[_TOC_]]
 
 # 1. Retrieving the images on Docker-Hub #
 
diff --git a/ci-scripts/yaml_files/5g_rfsimulator/README.md b/ci-scripts/yaml_files/5g_rfsimulator/README.md
index f457d4c3f65..f75d3721daa 100644
--- a/ci-scripts/yaml_files/5g_rfsimulator/README.md
+++ b/ci-scripts/yaml_files/5g_rfsimulator/README.md
@@ -16,22 +16,9 @@ This page is only valid for an `Ubuntu18` host.
 
 **NOTE: this version (2022-01-27) has been updated  for the `v1.3.0` version of the `OAI 5G CN`.**
 
-**TABLE OF CONTENTS**
-
-1. [Retrieving the images on Docker-Hub](#1-retrieving-the-images-on-docker-hub)
-2. [Deploy containers](#2-deploy-containers)
-   1. [Deploy OAI 5G Core Network](#21-deploy-oai-5g-core-network)
-   2. [Deploy OAI gNB in RF simulator mode and in Standalone Mode](#22-deploy-oai-gnb-in-rf-simulator-mode-and-in-standalone-mode)
-   3. [Deploy OAI NR-UE in RF simulator mode and in Standalone Mode](#23-deploy-oai-nr-ue-in-rf-simulator-mode-and-in-standalone-mode)
-   4. [Deploy Second OAI NR-UE in RF simulator mode and in Standalone Mode](#24-deploy-second-oai-nr-ue-in-rf-simulator-mode-and-in-standalone-mode)
-3. [Check traffic](#3-check-traffic)
-   1. [Check your Internet connectivity](#31-check-your-internet-connectivity)
-   2. [Start the iperf server inside the NR-UE container](#32-start-the-iperf-server-inside-the-nr-ue-container)
-   3. [Start the iperf client inside the ext-dn container](#33-start-the-iperf-client-inside-the-ext-dn-container)
-4. [Un-deployment](#4-un-deployment)
-5. [Explanations on the configuration in the docker-compose.yaml](##5-explanations-on-the-configuration-in-the-docker-composeyaml)
-   1. [Making the NR-UE connect to the core network](#51-making-the-nr-ue-connect-to-the-core-network)
-   2. [Making the gNB connect to the core network](#52-making-the-gnb-connect-to-the-core-network)
+**Table of Contents**
+
+[[_TOC_]]
 
 # 1. Retrieving the images on Docker-Hub #
 
diff --git a/doc/FEATURE_SET.md b/doc/FEATURE_SET.md
index 38eaeac4330..d08c1e9b2a3 100644
--- a/doc/FEATURE_SET.md
+++ b/doc/FEATURE_SET.md
@@ -1,30 +1,6 @@
 **Table of Contents**
 
-1. [Functional Split Architecture](#functional-split-architecture)
-2. [OpenAirInterface Block Diagram](#openairinterface-block-diagram)
-2. [OpenAirInterface 4G-LTE eNB Feature Set](#openairinterface-4g-lte-enb-feature-set)
-   1. [eNB PHY Layer](#enb-phy-layer)
-   2. [eNB MAC Layer](#enb-mac-layer)
-   3. [eNB RLC Layer](#enb-rlc-layer)
-   4. [eNB PDCP Layer](#enb-pdcp-layer)
-   5. [eNB RRC Layer](#enb-rrc-layer)
-   6. [eNB X2AP](#enb-x2ap)
-   7. [eNB/MCE M2AP](#enbmce-m2ap)
-   8. [MCE/MME M3AP](#mcemme-m3ap)
-3. [OpenAirInterface 4G-LTE UE Feature Set](#openairinterface-4g-lte-ue-feature-set)
-   1.  [LTE UE PHY Layer](#lte-ue-phy-layer)
-   2.  [LTE UE MAC Layer](#lte-ue-mac-layer)
-   3.  [LTE UE RLC Layer](#lte-ue-rlc-layer)
-   4.  [LTE UE PDCP Layer](#lte-ue-pdcp-layer)
-   5.  [LTE UE RRC Layer](#lte-ue-rrc-layer)
-4. [OpenAirInterface 5G-NR gNB Feature Set](#openairinterface-5g-nr-feature-set)
-   1. [General Parameters](#general-parameters)
-   2. [gNB Physical Layer](#gnb-phy-layer)
-   3. [gNB Higher Layers](#gnb-higher-layers)
-5. [OpenAirInterface 5G-NR UE Feature Set](#openairinterface-5g-nr-ue-feature-set)
-   1. [UE Physical Layer](#ue-phy-layer)
-   2. [UE Higher Layers](#ue-higher-layers)
-
+[[_TOC_]]
 
 # Functional Split Architecture #
 
diff --git a/doc/L1SIM.md b/doc/L1SIM.md
index 9cae67a66c2..7e6d893a2ec 100644
--- a/doc/L1SIM.md
+++ b/doc/L1SIM.md
@@ -14,13 +14,9 @@
 
 This page is valid for the develop branch
 
-# Table of Contents: #
+**Table of Contents**
 
-* [How to build the eNB and the UE](#build)
-* [How to run an eNB built with the noS1 option](#run-noS1-eNB)
-* [How to run a UE built with the noS1 option](#run-noS1-UE)
-* [Continuous Integration notes](#CInote)
-* [How to ping an eNB from a UE and vice versa (with the noS1 option)](#noS1-pinging)
+[[_TOC_]]
 
 The old oaisim is dead! Long live oaisim! :)
 
diff --git a/doc/L2NFAPI_NOS1.md b/doc/L2NFAPI_NOS1.md
index 4f56be34166..0d4d6b538c2 100644
--- a/doc/L2NFAPI_NOS1.md
+++ b/doc/L2NFAPI_NOS1.md
@@ -16,19 +16,9 @@
 
 **2022/03/08: CAUTION, THE LAST VALID TAG on `develop` branch is `2021.w51_c`.**
 
-## Table of Contents ##
-
-1.   [Environment](#1-environment)
-2.   [Retrieve the OAI eNB-UE source code](#2-retrieve-the-oai-enb-ue-source-code)
-3.   [Setup of the USIM information in UE folder](#3-setup-of-the-usim-information-in-ue-folder)
-4.   [Setup of the Configuration files](#4-setup-of-the-configuration-files)
-     1.   [The eNB Configuration file](#41-the-enb-configuration-file)
-     2.   [The UE Configuration file](#42-the-ue-configuration-file)
-5.   [Build OAI UE and eNodeB](#5-build-oai-ue-and-enodeb)
-6.   [Start the eNB](#6-start-the-enb)
-7.   [Start the UE](#7-start-the-ue)
-8.   [Test with ping](#8-test-with-ping)
-9.   [Limitations](#9-limitations)
+**Table of Contents**
+
+[[_TOC_]]
 
 # 1. Environment #
 
diff --git a/doc/L2NFAPI_S1.md b/doc/L2NFAPI_S1.md
index 824e9e469ab..2d3de04b43d 100644
--- a/doc/L2NFAPI_S1.md
+++ b/doc/L2NFAPI_S1.md
@@ -16,21 +16,9 @@
 
 **2022/03/08: CAUTION, THE LAST VALID TAG on `develop` branch is `2021.w51_c`.**
 
-## Table of Contents ##
-
-1.   [Environment](#1-environment)
-2.   [Prepare the EPC](#2-prepare-the-epc)
-3.   [Retrieve the OAI eNB-UE source code](#3-retrieve-the-oai-enb-ue-source-code)
-4.   [Setup of the USIM information in UE folder](#4-setup-of-the-usim-information-in-ue-folder)
-5.   [Setup of the Configuration files](#5-setup-of-the-configuration-files)
-     1.   [The eNB Configuration file](#51-the-enb-configuration-file)
-     2.   [The UE Configuration file](#52-the-ue-configuration-file)
-6.   [Build OAI UE and eNodeB](#6-build-oai-ue-and-enodeb)
-7.   [Start EPC](#7-start-epc)
-8.   [Start the eNB](#8-start-the-enb)
-9.   [Start the UE](#9-start-the-ue)
-10.   [Test with ping](#10-test-with-ping)
-11.   [Limitations](#11-limitations)
+**Table of Contents**
+
+[[_TOC_]]
 
 # 1. Environment #
 
diff --git a/doc/NR_SA_CN5G_gNB_USRP_COTS_UE_Tutorial.md b/doc/NR_SA_CN5G_gNB_USRP_COTS_UE_Tutorial.md
index d5149a6c4ec..745659deb13 100644
--- a/doc/NR_SA_CN5G_gNB_USRP_COTS_UE_Tutorial.md
+++ b/doc/NR_SA_CN5G_gNB_USRP_COTS_UE_Tutorial.md
@@ -12,29 +12,9 @@
   </tr>
 </table>
 
-**TABLE OF CONTENTS**
-
-1. [Scenario](#1-scenario)
-2. [OAI CN5G](#2-oai-cn5g)
-    1. [OAI CN5G pre-requisites](#21-oai-cn5g-pre-requisites)
-    2. [OAI CN5G Setup](#22-oai-cn5g-setup)
-    3. [OAI CN5G Configuration files](#23-oai-cn5g-configuration-files)
-    4. [SIM Card](#24-sim-card)
-3. [OAI gNB](#3-oai-gnb)
-    1. [OAI gNB pre-requisites](#31-oai-gnb-pre-requisites)
-    2. [Build OAI gNB](#32-build-oai-gnb)
-    3. [N300 Ethernet Tuning](#33-n300-ethernet-tuning)
-4. [Run OAI CN5G and OAI gNB](#4-run-oai-cn5g-and-oai-gnb)
-    1. [Run OAI CN5G](#41-run-oai-cn5g)
-    2. [Run OAI gNB](#42-run-oai-gnb)
-       1. [USRP B210](#usrp-b210)
-       2. [USRP N300](#usrp-n300)
-       3. [USRP X300](#usrp-x300)
-5. [Testing with QUECTEL RM500Q](#5-testing-with-quectel-rm500q)
-    1. [Setup QUECTEL](#51-setup-quectel)
-    2. [Ping test](#52-ping-test)
-    3. [Downlink iPerf test](#53-downlink-iperf-test)
+**Table of Contents**
 
+[[_TOC_]]
 
 #  1. Scenario
 In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB and COTS UE.
diff --git a/doc/TESTBenches.md b/doc/TESTBenches.md
index 7bad43df65c..9a2d9e22f21 100644
--- a/doc/TESTBenches.md
+++ b/doc/TESTBenches.md
@@ -1,9 +1,6 @@
-## Table of Contents ##
+**Table of Contents**
 
-1.   [Machines](#machines)
-2.   [Networked devices](#networked-devices)
-3.   [Testbenches](#testbenches)
-4.   [Pipelines](#pipelines)
+[[_TOC_]]
 
 ## Machines
 
diff --git a/doc/TESTING_5GSA_setup.md b/doc/TESTING_5GSA_setup.md
index b12b3478e86..1828f967b12 100644
--- a/doc/TESTING_5GSA_setup.md
+++ b/doc/TESTING_5GSA_setup.md
@@ -12,16 +12,9 @@
   </tr>
 </table>
 
-**TABLE OF CONTENTS**
-
-1. [SA setup with COTS UE](#1--sa-setup-with-cots-ue)
-   1.  [gNB build and configuration](#11--gnb-build-and-configuration)
-   2.  [OAI 5G Core Network installation and configuration](#12--oai-5g-core-network-installation-and-configuration)
-   3.  [Execution of SA scenario](#13--execution-of-sa-scenario)
-2. [SA Setup with OAI NR UE Softmodem](#2-sa-setup-with-oai-nr-ue-softmodem)
-   1.  [Build and configuration](#21-build-and-configuration)
-   2.  [OAI 5G Core Network installation and configuration](#22--oai-5g-core-network-installation-and-configuration)
-   3.  [Execution of SA scenario](#23-execution-of-sa-scenario)
+**Table of Contents**
+
+[[_TOC_]]
 
 In the following tutorial we describe how to deploy configure and test the two SA OAI setups:
 
diff --git a/doc/TESTING_GNB_W_COTS_UE.md b/doc/TESTING_GNB_W_COTS_UE.md
index 84f43bfc27d..fa24d74d5d9 100644
--- a/doc/TESTING_GNB_W_COTS_UE.md
+++ b/doc/TESTING_GNB_W_COTS_UE.md
@@ -1,20 +1,8 @@
 STATUS 2020/10/15 : added External Resources section and links  
 
+**Table of Contents**
 
-## Table of Contents ##
-
-1.   [External Resources](#external-resources) 
-2.   [Configuration Overview](#configuration-overview)
-3.   [SW Repository / Branch](#repository)
-4.   [Architecture Setup](#architecture-setup)
-5.   [Build / Install](#build-and-install)
-6.   [Run / Test](#run-and-test)
-7.   [Test case](#test-case)
-8.   [Log file monitoring](#log-file-monitoring)
-9.   [Required tools for debug](#required-tools-for-debug)
-10.   [Status of interoperability](#status-of-interoperability) 
-11.   [CI integration](#ci-integration)  
-
+[[_TOC_]]
 
 ## External Resources
 
diff --git a/docker/README.md b/docker/README.md
index c4d799c6cee..ace75161df6 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -16,12 +16,7 @@
 
 **Table of Contents**
 
-1. [Build Strategy](#1-build-strategy)
-2. [File organization](#2-file-organization)
-3. [Building using docker under Ubuntu 18.04](#3-building-using-docker-under-ubuntu-1804)
-4. [Building using podman under Red Hat Entreprise Linux 8.2](#4-building-using-podman-under-red-hat-entreprise-linux-82)
-5. [Running modems using docker under Ubuntu 18.04](#5-running-modems-using-docker-under-ubuntu-1804)
-6. [Running modems using podman under Red Hat Entreprise Linux 8.2](#6-running-modems-using-podman-under-red-hat-entreprise-linux-82)
+[[_TOC_]]
 
 ---
 
-- 
GitLab