diff --git a/.travis.yml b/.travis.yml index 1f07d4a..4b1317a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ addons: - texlive - texlive-latex-extra - texlive-fonts-extra + - latexmk # Explicitly add doctest support as separate parts of the build matrix, # since these tests require additional packages that should be optional. @@ -79,7 +80,7 @@ script: - if [[ "${DOCTEST}" == "1" ]]; then cd $TRAVIS_BUILD_DIR/doc; make doctest; - make latexpdf; + make latexpdf LATEXOPTS="--interaction=nonstopmode"; fi after_success: diff --git a/doc/Makefile b/doc/Makefile index 1d82368..6e0b610 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -26,7 +26,7 @@ help: @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdf to make LaTeX files and run them through latexmk" @echo " text to make text files" @echo " man to make manual pages" @echo " changes to make an overview of all changed/added/deprecated items" @@ -99,9 +99,9 @@ latex: latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." + @echo "Running LaTeX files through latexmk..." $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + @echo "latexmk finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text diff --git a/doc/source/conf.py b/doc/source/conf.py index d2f9e2c..9955133 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -66,7 +66,6 @@ \let\footnotesize\small \let\footnoterule\relax \rule{\textwidth}{1pt}% - \ifsphinxpdfoutput \begingroup % These \defs are required to deal with multi-line authors; it % changes \\ to ', ' (comma-space), making it pass muster for @@ -298,6 +297,11 @@ # Additional stuff for the LaTeX preamble. latex_preamble = preamble +# In Sphinx 1.5, this now appears as latex_elements, so we pack the +# preamble that way, too. +latex_elements = { + 'preamble': preamble +} # Documents to append as an appendix to all manuals. #latex_appendices = [] diff --git a/src/qinfer/test_models.py b/src/qinfer/test_models.py index adc42e6..ef091a4 100644 --- a/src/qinfer/test_models.py +++ b/src/qinfer/test_models.py @@ -198,8 +198,13 @@ def score(self, outcomes, modelparams, expparams, return_L=False): new_eps['w_'] = 0 new_eps['t'] = expparams - return super(SimplePrecessionModel, self).score(outcomes, modelparams, new_eps, return_L) - + q = super(SimplePrecessionModel, self).score(outcomes, modelparams, new_eps, return_L=False) + + if return_L: + return q, self.likelihood(outcomes, modelparams, expparams) + else: + return q + class CoinModel(FiniteOutcomeModel, DifferentiableModel): r""" Arguably the simplest possible model; the unknown model parameter