Uselatex - Cmake: L Tex Document Building Made Easy
Uselatex - Cmake: L Tex Document Building Made Easy
Uselatex - Cmake: L Tex Document Building Made Easy
Contents
1 Description 2
2 Download 2
3 Basic Usage 3
3.1 Using a Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.2 Incoporating Images . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.3 Selecting a Default Build . . . . . . . . . . . . . . . . . . . . . . 6
3.4 Force a Type of Build . . . . . . . . . . . . . . . . . . . . . . . . 6
3.5 Create Nothing by Default . . . . . . . . . . . . . . . . . . . . . . 7
3.6 SyncTeX-Enabled Editors . . . . . . . . . . . . . . . . . . . . . . 7
4 Package Support 8
4.1 Making an Index . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.2 Making Multiple Indexes . . . . . . . . . . . . . . . . . . . . . . . 8
4.3 Making a Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.4 Nomenclature Support . . . . . . . . . . . . . . . . . . . . . . . . 9
4.5 multibib Support . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.6 biblatex Support . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5 Advanced Configurations 11
5.1 Multipart LATEX Files . . . . . . . . . . . . . . . . . . . . . . . . 11
5.2 Configuring LATEX Files . . . . . . . . . . . . . . . . . . . . . . . 12
5.3 Building Multiple LATEX Documents . . . . . . . . . . . . . . . . 12
5.4 Identifying Dependent Files . . . . . . . . . . . . . . . . . . . . . 14
5.5 Adding Include Directories . . . . . . . . . . . . . . . . . . . . . 14
1
6.4 How do I process with LuaLATEX? . . . . . . . . . . . . . . . . . . 16
6.5 Why does UseLATEX.cmake have to copy my tex files? . . . . . . 16
6.6 How can LATEX find a file not a tex, image, or bibliography? . . . 17
6.7 Why is convert failing on Windows? . . . . . . . . . . . . . . . . 17
6.8 How do I automate plot generation with command line programs? 18
6.9 Why does make stop after each image conversion? . . . . . . . . 20
6.10 How do I resolve \write 18 errors with pstricks or pdftricks? . . . 20
6.11 Why is UseLATEX.cmake complaining about image file names? . 21
6.12 Why are there no FORCE PS or FORCE SAFEPDF options? . . . . . 21
6.13 Why is my image file not being automatically converted? . . . . 22
6.14 Why are some files in IMAGE DIRS not processed? . . . . . . . . . 22
6.15 Why is the MANGLE TARGET NAMES option deprecated? . . . . . . 22
6.16 What is the point of the default LATEX arguments? . . . . . . . . 23
6.17 Why do the ps2pdf arguments have the # character in them? . . 24
7 Acknowledgments 25
A Sample CMakeLists.txt 26
1 Description
Compiling LATEX files into readable documents is actually a very involved pro-
cess. 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, in-
dexes, and/or glossaries.
• Optionally runs configure on your LATEX files to replace @VARIABLE @ with
the equivalent CMake variable.
• Automatically finds png, jpeg, eps, pdf, svg, tiff, gif, bmp, and other image
files and converts them to formats latex and pdflatex understand.
• Reduces LATEX’s overly verbose output and searches for messages that are
more likely to require attention.
2 Download
UseLATEX.cmake is currently posted to the CMake Wiki at
http://public.kitware.com/Wiki/CMakeUserUseLATEX.
2
3 Basic Usage
Using UseLATEX.cmake is easy. For a basic LATEX file, simply include the file in
your CMakeLists.txt and use the add latex document command to make targets
to build your document. For an example document in the file MyDoc.tex, you
could establish a build with the following simple CMakeLists.txt.
project(MyDoc NONE)
include(UseLATEX.cmake)
add_latex_document(MyDoc.tex)
The add latex document adds the following targets to create a readable
document from MyDoc.tex:
safepdf Creates MyDoc.pdf from MyDoc.ps using ps2pdf. Many publishers pre-
fer pdfs are created this way. Requires the PS2PDF CONVERTER CMake
variable to be set.
html Creates html pages. Requires the HTLATEX COMPILER CMake variable to
be set.
clean To CMake’s default clean target, the numerous files that LATEX often
generates are added.
auxclean Deletes the auxiliary files from LATEX, but not the generated input
files. Sometimes LATEX gets itself in a bad state where the auxiliary files
need to be deleted to successfully build again, and this target does that
without also deleting other build files (such as converted image files or
files from unrelated targets in the same directory).
3
3.1 Using a Bibliography
For any technical document, you will probably want to maintain a BibTEX
database of papers you are referencing in the paper. You can incorporate your
.bib files by adding them after the BIBFILES argument to the add latex -
document command.
This will automatically add targets to build your bib file and link it into your
document. To use the BibTEX file in your LATEX file, just do as you normally
would with \cite commands and bibliography commands:
\bibliographystyle{plain}
\bibliography{MyDoc}
add_latex_document(MyDoc.tex
BIBFILES MyDoc.bib
IMAGE_DIRS images
)
If you want to break up your image files in several different directories, you
can do that, too. Simply provide multiple directories after the IMAGE DIRS
option.
add_latex_document(MyDoc.tex
BIBFILES MyDoc.bib
IMAGE_DIRS icons figures
)
Alternatively, you could list all of your image files separatly with the IMAGES
option.
4
set(MyDocImages
logo.eps
icons/next.png
icons/previous.png
figures/flowchart.eps
figures/team.jpeg
)
add_latex_document(MyDoc.tex
IMAGES ${MyDocImages}
)
For every image file specified and found with the IMAGE DIRS and IMAGES
options, UseLATEX.cmake adds makefile targets to use ImageMagick’s magick or
convert to convert the file types to those appropriate for the build.1 If you do not
have ImageMagick, you can get it for free from http://www.imagemagick.org.
CMake will also give you a LATEX SMALL IMAGES option that, when on, will
downsample raster images. This can help speed up building and viewing docu-
ments. It will also make the output image sizes smaller.
UseLATEX.cmake will occasionally use a conversion program other than Im-
ageMagick’s magick. For example, ps2pdf will be used when converting eps to
pdf to get around a problem where ImageMagick drops the bounding box infor-
mation. When available, the pdftops from the Poppler utilities will be used to
convert pdf to eps because it better preserves vector graphics and color spaces.
At any rate, you do not need to worry about setting the appropriate image con-
version program. UseLATEX.cmake will automatically select the best one and
issue errors or warnings if there is a problem.
The IMAGE DIRS option tries to identify image files by their extensions. The
current list of image extensions UseLATEX.cmake checks for is: .bmp, .bmp2,
.bmp3, .dcm, .dcx, .ico, .gif, .jpeg, .jpg, .eps, .pdf, .pict, .png, .ppm, .tif, and
.tiff. If you are trying to use an image format that is supported by ImageMagick
but is not recognized by UseLATEX.cmake, you can specify the files directly with
the IMAGES option instead. UseLATEX.cmake will assume that any file specified
with the IMAGES option is an image file regardless of its extension.
Both the IMAGE DIRS and IMAGES can be used together. The combined set
of image files will be processed. If you wish to provide a separate eps file and
pdf or png file, that is OK, too. UseLATEX.cmake will handle that by copying
over the correct file instead of converting.
Depending on what program is launched to build your LATEX file (either latex
or pdflatex, and UseLATEX.cmake supports both), a particular format for your
image is required. As stated, UseLATEX.cmake handles the necessary conver-
sions for you. However, you will not know in advance what file extension is used
on the image. That is no problem. Simply leave out the file extension in the
1 The convert program was essentially renamed magick in ImageMagick 7.0. Most, but not
all, recent installations provide both. UseLATEX.cmake looks for both just in case.
5
file name argument to \includegraphics and LATEX will find the file with the
appropriate extension for you.
Note that in order to ensure that the resulting image files are placed in
the appropriate directory, you are required to give relative paths for images
and image directories. For example, IMAGE DIRS ${CMAKE CURRENT SOURCE -
DIR}/images will fail. Use IMAGE DIRS images instead.
add_latex_document(MyDoc.tex
BIBFILES MyDoc.bib
IMAGE_DIRS images
FORCE_PDF
)
Likewise, the FORCE DVI option restricts add latex document to targets that
use the latex command. In addition to building dvi files, FORCE DVI also allows
ps generation from the dvi files and “safe” pdf generation from the ps files.
add_latex_document(MyDoc.tex
BIBFILES MyDoc.bib
IMAGE_DIRS images
6
FORCE_PS
)
Finally, the FORCE HTML option will restrict targets that are used for html
generation.
add_latex_document(MyDoc.tex
BIBFILES MyDoc.bib
IMAGE_DIRS images
FORCE_HTML
)
add_latex_document(MyDoc.tex
BIBFILES MyDoc.bib
IMAGE_DIRS images
EXCLUDE_FROM_ALL
)
7
option is on, the -synctex=1 argument is added to the LATEX compile commands
(settable with the LATEX SYNCTEX FLAGS variable) and a command is added to
targets that will find files in hbase-namei.synctex.gz and change their paths to
the original files in the source directory.
4 Package Support
Modern LATEX distributions provide a great many packages to provide additional
features to the document building process. A great many more packages are
available in online package distributions. The vast majority of these packages
provide features that are self contained within the LATEX call itself. That is, the
build process does not have to change to accommodate these packages.
That said, there are a small number of packages that require supplementary
programs to be run or to otherwise change the build process. These packages
require special options to add latex document, which are documented here.
add_latex_document(MyDoc.tex
BIBFILES MyDoc.bib
IMAGE_DIRS images
USE_INDEX
)
\usepackage{multind}
\makeindex{general}
\makeindex{functions}
8
you would name the indexes in add latex document like the following.
add_latex_document(MyDoc.tex
BIBFILES MyDoc.bib
IMAGE_DIRS images
USE_INDEX
INDEX_NAMES general functions
)
add_latex_document(MyDoc.tex
BIBFILES MyDoc.bib
IMAGE_DIRS images
USE_GLOSSARY
)
add_latex_document(MyDoc.tex
BIBFILES MyDoc.bib
IMAGE_DIRS images
USE_NOMENCL
)
9
It should be noted that this feature only works with nomencl version 4.0 or
later. The nomencl package changed how makeindex is called to make it compati-
ble with indices and glossaries. The correct version of nomencl is easily identified
as the one that uses the \makenomenclature and \printnomenclature com-
mands (as opposed to the old \makeglossary and \printglossary commands).
If you are using an older version of nomencl, you are best off to update for a
number of reasons.
\newcites{own,submitted,internal}%
{Own Work,%
Submitted Work,%
{Technical Reports, Master Theses and Ph.D. Theses}}
\bibliographyown{own.bib}
\bibliographysubmitted{submitted.bib}
\bibliographyinternal{techreports.bib,theses.bib}
The three suffixes specified to the \newcite command and the four bibliog-
raphy files referenced must all be specified in the add latex document command
with the MULTIBIB NEWCITES and BIBFILES arguments, respectively.
add_latex_document(MyDoc.tex
BIBFILES own.bib submitted.bib techreports.bib theses.bib
MULTIBIB_NEWCITES own submitted internal
)
10
4.6 biblatex Support
The biblatex package provides an alternate mechanism for building bibliogra-
phies that has many options not available to the standard bibliography com-
mands. The package (typically) requires an external program named biber,
which is an alternative to the standard bibtex command.
Thus, to support the biblatex package, the build system must run biber in-
stead of bibtex. This is done simply with UseLATEX.cmake by adding the USE -
BIBLATEX option to add latex document.
add_latex_document(MyDoc.tex
BIBFILES MyDoc.bib
USE_BIBLATEX
)
5 Advanced Configurations
This document has heretofore described using UseLATEX.cmake for a single
LATEX document and associated files (bibliographies, images, indices, etc.). How-
ever there are many configurations to document building that extend beyond
this simple scenario including multipart files, multiple documents, and depended
builds.
add_latex_document(MyDoc.tex
INPUTS Chapter1.tex Chapter2.tex Chapter3.tex Chapter4.tex
BIBFILES MyDoc.bib
IMAGE_DIRS images
USE_INDEX
)
11
5.2 Configuring LATEX Files
Sometimes it is convenient to control the build options of your tex file with
CMake variables. You can achieve this by using the CONFIGURE argument to
add latex document.
add_latex_document(MyDoc.tex
INPUTS Chapter1.tex Chapter2.tex Chapter3.tex Chapter4.tex
CONFIGURE MyDoc.tex
BIBFILES MyDoc.bib
IMAGE_DIRS images
USE_INDEX
)
add_latex_document(MyDoc.tex
INPUTS Ch1Config.tex Ch1.tex Ch2Config.tex
Ch2.tex Ch3Config Ch3.tex
CONFIGURE Ch1Config.tex Ch2Config.tex Ch3Config.tex
BIBFILES MyDoc.bib
IMAGE_DIRS images
USE_INDEX
)
12
Multiple LATEX documents in the same CMake project can be created by sim-
ply calling add latex document multiple times. Each call to add latex docu-
ment will create its own set of unique targets that will be added as dependencies
of dvi, pdf, ps, safepdf and html.
Consider the following code.
add_latex_document(MyDoc1.tex)
add_latex_document(MyDoc2.tex)
In the example above, the first call to add latex document will create targets
named MyDoc1 dvi, MyDoc1 pdf, MyDoc1 ps, etc. whereas the second call
will create targets named MyDoc2 *. Calling dvi, pdf, etc. will execute the
respective targets for the two documents.
The EXCLUDE FROM DEFAULTS option suppresses these links to the docu-
ment’s targets.
add_latex_document(MyDoc1.tex)
add_latex_document(MyDoc2.tex)
add_latex_document(MyDoc3.tex EXCLUDE_FROM_DEFAULTS)
In this augmented example, MyDoc1 and MyDoc2 are built when targets
such as dvi and pdf are called, but MyDoc3 is not. Note, however, that in this
example MyDoc3 is still built as part of the all target that CMake sets as the
default build target. Use EXCLUDE FROM ALL to remove a document from the
default all build. EXCLUDE FROM ALL and EXCLUDE FROM DEFAULTS can be used
together or independently.
An issue that can come up in larger builds with multiple LATEX documents
is a name collision. If two subdirectories each have a LATEX document with the
same .tex file in it, then the respective calls to add latex document will create
the same target names, which CMake does not allow. One way around this
problem is to rename the files to be unique (so that add latex document will
create unique target names). But a more convenient way is to use the TARGET -
NAME option to change the target names. For example, consider the following
use of TARGET NAME.
This will change the behavior of add latex document to create targets
named MyDoc1 dvi, MyDoc1 pdf, MyDoc1 ps, etc. instead of doc dvi, doc pdf,
doc ps, etc.
13
5.4 Identifying Dependent Files
In some circumstances, CMake’s configure mechanism is not sufficient for cre-
ating input files. Input LATEX files might be auto-generated by any number of
other mechanisms.
If this is the case, simply add the appropriate CMake commands to generate
the input files, and then add that file to the DEPENDS option of add latex doc-
ument. To help you build the CMake commands to place the generated files in
the correct place, you can use the LATEX GET OUTPUT PATH convenience
function to get the output path.
latex_get_output_path(output_dir)
add_custom_command(OUTPUT ${output_dir}/generated_file.tex
COMMAND tex_file_generate_exe
ARGS ${output_dir}/generated_file.tex
)
add_latex_document(UberReport.tex
INPUTS report1/Report1.tex report2/Report2.tex
IMAGE_DIRS report1/images report2/images
INCLUDE_DIRECTORIES report1 report2
)
14
Note that the INCLUDE DIRECTORIES option should be used with care. If a
file with the same name exists in multiple included directories, LATEX might not
pick up the file you are expecting. (LATEX will first look in the build directory,
then the directories listed in INCLUDE DIRECTORIES in the order given, and then
system directories.) Thus, in the previous example if both reports had image
files with the same name, the second report will likely include images from the
first report.
CMake, LATEX, and ImageMagick. It is an easy way around the problems described in Sec-
tion 6.7.
15
comprehensive set of tool ports including LATEX, CMake, and ImageMagick. The
fink project and FinkCommander (http://finkcommander.sourceforge.net/) is a
similar although less active project.
The best way around this problem is do an “out of source” build, which is
really the preferred method of using CMake in general. To do an out of source
build, create a new build directory, go to that directory, and run cmake from
there, pointing to the source directory.
If for some reason an out of source build is not feasable or desireable, you can
set the LATEX OUTPUT PATH variable to a directory other than . (the local direc-
tory). If you are building a LATEX document in the context of a larger project
for which you wish to support in source builds, consider pragmatically setting
the LATEX OUTPUT PATH CMake cache variable from within your CMakeLists.txt.
16
6.6 How can LATEX find a file not a tex, image, or bibliog-
raphy?
The most common files included from a LATEX tex file are other tex files, images,
and bibliographies, all of which are handled with options to add latex docu-
ment.
But what happens if the LATEX build includes some other type of file? For
example, the fancyvrb package can import a text file with the \VerbatimInput
command to be formatted in a teletype font. Other examples occur, such as
program formatting packages that can read in source code files.
As far as UseLATEX.cmake is concerned, these types of files are simply other
inputs to LATEX and handled in the same way as included tex files. They can be
included by adding them to the INPUTS argument as described in Section 5.1.
If an inputted file does not immediately exist but is generated by some other
process, then the file should be generated in the output directory and added to
the DEPENDS of the build as described in Section 5.4.
If you notice that the drive letter is stripped off of the filename (i.e. C:),
then you are probably mixing the Cygwin version of convert with the non-
cygwin CMake. The cygwin version of convert uses the colon (:), as a directory
separator for inputs. Thus, it assumes the output file name is really two input
files separated by the colon. Switch to the non-cygwin port of ImageMagick to
fix this.
If you are using nmake, you may also see the following error:
I don’t know what causes this error, but it appears to have something to do
with some strange behavior of nmake when quoting the convert executable. The
easiest solution is to use a different build program (such as make or MSVC’s
IDE or a unix port of make). If anyone finds away around this problem, please
contribute back.
Another possible error seen is
17
Invalid Parameter - filename
This is probably because CMake has found the wrong convert program. Win-
dows is installed with a program named convert in %SYSTEMROOT%\system32.
This convert program is used to change the filesystem type on a hard drive. Since
the windows convert is in a system binary directory, it is usually found in the
path before the installed ImageMagick convert program. (Don’t get me started
about the logic behind this.) Make sure that the IMAGEMAGICK CONVERT CMake
variable is pointing to the correct convert program. Or better yet, make sure you
have ImageMagick 7.0 or higher and use the magick program instead of convert.
Recent versions of UseLATEX.cmake should give a specific warning about this
with instructions on how to fix it.
18
foreach(file ${GRI_FILES})
get_filename_component(basename "${file}" NAME_WE)
# Replace stings in gri file so data files can be found
file(READ
${CMAKE_CURRENT_SOURCE_DIR}/${IMAGE_DIR}/${basename}.gri
file_contents
)
string(REPLACE "${DATA_DIR}" "${IMAGE_DIR}/${DATA_DIR}"
changed_file_contents ${file_contents}
)
file(WRITE
${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_DIR}/${basename}.gri
${changed_file_contents}
)
19
add_latex_document(MyDoc.tex
IMAGE_DIRS ${IMAGE_DIR}
DEPENDS ${ALL_GRI_FILES}
)
set(LATEX_COMPILER_FLAGS
"-interaction=nonstopmode --enable-write18"
CACHE STRING "Flags passed to latex."
)
include(UseLATEX.cmake)
20
6.11 Why is UseLATEX.cmake complaining about image
file names?
If you have an image file with a filename that contains multiple periods, for
example my.image.pdf, UseLATEX.cmake will issue a warning like the following.
This is because, just as the warning reports, some versions of LATEX have
problems with including image filenames with multiple extensions. For example,
if you tried to include my.image.pdf with a command like
\includegraphics{my.image}
then some versions of LATEX will respond that the image extension .image is not
recognized or that the file my.image is not found because it fails to look for files
with valid extensions.
Although it is inadvisable (per Section 3.2), you might try to get around the
problem by specifying the extension like this.
\includegraphics{my.image.pdf}
This might work, or it might just make LATEX complain that it does not recognize
images with extension .image.pdf.
In the end, the best solution is to simply use filenames that will not trouble
LATEX. Even though some LATEX distributions (like MacTEX) seem to handle
this extension ambiguity correctly, others clearly do not. Thus, even if your
LATEX distribution handles these image filenames correctly, it is still a bad idea
in case you need to change distributions or build on other computers. Your best
course of action is to simply heed the warning and rename your files.
21
6.13 Why is my image file not being automatically con-
verted?
UseLATEX.cmake has the ability to find image files and automatically convert
them to a format LATEX understands. Usually this conversion happens with the
ImageMagick magick program.
Users occasionally report that image formats that should be supported be-
cause ImageMagick can convert them are ignored by UseLATEX.cmake. This can
happen even when the IMAGE DIRS option points to the directory containing the
image files.
The problem here is that UseLATEX.cmake only considers files in IMAGE -
DIRS directories that it identifies as a bona fide image. This prevents UseLA-
TEX.cmake from picking up another type of file, such as a README text file,
and erroneously trying to do image conversion on it.
UseLATEX.cmake checks for image files by looking for a known set of image
extensions. This extension list is maintained separately from ImageMagick’s
extension list and is generally a small subset of all the potential formats Im-
ageMagick supports. Consequently, it is possible for UseLATEX.cmake to ignore
an image file that could be converted.
You can work around this problem by specifying images independently with
the IMAGES option. UseLATEX.cmake will assume any image specified under
the IMAGES option is in fact an image that can be converted with ImageMagick
regardless of the extension. See Section 3.2 for more details.
If there is a file extension that you think should be added to the list of image
extensions to check, send a note to the UseLATEX.cmake maintainers.
22
(like dvi and pdf). This became problematic when UseLATEX.cmake was used
in larger projects that built multiple targets. The multiple documents would
each try to create their own dvi, pdf, etc. targets, and this would create CMake
errors when they conflicted with each other.
To solve this problem, in 2006 the MANGLE TARGET NAMES was added to add -
latex document. When this option was given, add latex document would cre-
ate “mangled” targets that are unique to the name of the document so that
they would not conflict with each other.
This option solved the problem for projects building multiple documents,
but a couple of undesirable elements were later discovered. The first was that
LATEX documents built with the MANGLE TARGET NAMES option were never built
by default. To build the document, the user had to specifically request the
target, which had an unwieldy name, to be built or to explicitly set up depen-
dencies to those targets. The second and more serious issue was that if a project
incorporated one or more sub-projects (not uncommon) and more than one of
these projects used UseLATEX.cmake, you were likely to get conflicting targets
again.
Consequently, in 2015 a change was made to add latex document to man-
gle all targets. The UseLATEX.cmake package establishes a single set of default
target names (dvi, pdf, etc.), and add latex document sets up dependencies
from these default targets to the mangled target names. Thus, when UseLA-
TEX.cmake is used for a single document, the same simple targets work fine.
When multiple documents are added, the default targets are automatically set
up for all documents without conflicts. See Section 5.3 for more details on
building multiple LATEX documents in a project.
So, MANGLE TARGET NAMES is deprecated because it is redundant. All tar-
gets are mangled. The only difference is that add latex document establishes
dependencies to the default target names. If these dependency targets are not
desired, use the EXCLUDE FROM DEFAULTS option. (Once again, see Section 5.3
for more details.)
23
Because important warnings can be hidden along with the unimportant, Use-
LATEX.cmake performs several greps of the log file after the build to look for
the most important warnings encountered with LATEX.
The second thing the -interaction=batchmode flag does is to change the
behavior of LATEX when an error occurs. Rather than enter an interactive
prompt, the LATEX program simply quits. This is how pretty much every build
system expects a compiler to behave.
The second flag added is -file-line-error. For some odd reason the
default behavior of LATEX is to simply print out a message and leave it you to
trace the location of the error. Instead, this flag instructs LATEX to prepend the
filename and line number to every error to simplify finding the error.
24
7 Acknowledgments
Thanks to all of the following contributors.
Martin Baute Check for Windows version of convert being used instead of
ImageMagick’s version.
Izaak Beekman Help in fixing the order of arguments for LATEX SMALL IM-
AGES with Imagemagick 7.0.
25
Raymod Wan DEFAULT SAFEPDF option.
A Sample CMakeLists.txt
Following is a sample listing of CMakeLists.txt. In fact, it is the CMakeLists.txt
that is used to build this document.
cmake_minimum_required(VERSION 2.8.12)
project(UseLATEX_DOC NONE)
include(UseLATEX.cmake)
26