From 4f1cd66829926f0d5dd967f7d85c46f97902cdaa Mon Sep 17 00:00:00 2001
From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com>
Date: Thu, 3 Aug 2023 09:20:24 +1200
Subject: [PATCH] New structure headings

Also adds a note to readme for installing pdflatex if it's missing.
---
 README.md                       |  6 ++++--
 docs/source/conf.py             |  1 +
 docs/source/getting_started.rst | 14 ++++++++++++++
 docs/source/index.rst           |  9 +++++++++
 docs/source/introduction.rst    |  8 ++++++++
 docs/source/test_suites.rst     |  8 ++++++++
 docs/source/using_yosys.rst     | 25 +++++++++++++++++++++++++
 docs/source/yosys_internals.rst | 23 +++++++++++++++++++++++
 8 files changed, 92 insertions(+), 2 deletions(-)
 create mode 100644 docs/source/getting_started.rst
 create mode 100644 docs/source/introduction.rst
 create mode 100644 docs/source/test_suites.rst
 create mode 100644 docs/source/using_yosys.rst
 create mode 100644 docs/source/yosys_internals.rst

diff --git a/README.md b/README.md
index 5e5a8ec3e..87d9730a4 100644
--- a/README.md
+++ b/README.md
@@ -602,10 +602,12 @@ Simply visit https://yosys.readthedocs.io/en/latest/ instead.
 In addition to those packages listed above for building Yosys from source, the
 following are used for building the website: 
 
-	$ sudo apt-get install pdf2svg faketime
+	$ sudo apt install pdf2svg faketime
 
 PDFLaTeX, included with most LaTeX distributions, is also needed during the
-build process for the website.
+build process for the website.  Or, run the following:
+
+	$ sudo apt install texlive-latex-base texlive-latex-extra
 
 The Python package, Sphinx, is needed along with those listed in
 `docs/source/requirements.txt`:
diff --git a/docs/source/conf.py b/docs/source/conf.py
index ab9618c8b..52a21afb2 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -43,6 +43,7 @@ bibtex_bibfiles = ['literature.bib']
 exclude_patterns = [
 	"CHAPTER_Eval.rst",
 	"appendix/CHAPTER_StateOfTheArt.rst"
+	"test_suites.rst"
 ]
 
 latex_elements = {
diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst
new file mode 100644
index 000000000..75a58c089
--- /dev/null
+++ b/docs/source/getting_started.rst
@@ -0,0 +1,14 @@
+Getting started with Yosys
+==========================
+
+Installation
+------------
+
+Supported platforms
+~~~~~~~~~~~~~~~~~~~
+
+Introduction to scripting in Yosys
+----------------------------------
+
+Example(s)
+----------
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 111aea873..681c18f7a 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -27,6 +27,15 @@
 Yosys manual
 ================================================================================
 
+.. toctree::
+	:caption: New docs
+	
+	introduction
+	getting_started
+	using_yosys
+	yosys_internals
+..	test_suites
+
 .. toctree::
 	:maxdepth: 2
 	:caption: Manual
diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst
new file mode 100644
index 000000000..c87326b9d
--- /dev/null
+++ b/docs/source/introduction.rst
@@ -0,0 +1,8 @@
+What is Yosys
+=============
+
+What you can do with Yosys
+--------------------------
+
+The extended Yosys universe
+---------------------------
diff --git a/docs/source/test_suites.rst b/docs/source/test_suites.rst
new file mode 100644
index 000000000..fbf1e98b4
--- /dev/null
+++ b/docs/source/test_suites.rst
@@ -0,0 +1,8 @@
+Test suites
+===========
+
+Build tests
+-----------
+
+Benchmarking
+------------
diff --git a/docs/source/using_yosys.rst b/docs/source/using_yosys.rst
new file mode 100644
index 000000000..89b456697
--- /dev/null
+++ b/docs/source/using_yosys.rst
@@ -0,0 +1,25 @@
+Using Yosys (advanced)
+======================
+
+More scripting
+--------------
+
+Selections
+~~~~~~~~~~
+
+Note on show/viz
+
+Troubleshooting
+~~~~~~~~~~~~~~~
+
+Memory map patterns
+-------------------
+
+Flows, command types, and order
+-------------------------------
+
+Synthesis granularity
+~~~~~~~~~~~~~~~~~~~~~
+
+Formal verification
+~~~~~~~~~~~~~~~~~~~
diff --git a/docs/source/yosys_internals.rst b/docs/source/yosys_internals.rst
new file mode 100644
index 000000000..6e22bdcbd
--- /dev/null
+++ b/docs/source/yosys_internals.rst
@@ -0,0 +1,23 @@
+Yosys internals
+===============
+
+Control and data flow
+---------------------
+
+Frontends
+~~~~~~~~~
+
+Backends
+~~~~~~~~
+
+Passes
+~~~~~~
+
+RTLIL
+-----
+
+Techmap
+-------
+
+Writing extensions
+------------------