[PATCH 6/7] doc: make pdfdocs: Increase the maximum list depth
Adriano Carvalho
adrianocarvalho.pt at gmail.com
Tue Aug 26 00:44:49 CEST 2025
According to sphinx-build's documentation, by default the maximum list depth (latex_elements.maxlistdepth in conf.py) is six, which is not enough for U-Boot's documentation, leading to errors. See below.
This commit sets maxlistdepth to ten, solving the problem.
If maxlistdepth is not set to ten, this is what I get with docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
(myenv) uboot at 35c89b9ab70e:~/u-boot$ make pdfdocs
[...]
xelatex 'android.tex'
[...]
Output written on android.pdf (28 pages).
[...]
xelatex 'api.tex'
[...]
Output written on api.pdf (431 pages).
[...]
xelatex 'arch.tex'
[...]
Output written on arch.pdf (62 pages).
[...]
xelatex 'board.tex'
[...]
[340]
! LaTeX Error: Too deeply nested.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.25503 \begin{itemize}
? Output written on board.pdf (344 pages).
Transcript written on board.log.
make[2]: *** [Makefile:29: board.pdf] Error 1
make[1]: *** [doc/Makefile:95: pdfdocs] Error 2
make: *** [Makefile:2686: pdfdocs] Error 2
This solves the problem with the pdfdocs target (in docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025 at least).
The docs have been updated as well, assuming the issues with the pdfdocs target are fixed.
Signed-off-by: Adriano Carvalho <adrianocarvalho.pt at gmail.com>
---
doc/build/documentation.rst | 4 +---
doc/conf.py | 2 ++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/build/documentation.rst b/doc/build/documentation.rst
index 1e97085fc89..bb13b8589b3 100644
--- a/doc/build/documentation.rst
+++ b/doc/build/documentation.rst
@@ -84,9 +84,7 @@ The *pdfdocs* target is meant to be used to build PDF documentation:
# Deactivate the Python environment
deactivate
-However, as of v2023.01 it fails with 'LaTeX Error: Too deeply nested'.
-
-We can use texi2pdf instead:
+The *texinfodocs* target, together with *texi2pdf*, can also be used to build PDF documentation:
.. code-block:: bash
diff --git a/doc/conf.py b/doc/conf.py
index 43472d5dc3d..7b1a1a2a6a1 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -378,6 +378,8 @@ latex_elements = {
\\setromanfont{DejaVu Serif}
\\setmonofont{DejaVu Sans Mono}
''',
+
+ 'maxlistdepth': 10, # Default is 6.
}
# At least one book (translations) may have Asian characters
--
2.48.1
More information about the U-Boot
mailing list