ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Matthias Wächter" <matthias@waechter.wiz.at>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Fun with Bibtex
Date: Thu, 25 Sep 2008 11:37:56 +0200	[thread overview]
Message-ID: <48DB5BF4.2000606@waechter.wiz.at> (raw)
In-Reply-To: <48DB46B5.9060503@elvenkind.com>

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

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

[-- Attachment #2: t-bib.diff --]
[-- Type: text/plain, Size: 1831 bytes --]

--- texmf-context/doc/context/bib/bibmod-doc.tex.orig	2006-09-15 11:52:34.000000000 +0200
+++ texmf-context/doc/context/bib/bibmod-doc.tex	2008-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.orig	2008-04-17 17:02:02.000000000 +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.000000000 +0200
+++ texmf-context/tex/context/interface/t-bib.xml	2008-09-25 11:27:16.953125000 +0200
@@ -266,6 +266,7 @@
         <cd:constant type="author"/>
         <cd:constant type="short"/>
         <cd:constant type="no" default="yes"/>
+        <cd:constant type="cd:file"/>
       </cd:parameter>
     </cd:assignments>
   </cd:arguments>

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

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

  reply	other threads:[~2008-09-25  9:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-24 21:01 Peter Daum
2008-09-24 22:29 ` Mojca Miklavec
2008-09-25  7:58 ` Matthias Wächter
2008-09-25  8:07   ` Taco Hoekwater
2008-09-25  9:37     ` Matthias Wächter [this message]
2008-09-25  9:47       ` Taco Hoekwater

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=48DB5BF4.2000606@waechter.wiz.at \
    --to=matthias@waechter.wiz.at \
    --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).