texinfo-commits
[Top][All Lists]
Advanced

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

texinfo update (Thu Sep 22 20:22:01 EDT 2005)


From: Karl Berry
Subject: texinfo update (Thu Sep 22 20:22:01 EDT 2005)
Date: Thu, 22 Sep 2005 20:22:05 -0400

Index: ChangeLog
===================================================================
RCS file: /cvsroot/texinfo/texinfo/ChangeLog,v
retrieving revision 1.537
retrieving revision 1.538
diff -c -r1.537 -r1.538
*** ChangeLog   20 Sep 2005 09:58:49 -0000      1.537
--- ChangeLog   23 Sep 2005 00:05:44 -0000      1.538
***************
*** 1,3 ****
--- 1,18 ----
+ 2005-09-22  Akim Demaille  <address@hidden>
+ 
+       * util/texi2dvi ($build_dir): New.
+       (--build-dir): New.
+       ($usage): Adjust.
+       ($line_error): New.
+       AUC-TeX wants regular TeX error messages, so don't require
+       GNU style error message when under AUC-TeX.
+       ($filename_dir_abs): New.
+       ($t2ddir): When the build-dir is specified, make sure to avoid
+       collisions between files with equal names, but in different
+       directories.
+       ($command_line_filename): Decode possible TeX commands.
+       * util/Makefile.am (pdftexi2dvi): New.
+ 
  2005-09-20  Akim Demaille  <address@hidden>
  
        * util/texi2dvi: Be sure to return to the current directory even
Index: NEWS
===================================================================
RCS file: /cvsroot/texinfo/texinfo/NEWS,v
retrieving revision 1.117
retrieving revision 1.118
diff -c -r1.117 -r1.118
*** NEWS        22 Aug 2005 12:06:45 -0000      1.117
--- NEWS        23 Sep 2005 00:05:43 -0000      1.118
***************
*** 1,4 ****
! $Id: NEWS,v 1.117 2005/08/22 12:06:45 karl Exp $
  This NEWS file records noteworthy changes, very tersely.
  See the manual for detailed information.
  
--- 1,4 ----
! $Id: NEWS,v 1.118 2005/09/23 00:05:43 karl Exp $
  This NEWS file records noteworthy changes, very tersely.
  See the manual for detailed information.
  
***************
*** 30,35 ****
--- 30,43 ----
  * texi2dvi:
    . new mode --build=tidy which supports compilation in a separate
      directory, where intermediate files are preserved.
+   . new option --build-dir, to specify where the tidy build will take
+     place, either locally or globally.  This allows avoiding the clutter
+     while preserving auxiliary files.
+   . new support for AUC-TeX: texi2dvi (weakly) supports arguments a la
+     TeX such as `\nonstopmode\input{file.tex}'.
+   . pdftexi2dvi is a new wrapper to `texi2dvi --pdf', equal to texi2pdf,
+     for sake of AUC-TeX which prepends `pdf' to the compilation command
+     when requested to produce PDF.
  * texinfo.tex:
    . new Serbian translation file for texinfo.tex, txi-sr.tex.
    . section names with \ characters work properly in pdf outlines.
Index: util/Makefile.am
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/Makefile.am,v
retrieving revision 1.15
retrieving revision 1.16
diff -c -r1.15 -r1.16
*** util/Makefile.am    5 Aug 2005 09:25:44 -0000       1.15
--- util/Makefile.am    23 Sep 2005 00:05:45 -0000      1.16
***************
*** 1,4 ****
! # $Id: Makefile.am,v 1.15 2005/08/05 09:25:44 kasal Exp $
  # Makefile.am for texinfo/util.
  # Run automake in .. to produce Makefile.in from this.
  #
--- 1,4 ----
! # $Id: Makefile.am,v 1.16 2005/09/23 00:05:45 karl Exp $
  # Makefile.am for texinfo/util.
  # Run automake in .. to produce Makefile.in from this.
  #
***************
*** 11,17 ****
  # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  
  bin_PROGRAMS = ginstall-info texindex
! bin_SCRIPTS = texi2dvi texi2pdf
  
  # Use `ginstall-info' in the definition of PROGRAMS and in dependencies
  # because automake generates an install-info target in every Makefile (a
--- 11,20 ----
  # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  
  bin_PROGRAMS = ginstall-info texindex
! bin_SCRIPTS = texi2dvi texi2pdf pdftexi2dvi
! 
! pdftexi2dvi: texi2dvi
!       cp -f $< $@
  
  # Use `ginstall-info' in the definition of PROGRAMS and in dependencies
  # because automake generates an install-info target in every Makefile (a
Index: util/texi2dvi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.61
retrieving revision 1.62
diff -c -r1.61 -r1.62
*** util/texi2dvi       20 Sep 2005 09:58:50 -0000      1.61
--- util/texi2dvi       23 Sep 2005 00:05:45 -0000      1.62
***************
*** 1,6 ****
  #! /bin/sh
  # texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources.
! # $Id: texi2dvi,v 1.61 2005/09/20 09:58:50 kasal Exp $
  #
  # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001,
  # 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
