Commit graph

115 commits

Author SHA1 Message Date
Kenneth Moreland
3c3ce51454 Add INCLUDE_DIRECTORIES option 2019-09-30 21:33:43 -06:00
Eric Doenges
adf9530897 Add support for setting the TEXINPUTS environment variable 2019-09-30 15:13:28 -06:00
Kenneth Moreland
7e1e03b4c0 Fix issue with detecting long undefined reference warnings
LaTeX "helpfully" split across lines (and which fowled up our regex).
Get around the problem by instead searching for "LaTeX Warning:" at
the beginning of the line. Hopefully (1) all versions of LaTeX
actually write this out and (2) it is not used for trivial
warnings.
2019-09-11 16:24:56 -07:00
Kenneth Moreland
193d64b3c4 Fix typo 2019-09-04 13:18:15 -06:00
Kenneth Moreland
acc9ac7762 Disable unneeded image conversions when forcing DVI 2019-09-04 12:59:30 -06:00
Martin Wetzel
d0d4d59ff5 disable image conversions for DVI targets if only building PDF target
This prevents a needless dependency on ImageMagick if all images are already
in formats suitable for pdflatex, but would need to be converted to .eps for DVI builds.
2019-09-04 12:47:00 -06:00
Kenneth Moreland
aa36c16f99 Parse through biber output for warnings
Important to find undefined citations
2019-08-05 15:04:05 -06:00
Kenneth Moreland
cdec9a8944 Support a custom biblatex.cfg file when using biblatex 2018-09-11 17:31:02 -06:00
Kenneth Moreland
a564114f2b Fix issue with converting synctex paths
When using the synctex option with pdflatex, it writes out a file
containing paths to the input files. The problem is that
UseLATEX.cmake copies all the input files, so you get a link to
the copy, not the original. To correct for this UseLATEX.cmake
changed the directories back to the input files, but it only
did so for relative paths. pdflatex writes out absolute paths,
so these were not properly converted. This should fix that issue.

I also noticed that some of the "input" files are actually those
produced by latex programs (e.g. .aux, .bbl). Trying to convert
these paths to the input would cause pointers to files that do
not exist. To try to correct for this I only convert paths of
files of known extensions.
2018-04-30 11:29:58 -06:00
Kenneth Moreland
6577150a41 Fix issue with spaces in the working directory 2018-04-30 10:08:45 -06:00
Kenneth Moreland
1c817c70f2 Fix parse error for older versions of CMake
There was a reference to using VERSION_GREATER_EQUAL. However, this
conditional is only supported in CMake 3.7 and better. Instead,
use VERSION_GREATER, which is supported in much older versions
of CMake.
2017-10-16 16:31:52 -06:00
Kenneth Moreland
c8eb18ad32 Fix issues with paths that contain spaces 2017-08-21 15:12:38 -06:00
Kenneth Moreland
b36810fe9a Add warnings for missing characters 2017-07-27 14:23:33 -06:00
Kenneth Moreland
0c9f0c7822 Improve behavior when LaTeX fails 2017-07-27 12:11:07 -06:00
Kenneth Moreland
d03bb459ea Check for natbib package warnings
This is necessary to see if you are missing any bibliography entries while using natbib.
2017-06-08 18:43:27 -06:00
Kenneth Moreland
c5394a7263 Fix the order of arguments for magick in ImageMagick 7.0
You now have to give flags like -resize after the input file.
2017-02-13 11:09:14 -07:00
Sergey Alexandrov
abad1ed145 Update list of automatically copied file extensions in documentation
Files with extensions .sty, .ist, and .fd were not mentioned, although
they are automatically copied as well.
2016-12-22 12:24:20 +01:00
Kenneth Moreland
0eb452382a Output full log file on LaTeX error
When running LaTeX in batch mode, it might not print any output when a
failure occurs. So, when running in this mode, cat out the log failure
if a LaTeX error occurs.

