;;; /u/sy/beebe/emacs/btxaccnt.el, Tue Sep 16 11:29:22 1997 ;;; Edit by Nelson H. F. Beebe ;;; ;;; ==================================================================== ;;; @Emacs-Lisp-file{ ;;; author = "Nelson H. F. Beebe", ;;; version = "0.04", ;;; date = "16 September 1997", ;;; time = "11:29:30 MDT", ;;; filename = "btxaccnt.el", ;;; address = "Center for Scientific Computing ;;; University of Utah ;;; Department of Mathematics, 105 JWB ;;; 155 S 1400 E RM 233 ;;; Salt Lake City, UT 84112-0090 ;;; USA", ;;; telephone = "+1 801 581 5254", ;;; FAX = "+1 801 581 4148", ;;; checksum = "36099 183 1022 8641", ;;; email = "beebe@math.utah.edu (Internet)", ;;; codetable = "ISO/ASCII", ;;; keywords = "accents, BibTeX, LaTeX", ;;; supported = "yes", ;;; docstring = "This GNU Emacs package provides support for ;;; input of accented letters in BibTeX. This is ;;; most conveniently accessed from a menu bar ;;; pulldown list that allows setting of the ;;; current language. The keyboard accent toggle ;;; key (see below) can then be used to cycle ;;; through the list of accents for the letter(s) ;;; preceding point in the buffer. ;;; ;;; The general idea is that since accents are ;;; awkward to type on many keyboards, the Japanese ;;; style of input that offers a circular list of ;;; possibilities bound to a single toggle key is a ;;; reasonable model to follow. When the function ;;; LaTeX-accent-toggle is invoked by a key press, ;;; the characters preceding point are searched for ;;; in a list of sublists stored in the variable ;;; LaTeX-accent-table. Each sublist contains a set ;;; of related accented characters, and each ;;; invocation of LaTeX-accent-toggle by a key press ;;; will replace the longest matching preceding ;;; string with the next one in the sublist. When ;;; the end of the sublist is reached, processing ;;; continues from the beginning, so the sublist is ;;; effectively circular. Thus, if you press the ;;; toggle key once too many, you can keep pressing ;;; it until you come back around to the one you ;;; wanted, or use you can use the Emacs undo command ;;; to revert to the accent you missed. ;;; ;;; Generally, the toggle key binding will be on a ;;; function key; the default chosen here is F1. ;;; ;;; Although the accent tables encoded here are ;;; suitable for TeX and its various macro packages ;;; (AmSLaTeX, AmSTeX, LAmSTeX, LaTeX, SLiTeX, ...), ;;; suitable redefinition of the tables will make ;;; this scheme work for any accent representation, ;;; including characters in the range 128..256. In ;;; order to use the upper-half of a 256-character ;;; set, you must be using Emacs 19 or later, and you ;;; must have fonts available to represent those ;;; characters. ;;; ;;; Please remember, however, that if you use ;;; characters in 128..256, you have entered the ;;; ISO code table morass, and your documents MAY ;;; NOT BE READILY PORTABLE to other systems! ;;; ;;; TeX supports 14 different accents, most of which ;;; are quite rare. In order to keep the list of ;;; possibilities short, you probably want to ;;; customize the value of LaTeX-accent-table to the ;;; language(s) you need most frequently. Customized ;;; variables for several European languages are ;;; provided below, and you can choose them simply by ;;; setting LaTeX-accent-table to one of them by, ;;; e.g. ;;; ;;; (setq LaTeX-accent-table LaTeX-Danish-accent-table) ;;; ;;; or better, by using the language table augmented ;;; by user-definable additions: ;;; ;;; (setq LaTeX-accent-table ;;; (append LaTeX-Danish-accent-table ;;; LaTeX-extra-accent-table)) ;;; ;;; You can of course select mixtures of languages, ;;; like this: ;;; ;;; (setq LaTeX-accent-table ;;; (append LaTeX-French-accent-table ;;; LaTeX-German-accent-table ;;; LaTeX-extra-accent-table)) ;;; ;;; In the event of duplications, the first match in ;;; the combined list will be the one used. ;;; ;;; The default setting of LaTeX-accent-table is the ;;; concatenation of LaTeX-standard-accent-table and ;;; LaTeX-extra-accent-table, which offers more ;;; possibilities than you probably care to have. ;;; ;;; The checksum field above contains a CRC-16 ;;; checksum as the first value, followed by the ;;; equivalent of the standard UNIX wc (word ;;; count) utility output of lines, words, and ;;; characters. This is produced by Robert ;;; Solovay's checksum utility.", ;;; } ;;; ==================================================================== ;;; btxaccnt.el --- support for accented letter input in BibTeX-mode ;;; Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. ;;; Author: Nelson H. F. Beebe ;;; Maintainer: Nelson H. F. Beebe ;;; Created: 23 October 1994 ;;; Version: 0.00 ;;; Keywords: accents, BibTeX, LaTeX ;;; This file is part of GNU Emacs. ;;; 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, 675 Mass Ave, Cambridge, MA 02139, USA. ;;; Commentary: (defconst BibTeX-accent-version "0.04") ;NB: update this at every change (defconst BibTeX-accent-date "[16-Sep-1997]") ;NB: update this at every change ;;; Change log: ;;;===================================================================== ;;; ;;; Version 0.04 [16-Sep-1997] ;;; Add Faroese menu bar entries. Then move all menu bar code into ;;; new function LaTeX-accent-menu-setup in ltxaccnt.el, so that it ;;; can be shared by both LaTeX and BibTeX editing modes. ;;; ;;; ;;; Version 0.03 [14-Sep-1997] ;;; Add Finnish, Greek, Icelandic, Irish, Latin, Polish, Portuguese, and ;;; Romaji menu bar entries. ;;; ;;; ;;; Version 0.02 [17-Feb-1997] ;;; Add (provide 'btxaccnt). ;;; ;;; ;;; Version 0.01 [24-Oct-1994] ;;; Add Italian accent support. ;;; ;;; ;;; Version 0.00 [23-Oct-1994] ;;; Original version. ;;; Code: (provide 'btxaccnt) (require 'bibtex) (require 'ltxmenu) (require 'ltxaccnt) (LaTeX-accent-menu-setup bibtex-mode-map) ;;; btxaccnt.el ends here