[comp.emacs] LaTeXinfo - 3 of 10

mike@ists.ists.ca (Mike Clarkson) (06/03/90)

#! /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
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 2 (of 9)."
# Contents:  COPYING latexinfo-mode.el latexinfo.sty scheme-fmt.el
#   tex-to-latexinfo.el
# Wrapped by mike@sam on Sat Jun  2 18:18:09 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'COPYING' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'COPYING'\"
else
echo shar: Extracting \"'COPYING'\" \(7742 characters\)
sed "s/^X//" >'COPYING' <<'END_OF_FILE'
X		 GNU EMACS GENERAL PUBLIC LICENSE
X		    (Clarified 11 Feb 1988)
X
X Copyright (C) 1985, 1987, 1988 Richard M. Stallman
X Everyone is permitted to copy and distribute verbatim copies
X of this license, but changing it is not allowed.  You can also
X use this wording to make the terms for other programs.
X
X  The license agreements of most software companies keep you at the
Xmercy of those companies.  By contrast, our general public license is
Xintended to give everyone the right to share GNU Emacs.  To make
Xsure that you get the rights we want you to have, we need to make
Xrestrictions that forbid anyone to deny you these rights or to ask you
Xto surrender the rights.  Hence this license agreement.
X
X  Specifically, we want to make sure that you have the right to give
Xaway copies of Emacs, that you receive source code or else can get it
Xif you want it, that you can change Emacs or use pieces of it in new
Xfree programs, and that you know you can do these things.
X
X  To make sure that everyone has such rights, we have to forbid you to
Xdeprive anyone else of these rights.  For example, if you distribute
Xcopies of Emacs, you must give the recipients all the rights that you
Xhave.  You must make sure that they, too, receive or can get the
Xsource code.  And you must tell them their rights.
X
X  Also, for our own protection, we must make certain that everyone
Xfinds out that there is no warranty for GNU Emacs.  If Emacs is
Xmodified by someone else and passed on, we want its recipients to know
Xthat what they have is not what we distributed, so that any problems
Xintroduced by others will not reflect on our reputation.
X
X  Therefore we (Richard Stallman and the Free Software Fundation,
XInc.) make the following terms which say what you must do to be
Xallowed to distribute or change GNU Emacs.
X
X			COPYING POLICIES
X
X  1. You may copy and distribute verbatim copies of GNU Emacs source code
Xas you receive it, in any medium, provided that you conspicuously and
Xappropriately publish on each copy a valid copyright notice "Copyright
X(C) 1988 Free Software Foundation, Inc." (or with whatever year is
Xappropriate); keep intact the notices on all files that refer to this
XLicense Agreement and to the absence of any warranty; and give any
Xother recipients of the GNU Emacs program a copy of this License
XAgreement along with the program.  You may charge a distribution fee
Xfor the physical act of transferring a copy.
X
X  2. You may modify your copy or copies of GNU Emacs source code or
Xany portion of it, and copy and distribute such modifications under
Xthe terms of Paragraph 1 above, provided that you also do the following:
X
X    a) cause the modified files to carry prominent notices stating
X    that you changed the files and the date of any change; and
X
X    b) cause the whole of any work that you distribute or publish,
X    that in whole or in part contains or is a derivative of GNU Emacs
X    or any part thereof, to be licensed at no charge to all third
X    parties on terms identical to those contained in this License
X    Agreement (except that you may choose to grant more extensive
X    warranty protection to some or all third parties, at your option).
X
X    c) if the modified program serves as a text editor, cause it when
X    started running in the simplest and usual way, to print an
X    announcement including a valid copyright notice "Copyright (C)
X    1988 Free Software Foundation, Inc." (or with the year that is
X    appropriate), saying that there is no warranty (or else, saying
X    that you provide a warranty) and that users may redistribute the
X    program under these conditions, and telling the user how to view a
X    copy of this License Agreement.
X
X    d) You may charge a distribution fee for the physical act of
X    transferring a copy, and you may at your option offer warranty
X    protection in exchange for a fee.
X
XMere aggregation of another unrelated program with this program (or its
Xderivative) on a volume of a storage or distribution medium does not bring
Xthe other program under the scope of these terms.
X
X  3. You may copy and distribute GNU Emacs (or a portion or derivative of it,
Xunder Paragraph 2) in object code or executable form under the terms of
XParagraphs 1 and 2 above provided that you also do one of the following:
X
X    a) accompany it with the complete corresponding machine-readable
X    source code, which must be distributed under the terms of
X    Paragraphs 1 and 2 above; or,
X
X    b) accompany it with a written offer, valid for at least three
X    years, to give any third party free (except for a nominal
X    shipping charge) a complete machine-readable copy of the
X    corresponding source code, to be distributed under the terms of
X    Paragraphs 1 and 2 above; or,
X
X    c) accompany it with the information you received as to where the
X    corresponding source code may be obtained.  (This alternative is
X    allowed only for noncommercial distribution and only if you
X    received the program in object code or executable form alone.)
X
XFor an executable file, complete source code means all the source code for
Xall modules it contains; but, as a special exception, it need not include
Xsource code for modules which are standard libraries that accompany the
Xoperating system on which the executable file runs.
X
X  4. You may not copy, sublicense, distribute or transfer GNU Emacs
Xexcept as expressly provided under this License Agreement.  Any attempt
Xotherwise to copy, sublicense, distribute or transfer GNU Emacs is void and
Xyour rights to use GNU Emacs under this License agreement shall be
Xautomatically terminated.  However, parties who have received computer
Xsoftware programs from you with this License Agreement will not have
Xtheir licenses terminated so long as such parties remain in full compliance.
X
X  5. If you wish to incorporate parts of GNU Emacs into other free programs
Xwhose distribution conditions are different, write to the Free Software
XFoundation.  We have not yet worked out a simple rule that can be stated
Xhere, but we will often permit this.  We will be guided by the two goals of
Xpreserving the free status of all derivatives of our free software and of
Xpromoting the sharing and reuse of software.
X
XYour comments and suggestions about our licensing policies and our
Xsoftware are welcome!  Please contact the Free Software Foundation, Inc.,
X675 Mass Ave, Cambridge, MA 02139, or call (617) 876-3296.
X
X			   NO WARRANTY
X
X  BECAUSE GNU EMACS IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
XNO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW.  EXCEPT
XWHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC,
XRICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE GNU EMACS "AS IS"
XWITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
XBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
XFITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY
XAND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE GNU EMACS
XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
XSERVICING, REPAIR OR CORRECTION.
X
X IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL FREE SOFTWARE
XFOUNDATION, INC., RICHARD M. STALLMAN, AND/OR ANY OTHER PARTY WHO MAY
XMODIFY AND REDISTRIBUTE GNU EMACS AS PERMITTED ABOVE, BE LIABLE TO YOU
XFOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR OTHER
XSPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
XINABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
XBEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A
XFAILURE OF THE PROGRAM TO OPERATE WITH PROGRAMS NOT DISTRIBUTED BY
XFREE SOFTWARE FOUNDATION, INC.) THE PROGRAM, EVEN IF YOU HAVE BEEN
XADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY
XOTHER PARTY.
END_OF_FILE
if test 7742 -ne `wc -c <'COPYING'`; then
    echo shar: \"'COPYING'\" unpacked with wrong size!
