diff --git a/doc/tools/create_single_page_html.sh b/doc/tools/create_single_page_html.sh
index 8d049183c05..73462e6e19c 100644
--- a/doc/tools/create_single_page_html.sh
+++ b/doc/tools/create_single_page_html.sh
@@ -7,4 +7,26 @@ cd ${DIR}/../modules/ROOT/pages
echo "Creating ${DIR}/../modules/ROOT/pages/single_document.html"
-asciidoctor -b html5 -o single_document.html single_document.adoc
\ No newline at end of file
+SED_ARG="s/xref:/include::/"
+for NUM in $(seq 1 1 5); do
+ SED_ARG="${SED_ARG} -e s/^*\{$NUM\}.\(inc.*\)\[.*\]$/\1[leveloffset=+$NUM]/"
+done
+
+cat << SEC | asciidoctor -b html5 -o single_document.html -
+= OpenEMS - Open Energy Management System
+ifndef::toc[]
+(c) 2023 OpenEMS Association e.V.
+:doctype: book
+:sectnums:
+:sectnumlevels: 4
+:toc:
+:toclevels: 2
+:toc-title: Inhalt
+:experimental:
+:keywords: AsciiDoc
+:source-highlighter: highlight.js
+:icons: font
+endif::toc[]
+
+$(cat ../nav.adoc | sed -e $(echo ${SED_ARG}) -e 's/^* \(.*\)$/== \1/g' | head -n-1)
+SEC
diff --git a/doc/tools/create_single_page_pdf.sh b/doc/tools/create_single_page_pdf.sh
index 04b2001f94d..ce11af2c00a 100644
--- a/doc/tools/create_single_page_pdf.sh
+++ b/doc/tools/create_single_page_pdf.sh
@@ -10,4 +10,26 @@ cd ${DIR}/../modules/ROOT/${LANG}
echo "Creating ${DIR}/../modules/ROOT/${LANG}/single_document.pdf"
-asciidoctor-pdf -o single_document.pdf single_document.adoc
\ No newline at end of file
+SED_ARG="s/xref:/include::/"
+for NUM in $(seq 1 1 5); do
+ SED_ARG="${SED_ARG} -e s/^*\{$NUM\}.\(inc.*\)\[.*\]$/\1[leveloffset=+$NUM]/"
+done
+
+cat << SEC | asciidoctor-pdf -o single_document.pdf -
+= OpenEMS - Open Energy Management System
+ifndef::toc[]
+(c) 2023 OpenEMS Association e.V.
+:doctype: book
+:sectnums:
+:sectnumlevels: 4
+:toc:
+:toclevels: 2
+:toc-title: Inhalt
+:experimental:
+:keywords: AsciiDoc
+:source-highlighter: highlight.js
+:icons: font
+endif::toc[]
+
+$(cat ../nav.adoc | sed -e $(echo ${SED_ARG}) -e 's/^* \(.*\)$/== \1/g' | head -n-1)
+SEC