Re: [NTG-context] YABQ - yet another bib question

2010-02-11 Thread Taco Hoekwater

Thomas A. Schmitz wrote:

Hi all,

it was quite heartwarming to see how many of us rallied for better
bibliographical support when Wolfgang asked what we missed most in
ConTeXt... And it's wonderful to see that a new structure for the
entire bibliographical stuff is on its way. Hans's xml-based approach
will make things much easier than the obsolete bibtex stuff, I'm
sure.

In the meantime, I'm still struggling with our old bib stuff and have
one question. I would like to have two different reference mechanisms
for the cite commands and within the publication list. For normal
cite commands, I would like authornum Author [1], whereas in the
publicationlist itself only the num [1]. AFAICS,
\setuppublications[refcommand=authornum] will influence both types.
Is there a setup option for this, or is a hack needed?


I expect adding a \setuppublications[refcommand=num] just before the
\completepublications will work.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] YABQ - yet another bib question

2010-02-11 Thread Thomas A. Schmitz

On Feb 11, 2010, at 3:35 PM, Taco Hoekwater wrote:

 Is there a setup option for this, or is a hack needed?
 
 I expect adding a \setuppublications[refcommand=num] just before the
 \completepublications will work.
 
 Best wishes,
 Taco

And right you are! I should've thought of that myself! Thanks Taco!

Thomas
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] YABQ (yet another bib question...)

2006-09-15 Thread Taco Hoekwater


Thomas A. Schmitz wrote:
 
 I just ran into the same question. When using a citation style that  
 doesn't quote the year (like refcommand=num), it seems more logical  
 to drop the maybeyear letter. It seems to work setting
 
 \def\maybeyear{\gobbleoneargument}
 
 I haven't seen any side effects yet, but maybe I'm missing something.  
 Would it be possible to make this behavior a global option/value?

The problem with redefining \maybeyear is that it affects all
citations equally: when you have three Knuth records with the
same year and two Tuftes with the same year in the database, then
if you use only one of Knuths but both Tuftes, you can no longer
see which one of the Tuftes you were citing.

I could add an interface setting, so that you would do not have to
resort to using \def, but it would be much better if I could fix
the problem internally. Needs some thinking, though

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


Re: [NTG-context] YABQ (yet another bib question...)

2006-09-15 Thread Thomas A. Schmitz

On Sep 15, 2006, at 9:57 AM, Taco Hoekwater wrote:

 The problem with redefining \maybeyear is that it affects all
 citations equally: when you have three Knuth records with the
 same year and two Tuftes with the same year in the database, then
 if you use only one of Knuths but both Tuftes, you can no longer
 see which one of the Tuftes you were citing.

 I could add an interface setting, so that you would do not have to
 resort to using \def, but it would be much better if I could fix
 the problem internally. Needs some thinking, though

 Taco

Yes, I see the difficulty. I don't know enough about bibtex styles  
and habits in general, but I'm just wondering if \maybeyear should be  
used in a different way - in my discipline, I think it would.  
Consider this example:

Hoekwater, First article, journalA, vol. 5 (2006)

Hoekwater, Second article, journalB, vol. 10 (2006)

IMHO, bibtex should now generate keys such as Hoek2006a and Hoek2006b  
or authoryear references like Hoekwater (2006a) and Hoekwater  
(2006b), but it should not (!) append the a and b to the years in  
the bibliographic list itself. But I may be wrong here - what do you  
and other users say? Should the (2006) in the example above come out  
as (2006a) and (2006b)? And as I was suggesting: if you use  
numered references, I think it would be best to just switch maybeyear  
off completely, so my suggestion would be to have a switch maybeyear  
= on/off for  the \setuppublicationlist.

Best

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


Re: [NTG-context] YABQ (yet another bib question...)

2006-09-15 Thread Taco Hoekwater


Thomas A. Schmitz wrote:
 IMHO, bibtex should now generate keys such as Hoek2006a and Hoek2006b  
 or authoryear references like Hoekwater (2006a) and Hoekwater  
 (2006b), but it should not (!) append the a and b to the years in  
 the bibliographic list itself. 

Actually, sometimes it should, namely in authoryear styles with
the list in database ordering as opposed to cite ordering.

 But I may be wrong here - what do you  
 and other users say? Should the (2006) in the example above come out  
 as (2006a) and (2006b)? And as I was suggesting: if you use  
 numered references, I think it would be best to just switch maybeyear  
 off completely, so my suggestion would be to have a switch maybeyear  
 = on/off for  the \setuppublicationlist.

