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

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

This is a further patch LaTeXinfo.  It adds documentation for the
LaTeX -> LaTeXinfo get-node.el file, and adds support for french and
german.

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.5
#
# Wrapped by mike@sam.ists.ca on Fri Sep 14 17:12:17 1990
#
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f patch.5 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"patch.5\"
else
echo shar: Extracting \"patch.5\" \(32780 characters\)
sed "s/^X//" >patch.5 <<'END_OF_patch.5'
Xdiff -cr /tmp/old.1.3.3/CHANGES ./CHANGES
X*** /tmp/old.1.3.3/CHANGES	Fri Sep 14 16:59:06 1990
X--- ./CHANGES	Fri Sep 14 17:02:30 1990
X***************
X*** 27,31 ****
X  	Fixed the description environment.
X  	Changed the manual to incorporate the proofreading from Nelson Beebe.
X  
X! 1.3.3	Fourth Patch - Auguest 30, 1990
X  	Really added \\ to replace the \* command.
X--- 27,37 ----
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+ 	
Xdiff -cr /tmp/old.1.3.3/Makefile ./Makefile
X*** /tmp/old.1.3.3/Makefile	Sat Aug 25 00:27:41 1990
X--- ./Makefile	Fri Sep 14 17:02:31 1990
X***************
X*** 10,16 ****
X  	psfonts.sty \
X  	scheme.sty \
X  	smallverb.sty \
X! 	tabular.sty
X  
X  
X  ELS = get-node.el \
X--- 10,17 ----
X  	psfonts.sty \
X  	scheme.sty \
X  	smallverb.sty \
X! 	tabular.sty \
X! 	europe.sty
X  
X  
X  ELS = get-node.el \
X***************
X*** 22,27 ****
X--- 23,29 ----
X  	praxis-fmt.el \
X  	scheme-fmt.el \
X  	tabular-fmt.el \
X+ 	europe-fmt.el \
X  	tolatexinfo.el
X  
X  
Xdiff -cr /tmp/old.1.3.3/latexinfo.el ./latexinfo.el
X*** /tmp/old.1.3.3/latexinfo.el	Fri Sep 14 16:59:08 1990
X--- ./latexinfo.el	Fri Sep 14 17:03:10 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.3"))
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.4"))
X  
X  (defvar latexinfo-format-syntax-table nil)
X  
X***************
X*** 307,316 ****
X    ;; Scan for \\-commands.
X    (goto-char (point-min))
X    (while (search-forward "\\" nil t)
X!     (if (looking-at "[@{}'` *%\\]")
X  	;; Handle a few special \-followed-by-one-char commands.
X! 	(if (= (following-char) ?*)
X  	    ;; \* has no effect, since we are not filling.
X  	    (delete-region (1- (point)) (1+ (point)))
X  	  ;; The other characters are simply quoted.  Delete the \.
X  	  (delete-char -1)
X--- 307,317 ----
X    ;; Scan for \\-commands.
X    (goto-char (point-min))
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  	  ;; The other characters are simply quoted.  Delete the \.
X  	  (delete-char -1)
X***************
X*** 1427,1432 ****
X--- 1428,1441 ----
X  (defun latexinfo-format-S ()
X    (latexinfo-parse-noarg)
X    (insert "Section"))
X+ 
X+ ;;; Some European support
X+ 
X+ ;;; \ss
X+ (put 'ss 'latexinfo-format 'latexinfo-format-ss)
X+ (defun latexinfo-format-ss ()
X+   (latexinfo-parse-noarg)
X+   (insert "ss"))
X  
X  (put 'LaTeX 'latexinfo-format 'latexinfo-format-LaTeX)
X  (defun latexinfo-format-LaTeX ()
Xdiff -cr /tmp/old.1.3.3/latexinfo.sty ./latexinfo.sty
X*** /tmp/old.1.3.3/latexinfo.sty	Fri Sep 14 16:59:09 1990
X--- ./latexinfo.sty	Fri Sep 14 17:02:51 1990
X***************
X*** 1,9 ****
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.3.3}
X  \message{Loading Latexinfo package [Version \latexinfoversion]:}
X  \message{}
X  
X--- 1,9 ----
X  %% TeX macros to handle latexinfo files
X  %% \include{ 5 page GNU copyleft here }
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  
XCommon subdirectories: /tmp/old.1.3.3/manual and ./manual
Xdiff -cr /tmp/old.1.3.3/manual/latexinfo.tex ./manual/latexinfo.tex
X*** /tmp/old.1.3.3/manual/latexinfo.tex	Sat Aug 25 00:28:49 1990
X--- ./manual/latexinfo.tex	Fri Sep 14 17:03:47 1990
X***************
X*** 4945,4970 ****
X  \noindent
X  You must choose one of these two options.
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}
X--- 4945,5000 ----
X  \noindent
X  You must choose one of these two options.
X  
X+ \node Converting LaTeX Files into LaTeXinfo Files, Command Index, Converting TeXinfo Files into LaTeXinfo Files, LateXinfo and TeXinfo
X+ \section{Converting LaTeX Files into LaTeXinfo Files}
X+ \cindex{Converting LaTeX Files into LaTeXinfo Files}
X  
X  
X! \LaTeX info files are essentially a superset of standard \LaTeX\ files.
X! To make a standard \LaTeX\ file into a \LaTeX info file, you must begin it with
X! the lines
X  
X! \begin{verbatim}
X! \documentstyle[12pt,latexinfo]{book}
X! \pagestyle{headings}
X  
X! \begin{document}
X  
X! \setfilename{latexinfo.info}
X! \end{verbatim}
X  
X! \noindent
X! \xref{A Short Sample LaTeXinfo File}, for details of how a \LaTeX info file
X! begins.  Once you have added these lines, you will have a document that will
X! pass both \LaTeX, and info formating program, but it will be a document
X! with any node structure, so it will be in essence one large node.  
X! (\xref{Node and Chapter Structuring} for more information on nodes.)
X  
X! This is not very useful for the people who read the document under the info
X! program.  To add nodes and menus to the document, you can do it by hand,
X! or you can use the function \code{nodify-file} contained in the file
X! \code{nodify.el}.
X! \emph{Warning:  This code is a kludgy hack:}   it should never have seen the
X! light of day, but it beats doing a document by hand.  It assumes:\refill
X! 
X! \begin{enumerate}
X! \item	
X! There are no \code{\back node} commands in the file, or if there
X! are, they will be deleted.
X! 
X! \item	
X! There are no \code{\back menu} commands in the file.
X! 
X! \item
X! That all chapter-structuring commands (chapters, sections,
X! subsections and subsubsections) have unique arguments, i.e.~there are no two
X! sections that are called the same thing. 
X! 
X! \item
X! That the \code{documentstyle} is either \code{report} or \code{book},
X! i.e.~something that contains \code{chapters}.
X! 
X! \end{enumerate}
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
Xdiff -cr /tmp/old.1.3.3/manual/sample.tex ./manual/sample.tex
X*** /tmp/old.1.3.3/manual/sample.tex	Sat Aug 25 00:27:49 1990
X--- ./manual/sample.tex	Fri Sep 14 17:02:38 1990
X***************
X*** 1,4 ****
X! \documentstyle[11pt,twoside,latexinfo]{book}
X  \pagestyle{empty}
X  
X  \begin{document}
X--- 1,4 ----
X! \documentstyle[11pt,latexinfo]{book}
X  \pagestyle{empty}
X  
X  \begin{document}
X***************
X*** 22,28 ****
X  Copyright \copyright\{\} year copyright-owner
X  
X  Permission is granted to copy and distribute modified versions of this
X! manual under the conditions for verbatim copying, provided that the entire
X  resulting derived work is distributed under the terms of a permission
X  notice identical to this one.
X  
X--- 22,28 ----
X  Copyright \copyright\{\} year copyright-owner
X  
X  Permission is granted to copy and distribute modified versions of this
X! document under the conditions for verbatim copying, provided that the entire
X  resulting derived work is distributed under the terms of a permission
X  notice identical to this one.
X  
X***************
X*** 39,45 ****
X  \pagenumbering{arabic}
X  
X  \c Anything before the \setfilename will not appear in the Info file.
X! \setfilename{themanual.info}
X  
X  \begin{ifinfo}
X  Copyright \copyright \var{year} \var{copyright-owner}
X--- 39,45 ----
X  \pagenumbering{arabic}
X  
X  \c Anything before the \setfilename will not appear in the Info file.
X! \setfilename{sample.info}
X  
X  \begin{ifinfo}
X  Copyright \copyright \var{year} \var{copyright-owner}
X***************
X*** 48,54 ****
X  
X  \begin{ignore}
X  Copyright \copyright \var{year} \var{copyright-owner}
X! Put another 5 page copyleft here in case anyone looks at this file.
X  \end{ignore}
X  
X  \c The Top node contains the master menu for the Info file.
X--- 48,54 ----
X  
X  \begin{ignore}
X  Copyright \copyright \var{year} \var{copyright-owner}
X! Put another 5 page copyleft here in case anyone ever looks at this file.
X  \end{ignore}
X  
X  \c The Top node contains the master menu for the Info file.
X
X
Xdiff -cr /dev/null europe-fmt.el
X*** /dev/null	Fri Sep 14 17:00:00 1990
X--- europe-fmt.el	Fri Sep 14 17:02:45 1990
X***************
X*** 0 ****
X--- 1,186 ----
X+ ;; LaTeXinfo support for Eurpoean languages.
X+ 
X+ (defun latexinfo-format-scan ()
X+   ;; LaTeX sometimes uses \\ to force a new-line
X+   (goto-char (point-min))
X+   (replace-regexp "\\\\\\\\$" "")
X+   ;; This is the same as latexinfo-format-scan, except for 
X+   (goto-char (point-min))
X+   (latexinfo-europe-doublequotes)
X+   ;; And don't convert left and right quotes to typewriter font quotes.
X+   ;;  (goto-char (point-min))
X+   ;;  (while (search-forward "``" nil t)
X+   ;;    (replace-match "\""))
X+   ;;  (goto-char (point-min))
X+   ;;  (while (search-forward "''" nil t)
X+   ;;    (replace-match "\""))
X+   ;; Scan for \-commands.
X+   (goto-char (point-min))
X+   (while (search-forward "\\" nil t)
X+     (if (looking-at "[@{}'` *%]")
X+ 	;; Handle a few special \-followed-by-one-char commands.
X+ 	(if (= (following-char) ?*)
X+ 	    ;; \* has no effect, since we are not filling.
X+ 	    (delete-region (1- (point)) (1+ (point)))
X+ 	  ;; The other characters are simply quoted.  Delete the \.
X+ 	  (delete-char -1)
X+ 	  (forward-char 1))
X+       ;; \ is followed by a command-word; find the end of the word.
X+       (setq latexinfo-command-start (1- (point)))
X+       (if (= (char-syntax (following-char)) ?w)
X+ 	  (forward-word 1)
X+ 	(forward-char 1))
X+       (setq latexinfo-command-end (point))
X+       ;; Call the handler for this command.
X+       (setq latexinfo-command-name
X+ 	    (intern (buffer-substring (1+ latexinfo-command-start)
X+ 				      latexinfo-command-end)))
X+       (let ((cmd (get latexinfo-command-name 'latexinfo-format)))
X+ 	(if cmd (funcall cmd)
X+ 	  (latexinfo-unsupported)))))
X+   (cond (latexinfo-stack
X+ 	 (goto-char (nth 2 (car latexinfo-stack)))
X+ 	 (error "Unterminated \begin{%s}" (car (car latexinfo-stack))))))
X+ 
X+ (defun latexinfo-europe-doublequotes ()
X+   (while (search-forward "\"" nil t)
X+     (forward-char -2)
X+     (if (eq (following-char) ?\\)
X+ 	;; Ignore \"
X+ 	(forward-char 2)
X+       (progn
X+ 	(forward-char 2)
X+ 	(let ((next-char (following-char))
X+ 	      (here (point)))
X+ 	  (cond
X+ 	   ;; Just junk these cases:
X+ 	   ;; "| to separate ligatures.
X+ 	   ;; "- like \-, but allowing hyphenation in the rest of
X+ 	   ;;                    the word.
X+ 	   ;; "" like "-, but producing no hyphen sign.
X+ 	   ((memq next-char '(?\| ?\- ?\"))
X+ 	    (delete-region (- here 1) (+ here 1)))
X+ 	   ;; Just ignore these cases:
X+ 	   ;; "ck for ck to be hyphenated as k-k.
X+ 	   ;; "ff for ff to be hyphenated as ff-f, also for certain
X+ 	   ;;                    other consonants.
X+ 	   ((memq next-char '(?c ?f ?l ?m ?n ?p ?t ?C ?F ?L ?M ?N ?P ?T))
X+ 	    ;; There should be better testing here.
X+ 	    (delete-char -1))
X+ 	   ;; "a for Umlaut-a (like \"a), also for all other vowels.
X+ 	   ;; For these two, add an e.
X+ 	   ((memq next-char '(?a ?o ?u))
X+ 	    (delete-char -1)
X+ 	    (forward-char 1)
X+ 	    (insert "e"))
X+ 	   ((memq next-char '(?A ?O ?U))
X+ 	    (delete-char -1)
X+ 	    (forward-char 1)
X+ 	    (insert "E"))
X+ 	   ((memq next-char '(?e ?i ?E ?I))
X+ 	    (delete-char -1))
X+ 	   ;; s for sharp s  (like \ss{})
X+ 	   ((eq next-char ?s)
X+ 	    (delete-region (- here 1) (+ here 1))
X+ 	    (insert "ss"))
X+ 	   ;; ` or \glqq for german left  double quotes  (similar to ,,)
X+ 	   ((eq next-char ?\`)
X+ 	    (delete-region (- here 1) (+ here 1))
X+ 	    (insert "\\glqq "))
X+ 	   ;; ' or \grqq for german right double quotes  (similar to ``)
X+ 	   ((eq next-char ?\')
X+ 	    (delete-region (- here 1) (+ here 1))
X+ 	    (insert "\\grqq "))
X+ 	   ;; < or \flqq for french left  double quotes  (similar to <<)
X+ 	   ((eq next-char ?\<)
X+ 	    (delete-region (- here 1) (+ here 1))
X+ 	    (insert "\\flqq "))
X+ 	   ;; > or \frqq for french right double quotes  (similar to >>)
X+ 	   ((eq next-char ?\>)
X+ 	    (delete-region (- here 1) (+ here 1))
X+ 	    (insert "\\frqq "))
X+ 	   ;; Ignore all other cases
X+ 	   ))))
X+     ))
X+ 
X+ 
X+ ;;; "` or \glqq        for german left  double quotes  (similar to ,,)
X+ (put 'glqq 'latexinfo-format 'latexinfo-format-glqq)
X+ (defun latexinfo-format-glqq ()
X+   (latexinfo-parse-noarg)
X+   (insert ",,"))
X+ 
X+ ;;; "' or \grqq        for german right double quotes  (similar to ``)
X+ (put 'grqq 'latexinfo-format 'latexinfo-format-grqq)
X+ (defun latexinfo-format-grqq ()
X+   (latexinfo-parse-noarg)
X+   (insert "``"))
X+ 
X+ ;;;       \glq         for german left  single quotes  (similar to , )
X+ (put 'glq 'latexinfo-format 'latexinfo-format-glq)
X+ (defun latexinfo-format-glq ()
X+   (latexinfo-parse-noarg)
X+   (insert ","))
X+ 
X+ ;;;       \grq         for german right single quotes  (similar to ` )
X+ (put 'grq 'latexinfo-format 'latexinfo-format-grq)
X+ (defun latexinfo-format-grq ()
X+   (latexinfo-parse-noarg)
X+   (insert "`"))
X+ 
X+ ;;; "< or \flqq        for french left  double quotes  (similar to <<)
X+ (put 'flqq 'latexinfo-format 'latexinfo-format-flqq)
X+ (defun latexinfo-format-flqq ()
X+   (latexinfo-parse-noarg)
X+   (insert "<<"))
X+ 
X+ ;;; "> or \frqq        for french right double quotes  (similar to >>)
X+ (put 'frqq 'latexinfo-format 'latexinfo-format-frqq)
X+ (defun latexinfo-format-frqq ()
X+   (latexinfo-parse-noarg)
X+   (insert ">>"))
X+ 
X+ ;;;       \flq         for french left  single quotes  (similar to < )
X+ (put 'flq 'latexinfo-format 'latexinfo-format-flq)
X+ (defun latexinfo-format-flq ()
X+   (latexinfo-parse-noarg)
X+   (insert "<"))
X+ 
X+ ;;;       \frq         for french right single quotes  (similar to > )
X+ (put 'frq 'latexinfo-format 'latexinfo-format-frq)
X+ (defun latexinfo-format-frq ()
X+   (latexinfo-parse-noarg)
X+   (insert ">"))
X+ 
X+ ;;; \ss
X+ (put 'ss 'latexinfo-format 'latexinfo-format-ss)
X+ (defun latexinfo-format-ss ()
X+   (latexinfo-parse-noarg)
X+   (insert "ss"))
X+ 
X+ ;;; \dq                for the original quotes character (")
X+ (put 'dq 'latexinfo-format 'latexinfo-format-dq)
X+ (defun latexinfo-format-dq ()
X+   (latexinfo-parse-noarg)
X+   (insert "\""))
X+ 
X+ 
X+ ;;; \setlanguage{n}	to switch to the language specified by n
X+ (put 'setlanguage 'latexinfo-format 'latexinfo-format-noop)
X+ 
X+ ;;; \originalTeX       to restore everything to the original settings
X+ (put 'originalTeX 'latexinfo-format 'latexinfo-format-originalTeX)
X+ ;; Unfortunately, this will not work yet in the info file.
X+ (defun latexinfo-format-originalTeX ()
X+   (latexinfo-format-noop)
X+   (setq latexinfo-germanTeX nil))
X+ 
X+ 
X+ ;;; \germanTeX         to re-activate the german settings.
X+ (put 'germanTeX 'latexinfo-format 'latexinfo-format-germanTeX)
X+ ;; Unfortunately, this is assumed throughout the info file.
X+ (defun latexinfo-format-germanTeX ()
X+   (latexinfo-format-noop)
X+   (setq latexinfo-germanTeX t))
X+   
X+ (setq latexinfo-germanTeX t)
X
Xdiff -cr /dev/null europe.sty
X*** /dev/null	Fri Sep 14 17:00:00 1990
X--- europe.sty	Fri Sep 14 17:02:50 1990
X***************
X*** 0 ****
X--- 1,389 ----
X+ %% LaTeXinfo support for Eurpoean languages.
X+ 
X+ % Leave " alone so it can be used as an escape character.
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+ }
X+ 
X+ %GERMAN
X+ % This is GERMAN.TEX or GERMAN.DOC or GERMAN.STY, as of 4 Nov 1988,
X+ %    collected by H.Partl (TU Wien),
X+ %    using ideas by W.Appelt, F.Hommes et al. (GMD St.Augustin),
X+ %    T.Hofmann (CIBA-GEIGY Basel), N.Schwarz (Uni Bochum),
X+ %    J.Schrod (TH Darmstadt), D.Armbruster (Uni Stuttgart),
X+ %    R.Schoepf (Uni Mainz), and others.
X+ % DOCUMENT STYLE OPTION for writing german texts with TeX or LaTeX.
X+ % It can be called via
X+ %    \input german
X+ % or (with LaTeX) via
X+ %    \documentstyle[german]{anystyle}
X+ %
X+ % +-------------------------------------------------------------------+
X+ % !  This file conforms to the standard  for  "Einheitliche deutsche  !
X+ % !  TeX-Befehle" as proposed at the 6th Meeting of German TeX Users  !
X+ % !  in Muenster, October 1987.                                       !
X+ % +-------------------------------------------------------------------+
X+ %
X+ % Commands to be used by the end users:
X+ % "a                 for Umlaut-a (like \"a), also for all other vowels.
X+ % "s                 for sharp s  (like \ss{}).
X+ % "ck                for ck to be hyphenated as k-k.
X+ % "ff                for ff to be hyphenated as ff-f, also for certain
X+ %                    other consonants.
X+ % "|                 to separate ligatures.
X+ % "-                 like \-, but allowing hyphenation in the rest of
X+ %                    the word.
X+ % ""                 like "-, but producing no hyphen sign.
X+ % "` or \glqq        for german left  double quotes  (similar to ,,)
X+ % "' or \grqq        for german right double quotes  (similar to ``)
X+ %       \glq         for german left  single quotes  (similar to , )
X+ %       \grq         for german right single quotes  (similar to ` )
X+ % "< or \flqq        for french left  double quotes  (similar to <<)
X+ % "> or \frqq        for french right double quotes  (similar to >>)
X+ %       \flq         for french left  single quotes  (similar to < )
X+ %       \frq         for french right single quotes  (similar to > )
X+ % \dq                for the original quotes character (")
X+ % \setlanguage{n}    to switch to the language specified by n, which
X+ %                    should be one of the following command names:
X+ %                    \austrian \french \english \german \USenglish;
X+ %                    - this changes the date format, captions and (if
X+ %                    ``multilingual TeX''is installed) hyphenation.
X+ % \originalTeX       to restore everything to the original settings
X+ %                    of TeX and LaTeX (well, almost everything).
X+ % \germanTeX         to re-activate the german settings.
X+ %
X+ % Obsolete commands, provided for compatibility with existing
X+ % applications:
X+ % \3                 for sharp s (like "s).
X+ % \ck                for ck to be hyphenated as k-k (like "ck).
X+ %
X+ % Lower level commands and features:
X+ % \umlautlow        redefines the Umlaut accent such that the dots come
X+ %                   nearer to the letter and that hyphenation is enabled
X+ %                   in the rest of the word.
X+ % \umlauthigh       restores \" to its original meaning.
X+ % \ss               is \lccode'd to enable hyphenation.
X+ % \mdqon            makes " an active (meta-) character that does the
X+ %                   pretty things described above.
X+ % \mdqoff           restores " to its original meaning.
X+ % \dospecials,\@sanitize  are redefined to include ".
X+ % \dateaustrian, \dategerman, \dateenglish, \dateUSenglish, \datefrench
X+ %                   redefine \today to use the respective date format.
X+ % \captionsgerman, \captionsenglish, \captionsfrench
X+ %                   switch to german, english or french chapter captions
X+ %                   and the like, resp.  This will have an effect only
X+ %                   if the document style files use the symbolic names
X+ %                   \chaptername etc. instead of the original english
X+ %                   words.
X+ % \language         a count that is set by \setlanguage and can be used
X+ %                   by document style declarations like
X+ %                      \ifnum\language=\english .textengl.\else
X+ %                      \ifnum\language=\german  .textgerm.\fi\fi
X+ %                   and/or by M.Ferguson's ``Multilingual T^eX''.
X+ %
X+ % Finally, \germanTeX is switched on.
X+ %
X+ % Notes:
X+ % This file can be used both with Plain TEX and with LATEX and other
X+ % macro packages, and with the original TEX and LATEX fonts. Usage
X+ % of german hyphenation patterns is recommended to accompany this
X+ % style file when writing german texts.
X+ % The file should be read in vertical mode only (usually at the
X+ % beginning of the document) to avoid spurious spaces.
X+ % \undefined must be an undefined control sequence.
X+ % Multiple calls of this file (e.g. at the beginning of each subfile)
X+ % will do no harm. Only the first call (i.e., if \mdqon is undefined)
X+ % performs all the definitions and settings.
X+ % The catcode of @ remains unchanged after processing of this file.
X+ % All definitions are global, the switching on of the german options
X+ % is local.
X+ % The commands \mdqon, \mdqoff, \originalTeX, \germanTeX, and
X+ % \setlanguage are ``fragile'' with LaTeX and should not be used
X+ % within arguments of macro calls.
X+ % In Plain TeX, `\protect' should be \let to `\relax' normally and to
X+ % something like `\string' inside the arguments of `\write' or `\message'
X+ % (see LaTeX.TEX for all the details).
X+ % The command \umlautlow may need adaption to font parameters (see
X+ % comments there for details).
X+ % The commands \flqq, \frqq, \flq, \frq, and \datefrench  in their
X+ % present forms do not work properly with all font sizes and styles,
X+ % they still require a better solution.
X+ %
X+ 
X+ % \ifundefined{mdqon} or \mdqon=\relax
X+ \expandafter\ifx\csname mdqon\endcsname\relax
X+ % \then go ahead \else do nothing
X+ \else \germanTeX \endinput \fi
X+ 
X+ \message{Document Style Option `german'  Version 2 as of 4 Nov 1988}
X+ 
X+ % \ifundefined{protect}
X+ \ifx\protect\undefined
X+ % \then define it
X+ \let\protect=\relax \fi
X+ 
X+ {\catcode`\@=11 % \makeatletter
X+ 
X+ \gdef\allowhyphens{\penalty\@M \hskip\z@skip}
X+ %                 {\nobreak    \hskip 0pt plus 0pt\relax}
X+ 
X+ \newcount\U@C\newbox\U@B\newdimen\U@D
X+ \gdef\umlauthigh{\def\"##1{{\accent127 ##1}}}
X+ \gdef\umlautlow{\def\"{\protect\newumlaut}}
X+ \gdef\newumlaut#1{\leavevmode\allowhyphens
X+      \vbox{\baselineskip\z@skip \lineskip.25ex
X+ %          \baselineskip 0pt
X+      \ialign{##\crcr\hidewidth
X+      \setbox\U@B\hbox{#1}\U@D .01\p@\U@C\U@D
X+      \U@D\ht\U@B\advance\U@D -1ex\divide\U@D \U@C
X+      \U@C\U@D\U@D\the\fontdimen1\the\font
X+      \multiply\U@D \U@C\divide\U@D 100\kern\U@D
X+      \vbox to .20ex  % <--- depending on the METAFONT parameters
X+ %                           of the fonts, the height of this \vbox
X+ %                           may vary around the value of .20ex  --
X+ %                           just try out, which will look best!
X+      {\hbox{\char127}\vss}\hidewidth\crcr#1\crcr}}\allowhyphens}
X+ \gdef\highumlaut#1{\leavevmode\allowhyphens
X+      \accent127 #1\allowhyphens}
X+ 
X+ \gdef\set@low@box#1{\setbox1\hbox{,}\setbox\z@\hbox{#1}\dimen\z@\ht\z@
X+      \advance\dimen\z@ -\ht1
X+      \setbox\z@\hbox{\lower\dimen\z@ \box\z@}\ht\z@\ht1 \dp\z@\dp1}
X+ %    (this lowers the german left quotes to the same level as the comma.)
X+ 
X+ \gdef\@glqq{{\ifhmode \edef\@SF{\spacefactor\the\spacefactor}\else
X+      \let\@SF\empty \fi \leavevmode
X+      \set@low@box{''}\box\z@\kern-.04em\allowhyphens\@SF\relax}}
X+ \gdef\glqq{\protect\@glqq}
X+ \gdef\@grqq{\ifhmode \edef\@SF{\spacefactor\the\spacefactor}\else
X+      \let\@SF\empty \fi \kern-.07em``\kern.07em\@SF\relax}
X+ \gdef\grqq{\protect\@grqq}
X+ \gdef\@glq{{\ifhmode \edef\@SF{\spacefactor\the\spacefactor}\else
X+      \let\@SF\empty \fi \leavevmode
X+      \set@low@box{'}\box\z@\kern-.04em\allowhyphens\@SF\relax}}
X+ \gdef\glq{\protect\@glq}
X+ \gdef\@grq{\kern-.07em`\kern.07em}
X+ \gdef\grq{\protect\@grq}
X+ \gdef\@flqq{\ifhmode \edef\@SF{\spacefactor\the\spacefactor}\else
X+      \let\@SF\empty \fi
X+      \ifmmode \ll \else \leavevmode
X+      \raise .2ex \hbox{$\scriptscriptstyle \ll $}\fi \@SF\relax}
X+ \gdef\flqq{\protect\@flqq}
X+ \gdef\@frqq{\ifhmode \edef\@SF{\spacefactor\the\spacefactor}\else
X+      \let\@SF\empty \fi
X+      \ifmmode \gg \else \leavevmode
X+      \raise .2ex \hbox{$\scriptscriptstyle \gg $}\fi \@SF\relax}
X+ \gdef\frqq{\protect\@frqq}
X+ \gdef\@flq{\ifhmode \edef\@SF{\spacefactor\the\spacefactor}\else
X+      \let\@SF\empty \fi
X+      \ifmmode < \else \leavevmode
X+      \raise .2ex \hbox{$\scriptscriptstyle < $}\fi \@SF\relax}
X+ \gdef\flq{\protect\@flq}
X+ \gdef\@frq{\ifhmode \edef\@SF{\spacefactor\the\spacefactor}\else
X+      \let\@SF\empty \fi
X+      \ifmmode > \else \leavevmode
X+      \raise .2ex \hbox{$\scriptscriptstyle > $}\fi \@SF\relax}
X+ \gdef\frq{\protect\@frq}
X+ 
X+ % enable hyphenations after \ss:
X+ \global\lccode`\^^Y=`\^^Y
X+ 
X+ \global\let\original@three=\3 % Note that \3 may be defined or undefined.
X+ 
X+ % include the quotes in dospecials and sanitize:
X+ 
X+ \gdef\german@dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
X+   \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~\do\"}
X+ 
X+ \gdef\german@sanitize{\@makeother\ \@makeother\\\@makeother\$\@makeother\&%
X+ \@makeother\#\@makeother\^\@makeother\^^K\@makeother\_\@makeother\^^A%
X+ \@makeother\%\@makeother\~\@makeother\"}
X+ 
X+ \global\let\original@dospecials\dospecials
X+ \global\let\dospecials\german@dospecials
X+ \global\let\original@sanitize\@sanitize
X+ \global\let\@sanitize\german@sanitize
X+ 
X+ \gdef\mdqon{\let\dospecials\german@dospecials
X+         \let\@sanitize\german@sanitize\catcode`\"\active}
X+ \gdef\mdqoff{\catcode`\"12\let\original@dospecials\dospecials
X+         \let\@sanitize\original@sanitize}
X+ 
X+ \gdef\ck{\allowhyphens\discretionary{k-}{k}{ck}\allowhyphens}
X+ 
X+ {\mdqoff
X+ \gdef\@UMLAUT{\"}
X+ \gdef\@MATHUMLAUT{\mathaccent"707F}
X+ \gdef\@SS{\mathchar"7019}
X+ \gdef\dq{"}
X+ }
X+ 
X+ {\mdqon
X+ \gdef"#1{\if\string#1`\glqq{}%
X+ \else\if\string#1'\grqq{}%
X+ \else\if\string#1a\ifmmode\@MATHUMLAUT a\else\@UMLAUT a\fi
X+ \else\if\string#1o\ifmmode\@MATHUMLAUT o\else\@UMLAUT o\fi
X+ \else\if\string#1u\ifmmode\@MATHUMLAUT u\else\@UMLAUT u\fi
X+ \else\if\string#1A\ifmmode\@MATHUMLAUT A\else\@UMLAUT A\fi
X+ \else\if\string#1O\ifmmode\@MATHUMLAUT O\else\@UMLAUT O\fi
X+ \else\if\string#1U\ifmmode\@MATHUMLAUT U\else\@UMLAUT U\fi
X+ \else\if\string#1e\ifmmode\@MATHUMLAUT e\else\protect \highumlaut e\fi
X+ \else\if\string#1i\ifmmode\@MATHUMLAUT i\else\protect\highumlaut\i \fi
X+ \else\if\string#1E\ifmmode\@MATHUMLAUT E\else\protect\highumlaut E\fi
X+ \else\if\string#1I\ifmmode\@MATHUMLAUT I\else\protect\highumlaut I\fi
X+ \else\if\string#1s\ifmmode\@SS\else\ss\fi{}%
X+ \else\if\string#1-\allowhyphens\-\allowhyphens
X+ \else\if\string#1\string"\hskip\z@skip
X+ \else\if\string#1|\discretionary{-}{}{\kern.03em}%
X+ \else\if\string#1c\allowhyphens\discretionary{k-}{}{c}\allowhyphens
X+ \else\if\string#1f\allowhyphens\discretionary{ff-}{}{f}\allowhyphens
X+ \else\if\string#1l\allowhyphens\discretionary{ll-}{}{l}\allowhyphens
X+ \else\if\string#1m\allowhyphens\discretionary{mm-}{}{m}\allowhyphens
X+ \else\if\string#1n\allowhyphens\discretionary{nn-}{}{n}\allowhyphens
X+ \else\if\string#1p\allowhyphens\discretionary{pp-}{}{p}\allowhyphens
X+ \else\if\string#1t\allowhyphens\discretionary{tt-}{}{t}\allowhyphens
X+ \else\if\string#1<\flqq{}%
X+ \else\if\string#1>\frqq{}%
X+ \else             \dq #1%
X+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
X+ }
X+ 
X+ \gdef\dateaustrian{\def\today{\number\day.~\ifcase\month\or
X+   J\"anner\or Februar\or M\"arz\or April\or Mai\or Juni\or
X+   Juli\or August\or September\or Oktober\or November\or Dezember\fi
X+   \space\number\year}}
X+ \gdef\dategerman{\def\today{\number\day.~\ifcase\month\or
X+   Januar\or Februar\or M\"arz\or April\or Mai\or Juni\or
X+   Juli\or August\or September\or Oktober\or November\or Dezember\fi
X+   \space\number\year}}
X+ \gdef\dateUSenglish{\def\today{\ifcase\month\or
X+  January\or February\or March\or April\or May\or June\or
X+  July\or August\or September\or October\or November\or December\fi
X+  \space\number\day, \number\year}}
X+ \gdef\dateenglish{\def\today{\ifcase\day\or
X+  1st\or 2nd\or 3rd\or 4th\or 5th\or
X+  6th\or 7th\or 8th\or 9th\or 10th\or
X+  11th\or 12th\or 13th\or 14th\or 15th\or
X+  16th\or 17th\or 18th\or 19th\or 20th\or
X+  21st\or 22nd\or 23rd\or 24th\or 25th\or
X+  26th\or 27th\or 28th\or 29th\or 30th\or
X+  31st\fi
X+  ~\ifcase\month\or
X+  January\or February\or March\or April\or May\or June\or
X+  July\or August\or September\or October\or November\or December\fi
X+  \space \number\year}}
X+ \gdef\datefrench{\def\today{\ifnum\day=1\relax 1\/$^{\rm er}$\else
X+   \number\day\fi \space\ifcase\month\or
X+   janvier\or f\'evrier\or mars\or avril\or mai\or juin\or
X+   juillet\or ao\^ut\or septembre\or octobre\or novembre\or d\'ecembre\fi
X+   \space\number\year}}
X+ 
X+ % Here is, how you can modify the LATEX document style files and option
X+ % files, to benefit from the following \captionsxxxxx commands. Def's like
X+ %     \def\tableofcontents{\section*{Contents\markboth{CONTENTS}{CONTENTS}}
X+ %     \@starttoc{toc}}
X+ % should be redefined by def's like
X+ %     \def\contentsname{Contents} % <---
X+ %     \def\tableofcontents{\section*{\contentsname
X+ %     \markboth{\uppercase{\contentsname}}{\uppercase{\contentsname}}}
X+ %     \@starttoc{toc}}
X+ % (it's best to put all these new lines to the end of the origignal files),
X+ % and of course, you should modify the change date in the file header and
X+ % in the \typeout command.
X+ 
X+ \gdef\captionsgerman{%
X+ \def\refname{Literatur}%
X+ \def\abstractname{Zusammenfassung}%
X+ \def\bibname{Literaturverzeichnis}%
X+ \def\chaptername{Kapitel}%
X+ \def\appendixname{Anhang}%
X+ \def\contentsname{Inhaltsverzeichnis}% % oder nur: Inhalt
X+ \def\listfigurename{Abbildungsverzeichnis}%
X+ \def\listtablename{Tabellenverzeichnis}%
X+ \def\indexname{Index}%
X+ \def\figurename{Abbildung}%
X+ \def\tablename{Tabelle}% % oder: Tafel
X+ \def\partname{Teil}%
X+ \def\enclname{Anlage(n)}% fuer letter.sty (von Uni Karlsruhe)
X+ \def\ccname{Verteiler}%
X+ \def\headtoname{An}}
X+ 
X+ \gdef\captionsenglish{%
X+ \def\refname{References}%
X+ \def\abstractname{Abstract}%
X+ \def\bibname{Bibliography}%
X+ \def\chaptername{Chapter}%
X+ \def\appendixname{Appendix}%
X+ \def\contentsname{Contents}%
X+ \def\listfigurename{List of Figures}%
X+ \def\listtablename{List of Tables}%
X+ \def\indexname{Index}%
X+ \def\figurename{Figure}%
X+ \def\tablename{Table}%
X+ \def\partname{Part}%
X+ \def\enclname{encl}%
X+ \def\ccname{cc}%
X+ \def\headtoname{To}}
X+ 
X+ \gdef\captionsfrench{%
X+ \def\refname{R\'ef\'erences}%
X+ \def\abstractname{R\'esum\'e}%
X+ \def\bibname{Bibliographie}%
X+ \def\chaptername{Chapitre}%
X+ \def\appendixname{Appendice}%
X+ \def\contentsname{Table des mati\`eres}%
X+ \def\listfigurename{Liste des figures}%
X+ \def\listtablename{Liste des tables}%
X+ \def\indexname{Index}%
X+ \def\figurename{Figure}%
X+ \def\tablename{Table}%
X+ \def\partname{Partie}%
X+ \def\enclname{T.~J.}%
X+ \def\ccname{A l'attention de}%
X+ \def\headtoname{A}}
X+ 
X+ \newcount\language % if not yet declared by Ferguson's ``Multilingual T^eX''
X+ \newcount\USenglish  \global\USenglish=0
X+ \newcount\german     \global\german=1
X+ \newcount\austrian   \global\austrian=2
X+ \newcount\french     \global\french=3
X+ \newcount\english    \global\english=4
X+ \gdef\setlanguage#1{\language #1\relax
X+   \expandafter\ifcase #1\relax
X+   \dateUSenglish  \captionsenglish   \or
X+   \dategerman     \captionsgerman    \or
X+   \dateaustrian   \captionsgerman    \or
X+   \datefrench     \captionsfrench    \or
X+   \dateenglish    \captionsenglish   \fi}
X+ 
X+ \gdef\originalTeX{\mdqoff \umlauthigh \let\3\original@three
X+   \setlanguage{\USenglish}}
X+ \gdef\germanTeX{\mdqon \umlautlow \let\3\ss
X+   \setlanguage{\german}}
X+ 
X+ } % return to previous catcodes
X+ 
X+ % Now, switch on what is appropriate for german:
X+ 
X+ \germanTeX
X+ 
X+ % This is the end of GERMAN.STY/DOC/TEX.
X+ \endinput
X+ 
X
X
END_OF_patch.5
if test 32780 -ne `wc -c <patch.5`; then
    echo shar: \"patch.5\" 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