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.
組件¶
在 3.2 版被加入.
Components can be optionally specified using a standard CMake syntax:
find_package(LATEX [COMPONENTS <component>...])
Supported components are:
PDFLATEX尋找 PdfLaTeX 編譯器。
XELATEX尋找 XeLaTeX 編譯器。
LUALATEX尋找 LuaLaTeX 編譯器。
BIBTEX尋找 BibTeX 編譯器。
BIBER尋找 Biber 編譯器。
MAKEINDEX尋找 MakeIndex 編譯器。
XINDY尋找 xindy 編譯器。
DVIPSFinds the DVI-to-PostScript (DVIPS) converter.
DVIPDF尋找 DVIPDF 轉換器。
PS2PDF尋找 PS2PDF 轉換器。
PDFTOPSFinds the PDF-to-PostScript converter.
LATEX2HTMLFinds the converter for converting LaTeX documents to HTML.
HTLATEX尋找 htlatex 編譯器。
結果變數¶
該模組定義了以下變數:
LATEX_FOUNDBoolean indicating whether the LaTex compiler and all its required components were found.
LATEX_<component>_FOUNDBoolean indicating whether the LaTeX
<component>was found.
快取變數¶
還可能設定以下變數:
LATEX_COMPILERLaTeX 編譯器的路徑。
PDFLATEX_COMPILERPdfLaTeX 編譯器的路徑。
XELATEX_COMPILER在 3.2 版被加入.
XeLaTeX 編譯器的路徑。
LUALATEX_COMPILER在 3.2 版被加入.
LuaLaTeX 編譯器的路徑。
BIBTEX_COMPILERBibTeX 編譯器的路徑。
BIBER_COMPILER在 3.2 版被加入.
Biber 編譯器的路徑。
MAKEINDEX_COMPILERMakeIndex 編譯器的路徑。
XINDY_COMPILER在 3.2 版被加入.
xindy 編譯器的路徑。
DVIPS_CONVERTERDVIPS 轉換器的路徑。
DVIPDF_CONVERTERDVIPDF 轉換器的路徑。
PS2PDF_CONVERTERPS2PDF 轉換器的路徑。
PDFTOPS_CONVERTER在 3.2 版被加入.
The path to the pdftops converter.
LATEX2HTML_CONVERTERThe path to the LaTeX2Html converter.
HTLATEX_COMPILER在 3.2 版被加入.
The path to the htlatex compiler.
範例¶
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()