texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Remove hevea support from texi2dvi


From: Gavin D. Smith
Subject: branch master updated: Remove hevea support from texi2dvi
Date: Sat, 11 Nov 2023 09:08:23 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new f739eca054 Remove hevea support from texi2dvi
f739eca054 is described below

commit f739eca054eb5ca8bfef3e13746569322f827817
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Nov 11 14:07:57 2023 +0000

    Remove hevea support from texi2dvi
    
    * util/texi2dvi (run_hevea, run_tex4ht): Remove.
    (run_tex_suite): Call run_tex directly instead of run_core_conversion.
    (run_core_conversion): Remove.
    
    (top level): Remove options --info, --html, --text, --tex4ht.
    (out_lang_set, out_lang_ext, out_lang_tex):
    Do not recognize "html", "info" or "text".
    (usage): Update usage message.
    
    (latex2html): Remove variable.
    (index_file_p, make_tex_cmd, run_index, run_tex_suite):
    Do not check value of $latex2html.
    
    It did not work at all due to calls to make_tex_cmd in
    run_tex_suite (added 2019-04-08) and in make_openout_text, called
    via decide_aux_files_method (added 2015-09-02).  Even when I
    disabled those calls, there were other errors.  Since nobody
    has complained in 8 years, it is probably not important, and
    it complicates the script significantly anyway, integrated into
    many parts of the code for a very rare if non-existent use case.
---
 ChangeLog     |  25 +++++++++
 util/texi2dvi | 168 ++++++++--------------------------------------------------
 2 files changed, 46 insertions(+), 147 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2d17638df7..f188902cef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2023-11-11  Gavin Smith <gavinsmith0123@gmail.com>
+
+       Remove hevea support from texi2dvi
+
+       * util/texi2dvi (run_hevea, run_tex4ht): Remove.
+       (run_tex_suite): Call run_tex directly instead of run_core_conversion.
+       (run_core_conversion): Remove.
+
+       (top level): Remove options --info, --html, --text, --tex4ht.
+       (out_lang_set, out_lang_ext, out_lang_tex):
+       Do not recognize "html", "info" or "text".
+       (usage): Update usage message.
+
+       (latex2html): Remove variable.
+       (index_file_p, make_tex_cmd, run_index, run_tex_suite):
+       Do not check value of $latex2html.
+
+       It did not work at all due to calls to make_tex_cmd in
+       run_tex_suite (added 2019-04-08) and in make_openout_text, called
+       via decide_aux_files_method (added 2015-09-02).  Even when I
+       disabled those calls, there were other errors.  Since nobody
+       has complained in 8 years, it is probably not important, and
+       it complicates the script significantly anyway, integrated into
+       many parts of the code for a very rare if non-existent use case.
+
 2023-11-11  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/ConvertXS.xs (html_finalize_output_state),
diff --git a/util/texi2dvi b/util/texi2dvi
index b9757b9ddd..a982894676 100755
--- a/util/texi2dvi
+++ b/util/texi2dvi
@@ -56,7 +56,6 @@ quiet=false     # let the tools' message be displayed
 set_language=
 src_specials=
 shell_escape=
-latex2html=hevea  # or set to tex4ht
 textra=         # Extra TeX commands to insert in the input file.
 txiprereq=19990129 # minimum texinfo.tex version with macro expansion
 verb=false      # true for verbose mode
@@ -130,11 +129,8 @@ General options:
 Output format:
       --dvi     output a DVI file [default]
       --dvipdf  output a PDF file via DVI (using a dvi-to-pdf program)
-      --html    output an HTML file from LaTeX, using HeVeA
-      --info    output an Info file from LaTeX, using HeVeA
   -p, --pdf     use pdftex or pdflatex for processing
       --ps      output a PostScript file via DVI (using dvips)
-      --text    output a plain text file from LaTeX, using HeVeA
 
 TeX tuning:
   -E, --expand               macro expansion using makeinfo
@@ -171,8 +167,8 @@ the environment variable TEXI2DVI_BUILD_DIRECTORY.
 The values of these environment variables are used to run the
 corresponding commands, if they are set:
 
-  BIBER BIBTEX DVIPDF DVIPS EGREP HEVEA LATEX MAKEINDEX MAKEINFO
-  PDFLATEX PDFTEX SED T4HT TEX TEX4HT TEXINDEX TEXINDY THUMBPDF_CMD
+  BIBER BIBTEX DVIPDF DVIPS EGREP LATEX MAKEINDEX MAKEINFO
+  PDFLATEX PDFTEX SED TEX TEXINDEX TEXINDY THUMBPDF_CMD
 
 Regarding --dvipdf, if DVIPDF is not set in the environment, the
 following programs are looked for (in this order): dvipdfmx dvipdfm
@@ -455,7 +451,7 @@ list_infix ()
 out_lang_set ()
 {
   case $1 in
-    dvi|dvipdf|html|info|pdf|ps|text) out_lang=$1;;
+    dvi|dvipdf|pdf|ps) out_lang=$1;;
     *) error 1 "invalid output format: $1";;
   esac
 }