--- 1,6 ----
  #! /bin/sh
  # texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources.
! # $Id: texi2dvi,v 1.62 2005/09/23 00:05:45 karl Exp $
  #
  # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001,
  # 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
***************
*** 32,38 ****
  unset RUNNING_KSH
  
  # This string is expanded by rcs automatically when this file is checked out.
! rcs_revision='$Revision: 1.61 $'
  rcs_version=`set - $rcs_revision; echo $2`
  program=`echo $0 | sed -e 's!.*/!!'`
  version="texi2dvi (GNU Texinfo 4.8) $rcs_version
--- 32,38 ----
  unset RUNNING_KSH
  
  # This string is expanded by rcs automatically when this file is checked out.
! rcs_revision='$Revision: 1.62 $'
  rcs_version=`set - $rcs_revision; echo $2`
  program=`echo $0 | sed -e 's!.*/!!'`
  version="texi2dvi (GNU Texinfo 4.8) $rcs_version
***************
*** 45,50 ****
--- 45,51 ----
  "
  
  build_mode=${TEXI2DVI_BUILD_MODE:-local}
+ build_dir=${TEXI2DVI_BUILD_DIRECTORY:-.}
  
  usage="Usage: $program [OPTION]... FILE...
  
***************
*** 54,59 ****
--- 55,65 ----
  is used to determine its language ((La)TeX or Texinfo).  To process
  (e)plain TeX files, set the environment variable LATEX=tex.
  
+ In order to make texi2dvi a drop-in replacement of TeX/LaTeX in AUC-TeX,
+ the FILE may also be composed of the following simple TeX commands.
+   \`\\input{FILE}'     the actual file to compile
+   \`\\nonstopmode\     same as --batch
+ 
  Makeinfo is used to perform Texinfo macro expansion before running TeX
  when needed.
  
***************
*** 79,101 ****
     or --texinfo=CMD    multiple values accumulate
  
  Build modes:
!   --build=MODE  specify the treatment of auxiliary files [$build_mode]
!       --tidy    same as --build=tidy
!   -c, --clean   same as --build=clean
  
  The MODE specifies where the TeX compilation takes place, and, as a
  consequence, how auxiliary files are treated.  The build mode
  can also be set using the environment variable TEXI2DVI_BUILD_MODE.
  
  Valid MODEs are:
!   \`local'  compile in the current directory, leaving all the auxiliary
!              files around.
!   \`tidy'   compile in a local *.t2d directory, where the auxiliary files
!              are left.  Output files are copied back to the original file.
!   \`clean'  same as \`tidy', but remove the auxiliary directory afterwards.
!              Every compilation therefore requires the full cycle.
  
  Using the \`tidy' mode brings several advantages:
    - the output file is updated after every succesful TeX run, for
      sake of concurrent visualization of the output.  In a \`local' build
      the viewer stops during the whole TeX run.
--- 85,115 ----
     or --texinfo=CMD    multiple values accumulate
  
  Build modes:
!   --build=MODE         specify the treatment of auxiliary files [$build_mode]
!       --tidy           same as --build=tidy
!   -c, --clean          same as --build=clean
!       --build-dir=DIR  specify where the tidy compilation is performed.
!                        implies --tidy
!                        defaults to TEXI2DVI_BUILD_DIRECTORY [$build_dir]
  
  The MODE specifies where the TeX compilation takes place, and, as a
  consequence, how auxiliary files are treated.  The build mode
  can also be set using the environment variable TEXI2DVI_BUILD_MODE.
  
  Valid MODEs are:
!   \`local'      compile in the current directory, leaving all the auxiliary
!                  files around.  This is the traditional TeX use.
!   \`tidy'       compile in a local *.t2d directory, where the auxiliary files
!                  are left.  Output files are copied back to the original file.
!   \`clean'      same as \`tidy', but remove the auxiliary directory 
afterwards.
!                  Every compilation therefore requires the full cycle.
  
  Using the \`tidy' mode brings several advantages:
+   - the current directory is not cluttered with plethora of temporary files.
+   - clutter can be even reduced using --build-dir=dir: all the *.t2d
+     directories are stored there.
+   - clutter can be reduced to zero using --build-dir=/tmp/\$USER.t2d or
+     --build-dir=$HOME/.t2d.
    - the output file is updated after every succesful TeX run, for
      sake of concurrent visualization of the output.  In a \`local' build
      the viewer stops during the whole TeX run.
***************
*** 121,126 ****
--- 135,141 ----
  # Initialize variables for option overriding and otherwise.
  # Don't use `unset' since old bourne shells don't have this command.
  # Instead, assign them an empty value.
+ line_error=true # Pass --file-line-error to TeX.
  batch=false     # true for batch mode
  debug=false
  escape="\\"
***************
*** 346,351 ****
--- 361,369 ----
      false:) _dest=;;
      *:*)    _dest=$_out_noext.$_file_ext;;
    esac
+   if test ! -f "$1"; then
+     fatal 1 "no such file or directory: $1"
+   fi
    if test -n "$_dest"; then
      verbose "Copying $1 to $_dest"
      cp -p "$1" "$_dest"
