File tree Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ latex-build: generate
217
217
mkdir -p build/latex build/doctrees
218
218
$(SPHINXBUILD ) -b latex $(ALLSPHINXOPTS ) build/latex $(FILES )
219
219
$(PYTHON ) postprocess.py tex build/latex/* .tex
220
- perl -pi -e ' s/\t(latex.*|pdflatex) (.*)/\t-$$1 -interaction batchmode $$2 /' build/latex/Makefile
220
+ perl -pi -e ' s/LATEXOPTS =/LATEXOPTS ?= --halt-on-error /' build/latex/Makefile
221
221
@echo
222
222
@echo " Build finished; the LaTeX files are in build/latex."
223
223
@echo " Run \` make all-pdf' or \` make all-ps' in that directory to" \
Original file line number Diff line number Diff line change @@ -178,15 +178,28 @@ def setup(app):
178
178
}
179
179
180
180
# Additional stuff for the LaTeX preamble.
181
- latex_preamble = r'''
182
- \usepackage{amsmath}
183
- \DeclareUnicodeCharacter{00A0}{\nobreakspace}
184
-
181
+ latex_elements ['preamble' ] = r'''
185
182
% In the parameters section, place a newline after the Parameters
186
183
% header
187
184
\usepackage{expdlist}
188
185
\let\latexdescription=\description
189
186
\def\description{\latexdescription{}{} \breaklabel}
187
+ % but expdlist old LaTeX package requires fixes:
188
+ % 1) remove extra space
189
+ \usepackage{etoolbox}
190
+ \makeatletter
191
+ \patchcmd\@item{{\@breaklabel} }{{\@breaklabel}}{}{}
192
+ \makeatother
193
+ % 2) fix bug in expdlist's way of breaking the line after long item label
194
+ \makeatletter
195
+ \def\breaklabel{%
196
+ \def\@breaklabel{%
197
+ \leavevmode\par
198
+ % now a hack because Sphinx inserts \leavevmode after term node
199
+ \def\leavevmode{\def\leavevmode{\unhbox\voidb@x}}%
200
+ }%
201
+ }
202
+ \makeatother
190
203
191
204
% Make Examples/etc section headers smaller and more compact
192
205
\makeatletter
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Building the NumPy API and reference docs
5
5
=========================================
6
6
7
7
We currently use Sphinx _ for generating the API and reference
8
- documentation for NumPy. You will need Sphinx 1.8.3 <= 1.8.5 .
8
+ documentation for NumPy. You will need Sphinx >= 2.0.0 .
9
9
10
10
If you only want to get the documentation, note that pre-built
11
11
versions can be found at
@@ -57,7 +57,9 @@ To build the PDF documentation, do instead::
57
57
make latex
58
58
make -C build/latex all-pdf
59
59
60
- You will need to have Latex installed for this.
60
+ You will need to have Latex installed for this, inclusive of support for
61
+ Greek letters. For example, on Ubuntu xenial ``texlive-lang-greek `` and
62
+ ``cm-super `` are needed. Also ``latexmk `` is needed on non-Windows systems.
61
63
62
64
Instead of the above, you can also do::
63
65
You can’t perform that action at this time.
0 commit comments