<HTML>
<HEAD>
<TITLE>Re: [CMake] cmake with LaTeX [UseLATEX.cmake]</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Looking at the source code, I believe it is assumed that the paths you give for images are relative to the directory ADD_LATEX_DOCUMENT is called. &nbsp;If you make it an absolute path, UseLATEX.cmake will look in the wrong directory for your images, find none, and do no conversions. &nbsp;That would explain why you had to point to your source directory and why pdflatex did not work if your images are in eps format.<BR>
<BR>
In summary, it <I>should</I> work if you use this as for IMAGE_DIRS<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>IMAGE_DIRS ../figures<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>and your graphics paths should be preserved relative to the source:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>\graphicspath{../figures}<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
Note, however, if you are trying to do an in-source build with the directory structure below, UseLATEX.cmake will probably do something screwy with the figures output directory (that is, place it in top-level/latex/figures since that is one level down from top-level/latex/figures).<BR>
<BR>
-Ken<BR>
<BR>
On 1/25/11 1:23 AM, &quot;Raymond Wan&quot; &lt;<a href="r.wan@aist.go.jp">r.wan@aist.go.jp</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi Daniel,<BR>
<BR>
Thanks for the reply!<BR>
<BR>
<BR>
On Tue, Jan 25, 2011 at 16:15, Daniel Pfeifer &lt;<a href="daniel@pfeifer-mail.de">daniel@pfeifer-mail.de</a>&gt; wrote:<BR>
&gt; Am Dienstag, den 25.01.2011, 15:41 +0900 schrieb Raymond Wan:<BR>
&gt;&gt;  Everything is fine except that pdflatex<BR>
&gt;&gt; doesn't seem to work with images well on my system...  That's of<BR>
&gt;&gt; course my system [or my :-) ] fault, though.<BR>
&gt;<BR>
&gt; Do you use the IMAGE_DIRS or IMAGES parameters? UseLATEX.cmake should<BR>
&gt; then convert all images to the right format. Maybe check you imagemagick<BR>
&gt; installation.<BR>
<BR>
<BR>
Actually, neither. &nbsp;I couldn't get them to work and went to plan B.<BR>
:-) I have a directory structure like:<BR>
<BR>
top-level/<BR>
&nbsp;&nbsp;+latex/<BR>
&nbsp;&nbsp;&nbsp;&nbsp;+latex/build/<BR>
&nbsp;&nbsp;+figures/<BR>
<BR>
So, my figures are in figures/. &nbsp;I thought this would do:<BR>
<BR>
IMAGE_DIRS &quot;${CMAKE_CURRENT_SOURCE_DIR}/../figures/&quot;<BR>
<BR>
but it wasn't working for me &nbsp;I also tried IMAGES and that didn't work<BR>
as well. &nbsp;I didn't pursue this further as I got:<BR>
<BR>
\graphicspath{{@CMAKE_CURRENT_SOURCE_DIR@/../figures/}}<BR>
<BR>
in the source LaTeX file to work and all my figures are in EPS format<BR>
anyway. &nbsp;I will take a look at my imagemagick installation; but it<BR>
might also be that the figures aren't being located.<BR>
<BR>
<BR>
&gt;&gt; ... Is there something I can do<BR>
&gt;&gt; in my CMakeLists.txt file to ensure that it is the default target (and<BR>
&gt;&gt; not &quot;pdf&quot; or any of the others) when I type &quot;make&quot;.<BR>
&gt;<BR>
&gt; Sure, there is the DEFAULT_PDF option. Have a look at section '3.3<BR>
&gt; Create a PDF by Default' in the manual.<BR>
<BR>
<BR>
Yes, I've enabled that but I don't think that allows me to choose the<BR>
&quot;pdf&quot; target over the &quot;safepdf&quot; target. &nbsp;Or is there something I'm<BR>
missing with this option?<BR>
<BR>
Thank you!<BR>
<BR>
Ray<BR>
_______________________________________________<BR>
Powered by www.kitware.com<BR>
<BR>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><BR>
<BR>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><BR>
<BR>
Follow this link to subscribe/unsubscribe:<BR>
<a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a> <BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
&nbsp;&nbsp;&nbsp;**** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kenneth Moreland<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sandia National Laboratories<BR>
*********** &nbsp;<BR>
*** *** *** &nbsp;email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** &nbsp;*** &nbsp;** &nbsp;phone: (505) 844-8919<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;web: &nbsp;&nbsp;<a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>