[CMake] cmake with LaTeX [UseLATEX.cmake]

Raymond Wan r.wan at aist.go.jp
Thu Jan 27 05:18:11 EST 2011


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


More information about the CMake mailing list