***************
*** 386,392 ****
      ensure_dir "$tex_help_dir"
      tex_help=`cd "$tex_help_dir" >&6 && $tex --help </dev/null 2>&1`
    fi
!   case $tex_help in
      *file-line-error*) cmd="$cmd --file-line-error";;
    esac
  
--- 404,410 ----
      ensure_dir "$tex_help_dir"
      tex_help=`cd "$tex_help_dir" >&6 && $tex --help </dev/null 2>&1`
    fi
!   $line_error && case $tex_help in
      *file-line-error*) cmd="$cmd --file-line-error";;
    esac
  
***************
*** 707,712 ****
--- 725,731 ----
      # Silently and without documentation accept -b and --b[atch] as synonyms.
      -b | --b*) batch=true;;
      -c | --c*) build_mode=clean;;
+          --build-dir)  shift; build_dir=$1; build_mode=tidy;;
      -D | --d*) debug=true;;
      -e | -E | --e*) expand=t;;
      -h | --h*) echo "$usage"; exit 0;;
***************
*** 749,756 ****
  # Pop the token
  shift
  
! # clean: remove the t2d directory afterward.
! # tidy:  compile in this t2d directory.
  case $build_mode in
    local) clean=true;  tidy=false;;
    tidy)  clean=false; tidy=true;;
--- 768,775 ----
  # Pop the token
  shift
  
! # $tidy:  compile in a t2d directory.
! # $clean: remove the t2d directory afterward.
  case $build_mode in
    local) clean=true;  tidy=false;;
    tidy)  clean=false; tidy=true;;
***************
*** 851,871 ****
    echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >&6 \
    || command_line_filename="./$command_line_filename"
  
    # See if the file exists.  If it doesn't we're in trouble since, even
    # though the user may be able to reenter a valid filename at the tex
    # prompt (assuming they're attending the terminal), this script won't
    # be able to find the right xref files and so forth.
    if test ! -r "$command_line_filename"; then
!     report "Could not read $command_line_filename, skipping."
      continue
    fi
  
    # Get the name of the current directory.
    filename_dir=`func_dirname "$command_line_filename"`
    # In a clean build, we `cd', so get an absolute file name.
!   case $tidy in
!     true)  filename_dir=`cd "$filename_dir" >&6 && pwd` ;;
!   esac
  
    # Strip directory part but leave extension.
    filename_ext=`basename "$command_line_filename"`
--- 870,905 ----
    echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >&6 \
    || command_line_filename="./$command_line_filename"
  
+   # See if we are run from within AUC-Tex, in which case we are
+   # passed `\input{FOO.tex}' or even `\nonstopmode\input{FOO.tex}'.
+   case $command_line_filename in
+     *\\nonstopmode*)
+       batch=true;;
+   esac
+   case $command_line_filename in
+     *\\input{*}*)
+       # Let AUC-TeX error parser deal with line numbers.
+       line_error=false
+       command_line_filename=`\
+         expr X"$command_line_filename" : X'.*input{\([^}]*\)}'`
+       ;;
+   esac
+ 
    # See if the file exists.  If it doesn't we're in trouble since, even
    # though the user may be able to reenter a valid filename at the tex
    # prompt (assuming they're attending the terminal), this script won't
    # be able to find the right xref files and so forth.
+   pwd
    if test ! -r "$command_line_filename"; then
!     report "cannot read $command_line_filename, skipping."
      continue
    fi
  
    # Get the name of the current directory.
    filename_dir=`func_dirname "$command_line_filename"`
+   filename_dir_abs=`cd "$filename_dir" >&6 && pwd`
    # In a clean build, we `cd', so get an absolute file name.
!   $tidy && filename_dir=$filename_dir_abs
  
    # Strip directory part but leave extension.
    filename_ext=`basename "$command_line_filename"`
***************
*** 879,890 ****
  
    # An auxiliary directory used for all the auxiliary tasks involved
    # in compiling this document.
!   t2ddir=$filename_noext.t2d
    # Remove it at exit if clean mode.
    $clean &&
      trap "cd / && rm -rf $t2ddir" 0 1 2 15
  
!   ensure_dir "$t2ddir"
  
    # We will change directory, better work with an absolute path...
    t2ddir=`cd "$t2ddir" && pwd`
--- 913,930 ----
  
    # An auxiliary directory used for all the auxiliary tasks involved
    # in compiling this document.
!   case $build_dir in
!       '' | . ) t2ddir=$filename_noext.t2d ;;
!       *) # Avoid collisions between multiple occurrences of the same
!        # file.
!        t2ddir=$build_dir/`echo "$filename_dir_abs/" | sed 's,/,!,g'`
!        t2ddir=$t2ddir$filename_noext.t2d;;
!   esac
    # Remove it at exit if clean mode.
    $clean &&
      trap "cd / && rm -rf $t2ddir" 0 1 2 15
  
!   ensure_dir "$build_dir" "$t2ddir"
  
    # We will change directory, better work with an absolute path...
    t2ddir=`cd "$t2ddir" && pwd`
P ChangeLog
P NEWS
P util/Makefile.am
P util/texi2dvi


reply via email to

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