bug-texinfo
[Top][All Lists]
Advanced

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

texi2dvi: More HeVeA support


From: Akim Demaille
Subject: texi2dvi: More HeVeA support
Date: Mon, 23 Jul 2007 15:11:33 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

I hope this can still make it in the future texi2dvi!

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        Use hevea more like we use tex itself, no longer as a tool
        that does everything magically.
        * util/texi2dvi (run_hevea): Remove trailing spaces in the
        output.
        (run_tex_suite): Change to the working directory here, no longer
        in...
        (run_core_conversion): here, so that even when running hevea where
        are in the working directory.
        No longer call cd_orig, do it...
        (run_tex_suite): here.
        (run_hevea): Pass verbose flags to it when --debug.
        (run_tex_suite): Since we now want to run the whole suite of tools,
        including bibtex, with hevea, use run_core_conversion, not
        run_tex.
        (run_core_conversion): Now call run_tex.

Index: util/texi2dvi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.99
diff -u -u -r1.99 texi2dvi
--- util/texi2dvi 1 Jul 2007 22:32:12 -0000 1.99
+++ util/texi2dvi 23 Jul 2007 13:10:36 -0000
@@ -925,6 +925,12 @@
 # Run the TeX tools until a fix point is reached.
 run_tex_suite ()
 {
+  # Move to the working directory.
+  if $tidy; then
+    verbose "cd $work_build"
+    cd "$work_build" || exit 1
+  fi
+
   # Count the number of cycles.
   local cycle=0
 
@@ -939,7 +945,7 @@
     # converse.
     run_bibtex
     run_index
-    run_tex
+    run_core_conversion
 
     xref_files_changed || break
   done
@@ -960,6 +966,8 @@
       move_to_dest "$in_noext.$(out_lang_ext)"
       ;;
   esac
+
+  cd_orig
 }
 
 ## -------------------------------- ##
@@ -1191,8 +1199,16 @@
   run_hevea="$run_hevea `list_prefix includes -I` -I '$orig_pwd' "
   run_hevea="$run_hevea '$in_input'"
 
+  if $debug; then
+    run_hevea="$run_hevea -v -v"
+  fi
+
   verbose "running $run_hevea"
   if eval "$run_hevea" >&5; then
+    # hevea leaves trailing white spaces, this is annoying.
+    case $1 in text|info)
+      perl -pi -e 's/[ \t]+$//g' "$out_base"*;;
+    esac
     case $1 in
     html|text) move_to_dest "$out_base";;
     info) # There can be foo.info-1, foo.info-2 etc.
@@ -1206,25 +1222,17 @@
 
 # run_core_conversion ()
 # ----------------------
-# Run the TeX tools until a fix point is reached.
+# Run the TeX (or HeVeA).
 run_core_conversion ()
 {
-  # Move to the working directory.
-  if $tidy; then
-    verbose "cd $work_build"
-    cd "$work_build" || exit 1
-  fi
-
   case $in_lang:$(out_lang_tex) in
     *:dvi|*:pdf)
-       run_tex_suite;;
+       run_tex;;
     latex:html|latex:text|latex:info)
        run_hevea $out_lang;;
     *)
        error 1 "invalid input/output combination: $in_lang/$out_lang";;
   esac
-
-  cd_orig
 }
 
 
@@ -1264,7 +1272,7 @@
   run_recode
 
   # Run until a fix point is reached.
-  run_core_conversion
+  run_tex_suite
 }
 
 




reply via email to

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