Skip to content

Latest commit

 

History

History

latex-cmake-example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Purpose

Use cmake to compile latex files.

Test Environment

  • Gentoo Linux (with noto-cjk installed for CJK fonts)
  • TeXLive 2017
  • cmake 2.8+

How to use

Put CMakeLists.txt and UseLATEX.cmake together with your latex files, modify CMakeLists.txt to match your project, and run the following commands:

#!/bin/sh
mkdir out
cd out
cmake .. -DPDFLATEX_COMPILER=$(which xelatex)
make VERBOSE=1  # VERBOSE mode for indicating what may go wrong.
cd -

The directory "out" contains all intermediate files, including the final pdf, that are generated by latex.

Site index