@@ -466,7 +462,6 @@ out_lang_tex ()
   case $out_lang in
     dvi | ps | dvipdf ) echo dvi;;
     pdf ) echo $out_lang;;
-    html | info | text ) echo $out_lang;;
     *)    error 1 "invalid out_lang: $1";;
   esac
 }
@@ -476,7 +471,7 @@ out_lang_ext ()
 {
   case $out_lang in
     dvipdf ) echo pdf;;
-    dvi | html | info | pdf | ps | text ) echo $out_lang;;
+    dvi | pdf | ps ) echo $out_lang;;
     *)    error 1 "invalid out_lang: $1";;
   esac
 }
@@ -634,20 +629,12 @@ bibaux_file_p ()
 index_file_p ()
 {
   test -f "$1" || return 0
-  case $in_lang:$latex2html:`out_lang_tex`:`$SED '1q' "$1"` in
-    # When working with TeX4HT, *.idx are created by LaTeX.  They must
-    # be processed to produce *.4ix, *.4dx files.  The *.4dx file is
-    # passed to makeindex to produce the *.ind file.  This sequence is
-    # handled by run_index, so we are only interested in the *.idx
-    # files, which have each "\indexentry" preceded by a
-    # "\beforeentry".
-    latex:tex4ht:html:"\\beforeentry {"*) echo $1;;
-
+  case $in_lang:`$SED '1q' "$1"` in
     # When index.sty is used, there is a space before the brace.
-    latex:*:*:"\\indexentry{"*|latex:*:*:"\\indexentry {"*) echo $1;;
+    latex:"\\indexentry{"*|latex:*:*:"\\indexentry {"*) echo $1;;
 
-    texinfo:*:*:"\\entry{"*) echo $1;;
-    texinfo:*:*:"@entry{"*) echo $1;;
+    texinfo:"\\entry{"*) echo $1;;
+    texinfo:"@entry{"*) echo $1;;
     # @entry is output from newer versions of texinfo.tex
   esac
   return 0
@@ -782,19 +769,19 @@ xref_files_changed ()
 # Set tex_cmd variable, for running TeX.
 make_tex_cmd ()
 {
-  case $in_lang:$latex2html:`out_lang_tex` in
-    latex:*:dvi|latex:tex4ht:html)
+  case $in_lang:`out_lang_tex` in
+    latex:dvi)
         tex=${LATEX:-latex};;
-    latex:*:pdf)
+    latex:pdf)
         tex=${PDFLATEX:-pdflatex};;
-    texinfo:*:dvi)
+    texinfo:dvi)
         # MetaPost also uses the TEX environment variable.  If the user
         # has set TEX=latex for that reason, don't bomb out.
         case $TEX in
           *latex) tex=tex;; # don't bother trying to find etex
                *) tex=$TEX
         esac;;
-    texinfo:*:pdf) tex=$PDFTEX;;
+    texinfo:pdf) tex=$PDFTEX;;
     *) error 1 "$out_lang not supported for $in_lang";;
   esac
 
@@ -974,19 +961,8 @@ run_index ()
   : ${TEXINDEX:=texindex}
   : ${TEXINDY:=texindy}
 
-  case $in_lang:$latex2html:`out_lang_tex` in
-    latex:tex4ht:html)
-      for index_file in $index_files
-      do
-        index_noext=`noext "$index_file"`
-        run tex \
-            '\def\filename{{'"$index_noext"'}{idx}{4dx}{ind}}
-             \input idxmake.4ht'
-        run $MAKEINDEX -o $index_noext.ind $index_noext.4dx
-      done
-      ;;
-
-    latex:*)
+  case $in_lang in
+    latex)
       if $TEXINDY --version >&6 2>&1; then
         run $TEXINDY $index_files
       else
@@ -994,34 +970,13 @@ run_index ()
       fi
       ;;
 
-    texinfo:*)
+    texinfo)
       run $TEXINDEX $index_files
       ;;
   esac
 }
 
 
-# run_tex4ht - Run the last two phases of TeX4HT: tex4ht extracts the
-# HTML from the instrumented DVI file, and t4ht converts the figures and
-# installs the files when given -d.
-#
-# Because knowing exactly which files are created is complex (in
-# addition the names are not simple to compute), which makes it
-# difficult to install the output files in a second step, we
-# tell t4ht to install the output files.
-run_tex4ht ()
-{
-  case $in_lang:$latex2html:`out_lang_tex` in
-    latex:tex4ht:html)
-      : ${TEX4HT:=tex4ht} ${T4HT:=t4ht}
-      run "$TEX4HT" "-f/$in_noext"
-      # Do not remove the / after the destdir.
-      run "$T4HT" "-d`destdir`/" "-f/$in_noext"
-      ;;
-  esac
-}
-
-
 # run_thumbpdf - Run thumbpdf.
 run_thumbpdf ()
 {
@@ -1096,7 +1051,7 @@ run_tex_suite ()
     verbose "Cycle $suite_cycle for $command_line_filename"
 
     tex_failed=false
-    run_core_conversion
+    run_tex
     xref_files_changed || break
     xref_files_save
 
@@ -1116,17 +1071,14 @@ run_tex_suite ()
   # and TeX one last time.
   run_thumbpdf
 
-  # If we are using tex4ht, call it.
-  run_tex4ht
-
   # Install the result if we didn't already (i.e., if the output is
   # dvipdf or ps).
-  case $latex2html:$out_lang in
-    *:dvipdf)
+  case $out_lang in
+    dvipdf)
       run_dvipdf "$in_noext.`out_lang_tex`"
       move_to_dest "$in_noext.`out_lang_ext`"
       ;;
