CMakeUserUseLATEX: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(Documentation now maintained separately.)
Line 9: Line 9:
* Optionally runs configure on your latex files to replace <tt>@''VARIABLE''@</tt> with the equivalent CMake variable.
* Optionally runs configure on your latex files to replace <tt>@''VARIABLE''@</tt> with the equivalent CMake variable.
* Automatically finds png, jpeg, eps, and pdf files and converts them to formats latex and pdflatex understand.
* Automatically finds png, jpeg, eps, and pdf files and converts them to formats latex and pdflatex understand.
If you want to use pstricks images, locate this line in the UseLATEX.cmake file <br>
<code>SET(LATEX_COMPILER_FLAGS "-interaction=nonstopmode</code><br>
and change it to this line:<br>
<code>SET(LATEX_COMPILER_FLAGS "-interaction=nonstopmode --enable-write18"</code>


==Download==
==Download==

Revision as of 06:36, 1 September 2010

Back

Description

Compiling LaTeX files into readable documents is actually a very involved process. Although CMake comes with FindLATEX.cmake, it does nothing for you other than find the commands associated with LaTeX. I like using CMake to build my LaTeX documents, but creating targets to do it is actually a pain. Thus, I've compiled a bunch of macros that help me create targets in CMake into a file I call "UseLATEX.cmake". Here are some of the things UseLATEX.cmake handles:

  • Runs LaTeX multiple times to resolve links.
  • Can run bibtex, makeindex, and makeglossaries to make bibliographies, indexes, and/or glossaries.
  • Optionally runs configure on your latex files to replace @VARIABLE@ with the equivalent CMake variable.
  • Automatically finds png, jpeg, eps, and pdf files and converts them to formats latex and pdflatex understand.

If you want to use pstricks images, locate this line in the UseLATEX.cmake file
SET(LATEX_COMPILER_FLAGS "-interaction=nonstopmode
and change it to this line:
SET(LATEX_COMPILER_FLAGS "-interaction=nonstopmode --enable-write18"

Download




Back



CMake: [Welcome | Site Map]