Re: [NTG-context] Fun with Bibtex

2008-09-25 Thread Taco Hoekwater


Matthias Wächter wrote:
> On 9/25/2008 10:07 AM, Taco Hoekwater wrote:
>> Matthias Wächter wrote:
>>> I would suggest you put your .bst into, say, cont-my.bst and issue
>>> the command
>>> \def\bibstyle{cont-my}
>>>
>>> right after executing \setupbibtex
>> That won't work, the .aux file is written by \writeauxfile.
> 
> For whatever reason, the .aux file contained \bibstyle{cont-my} in
> my tests …
> 
>> But you could replace the whole \setupbibtex command with this:
>>
>>\unprotect
>>\def\@@pbdatabase{..your bib file ..}
>>\def\bibstyle{cont-my}
>>\writeauxfile
>>\protect
> 
> right. So the attached would be an appropriate long-term patch then?

Yes. I'll apply that, thanks

Best wishes,
Taco
___
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
___


Re: [NTG-context] Fun with Bibtex

2008-09-25 Thread Matthias Wächter
On 9/25/2008 10:07 AM, Taco Hoekwater wrote:
> 
> Matthias Wächter wrote:
>> I would suggest you put your .bst into, say, cont-my.bst and issue
>> the command
> 
>> \def\bibstyle{cont-my}
>>
>> right after executing \setupbibtex
> 
> That won't work, the .aux file is written by \writeauxfile.

For whatever reason, the .aux file contained \bibstyle{cont-my} in
my tests …

> But you could replace the whole \setupbibtex command with this:
> 
>\unprotect
>\def\@@pbdatabase{..your bib file ..}
>\def\bibstyle{cont-my}
>\writeauxfile
>\protect

right. So the attached would be an appropriate long-term patch then?

- Matthias
--- texmf-context/doc/context/bib/bibmod-doc.tex.orig   2006-09-15 
11:52:34.0 +0200
+++ texmf-context/doc/context/bib/bibmod-doc.tex2008-09-25 
11:33:30.828125000 +0200
@@ -353,6 +353,7 @@
  `author' (\type{cont-au.bst}) sorts alphabetically on author and within 
that on year,
  `title' (\type{cont-ti.bst}) sorts alphabetically on title and then on 
