mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
By default, `make latexpdf
` will try to ignore LaTeX errors
For example, if a graphics file is missing. The error is still reported but some functional PDF may still have been produced. Some projects have temporary errors with LaTeX (missing Unicode characters, graphics file using wrong formats, ...) affecting some small percentage of the documentation, and it may be important to make at least some PDF available, postponing complete resolution of LaTeX problems to a later date.
This commit is contained in:
parent
b9e9e1ed85
commit
7bbc8c1f88
@ -202,6 +202,17 @@ The builder's "name" must be given to the **-b** command-line option of
|
||||
.. versionchanged:: 1.6
|
||||
Use of ``latexmk`` on GNU/Linux or Mac OS X.
|
||||
|
||||
Since 1.6, ``make latexpdf`` (or ``make -C "<builddir>/latex"`` after a
|
||||
run of ``sphinx-build``) uses ``latexmk`` (on GNU/Linux and Mac OS X)
|
||||
and it invokes it with options ``-f --interaction=nonstopmode``. This
|
||||
tries to force compilation to PDF even if some types of LaTeX errors
|
||||
arise. It can be overridden by appending ``LATEXOPTS="<options>"`` to
|
||||
the command, for example
|
||||
``LATEXOPTS="--halt-on-error --interaction=nonstopmode"`` will halt on
|
||||
first LaTeX error, but still report the copious console output from
|
||||
LaTeX while e.g. ``LATEXOPTS="-silent --halt-on-error"`` would reduce
|
||||
console output to a minimum.
|
||||
|
||||
.. autoattribute:: name
|
||||
|
||||
.. autoattribute:: format
|
||||
|
@ -15,7 +15,7 @@ ALLIMGS = $(wildcard *.png *.gif *.jpg *.jpeg)
|
||||
# Prefix for archive names
|
||||
ARCHIVEPRREFIX =
|
||||
# Additional LaTeX options
|
||||
LATEXOPTS =
|
||||
LATEXOPTS = -f --interaction=nonstopmode
|
||||
# format: pdf or dvi
|
||||
FMT = pdf
|
||||
|
||||
@ -58,14 +58,14 @@ PDFLATEX = $(LATEX)
|
||||
{%- endif %}
|
||||
$(PDFLATEX) $(LATEXOPTS) '$<'
|
||||
|
||||
all: $(ALLPDF)
|
||||
|
||||
all-dvi: $(ALLDVI)
|
||||
|
||||
all-ps: $(ALLPS)
|
||||
|
||||
all-pdf: $(ALLPDF)
|
||||
|
||||
all: $(ALLPDF)
|
||||
|
||||
zip: all-$(FMT)
|
||||
mkdir $(ARCHIVEPREFIX)docs-$(FMT)
|
||||
cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
|
||||
|
@ -1,4 +1,4 @@
|
||||
$latex = 'platex --halt-on-error --interaction=nonstopmode -kanji=utf8 %O %S';
|
||||
$latex = 'platex -kanji=utf8 %O %S';
|
||||
$dvipdf = 'dvipdfmx %O -o %D %S';
|
||||
$makeindex = 'rm -f %D; mendex -U -f -d %B.dic -s python.ist %S || echo "mendex exited with error code $? (ignoring)" && : >> %D';
|
||||
add_cus_dep( "glo", "gls", 0, "makeglo" );
|
||||
|
@ -1,7 +1,7 @@
|
||||
$latex = 'latex --halt-on-error --interaction=nonstopmode %O %S';
|
||||
$pdflatex = 'pdflatex --halt-on-error --interaction=nonstopmode %O %S';
|
||||
$lualatex = 'lualatex --halt-on-error --interaction=nonstopmode %O %S';
|
||||
$xelatex = 'xelatex --no-pdf --halt-on-error --interaction=nonstopmode %O %S';
|
||||
$latex = 'latex %O %S';
|
||||
$pdflatex = 'pdflatex %O %S';
|
||||
$lualatex = 'lualatex %O %S';
|
||||
$xelatex = 'xelatex --no-pdf %O %S';
|
||||
$makeindex = 'makeindex -s python.ist %O -o %D %S';
|
||||
add_cus_dep( "glo", "gls", 0, "makeglo" );
|
||||
sub makeglo {
|
||||
|
Loading…
Reference in New Issue
Block a user