No description
When running LaTeX in batch mode, it might not print any output when a failure occurs. So, when running in this mode, cat out the log failure if a LaTeX error occurs. The implementation for this wraps the latex call in a CMake script that runs latex and checks the return value. If not a success value, reads and then prints the log. |
||
---|---|---|
tests | ||
.gitignore | ||
CMakeLists.txt | ||
README | ||
UseLATEX.cmake | ||
UseLATEX.tex |
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. This repository contains the CMake macros in the UseLATEX.cmake file. To get started, copy this file to your own LaTeX project and include it in your build process. You will also find a LaTeX document, UseLATEX.tex, that contains all of the documentation for UseLATEX.cmake. You will also find a CMake build file, CMakeLists.txt, that uses UseLATEX.cmake to build UseLATEX.tex. It also serves as a good example for using UseLATEX.cmake. You can find the latest information on UseLATEX.cmake on the CMake Wiki at the following URL. http://www.cmake.org/Wiki/CMakeUserUseLATEX