What do I need to do to "register" 'latexpdf' for Sphinx?

latex, pdflatex, python-sphinx

Solution

latexpdf is not a Sphinx builder; it is the name of a target in the Makefile created by sphinx-quickstart. This target uses the latex builder.

Executing `sphinx-build -b latexpdf . _build` produces the error in the question (as expected).

If you run `make latexpdf`, it works.

PyCharm was mentioned in a comment and the problem seems to stem from that program. The following is run when latexpdf is configured as a "Command" (Sphinx task):

sphinx_runner.py -b latexpdf <indir> <outdir> 

The `sphinx_runner.py` script is very similar to `sphinx_build` (a wrapper for `sphinx.cmdline.main()`). Since the `-b` option is supposed provide the name of an actual builder, there is an error.

Problem

When I run Sphinx using 'latexpdf' I get an error, even though I have a complete working TeX installation on my machine: Sphinx error: Builder name latexpdf not registered What do I need to do to "register" `latexpdf`?

Original source