The implementation for this wraps the latex call in a CMake script
that runs latex and checks the return value. If not a success value,
reads and then prints the log.
2016-12-14 21:43:39 -07:00
Kenneth Moreland
9d39cbdadc Remove latex2html and fix some issues with htlatex 2016-11-22 14:29:02 -07:00
Kenneth Moreland
f1d6102b39 Bump up version to 2.4.0
The feature of checking the LaTeX build for important warnings is enough
to use a minor revision rather than a patch release.
2016-11-22 13:14:44 -07:00
Kenneth Moreland
63a8a4f49e After build, grep log file for most important warnings
Currently checking for overfull warnings and bad references. This should
make it easier to identify problems with LaTeX files.
2016-11-22 13:06:36 -07:00
Kenneth Moreland
e80946efba Change default LaTeX arguments
They make the output much less verbose and also add file/line numbers
to errors. This mode is much nicer output for build systems. Thanks to
Nikos Koukis for the suggestion.
2016-11-22 11:45:00 -07:00
Kenneth Moreland
22eacee5cd Use # instead of = in ps2pdf args on Windows
The ps2pdf command is really just a script, and on the Windows port
it is a bat file. The Windows command interpreter for bat files treat
= as a special character, so on Windows you should use # instead.
2016-11-22 09:42:16 -07:00
Kenneth Moreland
66ca3a5cac Correct how program flags are separated
The _FLAGS CMake variables are specified as space-separated arguments
to make them easier to type. However, they have to be converted to CMake
lists to pass them to CMake commands that run programs. Otherwise they
will be interpreted as a single argument.

There were some separate_arguments commands to do just that. However,
I think when I changed over from defining macros to defining functions,
the scope of the separated arguments broke. This should fix that.
2016-11-21 14:48:56 -07:00
Kenneth Moreland
f4546b6d8e Remove resolution argument from pdftops
A user reported that converting a pdf to an eps was failing because his
pdftops program, which was a recent build/release, did not support the
-r flag, which sets the resolution used when objects are rasterized.
After some searching, I believe the issue is that there are two versions
of pdftops running around: one from Poppler and one from Xpdf. The former
supports the raster resolution flag, the latter does not.

Rather than jump through hoops trying to identify which one is installed
on a system, I just removed the flag. The consequence is that rasterized
objects will use a smaller resolution (the default is 300 dpi, and we were
setting it to 600 dpi). However, if you start engaging rasterization, then
the result probably is not looking as good anyway.
2016-11-21 14:05:48 -07:00
Kenneth Moreland
46e7d83b2a Fix issue with HTML targets when main tex file is in subdirectory 2016-09-08 11:14:23 -06:00
Kenneth Moreland
844394a066 Add LaTeX inputs as sources to targets
This allows the files to show up in IDEs like Qt Creator.
2016-09-08 09:07:36 -06:00
Kenneth Moreland
9b5271a10f Update documentation for changes in ImageMagick 2016-09-07 15:42:46 -06:00
Kenneth Moreland
e6358ec349 Support the use of magick instead of convert
It looks like with the release of ImageMagick 7.0 that the name of the
convert program has been renamed to magick. Most implementation have a
link from convert to magick, but the windows install by default does
not provide a convert program. To make sure it works everywhere, search
for both programs (searching for magick first).
2016-09-07 15:24:10 -06:00
Kenneth Moreland
54d2bdfe71 Change BIBLATEX_COMPILER to BIBER_COMPILER
Previously, UseLATEX.cmake was calling latex_needit for the
BIBLATEX_COMPILER variable. However, this variable was never set
because the FindLATEX module sets the BIBER_COMPILER variable instead.
Look for that variable.

