[commit: ghc] master: users-guide: Fix index in PDF output (cf1efc7)

git at git.haskell.org git at git.haskell.org
Sat May 21 18:14:47 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/cf1efc7f0f97f272645af93491ca890137df3704/ghc

>---------------------------------------------------------------

commit cf1efc7f0f97f272645af93491ca890137df3704
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sat May 21 13:20:15 2016 +0200

    users-guide: Fix index in PDF output
    
    The madness that is latex never ceases to amaze.


>---------------------------------------------------------------

cf1efc7f0f97f272645af93491ca890137df3704
 docs/users_guide/conf.py | 1 +
 rules/sphinx.mk          | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/docs/users_guide/conf.py b/docs/users_guide/conf.py
index f9c326e..b2311c4 100644
--- a/docs/users_guide/conf.py
+++ b/docs/users_guide/conf.py
@@ -66,6 +66,7 @@ latex_elements = {
     'utf8extra': '',
     'preamble': '''
 \usepackage{fontspec}
+\usepackage{makeidx}
 \setsansfont{DejaVu Sans}
 \setromanfont{DejaVu Serif}
 \setmonofont{DejaVu Sans Mono}
diff --git a/rules/sphinx.mk b/rules/sphinx.mk
index 823a2af..f3c46b4 100644
--- a/rules/sphinx.mk
+++ b/rules/sphinx.mk
@@ -60,6 +60,10 @@ $1/$2.pdf: $1/conf.py $$($1_RST_SOURCES)
 	$(SPHINXBUILD) -b latex -d $1/.doctrees-pdf $(SPHINXOPTS) $1 $1/build-pdf/$2
 	cd $1/build-pdf/$2 ; xelatex $2.tex
 	cd $1/build-pdf/$2 ; xelatex $2.tex
+	cd $1/build-pdf/$2 ; xelatex $2.tex
+	cd $1/build-pdf/$2 ; makeindex $2.idx
+	cd $1/build-pdf/$2 ; xelatex $2.tex
+	cd $1/build-pdf/$2 ; xelatex $2.tex
 	cp $1/build-pdf/$2/$2.pdf $1/$2.pdf
 endif
 



More information about the ghc-commits mailing list