Public bug reported:
Binary package hint: tetex-bin
We're having a problem with libkpathsea4 from the tetex-bin
package.
libkpathsea4:
Installed: 3.0-27ubuntu1
tetex-bin:
Installed: 3.0-27ubuntu1
When a user specifies an environment variable for a directory
containing tex files, then runs latex to process a file that
references that environment variable, the path to the alternately
located files is not expanded. Latex then returns an error saying that
the referenced file is not found.
Here's how we replicate the problem:
(1) Create a file called test.tex containing the following:
\input{$REFDIR/a.tex}
(2) Create a file called a.tex in another directory containing:
\documentclass{article}
\begin{document}
omghi2u
\end{document}
(3) Export the environment variable REFDIR to the location of you a.tex
file.
(4) Run run latex against test.tex
You should get following error:
! LaTeX Error: File `$REFDIR/a.tex' not found.
Last year when another person from my group worked on this issue, we
got a patch for the file tex-file.c that is part of kpathsea in the
tetex-bin source. Applying the patch below allows these environment
variables to be expanded correctly. Here is the diff that was posted
in the Debian bug 389790. However, I don't believe it has ever made it
into the packages, at least not for Ubuntu, since we had to patch
again after we upgraded to Feisty. Can this be applied for future
versions?
Index: tex-file.c
===================================================================
RCS file: /usr/local/cvsroot/texk/texk/kpathsea/tex-file.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- tex-file.c 26 Aug 2004 21:30:13 -0000 1.69
+++ tex-file.c 21 Jun 2005 12:03:41 -0000 1.70
@@ -1,7 +1,7 @@
/* tex-file.c: high-level file searching by format.
+Copyright (C) 1998-2005 Olaf Weber.
Copyright (C) 1993, 94, 95, 96, 97 Karl Berry.
-Copyright 1998-2004 Olaf Weber.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -742,6 +742,9 @@
DEBUGF3 ("kpse_find_file: searching for %s of type %s (from %s)\n",
name, FMT_INFO.type, FMT_INFO.path_source);
+ /* Do variable and tilde expansion. */
+ name = kpse_expand(name);
+
/* Does NAME already end in a possible suffix? */
name_len = strlen (name);
if (FMT_INFO.suffix) {
@@ -850,6 +853,8 @@
ret = kpse_make_tex (format, name);
}
+ free((void*)name);
+
return ret;
}
** Affects: tetex-bin (Ubuntu)
Importance: Undecided
Status: New
--
libkpathsea4: path expansion when referencing files
https://bugs.launchpad.net/bugs/132738
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs