ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* bibmodule requests
@ 2005-03-30 15:21 Stefano
  2005-03-31  8:29 ` Taco Hoekwater
  0 siblings, 1 reply; 7+ messages in thread
From: Stefano @ 2005-03-30 15:21 UTC (permalink / raw)


I have been using the bibmodule for a couple of weeks now, and it works
great!  ... but, I have run into some situations that are not considered.

(1) It would be nice to visually distinguish the cited author using a
different font or style in the text.  I was able to add \c!authorstyle to
\setupcite and make changes to the appropriate areas in the t-bib.tex
module.  I suppose I could also add a \c!yearstyle as well to allow for old
style figures.  In my case, I set \c!authorstyle={\em}

(2) Another situation arises when dealing with multiple references from the
same author in the same year.  The years have a lower case letter added,
such as 1995a, 1995b, 1995c, etc.

For example, let's say I have three entries:

article1 ... 1995a
article2 ... 1995b
article3 ... 1995c

These entries are labelled a,b,c when using BibTeX to process the .bib file
to the .bbl file.  Unfortunately, the .bbl file contains all entries, since
the .aux file contains the line \citation{*}.  If I cite article2 and
article3 in my document, the publication list uses 1995b and 1995c and my
citations use the same years, and doesn't start with 'a'.  The only way I
have found to remedy this situation is to create a .bbl file that only
contains the BibTeX entries which I have cited.  These cited entries are
listed in the .tui file that texexec creates.  Unfortunately, the .tui file
requires the entire .bbl file in order to list the entries cited ... so I
have devised the following process ...

step 1) run BibTeX using an .aux file that contains the line \citation{*}
step 2) run texexec document --once (this creates .tui with the list of
cited entries)
step 3) rename the .aux to ._au file
step 4) use the ._au and .tui files to create a new .aux which only lists
the entries cited instead of \citation{*} ... for example ...
\citation{Smith2001}
\citation{Jones1995}
\citation{Smith1999}
... etc.
step 5) run BibTeX again ... this will create a .bbl which only contains the
cited entries, ensuring that the years are labelled correctly i.e. 1995a,
1995b, etc.
step 6) run texexec document to create the final document

Is there any consideration to having .aux file created by texexec based on
the entries cited in the document?  I ended up creating a batch file to do
this so it's not really an issue for me.  Is there a better way to do this?

(3) Another issue I found is when using the
\cite[year][label1,label2,label3,etc.] and I have years such as 1995a,
1995b, 1995c, etc. only one of those years is listed, while if I use
\cite[author] or \cite[authoryear] or \cite[authoryears], all the required
years are listed.  Unfortunately, the grouped years are not in order i.e.
1995b before 1995a, but it looks like this depends on the ordering of the
labels.

(4) Another issue is with regards to the author names in the publication
list.  The first author is typically inverted (last name before first name),
but all subsequent authors are normal (first name before last name) ... for
example ... Smith, A.B, C.D. Jones, E.J. Doe, and J.T. Morgan ... The use of
author styles such as \normalauthor \invertedshortauthor, etc. applies to
the entire list of authors.  Is there any way to specify one style for the
first author and a different style for the second and subsequent authors?

(5) Is it possible to have additional annotations with a citation?  For
example, if I want to refer to page 27 from Smith et al., I would have
(Smith et al., 1995a, p. 27).  Another possibility is to have (e.g. Smith et
al., 1995a, p.27).  I suppose I could blank out the brackets in \setupcite
and do the following ... (e.g. \cite[smith1995], p.27) or create a custom
\def such as

\def\Cite[#1][#2][#3]{(#1 \cite[#2], #3)} and use it as such ...
\Cite[e.g.][smith1995][p. 27]

Any information is appreciated.


Sincerely,

Stefano

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

* Re: bibmodule requests
  2005-03-30 15:21 bibmodule requests Stefano
@ 2005-03-31  8:29 ` Taco Hoekwater
  2005-03-31 10:40   ` Mark Smith
  0 siblings, 1 reply; 7+ messages in thread
From: Taco Hoekwater @ 2005-03-31  8:29 UTC (permalink / raw)



Hi Stefano,

I have to be brief, I do not have enough time on my hands right now to
deal extensively with bibmodule issues. It is on my todo list for the
near future though.

Stefano wrote:
> I have been using the bibmodule for a couple of weeks now, and it works
> great!  ... but, I have run into some situations that are not considered.

Thank you!

> (1) It would be nice to visually distinguish the cited author using a
> different font or style in the text.  I was able to add \c!authorstyle to
> \setupcite and make changes to the appropriate areas in the t-bib.tex
> module.  I suppose I could also add a \c!yearstyle as well to allow for old
> style figures.  In my case, I set \c!authorstyle={\em}

Could you email me (personally!) your changes please? I want to such
extensions into the main module whenever possible.

> (2) Another situation arises when dealing with multiple references from the
> same author in the same year.  The years have a lower case letter added,
> such as 1995a, 1995b, 1995c, etc.

> Is there any consideration to having .aux file created by texexec based on
> the entries cited in the document?  I ended up creating a batch file to do
> this so it's not really an issue for me.  Is there a better way to do this?

Bibtex is a very LaTeX-specific bit of software, and the less
I have to deal with it, the better I feel.  I will never write code
to create an .aux file that lists the actual references, because
I am already a bit annoyed by the mere fact that this .aux LaTeX
thing is hardwired in bibtex. I don't want to spend any time on
improving it.

Conceptually, the .bib format does not really exist where the module
is involved. I consider the .bbl file to be the actual source
database (this is why there is a \usepublications command).
If someone doesn't want the 1995a item in the bbl, just delete it
for the bbl file and never run bibtex again. (a future version
of the bib module will support MlBibTeX's XML format, when that
becomes available).

> (3) Another issue I found is when using the
> \cite[year][label1,label2,label3,etc.] and I have years such as 1995a,
> 1995b, 1995c, etc. only one of those years is listed, while if I use
> \cite[author] or \cite[authoryear] or \cite[authoryears], all the required
> years are listed.  Unfortunately, the grouped years are not in order i.e.
> 1995b before 1995a, but it looks like this depends on the ordering of the
> labels.

I have to look deeper into this before I can give real answers. It
certainly sounds like there is a bug or omission in the module.

> (4) Another issue is with regards to the author names in the publication
> list.  The first author is typically inverted (last name before first name),
 > ....

This was also requested by David Wooten. `Clean' support for this will
be added in the future, but if  you need it right now, you need a
definition along these lines:

   %D The \type{\scratchcounter} is incremented by \specialbibinsert
   %D before each author/editor is typeset, so the only thing that needs
   %D doing is testing its value to decide which of the two `standard'
   %D author formatting macros to call.
   %D
   %D You may have to fix the \type{\normalauthor} definition as well,
   %D because the 'glue items' like \type{firstnamesep} may get in the
   %D way.

   \def\toggledauthor#1#2#3#4#5%
    {\relax \ifnum \scratchcounter > 1
       \normalauthor{#1}{#2}{#3}{#4}{#5}%
     \else
       \invertedauthor{#1}{#2}{#3}{#4}{#5}%
     \fi  }

   \setuppublicationlist
     [artauthor=\toggledauthor,
      editor=\toggledauthor,
      author=\toggledauthor]


> (5) Is it possible to have additional annotations with a citation? 
 > ..
> \def\Cite[#1][#2][#3]{(#1 \cite[#2], #3)}
> \Cite[e.g.][smith1995][p. 27]

That is the proposed solution (at least for the time being).

Greetings, Taco

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

* Re: bibmodule requests
  2005-03-31  8:29 ` Taco Hoekwater
@ 2005-03-31 10:40   ` Mark Smith
  2005-03-31 11:31     ` Taco Hoekwater
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Smith @ 2005-03-31 10:40 UTC (permalink / raw)


Taco Hoekwater wrote:

>Conceptually, the .bib format does not really exist where the module
>is involved. I consider the .bbl file to be the actual source
>database (this is why there is a \usepublications command).
>If someone doesn't want the 1995a item in the bbl, just delete it
>for the bbl file and never run bibtex again. (a future version
>of the bib module will support MlBibTeX's XML format, when that
>becomes available).

I'm no particular fan of the bibtex format myself, but I stick with it, because its the only thing that works everywhere I need it to and it rarely give me headaches.

Taco's post prompted me to actually take a look at .bbl files for the first time.

Taco, are you advocating that for ConTeXt we use skip to using the .bbl file as the point at which we edit our ref files if we are looing for any kind of non-standard output until such time as something "better" becomes available ?

(I've nothing against that in principle. Its just as accessible and manageable in an editor as .bib, but I don't think this is going to be popular until such time as we have tools for bbl file management e.g. a la BibDesk on OS X.)

In any case, I don't get the logic behind part of the .bbl syntax. We have e.g.:

        \startpublication[k=Justerini2005a,t=article,
        a={Justerini et~al.},y=2005a,
        n=16,s=BDBH00a]
        \artauthor[]{G.}[G.]{}{Justerini}
        \artauthor[]{A.}[A.]{}{Brooks}
        ...etc...
        \pubyear{2005\maybeyear{a}}
        ...etc...
        \stoppublication
        
