From 5a8f629123e501de60130bd0ef0ce3ad60adf17c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Mar 2026 22:13:12 +0000 Subject: [PATCH 1/2] Initial plan From 8161f099a07b35b8fbe210b104cc4d3ee9b90860 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Mar 2026 22:17:30 +0000 Subject: [PATCH 2/2] Fix PDF index generation for developer manual (docs/source) - Remove recursive \\renewcommand{\\printindex} from indices.rst that caused runaway recursion and ~4000 blank pages of index output - Replace with a simple \\printindex under '.. only:: latex' - Add latex_elements['printindex'] = '' to conf.py to suppress Sphinx's auto-appended index at end of PDF, preventing duplicate index sections Co-authored-by: briantoby <9433704+briantoby@users.noreply.github.com> Agent-Logs-Url: https://github.com/AdvancedPhotonSource/GSAS-II/sessions/b201939b-1f9d-4150-ac96-e5a3be236dd6 --- docs/source/conf.py | 4 ++++ docs/source/indices.rst | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 145eded36..85764c9fc 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -253,6 +253,10 @@ #this allows \AA to be used in equations 'preamble': '\\global\\renewcommand{\\AA}{\\text{\\r{A}}}', + +# Suppress Sphinx's automatic \printindex at the end of the PDF; +# the index is printed explicitly in indices.rst instead. +'printindex': '', } # Grouping the document tree into LaTeX files. List of tuples diff --git a/docs/source/indices.rst b/docs/source/indices.rst index cb046c523..7e5155c6f 100644 --- a/docs/source/indices.rst +++ b/docs/source/indices.rst @@ -16,8 +16,4 @@ .. raw:: latex - \renewcommand{\printindex}{% - \begin{theindex} - \printindex - \end{theindex} - } + \printindex