.\" Man page generated from reStructuredText. . .TH "SPHINX-BUILD" "1" "Oct 22, 2018" "1.7.9" "Sphinx" .SH NAME sphinx-build \- Sphinx documentation generator tool . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fBsphinx\-build\fP [\fIoptions\fP] <\fIsourcedir\fP> <\fIoutputdir\fP> [\fIfilenames\fP …] .SH DESCRIPTION .sp \fBsphinx\-build\fP generates documentation from the files in \fB\fP and places it in the \fB\fP\&. .sp \fBsphinx\-build\fP looks for \fB/conf.py\fP for the configuration settings. \fBsphinx\-quickstart(1)\fP may be used to generate template files, including \fBconf.py\fP\&. .sp \fBsphinx\-build\fP can create documentation in different formats. A format is selected by specifying the builder name on the command line; it defaults to HTML. Builders can also perform other tasks related to documentation processing. .sp By default, everything that is outdated is built. Output only for selected files can be built by specifying individual filenames. .sp For a list of available options, refer to \fI\%sphinx\-build \-b\fP\&. .SH OPTIONS .INDENT 0.0 .TP .B \-b buildername The most important option: it selects a builder. The most common builders are: .INDENT 7.0 .TP \fBhtml\fP Build HTML pages. This is the default builder. .TP \fBdirhtml\fP Build HTML pages, but with a single directory per document. Makes for prettier URLs (no \fB\&.html\fP) if served from a webserver. .TP \fBsinglehtml\fP Build a single HTML with the whole content. .TP \fBhtmlhelp\fP, \fBqthelp\fP, \fBdevhelp\fP, \fBepub\fP Build HTML files with additional information for building a documentation collection in one of these formats. .TP \fBapplehelp\fP Build an Apple Help Book. Requires \fBhiutil\fP and \fBcodesign\fP, which are not Open Source and presently only available on Mac OS X 10.6 and higher. .TP \fBlatex\fP Build LaTeX sources that can be compiled to a PDF document using \fBpdflatex\fP\&. .TP \fBman\fP Build manual pages in groff format for UNIX systems. .TP \fBtexinfo\fP Build Texinfo files that can be processed into Info files using \fBmakeinfo\fP\&. .TP \fBtext\fP Build plain text files. .TP \fBgettext\fP Build gettext\-style message catalogs (\fB\&.pot\fP files). .TP \fBdoctest\fP Run all doctests in the documentation, if the \fBdoctest\fP extension is enabled. .TP \fBlinkcheck\fP Check the integrity of all external links. .TP \fBxml\fP Build Docutils\-native XML files. .TP \fBpseudoxml\fP Build compact pretty\-printed “pseudo\-XML” files displaying the internal structure of the intermediate document trees. .UNINDENT .sp See builders for a list of all builders shipped with Sphinx. Extensions can add their own builders. .UNINDENT .INDENT 0.0 .TP .B \-M buildername Alternative to \fI\%\-b\fP\&. Uses the Sphinx \fBmake_mode\fP module, which provides the same build functionality as a default \fI\%Makefile or Make.bat\fP\&. In addition to all Sphinx builders, the following build pipelines are available: .INDENT 7.0 .TP \fBlatexpdf\fP Build LaTeX files and run them through \fBpdflatex\fP, or as per \fBlatex_engine\fP setting. If \fBlanguage\fP is set to \fB\(aqja\(aq\fP, will use automatically the \fBplatex/dvipdfmx\fP latex to PDF pipeline. .TP \fBinfo\fP Build Texinfo files and run them through \fBmakeinfo\fP\&. .UNINDENT .sp \fBIMPORTANT:\fP .INDENT 7.0 .INDENT 3.5 Sphinx only recognizes the \fB\-M\fP option if it is placed first. .UNINDENT .UNINDENT .sp New in version 1.2.1. .UNINDENT .INDENT 0.0 .TP .B \-a If given, always write all output files. The default is to only write output files for new and changed source files. (This may not apply to all builders.) .UNINDENT .INDENT 0.0 .TP .B \-E Don’t use a saved environment (the structure caching all cross\-references), but rebuild it completely. The default is to only read and parse source files that are new or have changed since the last run. .UNINDENT .INDENT 0.0 .TP .B \-t tag Define the tag \fItag\fP\&. This is relevant for \fBonly\fP directives that only include their content if this tag is set. .sp New in version 0.6. .UNINDENT .INDENT 0.0 .TP .B \-d path Since Sphinx has to read and parse all source files before it can write an output file, the parsed source files are cached as “doctree pickles”. Normally, these files are put in a directory called \fB\&.doctrees\fP under the build directory; with this option you can select a different cache directory (the doctrees can be shared between all builders). .UNINDENT .INDENT 0.0 .TP .B \-j N Distribute the build over \fIN\fP processes in parallel, to make building on multiprocessor machines more effective. Note that not all parts and not all builders of Sphinx can be parallelized. If \fBauto\fP argument is given, Sphinx uses the number of CPUs as \fIN\fP\&. .sp New in version 1.2: This option should be considered \fIexperimental\fP\&. .sp Changed in version 1.7: Support \fBauto\fP argument. .UNINDENT .INDENT 0.0 .TP .B \-c path Don’t look for the \fBconf.py\fP in the source directory, but use the given configuration directory instead. Note that various other files and paths given by configuration values are expected to be relative to the configuration directory, so they will have to be present at this location too. .sp New in version 0.3. .UNINDENT .INDENT 0.0 .TP .B \-C Don’t look for a configuration file; only take options via the \fB\-D\fP option. .sp New in version 0.5. .UNINDENT .INDENT 0.0 .TP .B \-D setting=value Override a configuration value set in the \fBconf.py\fP file. The value must be a number, string, list or dictionary value. .sp For lists, you can separate elements with a comma like this: \fB\-D html_theme_path=path1,path2\fP\&. .sp For dictionary values, supply the setting name and key like this: \fB\-D latex_elements.docclass=scrartcl\fP\&. .sp For boolean values, use \fB0\fP or \fB1\fP as the value. .sp Changed in version 0.6: The value can now be a dictionary value. .sp Changed in version 1.3: The value can now also be a list value. .UNINDENT .INDENT 0.0 .TP .B \-A name=value Make the \fIname\fP assigned to \fIvalue\fP in the HTML templates. .sp New in version 0.5. .UNINDENT .INDENT 0.0 .TP .B \-n Run in nit\-picky mode. Currently, this generates warnings for all missing references. See the config value \fBnitpick_ignore\fP for a way to exclude some references as “known missing”. .UNINDENT .INDENT 0.0 .TP .B \-N Do not emit colored output. .UNINDENT .INDENT 0.0 .TP .B \-v Increase verbosity (loglevel). This option can be given up to three times to get more debug logging output. It implies \fI\%\-T\fP\&. .sp New in version 1.2. .UNINDENT .INDENT 0.0 .TP .B \-q Do not output anything on standard output, only write warnings and errors to standard error. .UNINDENT .INDENT 0.0 .TP .B \-Q Do not output anything on standard output, also suppress warnings. Only errors are written to standard error. .UNINDENT .INDENT 0.0 .TP .B \-w file Write warnings (and errors) to the given file, in addition to standard error. .UNINDENT .INDENT 0.0 .TP .B \-W Turn warnings into errors. This means that the build stops at the first warning and \fBsphinx\-build\fP exits with exit status 1. .UNINDENT .INDENT 0.0 .TP .B \-T Display the full traceback when an unhandled exception occurs. Otherwise, only a summary is displayed and the traceback information is saved to a file for further analysis. .sp New in version 1.2. .UNINDENT .INDENT 0.0 .TP .B \-P (Useful for debugging only.) Run the Python debugger, \fBpdb\fP, if an unhandled exception occurs while building. .UNINDENT .INDENT 0.0 .TP .B \-h, \-\-help, \-\-version Display usage summary or Sphinx version. .sp New in version 1.2. .UNINDENT .sp You can also give one or more filenames on the command line after the source and build directories. Sphinx will then try to build only these output files (and their dependencies). .SH ENVIRONMENT VARIABLES .sp The \fBsphinx\-build\fP refers following environment variables: .INDENT 0.0 .TP .B MAKE A path to make command. A command name is also allowed. \fBsphinx\-build\fP uses it to invoke sub\-build process on make\-mode. .UNINDENT Makefile Options .sp The \fBMakefile\fP and \fBmake.bat\fP files created by \fBsphinx\-quickstart\fP usually run \fBsphinx\-build\fP only with the \fI\%\-b\fP and \fI\%\-d\fP options. However, they support the following variables to customize behavior: .INDENT 0.0 .TP .B PAPER This sets the \fB\(aqpapersize\(aq\fP key of \fBlatex_elements\fP: i.e. \fBPAPER=a4\fP sets it to \fB\(aqa4paper\(aq\fP and \fBPAPER=letter\fP to \fB\(aqletterpaper\(aq\fP\&. .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 Usage of this environment variable got broken at Sphinx 1.5 as \fBa4\fP or \fBletter\fP ended up as option to LaTeX document in place of the needed \fBa4paper\fP, resp. \fBletterpaper\fP\&. Fixed at 1.7.7. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B SPHINXBUILD The command to use instead of \fBsphinx\-build\fP\&. .UNINDENT .INDENT 0.0 .TP .B BUILDDIR The build directory to use instead of the one chosen in \fBsphinx\-quickstart\fP\&. .UNINDENT .INDENT 0.0 .TP .B SPHINXOPTS Additional options for \fBsphinx\-build\fP\&. .UNINDENT .SH DEPRECATION WARNINGS .sp If any deprecation warning like \fBRemovedInSphinxXXXWarning\fP are displayed when building a user’s document, some Sphinx extension is using deprecated features. In that case, please report it to author of the extension. .sp To disable the deprecation warnings, please set \fBPYTHONWARNINGS=\fP environment variable to your environment. For example: .INDENT 0.0 .IP \(bu 2 \fBPYTHONWARNINGS= make html\fP (Linux/Mac) .IP \(bu 2 \fBexport PYTHONWARNINGS=\fP and do \fBmake html\fP (Linux/Mac) .IP \(bu 2 \fBset PYTHONWARNINGS=\fP and do \fBmake html\fP (Windows) .IP \(bu 2 modify your Makefile/make.bat and set the environment variable .UNINDENT .SH SEE ALSO .sp \fBsphinx\-quickstart(1)\fP .SH COPYRIGHT 2007-2018, Georg Brandl and the Sphinx team .\" Generated by docutils manpage writer. .