[texi2dvi from CVS (version 1.135)]

[EMAIL PROTECTED] ... @end tex' sometimes stays commented out if `texi2dvi -E' 
is
called.  For example, this input

  @iftex

  @tex
  \gdef\myfindex#1{\doind{fn}{\code{#1}}\ignorespaces}
  @end tex

  @macro myref{INDEX}
  @myfindex{\INDEX\}
  @ref{\INDEX\}
  @end macro

  @end iftex

looks like this after applying the sed regexp in $comment_iftex:

  @c [EMAIL PROTECTED]
  @c texi2dvi
  @c [EMAIL PROTECTED] [EMAIL PROTECTED]
  @c [EMAIL PROTECTED] 
texi2dvi\gdef\myfindex#1{\doind{fn}{\code{#1}}\ignorespaces}
  @c [EMAIL PROTECTED] [EMAIL PROTECTED] tex
  @c texi2dvi
  @macro myref{INDEX}
  @myfindex{\INDEX\}
  @ref{\INDEX\}
  @end macro
  @c texi2dvi
  @c [EMAIL PROTECTED] iftex

Below is a patch.  BTW, I suggest that it is documented somewhere that
[EMAIL PROTECTED] texi2dvi' starting a line must not be present in the document 
if
option `-E' is used.


    Werner


======================================================================


2008-22-11  Werner Lemberg  <[EMAIL PROTECTED]>

        * util/texi2dvi (uncomment_iftex): Make

          @iftex
          @tex
          ...
          @end tex
          @end iftex

        work with `texi2dvi -E'.


--- texi2dvi.old        2008-09-22 20:28:21.000000000 +0200
+++ texi2dvi    2008-11-22 16:21:39.000000000 +0100
@@ -1141,6 +1141,9 @@
 # Unfortunately makeinfo --iftex --no-ifinfo doesn't work well enough
 # (yet), makeinfo can't parse the TeX commands, so work around with sed.
 #
+# We assume that [EMAIL PROTECTED] texi2dvi' starting a line is not present in 
the
+# document.
+#
 comment_iftex=\
 '/[EMAIL PROTECTED]/,/[EMAIL PROTECTED] tex/{
   s/^/@c texi2dvi/
@@ -1164,7 +1167,7 @@
 s/[EMAIL PROTECTED] ifnotinfo/@c [EMAIL PROTECTED] ifnotinfo/'
 
 # Uncommenting is simple: Remove any leading [EMAIL PROTECTED] texi2dvi'.
-uncomment_iftex='s/[EMAIL PROTECTED] texi2dvi//'
+uncomment_iftex='s/[EMAIL PROTECTED] texi2dvi\(@c texi2dvi\)*//'
 
 
 # run_makeinfo ()


Reply via email to