Index: kit/ctlwords.pl
diff -u kit/ctlwords.pl:1.2 kit/ctlwords.pl:removed
--- kit/ctlwords.pl:1.2	Sat Sep  5 06:05:08 1998
+++ kit/ctlwords.pl	Mon May  3 05:10:04 1999
@@ -1,12 +0,0 @@
-#! /usr/bin/perl
-$counter = 0;	# 0 origin
-print "/* generated by ctlwords.awk. do not edit by hand. */\n";
-
-while (<>) {
-	next if (!/^\/\*CTL\*\//);
-	next if ($_ !~ /(CTL_[A-Z0-9]+)/);
-
-	$word = $1;
-	print "#define $word\t$counter\n";
-	$counter++;
-}
Index: kit/keywords.pl
diff -u kit/keywords.pl:1.1 kit/keywords.pl:removed
--- kit/keywords.pl:1.1	Tue Nov 11 15:07:40 1997
+++ kit/keywords.pl	Mon May  3 05:10:06 1999
@@ -1,14 +0,0 @@
-@keywords = ();
-
-die if (@ARGV != 1);
-open(IN, "< $ARGV[0]") || die;
-while (<IN>) {
-	next if (! /^\/\*CTL\*\//);
-	next if (! /CTL_([A-Z0-9]+),/);
-	$t = $1;
-	$t =~ tr/A-Z/a-z/;
-	push(@keywords, $t);
-}
-close(IN);
-
-print join(' ', @keywords) . "\n";
Index: kit/contrib/mgp-el/COPYING
diff -u /dev/null kit/contrib/mgp-el/COPYING:1.1
--- /dev/null	Mon May  3 05:10:08 1999
+++ kit/contrib/mgp-el/COPYING	Fri Apr 30 00:42:47 1999
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
Index: kit/contrib/mgp-el/README
diff -u /dev/null kit/contrib/mgp-el/README:1.1
--- /dev/null	Mon May  3 05:10:09 1999
+++ kit/contrib/mgp-el/README	Fri Apr 30 00:42:48 1999
@@ -0,0 +1,29 @@
+### mgp.el Ver.0.90 -- convert Magic Point file to LaTeX2e
+
+0. CONTENTS
+
+	o README -- This file.
+	o mgp.el -- Emacs Lisp program to convert mgp file to LaTeX2e.
+	o mgp.sty -- Stype file to be used with the generated LaTeX2e file.
+	o sample.mgp -- Same as distributed with Magic Point.
+	o sample.tex -- LaTeX2e file generated by mgp.el from sample.mgp
+
+
+1. INSTALLATION
+
+1.1 At first you need Emacs Ver.20.X or Mule Ver.2.3.
+
+1.2 Byte compile mgp.el by Emacs or mule, and copy mgp.el and mgp.elc
+to a directory that is in `load-path' of your Emacs.  The directory
+/usr/local/share/emacs/site-lisp/ is a good candidate.
+
+1.3 Copy mgp.sty to a directory that your LaTeX system can find.
+
+
+2. USAGE
+
+2.1 Read your XXX.mpg file into Emacs buffer, and do:
+	M-x mgp-entex-buffer RET
+Then the file XXX.tex is generated.
+
+2.2 Process the generated XXX.tex by your LaTeX system.
Index: kit/contrib/mgp-el/mgp.el
diff -u /dev/null kit/contrib/mgp-el/mgp.el:1.1
--- /dev/null	Mon May  3 05:10:10 1999
+++ kit/contrib/mgp-el/mgp.el	Fri Apr 30 00:42:48 1999
@@ -0,0 +1,686 @@
+;;; mgp.el --- Magic Point tool
+;;; Copyright (C) 1999 Electrotechnical Lab., JAPAN
+
+;; Author: K.Handa <handa@etl.go.jp>
+;; Created: 1999/04/28
+;; Keywords: mgp, Magic Point
+
+;; This file is not part of GNU Emacs, but the same permissions apply.
+;;
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Code:
+
+(eval-and-compile
+
+(or mule-version
+    (error "This program requires Mule feature"))
+
+;; For compatibility between Mule 2.3 and Emacs 20.
+
+(defun mgp-buffer-file-coding-system ()
+  (if (boundp 'buffer-file-coding-system)
+      (symbol-value 'buffer-file-coding-system)
+    (symbol-value 'file-coding-system)))
+
+(or (fboundp 'set-buffer-file-coding-system)
+    (defalias 'set-buffer-file-coding-system 'set-file-coding-system))
+
+(or (fboundp 'coding-system-base)
+    (defun coding-system-base (coding)
+      (cond ((memq coding '(*ctext* *iso-8859-1*)) 'latin-1)
+	    ((eq coding '*iso-8859-2*) 'latin-2)
+	    ((eq coding '*iso-8859-3*) 'latin-3)
+	    ((eq coding '*iso-8859-4*) 'latin-4)
+	    ((eq coding '*iso-8859-5*) 'latin-5))))
+
+(or (fboundp 'coding-system-equal)
+    (defalias 'coding-system-equal 'eq))
+
+(or (fboundp 'line-beginning-position)
+    (defun line-beginning-position ()
+      (save-excursion
+	(beginning-of-line)
+	(point))))
+
+(or (fboundp 'line-end-position)
+    (defun line-end-position ()
+      (save-excursion
+	(end-of-line)
+	(point))))
+
+)
+
+(defvar mgp-version "0.90")
+
+(defvar mgp-paper-size "a4")
+(defvar mgp-image-scale-factor 0.95)
+(defvar mgp-landscape t)
+(defvar mgp-lib-directory "/usr/X11R6/lib/X11/mgp")
+(defvar mgp-disable-color t)
+
+(defconst mgp-paper-size-list '("a5" "a4" "b5" "letter" "legal" "executive"))
+(defconst mgp-predefined-color-list
+  '("black" "white" "red" "green" "blue" "yellow" "cyan" "magenta" "gray"))
+(defvar mgp-color-list nil)
+
+(defvar mgp-entex-inbuf nil)
+(defvar mgp-entex-outbuf nil)
+
+(defvar mgp-entex-source nil)
+
+(defun mgp-entex-file (file)
+  (interactive "fMGP source file: ")
+  (setq mgp-entex-source file)
+  (mgp-entex-setup-color-data)
+  (mgp-entex-setup-buffer)
+  (mgp-entex-process-buffer)
+  (switch-to-buffer mgp-entex-outbuf)
+  (goto-char (point-min))
+  (save-buffer))
+
+(defun mgp-entex-buffer ()
+  (interactive)
+  (setq mgp-entex-source (current-buffer))
+  (mgp-entex-setup-color-data)
+  (mgp-entex-setup-buffer)
+  (mgp-entex-process-buffer)
+  (switch-to-buffer mgp-entex-outbuf)
+  (goto-char (point-min))
+  (save-buffer))
+
+(defvar mgp-max-color-value nil)
+
+(defun mgp-entex-setup-color-data ()
+  (if (eq window-system 'x)
+      (setq mgp-max-color-value (car (x-color-values "white")))))
+
+(defmacro mgp-with-output-buffer (&rest body)
+  `(let ((buf (current-buffer)))
+     (or (eq buf mgp-entex-outbuf)
+	 (set-buffer mgp-entex-outbuf))
+     (unwind-protect
+	 (progn ,@body)
+       (or (eq buf mgp-entex-outbuf)
+	   (set-buffer buf)))))
+
+(put 'mgp-with-output-buffer 'lisp-indent-function 0)
+
+(defun mgp-entex-setup-buffer ()
+  (let (filename dir coding)
+    (save-excursion
+      (setq mgp-entex-inbuf (get-buffer-create "*mgp*"))
+      (set-buffer mgp-entex-inbuf)
+      (erase-buffer)
+      (insert "%%\n")
+      (if (bufferp mgp-entex-source)
+	  (progn
+	    (save-excursion
+	      (set-buffer mgp-entex-source)
+	      (setq filename (concat (file-name-sans-extension
+				      (or buffer-file-name (buffer-name)))
+				     ".tex")
+		    dir default-directory
+		    coding (mgp-buffer-file-coding-system)))
+	    (set-buffer-file-coding-system coding)
+	    (setq default-directory dir)
+	    (insert-buffer mgp-entex-source))
+	(setq filename
+	      (concat (file-name-sans-extension mgp-entex-source) ".tex")
+	      dir
+	      (file-name-directory (expand-file-name mgp-entex-source)))
+	(insert-file-contents (expand-file-name mgp-entex-source))
+	(setq coding (mgp-buffer-file-coding-system))
+	(setq default-directory dir))
+
+      (goto-char (point-min))
+      (while (and (search-forward "\n%include" nil t)
+		  (looking-at " +\\([^ ]+\\)"))
+	(let ((incfile (mgp-entex-get-string-arg))
+	      (pos (line-beginning-position))
+	      len)
+	  (forward-line 1)
+	  (delete-region pos (point))
+	  (if (or (file-readable-p incfile)
+		  (progn
+		    (setq incfile (expand-file-name incfile mgp-lib-directory))
+		    (file-readable-p incfile)))
+	      (progn
+		(message "Inserting file %s..." incfile)
+		(insert-file-contents incfile)))
+	  (goto-char (point-min))))
+      (goto-char (point-min))
+      (while (search-forward "\\\n" nil t)
+	(delete-char -2))
+      (goto-char (point-min))
+      (setq mgp-entex-outbuf
+	    (get-buffer-create (file-name-nondirectory filename)))
+      (set-buffer mgp-entex-outbuf)
+      (erase-buffer)
+      (setq default-directory dir
+	    buffer-file-name filename)
+      (set-buffer-file-coding-system coding))))
+
+(defvar mgp-entex-continue nil)
+(defvar mgp-entex-linehead nil)
+(defvar mgp-entex-prefix "")
+
+(defun mgp-entex-process-buffer ()
+  (message "Converting MGP to LaTeX...")
+  (mgp-entex-init-global-setting)
+  (save-excursion
+    (set-buffer mgp-entex-inbuf)
+    (while (not (or (eobp) (looking-at "^%page")))
+      (mgp-entex-process-preamble)
+      (forward-line 1))
+    (mgp-entex-start-body)
+    (forward-line 1)
+    (let ((page 0)
+	  line)
+      (while (not (eobp))
+	(mgp-entex-init-local-setting)
+	(setq page (1+ page))
+	(message "Page %d" page)
+	(setq line 1)
+	(mgp-entex-start-page)
+	(setq mgp-entex-linehead t
+	      mgp-entex-prefix "")
+	(while (not (or (eobp) (looking-at "^%page")))
+	  (setq line (mgp-entex-process-page line))
+	  (forward-line 1))
+	(mgp-entex-finish-page line)
+	(forward-line 1))
+      (mgp-entex-finish-body))))
+
+(defconst mgp-setting-num 128)
+(defvar mgp-global-setting nil)
+(defvar mgp-local-setting nil)
+
+(defun mgp-entex-init-global-setting ()
+  (let ((i 2)
+	(len (* mgp-setting-num 2)))
+    (setq mgp-global-setting (make-vector len nil))
+    (aset mgp-global-setting 1 (list 'font nil))
+    (while (< i len)
+      (aset mgp-global-setting i (list 'font nil))
+      (setq i (1+ i)))))
+
+(defun mgp-entex-init-local-setting ()
+  (let ((len (length mgp-global-setting))
+	(i 0))
+    (if (< (length mgp-local-setting) len)
+	(setq mgp-local-setting (make-vector len nil)))
+    (while (< i len)
+      (aset mgp-local-setting i (copy-sequence (aref mgp-global-setting i)))
+      (setq i (1+ i)))))
+
+(defun mgp-entex-parse-cmd (globalp defaultp index)
+  (save-restriction
+    (narrow-to-region (point) (line-end-position))
+    (while (re-search-forward "[a-z]+" nil t)
+      (let ((func (intern (concat "mgp-entex-cmd-"
+				  (downcase (match-string 0))))))
+	(if (fboundp func)
+	    (funcall func globalp defaultp index)))
+      (skip-chars-forward ",")
+      (or (eobp)
+	  (forward-char 1)))))
+
+(defun mgp-entex-process-preamble ()
+  (if (looking-at "^%\\(default\\|tab\\) *")
+      (progn
+	(forward-char 1)
+	(or (eolp)
+	    (mgp-entex-parse-cmd 'global nil nil)))))
+
+(defun mgp-entex-start-body ()
+  (mgp-with-output-buffer
+    (insert "%%% This file was generated by mgp.el ")
+    (insert (format "(Ver.%s).\n"  mgp-version))
+    (insert "%%%   Document source: ")
+    (if (bufferp mgp-entex-source)
+	(insert (format "buffer \"%s\"\n" (buffer-name mgp-entex-source)))
+      (insert (format "file \"%s\"\n" mgp-entex-source)))
+    (insert (format "\\documentclass[%spaper%s]{article}\n\\input{mgp.sty}\n"
+		    (if (member mgp-paper-size mgp-paper-size-list)
+			mgp-paper-size
+		      "a4")
+		    (if mgp-landscape ",landscape" "")))
+    (or mgp-disable-color
+	(progn
+	  (insert "\\usepackage{color}\n\\definecolor{gray}{gray}{0.001}")
+	  (setq mgp-color-list (cons "gray" mgp-predefined-color-list))))
+    (let ((coding (mgp-buffer-file-coding-system)))
+      (if coding
+	  (let ((base (coding-system-base (mgp-buffer-file-coding-system))))
+	    (cond ((coding-system-equal base 'latin-1)
+		   (insert "\\usepackage[latin1]{inputenc}\n"))
+		  ((coding-system-equal base 'latin-2)
+		   (insert "\\usepackage[latin2]{inputenc}\n"))
+		  ((coding-system-equal base 'latin-3)
+		   (insert "\\usepackage[latin3]{inputenc}\n"))
+		  ((coding-system-equal base 'latin-5)
+		   (insert "\\usepackage[latin5]{inputenc}\n"))))))
+    (insert "\\begin{document}\n")))
+
+(defun mgp-entex-finish-body ()
+  (mgp-with-output-buffer
+    (insert "\n\\end{document}\n")))
+
+(defun mgp-entex-set-setting (globalp defaultp index prop val)
+  (let ((table (if globalp mgp-global-setting mgp-local-setting)))
+    (or defaultp
+	(setq index (+ mgp-setting-num index)))
+    (plist-put (aref table index) prop val)))
+
+(defun mgp-entex-get-setting (globalp defaultp index prop this-line-only)
+  (let ((table (if globalp mgp-global-setting mgp-local-setting))
+	(limit 0)
+	val)
+    (or defaultp
+	(setq index (+ mgp-setting-num index)
+	      limit mgp-setting-num))
+    (if this-line-only
+	(setq limit index))
+    (while (and (>= index limit) (not val))
+      (setq val (plist-get (aref table index) prop))
+      (setq index (1- index)))
+    val))
+
+(defun mgp-entex-get-string-arg ()
+  (skip-chars-forward " \t")
+  (if (= (following-char) ?\")
+      (read (current-buffer))
+    (if (looking-at "[^, \n]+")
+	(progn
+	  (goto-char (match-end 0))
+	  (match-string 0)))))
+
+(defun mgp-entex-get-number-arg ()
+  (if (looking-at " *[0-9.]+")
+      (let ((num (string-to-int (match-string 0))))
+	(goto-char (match-end 0))
+	num)))
+
+(defun mgp-entex-cmd-default (globalp &rest ignore)
+  (let ((index (mgp-entex-get-number-arg)))
+    (goto-char (match-end 0))
+    (mgp-entex-parse-cmd globalp 'default index)))
+
+(put 'mgp-entex-cmd-default 'mgp-entex-special t)
+
+(defun mgp-entex-cmd-tab (globalp &rest ignore)
+  (let ((index (mgp-entex-get-number-arg)))
+    (goto-char (match-end 0))
+    (mgp-entex-parse-cmd globalp nil index)))
+
+(put 'mgp-entex-cmd-tab 'mgp-entex-special t)
+
+(defvar mgp-mark-position nil)
+(defvar mgp-current-line nil)
+
+(defun mgp-entex-cmd-mark (globalp defaultp index)
+  (setq mgp-mark-position
+	(cons mgp-current-line
+	      (mgp-with-output-buffer (line-beginning-position)))))
+
+(defun mgp-entex-cmd-again (globalp defaultp index)
+  (mgp-entex-set-setting globalp defaultp index 'again t))
+
+(defun mgp-entex-cmd-fore (globalp defaultp index)
+  (let ((arg (mgp-entex-get-string-arg)))
+    (if arg
+	(mgp-entex-set-setting globalp defaultp index 'fore arg))))
+
+(defun mgp-entex-cmd-back (globalp defaultp index)
+  (let ((arg (mgp-entex-get-string-arg)))
+    (if arg
+	(mgp-entex-set-setting globalp defaultp index 'back arg))))
+
+(defun mgp-entex-cmd-size (globalp defaultp index)
+  (let ((arg (mgp-entex-get-number-arg)))
+    (if arg
+	(mgp-entex-set-setting globalp defaultp index 'size arg))))
+
+(defun mgp-entex-cmd-center (globalp defaultp index)
+  (mgp-entex-set-setting globalp defaultp index 'align 'center))
+
+(defun mgp-entex-cmd-left (globalp defaultp index)
+  (mgp-entex-set-setting globalp defaultp index 'align 'left))
+
+(defun mgp-entex-cmd-leftfill (globalp defaultp index)
+  (mgp-entex-set-setting globalp defaultp index 'align 'left))
+
+(defun mgp-entex-cmd-right (globalp defaultp index)
+  (mgp-entex-set-setting globalp defaultp index 'align 'right))
+
+(defun mgp-entex-cmd-vgap (globalp defaultp index)
+  (let ((arg (mgp-entex-get-number-arg)))
+    (if arg
+	(mgp-entex-set-setting globalp defaultp index 'vgap arg))))
+
+(defun mgp-entex-cmd-font (globalp defaultp index)
+  (let ((arg (mgp-entex-get-string-arg)))
+    (if arg
+	(mgp-entex-set-setting globalp defaultp index 'font arg))))
+
+(defun mgp-entex-cmd-xfont (globalp defaultp index)
+  (let ((arg (mgp-entex-get-string-arg)))
+    (if arg
+	(mgp-entex-set-setting globalp defaultp index 'font arg))))
+
+(defun mgp-entex-cmd-cont (globalp defaultp index)
+  (mgp-entex-set-setting globalp defaultp index 'cont t))
+
+(defun mgp-entex-cmd-nodefault (globalp defaultp index)
+  (if globalp
+      (error "%nodefault can't be used in preamble"))
+  (let ((len (length mgp-local-setting))
+	(i 2))
+    (aset mgp-local-setting 1 (list 'font nil))
+    (while (< i len)
+      (aset mgp-local-setting i (list 'font nil))
+      (setq i (1+ i)))))
+
+(defun mgp-entex-cmd-bar (globalp defaultp index)
+  (let ((color (mgp-entex-get-string-arg))
+	(width (or (mgp-entex-get-number-arg) 10))
+	(start (or (mgp-entex-get-number-arg) 0))
+	(length (or (mgp-entex-get-number-arg) 100)))
+    (mgp-entex-set-setting globalp defaultp index 'bar
+			   (list color width start length))))
+
+(defun mgp-entex-cmd-image (globalp defaultp index)
+  (let ((arg1 (mgp-entex-get-string-arg)))
+    (if arg1
+	(let ((arg2 (mgp-entex-get-string-arg))
+	      (arg3 (mgp-entex-get-string-arg))
+	      (arg4 (mgp-entex-get-string-arg))
+	      (arg5 (mgp-entex-get-string-arg)))
+;;; SYNTAX for %image is documented as below:	  
+;;; %image "imagefile" <numcolor> <xzoomrate> <yzoomrate> <zoomflag>
+;;; %image "imagefile" [<numcolor>] <screensize>
+;;; but it seems the second form should actually be:
+;;; %image "imagefile" [ [<numcolor>] <screensize> ]
+	  (if arg4
+	      (setq arg2 (and arg2 (string-to-int arg2))
+		    arg3 (and arg3 (string-to-int arg3))
+		    arg4 (and arg4 (string-to-int arg4))
+		    arg5 (and arg5 (string-to-int arg5)))
+	    (if arg3
+		(setq arg2 (string-to-int arg2))
+	      (setq arg3 arg2 arg2 nil)))
+	  (mgp-entex-set-setting globalp defaultp index 'image
+				 (list arg1 arg2 arg3 arg4 arg5))))))
+
+(defun mgp-entex-cmd-prefix (globalp defaultp index)
+  (let ((arg (mgp-entex-get-string-arg)))
+    (if arg
+	(mgp-entex-set-setting globalp defaultp index 'prefix arg))))
+
+(defun mgp-entex-cmd-icon (globalp defaultp index)
+  (let* ((type (mgp-entex-get-string-arg))
+	 ;; Currently color and size are just ignored.
+	 (color (mgp-entex-get-string-arg))
+	 (size (mgp-entex-get-number-arg))
+	 (str (cond ((string= type "arc") "$\\bullet$")
+		    ((string= type "box") "$\\Box$")
+		    ((string= type "dia") "$\\Diamond$")
+		    ((string= type "delta1") "$\\bigtriangleup$")
+		    ((string= type "delta2") "$\\bigtriangledown$")
+		    ((string= type "delta3") "$\\triangleright$")
+		    ((string= type "delta4") "$\\triangleleft$")
+		    (t "$\\diamond$"))))
+    (mgp-entex-set-setting globalp defaultp index 'icon str)))
+
+(defconst mgp-entex-special-characters
+  '((?# . "\\#")
+    (?$ . "\\$")
+    (?% . "\\%")
+    (?& . "\\&")
+    (?_ . "\\_")
+    (?@ . "{\\makeatletter@\\makeatother}")
+    (?< . "$<$")
+    (?> . "$>$")
+    (?~ . "\\~{ }")))
+
+(defconst mgp-entex-space-width 4)
+
+(defun mgp-entex-handle-string (str prefix &optional size force-indent)
+  (mgp-with-output-buffer
+    (let ((len (length str))
+	  (indent 0)
+	  i j)
+      (if prefix
+	  (progn
+	    (if (string-match "^ +" prefix)
+		(setq indent (match-end 0)
+		      prefix (substring prefix indent)))))
+      (if (and (not force-indent)
+	       (= indent 0) (= (length prefix) 0) (= len 0))
+	  (if (eq mgp-entex-linehead t)
+	      (setq mgp-entex-linehead 'empty))
+	(if (or prefix force-indent)
+	    (insert "{"))
+	(if size
+	    (mgp-entex-handle-size size))
+	(if (or (> indent 0) (> (length prefix) 0))
+	    (insert (format "\\mgpi{%d}{%s}" indent prefix)))
+	(if (string-match "^ +" str)
+	    (if (< (match-end 0) len)
+		(progn
+		  (setq i (match-end 0) j i)
+		  (insert (format "\\mgps{%d}" i)))
+	      (setq i len j i))
+	  (setq i 0 j 0))
+	(while (< i len)
+	  (let ((slot (assq (aref str i) mgp-entex-special-characters)))
+	    (if slot
+		(progn
+		  (if (< j i)
+		      (insert (substring str j i)))
+		  (insert (cdr slot))
+		  (setq j (1+ i)))))
+	  (setq i (1+ i)))
+	(if (< j len)
+	    (insert (substring str j)))
+	(setq mgp-entex-linehead nil)))))
+
+(defun mgp-entex-process-page (line)
+  (setq mgp-current-line line)
+  (if (memq (following-char) '(?% ?#))
+      (progn
+	(forward-char 1)
+	(if (or (eolp) (= (preceding-char) ?#) (= (following-char) ?%))
+	    nil
+	  (mgp-entex-parse-cmd nil 'default line)))
+    (let* ((str (buffer-substring (point) (line-end-position)))
+	   (plist (aref mgp-local-setting line))
+	   (continued (plist-get plist 'cont)))
+      (if continued
+	  (plist-put plist 'cont nil)
+	(mgp-with-output-buffer
+	  (cond ((eq mgp-entex-linehead 'empty)
+		 (insert "\\nl\n")
+		 (setq mgp-entex-linehead t))
+		((not mgp-entex-linehead)
+		 (insert "\\nl}\n")
+		 (setq mgp-entex-linehead t)))
+	  (setq line (1+ line))))
+      (let (func)
+	(while plist
+	  (setq func (intern (concat "mgp-entex-handle-"
+				     (symbol-name (car plist)))))
+	  (if (fboundp func)
+	      (funcall func (nth 1 plist)))
+	  (setq plist (nthcdr 2 plist))))
+      (let ((indent 0)
+	    (len (length str)))
+	(or continued
+	    (while (and (< indent len) (= (aref str indent) ?\t))
+	      (setq indent (1+ indent))))
+	(if (> indent 0)
+	    (mgp-entex-handle-indent indent str)
+	  (mgp-entex-handle-string str
+				   (and (not continued) mgp-entex-prefix))))))
+  line)
+
+(defun mgp-entex-start-page ()
+  (mgp-with-output-buffer
+    (insert "\\parbox{\\hsize}{\n")
+    ))
+
+(defun mgp-entex-finish-page (line)
+  (mgp-with-output-buffer
+    (let ((plist (aref mgp-local-setting line))
+	  func)
+      (while plist
+	(setq func (intern (concat "mgp-entex-handle-"
+				   (symbol-name (car plist)))))
+	(if (fboundp func)
+	    (funcall func (nth 1 plist)))
+	(setq plist (nthcdr 2 plist))))
+    (cond ((eq mgp-entex-linehead 'empty)
+	   (insert "\\nl\n")
+	   (setq mgp-entex-linehead t))
+	  ((not mgp-entex-linehead)
+	   (insert "\\nl}\n")
+	   (setq mgp-entex-linehead t)))
+    (insert "}\n\\newpage\n")
+    (setq mgp-entex-linehead t)))
+
+(defun mgp-entex-handle-again (&rest arg)
+  (mgp-with-output-buffer
+    (if mgp-mark-position
+	(progn
+	  ;;(setq line (car mgp-mark-position))
+	  (goto-char (cdr mgp-mark-position))
+	  (delete-region (point) (point-max))))))
+
+(defun mgp-entex-handle-font (arg)
+  (if arg
+      (mgp-with-output-buffer
+	(insert "\\normalfont")
+	(cond ((string-match "bold-r" arg) (insert "\\bfseries"))
+	      ((string-match "bold-[oi]" arg) (insert "\\bfseries\\itshape"))
+	      ((string-match "medium-[oi]" arg) (insert "\\itshape")))
+	(insert " "))))
+
+(defun mgp-entex-define-color (arg)
+  (or (member arg mgp-color-list)
+      (and (eq window-system 'x)
+	   (let ((color-values (x-color-values arg)))
+	     (insert (format "\\definecolor{%s}{rgb}{" arg))
+	     (while color-values
+	       (insert (format "%.3f" (/ (float (car color-values))
+					 mgp-max-color-value)))
+	       (setq color-values (cdr color-values))
+	       (if color-values
+		   (insert ",")))
+	     (insert "}")
+	     t))))
+
+(defun mgp-entex-handle-back (arg)
+  (or mgp-disable-color
+      (mgp-with-output-buffer
+	(if (string= arg "black")
+	    (setq arg "gray"))
+	(if (mgp-entex-define-color arg)
+	    (insert (format "\\pagecolor{%s}" arg))))))
+
+(defun mgp-entex-handle-fore (arg)
+  (or mgp-disable-color
+      (mgp-with-output-buffer
+	(if (mgp-entex-define-color arg)
+	    (insert (format "\\color{%s}" arg))))))
+
+(defun mgp-entex-handle-size (arg)
+  (mgp-with-output-buffer
+    (cond ((>= arg 10) (insert "\\Huge "))
+	  ((>= arg 7) (insert "\\huge "))
+	  ((>= arg 6) (insert "\\LARGE "))
+	  ((>= arg 5) (insert "\\Large "))
+	  ((>= arg 4) (insert "\\large "))
+	  ((>= arg 3) (insert "\\normalsize "))
+	  (t (insert "\\tiny ")))))
+
+(defun mgp-entex-handle-icon (arg)
+  (mgp-with-output-buffer
+    (insert arg)))
+
+(defun mgp-entex-handle-indent (indent str)
+  (mgp-with-output-buffer
+    (let ((prefix (or (mgp-entex-get-setting nil nil indent 'prefix t) " "))
+	  (size (mgp-entex-get-setting nil nil indent 'size t))
+	  (icon (mgp-entex-get-setting nil nil indent 'icon t)))
+      (if icon
+	  (setq prefix (concat prefix icon)))
+      (mgp-entex-handle-string (substring str indent) prefix size t))))
+
+(defun mgp-entex-handle-prefix (arg)
+  (setq mgp-entex-prefix arg))
+
+(defun mgp-entex-handle-align (arg)
+  (mgp-with-output-buffer
+    (insert
+     (cond ((eq arg 'center) "\\centering ")
+	   ((eq arg 'right) "\\raggedleft ")
+	   (t "\\raggedright ")))))
+
+(defun mgp-entex-handle-vgap (arg)
+  ;; Currently we don't support it.
+  )
+
+(defun mgp-entex-handle-bar (arg)
+  (mgp-with-output-buffer
+    (cond ((eq mgp-entex-linehead 'empty)
+	   (insert "\\nl\n")
+	   (setq mgp-entex-linehead t))
+	  ((not mgp-entex-linehead)
+	   (insert "\\nl}\n")
+	   (setq mgp-entex-linehead t)))
+    (insert (format "\\mgpb{%d}{%d}{%d}\n"
+		    (floor (nth 1 arg))
+		    (floor (nth 2 arg))
+		    (floor (nth 3 arg))))))
+
+(defun mgp-entex-handle-image (arg)
+  (let ((file (car arg))
+	;;(numcolor (nth 1 arg)) ; not supported
+	(xzoom (nth 2 arg))
+	(yzoom (nth 3 arg))
+	(zoomflag (nth 4 arg))
+	(screensize))
+    (setq file (concat (file-name-sans-extension file) ".ps"))
+    (or (file-readable-p file)
+	(setq file (concat (file-name-sans-extension file) ".eps")))
+    (if (file-readable-p file)
+	(mgp-with-output-buffer
+	  (if zoomflag
+	      (if (and (= yzoom 0) (= xzoom 0))
+		  (insert (format "\\includegraphics{%s}" file))
+		(insert
+		 (format "\\scalebox{%f}[%f]{\\includegraphics{%s}}"
+			 (* (/ (float xzoom) 100) mgp-image-scale-factor)
+			 (* (/ (float yzoom) 100) mgp-image-scale-factor)
+			 file)))
+	    (insert (format "\\resizebox{\\hsize}{!}{\\includegraphics{%s}}"
+			    file)))))))
+
+
+(provide 'mgp)
+
+;; mgp.el ends here
Index: kit/contrib/mgp-el/mgp.sty
diff -u /dev/null kit/contrib/mgp-el/mgp.sty:1.1
--- /dev/null	Mon May  3 05:10:11 1999
+++ kit/contrib/mgp-el/mgp.sty	Fri Apr 30 00:42:48 1999
@@ -0,0 +1,101 @@
+%%% mgp.sty --- style file for a LaTeX file created by mgp.el
+%%% Copyright (C) 1999 Electrotechnical Lab., JAPAN
+
+%% Author: K.Handa <handa@etl.go.jp>
+%% Created: 1999/04/28
+
+%% This file is not part of GNU Emacs, but the same permissions apply.
+%%
+%% GNU Emacs is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2, or (at your option)
+%% any later version.
+%%
+%% GNU Emacs is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with GNU Emacs; see the file COPYING.  If not, write to the
+%% Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+%% Boston, MA 02111-1307, USA.
+
+%% Disable special handling of `@'.
+\makeatletter
+%% Copied from slides.cls and modified slightly.
+\def\rmdefault{lcmss}        % no roman
+\def\sfdefault{lcmss}
+\def\ttdefault{lcmtt}
+\def\itdefault{sl}
+\def\sldefault{sl}
+\def\bfdefault{bx}
+\def\ifourteenpt{13.82}
+\def\iseventeenpt{16.59}
+\def\itwentypt{19.907}
+\def\itwentyfourpt{23.89}
+\def\itwentyninept{28.66}
+\def\ithirtyfourpt{34.4}
+\def\ifortyonept{41.28}
+\def\@setfontsize@parms#1{%
+   \lineskip #1\relax%
+   \parskip #1\relax%
+  \baselineskip\baselinestretch\baselineskip%
+  \normalbaselineskip\baselineskip}
+\def\normalsize{%
+      \@setfontsize\normalsize\itwentypt{22\p@}%
+      \@setfontsize@parms{\z@}}
+\def\small{\@setfontsize\small\iseventeenpt{19\p@ plus3\p@}%
+           \@setfontsize@parms{2\p@}}
+\let\footnotesize=\small
+\let\scriptsize=\small
+\def\tiny{\@setfontsize\tiny\ifourteenpt{16\p@ plus2\p@}%
+          \@setfontsize@parms{2pt}}
+\def\large{\@setfontsize\large\itwentyfourpt{26\p@ plus8\p@}%
+           \@setfontsize@parms{2\p@}}
+\def\Large{\@setfontsize\Large\itwentyninept{31\p@ plus10\p@}%
+           \@setfontsize@parms{2\p@}}
+\def\LARGE{\@setfontsize\LARGE\ithirtyfourpt{36\p@ plus10\p@}%
+           \@setfontsize@parms{2\p@}}
+\def\huge{\@setfontsize\huge\ifortyonept{43\p@ plus10\p@}%
+           \@setfontsize@parms{2\p@}}
+\let\Huge\huge
+%% Put 1cm margin at top and bottom.
+\setlength\topmargin{-1in}
+\advance\topmargin by1cm
+\textheight\paperheight\advance\textheight by-2cm
+%% Put 1cm margin at left and right
+\setlength\oddsidemargin{-1in}
+\advance\oddsidemargin by1cm
+\textwidth\paperwidth\advance\textwidth by-2cm
+%% No surplus spaces.
+\setlength\headheight{0pt}
+\setlength\headsep   {0pt}
+\setlength\topskip   {0pt}
+\setlength\footskip  {0pt}
+\setlength\parindent {0pt}
+\pagestretch20mm
+\pagestyle{empty}
+%% Special command for line breaking.
+\def\nl{\hskip0pt minus10mm\nopagebreak[4]\\}
+\newdimen\mgpdimenx
+\newdimen\mgpdimeny
+\newbox\mgpbox
+%% Hanging indent
+\def\mgpi#1#2{\setbox\mgpbox=\hbox{#2\hskip.5mm}%
+\mgpdimenx#1em\divide\mgpdimenx by2\advance\mgpdimenx by\wd\mgpbox%
+\parindent\mgpdimenx\hangindent\mgpdimenx\indent\llap{\box\mgpbox}\ignorespaces}
+%% Horizontal skip
+\def\mgps#1{\mgpdimenx#1em\divide\mgpdimenx by2\hskip\mgpdimenx}
+%% Draw horizontal bar.
+\def\mgpb#1#2#3{%
+\mgpdimeny\textheight\divide\mgpdimeny by1000#1\multiply\mgpdimeny by#1%
+\mgpdimenx\textwidth\divide\mgpdimenx by100\multiply\mgpdimenx by#2%
+\makebox[\mgpdimenx]{}%
+\mgpdimenx\textwidth\divide\mgpdimenx by100\multiply\mgpdimenx by#3%
+\rule{\mgpdimenx}{\mgpdimeny}\\\vskip-10pt minus10pt}
+%% Enable special handling of `@'.
+\makeatother
+%% Some other packages
+\usepackage{latexsym}
+\usepackage{graphics}
Index: kit/contrib/mgp-el/sample.tex
diff -u /dev/null kit/contrib/mgp-el/sample.tex:1.1
--- /dev/null	Mon May  3 05:10:13 1999
+++ kit/contrib/mgp-el/sample.tex	Fri Apr 30 00:42:48 1999
@@ -0,0 +1,180 @@
+%%% This file was generated by mgp.el (Ver.0.90).
+%%%   Document source: file "sample.mgp"
+\documentclass[a4paper,landscape]{article}
+\input{mgp.sty}
+\begin{document}
+\parbox{\hsize}{
+\normalfont \huge \nl
+\nl
+\nl
+\normalfont \centering {MagicPoint\nl}
+\normalfont \nl
+\nl
+\large {Keio University\nl}
+{Yoshifumi Nishida\nl}
+\normalsize {nishida{\makeatletter@\makeatother}sfc.wide.ad.jp\nl}
+\nl
+\large {Type SPC key!!\nl}
+}
+\newpage
+\parbox{\hsize}{
+\normalfont \raggedright \tiny \nl
+\huge {\mgpi{1}{}How to Use \nl}
+\tiny \mgpb{10}{0}{100}
+{\mgpi{1}{}\nl}
+\normalfont \Large {\Large \mgpi{2}{$\Box$}forward page-$>$ press mouse1 button \nl}
+{\Large \mgpi{2}{$\Box$}backward page-$>$ press mouse3 button \nl}
+{\Large \mgpi{2}{$\Box$}quit -$>$ press q key \nl}
+{\mgpi{1}{}\nl}
+}
+\newpage
+\parbox{\hsize}{
+\normalfont \raggedright \tiny \nl
+\huge {\mgpi{1}{}Command Line Option \nl}
+\tiny \mgpb{10}{0}{100}
+{\mgpi{1}{}\nl}
+\normalfont \Large {\mgpi{4}{-h:}display usage.\nl}
+{\mgpi{4}{-g:}geometry. Set the size of window, and placement.\nl}
+{\mgpi{4}{-o:}Do not override window manager.\nl}
+{\mgpi{4}{-b:}bgcolor. Set background color to bgcolor. (default: black)\nl}
+{\nl}
+\nl
+{\nl}
+}
+\newpage
+\parbox{\hsize}{
+\normalfont \raggedright \tiny \nl
+\huge {\mgpi{1}{}Place text whereever you like!\nl}
+\tiny \mgpb{10}{0}{100}
+{\mgpi{1}{}\nl}
+\normalfont \LARGE \centering {\mgpi{1}{}center\nl}
+{\mgpi{1}{}\nl}
+{\mgpi{1}{}\nl}
+\raggedright {\mgpi{1}{}left\nl}
+{\mgpi{1}{}\nl}
+\raggedleft {\mgpi{1}{}right\nl}
+}
+\newpage
+\parbox{\hsize}{
+\normalfont \raggedright \tiny \nl
+\huge {\mgpi{1}{}Use any font size as you like!\nl}
+\tiny \mgpb{10}{0}{100}
+{\mgpi{1}{}\nl}
+\normalfont \Large {\mgpi{1}{}\nl}
+\centering \Huge {\mgpi{1}{}Hello World\nl}
+\huge {\mgpi{1}{}Hello World\nl}
+\Large {\mgpi{1}{}Hello World\nl}
+\large {\mgpi{1}{}Hello World\nl}
+\normalsize {\mgpi{1}{}Hello World\nl}
+\tiny {\mgpi{1}{}Hello World\nl}
+\tiny {\mgpi{1}{}Hello World\nl}
+}
+\newpage
+\parbox{\hsize}{
+\normalfont \raggedright \tiny \nl
+\huge {\mgpi{1}{}Font is selectable\nl}
+\tiny \mgpb{10}{0}{100}
+{\mgpi{1}{}\nl}
+\normalfont \Large {\mgpi{1}{}\nl}
+\large \centering {\mgpi{1}{}\nl}
+\normalfont {\mgpi{1}{}This is times-medium-r\nl}
+{\mgpi{1}{}\nl}
+\normalfont\itshape {\mgpi{1}{}This is times-medium-i\nl}
+{\mgpi{1}{}\nl}
+\normalfont\bfseries {\mgpi{1}{}This is times-bold-r\nl}
+{\mgpi{1}{}\nl}
+\normalfont\bfseries\itshape {\mgpi{1}{}This is times-bold-i\nl}
+}
+\newpage
+\parbox{\hsize}{
+\normalfont \raggedright \tiny \nl
+\huge {\mgpi{1}{}Control can be mixed\nl}
+\tiny \mgpb{10}{0}{100}
+{\mgpi{1}{}\nl}
+\normalfont \Large {\mgpi{1}{}\nl}
+\normalfont \large {\mgpi{1}{}This is a\normalfont \LARGE Test\normalfont \Large message\nl}
+\normalfont \Large {\mgpi{1}{}\nl}
+}
+\newpage
+\parbox{\hsize}{
+\normalfont \raggedright \tiny \nl
+\huge {\mgpi{1}{}Automatic folding of long line!\nl}
+\tiny \mgpb{10}{0}{100}
+{\mgpi{1}{}\nl}
+\normalfont \Large {\Large \mgpi{2}{$\Box$}Hello, this is MagicPoint. I can properly handle the folding opeation of very long line, of course english word-wise.  The source code of this line is made up by a single line.\nl}
+{\large \mgpi{6}{$\bullet$}This is the next line. Even if the indentation changes, I can handle this!  Yey!\nl}
+{\Large \mgpi{2}{$\Box$}You can also connect the line using backslash.  Yes, UNIX tradition.\nl}
+}
+\newpage
+\parbox{\hsize}{
+\normalfont \raggedright \tiny \nl
+\huge {\mgpi{1}{}Place inline images!\nl}
+\tiny \mgpb{10}{0}{100}
+{\mgpi{1}{}\normalfont \Large \centering \nl}
+}
+\newpage
+\parbox{\hsize}{
+\normalfont \raggedright \tiny \nl
+\huge {\mgpi{1}{}Special effects!\nl}
+\tiny \mgpb{10}{0}{100}
+{\mgpi{1}{}\nl}
+\normalfont \Large {\mgpi{1}{}\nl}
+\LARGE \centering {\mgpi{1}{}test message\nl}
+{\mgpi{1}{}\nl}
+{\mgpi{1}{}test message\nl}
+{\mgpi{1}{}\nl}
+{\mgpi{1}{}test message\nl}
+}
+\newpage
+\parbox{\hsize}{
+\normalfont \raggedright \tiny \nl
+\huge {\mgpi{1}{}Pause\nl}
+\tiny \mgpb{10}{0}{100}
+{\mgpi{1}{}\nl}
+\normalfont \Large {\Large \mgpi{2}{$\Box$}tap space bar (twice) to proceed.\nl}
+{\mgpi{1}{}\nl}
+\centering {\mgpi{1}{}Happy hacking!\nl}
+{\mgpi{1}{}Happy hacking!\nl}
+{\mgpi{1}{}Happy hacking!\nl}
+}
+\newpage
+\parbox{\hsize}{
+\normalfont \raggedright \tiny \nl
+\huge {\mgpi{1}{}Grab command output into foils\nl}
+\tiny \mgpb{10}{0}{100}
+{\mgpi{1}{}\nl}
+\normalfont \Large {\Large \mgpi{2}{$\Box$}ls -l /kernel /bsd\nl}
+{\mgpi{1}{}\nl}
+\normalsize {\mgpi{5}{}\nl}
+{\Large \mgpi{2}{$\Box$}echo "this is test" | rev\nl}
+{\mgpi{5}{}\nl}
+{\mgpi{5}{}this is test\nl}
+{\mgpi{5}{}\nl}
+}
+\newpage
+\parbox{\hsize}{
+\normalfont \raggedright \tiny \nl
+\huge {\mgpi{1}{}Subprocess (multimedia!)\nl}
+\tiny \mgpb{10}{0}{100}
+{\mgpi{1}{}\nl}
+\normalfont \Large {\mgpi{1}{}\nl}
+{\Large \mgpi{2}{$\Box$}Invoke xanim/mpegplay for multimedia presentation! :-)\nl}
+{\mgpi{1}{}\nl}
+{\Large \mgpi{2}{$\Box$}No duplicated subprocess for one declaration.\nl}
+{\Large \mgpi{2}{$\Box$}Geometry can be presentation-screen relative.\nl}
+{\Large \mgpi{2}{$\Box$}xeyes will vanish if you switch the page.\nl}
+{\mgpi{1}{}\nl}
+}
+\newpage
+\parbox{\hsize}{
+\normalfont \raggedright \tiny \nl
+\huge {\mgpi{1}{}Have a nice day!\nl}
+\tiny \mgpb{10}{0}{100}
+{\mgpi{1}{}\nl}
+\normalfont \Large {\Large \mgpi{2}{$\Box$}Visit\nl}
+{\large \mgpi{6}{$\bullet$}\normalfont http://www.mew.org/mgp/\nl}
+\normalfont {\Large \mgpi{2}{$\Box$}for upcoming information.\nl}
+}
+\newpage
+
+\end{document}
