title: How to use Sphinx to generate PDF
body: <p>I am trying to learn Sphinx documentation creating tool. I am able to generate html documentation. Now, in order to create an off-line version of the (html) documentation, I have been trying to generate pdf file from my project.</p>
  <p>Towards that goal, so far I have tried the following (using resources available on the web including the <strong>Sphinx</strong> docs):</p>
  <p>Added the following to <strong>conf.py</strong>:</p>
  <pre><code># conf.py options for Latex
  latex_engine = 'pdflatex'
  latex_elements = {
      'papersize': 'a4paper',
      'pointsize': '10pt',
      }
  </code></pre>
  <p>Subsequently used the command <code>make latexpdf</code> in the terminal, whereupon I got the following messages in the terminal:</p>
  <pre><code>/Users/.../.../.../.../.../urls.py:docstring of lead.urls:5: WARNING: Definition list ends without a blank line; unexpected unindent.
  /Users/.../urls.py:docstring of lead.urls:7: WARNING: Unexpected indentation.
  looking for now-outdated files... none found
  pickling environment... done
  checking consistency... done
  processing lead.tex... index modules/... 
  resolving references...
  done
  writing... done
  copying TeX support files... copying TeX support files...
  done
  build succeeded, () warnings.
  
  The LaTeX files are in _build/latex.
  Run 'make' in that directory to run these through (pdf)latex
  (use `make latexpdf' here to do that automatically).
  latexmk -pdf -dvi- -ps-  'lead.tex'
  make[1]: latexmk: No such file or directory
  make[1]: *** [lead.pdf] Error 1
  make: *** [latexpdf] Error 2
  </code></pre>
  <p>A new folder <code>latex</code> was created with a number of files in them including one with the name <code>&lt;project_name&gt;.tex</code> (<code>lead.tex</code> in the error log above) and one batch file <code>make.bat</code> among them.</p>
  <p>However, running the command <code>make</code> only produces the following error:</p>
  <pre><code>latexmk -pdf -dvi- -ps-  'lead.tex'
  make: latexmk: No such file or directory
  make: *** [lead.pdf] Error 1
  </code></pre>
  <p>Following some leads (materials available on the web) on <code>latexmk</code>, tried to install <code>BasicTex</code> package from the <a href="https://tug.org/mactex/morepackages.html" rel="nofollow noreferrer">Tex site</a>.</p>
  <p>However, the package available is only for macOs 10.13 and higher. I am on <code>10.12.6</code>.</p>
  <p>So I am stuck. Can somebody please let me know <strong>if there is any solution to my predicament?</strong></p>