can this perhaps be simplified in defaults or settable via a switch to:

        
        \startpublication[k=Justerini2005a,t=article,
        a={Justerini et~al.},y=2005,
        n=16,s=BDBH00a]
        \artauthor[]{G.}[G.]{}{Justerini}
        \artauthor[]{A.}[A.]{}{Brooks}
        ...etc...
        \pubyear{2005}
        ...etc...
        \stoppublication
        
?

Put another way, what is the rationale behind having e.g.:

        y=2005a instead of y=2005
        
and:

        \pubyear{2005\maybeyear{a}} instead of \pubyear{2005}
        
?

Another minor question: why are the text contents of the abstract field hard-wrapped ?

No doubt there are good reasons for all of these.

mark.

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

* Re: bibmodule requests
  2005-03-31 10:40   ` Mark Smith
@ 2005-03-31 11:31     ` Taco Hoekwater
  2005-03-31 12:13       ` Taco Hoekwater
  2005-03-31 13:52       ` Mark Smith
  0 siblings, 2 replies; 7+ messages in thread
From: Taco Hoekwater @ 2005-03-31 11:31 UTC (permalink / raw)


Mark Smith wrote:
> 
> Put another way, what is the rationale behind having e.g.:
> 
>         y=2005a instead of y=2005
> and:
>         \pubyear{2005\maybeyear{a}} instead of \pubyear{2005}
> ?

The suffixes are needed because otherwise author,year styles
cannot differentiate between different publications by one
author in the same year. The actual implementation is a bit
clumsy because it was mimicked incompletely from bibtex.

> Another minor question: why are the text contents of the abstract field hard-wrapped ?

Because they were so in the original bib file.

Taco

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

* Re: bibmodule requests
  2005-03-31 11:31     ` Taco Hoekwater
@ 2005-03-31 12:13       ` Taco Hoekwater
  2005-03-31 13:48         ` Mark Smith
  2005-03-31 13:52       ` Mark Smith
  1 sibling, 1 reply; 7+ messages in thread
From: Taco Hoekwater @ 2005-03-31 12:13 UTC (permalink / raw)


I wrote:
>> Another minor question: why are the text contents of the abstract 
>> field hard-wrapped ?
> 
> Because they were so in the original bib file.

Sorry, perhaps I lied.
They are probably automatically inserted by bibtex.

Taco

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

* Re: bibmodule requests
  2005-03-31 12:13       ` Taco Hoekwater
@ 2005-03-31 13:48         ` Mark Smith
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Smith @ 2005-03-31 13:48 UTC (permalink / raw)


Taco Hoekwater wrote:

>> Because they were so in the original bib file.
>
>Sorry, perhaps I lied.
>They are probably automatically inserted by bibtex.

Hmm... yes, that will be it.

mark.

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

* Re: bibmodule requests
  2005-03-31 11:31     ` Taco Hoekwater
  2005-03-31 12:13       ` Taco Hoekwater
@ 2005-03-31 13:52       ` Mark Smith
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Smith @ 2005-03-31 13:52 UTC (permalink / raw)


Taco Hoekwater wrote:

>The suffixes are needed because otherwise author,year styles
>cannot differentiate between different publications by one
>author in the same year. The actual implementation is a bit
>clumsy because it was mimicked incompletely from bibtex.

Hmm... then maybe a single field from which the contents are only collected for author,year styles that ask for/need the suffix could be used to hold the citekey unique identifier suffix ?

something like

        \authoryearid{a}
        
?

...just thinking out loud. This might be a nightmare to implement for generating the author,year citations in the text druing a run. That's beyond my ken.

mark.

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

end of thread, other threads:[~2005-03-31 13:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-30 15:21 bibmodule requests Stefano
2005-03-31  8:29 ` Taco Hoekwater
2005-03-31 10:40   ` Mark Smith
2005-03-31 11:31     ` Taco Hoekwater
2005-03-31 12:13       ` Taco Hoekwater
2005-03-31 13:48         ` Mark Smith
2005-03-31 13:52       ` Mark Smith

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