I have very rough versions of some utilities that make use of the TLG .idt files to allow opening individual works of an author directly. Briefly: --I have modified an earlier utility, tlg-read-authtab, so that it includes as a possibility reading the list of an author's works in a new buffer (using M-w on the line containing the author's name) --The buffer displayed by this consists of a list of work numbers and corresponding titles. Typing M-f on any line opens the work named on that line in a new buffer. The work is automatically read with citations embedded; they are not visible in the text but instead stored as text properties (Takahashi's suggestion). --In that buffer, functions tlg-display-current-ref and tlg-display-work-info can be called to display the citation at point and the author-title information for the work. --A function tlg-goto-ref can also be used to go directly to a given citation. Values must be entered in descending order, starting with "level" n, then v,w,x,y,z. For most authors, y and z, or x, y, and z are all that is needed. (if no value is entered for a level, that level is effectively skipped). To implement this, there are several new functions in tlg-util.el (most important are tlg-add-ref-properties, tlg-goto-ref, tlg-open-single-work, and tlg-find-idt-file). I'm afraid that I haven't moved everything I should out of cgreek-util.el into tlg-util.el (the main one is find-file-tlg-with-cites; variables tlg-idt-converter-program, tlg-authtab-converter-program, and tlg-cites-converter-program are also defined there). So, I've attached below both my own version of cgreek-util.el and tlg-util.el. All this needs to be cleaned up considerably. The external programs needed to use this package are three: Executable Lex source tlgcites2emacs tlg-citations.lex tlgidt2emacs tlg-idt.lex authtab2emacs authtab.lex I haven't put together a makefile for these, since I find myself compiling them separately. I have tried to make tlgcites2emacs behave somewhat like Takahashi's tlg2emacs: it takes a number of command-line options, but it will (I hope) understand the default positional interpretation of only one or two arguments of Takahashi's program (though it can also be told to read stdin). There is a great deal of unneeded code in its source tlg-citations.lex. There is even more unnecessary code in tlg-idt.lex, since I have just left in all the rules for translating beta code, even though this program never lets anything get through to them. This too needs cleaning up. My strategy for handling the idt files is a little odd: I have tlgidt2emacs emit emacs-lisp code defining an alist of works with properties, then evaluate the buffer. The reason for doing this is to avoid cluttering up the buffer with text that's not needed. I have done a little experimenting with creating a tlg-mode, but I haven't done so yet. I was trying to follow Takahashi's suggestion of having the current citation appear in the modeline, but I don't know how to make this update whenever point is moved (so the current modeline that appears is broken). One of you can surely tell me what I'm doing wrong. I must apologize in advance for the very crude state of the attached code. Any number of things are not working correctly; in some cases, the fix required is obvious, while in others I'm less sure what to do. It is just barely functional enough to use. My only reason for sending on such unfinished code is that I'm hoping some better programmer than I may want to fix it up. A tarball containing the files is attached below (with the three lex files assumed to reside in a ./tlg directory below wherever the two elisp files are). Robin Smith Department of Philosophy rasmith@xxxxxxxx Texas A&M University Voice (409) 845-5696 College Station, TX 77843-4237 FAX (409) 845-0458
Attachment:
cgreek-tlg.tgz
Description: Binary data