mlBibTeX: Reporting the Experience Jean-Michel Hufflen To cite this version: Jean-Michel Hufflen. mlBibTeX: Reporting the Experience. TUGB, 2007, pp.157–162. hal-00644467 HAL Id: hal-00644467 https://hal.archives-ouvertes.fr/hal-00644467 Submitted on 24 Nov 2011 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. ∗ MlBibTEX: Reporting the Experience Jean-Michel HUFFLEN LIFC (EA CNRS 4157) University of Franche-Comté 16, route de Gray 25030 BESANÇON CEDEX FRANCE [email protected] http://lifc.univ-fcomte.fr/~hufflen Abstract This article reports how the different steps of the MlBibTEX project were con- ducted until the first public release. We particularly focus on the problems raised by reimplementing a program (BibTEX) that came out in the 1980’s. Since this time, implementation techniques have evolved, new requirements have appeared, as well as new programs within TEX’s galaxy. Our choices are explained and discussed. Keywords TEX, LATEX, BibTEX, reimplementation, reverse engineering, im- plementation language, program update. Streszczenie Artykuł omawia realizację poszczególnych kroków przedsięwzięcia MlBibTEX, w czasie do przedstawienia pierwszej publicznej wersji. W szczególności skupiamy się na problemach powstałych przy reimplementacji programu (BibTEX), powsta- łego w latach 80 zeszłego wieku. Od tego czasu rozwinęły się techniki implemen- tacyjne, powstały nowe wymagania oraz nowe programy w świecie TEX-owym. Przedstawiamy i dyskutujemy dokonane wybory. Słowa kluczowe TEX, LATEX, BibTEX, reimplementacja, reverse engineering, język implementacji, aktualizacja programu. 0 Introduction projects aim to provide new programs, based on TEX & Co.’s ideas.2 A first representative example is the In 2003, TEX’s 25th anniversary was celebrated at A 1 A LT X 3 project [32], a second is NTS [27]. the TUG conference, held at Hawaii [1]. LTEX E [28] and BibTEX [35] — the bibliography processor MlBibTEX — for ‘MultiLingual BibTEX’ — be- usually associated with the LATEX word processor — longs to such projects. Let us recall that this pro- are more recent, since they came out in the 1980’s, gram aims to be a ‘better BibTEX’, especially about shortly after TEX. All are still widely used, such multilingual features. For a end-user, MlBibTEX be- longevity being exceptional for software. However, haves exactly like ‘classical’ BibTEX: it searches bib- these programs are quite ageing. Of course, re- liography data base (.bib) files for citation keys used cent versions have incorporated many features ab- throughout a document and arranges the references sent from the first versions, what proves the robust- found into a .bbl file suitable for LATEX, w.r.t. a bib- 3 ness of these systems. Nevertheless, they present liography style. MlBibTEX is written in Scheme, it 4 some limitations due to the original conception, and uses XML as a central format: when entries of .bib a major reimplementation may be needed to inte- 2 grate some modern requirements. In addition, inter- Concerning TEX, an additional point is that TEX’s de- active word processors made important progress and velopment has been frozen by its author, Donald E. Knuth [26]. If incorporating new ideas to a ‘new TEX’ leads to a ma- are serious rivals, even if they do not yield typeset- jor reimplementation, the resulting program must be named ting of such professional quality. That is why some differently. 3 The version used is described in [24]. ∗ 4 Title in Polish: MlBibTEX: raport z doświadczeń. EXtensible Markup Language. Readers interested in 1 TEX Users Group. an introductory book to this formalism can consult [37]. TUGboat, Volume 0 (2060), No. 0 — Proceedings of the 2060 Annual Meeting 1001 Jean-Michel HUFFLEN files are parsed, they result in an XML tree. Bib- ming language, higher than C. So we consider liography styles taking advantage as far as possible again the prototype in Scheme, we sketched in 5 7 of MlBibTEX’s new features are written using nbst, 2002. SXML [25] is chosen as the representa- 6 a variant of XSLT described in [15]. The bst lan- tion of XML texts in Scheme. Some parts of guage [34], based on handling a stack and used for MlBibTEX are directly reprogrammed from C writing bibliography styles of BibTEX, can be used to Scheme. About the other parts, this proto- in a compatibility mode [20]. type is a good basis for much experiment [16]. We think that the experience we have got in Nov. 2004 The version written in C is definitely developing MlBibTEX may be useful for other anal- dropped out, whereas the version in Scheme is ogous projects. In a first section, we briefly recall the adapted in order to get much efficency and be- chronology of this development. As it could be seen, comes the ‘official’ MlBibTEX [18]. this development has not been linear, and the two Sep. 2005 We decided to freeze MlBibTEX’s design next following sections focus on the problems we had and concentrate only on finishing programming. to face. We explain how we have determined which Many Scheme functions are rewritten in confor- 8 criteria are accurate when a programming language mity to SRFIs [39]. is to be chosen for such an application. Then we May 2006 A working version is almost finished, show how the compatibility with ‘old’ data and the except for the interface with the kpathsea li- integration of modern features should be managed. brary. 1 MlBibTEX’s Chronology May 2007 Public availability of MlBibTEX’s Ver- sion 1.3. Oct. 2000 MlBibTEX’s design begins: the syntax of .bib files is enriched with multilingual anno- Besides, let us make precise that MlBibTEX is tations. Version 1.1’s prototype is written using not our only task. As an Assistant Professor in our the C programming language and tries to reuse university, we teach Computer Science. We also parts of ‘old BibTEX’s program as far as possi- participate in other projects. As a consequence, ble. MlBibTEX’s development has been somewhat an- May 2001 The first article about MlBibTEX is [9]. archic: we hardly worked on it for two or three Later, the experience of developing MlBibTEX’s months, put it aside for one or two months, and so Version 1.1 is described in [10]. on. Last, we have supervised some student projects May 2002 By discussing with some people at the about graphical tools around MlBibTEX [2, 8], pro- grammed using Ruby [31], but concerning the devel- EuroBachoTEX conference, we realise that the conventions for bibliography styles are too di- opment of the MlBibTEX program itself, we have verse, even if we consider only those of Euro- done it alone. pean countries. We realise that this first ap- 2 Choice of an implementation language proach is quite unsuitable, unless defining a new version of the bst language. So we decide to ex- There are several programming paradigms: impera- plore two directions. First, we develop a ques- tive, functional, and logic programming. There are tionnaire about problems and conventions con- also several ways to implement a programming lan- cerning bibliography styles used within Euro- guage: interpretation and compilation. Some para- pean countries. Second, we begin a prototype digms are more accurate, according to the domain in Scheme implementing the bst language [11]. of interest. Likewise, some interpreted languages Initially, this prototype is devoted to experi- are more accurate if you want to program a pro- totype quickly and are just interested in performing ments about improving this language in a sec- 9 ond version (1.2). some experiment. But compiled languages are of- Jan. 2003 Version 1.2 is stalled. The new version ten preferable if programs’ efficiency is crucial. Be- (1.3) is built out of XML formats. The nbst lan- sides, the level of a programming language has some guage is designed and presented at [12, 13]. We influence on development: in a high-level language, explain in [14] how the results of our question- low-level details of structures’ implementation do naire have influenced this new direction. not have to be made explicit, so development is Feb. 2004 It appears to us that MlBibT X should 7 Scheme implementation of XML. E 8 be developed using a very high-level program- Scheme Requests for Implementation. That is an effort to coordinate libraries and other additions to the Scheme lan- 5 New Bibliography STyles. guage between implementations. 6 eXtensible Language Stylesheet Transformations, the 9 That is the case for the graphical tools around language of transformations used for XML documents [43]. MlBibTEX programmed in Ruby by our students [2, 8]. 1002 TUGboat, Volume 0 (2060), No. 0 — Proceedings of the 2060 Annual Meeting MlBibTEX: Reporting the Experience quickier, and programs that result in are more con- gram is expressed using Emacs Lisp, except for the cise, nearer to a mathematical model. implementation of low-level functionalities. In addition to these general considerations, let Finally, our choice was Scheme, the modern di- us recall that we aim to replace an existing program alect of Lisp. We confess that we are personally by a new one. This new program is supposed to attracted by functional programming languages, be- do better than the ‘old’ one. ‘To do better’ may cause they can abstract procedures as well as data: mean ‘to have more functionalities, more expressive in this sense, they are very high-level programming power’, but for sake of credibility, it is preferable for languages.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages7 Page
-
File Size-