summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-03-08 13:06:47 -0500
committerMatthew Pickering <matthewtpickering@gmail.com>2022-03-09 11:27:30 +0000
commit28ad8dbd7a9fa55ca963932a2057a44b90ac22e7 (patch)
tree9dbedb6daa5f73ac3491d43aff129f0abdd4bd28
parent18b9ba5602121c75f184f29e5b3e70bd7d4779c4 (diff)
downloadhaskell-wip/T20913.tar.gz
users guide: Eliminate spurious \spxentry mentionswip/T20913
We were failing to pass the style file to `makeindex`, as is done by the mklatex configuration generated by Sphinx. Fixes #20913.
-rw-r--r--hadrian/src/Settings/Builders/Xelatex.hs10
-rw-r--r--rules/sphinx.mk2
2 files changed, 9 insertions, 3 deletions
diff --git a/hadrian/src/Settings/Builders/Xelatex.hs b/hadrian/src/Settings/Builders/Xelatex.hs
index 5623284ed5..a39c68705f 100644
--- a/hadrian/src/Settings/Builders/Xelatex.hs
+++ b/hadrian/src/Settings/Builders/Xelatex.hs
@@ -3,5 +3,11 @@ module Settings.Builders.Xelatex (xelatexBuilderArgs) where
import Settings.Builders.Common
xelatexBuilderArgs :: Args
-xelatexBuilderArgs = builder Xelatex ? mconcat [ arg "-halt-on-error"
- , arg =<< getInput ]
+xelatexBuilderArgs = mconcat
+ [ builder Xelatex ? mconcat [ arg "-halt-on-error"
+ , arg =<< getInput ]
+
+ -- this fixes #20913 although is a bit of a hack given that this is
+ -- specific to the user-guide.
+ , builder Makeindex ? mconcat [ arg "-s", arg "python.ist" ]
+ ]
diff --git a/rules/sphinx.mk b/rules/sphinx.mk
index 2e24e50385..38692a8cdb 100644
--- a/rules/sphinx.mk
+++ b/rules/sphinx.mk
@@ -66,7 +66,7 @@ $1/$2.pdf: $1/conf.py $$($1_RST_SOURCES)
cd $1/build-pdf/$2 ; $(XELATEX) -halt-on-error $2.tex 2>/dev/null >/dev/null || true
cd $1/build-pdf/$2 ; $(XELATEX) -halt-on-error $2.tex 2>/dev/null >/dev/null || true
cd $1/build-pdf/$2 ; $(XELATEX) -halt-on-error $2.tex 2>/dev/null >/dev/null || true
- cd $1/build-pdf/$2 ; $(MAKEINDEX) $2.idx
+ cd $1/build-pdf/$2 ; $(MAKEINDEX) -s python.ist $2.idx
cd $1/build-pdf/$2 ; $(XELATEX) -halt-on-error $2.tex 2>/dev/null >/dev/null || true
cd $1/build-pdf/$2 ; $(XELATEX) -halt-on-error $2.tex
cp $1/build-pdf/$2/$2.pdf $1/$2.pdf