Sure, that is simple. Will upload in a few minutes

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


Re: [NTG-context] YABQ (yet another bib question...)

2006-09-15 Thread Thomas A. Schmitz

On Sep 15, 2006, at 11:47 AM, Taco Hoekwater wrote:



 Thomas A. Schmitz wrote:
 IMHO, bibtex should now generate keys such as Hoek2006a and Hoek2006b
 or authoryear references like Hoekwater (2006a) and Hoekwater
 (2006b), but it should not (!) append the a and b to the years in
 the bibliographic list itself.

 Actually, sometimes it should, namely in authoryear styles with
 the list in database ordering as opposed to cite ordering.

Oh dear, once you go into the gory details of bibliographies, there's  
no end to it...


 But I may be wrong here - what do you
 and other users say? Should the (2006) in the example above come out
 as (2006a) and (2006b)? And as I was suggesting: if you use
 numered references, I think it would be best to just switch maybeyear
 off completely, so my suggestion would be to have a switch maybeyear
 = on/off for  the \setuppublicationlist.

 Sure, that is simple. Will upload in a few minutes

 Taco

Thanks Taco, that's sweet. Maybe other users can chime in. I'm still  
thinking whether it would be useful to add an option that would  
append maybeyyear only to the reference key, not to the list... Such  
as a bibliographic style that would produce this sort of list:

Hoekwater 2006a = Hoekwater, Article 1,
   JournalA 2 (2006) 20--30
Hoekwater 2006b = Hoekwater, Article 2,
   JournalB 2 (2006) 30--40

But disregard this if you think it's silly or if it's too difficult  
to implement.

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


Re: [NTG-context] YABQ (yet another bib question...)

2006-09-15 Thread Sanjoy Mahajan
 IMHO, bibtex should now generate keys such as Hoek2006a and
 Hoek2006b or authoryear references like Hoekwater (2006a) and
 Hoekwater (2006b), but it should not (!) append the a and b to
 the years in the bibliographic list itself. But I may be wrong here
 - what do you and other users say? Should the (2006) in the example
 above come out as (2006a) and (2006b)? 

At first I was sure that (2006a) and (2006b) are the right answer for
the list.  Othewise how else could the user know which entry to look
up when they see, say, Hoekwater (2006b) in the text?  But I just
figured out the answer to that question: Users count 'a', 'b',
... starting with the first 2006 entry.  However, I still don't think
it's a good idea to make them do that.  Let's not ask users to do what
computers do very well (counting)!

 And as I was suggesting: if you use numered references, I think it
 would be best to just switch maybeyear off completely, so my
 suggestion would be to have a switch maybeyear = on/off for the
 \setuppublicationlist.

Let me know whether I'm understanding it correctly.  If you have a
numbered reference list, then the year can still end up with a letter
tag, e.g.

1. Taco Hoekwater.  JournalA.  2006a
2. Taco Hoekwater.  JournalB.  2006b

Ah, I hadn't thought of that problem.  You're right, there shouldn't
be a maybeyear in this case since the list number disambiguates the
reference completely.

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
 --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] YABQ (yet another bib question...)

2006-09-15 Thread Thomas A. Schmitz

On Sep 15, 2006, at 2:34 PM, Sanjoy Mahajan wrote:

 At first I was sure that (2006a) and (2006b) are the right answer for
 the list.  Othewise how else could the user know which entry to look
 up when they see, say, Hoekwater (2006b) in the text?  But I just
 figured out the answer to that question: Users count 'a', 'b',
 ... starting with the first 2006 entry.  However, I still don't think
 it's a good idea to make them do that.  Let's not ask users to do what
 computers do very well (counting)!

 Let me know whether I'm understanding it correctly.  If you have a
 numbered reference list, then the year can still end up with a letter
 tag, e.g.

 1. Taco Hoekwater.  JournalA.  2006a
 2. Taco Hoekwater.  JournalB.  2006b

 Ah, I hadn't thought of that problem.  You're right, there shouldn't
 be a maybeyear in this case since the list number disambiguates the
 reference completely.

Sanjoy,

yes, I agree completely: let the computer do the counting and  
bookkeeping! And you've hit the nail on the head: what I meant was,  
in cases where the form of  the list makes the reference completely  
unambiguous (because it is numbered or because keys/authoryear tags  
are prefixed), adding another number in the bibliographic entry is  
superfluous and somewhat ugly.