fi
# end of 'COPYING'
fi
if test -f 'latexinfo-mode.el' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'latexinfo-mode.el'\"
else
echo shar: Extracting \"'latexinfo-mode.el'\" \(6995 characters\)
sed "s/^X//" >'latexinfo-mode.el' <<'END_OF_FILE'
X;; Major mode for editing latexinfo files.
X;; Copyright (C) 1985, 1988 Free Software Foundation, Inc.
X
X;; This file is part of GNU Emacs.
X
X;; GNU Emacs is distributed in the hope that it will be useful,
X;; but WITHOUT ANY WARRANTY.  No author or distributor
X;; accepts responsibility to anyone for the consequences of using it
X;; or for whether it serves any particular purpose or works at all,
X;; unless he says so in writing.  Refer to the GNU Emacs General Public
X;; License for full details.
X
X;; Everyone is granted permission to copy, modify and redistribute
X;; GNU Emacs, but only under the conditions described in the
X;; GNU Emacs General Public License.   A copy of this license is
X;; supposed to have been given to you along with GNU Emacs so you
X;; can know your rights and responsibilities.  It should be in a
X;; file named COPYING.  Among other things, the copyright notice
X;; and this notice must be preserved on all copies.
X
X
X(defvar latexinfo-mode-syntax-table nil)
X
X(if latexinfo-mode-syntax-table
X    nil
X  (setq latexinfo-mode-syntax-table (make-syntax-table))
X  (modify-syntax-entry ?\" " " latexinfo-mode-syntax-table)
X  (modify-syntax-entry ?@ " " latexinfo-mode-syntax-table)
X  (modify-syntax-entry ?\\ "\\" latexinfo-mode-syntax-table)
X  (modify-syntax-entry ?\^q "\\" latexinfo-mode-syntax-table)
X  (modify-syntax-entry ?\[ "(]" latexinfo-mode-syntax-table)
X  (modify-syntax-entry ?\] ")[" latexinfo-mode-syntax-table)
X  (modify-syntax-entry ?{ "(}" latexinfo-mode-syntax-table)
X  (modify-syntax-entry ?} "){" latexinfo-mode-syntax-table)
X  (modify-syntax-entry ?\' "w" latexinfo-mode-syntax-table))
X
X(defvar latexinfo-mode-map nil)
X
X(if latexinfo-mode-map
X    nil
X  (setq latexinfo-mode-map (make-sparse-keymap))
X  (define-key latexinfo-mode-map "\C-c\C-f" 'latexinfo-format-region)
X  (define-key latexinfo-mode-map "\C-c\C-s" 'latexinfo-show-structure)
X  (define-key latexinfo-mode-map "\e}"          'up-list)
X  (define-key latexinfo-mode-map "\e{"          'latexinfo-insert-braces)
X  (define-key latexinfo-mode-map "\C-c\C-cv"    'latexinfo-insert-var)
X  (define-key latexinfo-mode-map "\C-c\C-cs"    'latexinfo-insert-samp)
X  (define-key latexinfo-mode-map "\C-c\C-cn"    'latexinfo-insert-node)
X  (define-key latexinfo-mode-map "\C-c\C-ci"    'latexinfo-insert-item)
X  (define-key latexinfo-mode-map "\C-c\C-ce"    'latexinfo-insert-end)
X  (define-key latexinfo-mode-map "\C-c\C-cd"    'latexinfo-insert-dfn)
X  (define-key latexinfo-mode-map "\C-c\C-cc"    'latexinfo-insert-code))
X
X(defun latexinfo-insert-var ()
X  "Insert the string \\var{} in a latexinfo buffer."
X  (interactive)
X  (insert "\\var{}")
X  (backward-char))
X
X(defun latexinfo-insert-samp ()
X  "Insert the string \\samp{} in a latexinfo buffer."
X  (interactive)
X  (insert "\\samp{}")
X  (backward-char))
X
X(defun latexinfo-insert-node ()
X  "Insert the string \\node in a latexinfo buffer, 
Xalong with a comment indicating the arguments to \\node."
X  (interactive)
X  (insert "\\node     \n\\comment  node-name,  next,  previous,  up")
X  (forward-line -1)
X  (forward-char 6))
X
X(defun latexinfo-insert-item ()
X  "Insert the string \\item in a latexinfo buffer."
X  (interactive)
X  (insert "\\item")
X  (newline))
X
X(defun latexinfo-insert-end ()
X  "Insert the string \\end{} in a latexinfo buffer."
X  (interactive)
X  (insert "\\end{}"))
X
X(defun latexinfo-insert-dfn ()
X  "Insert the string \\dfn{} in a latexinfo buffer."
X  (interactive)
X  (insert "\\dfn{}")
X  (backward-char))
X
X(defun latexinfo-insert-code ()
X  "Insert the string \\code{} in a latexinfo buffer."
X  (interactive)
X  (insert "\\code{}")
X  (backward-char))
X
X(defun latexinfo-insert-braces ()
X  "Make a pair of braces and be poised to type inside of them.
XUse \\[up-list] to move forward out of the braces."
X  (interactive)
X  (insert "{}")
X  (backward-char))
X
X(defun latexinfo-mode ()
X  "Major mode for editing latexinfo files.
X
X  It has these extra commands:
X\\{latexinfo-mode-map}
X
X  These are files that are used as input for LaTeX to make printed manuals
Xand also to be turned into Info files by \\[latexinfo-format-buffer].
XThese files must be written in a very restricted and modified version
Xof TeX input format.
X
X  Editing commands are like text-mode except that the syntax table is
Xset up so expression commands skip Latexinfo bracket groups.  To see
Xwhat the Info version of a region of the Latexinfo file will look like,
Xuse \\[latexinfo-format-region].  This command runs Info on the current region
Xof the Latexinfo file and formats it properly.
X
X  You can show the structure of a Latexinfo file with \\[latexinfo-show-structure].
XThis command shows the structure of a Latexinfo file by listing the
Xlines with the commands for \\node, \\chapter, \\section and the
Xlike.  These lines are displayed in another window called the *Occur*
Xwindow.  In that window, you can position the cursor over one of the
Xlines and use \\[occur-mode-goto-occurrence], to jump to the
Xcorresponding spot in the Latexinfo file.
X
X  In addition, Latexinfo mode provides commands that insert various
Xfrequently used commands into the buffer.  You can use these
Xcommands to save keystrokes.  And you can insert balanced braces with
X\\[latexinfo-insert-braces] and later use the command \\[up-list] to
Xmove forward past the closing brace.
X
XEntering Latexinfo mode calls the value of text-mode-hook, and then the
Xvalue of latexinfo-mode-hook."
X  (interactive)
X  (text-mode)
X  (setq mode-name "Latexinfo")
X  (setq major-mode 'latexinfo-mode)
X  (use-local-map latexinfo-mode-map)
X  (set-syntax-table latexinfo-mode-syntax-table)
X  (make-local-variable 'require-final-newline)
X  (setq require-final-newline t)
X  (make-local-variable 'paragraph-separate)
X  (setq paragraph-separate (concat "^\b\\|^\\\\[a-zA-Z{}]*[ \n]\\|" paragraph-separate))
X  (make-local-variable 'paragraph-start)
X  (setq paragraph-start    (concat "^\b\\|^\\\\[a-zA-Z{}]*[ \n]\\|" paragraph-start))
X  (make-local-variable 'fill-column)
X  (setq fill-column 72)
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
Xor sections headings or like such.")
X
X(defun latexinfo-show-structure () 
X  "Show the structure of a Latexinfo file by listing the lines with the
Xcommands for \\node, \\chapter, \\section and the like.  Lines
Xwith structuring commands in them are displayed in another window
Xcalled the *Occur* window.  In that window, you can position the
Xcursor over one of the lines and use \\[occur-mode-goto-occurrence],
Xto jump to the corresponding spot in the Latexinfo file."
X  (interactive)
X  (save-excursion 
X    (goto-char (point-min))
X    (occur latexinfo-heading-pattern))
X  (pop-to-buffer "*Occur*")
X  (goto-char (point-min))
X  (flush-lines "-----"))
X
END_OF_FILE
if test 6995 -ne `wc -c <'latexinfo-mode.el'`; then
    echo shar: \"'latexinfo-mode.el'\" unpacked with wrong size!
fi
# end of 'latexinfo-mode.el'
fi
if test -f 'latexinfo.sty' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'latexinfo.sty'\"
else
echo shar: Extracting \"'latexinfo.sty'\" \(18555 characters\)
sed "s/^X//" >'latexinfo.sty' <<'END_OF_FILE'
X%% TeX macros to handle latexinfo files
X%% \include{ 5 page GNU copyleft here }
X%   Copyright (C) 1985, 1986 Richard M. Stallman
X%   Copyleft  (0) 1988, 1989 Michael E. Clarkson
X
X\def\latexinfoversion{1.2}
X\message{Loading Latexinfo package [Version \latexinfoversion]:}
X\message{}
X
X\setcounter{tocdepth}{2}
X\setcounter{secnumdepth}{3}
X
X\def\oddfoot#1{\def\@oddfoot{#1}}
X\def\evenfoot#1{\def\@evenfoot{#1}}
X
X% Save some parts of plain tex whose names we will redefine.
X
X\let\ptexlbrace=\{
X\let\ptexrbrace=\}
X\let\ptexdot=\.
X\let\ptexstar=\*
X\let\ptexend=\end
X\let\ptexbullet=\bullet
X\let\ptexb=\b
X\let\ptexc=\c
X\let\ptexi=\i
X\let\ptext=\t
X\let\ptexl=\l
X\let\ptexL=\L
X\def\pline{\hbox to\hsize}
X\def\pleftline#1{\pline{#1\hss}}
X\def\prightline#1{\pline{\hss#1}}
X
X\def\centerline#1{\pline{\hss#1\hss}}
X
X\def\tie{\penalty 10000\ }     % Save plain tex definition of ~.
X
X\let\normal=\normalsize
X
X\message{Basics,}
X\chardef\other=12
X
X\hyphenation{ap-pen-dix}
X\hyphenation{mini-buf-fer mini-buf-fers}
X
X% Parse an argument, then pass it to #1.
X% The argument can be delimited with [...] or with "..." or braces
X% or it can be a whole line.
X% #1 should be a macro which expects
X% an ordinary undelimited TeX argument.
X
X\def\parsearg #1{\let\next=#1\begingroup\obeylines\futurelet\temp\parseargx}
X
X\def\parseargx{%
X\ifx \obeyedspace\temp \aftergroup\parseargdiscardspace \else%
X\aftergroup \parseargline %
X\fi \endgroup}
X
X{\obeyspaces %
X\gdef\parseargdiscardspace {\begingroup\obeylines\futurelet\temp\parseargx}}
X
X\gdef\obeyedspace{\ }
X
X\def\parseargline{\begingroup \obeylines \parsearglinex}
X{\obeylines %
X\gdef\parsearglinex #1^^M{\endgroup \next {#1}}}
X
X\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
X
X% Single-spacing is done by various environments.
X
X\newskip\singlespaceskip
X\singlespaceskip = \baselineskip
X\def\singlespace{%
X{\advance \baselineskip by -\singlespaceskip
X\kern \baselineskip}%
X\baselineskip=\singlespaceskip
X}
X
X\def\arrow{$\rightarrow$}
X
X% Used to generate quoted braces.
X
X\def\mylbrace {{\tt \char '173}}
X\def\myrbrace {{\tt \char '175}}
X\let\{=\mylbrace
X\let\}=\myrbrace
X
X% \: forces normal size whitespace following.
X\def\:{\spacefactor=1000 }
X
X% \* forces a line break.
X\def\*{\hfil\break}
X
X% \. is an end-of-sentence period.
X\def\.{.\spacefactor=3000 }
X
X% \w prevents a word break
X\def\w#1{\hbox{#1}}
X
X% \br   forces paragraph break
X
X\let\br = \par
X
X% \dots{}  output some dots
X
X\def\dots{$\ldots$}
X
X% \page    forces the start of a new page
X%\def\page{\clearpage}
X
X% \exdent text....
X% outputs text on separate line in roman font, starting at standard page margin
X
X\def\exdent{\errmessage{@exdent in filled text}}
X  % \lisp, etc, define \exdent locally from \internalexdent
X
X{\obeyspaces
X\gdef\internalexdent{\parsearg\exdentzzz}}
X
X\def\exdentzzz #1{{\advance \leftskip by -\lispnarrowing
X\advance \hsize by -\leftskip
X\advance \hsize by -\rightskip
X\leftline{{\rm#1}}}}
X
X% \sp n   outputs n lines of vertical space
X\def\sp#1{\par\vskip #1\baselineskip\relax}
X
X% \comment ...line which is ignored...
X% \c is the same as @comment
X% \begin{ignore} ... \end{ignore}  is another way to write a comment
X\def\comment{\parsearg \commentxxx}
X
X\def\commentxxx #1{}
X
X\let\c=\comment
X
X% Some texinfo constructs that are trivial in tex
X\newenvironment{iftex}{}{}
X
X\catcode`@=11
X
X\message{menus,}
X{\catcode`\^^M=13 \gdef\@gobblecr{\@ifnextchar
X{\@gobble}{\ignorespaces}}}
X
X\chardef\active=13
X
X{\catcode`\ =\active\gdef\@vobeyspaces{\catcode`\ \active \let \@xobeysp}}
X 
X\begingroup \catcode `|=0 \catcode `[= 1
X\catcode`]=2 \catcode `\{=12 \catcode `\}=12
X\catcode`\\=12 
X|gdef|@xmenu#1\end{menu}[|end[menu]]
X|gdef|@xifinfo#1\end{ifinfo}[|end[ifinfo]]
X|gdef|@xignore#1\end{ignore}[|end[ignore]]
X|endgroup
X
X\def\@menu{\begingroup
X\@tempswafalse 
X\def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par}
X\obeylines \let\do\@makeother \dospecials}
X
X\def\menu{\@menu\@xmenu }
X\let\endmenu=\endgroup
X\def\ifinfo{\@menu\@xifinfo }
X\let\endifinfo=\endgroup
X\def\ignore{\@menu\@xignore }
X\let\endignore=\endgroup
X
X\def\node{\parsearg\nodezzz}
X\def\nodezzz#1{\nodexxx [#1,]}
X\def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
X%\def\node#1#2#3#4{\gdef\lastnode{#1}}
X\let\lastnode=\relax
X
X
X\let\refill=\relax
X
X\let\setfilename=\comment
X
X\def\inforef #1{\inforefzzz #1,,,,**}
X\def\inforefzzz #1,#2,#3,#4**{See Info file \file{\losespace#3{}}, node `\losespace#1{}'}
X\def\losespace #1{#1}
X
X\message{fonts,}
X
X% Font-change commands.
X
X\def\li{\sf}
X
X%% Add scribe-like font environments, plus \l for inline lisp (usually sans
X%% serif) and \ii for TeX italic
X
X\def\i#1{{\sl #1}}
X\let\var=\i
X\let\dfn=\i
X\let\emph=\i
X
X\def\b#1{{\bf #1}}
X\let\strong=\b
X
X\def\t#1{{\tt \rawbackslash #1}\null}
X\let\ttfont=\t
X\let\kbd=\t
X\let\code=\t
X\def\samp#1{`{\tt \rawbackslash #1}'\null}
X\def\key#1{{\tt \uppercase{#1}}\null}
X\def\ctrl#1{$\uparrow${\tt #1}}
X
X\let\file=\samp
X
X\def\l#1{{\li #1}\null}
X
X\def\r#1{{\rm #1}}
X\def\s#1{{\sc #1}}
X\def\ii#1{{\it #1}}
X
X\def\bullet{$\ptexbullet$}
X\def\labelitemi{$\ptexbullet$}
X
X\def\minus{$-$}
X
X% Make altmode in file print out right
X
X\catcode `\^^[=\active \def^^[{$\diamondsuit$}
X
X\message{indexing,}
X% Index generation facilities
X
X% Define the texinfo user-accessible indexing commands for backwrds 
X% compatability.
X
X\def\findex{\fnindex}
X\def\kindex{\kyindex}
X\def\cindex{\cpindex}
X\def\vindex{\vrindex}
X\def\tindex{\tpindex}
X\def\pindex{\pgindex}
X\def\cindex{\cpindex}
X
X
X% \newindex {foo} defines an index named foo.
X% It automatically defines \fooindex such that
X% \fooindex ...rest of line... puts an entry in the index foo.
X% It also defines \fooindfile to be the number of the output channel for
X% the file that	accumulates this index.  The file's extension is foo.
X% The name of an index should be no more than 2 characters long
X% for the sake of vms.
X
X\def\newindex#1{\csname newindex#1\endcsname}
X
X% Yes I know this could be done shorter, but safer??
X
X\def\newindexcp{\if@filesw \newwrite\@cpindexfile
X  \immediate\openout\@cpindexfile=\jobname.cp
X  \def\cpindex{\@bsphack\begingroup
X             \def\protect####1{\string####1\space}\@sanitize
X             \@wrindex\@cpindexfile}%
X  \def\cpsubindex{\@bsphack\begingroup
X             \def\protect####1{\string####1\space}\@sanitize
X             \@wrsubindex\@cpindexfile}%
X  \def\cpindexbold{\@bsphack\begingroup
X             \def\protect####1{\string####1\space}\@sanitize
X             \@wrindexbold\@cpindexfile}
X   \typeout{Writing concepts index file \jobname.cp }%
X   \fi}
X
X\def\cpindex{\@bsphack\begingroup \@sanitize\@index}
X\def\cpsubindex{\@bsphack\begingroup \@sanitize\@index}
X\def\cpindexbold{\@bsphack\begingroup \@sanitize\@index}
X
X\def\@wrindex#1#2{\let\thepage\relax
X   \xdef\@gtempa{\write#1{\string \entry{#2}{\thepage}{#2}}}\endgroup\@gtempa
X   \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
X
X\def\@wrindexbold#1#2{\let\thepage\relax \let\bf\relax
X   \xdef\@gtempa{\write#1{\string \entry{#2}{\b{\thepage}}{#2}}}\endgroup\@gtempa
X   \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
X
X\def\@wrsubindex#1#2#3{\let\thepage\relax
X	\xdef\@gtempa{\write#1{\string \entry{#2 #3}{\thepage}{#2}{#3}}}\endgroup%
X	\@gtempa
X   \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
X
X\def\@index#1{\endgroup\@esphack}
X
X\def\pgindex{\@bsphack\begingroup \@sanitize\@index}
X\def\newindexpg{\if@filesw \newwrite\@pgindexfile
X  \immediate\openout\@pgindexfile=\jobname.pg
X  \def\pgindex{\@bsphack\begingroup
X             \def\protect####1{\string####1\space}\@sanitize
X             \@wrindex\@pgindexfile}\typeout{Writing index file \jobname.pg }\fi}
X
X\def\newindexvr{\if@filesw \newwrite\@vrindexfile
X  \immediate\openout\@vrindexfile=\jobname.vr
X  \def\vrindex{\@bsphack\begingroup
X             \def\protect####1{\string####1\space}\@sanitize
X             \@wrindex\@vrindexfile}
X  \def\vrindexbold{\@bsphack\begingroup
X             \def\protect####1{\string####1\space}\@sanitize
X             \@wrindexbold\@vrindexfile}
X	\typeout{Writing variable index file \jobname.vr }\fi}
X
X\def\vrindex{\@bsphack\begingroup \@sanitize\@index}
X\def\vrindexbold{\@bsphack\begingroup \@sanitize\@index}
X
X\def\newindextp{\if@filesw \newwrite\@tpindexfile
X  \immediate\openout\@tpindexfile=\jobname.tp
X  \def\tpindex{\@bsphack\begingroup
X             \def\protect####1{\string####1\space}\@sanitize
X             \@wrindex\@tpindexfile}
X	\typeout{Writing datatype index file \jobname.tp }\fi}
X
X\def\tpindex{\@bsphack\begingroup \@sanitize\@index}
X
X\def\newindexky{\if@filesw \newwrite\@kyindexfile
X  \immediate\openout\@kyindexfile=\jobname.ky
X  \def\kyindex{\@bsphack\begingroup
X             \def\protect####1{\string####1\space}\@sanitize
X             \@wrindex\@kyindexfile}\typeout{Writing key index file \jobname.ky }\fi}
X
X\def\kyindex{\@bsphack\begingroup \@sanitize\@index}
X
X\def\newindexfn{\if@filesw \newwrite\@fnindexfile
X  \immediate\openout\@fnindexfile=\jobname.fn
X  \def\fnindex{\@bsphack\begingroup
X             \def\protect####1{\string####1\space}\@sanitize
X             \@wrindex\@fnindexfile}
X  \def\fnindexbold{\@bsphack\begingroup
X             \def\protect####1{\string####1\space}\@sanitize
X             \@wrindexbold\@fnindexfile}
X	\typeout{Writing function index file \jobname.fn }\fi}
X
X\def\fnindex{\@bsphack\begingroup \@sanitize\@index}
X
X
X% \synindex{foo}{bar}    makes index foo feed into index bar.
X\def\synindex#1#2{\expandafter\xdef \csname @#1index\endcsname{%
X	\noexpand\csname @#2index\endcsname}%
X\expandafter \chardef \csname @#1indfile\endcsname=\csname @#2indfile\endcsname}
X
X
X% Define the macros used in formatting output of the sorted index material.
X% This is what you call to cause a particular index to get printed.
X% Write
X% \section*{Function Index}
X% \printindex{fn}
X
X\newskip\secondaryindent
X\secondaryindent=0.5cm
X
X%\catcode`\%=\other\catcode`\&=\other\catcode`\#=\other
X%\catcode`\@=\other\catcode`\$=\other\catcode`\_=\other
X%\catcode`\~=\other\catcode`\^=\other
X%\tex %
X%\catcode`\%=\other\catcode`\&=\other\catcode`\#=\other
X%\catcode`\@=\other\catcode`\$=\other\catcode`\_=\other
X%\catcode`\~=\other\catcode`\^=\other
X
X\def\printindex#1{
X\def\indexbackslash{\rawbackslashxx}
X\tolerance=9500 \advance\baselineskip -1pt
X\openin 1 \jobname.#1s
X\ifeof 1 \else \closein 1 \input \jobname.#1s
X\fi
X}
X
X% These macros are used by the sorted index file itself.
X% Change them to control the appearance of the index.
X
X\def\Dotsbox{\hbox to 1em{\hss.\hss}} % Used by index macros
X
X\def\initial#1{%
X{\bigbreak\pline{\large\bf#1\hfill}\kern 2pt\penalty3000}}
X
X\def\entry #1#2{
X{\parfillskip=0in \parskip=0in \parindent=0in \small
X\hangindent=1in \hangafter=1%
X\noindent\hbox{#1}\leaders\Dotsbox\hskip 0pt plus 1filll\relax #2\par
X}}
X
X\def\primary #1{\pline{\small#1\hfil}}
X
X\def\secondary #1#2{
X{\parfillskip=0in \parskip=0in \small
X\hangindent =1in \hangafter=1
X\noindent\hskip\secondaryindent\hbox{#1}\leaders\Dotsbox\hskip 0pt plus 1filll#2\par
X}}
X
X%%% Args are the skip and penalty (usually negative)
X\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
X
X\message{environments,}
X
X% \begin{tex} ... \end{tex}    escapes into raw Tex temporarily.
X
X\def\tex{\begingroup
X\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
X\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
X\catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
X\catcode `\%=14
X\catcode`\"=12
X\catcode`\|=12
X\catcode`\<=12
X\catcode`\>=12
X
X\let\{=\ptexlbrace
X\let\}=\ptexrbrace
X\let\.=\ptexdot
X\let\*=\ptexstar
X\let\bullet=\ptexbullet
X\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl
X\let\L=\ptexL
X
X\let\endtex=\endgroup}
X
X% Define \lisp ... \endlisp.
X% \lisp does a \begingroup so it can rebind things,
X% including the definition of \endlisp (which normally is erroneous).
X
X% Amount to narrow the margins by for \lisp.
X\newskip\lispnarrowing \lispnarrowing=\parindent
X
X% This is the definition that ^M gets inside \lisp
X% phr: changed space to \null, to avoid overfull hbox problems.
X{\obeyspaces%
X\gdef\lisppar{\null\endgraf}}
X
X% Cause \obeyspaces to make each Space cause a word-separation
X% rather than the default which is that it acts punctuation.
X% This is because space in tt font looks funny.
X{\obeyspaces %
X\gdef\sepspaces{\def {\ }}}
X
X\newskip\aboveenvskipamount \aboveenvskipamount= 0pt
X\def\aboveenvbreak{{\advance\aboveenvskipamount by \parskip
X\endgraf \ifdim\lastskip<\aboveenvskipamount
X\removelastskip \penalty-50 \vskip\aboveenvskipamount \fi}}
X
X\def\afterenvbreak{\endgraf \ifdim\lastskip<\aboveenvskipamount
X\removelastskip \penalty-50 \vskip\aboveenvskipamount \fi}
X
X\newenvironment{example}{\aboveenvbreak
X	\hfuzz=12truept % Don't be fussy
X	\sepspaces % Make spaces be word-separators rather than space tokens.
X	\singlespace % Single space lines
X	% The following causes blank lines not to be ignored
X	% by adding a space to the end of each line.
X	\let\par=\lisppar
X	\parskip=0pt \advance \rightskip by \lispnarrowing 
X	\advance \leftskip by \lispnarrowing
X	\parindent=0pt
X	\let\exdent=\internalexdent
X	\obeyspaces \obeylines \tt \rawbackslash \bgroup\samepage
X	\def\next##1{}\next}{\egroup\afterenvbreak}
X
X%same is the same as an enclosed \samepage
X\newenvironment{same}{\bgroup\samepage}{\egroup}
X
X% This is \begin{display}; same as \begin{lisp} except use roman font.
X
X\newenvironment{display}{\aboveenvbreak
X	% Make spaces be word-separators rather than space tokens.
X	\sepspaces %
X	% Single space lines
X	\singlespace %
X	% The following causes blank lines not to be ignored
X	% by adding a space to the end of each line.
X	\let\par=\lisppar
X	\parskip=0pt \advance \rightskip by \lispnarrowing 
X	\advance \leftskip by \lispnarrowing
X	\parindent=0pt
X	\let\exdent=\internalexdent
X	\obeyspaces \obeylines
X		\def\next##1{}\next}{\afterenvbreak}
X
X% This is \format; same as \lisp except use roman font and don't narrow margins
X
X\newenvironment{format}{\aboveenvbreak
X	% Make spaces be word-separators rather than space tokens.
X	\sepspaces %
X	\singlespace %
X	% The following causes blank lines not to be ignored
X	% by adding a space to the end of each line.
X	\let\par=\lisppar
X	\parskip=0pt \parindent=0pt
X	\obeyspaces \obeylines
X	\def\next##1{}\next}{\afterenvbreak}
X
X\message{cross reference,}
X% Define cross-reference macros
X
X% \xref and \pxref generate cross references to specified points.
X
X\def\pxref #1{see \xrefX [#1,,,,,,,]}
X\def\xref #1{See \xrefX [#1,,,,,,,]}
X
X%\def\xrefX [#1,#2,#3,#4,#5,#6]{section \ref{#1} [%
X%{\setbox0=\hbox{\losespace#3{}}%
X%\ifdim \wd0 =0pt \losespace#1{}\else\unhbox0\fi}],
X%page\tie \pageref{#1}}
X
X\def\xrefX [#1,#2,#3,#4,#5,#6]{%
X\setbox1=\hbox{\i{\losespace#5{}}}%
X\setbox0=\hbox{\losespace#3{}}%
X\ifdim \wd0 =0pt \setbox0=\hbox{\losespace#1{}}\fi%
X\ifdim \wd1 >0pt%
Xsection \unhbox0{} in \unhbox1%
X\else%
X\ref{#1} [\unhbox0], page\tie \pageref{#1}%
X\fi }
X
X\message{sectioning,}
X% Define chapters, sections, etc.
X
X\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
X \refstepcounter{chapter}
X\ifx\lastnode\relax\else\label{\lastnode}\fi
X\let\lastnode=\relax
X \typeout{\@chapapp\space\thechapter.}
X \addcontentsline{toc}{chapter}{\protect
X \numberline{\thechapter}#1}\else
X \addcontentsline{toc}{chapter}{#1}\fi
X \chaptermark{#1}
X \addtocontents{lof}{\protect\addvspace{10pt}}
X\addtocontents{lot}{\protect\addvspace{10pt}} \if@twocolumn
X\@topnewpage[\@makechapterhead{#2}] 
X \else \@makechapterhead{#2}
X \@afterheading \fi} 
X\def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]
X \else \@makeschapterhead{#1} 
X \@afterheading\fi}
X
X\def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
X     \def\@svsec{}\else 
X     \refstepcounter{#1}
X\ifx\lastnode\relax\else\label{\lastnode}\fi
X\let\lastnode=\relax
X	\edef\@svsec{\csname the#1\endcsname\hskip 1em }\fi
X     \@tempskipa #5\relax
X      \ifdim \@tempskipa>\z@ 
X        \begingroup #6\relax
X          \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}
X        \endgroup
X       \csname #1mark\endcsname{#7}\addcontentsline
X         {toc}{#1}{\ifnum #2>\c@secnumdepth \else
X                      \protect\numberline{\csname the#1\endcsname}\fi
X                    #7}\else
X        \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname
X                      {#7}\addcontentsline
X                           {toc}{#1}{\ifnum #2>\c@secnumdepth \else
X                             \protect\numberline{\csname the#1\endcsname}\fi
X                       #7}}\fi
X     \@xsect{#5}}
X
X\def\smallbook{
X\global\lispnarrowing = 0.3in
X\global\baselineskip 12pt
X\global\parskip 3pt plus 1pt
X\global\hsize = 5in
X\global\doublecolumnhsize=2.4in \global\doublecolumnvsize=15.0in
X\global\vsize=7.5in
X\global\tolerance=700
X\global\hfuzz=1pt
X
X\global\pagewidth=\hsize
X\global\pageheight=\vsize
X\global\font\ninett=cmtt9
X
X\global\let\smalllisp=\smalllispx
X\global\let\smallexample=\smalllispx
X\global\def\Esmallexample{\Esmalllisp}
X}
X
X%% For a final copy, take out the rectangles
X%% that mark overfull boxes (in case you have decided
X%% that the text looks ok even though it passes the margin).
X\def\finalout{\overfullrule=0pt}
X
X\message{and turning on texinfo input format.}
X
X{\catcode`\@=0
X
X% \rawbackslashxx output one backslash character in current font
X{\catcode`\\=\other
X@gdef@rawbackslashxx{\}}
X
X% \rawbackslash redefines \ as input to do \rawbackslashxx.
X{\catcode`\\=\active
X@gdef@rawbackslash{@let\=@rawbackslashxx }}
X}
X
X% \back outputs one backslash in fixed width font.
X\gdef\back{\tt\rawbackslashxx\ignorespaces}
X
X\def\document{\endgroup
X  \@colht\textheight  \@colroom\textheight \vsize\textheight
X   \columnwidth\textwidth \@clubpenalty\clubpenalty
X   \if@twocolumn \advance\columnwidth -\columnsep 
X      \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue 
X   \fi
X  \hsize\columnwidth \linewidth\hsize
X  \begingroup\@floatplacement\@dblfloatplacement
X   \makeatletter\let\@writefile\@gobbletwo
X   \@input{\jobname.aux}\endgroup 
X  \if@filesw \immediate\openout\@mainaux=\jobname.aux
X    \immediate\write\@mainaux{\relax}\fi
X  \def\do##1{\let ##1\@notprerr}
X  \@preamblecmds
X  \let\do\noexpand
X\@normalsize\everypar{}\nospecials}
X
X
X% Here is a list of the characters that have been specially catcoded:
X\def\dosomespecials{\do\$\do\&\do\#\do\%\do\~\do\^}
X
X{\catcode`\"=\active
X\catcode`\>=\active
X\catcode`\<=\active
X\catcode`\_=\active
X\gdef\nospecials{
X\catcode`\"=\active
X\gdef\activedoublequote{{\tt \char '042}}
X\let"=\activedoublequote
X\catcode`\>=\active
X\gdef\activegtr{{\tt \char '076}}
X\let>=\activegtr
X\catcode`\<=\active
X\gdef\activeless{{\tt \char '074}}
X\let<=\activeless
X\catcode`\_=\active
X\gdef\activeunderscore{{\tt \char '137}}
X\let_=\activeunderscore
X\@noligs\let\do\@makeother \dosomespecials}
X}
END_OF_FILE
if test 18555 -ne `wc -c <'latexinfo.sty'`; then
    echo shar: \"'latexinfo.sty'\" unpacked with wrong size!
fi
# end of 'latexinfo.sty'
fi
if test -f 'scheme-fmt.el' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scheme-fmt.el'\"
else
echo shar: Extracting \"'scheme-fmt.el'\" \(9574 characters\)
sed "s/^X//" >'scheme-fmt.el' <<'END_OF_FILE'
X(require 'latexinfo)
X
X(defun scheme-fmt-hook ()
X  (message "Running Scheme formatting hooks...") (sit-for 1)
X  (let ((case-fold-search nil)
X	(alist scheme-alist))
X    (strip-percents)
X    (setq alist scheme-delete-list)
X    (while alist
X      (goto-char (point-min))
X      (delete-matching-lines (car alist))
X      (setq alist (cdr alist)))
X
X    (setq alist scheme-alist)
X    (while alist
X      (goto-char (point-min))
X      (replace-regexp (car (car alist)) (cdr (car alist)) nil)
X      (setq alist (cdr alist))))
X  (message "Running Scheme formatting hooks... done.") (sit-for 1)
X  )
X
X(setq scheme-alist
X      '(
X	("{ }" . "{}")
X	("{\\\\it " . "\\\\i{")
X	("{\\\\tt " . "\\\\code{")
X	("{\\\\tt(" . "\\\\code{(")
X	("\\\\item \\[" . "\\\\item[")
X	("\\\\vest " . "")
X	("{\\\\cf " . "\\\\code{")
X	("{\\\\em " . "\\\\b{")
X	("{\\\\em{}" . "\\\\b{")
X	("\\\\verb|#|" . "#")
X	("\\\\#{}" . "#")
X	("\\\\#" . "#")
X
X	("\\\\nopagebreak{}" . "")
X	("\\\\nopagebreak" . "")
X	("\\\\unsection{}" . "")
X	("\\\\unsection" . "")
X	("\\\\unpenalty{}" . "")
X	("\\\\unpenalty" . "")
X	("\\\\nobreak{}" . "")
X	("\\\\nobreak" . "")
X	("\\\\rm." . ".")
X	
X	("\\\\lambdaexp{}" . "lambda expression")
X	("\\\\lambdaexp" . "lambda expression")
X	("\\\\Lambdaexp{}" . "Lambda expression")
X	("\\\\Lambdaexp" . "Lambda expression")
X	("\\\\exprtype" . "syntax")
X	
X	("^\\\\proto{\\(.*\\)}{\\(.*\\)}{\\([^}]*\\)}" .
X	 "\\\\head{\\1}{}{\\3}
X{(\\\\fb{\\1}\\2)}")
X
X	("^\\\\vproto{\\(.*\\)}{\\([^}]*\\)}" .
X	 "\\\\head{\\1}{}{\\2}
X{\\\\vb{\\1}}")
X
X	("^\\\\pproto{\\(.*\\)}{\\([^}]*\\)}" .
X	 "\\\\head{}{}{\\2}
X{\\1}")
X
X	("^\\\\rproto{\\(.*\\)}{\\(.*\\)}{\\(.*\\)}$" .
X	 "\\\\head{\\1}{}{\\3}
X{(\\\\code{\\1}\\2)}")
X	
X	("\\\\dotsfoo{}" . "\\\\dots{}")
X	("\\\\dotsfoo" . "\\\\dots")
X
X	("\\\\schfalse{}" . "\\\\code{#f}")
X	("\\\\schfalse" . "\\\\code{#f}")
X	("\\\\schtrue{}" . "\\\\code{#t}")
X	("\\\\schtrue" . "\\\\code{#t}")
X	("\\\\backquote{}" . "`")
X	("\\\\backquote" . "`")
X	("\\\\backwhack{}" . "\\\\back")
X	("\\\\backwhack" . "\\\\back")
X	("\\\\atsign" . "@")
X	("\\\\sharpsign" . "#")
X	("\\\\verticalbar" . "|")
X	("~\\\\cite{" . " \\\\cite{")
X	))
X
X(setq scheme-delete-list
X      '())
X
X(defun strip-percents ()
X  (while (search-forward "%" nil t)
X    (forward-char -1)
X    (if (bobp)
X	(kill-line nil)
X	(if (save-excursion
X	      (forward-char -1)
X	      (looking-at "\\\\"))
X	    (forward-char 1)
X	  (kill-line nil)))))
X
X(put 'meta 'texinfo-format 'latexinfo-hyper)
X(put 'hyper 'texinfo-format 'latexinfo-hyper)
X(defun latexinfo-hyper ()
X  (insert "\\var{<" (texinfo-parse-arg-discard) ">}")
X  (goto-char texinfo-command-start))
X
X(put 'hyperi 'texinfo-format 'latexinfo-hyperi)
X(defun latexinfo-hyperi ()
X  (insert "\\var{<" (texinfo-parse-arg-discard) "-1>}")
X  (goto-char texinfo-command-start))
X
X(put 'hyperii 'texinfo-format 'latexinfo-hyperii)
X(defun latexinfo-hyperii ()
X  (insert "\\var{<" (texinfo-parse-arg-discard) "-2>}")
X  (goto-char texinfo-command-start))
X
X(put 'hyperj 'texinfo-format 'latexinfo-hyperj)
X(defun latexinfo-hyperj ()
X  (insert "\\var{<" (texinfo-parse-arg-discard) "-i>}")
X  (goto-char texinfo-command-start))
X
X(put 'hypern 'texinfo-format 'latexinfo-hypern)
X(defun latexinfo-hypern ()
X  (insert "\\var{<" (texinfo-parse-arg-discard) "-n>}")
X  (goto-char texinfo-command-start))
X
X(put 'vari 'texinfo-format 'latexinfo-vari)
X(defun latexinfo-vari ()
X  (insert "\\var{" (texinfo-parse-arg-discard) "-1}")
X  (goto-char texinfo-command-start))
X
X(put 'varii 'texinfo-format 'latexinfo-varii)
X(defun latexinfo-varii ()
X  (insert "\\var{" (texinfo-parse-arg-discard) "-2}")
X  (goto-char texinfo-command-start))
X
X(put 'variii 'texinfo-format 'latexinfo-variii)
X(defun latexinfo-variii ()
X  (insert "\\var{" (texinfo-parse-arg-discard) "-3}")
X  (goto-char texinfo-command-start))
X
X(put 'variv 'texinfo-format 'latexinfo-variv)
X(defun latexinfo-variv ()
X  (insert "\\var{" (texinfo-parse-arg-discard) "-4}")
X  (goto-char texinfo-command-start))
X
X(put 'varj 'texinfo-format 'latexinfo-varj)
X(defun latexinfo-varj ()
X  (insert "\\var{" (texinfo-parse-arg-discard) "-i}")
X  (goto-char texinfo-command-start))
X
X(put 'varn 'texinfo-format 'latexinfo-var-n)
X(defun latexinfo-var-n ()
X  (insert "\\var{" (texinfo-parse-arg-discard) "-n}")
X  (goto-char texinfo-command-start))
X
X(put 'vr 'texinfo-format 'latexinfo-vr)
X(defun latexinfo-vr ()
X  (insert "\\var{" (texinfo-parse-arg-discard) "}")
X  (goto-char texinfo-command-start))
X
X(put 'vri 'texinfo-format 'latexinfo-vri)
X(defun latexinfo-vri ()
X  (insert "\\var{" (texinfo-parse-arg-discard) "-1}")
X  (goto-char texinfo-command-start))
X
X(put 'vrii 'texinfo-format 'latexinfo-vrii)
X(defun latexinfo-vrii ()
X  (insert "\\var{" (texinfo-parse-arg-discard) "-2}")
X  (goto-char texinfo-command-start))
X
X(put 'vriii 'texinfo-format 'latexinfo-vriii)
X(defun latexinfo-vriii ()
X  (insert "\\var{" (texinfo-parse-arg-discard) "-3}")
X  (goto-char texinfo-command-start))
X
X(put 'vriv 'texinfo-format 'latexinfo-vriv)
X(defun latexinfo-vriv ()
X  (insert "\\var{" (texinfo-parse-arg-discard) "-4}")
X  (goto-char texinfo-command-start))
X
X(put 'vrj 'texinfo-format 'latexinfo-vrj)
X(defun latexinfo-vrj ()
X  (insert "\\var{" (texinfo-parse-arg-discard) "-i}")
X  (goto-char texinfo-command-start))
X
X(put 'vrn 'texinfo-format 'latexinfo-vr-n)
X(defun latexinfo-vr-n ()
X  (insert "\\var{" (texinfo-parse-arg-discard) "-n}")
X  (goto-char texinfo-command-start))
X
X(put 'defining 'texinfo-format 'latexinfo-defining)
X(defun latexinfo-defining ()
X  (insert "\\emph{" (texinfo-parse-arg-discard) "}")
X  (goto-char texinfo-command-start))
X
X(put 'ide 'texinfo-format 'texinfo-format-noop)
X
X(put 'mainschindex 'texinfo-format 'texinfo-parse-arg-discard)
X(put 'mainindex 'texinfo-format 'texinfo-parse-arg-discard)
X(put 'schindex 'texinfo-format 'texinfo-parse-arg-discard)
X(put 'sharpindex 'texinfo-format 'texinfo-parse-arg-discard)
X(put 'index 'texinfo-format 'texinfo-parse-arg-discard)
X
X(put 'domain 'texinfo-format 'texinfo-format-noop)
X(put 'nodomain 'texinfo-format 'texinfo-parse-arg-discard)
X(put 'todo 'texinfo-format 'texinfo-parse-arg-discard)
X
X(put 'ev 'texinfo-format 'latexinfo-format-ev)
X
X(defun latexinfo-format-ev ()
X  (texinfo-parse-noarg)
X  (insert "        => "))
X
X(put 'lev 'texinfo-format 'latexinfo-format-lev)
X(defun latexinfo-format-lev ()
X  (texinfo-parse-noarg)
X  (insert "\n    => "))
X
X(put 'unspecified 'texinfo-format 'latexinfo-format-unspecified)
X(defun latexinfo-format-unspecified ()
X  (texinfo-parse-noarg)
X  (insert "\\emph{unspecified}")
X  (goto-char texinfo-command-start))
X
X(put 'error 'texinfo-format 'latexinfo-format-error)
X(defun latexinfo-format-error ()
X  (texinfo-parse-noarg)
X  (insert "\\emph{error}"))
X
X(put 'schemenoindent 'texinfo-format 'texinfo-format-schemenoindent)
X(defun texinfo-format-schemenoindent ()
X  (texinfo-push-stack 'example nil)
X  (texinfo-discard-line))
X
X(put 'schemenoindent 'texinfo-end 'texinfo-end-schemenoindent)
X(defun texinfo-end-schemenoindent ()
X  (texinfo-discard-command)
X  (let ((stacktop
X	 (texinfo-pop-stack 'example)))
X    (texinfo-do-itemize (nth 1 stacktop))))
X
X(put 'tabular 'texinfo-format 'texinfo-format-tabbing)
X(put 'tabbing 'texinfo-format 'texinfo-format-tabbing)
X(defun texinfo-format-tabbing ()
X  (texinfo-push-stack 'example nil)
X  (texinfo-discard-line-with-args)
X  )
X
X(put 'tabular 'texinfo-end 'texinfo-end-tabbing)
X(put 'tabbing 'texinfo-end 'texinfo-end-tabbing)
X(defun texinfo-end-tabbing ()
X  (texinfo-discard-line)
X  (let ((stacktop
X	 (texinfo-pop-stack 'example)))
X    (texinfo-do-tabbing (nth 1 stacktop))))
X
X(defun texinfo-do-tabbing (from)
X  (let ((end (point)))
X    (save-excursion
X      (goto-char from)
X      (while (search-forward "&" end t)
X	(if (save-excursion
X	      (bobp)
X	      (forward-char -2)
X	      (not (looking-at "\\\\")))
X	    (progn
X	      (delete-char -1)
X	      (insert "\t")
X	      ))))))
X
X(put 'scheme 'texinfo-format 'texinfo-format-example)
X(put 'scheme 'texinfo-end 'texinfo-end-example)
X
X(put 'rationale 'texinfo-format 'texinfo-format-rationale)
X(put 'rationale 'texinfo-end 'texinfo-discard-command)
X(defun texinfo-format-rationale ()
X  (texinfo-discard-line)
X  (insert "Rationale: "))
X
X(put 'note 'texinfo-format 'texinfo-format-note)
X(put 'note 'texinfo-end 'texinfo-discard-command)
X(defun texinfo-format-note ()
X  (texinfo-discard-line)
X  (insert "Note: "))
X
X(put 'header 'texinfo-format 'texinfo-format-header)
X(put 'header 'texinfo-end 'texinfo-discard-command)
X(defun texinfo-format-header ()
X  (save-excursion
X    (forward-char 1)
X    (forward-sexp 1)
X    (delete-char -1))
X  (goto-char texinfo-command-start)
X  (delete-region (point) (progn (forward-line 1) (point))))
X
X
X(put 'evalsto 'texinfo-format 'latexinfo-format-arrow)
X(put 'unsection 'texinfo-format 'texinfo-parse-noarg)
X
X(defun latexinfo-format-syntax ()
X(put 'syntax 'texinfo-format 'latexinfo-format-syntax)  
X  (texinfo-parse-noarg)
X  (insert "\\b{Syntax:} ")
X  (goto-char texinfo-command-start))
X
X(defun latexinfo-format-semantics ()
X(put 'semantics 'texinfo-format 'latexinfo-format-semantics)  
X  (texinfo-parse-noarg)
X  (insert "\\b{Semantics:} ")
X  (goto-char texinfo-command-start))
X
X
X(defun find-entry (byte)
X  (goto-char byte)
X  (if (looking-at "(")
X      (setq byte (1+ byte)))
X  (buffer-substring byte
X		    (progn
X		      (skip-chars-forward "^\n\b)")
X		      (point))))
X
X(put 'modeline 'texinfo-format 'texinfo-format-code)
X
X(put 'f 'texinfo-format 'texinfo-format-noop)
X(put 'v 'texinfo-format 'texinfo-format-noop)
X(put 'fb 'texinfo-format 'texinfo-format-noop)
X(put 'vb 'texinfo-format 'texinfo-format-noop)
X(put 'ide 'texinfo-format 'texinfo-format-noop)
X
END_OF_FILE
if test 9574 -ne `wc -c <'scheme-fmt.el'`; then
    echo shar: \"'scheme-fmt.el'\" unpacked with wrong size!
fi
# end of 'scheme-fmt.el'
fi
if test -f 'tex-to-latexinfo.el' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'tex-to-latexinfo.el'\"
else
echo shar: Extracting \"'tex-to-latexinfo.el'\" \(6641 characters\)
sed "s/^X//" >'tex-to-latexinfo.el' <<'END_OF_FILE'
X(defun tex-to-latexinfo ()
X  (interactive)
X  (let ((case-fold-search nil)
X	(alist latex-alist))
X    ;; Fix the header for LaTeX
X    (goto-char (point-min))
X    (if (re-search-forward "^\\\\input texinfo\\(.*\\)" nil t)
X	(replace-match "\\\\documentstyle[12pt,twoside,latexinfo]{report}
X\\\\pagestyle{headings}
X
X\\\\begin{document}
X
X;; Delete any of these if you don't want that particular index.
X\\\\newindex{cp}
X\\\\newindex{vr}
X\\\\newindex{fn}
X\\\\newindex{tp}
X\\\\newindex{pg}
X\\\\newindex{ky}
X
X" t nil))
X    ;; Assume that any \ from here on in the file are to print out as \
X    (replace-string "\\" "\\back " nil)
X    (goto-char (point-min))
X    (if (yes-or-no-p
X	 "Would you like all occurences of `@@' replaced by `@'? ")
X	(replace-string "@@" "@" nil)
X      (if (yes-or-no-p 
X	   "Would you like all occurences of `@@' replaced by `\\'? ")
X	  (replace-string "@@" "\\back " nil)
X	(error "You better make up your mind between one of these two options.")))
X    (setq alist latex-delete-list)
X    (while alist
X      (goto-char (point-min))
X      (delete-matching-lines (car alist))
X      (setq alist (cdr alist)))
X    (if (re-search-forward "^@appendix"  nil t nil)
X			   (progn
X			     (beginning-of-line 1)
X			     (insert "\\apendix\n")))
X    (setq alist latex-alist)
X    (while alist
X      (goto-char (point-min))
X      (replace-regexp (car (car alist)) (cdr (car alist)) nil)
X      (setq alist (cdr alist)))
X    ))
X
X
X(setq latex-alist
X  '(
X    ;; begin end environments
X    ("^@defcv" . "\\\\begin{defcv}")
X    ("^@deffn" . "\\\\begin{deffn}")
X    ("^@defivar" . "\\\\begin{defivar}")
X    ("^@defmac" . "\\\\begin{defmac}")
X    ("^@defmethod" . "\\\\begin{defmethod}")
X    ("^@defopt" . "\\\\begin{defopt}")
X    ("^@defspec" . "\\\\begin{defspec}")
X    ("^@deftp" . "\\\\begin{deftp}")
X    ("^@defun" . "\\\\begin{defun}")
X    ("^@defvar" . "\\\\begin{defvar}")
X    ("^@defvr" . "\\\\begin{defvr}")
X    ("^@description" . "\\\\begin{description}")
X    ("^@display" . "\\\\begin{display}")
X    ("^@enumerate" . "\\\\begin{enumerate}")
X    ("^@example" . "\\\\begin{example}")
X    ("^@flushleft" . "\\\\begin{flushleft}")
X    ("^@format" . "\\\\begin{format}")
X    ("^@group" . "\\\\begin{same}")
X    ("^@ignore" . "\\\\begin{ignore}")
X    ("^@ifinfo" . "\\\\begin{ifinfo}")
X    ("^@iftex" . "\\\\begin{iftex}")
X    ("^@itemize" . "\\\\begin{itemize}")
X    ("^@lisp" . "\\\\begin{lisp}")
X    ("^@menu" . "\\\\begin{menu}")
X    ("^@quotation" . "\\\\begin{quotation}")
X    ("^@tex" . "\\\\begin{tex}")
X    ;; chamge the name of the group command
X    ("^@end[ \t]group" . "\\\\end{same}")
X    
X    ;; We turn the @table into a description environment
X    ;; There may be a lost of information here.
X    ("^@table[ 	]+.*" . "\\\\begin{description}")
X    ("^@end[ 	]table" . "\\\\end{description}")
X
X    ;; We turn the @itemize into an itemize environment
X    ;; There may be a lost of information here.
X    ("^@itemize[ 	]+.*" . "\\\\begin{itemize}")
X
X    ;; Take care of the titlepage before we remove the @end commands.
X    ;; They will probably have to fix the \author and \title:
X    ;; for now just put in question marks.
X    ("^@titlepage" . "\\\\pagestyle{empty}
X\\\\title{?}
X
X\\\\\author{?}
X
X\\\\date{\\\\today}
X
X")
X    ("^@end[ 	]titlepage" . "\\\\maketitle
X
X\\\\clearpage
X\\\\pagestyle{headings}
X\\\\pagenumbering{roman}
X\\\\tableofcontents
X
X\\\\clearpage
X\\\\pagenumbering{arabic}
X")
X
X    ;; commands with arguments on the rest of the line
X    ("^@end[ 	]+\\(.+\\)" . "\\\\end{\\1}")
X    ("^@printindex[ 	]+\\(.+\\)" . "\\\\printindex{\\1}")
X
X    ;; Sections and chanpters are done LaTeX style
X    ("^@chapter[ 	]+\\(.+\\)" . "\\\\chapter{\\1}")
X    ("^@section[ 	]+\\(.+\\)" . "\\\\section{\\1}")
X    ("^@subsection[ 	]+\\(.+\\)" . "\\\\subsection{\\1}")
X    ("^@subsubsection[ 	]+\\(.+\\)" . "\\\\subsubsection{\\1}")
X    ("^@unnumbered[ 	]+\\(.+\\)" . "\\\\chapter*{\\1}")
X    ("^@unnumberedsec[ 	]+\\(.+\\)" . "\\\\section*{\\1}")
X    ("^@unnumberedsubsec[ 	]+\\(.+\\)" . "\\\\subsection*{\\1}")
X    ("^@unnumberedsubsubsec[ 	]+\\(.+\\)" . "\\\\subsubsection*{\\1}")
X    ("^@appendix[ 	]+\\(.+\\)" . "\\\\chapter{\\1}")
X    ("^@appendixsec[ 	]+\\(.+\\)" . "\\\\section{\\1}")
X    ("^@appendixsubsec[ 	]+\\(.+\\)" . "\\\\subsection{\\1}")
X    ("^@appendixsubsubsec[ 	]+\\(.+\\)" . "\\\\subsubsection{\\1}")
X
X    
X    ("^@item[ 	]+\\(.+\\)" . "\\\\item[\\1]")
X    ;; This is a little different from texinfo
X    ("\\]\n@itemx[ 	]+\\(.+\\)" . ", \\1]")
X    ("^@sp[ 	]+\\(.+\\)" . "\\\\sp{\\1}")
X
X    ("^@cindex[ 	]+\\(.+\\)" . "\\\\cindex{\\1}")
X    ("^@vindex[ 	]+\\(.+\\)" . "\\\\vindex{\\1}")
X    ("^@findex[ 	]+\\(.+\\)" . "\\\\findex{\\1}")
X    ("^@tindex[ 	]+\\(.+\\)" . "\\\\tindex{\\1}")
X    ("^@pindex[ 	]+\\(.+\\)" . "\\\\pindex{\\1}")
X    ("^@kindex[ 	]+\\(.+\\)" . "\\\\kindex{\\1}")
X    ("^@center[	 ]+\\(.+\\)" . "\\\\begin{center}\n\\1\n\\\\end{center}")
X    ("^@setfilename[ 	]+\\(.+\\)" . "\\\\setfilename{\\1}")
X    ("^@settitle[ 	]+\\(.+\\)" . "\\\\markboth{\\1}{\\1}")
X
X    ;; commands with arguments already in braces
X    ("@b{" . "\\\\b{")
X    ("@t{" . "\\\\t{")
X    ("@i{" . "\\\\i{")
X    ("@r{" . "\\\\r{")
X    ("@key{" . "\\\\key{")
X    ("@w{" . "\\\\w{")
X
X    ("@titlefont{" . "{\\\\Large ")
X    ("@code{" . "\\\\code{")
X    ("@samp{" . "\\\\samp{")
X    ("@file{" . "\\\\file{")
X    ("@kbd{" . "\\\\kbd{")
X
X    ("@strong{" . "\\\\strong{")
X    ("@emph{" . "\\\\emph{")
X
X    ("@defn{" . "\\\\defn{")
X    ("@dfn{" . "\\\\dfn{")
X    ("@ctrl{" . "\\\\ctrl{")
X    ("@var{" . "\\\\var{")
X    ("@cite{" . "\\\\cite{")
X    ("@pxref{" . "\\\\pxref{")
X    ("@xref{" . "\\\\xref{")
X    ("@inforef{" . "\\\\inforef{")
X    ("@synindex{" . "\\\\synindex{")
X
X    ;; commands without arguments
X    ("@\\." . "\\\\.")
X    ("^@item[ 	]*$" . "\\\\item")
X    ("^@node" . "\\\\node")
X    ("@noindent" . "\\\\noindent")
X    ("@comment" . "\\\\comment")
X    ("@bullet" . "\\\\bullet")
X    ("@c[ 	]" . "\\\\c ")
X    ("@arrow" . "\\\\arrow")
X    
X    ("@page" . "\\\\clearpage")
X    ("^@bye" . "\\\\end{document}")
X    ("@vskip[ 	]" . "\\\\vskip ")
X    ("@TeX" . "\\\\TeX")
X    ("@exdent" . "\\\\exdent")
X    ("@copyright" . "\\\\copyright")
X    ("@minus" . "\\\\minus")
X    ("@dots" . "\\\\dots")
X    ("@refill" . "\\\\refill")
X    
X    ("@:" . "\\\\:")
X    ("@{" . "\\\\{")
X    ("@}" . "\\\\}")
X    ("@\\*" . "\\\\*")
X    ))
X
X(setq latex-delete-list
X      '(
X	;; This is in the chapter command.
X	"@setchapternewpage[ 	]"
X	;; these conflict with LaTeX commands.
X	"^@group"
X	"^@end[ 	]group"
X	;; Haven't made a \summarycontents yet.
X	"@summarycontents"
X	;; replaced by \tableofcontents at the beginning.
X	"@contents"
X	))
X
END_OF_FILE
if test 6641 -ne `wc -c <'tex-to-latexinfo.el'`; then
    echo shar: \"'tex-to-latexinfo.el'\" unpacked with wrong size!
fi
# end of 'tex-to-latexinfo.el'
fi
echo shar: End of archive 2 \(of 9\).
cp /dev/null ark2isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 9 archives.
    rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  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