-    *:ps)
+    ps)
       : ${DVIPS:=dvips}
       run $DVIPS -o "$in_noext.`out_lang_ext`" "$in_noext.`out_lang_tex`"
       move_to_dest "$in_noext.`out_lang_ext`"
@@ -1239,20 +1191,6 @@ insert_commands ()
 $textra" "$in_input" >"$in_xtr"
     in_input=$in_xtr
   fi
-
-  case $in_lang:$latex2html:`out_lang_tex` in
-    latex:tex4ht:html)
-      # _tex4ht.  The file with the added \usepackage{tex4ht}.
-      work_tex4ht=$workdir/tex4ht
-      in_tex4ht=$work_tex4ht/$in_base
-      ensure_dir "$work_tex4ht"
-      verbose "Inserting \\usepackage{tex4ht}"
-      perl -pe 's<\\documentclass(?:\[.*\])?{.*}>
-                 <$&\\usepackage[xhtml]{tex4ht}>' \
-        "$in_input" >"$in_tex4ht"
-      in_input=$in_tex4ht
-      ;;
-  esac
 }
 
 
@@ -1278,69 +1216,6 @@ compute_language ()
 }
 
 
-# run_hevea (MODE) - Convert to HTML/INFO/TEXT.
-#
-# Don't pass `-noiso' to hevea: it's useless in HTML since anyway the
-# charset is set to latin1, and troublesome in other modes since
-# accented characters loose their accents.
-#
-# Don't pass `-o DEST' to hevea because in that case it leaves all its
-# auxiliary files there too...  Too bad, because it means we will need
-# to handle images some day.
-run_hevea ()
-{
-  run_hevea_name="${HEVEA:-hevea}"
-  run_hevea_cmd="$run_hevea_name"
-
-  case $1 in
-    html) ;;
-    text|info) run_hevea_cmd="$run_hevea_cmd -$1";;
-    *) error 1 "run_hevea_cmd: invalid argument: $1";;
-  esac
-
-  # Compiling to the tmp directory enables to preserve a previous
-  # successful compilation.
-  run_hevea_cmd="$run_hevea_cmd -fix -O -o '$out_base'"
-  run_hevea_cmd="$run_hevea_cmd `list_prefix includes -I` -I '$orig_pwd' "
-  run_hevea_cmd="$run_hevea_cmd '$rel$in_input'"
-
-  if $debug; then
-    run_hevea_cmd="$run_hevea_cmd -v -v"
-  fi
-
-  verbose "running $run_hevea_cmd"
-  if eval "$run_hevea_cmd" >&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.
-      for file in "$out_base"* ; do
-        move_to_dest "$file"
-      done ;;
-    esac
-  else
-    error 1 "$run_hevea_name exited with bad status, quitting."
-  fi
-}
-
-
-# run_core_conversion - Run TeX (or HeVeA).
-run_core_conversion ()
-{
-  case $in_lang:$latex2html:`out_lang_tex` in
-    *:dvi|*:pdf|latex:tex4ht:html)
-        run_tex;;
-    latex:*:html|latex:*:text|latex:*:info)
-        run_hevea $out_lang;;
-    *)
-        error 1 "invalid input/output combination: $in_lang/$out_lang";;
-  esac
-}
-
-
 # compile - Run the full compilation chain, from pre-processing to
 # installation of the output at its expected location.
 compile ()
@@ -1713,14 +1588,13 @@ while test x"$1" != x"$arg_sep"; do
 
     # Output formats.
     -O|--output-format) shift; out_lang_set "$1";;
-       --dvi|--dvipdf|--html|--info|--pdf|--ps|--text)
+       --dvi|--dvipdf|--pdf|--ps)
        out_lang_set `echo "x$1" | $SED 's/^x--//'`;;
 
     -p) out_lang_set pdf;;
     -q | -s | --quiet | --silent) quiet=true;;
     --src-specials) src_specials=--src-specials;;
     --shell-escape) shell_escape=--shell-escape;;  
-    --tex4ht) latex2html=tex4ht;;
     -t | --texinfo | --command ) shift; textra="$textra\\
 "`echo "$1" | $SED 's/\\\\/\\\\\\\\/g'`;;
     --translate-file ) shift; translate_file="$1";;



reply via email to

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