So question to Taco: maybe we need three options for maybeyear?

1. off [always]

2. on [always]

3. on for tags and authoryear etc., off for the date entry in the  
list itself.

Am I making sense? Are we working you to the bones? ;-)

Best

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


Re: [NTG-context] YABQ (yet another bib question...)

2006-09-15 Thread Taco Hoekwater


Thomas A. Schmitz wrote:
 So question to Taco: maybe we need three options for maybeyear?
 
 1. off [always]

This is the one that is missing, yes? Because the

   \setuppublicationlist[maybeyear=off]

is actually option 3.

   2. on [always]
 
 3. on for tags and authoryear etc., off for the date entry in the  
 list itself.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] YABQ (yet another bib question...)

2006-09-14 Thread Thomas A. Schmitz

On Sep 10, 2006, at 3:30 PM, Taco Hoekwater wrote:

 [Taco: The reference to Knuth below comes out as (Knuth, 1981c) even
 though there are no other 1981 entries for Knuth cited in the text.
 Is that hard to fix given ConTeXt's way of dealing with bibtex, in
 that it just incorporates the entire database, in which there are
 several 1981 entries from Knuth?]

 Problematic. There is a small bit of influence possible: the `c' is
 inside macro (\maybeyear) that could be redefined (nullified), but
 that is a document-global solution, and it may not even work too well
 at that. It's been a long time since I looked at this problem. It is
 not totally unsolvable, but definately not simple either.

Taco,

I just ran into the same question. When using a citation style that  
doesn't quote the year (like refcommand=num), it seems more logical  
to drop the maybeyear letter. It seems to work setting

\def\maybeyear{\gobbleoneargument}

I haven't seen any side effects yet, but maybe I'm missing something.  
Would it be possible to make this behavior a global option/value?

Best

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


Re: [NTG-context] YABQ (yet another bib question...)

2006-09-11 Thread Thomas A. Schmitz
Sanjoy,

thanks for your rely. Of course you're quite right, this is the wau  
to go, and it works. But my question was imprecise because I did not  
mention what was causing the problem: I'm working with split  
bibliographies and want to refer in chapter 2 to an item already  
included in the biblio of chapter 2. If I just put a \cite command  
somewhere, this item will be included a second time in the list of  
chapter 2. So my question is: this item does already have a counter  
attached to it. Is it possible to refer to this raw counter across  
chapters? Like so:

Chapter 1

[1] main reference

Chapter 2

[2] another thing

[3] and yet another [reprinted in [1]]

without having [1] main reference repeated. This my very well be  
impossible, I'm just wondering.

Thanks, and all best

Thomas

On Sep 9, 2006, at 12:40 AM, Sanjoy Mahajan wrote:

 Is it possible to refer back to item [1] automatically, by sticking
 the reprinted in in a note field in the database? I tried a
 number of combinations of \crossref or so, but couldn't get this to
 work.

 I need to repeat my experiments, but I think it worked to use simply
 \cite in the bibtex entry.  Ah, here is one example.  It uses
 xampl.bib, which comes with old distributions of ConTeXt (e.g. teTeX
 3.0's distribution).

 [Taco: The reference to Knuth below comes out as (Knuth, 1981c) even
 though there are no other 1981 entries for Knuth cited in the text.
 Is that hard to fix given ConTeXt's way of dealing with bibtex, in
 that it just incorporates the entire database, in which there are
 several 1981 entries from Knuth?]

 = cut here 
 \usemodule[bib]
 \usemodule[bibltx]
 \setupbibtex[database=xampl]
 \starttext

 Here is a citation to a book that contains a cross reference:
 \cite[book-crossref].  The bibliography entry (next page) for it
 should contain a bib reference to another item in the bibliography.

 \completepublications
 \stoptext
 = cut here 

 Here are the relevant entries from xampl.bib, which indicates that
 it's the crossref= line that you need (not \cite as I said above)v:

 @BOOK{book-crossref,
crossref = whole-set,
title = Seminumerical Algorithms,
volume = 2,
series = The Art of Computer Programming,
edition = Second,
year = {\noopsort{1973c}}1981,
note = This is a cross-referencing BOOK entry,
 }

 @BOOK{whole-set,
author = Donald E. Knuth,
publisher = Addison-Wesley,
title = The Art of Computer Programming,
series = Four volumes,
year = {\noopsort{1973a}}{\switchargs{--90}{1968}},
note = Seven volumes planned (this is a cross-referenced set of
BOOKs),
 }

 -Sanjoy

 `Never underestimate the evil of which men of power are capable.'
  --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context

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


