bug-texinfo
[Top][All Lists]
Advanced

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

[PATCH] @verbatiminclude doesn't work for dvi,ps,pdf


From: Sergey Poznyakoff
Subject: [PATCH] @verbatiminclude doesn't work for dvi,ps,pdf
Date: Sat, 17 Sep 2005 21:33:34 +0300

Hello,

@verbatiminclude doesn't work correctly for dvi, ps, pdf
formats. For example, when including a C source, all curly
braces are missing from ps or pdf output. This is because
`makeinfo --macro-expand', run by texi2dvi to preprocess the
texi input, replaces @verbatiminclude with the file contents,
so that \verbatiminclude from texinfo.tex is not even invoked.

The following patch fixes this:

Index: makeinfo/cmds.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/cmds.c,v
retrieving revision 1.61
diff -p -u -r1.61 cmds.c
--- makeinfo/cmds.c     1 Aug 2005 22:49:37 -0000       1.61
+++ makeinfo/cmds.c     17 Sep 2005 18:06:16 -0000
@@ -1690,10 +1690,19 @@ handle_include (int verbatim_include)
      everything.  TeX will only work with @value.  */
   filename = text_expansion (arg);
   free (arg);
+  
+  if (macro_expansion_output_stream)
+    {
+      if (verbatim_include)
+       {
+         me_append_before_this_command ();
+         return;
+       }
 
-  if (macro_expansion_output_stream && !executing_string)
-    remember_itext (input_text, input_text_offset);
-
+      if (!executing_string)
+       remember_itext (input_text, input_text_offset);
+    }
+  
   pushfile ();
 
   /* In verbose mode we print info about including another file. */


Regards,
Sergey
    




reply via email to

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