From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/41942 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Setting up minimals (saw: Re: distro info) Date: Fri, 27 Jun 2008 09:21:45 -0400 (EDT) Message-ID: References: <2339E6FA-E53D-4C0B-9D72-109A10D29485@di.unito.it> <20080626103317011525.0800db48@gmail.com> <1C7EE015-63F0-4E39-9778-C53C88C9FFEE@di.unito.it> <20080626153329.17136b7qzb1906os@web.mail.umich.edu> <0EC00681-9063-442A-8550-B08E5EEFA2B9@di.unito.it> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1214572822 30392 80.91.229.12 (27 Jun 2008 13:20:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Jun 2008 13:20:22 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jun 27 15:21:05 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1KCDsv-0003az-0G for gctc-ntg-context-518@m.gmane.org; Fri, 27 Jun 2008 15:21:05 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 82D211FC93; Fri, 27 Jun 2008 15:20:10 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13721-02-19; Fri, 27 Jun 2008 15:19:28 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2647F1FBB9; Fri, 27 Jun 2008 15:19:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5AD501FBB5 for ; Fri, 27 Jun 2008 15:19:26 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14918-04-3 for ; Fri, 27 Jun 2008 15:18:49 +0200 (CEST) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.93.161]) by ronja.ntg.nl (Postfix) with ESMTP id D9F561FBB9 for ; Fri, 27 Jun 2008 15:18:47 +0200 (CEST) Original-Received: FROM adi-laptop.local (c-68-40-40-75.hsd1.mi.comcast.net [68.40.40.75]) BY tombraider.mr.itd.umich.edu ID 4864E8B3.3E605.5901 ; 27 Jun 2008 09:18:43 -0400 In-Reply-To: <0EC00681-9063-442A-8550-B08E5EEFA2B9@di.unito.it> User-Agent: Alpine 1.00 (DEB 882 2007-12-20) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:41942 Archived-At: On Fri, 27 Jun 2008, Andrea Valle wrote: >> Suppose your file is called thesis.tex (Ok, I had to test things to ensure >> what I was saying was true, and that is the only test file that I have >> currently :). Now run >> $context thesis >> This will create a lot of warnings about missing references, ignore them. >> Then run >> $bibtex thesis >> This will create tesis.bbl. Now run context, and all those warnings will >> be gone. You only need to run bibtex once (unless you change your bib >> file). >> > > So, it's like latex? Well, not exactly. Let me explain how bibtex works in latex, and then how it works in context. In latex, you write \cite{ref1}, \cite{ref2}, etc. to cite a document, \bibliographystyle{style} to tell the style of the references, and \bibliography{bib-file} to tell the name of the bib database. When you run latex on this file, for each \cite{ref1} latex writes \citation{ref1} into the aux file; for \bibliographystyle{style} it writes \bibstyle{style} and for \bibliography{bib-file} it writes \bibdata{bib-file}. Latex aux file contains all sort of auxillary information, but bibtex only reconizes the about three commands. When you run bibtex, it translates the references included in \citation from the bib-file to latex markup, as specified by the style file. These are stored in the bbl file. All these features are hardcoded in bibtex, so it makes it difficult to use bibtex with anything other than latex. The bib module exploits a feature in bibtex to make it work with context. If you write \cite{*} in your latex document, latex writes \citation{*} in the aux file, and bibtex translates *all* the enteries in the bib-file to latex markup. So, the bib module writes \citation{*} to the aux file. Next, in order to get the references in a manner that context can understand, Taco has written a bib style file that translates the bib file to \start \stop publication style. So, in terms of interaction with bibtex, bib module creates a very simple aux file \citation{*} \bibstyle{cont-no} \bibdata{bib-file} When you run bibtex on this, bibtex translates *all* the references in your bib file to context markup. On the second run, the bib module reads these commands, and stores everything as registers internally and uses ConTeXt inbuilt functions for sorting etc. > Have I to specify that I'm using the bib module? Usually, you only need to do: \usemodule[bib] \setupbibtex[database=bib-file] \setuppublications[alternative=ieee] % ieee is my own bib style % see documentation for other options Normally (that is in mkii), context (rather texexec) runs bibtex after the first run behind the scenes. In mkiv running is not implemented in mtx-context script yet. So you need to run bibtex *once* after the first run. This will create the bbl file, which contains *all* your references in the bib file, so until you change your bib file, you do not need to run bibtex again. Again, this is temporary; once mtx-context allows for commands to be executed inbetween context runs, you will not need to run bibtex by hand. > I mean, this: > > \usemodule[bibltx] Normally you should not need to include the bibltx module. The bibltx module reads the bbl files created by bibtex for latex. Suppose you have an old latex project, and you only have its bbl file but not the bib file. Suppose you want to translate the project to context. Then rather than translating all your references back to bib format, the bibltx module allows you to use the bbl file created for latex. You should not need to do this for new projects. > \setupbibtex[database=semiotiche] Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________