shiblon / latex-makefile

A Makefile for LaTeX - drop it in, type make, and magic happens.
Other
185 stars 30 forks source link

includegraphics{some.pdf} not getting into dependency file #165

Closed shiblon closed 8 years ago

shiblon commented 8 years ago

Originally reported on Google Code with ID 152

I have something like this in my presenation (build strategy 

$ make clean
$ make presentation.d
NOTE: You may ignore warnings about the following files:

     presentation.d

Makefile:2741: presentation.d: No such file or directory
= presentation.tex --> presentation.d presentation.pdf.1st.make (0-1) =
make: `presentation.d' is up to date.
$ cat presentation.tex | grep plotExampleCostFctSmall.pdf
   \includegraphics{plotExampleCostFctSmall.pdf}
$ cat presentation.d | grep plotExampleCostFctSmall.pdf
$ 
$ make plotExampleCostFctSmall.pdf
python plotExampleCostFctSmall.py

I added a rule for %.pdf: %.py in my Makefile.ini.

Just a 'make' aborts with:

$ make
./presentation.tex:79: Package pdftex.def Error: File `plotExampleCostFctSmall.pdf'
not found.
make: *** [presentation.pdf] Error 1

Am I doing something wrong? I expected the pdf to be in the dependency file and be
created automatically.

$ make version
LaTeX Makefile Version 2.2.1-alpha8
by Chris Monson

Reported by andre.rauh on 2012-03-13 15:28:09

shiblon commented 8 years ago
Can you create a minimal example that exhibits this behavior and attach the files to
this bug?

Reported by shiblon on 2012-03-14 08:51:37

shiblon commented 8 years ago
[99] [~/_mk_bug/]$ cat Makefile.ini 
onlysources.tex := presentation.tex
BUILD_STRATEGY := pdflatex

%.pdf: %.py
        $(PYTHON) $<

[100] [~/_mk_bug/]$ cat presentation.tex
\documentclass{beamer}
\usepackage{graphicx}
\begin{document}
\begin{frame}
\begin{figure}[t]
\includegraphics{plot.pdf}
\end{figure}
\end{frame}
\end{document}
[101] [~/_mk_bug/]$ make clean
[103] [~/_mk_bug/]$ ls
Makefile  Makefile.ini  plot.py  presentation.tex
[104] [~/_mk_bug/]$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-unknown-linux-gnu
[105] [~/_mk_bug/]$ sed --version
GNU sed version 4.2.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.

GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-gnu-utils@gnu.org>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
[106] [~/_mk_bug/]$ make 
NOTE: You may ignore warnings about the following files:

     presentation.d

Makefile:2741: presentation.d: No such file or directory
= presentation.tex --> presentation.d presentation.pdf.1st.make (0-1) =
./presentation.tex:8: Package pdftex.def Error: File `plot.pdf' not found.
make: *** [presentation.pdf] Error 1
[107] [~/_mk_bug/]$ cat presentation.d | grep plot
[108] [~/_mk_bug/]$ cat presentation.tex | grep plot
\includegraphics{plot.pdf}
[109] [~/_mk_bug/]$ 

Makefile is 2.2.1-alpha8 (unmodified)
Thanks for your help!

Reported by andre.rauh on 2012-03-15 16:38:21


shiblon commented 8 years ago
Oh, right.  I get it, now.  When using pdflatex with the makefile, it is not supported
to specify an extension in the \includegraphics item.  So, instead of

\includegraphics{plot.pdf}

Do

\includegraphics{plot}

I believe that will fix it for you.  Marking WontFix because it isn't broken.  :-)
 Please don't hesitate to reopen the bug if removing the extension doesn't work.

Reported by shiblon on 2012-03-21 09:13:44