From pertron.central.de!titan!andy@uranus.central.de Tue May  3 05:35:17 1994
Return-Path: <pertron.central.de!titan!andy@uranus.central.de>
Received: from easix.gun.de by gwdu17.gwdg.de with SMTP (PP);
          Tue, 3 May 1994 05:35:04 +0200
Received: by easix.gun.de (Smail3.1.28.1) from uranus.central.de with bsmtp 
          id <m0pyD2c-00015tA>; Tue, 3 May 94 05:29 GMT
Received: from pertron.central.de by uranus.central.de 
          with uucp (Smail3.1.28.1 #6) id m0py69F-0000xYC;
          Tue, 3 May 94 00:07 MET DST
Received: from titan by pertron.central.de with uucp (Smail3.1.28.1) 
          id m0py5o6-000475C; Mon, 2 May 94 23:45 MET DST
Received: by titan (Linux Smail3.1.28.1 #14) id m0py5i4-0006BIC;
          Mon, 2 May 94 23:39 MET DST
Message-Id: <m0py5i4-0006BIC@titan>
From: andy@titan.central.de (Andreas Matthias)
Subject: hilit-LaTeX.el
To: karl@pertron.central.de (Karl Eichwalder)
Date: Mon, 2 May 1994 23:39:26 +0100 (MET DST)
Cc: emoenke@gwdg.de
X-Mailer: ELM [version 2.4 PL21]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 6855
Status: RO

Hi,

leider stimmt der Name des Verzeichnisses nicht, das
fuer hilit angegeben war :-( 
Das Ding war ziemlich versteckt, ich weiss den Pfad
nicht mehr auswendig.

Hier ist es jedenfalls. In hilit-LaTeX umbenennen und
in der .emacs im tex-mode-hook aufrufen.

-------------------------------------------------------
>From rhogee@bathybius.meteo.mcgill.ca Wed Apr  6 07:24:46 1994
Return-Path: <rhogee@bathybius.meteo.mcgill.ca>
Received: from bathybius.meteo.mcgill.ca by mail.netcom.com (8.6.4/SMI-4.1/Netcom)
	id HAA24437; Wed, 6 Apr 1994 07:24:43 -0700
Received: by bathybius.meteo.mcgill.ca (AIX 3.2/UCB 5.64/4.03)
          id AA17135; Wed, 6 Apr 1994 10:26:42 -0400
From: rhogee@bathybius.meteo.mcgill.ca (Peter Galbraith)
Message-Id: <9404061426.AA17135@bathybius.meteo.mcgill.ca>
To: auc-tex@iesd.auc.dk
Cc: rhogee@bathybius.meteo.mcgill.ca, Stig@netcom.com
Subject: hilit-latex.el <V1.06>
Date: Wed, 06 Apr 94 10:26:41 -0500
Status: OR


Well it's been a few weeks (I've been busy...), so here's the latest version.
This time, highlight all citation commands that start with \cite 
(e.g. \citeYearOnly{citation} or whatever you make up).

This change (and a fix on the earlier \[any]cite regexp) are provided by
Martin Maechler <maechler@stat.math.ethz.ch>.  Thanks!

So keep those sugestions rolling in!  (But don't CC them to Stig yet!)

Peter Galbraith                             (514) 398-1969
Dept. of Atmospheric and Oceanic Sciences   (514) 398-6115 FAX
McGill University                           rhogee@bathybius.meteo.mcgill.ca
805 Sherbrooke St. West                     aka: galbrth@ac.dal.ca
Montreal, Quebec H3A 2K6,  Canada

;; hilit-LaTeX.el V1.06
;; Enhancements for LaTeX highlighting using hilit19.el or hl319.el
;;
;; Author: Peter Galbraith (rhogee@bathybius.meteo.mcgill.ca)
;;
;; 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.
;;
;; Hilit19 and hl319 are written by Jonathan Stigelman <Stig@netcom.com>
;; hilit-LaTeX is submitted to Jonathan Stigelman for inclusion into hl319.
;;
;; V1.00 01Mar94 PSG - Created
;; V1.01 14Mar94 PSG - Added {\sc } 
;;                   - Added fix for \[ ]\ excluding \\[len]
;; V1.02 15Mar94 PSG - Real dollar sign \$ won't hilit like math mode.
;; V1.03 16Mar94     - lateX2e-mode, \documentclass, \usepackage
;;                     Jonathan Katz <jkatz@weber.ucsd.edu>
;; V1.04 16Mar94 PSG - Added \sc as a declaration.
;; V1.05 17Mar94     - ams-latex-mode, \eqref , \title[]{}, \numberwithin
;;                     Andrew Swann <swann@imada.ou.dk>
;;               PSG - \[any]cite command that user makes up.
;; V1.06 06Apr94     - \cite[anyword] commands that user makes up. 
;;                      Martin Maechler <maechler@stat.math.ethz.ch>

(provide 'hilit-LaTeX)

(defun hilit-bracket-region (open)
  "Find region within curly brackets for hilit pattern.
ARG is pattern for beginning of pattern and ends with {.
It cannot be white space.  
Patterns ends simply at the matching closing bracket.

Used for patterns like:
 \\chapter{stuff with matching {} ending with }"
  (if (re-search-forward open nil t)
      (let ((here (point))
            (the-start (match-beginning 0)))
        (backward-char 1)               ; point is on bracket
        (forward-sexp 1)
        (cons the-start (point)))))

(defun hilit-bracket-wysiwyg (open)
  "Find region within curly brackets for hilit pattern.
ARG is pattern for beginning of pattern and starts with {.
Patterns ends simply at the matching closing bracket.

Used for patterns like:
 {\em stuff with matching {} ending with }"
  (if (re-search-forward open nil t)
      (let ((the-start (match-beginning 0)))
        (goto-char the-start)
        (forward-sexp 1)
        (cons the-start (point)))))

(hilit-set-mode-patterns
 '(
   LaTeX-mode japanese-LaTeX-mode SliTeX-mode
   japanese-SliTeX-mode FoilTeX-mode latex-mode latex2e-mode ams-latex-mode
   )
 '(
   ("[^\\]%.*$" nil comment)            ;; comments
   ("\\\\\\(sc\\|bf\\|em\\|it\\|rm\\|sf\\|sl\\|ss\\|tt\\)\\b" nil decl)
   ("``" "''" string)
   ("\\\\\\(raggedright\\|makeindex\\|makeglossary\\|maketitle\\)\\b" nil
    decl)
   ;; label-like things
   ("\\\\item\\(\\[[^]]*\\]\\)?" nil label)
   ;; formulas
   ("\\\\("  "\\\\)" formula)           ; \( \)
   ("[^\\\\]\\\\\\[" "\\\\\\]" formula) ; \[ \] but not \\[len] (PS Galbraith)
   ("[^$\\]\\($\\($[^$]*\\$\\|[^$]*\\)\\$\\)" 1 formula) ; '$...$' or '$$...$$'
   ;;   ^^ but not \$102.54 is expensive for a car wash.
   ;; various declarations/definitions
   ("\\\\\\(setlength\\|settowidth\\|addtolength\\|setcounter\\|addtocounter\\)" nil define)
   ("\\\\\\(normalsize\\|small\\|footnotesize\\|scriptsize\\|tiny\\|large\\|Large\\|LARGE\\|huge\\|Huge\\)\\b" nil decl)
   ("\\\\\\(appendix\\|tableofcontents\\|listoffigures\\|listoftables\\)\\b"
    nil decl)
   ("\\\\[a-z]+box" nil keyword)
   ;; "wysiwyg" emphasis
   (hilit-bracket-wysiwyg "{\\\\\\(em\\|it\\|sl\\)" italic)
   (hilit-bracket-wysiwyg "{\\\\bf" bold)
   (hilit-bracket-wysiwyg "{\\\\sc" label)
   (hilit-bracket-region 
   ;       (\\(no\\)?cite  -> changed to any cite commands that users make up.
    "\\\\\\([A-z]*cite[A-z]*\\|\\(page\\)?ref\\|eqref\\|label\\|index\\|glossary\\){"
    crossref)
   (hilit-bracket-region "\\\\\\(v\\|h\\)space\\(\*\\)?{" keyword)
   (hilit-bracket-region "\\\\footnote\\(mark\\|text\\)?{" keyword)
   ;; things that do some sort of cross-reference
   (hilit-bracket-region 
    "\\\\\\(pagestyle\\|thispagestyle\\|pagenumbering\\|numberwithin\\){" decl)
   ;; things that bring in external files
   (hilit-bracket-region  "\\\\\\(include\\|input\\|bibliography\\){" include)
   ;; (re-)define new commands/environments/counters
   (hilit-bracket-region "\\\\\\(re\\)?new\\(environment\\|command\\){" defun)
   (hilit-bracket-region "\\\\new\\(length\\|theorem\\|counter\\){" defun)
   ;; the following two match \foo[xx]{xx} or \foo*{xx} or \foo{xx}
   (hilit-bracket-region 
    "\\\\\\(sub\\)*\\(paragraph\\|section\\)\\(\*\\|\\[.*\\]\\)?{" keyword)
   (hilit-bracket-region 
    "\\\\\\(chapter\\|part\\)\\(\*\\|\\[.*\\]\\)?{" keyword)
   (hilit-bracket-region 
    "\\(\\\\document\\(style\\|class\\)\\|\\\\usepackage\\)\\(\\[.*\\]\\)?{" 
    decl)
   (hilit-bracket-region "\\\\title\\(\\[.*\\]\\)?{" define)
   (hilit-bracket-region "\\\\\\(author\\|date\\|thanks\\){" define)
   (hilit-bracket-region "\\\\caption\\(\\[[^]]*\\]\\)?{" label)
   (hilit-bracket-region "\\\\\\(begin\\|end\\|nofiles\\|includeonly\\){" 
                         decl)))


-------------------------------------------------------

Vielleicht kann man es ja wie es ist in den FTP-Server schieben ...

Ciao,

Andreas