author and
  year, and `short' (\type{cont-ab.bst}) sorts on the short key that is 
generated
+ by \BIBTEX. If \type{FILE} is given, it specifies an individual 
\type{.bst} file name used
  by \BIBTEX.\NC\NR 
 \stoptabulate
 
--- texmf-context/tex/context/bib/t-bib.tex.orig2008-04-17 
17:02:02.0 +0200
+++ texmf-context/tex/context/bib/t-bib.tex 2008-09-25 11:15:01.734375000 
+0200
@@ -300,15 +300,14 @@
 
 \def\dosetupbibtex[#1]%
   {\let\@@pbdatabase\empty
-   \let\@@pbsort\empty
-   \getparameters[\??pb][#1]%
+   \getparameters[\??pb][sort=\s!default,#1]%
\expanded{\processaction[\@@pbsort]}
 [  \v!no=>\def\bibstyle{cont-no},
\v!author=>\def\bibstyle{cont-au},
 \v!title=>\def\bibstyle{cont-ti},
 \v!short=>\def\bibstyle{cont-ab},
   \s!default=>\def\bibstyle{cont-no},
-  \s!unknown=>\def\bibstyle{cont-no}]%
+  \s!unknown=>\def\bibstyle{\@@pbsort}]%
\ifx\@@pbdatabase\empty\else \writeauxfile \fi}
 
 \dosetupbibtex[bibtex=bibtex]
--- texmf-context/tex/context/interface/t-bib.xml.orig  2006-09-15 
11:52:06.0 +0200
+++ texmf-context/tex/context/interface/t-bib.xml   2008-09-25 
11:27:16.953125000 +0200
@@ -266,6 +266,7 @@
 
 
 
+
   
 
   
___
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
___


Re: [NTG-context] Fun with Bibtex

2008-09-25 Thread Taco Hoekwater


Matthias Wächter wrote:
> 
> I would suggest you put your .bst into, say, cont-my.bst and issue
> the command

> \def\bibstyle{cont-my}
> 
> right after executing \setupbibtex

That won't work, the .aux file is written by \writeauxfile.
But you could replace the whole \setupbibtex command with this:

   \unprotect
   \def\@@pbdatabase{..your bib file ..}
   \def\bibstyle{cont-my}
   \writeauxfile
   \protect

To the original poster: I have no way of knowing what goes wrong.
You're basically saying:

   "I altered stuff but now it doesn't work anymore!"

Well, there is nothing I can do about that.

Best wishes,
Taco



___
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
___


Re: [NTG-context] Fun with Bibtex

2008-09-25 Thread Matthias Wächter
On 9/24/2008 11:01 PM, Peter Daum wrote:
> Hi all
> 
> I'm using Taco's Bibtex module and got some problems with it.
> 
> \setupbibtex[database=xx,sort=author]
> \setuppublications[alternative=apa-de,refcommand=authoryear,monthconversion=month]
> \placepublications[criterium=all]
> 
> ... works fine. The references list contains only publications referenced in 
> the document.
> 
> Unfortunately, I was forced to use a special bst file, since I needed to 
> change the fields of the entrytype "misc". As I didn't find a way to make 
> ConTeXt or texexec aware of this new file living in my document's directory, 
> I deleted the database parameter, customised the aux file and ran bibtex by 
> myself.
> 
> The problem is, that, with the new method, only a very small subset of the 
> referenced publication makes it into the list. If I add "criterium=all" to 
> the setuppublications command, I get the whole database, whether the pub is 
> referenced or not.
> 
> Any ideas?

After reading t-bib.tex:

[…]
\def\setupbibtex{\dosingleempty\dosetupbibtex}

\def\dosetupbibtex[#1]%
  {\let\@@pbdatabase\empty
   \let\@@pbsort\empty
   \getparameters[\??pb][#1]%
   \expanded{\processaction[\@@pbsort]}
[  \v!no=>\def\bibstyle{cont-no},
   \v!author=>\def\bibstyle{cont-au},
\v!title=>\def\bibstyle{cont-ti},
\v!short=>\def\bibstyle{cont-ab},
  \s!default=>\def\bibstyle{cont-no},
  \s!unknown=>\def\bibstyle{cont-no}]%
   \ifx\@@pbdatabase\empty\else \writeauxfile \fi}

[…]

I would suggest you put your .bst into, say, cont-my.bst and issue
the command

\def\bibstyle{cont-my}

right after executing \setupbibtex

- Matthias
___
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
___


Re: [NTG-context] Fun with Bibtex

2008-09-24 Thread Mojca Miklavec
On Wed, Sep 24, 2008 at 11:01 PM, Peter Daum wrote:
> Hi all
>
> I'm using Taco's Bibtex module and got some problems with it.
>
> \setupbibtex[database=xx,sort=author]
> \setuppublications[alternative=apa-de,refcommand=authoryear,monthconversion=month]
> \placepublications[criterium=all]
>
> ... works fine. The references list contains only publications referenced in 
> the document.
>
> Unfortunately, I was forced to use a special bst file, since I needed to 
> change the fields of the entrytype "misc".

I cannot say anything about the specific problem you had, but are you
sure that the high level interface of bib module does not allow you to
do what you need without touching bst files?

If you are playing with bst files you probably know what you are
doing, but maybe you can provide a bit more details. Not everything
can be done with high lever interface, but so far I never had to touch
bst, yet I keep configuring lots of things.

(OTOH ... I just figured out today that comments are not ignored in
bib entries [any more], so I get percentage signs and unuseful text
all over the place ... I really need to switch back to Word ASAP.)

Mojca
___
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
___


[NTG-context] Fun with Bibtex

2008-09-24 Thread Peter Daum
Hi all

I'm using Taco's Bibtex module and got some problems with it.

\setupbibtex[database=xx,sort=author]
\setuppublications[alternative=apa-de,refcommand=authoryear,monthconversion=month]
\placepublications[criterium=all]

... works fine. The references list contains only publications referenced in 
the document.

Unfortunately, I was forced to use a special bst file, since I needed to change 
the fields of the entrytype "misc". As I didn't find a way to make ConTeXt or 
texexec aware of this new file living in my document's directory, I deleted the 
database parameter, customised the aux file and ran bibtex by myself.

The problem is, that, with the new method, only a very small subset of the 
referenced publication makes it into the list. If I add "criterium=all" to the 
setuppublications command, I get the whole database, whether the pub is 
referenced or not.

Any ideas?

Thanks and regards
Peter


-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
___
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
___