<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. If you make it an absolute path, UseLATEX.cmake will look in the wrong directory for your images, find none, and do no conversions. 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, "Raymond Wan" <<a href="r.wan@aist.go.jp">r.wan@aist.go.jp</a>> 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 <<a href="daniel@pfeifer-mail.de">daniel@pfeifer-mail.de</a>> wrote:<BR>
> Am Dienstag, den 25.01.2011, 15:41 +0900 schrieb Raymond Wan:<BR>
>> Everything is fine except that pdflatex<BR>
>> doesn't seem to work with images well on my system... That's of<BR>
>> course my system [or my :-) ] fault, though.<BR>
><BR>
> Do you use the IMAGE_DIRS or IMAGES parameters? UseLATEX.cmake should<BR>
> then convert all images to the right format. Maybe check you imagemagick<BR>
> installation.<BR>
<BR>
<BR>
Actually, neither. I couldn't get them to work and went to plan B.<BR>
:-) I have a directory structure like:<BR>
<BR>
top-level/<BR>
+latex/<BR>
+latex/build/<BR>
+figures/<BR>
<BR>
So, my figures are in figures/. I thought this would do:<BR>
<BR>
IMAGE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../figures/"<BR>
<BR>
but it wasn't working for me I also tried IMAGES and that didn't work<BR>
as well. 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. 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>
>> ... Is there something I can do<BR>
>> in my CMakeLists.txt file to ensure that it is the default target (and<BR>
>> not "pdf" or any of the others) when I type "make".<BR>
><BR>
> Sure, there is the DEFAULT_PDF option. Have a look at section '3.3<BR>
> 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>
"pdf" target over the "safepdf" target. 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>
**** Kenneth Moreland<BR>
*** Sandia National Laboratories<BR>
*********** <BR>
*** *** *** email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** *** ** phone: (505) 844-8919<BR>
*** web: <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>