[CMake] cmake with LaTeX [UseLATEX.cmake]
Moreland, Kenneth
kmorel at sandia.gov
Thu Jan 27 10:38:19 EST 2011
Yeah, UseLATEX.cmake sort of assumes that everything is going to be a subdirectory. One way to get around the problem is to call the ADD_LATEX_DOCUMENT command in the upper directory. As I recall, your directory structure was
top-level/
+latex/
+latex/build/
+figures/
Rather than have the ADD_LATEX_DOCUMENT in top-level/latex/CMakelists.txt, try putting it in top-level instead and making all of your file references to top-level. After you build, the document structure should be something like this
top-level/
+latex/
+latex/build/
+latex/build/latex
+latex/build/figures
+figures/
Or you could just forget the whole thing and just do an out-of-source build.
-Ken
On 1/27/11 3:18 AM, "Raymond Wan" <r.wan at aist.go.jp> wrote:
Hi Ken,
Sorry for not replying, but this message of your's ended up in spam
filter... :-(
On Wed, Jan 26, 2011 at 01:56, Moreland, Kenneth <kmorel at sandia.gov> wrote:
> 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.
>
> In summary, it should work if you use this as for IMAGE_DIRS
>
> IMAGE_DIRS ../figures
>
> and your graphics paths should be preserved relative to the source:
>
> \graphicspath{../figures}
>
> 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).
Thank you for your help and yes, I did get it working using your
instructions above. Guess I only tried combinations where I did one
thing in my LaTeX file and then the CMakeLists.txt file undid it -- so
I never got it correct!
The "downside" is that inside my latex source directory, there is a
copy of my figures in PDF format -- but I can live with that or just
use the "safepdf" option. Thank you for updating the module and sorry
again for the delay in my reply -- must check my spam folder more
often...
Ray
**** Kenneth Moreland
*** Sandia National Laboratories
***********
*** *** *** email: kmorel at sandia.gov
** *** ** phone: (505) 844-8919
*** web: http://www.cs.unm.edu/~kmorel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110127/ddc8b4e4/attachment.htm>
More information about the CMake
mailing list