bibdemo.tex example needs a few defs
The bibdemo.tex example on the Wiki http://wiki.contextgarden.net/Bibliography fails with complaints about \newcommand being undefined. The problem is that xampl.bib (which here is /usr/share/texmf-tetex/bibtex/bib/base/xampl.bib on this teTeX 3.0 distribution) has this: @preamble{ "\newcommand{\noopsort}[1]{} " # "\newcommand{\printfirst}[2]{#1} " # "\newcommand{\singleletter}[1]{#1} " # "\newcommand{\switchargs}[2]{#2#1} " } So bibtex puts those LaTeX commands at the top of the .bbl file, and ConTeXt doesn't know about \newcommand. A temporary workaround is to define those commands by hand (see below). A better workaround is to define \newcommand. latex.ltx has a long and involved one, but maybe there's a nicer ConTeXt way? Meanwhile, the following example works (context version 2006.04.17 23:14): \usemodule[bib] \def\newcommand#1[#2]#3{} \newcommand{\noopsort}[1]{} \def\noopsort#1{} \def\printfirst#1#2{#1} \def\singleletter#1{#1} \def\switchargs#1#2{#2#1} \setupbibtex[database=xampl] \starttext As \cite[article-full] already indicated, bibtex is a \LaTeX-centric program. \completepublications \stoptext I'll put this version on the wiki, if there's no clean solution (unless I've missed an easy fix to the \newcommand problem). -Sanjoy
Sanjoy Mahajan wrote:
So bibtex puts those LaTeX commands at the top of the .bbl file, and ConTeXt doesn't know about \newcommand. A temporary workaround is to define those commands by hand (see below). A better workaround is to define \newcommand. latex.ltx has a long and involved one, but maybe there's a nicer ConTeXt way?
There used to be a module named bibltx that did precisely that, but I removed it while waiting for Brook's \usemodule[latex]. I will re-instate the file, but that will take a while, so here is the previous version .. Cheers, taco
From: Taco Hoekwater
There used to be a module named bibltx that did precisely that, but I removed it while waiting for Brook's \usemodule[latex]. I will re-instate the file, but that will take a while, so here is the previous version ..
Thanks, \usemodule[bibltx] works here. I'll put t-bibltx.tex in any of my context installs until it comes back to life in the distributions. Meanwhile I've wikified it. Is there a way to tell the wiki software not to enforce uppercase first letters in filenames? As of now, people will download it as T-bibltx.tex, install it, and wonder why Context cannot find it. -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
participants (2)
-
Sanjoy Mahajan
-
Taco Hoekwater