From d7db28ec5cb9caf3a2642458157238afcfd8f5f9 Mon Sep 17 00:00:00 2001 From: YadavAkhileshh Date: Fri, 26 Dec 2025 18:54:49 +0530 Subject: [PATCH] Enable PDF and HTML downloads on ReadTheDocs Fixes #470 - Enable pdf, htmlzip, and epub formats in .readthedocs.yml - Add xelatex engine for Unicode support in doc/conf.py - Configure latex_theme for PDF compatibility Signed-off-by: YadavAkhileshh --- .readthedocs.yml | 8 +++++--- doc/conf.py | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 2a77f55560..749aaa062a 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -3,9 +3,11 @@ version: 2 -# TODO(robotics-simulation): pdf format fails to build on readthedocs -# formats: -# - pdf +# Enable downloadable documentation formats +formats: + - pdf + - htmlzip + - epub build: os: ubuntu-24.04 diff --git a/doc/conf.py b/doc/conf.py index bd71ed9478..7830e75311 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -242,3 +242,18 @@ # Add LaTeX macros for LATEX builder latex_elements = {'preamble': latex_macros} + +# -- Options for LaTeX/PDF output --------------------------------------------- + +# Use xelatex for better Unicode support (required for KaTeX symbols) +latex_engine = 'xelatex' + +# Furo theme doesn't support LaTeX builds, use manual theme for PDF +latex_theme = 'manual' + +# Configure PDF output +latex_elements.update({ + 'papersize': 'letterpaper', + 'pointsize': '10pt', + 'extraclassoptions': 'openany,oneside', +})