[comp.text.tex] LaTeXinfo Patch - to version 1.3.5

mike@ists.ists.ca (Mike Clarkson) (09/25/90)

Another patch to LaTeXinfo, the program that allows you to create info files
using LaTeX.  This adds back the tail end of the manual that was deleted
by mistake, and fixes a couple of minor bugs.

Mike.


#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# If this archive is complete, you will see the following message at the end:
#		"End of shell archive."
#
# Contents:
#   patch.6
#
# Wrapped by mike@sam.ists.ca on Sat Sep 22 21:07:23 1990
#
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f patch.6 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"patch.6\"
else
echo shar: Extracting \"patch.6\" \(15782 characters\)
sed "s/^X//" >patch.6 <<'END_OF_patch.6'
Xdiff -cr /tmp/old.1.3.4/CHANGES ./CHANGES
X*** /tmp/old.1.3.4/CHANGES	Sat Sep 22 20:45:06 1990
X--- ./CHANGES	Sat Sep 22 21:03:35 1990
X***************
X*** 26,37 ****
X  	Fixed bug in synindex
X  	Fixed the description environment.
X  	Changed the manual to incorporate the proofreading from Nelson Beebe.
X  
X  1.3.3	Fourth Patch - August 30, 1990
X! 	Really added \\ to replace the \* command.
X  
X  1.3.4	Fifth Patch
X  	Documented nodify.el for converting LaTeX files to LaTeXinfo.
X  	Added support for Frenc and German in europe.sty and europe-fmt.el
X! 
X  	
X--- 26,46 ----
X  	Fixed bug in synindex
X  	Fixed the description environment.
X  	Changed the manual to incorporate the proofreading from Nelson Beebe.
X+ 	Made \\ replace \*, although \* is still supported.
X  
X  1.3.3	Fourth Patch - August 30, 1990
X! 	Made \\ active even at other places than the end of line.
X  
X  1.3.4	Fifth Patch
X  	Documented nodify.el for converting LaTeX files to LaTeXinfo.
X  	Added support for Frenc and German in europe.sty and europe-fmt.el
X! 	(thanks to schwarze@isa.de).
X  	
X+ 1.3.5	Sixth Patch
X+ 	If the \?index command and its argument are the only thing on a line,
X+ 	then that line will be deleted in the Info file.
X+ 	Fixed comment-start-skip bug in latexinfomd.el
X+ 	(Thanks to simon@opal.cs.tu-berlin.de).
X+ 	Undeleted the tail end of the manual, which mysteriously
X+ 	disappeared in the last patch. (darrylo@hpnmxx.hp.com)
X+ 
Xdiff -cr /tmp/old.1.3.4/Makefile ./Makefile
X*** /tmp/old.1.3.4/Makefile	Sat Sep 22 20:45:07 1990
X--- ./Makefile	Sat Sep 22 21:03:36 1990
X***************
X*** 36,41 ****
X--- 36,42 ----
X  	manual/latexinfo-ac \
X  	manual/latexinfo-ad \
X  	manual/latexinfo-ae \
X+ 	manual/latexinfo-af \
X  	manual/makeinfo.el \
X  	manual/sample.tex \
X  	manual/texindex.c
Xdiff -cr /tmp/old.1.3.4/latexinfo.el ./latexinfo.el
X*** /tmp/old.1.3.4/latexinfo.el	Sat Sep 22 20:45:08 1990
X--- ./latexinfo.el	Sat Sep 22 21:04:44 1990
X***************
X*** 40,46 ****
X  (put 'latexinfoversion 'latexinfo-format 'latexinfo-format-latexinfoversion)
X  (defun latexinfo-format-latexinfoversion ()
X    (latexinfo-parse-noarg)
X!   (insert "1.3.4"))
X  
X  (defvar latexinfo-format-syntax-table nil)
X  
X--- 40,46 ----
X  (put 'latexinfoversion 'latexinfo-format 'latexinfo-format-latexinfoversion)
X  (defun latexinfo-format-latexinfoversion ()
X    (latexinfo-parse-noarg)
X!   (insert "1.3.5"))
X  
X  (defvar latexinfo-format-syntax-table nil)
X  
X***************
X*** 120,126 ****
X  	(input-directory default-directory))
X      (save-excursion
X        (goto-char (point-min))
X!       (search-forward "\\setfilename")
X        (setq latexinfo-command-end (point))
X        (setq outfile (latexinfo-parse-line-arg)))
X      (find-file outfile)
X--- 120,126 ----
X  	(input-directory default-directory))
X      (save-excursion
X        (goto-char (point-min))
X!       (re-search-forward "^\\\\setfilename")
X        (setq latexinfo-command-end (point))
X        (setq outfile (latexinfo-parse-line-arg)))
X      (find-file outfile)
X***************
X*** 132,138 ****
X      (latexinfo-run-documentstyle-hooks)
X      ;; Run this after latexinfo-run-documentstyle-hooks
X      (goto-char (point-min))
X!     (search-forward "\\setfilename")
X      (beginning-of-line)
X      (delete-region (point-min) (point))
X      ;; Remove \end{document} at end of file, if it is there.
X--- 132,138 ----
X      (latexinfo-run-documentstyle-hooks)
X      ;; Run this after latexinfo-run-documentstyle-hooks
X      (goto-char (point-min))
X!     (re-search-forward "^\\\\setfilename")
X      (beginning-of-line)
X      (delete-region (point-min) (point))
X      ;; Remove \end{document} at end of file, if it is there.
X***************
X*** 196,202 ****
X  	  (goto-char (point-min))
X  	  ;; Initialize the buffer with the filename
X  	  ;; or else explain that a filename is needed.
X! 	  (or (search-forward "\\setfilename"
X  			      (save-excursion (forward-line 100) (point)) t)
X  	      (error "The latexinfo file needs a line saying: \\setfilename <name>"))
X  	  (beginning-of-line)
X--- 196,202 ----
X  	  (goto-char (point-min))
X  	  ;; Initialize the buffer with the filename
X  	  ;; or else explain that a filename is needed.
X! 	  (or (re-search-forward "^\\\\setfilename"
X  			      (save-excursion (forward-line 100) (point)) t)
X  	      (error "The latexinfo file needs a line saying: \\setfilename <name>"))
X  	  (beginning-of-line)
X***************
X*** 309,315 ****
X    (while (search-forward "\\" nil t)
X      (if (looking-at "[@{}'` *%\"\\]")
X  	;; Handle a few special \-followed-by-one-char commands.
X! 	(if (memq (following-char) '(?\* ?\"))
X  	    ;; \* has no effect, since we are not filling.
X  	    ;; \" can't be reproduced on ascii terminals
X  	    (delete-region (1- (point)) (1+ (point)))
X--- 309,315 ----
X    (while (search-forward "\\" nil t)
X      (if (looking-at "[@{}'` *%\"\\]")
X  	;; Handle a few special \-followed-by-one-char commands.
X! 	(if (memq (following-char) '(?\* ?\" ?\\))
X  	    ;; \* has no effect, since we are not filling.
X  	    ;; \" can't be reproduced on ascii terminals
X  	    (delete-region (1- (point)) (1+ (point)))
X***************
X*** 974,979 ****
X--- 974,981 ----
X  (defun latexinfo-index (indexvar)
X    (let ((arg (latexinfo-parse-expanded-arg)))
X      (latexinfo-discard-command)
X+     ;; Delete eol if the index command is the only thing on a line
X+     (if (and (eolp) (bolp) (not (eobp))) (delete-char 1))
X      (set indexvar
X  	 (cons (list arg latexinfo-last-node)
X  	       (symbol-value indexvar)))))
Xdiff -cr /tmp/old.1.3.4/latexinfo.sty ./latexinfo.sty
X*** /tmp/old.1.3.4/latexinfo.sty	Sat Sep 22 20:45:09 1990
X--- ./latexinfo.sty	Sat Sep 22 21:04:10 1990
X***************
X*** 3,9 ****
X  %   Copyright (C) 1985, 1986 Richard M. Stallman
X  %   Copyleft  (C) 1988, 1989, 1990 Michael E. Clarkson
X  
X! \def\latexinfoversion{1.3.4}
X  \message{Loading Latexinfo package [Version \latexinfoversion]:}
X  \message{}
X  
X--- 3,9 ----
X  %   Copyright (C) 1985, 1986 Richard M. Stallman
X  %   Copyleft  (C) 1988, 1989, 1990 Michael E. Clarkson
X  
X! \def\latexinfoversion{1.3.5}
X  \message{Loading Latexinfo package [Version \latexinfoversion]:}
X  \message{}
X  
Xdiff -cr /tmp/old.1.3.4/latexinfomd.el ./latexinfomd.el
X*** /tmp/old.1.3.4/latexinfomd.el	Sat Aug 25 00:27:58 1990
X--- ./latexinfomd.el	Sat Sep 22 21:04:02 1990
X***************
X*** 152,162 ****
X    (make-local-variable 'comment-start)
X    (setq comment-start "\\c ")
X    (make-local-variable 'comment-start-skip)
X!   (setq comment-start-skip "\\c +")
X    (run-hooks 'text-mode-hook 'latexinfo-mode-hook))
X  
X  (defvar latexinfo-heading-pattern
X!   "^\\\\\\(chapter\\|appendix\\|sect\\|sub\\|heading\\|major\\|node\\)"
X    "This is a regular expression to match Latexinfo lines that are chapter
X  or sections headings or like such.")
X  
X--- 152,162 ----
X    (make-local-variable 'comment-start)
X    (setq comment-start "\\c ")
X    (make-local-variable 'comment-start-skip)
X!   (setq comment-start-skip "\\\\c +")
X    (run-hooks 'text-mode-hook 'latexinfo-mode-hook))
X  
X  (defvar latexinfo-heading-pattern
X!   "^\\\\\\(chapter\\|appendix\\|sect\\|sub\\|heading\\|node\\)"
X    "This is a regular expression to match Latexinfo lines that are chapter
X  or sections headings or like such.")
X  
XCommon subdirectories: /tmp/old.1.3.4/manual and ./manual
Xdiff -cr /tmp/old.1.3.4/manual/latexinfo.tex ./manual/latexinfo.tex
X*** /tmp/old.1.3.4/manual/latexinfo.tex	Sat Sep 22 20:45:13 1990
X--- ./manual/latexinfo.tex	Sat Sep 22 21:04:54 1990
X***************
X*** 172,186 ****
X  To make the printed manual, the \LaTeX info source file is processed by the
X  \LaTeX\ typesetting program; the resulting DVI file can be typeset and
X  printed as a book.  To make the on--line help file, the \LaTeX info source
X! file is by processed the \kbd{M-x latexinfo-format-buffer} command from
X! within GNU Emacs; the resulting Info file should then be installed in the
X  \file{info} directory.\refill
X  
X! Since the \LaTeX info source file is used for a dual task---to create both
X! the on--line help and the printed manual---it must be written in a special
X! format that uses commands (words preceded by a \samp{\back }) to
X! indicate chapters, sections, nodes, examples, index entries and the
X! like.\refill
X  
X  Before writing a \LaTeX info source file, you should be familiar with the
X  on--line Info documentation reading program.  (\inforef{Info, info, info},
X--- 172,186 ----
X  To make the printed manual, the \LaTeX info source file is processed by the
X  \LaTeX\ typesetting program; the resulting DVI file can be typeset and
X  printed as a book.  To make the on--line help file, the \LaTeX info source
X! file is by processed the\\
X! \kbd{M-x latexinfo-format-buffer} command from within GNU Emacs; the 
X! resulting Info file should then be installed in the 
X  \file{info} directory.\refill
X  
X! Since the \LaTeX info source file is used for a dual task, to create both
X! the on--line help and the printed manual, it must be written in a special
X! format that uses commands (words preceded by a \samp{\back }) to indicate
X! chapters, sections, nodes, examples, index entries and the like.\refill
X  
X  Before writing a \LaTeX info source file, you should be familiar with the
X  on--line Info documentation reading program.  (\inforef{Info, info, info},
X***************
X*** 372,377 ****
X--- 372,378 ----
X  \cindex{Syntactic conventions}
X  \cindex{Conventions, syntactic}
X  
X+ 
X  \LaTeX info files are made up of a subset of \LaTeX\ constructs.  The strict
X  limits make it possible for \LaTeX info files to be understood both by 
X  \LaTeX\ and by the code which converts them into Info files.
X***************
X*** 425,432 ****
X  \end{verbatim}
X  
X  \noindent
X! The \samp{\back documentstyle[12pt,latexinfo]\{book\}} line tells \LaTeX\
X! to use the \file{latexinfo.sty} and \file{book.sty} style files.  The
X  \code{\back pagestyle\{headings\}} command is the \LaTeX\ command to put
X  the chapter and section headings and page numbers at the top of each page.
X  The \code{\back begin\{document\}} command starts the document, and makes
X--- 426,434 ----
X  \end{verbatim}
X  
X  \noindent
X! The \samp{\back documentstyle[12pt,latexinfo]\{book\}} line tells \LaTeX\ to
X! use the\\
X! \file{latexinfo.sty} and \file{book.sty} style files.  The
X  \code{\back pagestyle\{headings\}} command is the \LaTeX\ command to put
X  the chapter and section headings and page numbers at the top of each page.
X  The \code{\back begin\{document\}} command starts the document, and makes
X***************
X*** 435,441 ****
X  preamble between the \samp{\back documentstyle} and \code{\back
X  begin\{document\}} commands.) This line must be followed (sooner or later)
X  by the \samp{\back setfilename\{\var{info-file-name}\}}. It is is needed to
X! provide a name for the Info file to output to.\refill
X  
X  \node A Short Sample LaTeXinfo File, Beginning a LaTeXinfo File, General Syntactic Conventions, Overview of LaTeXinfo
X  \section{A Short Sample LaTeXinfo File}
X--- 437,444 ----
X  preamble between the \samp{\back documentstyle} and \code{\back
X  begin\{document\}} commands.) This line must be followed (sooner or later)
X  by the \samp{\back setfilename\{\var{info-file-name}\}}. It is is needed to
X! provide a name for the Info file to output to. The \code{\back setfilename}
X! command \emph{must} occur at the beginning of a line.\refill
X  
X  \node A Short Sample LaTeXinfo File, Beginning a LaTeXinfo File, General Syntactic Conventions, Overview of LaTeXinfo
X  \section{A Short Sample LaTeXinfo File}
X***************
X*** 769,778 ****
X  \noindent
X  This command specifies the name of the Info file to be generated.  In
X  fact, there can be other things in the file before this line, but they
X! are ignored in the generation of an Info file.  The line containing the
X! \code{\back setfilename} is ignored when a printed manual is generated.
X! Any \LaTeX\ commands that precede the \code{\back setfilename} are
X! ignored by the Info formatting program.
X   
X  \node Copying Permissions for Info, The Top Node and Master Menu, Setfilename, Beginning a LaTeXinfo File
X  \section{Copying Permissions for Info}
X--- 772,783 ----
X  \noindent
X  This command specifies the name of the Info file to be generated.  In
X  fact, there can be other things in the file before this line, but they
X! are ignored in the generation of an Info file.  The \code{\back setfilename}
X! command \emph{must} occur at the beginning of a line, and
X! the line containing the \code{\back setfilename} is ignored when a
X! printed manual is generated.  Any \LaTeX\ commands that precede the
X! \code{\back setfilename} are ignored by the Info formatting program. 
X! \refill
X   
X  \node Copying Permissions for Info, The Top Node and Master Menu, Setfilename, Beginning a LaTeXinfo File
X  \section{Copying Permissions for Info}
X***************
X*** 1088,1093 ****
X--- 1093,1104 ----
X  \cindex{Defining the entries of an index}
X  \cindex{Index entries}
X  \cindex{Entries for an index}
X+ \findex{cindex}
X+ \findex{findex}
X+ \findex{vindex}
X+ \findex{pindex}
X+ \findex{kindex}
X+ \findex{tindex}
X  
X  The data to make an index comes from many individual commands scattered
X  throughout the \LaTeX info source file.  Each command says to add one entry to
X***************
X*** 1127,1133 ****
X  \LaTeX info file.  Fortunately, this constraint is a feature rather than loss
X  since it means that the index will be easy to use.  Otherwise, it can be
X  easy to create an index which has many pages listed for an entry and you
X! don't know which one you need.\refill
X  
X  You are not actually required to use indices for their canonical
X  purposes.  For example, you might wish to index some C preprocessor macros.
X--- 1138,1146 ----
X  \LaTeX info file.  Fortunately, this constraint is a feature rather than loss
X  since it means that the index will be easy to use.  Otherwise, it can be
X  easy to create an index which has many pages listed for an entry and you
X! don't know which one you need.  If the index command and its argument are
X! the only thing on a line, then that line will be deleted in the Info file.
X! \refill
X  
X  You are not actually required to use indices for their canonical
X  purposes.  For example, you might wish to index some C preprocessor macros.
X***************
X*** 4998,5000 ****
X--- 5011,5069 ----
X  
X  The \code{nodify-file} command makes each chapter, section, subsection and
X  subsubsection a node, with the node-name being the same as the the name of
X+ that particular section.  It also creates menus for the begining of the
X+ \code{chapters} and \code{sections}.
X+ 
X+ To use \code{nodify.el}, you must use GNU Emacs to edit the file
X+ that you want to convert.  Visit a new buffer.
X+ 
X+ \begin{example}
X+ \ctrl{X} \ctrl{F} new-file-name.tex
X+ \end{example}
X+ \noindent
X+ Include your \LaTeX\ file.  
X+ 
X+ \begin{example}
X+ \ctrl{X} \ctrl{I} old-file-name.tex
X+ \end{example}
X+ \noindent
X+ Load the \code{nodify.el} file.
X+ 
X+ \begin{example}
X+ \kbd{Meta-x load-file} \key{RET}
X+ nodify.el \key{RET}
X+ \end{example}
X+ \noindent
X+ Execute \code{nodify-file}.
X+ 
X+ \begin{example}
X+ \kbd{Meta-x nodify-file} \key{RET}
X+ \end{example}
X+ 
X+ Add \code{latexinfo} to the \code{documentstyle} options, add the
X+ \code{setfilename} command in the beginning of the file, and you should have
X+ a complete \LaTeX info file.
X+ 
X+ 
X+ \begin{tex}
X+ \bibliography{latexinfo}
X+ \end{tex}
X+ 
X+ \twocolumn
X+ \node Command Index, Concept Index, Converting TeXinfo Files into LaTeXinfo Files, Top
X+ \unnumbered{Command Index}
X+ \cindex{Command Index}
X+ 
X+ (When used in a \LaTeX info file, commands are preceded by an
X+ \samp{\back }.)\refill
X+ 
X+ \printindex{fn}
X+ 
X+ \onecolumn
X+ \node Concept Index, , Command Index, Top
X+ \unnumbered{Concept Index}
X+ \cindex{Concept Index}
X+ 
X+ \printindex{cp}
X+ 
X+ \end{document}
END_OF_patch.6
if test 15782 -ne `wc -c <patch.6`; then
    echo shar: \"patch.6\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of shell archive.
exit 0
-- 
Mike Clarkson					mike@ists.ists.ca
Institute for Space and Terrestrial Science	uunet!attcan!ists!mike
York University, North York, Ontario,		FORTRAN - just say no. 
CANADA M3J 1P3					+1 (416) 736-5611