make latexpdf

44 views
Skip to first unread message

bradley...@gmail.com

unread,
Sep 12, 2020, 5:32:02 PM9/12/20
to sphinx-users

I am trying to figure out how to reproduce
    make latexpdf
with separate calls to first build the latex and then run pdflatex. I want to do this so I can directly modify the latex between the sphinx-build and pdflatex (to accomplish things that are not supported by sphinx).

I am using
    sphinx-build -b latex . _build/latex
    cd _build/latex
    pdflatex <project_value>.tex
where <project_value> is the value of project in my conf.py. When I do this I get the error message
    No file <project_value>.ind
and the index is missing from my pdf.

What am I missing here ?

Komiya Takeshi

unread,
Sep 12, 2020, 10:01:16 PM9/12/20
to sphinx...@googlegroups.com
Hi,

You need to run pdflatex command multiple times to build complete PDF file.
For more detail, please read the following article.
https://www.systutorials.com/why-do-i-need-to-run-latex-bibtex-three-times-to-make-everything-look-good/

Instead of pdflatex command, you can use `make` command under the
_build/latex directory.
It invokes pdflatex multiple times automatically. I hope it helps you.

Thanks,
Takeshi KOMIYA

2020年9月13日(日) 6:32 bradley...@gmail.com <bradley...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/3540f597-7857-46b8-878f-1ede81adedean%40googlegroups.com.

bradley...@gmail.com

unread,
Sep 13, 2020, 9:07:07 AM9/13/20
to sphinx-users
Thanks for the response. I knew one has to run pdflatex twice (when any of the links change) and should have put that in my report above. I did not know three times was necessary in some cases. Unfortunately, this does not fix the problem; i.e., the following
    rm -r _build
    sphinx-build -b latex . _build/latex
    cd _build/latex
    pdflatex <project_value>.tex
    pdflatex <project_value>.tex
    pdflatex <project_value>.tex
has the same result
    No file <project_value>.ind
in the file file
    _build/latex/<project_value>.log
and the index is not in the file
    _build/latex/<project_value>.pdf

I added the
    rm -r _build
because you must first delete the old _build directory to test this. If you don't, the old <project_value>.ind file from the previous
    make latexpdf
gets used by the
    pdflatex <project_value>.tex
command.

jo youssef

unread,
Sep 13, 2020, 9:18:41 AM9/13/20
to sphinx...@googlegroups.com
Thanks 

Mr777


On 13 Sep 2020, at 17:07, bradley...@gmail.com <bradley...@gmail.com> wrote:



bradley...@gmail.com

unread,
Sep 13, 2020, 12:07:26 PM9/13/20
to sphinx-users
The following seems to work for me:
    rm -r _build
    sphinx-build -b latex . _build/latex
    cd _build/latex
    make <project_value>.pdf

Message has been deleted

Jeff McKenna

unread,
Sep 15, 2020, 11:33:22 AM9/15/20
to sphinx...@googlegroups.com
Thanks KOMIYA-san for mentioning that make inside _build/latex handles pdflatex multiple times, as I've been manually doing this for years, ha.  

-jeff



bradley...@gmail.com

unread,
Sep 15, 2020, 12:13:15 PM9/15/20
to sphinx-users
There is still something more than just run pdflatex multiple times that make inside _build/latex does because the index is missing if one only runs pdflatex. I discussed this in more detail in my second message above.

Daniel Scott

unread,
Nov 25, 2020, 10:31:02 PM11/25/20
to sphinx...@googlegroups.com
--
Reply all
Reply to author
Forward
0 new messages