bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

@include @value and texinfo.tex


From: Joseph S. Myers
Subject: @include @value and texinfo.tex
Date: Fri, 1 Feb 2008 01:11:11 +0000 (UTC)

It is documented that @value references are expanded in the argument
to @include.  While this works with makeinfo, it does not work with
texinfo.tex.  An example of this bug was reported as
<http://gcc.gnu.org/ml/gcc/2008-01/msg00327.html>; the difference
between "I can't find file `'" and mess in the output as symptoms of
the bug relates to whether the particular TeX installation includes a
file called just ".tex".

Here is a self-contained testcase, followed by a possible patch to
cause \input to see an expanded filename.  Two files are needed:
test.texi contains:

======================================================================
\input texinfo   @c -*- texinfo -*-
@c %**start of header
@setfilename test.info
@settitle Test
@c %**end of header

@set incdir include

@copying
Copying
@end copying
@titlepage
@title Test
@author Test

@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage

@contents

@ifnottex
@node Top
@top Test
@insertcopying
@end ifnottex

@menu
* Test:: Test.
@end menu

@node Test
@chapter Test

Test text.

@include @value{incdir}/inc.texi

@bye
======================================================================

and include/inc.texi contains:

======================================================================
Test include.
======================================================================

2008-02-01  Joseph Myers  <address@hidden>

        * doc/texinfo.tex (\includezzz): Expand file name before passing
        to \input.

--- texinfo.tex.orig    2008-02-01 00:54:37.000000000 +0000
+++ texinfo.tex 2008-02-01 00:54:43.000000000 +0000
@@ -924,7 +924,7 @@
   \def\thisfile{#1}%
   {%
     \makevalueexpandable
-    \def\temp{\input #1 }%
+    \edef\temp{\noexpand\input #1 }%
     \expandafter
   }\temp
   \popthisfilestack

-- 
Joseph S. Myers
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]