Re: [NTG-context] YABQ (yet another bib question...)

2006-09-11 Thread Taco Hoekwater
Thomas A. Schmitz wrote:
 Sanjoy,
 
 thanks for your rely. Of course you're quite right, this is the wau  
 to go, and it works. But my question was imprecise because I did not  
 mention what was causing the problem: I'm working with split  
 bibliographies and want to refer in chapter 2 to an item already  
 included in the biblio of chapter 2. If I just put a \cite command  
 somewhere, this item will be included a second time in the list of  
 chapter 2. So my question is: this item does already have a counter  
 attached to it. Is it possible to refer to this raw counter across  
 chapters? Like so:
 
 Chapter 1
 
 [1] main reference
 
 Chapter 2
 
 [2] another thing
 
 [3] and yet another [reprinted in [1]]
 
 without having [1] main reference repeated. This my very well be  
 impossible, I'm just wondering.

You can try this:

   \def\silentcite[#1]%
 {\bgroup
  \let\addthisref\gobbleoneargument
  \cite[#1]%
  \egroup}

(untested). If that does not work, it is not possible.

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


Re: [NTG-context] YABQ (yet another bib question...)

2006-09-11 Thread Thomas A. Schmitz

On Sep 11, 2006, at 7:11 PM, Taco Hoekwater wrote:

 You can try this:

\def\silentcite[#1]%
  {\bgroup
   \let\addthisref\gobbleoneargument
   \cite[#1]%
   \egroup}

 (untested). If that does not work, it is not possible.

 Taco

Taco,

thanks for the suggestion. It doesn't work (still  produces an entry  
in the bibliography), but it's not a big deal, these are very special  
cases, and I can edit the bbl manually in order to get them right.

On a related note: all lovers of the bib module (and I know there are  
many of them out there) may be interested to know of two nice things.  
I found them out while I was switching my bibliographies to the new  
system. So if you use the one and only editor, emacs, you may want to  
try this:

1. reftex works with context! It cannot automatically determine the  
database it is supposed to use (I have to look into the customization  
again to see whether it can be taught to do so), but you can tell it  
explicitly about your .bib file, and then, all the usual keybindings  
work, you get a nice buffer where you can choose your references etc.  
There was a discussion a while ago on the mailing list, and my  
impression was it didn't work, so I was thrilled to see it did!

2. I discovered another nice little app that works within emacs. It's  
called ebib. It is not very good as an editor for bibtex databases,  
but it has a great tab-completion feature for inserting references  
into your files. I tweaked it a bit so it would insert the proper  
\cite[] and \nocite[] commands for ConTeXt, and it is the fastest and  
most convenient thing I've ever seen. Maybe I should say something  
about on the wiki?

Anyway, Taco, thanks for your help, and all best

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


Re: [NTG-context] YABQ (yet another bib question...)

2006-09-11 Thread Sanjoy Mahajan
Thomas,

 Is it possible to refer to this raw counter across chapters?

Not sure -- it is beyond my ConTeXt bib module competence, but I hope
one of the resident experts has an idea...

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
 --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] YABQ (yet another bib question...)

2006-09-10 Thread Taco Hoekwater
Sanjoy Mahajan wrote:
 
 I need to repeat my experiments, but I think it worked to use simply
 \cite in the bibtex entry.  Ah, here is one example.  It uses
 xampl.bib, which comes with old distributions of ConTeXt (e.g. teTeX
 3.0's distribution).

Yeah, that's how I expected it to be done.

 [Taco: The reference to Knuth below comes out as (Knuth, 1981c) even
 though there are no other 1981 entries for Knuth cited in the text.
 Is that hard to fix given ConTeXt's way of dealing with bibtex, in
 that it just incorporates the entire database, in which there are
 several 1981 entries from Knuth?]

Problematic. There is a small bit of influence possible: the `c' is
inside macro (\maybeyear) that could be redefined (nullified), but
that is a document-global solution, and it may not even work too well
at that. It's been a long time since I looked at this problem. It is
not totally unsolvable, but definately not simple either.

Best,
Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context