ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* bibdemo.tex example needs a few defs
@ 2006-05-13 13:37 Sanjoy Mahajan
  2006-05-14  8:10 ` Taco Hoekwater
  0 siblings, 1 reply; 3+ messages in thread
From: Sanjoy Mahajan @ 2006-05-13 13:37 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bibdemo.tex example needs a few defs
  2006-05-13 13:37 bibdemo.tex example needs a few defs Sanjoy Mahajan
@ 2006-05-14  8:10 ` Taco Hoekwater
  2006-05-14 17:47   ` Sanjoy Mahajan
  0 siblings, 1 reply; 3+ messages in thread
From: Taco Hoekwater @ 2006-05-14  8:10 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

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

[-- Attachment #2: t-bibltx.tex --]
[-- Type: application/x-tex, Size: 1805 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bibdemo.tex example needs a few defs
  2006-05-14  8:10 ` Taco Hoekwater
@ 2006-05-14 17:47   ` Sanjoy Mahajan
  0 siblings, 0 replies; 3+ messages in thread
From: Sanjoy Mahajan @ 2006-05-14 17:47 UTC (permalink / raw)


From:    Taco Hoekwater <taco@elvenkind.com>
> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-05-14 17:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-13 13:37 bibdemo.tex example needs a few defs Sanjoy Mahajan
2006-05-14  8:10 ` Taco Hoekwater
2006-05-14 17:47   ` Sanjoy Mahajan

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).