Other minor changes include updating the documenting comments and calling
wantit rather than needit on the biber compiler just in case there are
latex installations without it.
2016-02-15 23:19:51 -07:00
David Tracey
2c570eea4d Add [USE_BIBLATEX] to description in file header. 2016-02-14 18:04:35 +00:00
David Tracey
4177f43744 Refactor integration of biblatex support. 2016-02-14 17:51:22 +00:00
David Tracey
2d71bffed5 Add support for biblatex/biber 2016-02-12 23:43:44 +00:00
Kenneth Moreland
3d6a7a93d3 Add STRINGS property to LATEX_DEFAULT_BUILD
This makes it easier to select the default build in the CMake GUI.
2015-12-01 15:48:27 -07:00
Kenneth Moreland
82357b7dde Add TARGET_NAME option.
A user requested the ability to make the target names created by UseLATEX
different than the name of the main tex file. The use case was for a
multi-directory project with two or more subdirectories containing LaTeX
files with the same name.
2015-10-19 14:22:34 -06:00
Kenneth Moreland
18abbfebc1 Support bmp and other image formats. 2015-09-08 10:54:57 -06:00
Kenneth Moreland
26426e23ec Support for multind package (thanks to Dan Lipsa) 2015-09-03 13:46:10 -06:00
Kenneth Moreland
7c30cef708 Fix issue where pdf, etc. where declared each time UseLATEX was loaded.
In a large project, it is not uncommon to have LaTeX documents built in
different subdirectories and to have each subdirectory include
UseLATEX.cmake. However, loading UseLATEX.cmake multiple times caused
the pdf, dvi, etc. targets to be created multiple times even though the
intention is to have them loaded once. This change creates each target
only once.
2015-08-25 13:46:56 -06:00
Christoph Grüninger
640891fd25 Fix typos
and a trailing white space.
2015-07-11 17:13:32 +02:00
Kenneth Moreland
74ae43a968 Add explicit errors when using removed options. 2015-04-09 14:24:31 -06:00
Kenneth Moreland
2ce9fb7097 Update copyright and license information. 2015-04-09 13:53:09 -06:00
Kenneth Moreland
5bb6a7a638 Add EXCLUDE_FROM_DEFAULTS option
Previously, the EXCLUDE_FROM_ALL option broke both the dependency from
the all target and the dependency from the dvi, pdf, etc. targets. However,
there is plenty of reason to want only one or the other, so the
EXCLUDE_FROM_ALL option was broken up into a second EXCLUDE_FROM_DEFAULTS
that controls the second set of dependencies.
2015-04-09 11:46:56 -06:00
Kenneth Moreland
e603d1f003 Typo.
Pointed out by Izaak Beekman.
2015-02-20 23:25:31 -07:00
Kenneth Moreland
59cc0e32ce Forgot to add dependency from auxclean target to mangled targed. 2014-12-19 14:52:55 +05:30
Kenneth Moreland
5f7c265521 Update documentation for mangled naming. 2014-12-15 17:18:54 +05:30
Kenneth Moreland
78a7233a33 Automatically mangle LaTeX targets.
This way when you call add_latex_document multiple times you do not get
multiply defined targets.
2014-12-15 16:34:59 +05:30
Kenneth Moreland
9e1f62b5dc Update documentation for how default builds work. 2014-12-15 14:49:22 +05:30
Kenneth Moreland
a01764abf1 Add FORCE_* arguments. 2014-12-15 00:25:02 -05:00
Kenneth Moreland
9778983e16 Change how default builds are specified.
Removed the DEFAULT_* arguments. Instead, have a CMake variable named
LATEX_DEFAULT_BUILD that specifies what the default build should be.
This CMake variable is initialized with an environment variable of the
same name or PDF if none is specified. This allows each user to specify
a default build without having to change the configuration.

There is also an EXCLUDE_FROM_ALL option that, like the same option in
add_executable, keeps the document from being built in the default all
target.
2014-12-14 23:33:03 -05:00
Kenneth Moreland
11e29805bc Mark variables for executables advanced.
UseLATEX.cmake finds several executables for compiling documents and
converting files. Previously these were not marked as advanced, but
CMake now conventionally makes them advanced to avoid cluttering the
GUI.
2014-12-14 16:40:34 -05:00