FindLATEX¶
Finds LaTeX compiler and Latex-related software like BibTeX:
find_package(LATEX [...])
LaTeX is a typesetting system for the production of technical and scientific documentation.
Components¶
Added in version 3.2.
Components can be optionally specified using a standard CMake syntax:
find_package(LATEX [COMPONENTS <component>...])
Supported components are:
PDFLATEXFinds the PdfLaTeX compiler.
XELATEXFinds the XeLaTeX compiler.
LUALATEXFinds the LuaLaTeX compiler.
BIBTEXFinds the BibTeX compiler.
BIBERFinds the Biber compiler.
MAKEINDEXFinds the MakeIndex compiler.
XINDYFinds the xindy compiler.
DVIPSFinds the DVI-to-PostScript (DVIPS) converter.
DVIPDFFinds the DVIPDF converter.
PS2PDFFinds the the PS2PDF converter.
PDFTOPSFinds the PDF-to-PostScript converter.
LATEX2HTMLFinds the converter for converting LaTeX documents to HTML.
HTLATEXFinds htlatex compiler.
Result Variables¶
This module defines the following variables:
LATEX_FOUNDBoolean indicating whether the LaTex compiler and all its required components were found.
LATEX_<component>_FOUNDBoolean indicating whether the LaTeX
<component>was found.
Cache Variables¶
The following cache variables may also be set:
LATEX_COMPILERThe path to the LaTeX compiler.
PDFLATEX_COMPILERThe path to the PdfLaTeX compiler.
XELATEX_COMPILERAdded in version 3.2.
The path to the XeLaTeX compiler.
LUALATEX_COMPILERAdded in version 3.2.
The path to the LuaLaTeX compiler.
BIBTEX_COMPILERThe path to the BibTeX compiler.
BIBER_COMPILERAdded in version 3.2.
The path to the Biber compiler.
MAKEINDEX_COMPILERThe path to the MakeIndex compiler.
XINDY_COMPILERAdded in version 3.2.
The path to the xindy compiler.
DVIPS_CONVERTERThe path to the DVIPS converter.
DVIPDF_CONVERTERThe path to the DVIPDF converter.
PS2PDF_CONVERTERThe path to the PS2PDF converter.
PDFTOPS_CONVERTERAdded in version 3.2.
The path to the pdftops converter.
LATEX2HTML_CONVERTERThe path to the LaTeX2Html converter.
HTLATEX_COMPILERAdded in version 3.2.
The path to the htlatex compiler.
Examples¶
Finding LaTeX in a project:
find_package(LATEX)
Finding LaTeX compiler and specifying which additional LaTeX components are required for LaTeX to be considered found:
find_package(LATEX COMPONENTS PDFLATEX)
if(LATEX_FOUND)
execute_process(COMMAND ${LATEX_COMPILER} ...)
execute_process(COMMAND ${PDFLATEX_COMPILER} ...)
endif()
Or finding LaTeX compiler and specifying multiple components:
find_package(LATEX COMPONENTS BIBTEX PS2PDF)
if(LATEXT_FOUND)
# ...
endif()