ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Setting up minimals (saw: Re: distro info)
Date: Fri, 27 Jun 2008 09:21:45 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.1.00.0806270900250.20977@nqv-yncgbc> (raw)
In-Reply-To: <0EC00681-9063-442A-8550-B08E5EEFA2B9@di.unito.it>

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
___________________________________________________________________________________


  parent reply	other threads:[~2008-06-27 13:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-26 12:00 Andrea Valle
2008-06-26 17:33 ` David
2008-06-26 18:30   ` Andrea Valle
2008-06-26 19:33     ` Aditya Mahajan
2008-06-26 23:31       ` Andrea Valle
2008-06-27  1:43         ` Aditya Mahajan
2008-06-27  6:15           ` Wolfgang Schuster
2008-06-27  9:08             ` Andrea Valle
2008-06-27  9:15               ` Wolfgang Schuster
2008-06-27  9:01           ` Andrea Valle
2008-06-27  9:04           ` Andrea Valle
2008-06-27 10:11             ` Wolfgang Schuster
2008-06-27 13:21             ` Aditya Mahajan [this message]
2008-06-26 19:41     ` David
2008-06-26 19:46     ` David

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.1.00.0806270900250.20977@nqv-yncgbc \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).