[Willem Minten's Home Page] [SISTA] [Department of Electrical Engineering (ESAT)] [Faculty of Engineering] [K.U.Leuven]
Last
modification June 29, 1998
Feedback? Willem.Minten@esat.kuleuven.ac.be
Page on
http://www.esat.kuleuven.ac.be/~minten/NTTeXing/NTTeXing.html
Software, and lisp files can be found in
ftp://ftp.esat.kuleuven.ac.be/pub/SISTA/minten/soft/NTemacs/
.
cd /tex-archive/systems/win32/miktex/ bin get 1.11.zipAll other information about the installation can be found in
miktex111_beta1.exe
.
In order to benefit from several setting used below, you are urged to
use c:\texmf
as root directory of MiKTEX.
If you do
not want to do this, then you should consult yourself the manuals
to see what else
should be modified too.
dvi
preview with
YAP
(Yet Another Previewer).
c:\texmf\doc\miktex\
(miktex.html
or miktex.hlp
or
miktex.pdf
).
c:\localtexmf
can be created.
It is recommended to use this local
texmf tree for personal use (additional style files, etc.). See point
2 (Input directory) below.
PATH
has to be defined as follows:
autoexec.bat
:
set PATH=%PATH%;c:\texmf\miktex\bin
.
<Control Pannel>
,
<System>
, <Environment>
.
PATH
.
%PATH%;c:\texmf\miktex\bin
.
<OK>
.
c:\texmf\tex\latex
, c:\texmf\tex\generic
and its subdirectories. By default, additional
missing style files (.sty
,
.tex
, and .cls
),
unpacked packages etc are to
be put in these directories. The directory c:\loacaltexmf
can
be used for adding personal files. Then they should be placed in
c:\localtexmf\tex\latex
, c:\localtexmf\tex\generic
and its subdirectories.
c:\texmf\tex\plain
and its subdirectories.
readme.txt
in miktex.zip
.
c:\
.
c:\emacs-XX.YY\
into c:\emacs\
(This makes life and future updates easier).
Then double-click on
c:\emacs\bin\addpm.exe
and click on <OK>
.
You can also type at a DOS prompt (while staying
in the bin
directory of
NTemacs: addpm.exe c:\emacs
)
shortcut to runemacs.exe
and place it where you want to
keep it.
<My Computer>
,
<View>
,
<Options>
, <File Types>
, <New Type>
.
LaTeX file
.
tex
.
<New>
.
At the 'Action' -prompt type open
.
C:\emacs\bin\shortcut to runemacs.exe
, AND append to this
the option
--debug-init
(leave one space between the option and the executable; remark the
two minus signs as option selector). This option warns you if the
emacs INIT-file (i.e. .emacs
or _emacs
) contains errors.
<OK>
, thereafter press <Close>
, and again
<Close>
.
C:\emacs\data
and
C:\emacs\lock.
.tex
-file.
Emacs will run with the selected file in a buffer.
The default latex major mode should be selected. This is not yet the
AUC-TEX mode.
.tex
-file is located
in a path containing a directory with spaces in its name. Avoid
this!
C-x
is a simultaneous keypress of the <Control>
and the
x
key, M-x
is a simultaneous keypress of the <Alt>
and the
x
key. An alternative of the <Alt>
is the <Esc>
key. Please consult the <Help>
menu for additional information
on using emacs.
auctex.zip
from
ftp://ftp.dina.kvl.dk/pub/Staff/Per.Abrahamsen/auctex/
(The AUCTEX home page is
http://sunsite.auc.dk/auctex/
).
C:\emacs\site-lisp
.
auctex.zip
in the directory
C:\emacs\site-lisp\
.
C:\emacs\site-lisp\auctex-X.YZ
into
C:\emacs\site-lisp\auctex
(This makes life and future updates easier).
.emacs
or
_emacs
in the
NTemacs directory C:\emacs
:
;;beginning of _emacs ;; author W. Minten ;; last modification September 15, 1997 ;; no emacs start-up message (setq inhibit-startup-message t) (put 'eval-expression 'disabled nil) (setq text-mode-hook '(lambda() (auto-fill-mode 1))) ;; Redefine some keys. (global-set-key [home] 'beginning-of-line) (global-set-key [end] 'end-of-line) ;; prevent echoing ^M in the shell (a hard one) (add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m nil t) ;; fontification font-lock.el much better than the default hilit19.el ;***************************** (for coloring) ;;automatic Font Lock mode in TeX mode ;(add-hook 'tex-mode-hook 'turn-on-font-lock) ;;if Font Lock necessary for other than .tex files, uncomment following (global-font-lock-mode t) ;; load default lisp file (.el) for improved LaTeX mode ;; all settings are located in tex-site, hence ;************************************************************** (load "~/site-lisp/tex-site") ;;end of _emacsIn this file over-all settings of emacs are found. Because the specific Major-mode setting of AUC-TEX is rather large, it is defined in another lisp file, namely
tex-site.el
(next
item); this is loaded with the last command of _emacs
.
Remark: this INIT-file will only be loaded if the HOME
variable has been set properly to the NTemacs root directory.
Therefore
autoexec.bat
:
set HOME=c:\emacs\
.
<Control Pannel>
,
<System>
, <Environment>
.
HOME
.
c:\emacs\
.
<OK>
.
HOME
directory is called ~\
or
~/
.
(load "~/site-lisp/tex-site")
, save that file
as .emacs
(or _emacs
) in ~\
, and double click on
a .tex
file. This file should be loaded in an emacs buffer
without
any error interruption. Comments can be observed in the
<Buffer>
, <Messages>
.
<Home>
and <End>
. The default
behavior of NTemacs is to jump to the beginning and the end of the
buffer.
However, since these keys are redefined in the INIT file, its behavior
should be a jump to the beginning and the end of the actual line.
tex-site.el
in the NTemacs subdirectory
~\site-lisp
.
Please read the important comments included in this lisp file!!
tex-site.el
can be found in this ftp directory:
;;beginning of tex-site.el ;; modifications by W. Minten ;; Last modification August 17, 1997 ;;; Customization: ;; If you want to make AUC TeX aware of style files and multi-file ;; documents right away. (setq TeX-auto-save t) (setq TeX-parse-self t) (setq default-TeX-master nil) ;; Copy variables you need to change from the start of `tex.el' and ;; insert them here. (defvar no-doc "This function is part of AUC TeX, but has not yet been loaded. Full documentation will be available after autoloading the function." "Documentation for autoload functions.") (defvar TeX-lisp-directory "~/site-lisp/auctex/" "*The directory where the AUC TeX lisp files are located.") ;;; The two following definitions are in accordance with the installation ;; setting of MiKTeX as described in the Local Guide of MiKTeX ;; c:\texmf\doc\miktex\miktex.html (defvar TeX-macro-global '("c:/texmf/tex" "c:/localtexmf/tex") "*Directories containing the sites TeX macro and style files. Normally, AUC TeX will only allow you to complete a short list of built-in macros and environments and on the macros you define yourself. If you issue the `M-x TeX-auto-generate-global' command after loading AUC TeX, you will be able to complete on all macros available in the standard style files used by your document. To do this, you must set this variable to a list of directories where the standard style files are located. ") ;; The 'TeX-command-list' (pull-down menu at the top of emacs appearing when ;; emacs is in TeX major mode) consists of the options below. ;; Invoking 'C-c C-c' in a TeX major mode will run the "LaTeX" command ;; of the command list. (After compiling, errors can be retrieved by ;; invoking 'C-c `' (Control-c accent-gr\`ave). ;; If no errors occur and if all cross-references are known, a second ;; 'C-c C-c' will run the 'View' command of the list. (defvar TeX-command-list (list(list "LaTeX" "latex \\nonstopmode\\input{%t}" 'TeX-run-LaTeX nil t) (list "View" "yap %d" 'TeX-run-command nil t) (list "dviPS" "dvips %d -o %f" 'TeX-run-command nil t) (list "Ghostview" "c:\\GStools\\gsview\\gsview32.exe %f" 'TeX-run-command nil t) (list "BibTeX" "bibtex %s" 'TeX-run-BibTeX nil nil) (list "Index" "makeindex %s" 'TeX-run-command nil t) (list "Check" "lacheck %s" 'TeX-run-compile nil t) (list "Other" "" 'TeX-run-command t t))) (setq TeX-default-mode 'LaTeX-mode) ; -------------------------------------------------------------------- ;;; Autoloads: (or (assoc TeX-lisp-directory (mapcar 'list load-path)) ;No `member' yet. (assoc (substring TeX-lisp-directory 0 -1) ;Without trailing slash. (mapcar 'list load-path)) (setq load-path (cons TeX-lisp-directory load-path))) ;; This hook will store bibitems when you save a BibTeX buffer. (defvar bibtex-mode-hook nil) (or (memq 'BibTeX-auto-store bibtex-mode-hook) ;No `add-hook' yet. (setq bibtex-mode-hook (cons 'BibTeX-auto-store bibtex-mode-hook))) (autoload 'BibTeX-auto-store "latex" no-doc t) (autoload 'tex-mode "tex" no-doc t) (autoload 'plain-tex-mode "tex" no-doc t) (autoload 'texinfo-mode "tex-info" no-doc t) (autoload 'latex-mode "tex" no-doc t) (setq text-mode-hook 'turn-on-auto-fill) ;for font-latex running on fast machines (setq font-lock-maximum-decoration t) ;for font-latex in general (require 'font-latex) ;;; tex-site.el ends here
If you install NTemacs on another disk than c:
the hard
disk drive letter c:
should be changed in the
definition of the variable TeX-macro-global
.
In very rare cases two problems can occur
with this tex-site.el (They can be cast back to the different
shell
that is used by the OS.). If you are in emacs, and you launch the
latex compiler by using e.g. 'C-c C-c'
, then the
LaTeX-command
is executed in a shell. This LaTeX-command is defined in the
TeX-command-list in tex-site.el by the sentence:
(list(list "LaTeX" "latex \\nonstopmode\\input{%t}"
'Running `LaTeX' on `filename' with ``latex nonstopmodeinputfilename.tex'''
,
(list(list "LaTeX" "latex \\\\nonstopmode\\\\input{%t}"
.
'Running `LaTeX' on `filename' with ``latex \nonstopmode\input{filename.tex.tex}'''
,
%s
instead of %t
.
If you don't have ghostview for PC (gsview32.exe
), please read
also the next section.
<Help>
,
<Browse Manuals>
;
or with C-h i
: To achive this, load the file
c:\emacs\info\dir
in your favorite editor (emacs) and
append in this file the following:
* AUCTeX: (c:/emacs/site-lisp/auctex/doc/auctex) AUC TeX. Improved TeX/LaTeX mode
tex-site
in the INIT file, and
save it again.
Then double-click on a .tex
file. Emacs starts and _emacs
is executed (and consequently also tex-site.el
).
Since a .tex
file is selected, this file will be placed in a
buffer using the major mode of AUC-TEX
<Buffers>
,
<Messages>
.
Please read c:\emacs\site-lisp\auctex\Readme
for an efficient use of AUC-TEX.
E.g. 'C-c C-c'
will start the latex compilation in
nonstopmode. After compilation, errors
can be retrieved with 'C-c `'
. If no more errors occur and if all
cross references are well defined, a 'C-c C-c'
will launch the
previewer of your choice. Etc.
If you want an efficient LATEX macro completion in
AUC-TEX ('parsing' facility of LATEX macros, style files and
classes),
be sure that TeX-macro-global
is set properly, and
invoke
M-x TeX-auto-generate-global
.
Then in the directory ~\site-lisp\auctex\auto\
the accompanying
lisp files are saved.
This generation will take a while.
<file>
, <Dvips>
).
gsv22w32.zip
in c:\gstools
.
.zip
files (*fn1.zip
,
*ini.zip
, and
*w32.zip
) in c:\gstools
.
c:\gstools\setup.exe
. This
extracts all the .zip
files to the
appropriate directory. Check that the default
Ghostscript version is used during installation.
c:\gstools\gsview\gsview32.exe
is accessed for the first time. Every default setting should be ok.
C:\gstools\gs5.10\gsdll32.dll
).
--debug-init
option in the File Types setting of Windows.
~\site-lisp\auctex\auto\
~\site-lisp\tex-site.el
in emacs and compile this
one by selecting <Emacs-Lisp>
,
<Byte-compile This File>
.
~\site-lisp\auctex
, do as follows:
0
' is a zero)
C-u 0 M-x byte-recompile-directory
<return>
~/site-lisp/auctex
<return>
<return>
~\site-lisp\auctex\auto\
http://www.cs.washington.edu/homes/voelker/ntemacs.html
,
mirrored at
http://ftp.sunet.se/pub/os/Win32/ntEmacs/docs/ntemacs.html
)
and to
the Elisp Home Page
http://www.cs.indiana.edu/usr/local/www/elisp/elisp-intro.html
to catch
them (If you are brave you can also download them from the ftp directory):
http://cat.rpi.edu/~tibbetts/ispell_toc.html
for the
installation procedure). The minimal things you will have to do
isispell4.el
and ispell4.elc
to the c:\emacs\site-lisp directory
ispell
to c:\emacs\info
*ispell v4: (ispell). GNU ispell version 4 for NT Emacs
to the file c:\emacs\info\dir
_emacs
can be downloaded from the ftp directory).
Help on using these lisp files can be found in the beginning of
the lisp files.
<Backspace>
and <Delete>
key support, dependent of
the <Insert>
-key toggle).
;;beginning of _emacs ;; author W. Minten et al. ;; last modification June 28, 1998 ;; default frame and color settings ; invoke M-x list-colors-display to choose the colors ; comment this if you want to see the default settings (setq default-frame-alist '((top . 000) (left . 350) (width . 80) (height . 44) (cursor-color . "red") (background-color . "wheat") (vertical-scroll-bars . right) ;fonts found on the mailing list, uncomment one at your convenience ;(font . "-*-Courier-normal-r-*-*-13-97-*-*-c-*-*-ansi-") ;(font . "-*-Terminal-normal-r-*-*-8-60-*-*-c-*-*-oem-") ;(font . "-*-Terminal-normal-r-*-*-12-72-*-*-c-80-*-oem-") ;(font . "-*-Terminal-normal-r-*-*-8-60-*-*-c-*-*-oem-") ;(font . "-*-Terminal-normal-r-*-*-19-142-*-*-c-*-*-oem-") ) ) ;; some interactive color settings by means of ; M-x set-mouse-color RET magenta RET ;strange but this seems not to work.. ; M-x set-cursor-color RET red RET ; M-x set-background-color RET black RET ; M-x set-foreground-color RET yelow RET ;some useful additional settings (setq display-time-24hr-format t) ; In 24 hour format (display-time) ; Display the time (setq-default auto-fill-hook 'do-auto-fill) (setq fill-column 78) (standard-display-european 1) ; Display full ISO character set (put 'eval-expression 'disabled nil) (setq text-mode-hook '(lambda() (auto-fill-mode 1))) ;; no emacs start-up message (setq inhibit-startup-message t) ;; Redefine some keys. (setq kill-whole-line t) ; Kill EOL too (global-set-key [kp-home] 'beginning-of-line) (global-set-key [kp-end] 'end-of-line) (global-set-key [home] 'beginning-of-line) (global-set-key [end] 'end-of-line) (global-set-key [C-home] 'beginning-of-buffer) (global-set-key [C-end] 'end-of-buffer) (global-set-key [S-delete] 'clipboard-kill-region) (global-set-key [S-insert] 'clipboard-yank) (global-set-key [C-insert] 'clipboard-kill-ring-save) (global-set-key [S-right] 'set-mark-command) (global-set-key [f1] 'goto-line) ; goto line (global-set-key [delete] 'delete-char) ; delete character under cursor (global-set-key [f4] 'indent-three-spaces) ; indent 3 spaces (global-set-key [f8] 'kill-current-line) ; delete current line (global-set-key [f7] 'kill-current-or-next-word) ; delete current word (global-set-key [?\C-z] 'undo); added here because I usually do kills by mistake (global-set-key "\C-x\C-j" 'goto-line) ; Command prompts for linenumber to go to. ;; Define function that indents three spaces. (defun indent-three-spaces () "Indent three spaces." (interactive) (beginning-of-line) (insert " ") (next-line 1) ) ;; Define function that removes the current line. (setq kill-whole-line t) (defun kill-current-line () "Delete the current line." (interactive) (beginning-of-line) (kill-line) ) ;; Define function that removes the current word. (defun kill-current-or-next-word () "Delete current or next word." (interactive) (forward-word 1) (backward-kill-word 1) ;(delete-char 1) ) ;;;;Define keys and functions useful for AUC-TeX ;;If you do not want to use 'C-c C-c' or the pull-down menu "Command" (global-set-key [(control f5)] 'do-LaTeX) ; LaTeX the current file (global-set-key [(control f6)] 'do-DVIview) ; DVIview the current file (defun do-LaTeX () "LaTeX the curent file." (interactive) (TeX-command "LaTeX" 'TeX-master-file)) (defun do-DVIview () "YAPview the curent file." (interactive) (TeX-command "View" 'TeX-master-file)) ;;If you do not want to use the pull-down menu "Command" for dvips (global-set-key [(control f7)] 'do-DVIPS) ; DVIPS the current file (global-set-key [(control f8)] 'do-PSview) ; PSview the current file (defun do-DVIPS () "DVIPS the curent file." (interactive) (TeX-command "dviPS" 'TeX-master-file)) (defun do-PSview () "DVIPS the curent file." (interactive) (TeX-command "Ghostview" 'TeX-master-file)) ;; prevent echoing ^M in the shell (add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m nil t) ;; if you have a network connection with UNIX like environment ; take care of CR/LF disabling if NTemacs manages (load/save) files on it ; ftp://ftp.sunet.se/pub/os/Win32/ntEmacs/docs/ntemacs.html#translation (load "~/site-lisp/untranslate") (add-untranslated-filesystem "d:") ; d: is a UNIX drive ;if you encounter a file with ^M or ... at the end of every line, ; this means a worng copy by samba or floppy disk of the DOS file to UNIX. ; get rid of them by pressing [F5] (global-set-key [f5] 'cut-ctrlM) ; cut all ^M. (defun cut-ctrlM () "Cut all visible ^M." (interactive) (beginning-of-buffer) (while (search-forward "\r" nil t) (replace-match "" nil t)) ) ;; use ISPELL on PC (see http://cat.rpi.edu/~tibbetts/ispell_toc.html ; fot the installation procedure) ; you don't need to add c:\ispell4\exe to your PATH, and ; you don't need to copy or move any file after unzipping ; if you define ispell-command and ispell-look-command properly. ; M-$ for ispell word under cursor, M-x ispell-buffer for whole buffer ; see also pull-down menu <Edit>, <Spell>, <Check ...>. (cond ((file-exists-p "c:/ispell4/exe/ispell.exe") (autoload 'ispell-word "ispell4" "Check spelling of word at or before point" t) (autoload 'ispell-complete-word "ispell4" "Complete word at or before point" t) (autoload 'ispell-region "ispell4" "Check spelling of every word in the region" t) (autoload 'ispell-buffer "ispell4" "Check spelling of every word in the buffer" t) (setq ispell-command "c:/ispell4/exe/ispell.exe" ispell-look-dictionary "c:/ispell4/ispell.words" ispell-look-command "c:/ispell4/exe/look.exe" ispell-command-options (list "-d" "c:/ispell4/ispell.dict")))) ;still necessary (setenv "TEMP" "c:/windows/temp") (setenv "TMP" "c:/windows/temp") ; helpful (setq text-mode-hook '(lambda () (local-set-key "\M-\t" 'ispell-complete-word))) (setq tex-mode-hook '(lambda () (local-set-key "\M-\t" 'ispell-complete-word))) (setq latex-mode-hook '(lambda () (local-set-key "\M-\t" 'ispell-complete-word))) ; enable tex parser, also very helpful (setq ispell-enable-tex-parser t) ;; fontification font-lock.el much better than the default hilit19.el ;***************************** (for coloring) ;;automatic Font Lock mode in TeX mode ;(add-hook 'tex-mode-hook 'turn-on-font-lock) ;;if Font Lock necessary for other than .tex files, uncomment following (global-font-lock-mode t) (setq font-lock-maximum-decoration t) ;; stig-paren.el, a parentheses mathing much better than the default paren.el ;*************** (for better view of matched parentheses) (cond (window-system (require 'stig-paren) ;; XEmacs (global-set-key [(control leftparen)] 'stig-paren-toggle-dingaling-mode) (global-set-key [(control rightparen)] 'stig-paren-toggle-sexp-mode)) (t (setq blink-matching-paren t))) ;;settings for bib-cite.el ;************************** (require 'imenu) (define-key global-map [S-mouse-3] 'imenu) (autoload 'turn-on-bib-cite "bib-cite") (add-hook 'LaTeX-mode-hook 'turn-on-bib-cite) ;; load default lisp file (.el or .elc) for improved LaTeX mode ;; all settings are located in tex-site, hence ;************************************************************** (load "~/site-lisp/tex-site") ;;end of _emacs
This document was generated using the LaTeX2HTML translator Version 97.1 (release) (July 13th, 1997)
Copyright © 1993, 1994, 1995, 1996, 1997, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
The command line arguments were:
latex2html -split 0 NTTeXing.tex.
The translation was initiated by Willem Minten on 6/29/1998