Command-line setting ignored using latexpdf
<p>I am using sphinx-build to create both html and latexpdf output. Output looks amazing in both cases. </p>

<p>I would like to pass the <strong>project</strong> name on the command-line so the documentation can be titled e.g., <strong>TEST</strong>. This works great for the html option.  In the example below (from a modified make.bat file), <strong>TEST</strong> overrides any <strong>project</strong> definition in the conf.py file.</p>

<pre><code> %SPHINXBUILD% -b html -D project ="TEST"  %ALLSPHINXOPTS% %BUILDDIR%/html
</code></pre>

<p>However, the commandâline option is ignored when the tex file is created and whatever was in the conf.py is used for the definition of project in the generated PDF file.</p>

<pre><code> %SPHINXBUILD% -b latexpdf -D project ="TEST"  %ALLSPHINXOPTS% %BUILDDIR%/html
</code></pre>

<p>For example, if <strong>project</strong> is defined in conf.py:   project = 'TEST'  </p>

<p>Then used in the preamble:   \title{project}</p>

<p>The document is titled TEST. I cannot seem to override the TEST value with a command-line argument.</p>

<p>Thanks for the reference to latex_elements. I realize that what I was trying to do, override settings in conf.py on the fly by using command-line arguments, is not going to work.</p>

python pdf python-sphinx