"Choose the default type of LaTeX build. Valid options are pdf, dvi, ps, safepdf, html"
)
set_property(CACHE LATEX_DEFAULT_BUILD
PROPERTY STRINGS pdf dvi ps safepdf html
)
option(LATEX_USE_SYNCTEX
"If on, have LaTeX generate a synctex file, which WYSIWYG editors can use to correlate output files like dvi and pdf with the lines of LaTeX source that generates them. In addition to adding the LATEX_SYNCTEX_FLAGS to the command line, this option also adds build commands that \"corrects\" the resulting synctex file to point to the original LaTeX files rather than those generated by UseLATEX.cmake."
OFF
)
option(LATEX_SMALL_IMAGES
"If on, the raster images will be converted to 1/6 the original size. This is because papers usually require 600 dpi images whereas most monitors only require at most 96 dpi. Thus, smaller images make smaller files for web distribution and can make it faster to read dvi files."
OFF)
if(LATEX_SMALL_IMAGES)
set(LATEX_RASTER_SCALE 16 PARENT_SCOPE)
set(LATEX_OPPOSITE_RASTER_SCALE 100 PARENT_SCOPE)
else()
set(LATEX_RASTER_SCALE 100 PARENT_SCOPE)
set(LATEX_OPPOSITE_RASTER_SCALE 16 PARENT_SCOPE)
endif()
# Just holds extensions for known image types. They should all be lower case.
# For historical reasons, these are all declared in the global scope.
message(SEND_ERROR "IMAGEMAGICK_CONVERT set to Window's convert.exe for changing file systems rather than ImageMagick's convert for changing image formats. Please make sure ImageMagick is installed (available at http://www.imagemagick.org). If you have a recent version of ImageMagick (7.0 or higher), use the magick program instead of convert for IMAGEMAGICK_CONVERT.")
else()
set(converter ${IMAGEMAGICK_CONVERT})
# ImageMagick requires a special order of arguments where resize and
# arguments of that nature must be placed after the input image path.
add_custom_command(OUTPUT ${output_path}
COMMAND ${converter}
ARGS ${input_path}${convert_flags}${output_path}
DEPENDS ${input_path}
)
endif()
else()
message(SEND_ERROR "Could not find convert program. Please download ImageMagick from http://www.imagemagick.org and install.")
endif()
else()# Not ImageMagick convert
add_custom_command(OUTPUT ${output_path}
COMMAND ${converter}
ARGS ${convert_flags}${input_path}${output_path}
DEPENDS ${input_path}
)
endif()
endfunction(latex_add_convert_command)
# Makes custom commands to convert a file to a particular type.
message(WARNING "Some LaTeX distributions have problems with image file names with multiple extensions or spaces. Consider changing ${name}${extension} to something like ${suggested_name}${extension}.")