Commit graph

115 commits

Author SHA1 Message Date
Kenneth Moreland
91cc27cbc3 Remove some deprecated features. 2014-12-14 16:33:40 -05:00
Kenneth Moreland
5468246176 Explicitly list the main tex file as an argument.
Should make errors easier to trace.
2014-12-14 15:55:34 -05:00
Kenneth Moreland
f77b563329 Clean up some set commands.
Change "set (" to "set("

Change some set commands that were actually appending a list to a list(append
command, which shows better the point of the command and could be faster.
2014-12-14 15:40:16 -05:00
Kenneth Moreland
2eb8826243 Use the parse argument function that comes with CMake.
That module is actually based off the code that originally came from
UseLATEX.cmake, but now that it exists and is supported by the CMake
community, there is no reason to have a second copy here.
2014-12-14 15:16:19 -05:00
Kenneth Moreland
2cf610a36b Update else/endif arguments.
The arguments for else and endif commands are now no longer necessary. In
fact, the are no longer encouraged. This is because, in addition to it
being annoying to exactly match expressions, it becomes confusing when
there is an else clause. (The expression is actually the inverse of the
case for the else clause.)
2014-12-14 11:08:31 -06:00
Kenneth Moreland
77fe49f7c1 Change capitalized function names to lower case function names.
This is the "new" style in CMake. It's actually been around a while, but
UseLATEX.cmake was not updated previously.
2014-12-14 10:56:29 -06:00
Martin Baute
3264be4f0f Fix check for Window's convert.
Older versions of Windows use the path C:\Windows\system32. Newer ones
use the path C:\Windows\System32 (with a capitol S). They are somewhat
equivalent because Windows file system is not case sensitive, but it
made the check for the system32 directory fail. This change first converts
the path the lowercase to do a non case sensitive comparison.
2014-06-12 11:36:37 -06:00
Christoph Grüninger
fa0fc39926 White space changes: Replace tabs and remove trailing spaces.
Remove an old commented line.
2014-05-25 15:35:03 +02:00
Kenneth Moreland
7155d6374d Copy font files for packages with fonts. 2014-03-19 12:05:23 -06:00
Kenneth Moreland
387cf24870 Check for Windows version of convert and give error.
Thanks to Martin Baute.
2013-11-16 08:28:22 -07:00
Kenneth Moreland
a337f2668a Fix issue of setting LATEX2HTML_CONVERTER to HTLATEX_CONVERTER. 2013-10-31 17:09:04 -06:00
Tomasz Grzegurzko
50661481a7 Use htlatex as a fallback when latex2html is not available. 2013-10-31 09:46:02 -06:00
Kenneth Moreland
b2065e7ed2 Update patch version and document change. 2013-10-02 09:35:33 -06:00
Julien Schueller
264791bd71 Make convert program mandatory only if actually needed.
This is like what is already done for ps2pdf and pdftops.
2013-10-02 09:27:12 -06:00
Kenneth Moreland
0005385708 Fix problem with aux file of main file in subdirectory. 2013-03-12 12:19:01 -06:00
Kenneth Moreland
a424ee4298 Add NO_DEFAULT and DEFAULT_PS options 2013-03-12 09:39:05 -06:00
Kenneth Moreland
b1d4071114 Strengthen check comparing output to input directories.
Previously, a simple string compare was performed.  However, if the
user enters a relative string to LATEX_OUTPUT_PATH ("." would be
expected), then the string compare to the absolute path in
CMAKE_CURRENT_SOURCE_DIR would fail even though the two paths point
to the same place.

Fix the problem by first converting LATEX_OUTPUT_PATH to an absolute
path.
2013-02-04 10:49:57 -07:00
Kenneth Moreland
2e6847b561 Fix problem with LATEX_SMALL_IMAGES.
A recent change from macros to functions changed the scoping rules
that caused the variable that held the raster scale to not be defined
where the build targets were generated (and thus scaling did not occur).
2013-02-04 10:30:26 -07:00
Kenneth Moreland
6e08608b2c Add a class of image files not directly supported by LaTeX.
Previously, all image files were classified into groups of files supported
by latex and those supported by pdflatex.  This change also defines files
that are not directly supported by either (and therefore always have to
be converted).

Also added svg, tiff, and gif files to the list of those supported.
2012-10-01 08:59:58 -04:00
Kenneth Moreland
28524f18ba Add warning for image files with multiple periods.
Some distributions of LaTeX simply do not handle image files with multiple
periods properly (they cannot identify the extension/format correctly).
The warning suggests best practice of renaming files.
2012-06-26 09:46:21 -06:00
Kenneth Moreland
b3073dd638 Fix issues with identifying extensions.
The behavior of GET_FILENAME_COMPONENTS with arguments NAME_WE and EXT
would identify the extension as everything after the *first* period.
This messes up the identification of file types, which pretty much
always have short extensions (like .tex, .bib, .eps, etc.).
2012-06-26 09:01:17 -06:00
Kenneth Moreland
5fd9c1270f Hide internal variables from GUI.
Variables holding things like LATEX_ADD_DOCUMENT arguments have to cached
now that we are using functions instead of macros.  They should be declared
internal since the user should neither see nor set them, but I had
misspelled INTERNAL.
2012-06-11 10:04:20 -06:00
Kenneth Moreland
b92794f5b1 Add ability to use pdftops for conversions. 2012-05-02 14:02:29 -06:00
Kenneth Moreland
a30554f4ec Update UseLATEX.cmake to use functions instead of macros.
Functions have scoping rules that avoid nasty errors.
2012-05-02 13:43:35 -06:00
Kenneth Moreland
b7cc2bb5a2 Fixed typo that caused the LATEX_SMALL_IMAGES option to fail to activate. 2012-03-14 17:00:19 -06:00
Kenneth Moreland
337167bd5d Move bibtex on main back in multibib if statement.
This basically undo's commit acc72788dd.

Apparently, there IS harm in running bibtex on an aux file with no cites
in it.  Bibtex will give you an error in this case.  It is also unclear
whether it is even possible to use the standard cites when using bibtex
or if you ever want to.  If you do, there is still the fallback of
adding the main target to the MULTIBIB_NEWCITES command, if you know
enough to do so.
2012-03-01 15:56:26 -07:00
Kenneth Moreland
8385c6be43 Add comments for MULTIBIB_NEWCITES option for documentation.
Also update history.
2012-02-29 13:07:36 -07:00
Kenneth Moreland
b2ff69f9c8 Clean auxiliary files created by multibib.
Also be flexible if user gives aux files rather than suffix names in
the MULTIBIB_NEWCITES option.
2012-02-29 12:49:45 -07:00
Kenneth Moreland
74884dab2b Issue warning when using MULTIBIB_NEWCITES without BIBFILES.
The option will have no effect if used without the other.
2012-02-29 12:43:34 -07:00
Kenneth Moreland
acc72788dd Always run bibtex on main aux file with multibib.
Even when using multibib, it is possible to still use the main cite
commands that go to the main aux file.  Might as well run bibtex there.
There should be no harm.
2012-02-29 12:38:07 -07:00
Kenneth Moreland
822f46d0ba Change MULTIBIBFILES option to MULTIBIB_NEWCITES.
I was confused when this was presented to me.  I thought it represented
multiple .bib files, which is not the case.  It represents aux files
created with the \newcites command in the multibib package.  I hope this
name will create less confusion.
2012-02-29 12:36:26 -07:00
Antonio LaTorre
e263ea7e1e Basic support for multibib package.
The multibib package creates extra aux files that have to separately be
processed by bibtex.
2012-02-29 12:28:33 -07:00
Kenneth Moreland
bc8f67127a Fix corner case when an argument name is a variable.
When parsing arguments, there is an IF statement that compares an
argument to an argument name (such as BIBFILES, IMAGES, etc.).
If there exists a variable with the same name, then the IF statement
will also try to dereference the variable and compare them.  Thus,
if that variable equaled one of the arguments, it would be incorrectly
identified as an argument name.

As an example, consider this CMake code.

set(BIBFILES mydoc.bib)
add_latex_document(mydoc.tex BIBFILES ${BIBFILES})

These arguments, obviously, expand to "mydoc.tex;BIBFILES;mydoc.bib".
When checking the argument mydoc.bib, you would expect it to be
considered an argument to BIBFILES.  However, deep in the call stack
there is an if statement that expands to

IF (BIBFILES STREQUAL mydoc.bib)

Clearly we mean these to be unequal.  But because BIBFILES is also
a variable containing mydoc.bib, CMake considers this to be true.
Thus, UseLATEX though mydoc.bib was the start of a list of bibliography
files rather than a bibliography file itself.

The problem is solved by prepending "non_a_var_" to each string we
are comparing.

IF (not_a_var_BIBFILES STREQUAL not_a_var_mydoc.bib)

This makes it highly unlikely that either side of this comparison
will be a variable that gets expanded.
2011-12-07 08:18:16 -07:00
Kenneth Moreland
2625f1475c Fix problem where ps2pdf was not getting the appropriate arguments. 2011-08-24 08:02:30 -06:00
Kenneth Moreland
364bf7618e Support SyncTeX. 2011-07-19 10:13:00 -06:00
Kenneth Moreland
a9ed0efabe Clean up clean targets.
Add all known auxiliary files that LaTeX generates to the clean target.
Also add the final generated files (dvi, ps, pdf).  Also add these
files to the auxclean target, which differs from the regular clean
in that it does not clean things like images that take a while to
rebuild.
2011-07-07 10:15:37 -06:00
Kenneth Moreland
bd3bff8700 Add support for using xindy to create glossaries. 2011-07-06 12:28:37 -06:00
Kenneth Moreland
62ebec9a8d Update version. 2011-05-09 14:05:45 -06:00
Kenneth Moreland
3bfdd72b59 Clean up contribution for making nomenclature.
These changes include:

* General cleanup of extranous code.
* Remove USE_NOMENCLATURES option.  This mimiced the USE_GLOSSARIES
  option, which is only there for backward compatibility purposes.
* Change USE_NOMENCLATURE to USE_NOMENCL to tie it directly to the
  nomencl package.  This is defensive in case someone wants to use
  a similar nomenclature package with a slightly different name.
2011-05-09 14:00:44 -06:00
Kenneth Moreland
aab88f05a3 Copy .ist files to output directory.
Used for indexing packages like nomencl.
2011-05-09 13:49:11 -06:00
Myles English
079cc1aead Support index building with nomencl package. 2011-05-09 13:36:17 -06:00
Kenneth Moreland
aea2272747 Fix problem with BibTeX copies.
Thanks to Edwin van Leeuwen.
2011-05-04 09:24:53 -06:00
Kenneth Moreland
257044a666 Better document need for relative image paths.
Added a paragraph to the documentation about it and added checks
in the CMake code to warn the user when the rule is violated.
2011-01-25 10:25:15 -07:00
Kenneth Moreland
85fa531f25 Forgot to set the actual version in UseLATEX.cmake. 2011-01-25 10:04:48 -07:00
Kenneth Moreland
ceb3199282 Update version (1.7.4) and attributions. 2011-01-25 09:18:22 -07:00
Raymond Wan
6fabd07b0a Add DEFAULT_SAFEPDF option. 2011-01-25 09:12:36 -07:00
Kenneth Moreland
bef65c7849 Fix some issues with interaction between makeglossaries and bibtex.
Thanks to Mark de Wever.
2010-11-22 16:49:21 -07:00
Kenneth Moreland
4acd876221 Patch from Lukasz Lis to use ps2pdf to convert from eps to pdf instead of ImageMagick because the latter drops the BoundingBox. 2009-09-14 19:55:44 +00:00
Kenneth Moreland
490a439a2b Untabify buffer. 2008-08-25 14:24:46 +00:00
Kenneth Moreland
48a660fc03 Fix some dependency issues. 2008-08-14 20:08:59 +00:00