ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* m-bib: passing extra information to \cite
@ 2001-09-06 20:07 Eckhart Guthöhrlein
  2001-09-07  8:15 ` Taco Hoekwater
  0 siblings, 1 reply; 8+ messages in thread
From: Eckhart Guthöhrlein @ 2001-09-06 20:07 UTC (permalink / raw)


Hi Taco,

(probably a question mainly for you)
I want to pass extra information to the \cite command, e.g. page numbers 
when citing a book. I didn't find a predefined way to do this in 
bibmod.pdf, and at the moment I'm using the following definition

\def\citeplus[#1][#2][#3]{%
    {%
       \setupcite[#1][right={, #3)}]%
       \cite[#1][#2]%
    }%
}

and then, for example,

\citeplus[authoryears][SomeBook][S.~100]

This is of course not very elegant, so is there a better way? If not, I 
think the facility should be provided somehow in future versions of m-bib.
Apropos m-bib, there are those unresolved problems: 
\setupbibtex[sort=author] has no effect, and \cite[Xyz97] without the first 
(optional) argument gobbles the following space (just to remind you, I can 
work around it).
Ah, and another question (didn't try myself yet): If I want to use -- for 
page ranges, but I have pages={10-20} in my bib file, can this be done at 
the bibl-xxx.tex level? Or is it easier to change the cont-xx.bst file? 
Similar: what about a point after the title in the bib file, which I would 
like to remove because a point is added when typesetting the list of 
publications?

Eckhart


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

* Re: m-bib: passing extra information to \cite
  2001-09-06 20:07 m-bib: passing extra information to \cite Eckhart Guthöhrlein
@ 2001-09-07  8:15 ` Taco Hoekwater
  2001-09-07  8:58   ` Eckhart Guthöhrlein
  2001-09-07 10:42   ` Hans Hagen
  0 siblings, 2 replies; 8+ messages in thread
From: Taco Hoekwater @ 2001-09-07  8:15 UTC (permalink / raw)


Eckhart Guthöhrlein wrote:

... [snip] ..
> and then, for example,
> 
> \citeplus[authoryears][SomeBook][S.~100]
> 
> This is of course not very elegant, so is there a better way? If not, I

Not at the moment, but I will add something in a future version. One
problem
with \cite that I am interested in hearing people's opinion about: the
currently is a 'latex compatibility' option available as well. 

\cite{..} is accepted as meaning the same as \cite[..]. It is in there
because existing databases use this syntax when refering to other items
in the database. But: it is very latexy and not in sync with the context
rule that typeset arguments use {} and setup arguments use []. 

So, question: to remove or not to remove? How many people share bibtex 
databases between latex en context? (removal makes it easier to implement
the 'extra info').

> Apropos m-bib, there are those unresolved problems:
> \setupbibtex[sort=author] has no effect, and \cite[Xyz97] without the first
> (optional) argument gobbles the following space (just to remind you, I can
> work around it).

Noted. this wil be fixed somewhere before eurotex. Hans? the first one is 
a conflict with the multi-lingual interface: author is defined already.
Could
you have a look and explain to me how to go about that?

> Ah, and another question (didn't try myself yet): If I want to use -- for
> page ranges, but I have pages={10-20} in my bib file, can this be done at
> the bibl-xxx.tex level? Or is it easier to change the cont-xx.bst file?
> Similar: what about a point after the title in the bib file, which I would
> like to remove because a point is added when typesetting the list of
> publications?

It's probably easier at the macro level. The bst files are weird, even for
bst files ;).  I will look into it and try to explain in the documentation 
how it should be done.

-- 
groeten,

Taco


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

* Re: m-bib: passing extra information to \cite
  2001-09-07  8:15 ` Taco Hoekwater
@ 2001-09-07  8:58   ` Eckhart Guthöhrlein
  2001-09-07 10:40     ` Hans Hagen
  2001-09-07 10:42   ` Hans Hagen
  1 sibling, 1 reply; 8+ messages in thread
From: Eckhart Guthöhrlein @ 2001-09-07  8:58 UTC (permalink / raw)


At 10:15 07.09.2001 +0200, Taco Hoekwater wrote:
>\cite{..} is accepted as meaning the same as \cite[..]. It is in there
>because existing databases use this syntax when refering to other items
>in the database. But: it is very latexy and not in sync with the context
>rule that typeset arguments use {} and setup arguments use [].
>
>So, question: to remove or not to remove? How many people share bibtex
>databases between latex en context? (removal makes it easier to implement
>the 'extra info').

As far as I am concerned, it can be removed, since I'm planning to abandon 
the use of latex entirely and do not have large bibtex databases yet.

A more general solution could be to use a different command for 
cross-referencing inside the bib file, let's call it \crosscite for 
example. Then you could say something like

\def\crosscite#1{\cite[#1]} % for context

or

\def\crosscite#1{\cite{#1}} % for latex

in the setup area of your document, or perhaps better in the bib module and 
in a cont-bib.sty file provided for use with latex. Existing databases 
could be converted with a single search and replace, and the context \cite 
command would be free of restrictions due to backwards compatibility 
issues. I think this simple conversion would be an acceptable price for 
enhanced functionality.
Perhaps the definition of \crosscite should provide equivalent use of 
\crosscite{..} and \crosscite[..], so context users can use the square 
brackets consistently.

Eckhart


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

* Re: m-bib: passing extra information to \cite
  2001-09-07  8:58   ` Eckhart Guthöhrlein
@ 2001-09-07 10:40     ` Hans Hagen
  2001-09-07 12:48       ` Taco Hoekwater
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2001-09-07 10:40 UTC (permalink / raw)
  Cc: Taco Hoekwater, ConTeXt mailing list

At 10:58 AM 9/7/2001 +0200, Eckhart Guthöhrlein wrote:
>At 10:15 07.09.2001 +0200, Taco Hoekwater wrote:
>>\cite{..} is accepted as meaning the same as \cite[..]. It is in there
>>because existing databases use this syntax when refering to other items
>>in the database. But: it is very latexy and not in sync with the context
>>rule that typeset arguments use {} and setup arguments use [].
>>
>>So, question: to remove or not to remove? How many people share bibtex
>>databases between latex en context? (removal makes it easier to implement
>>the 'extra info').
>
>As far as I am concerned, it can be removed, since I'm planning to abandon 
>the use of latex entirely and do not have large bibtex databases yet.
>
>A more general solution could be to use a different command for 
>cross-referencing inside the bib file, let's call it \crosscite for 
>example. Then you could say something like
>
>\def\crosscite#1{\cite[#1]} % for context
>
>or
>
>\def\crosscite#1{\cite{#1}} % for latex

then, how about:

\let\simplecite\cite

\def\complexcite[#1]{\normalcite{#1}}

\definecomplexorsimple\cite

now \cite[bla] and \cite{bla} both work (but i favor the [] only approach).

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: m-bib: passing extra information to \cite
  2001-09-07  8:15 ` Taco Hoekwater
  2001-09-07  8:58   ` Eckhart Guthöhrlein
@ 2001-09-07 10:42   ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2001-09-07 10:42 UTC (permalink / raw)
  Cc: ConTeXt mailing list

At 10:15 AM 9/7/2001 +0200, Taco Hoekwater wrote:

>\cite{..} is accepted as meaning the same as \cite[..]. It is in there
>because existing databases use this syntax when refering to other items
>in the database. But: it is very latexy and not in sync with the context
>rule that typeset arguments use {} and setup arguments use [].

one way out there is

\pushmacro\cite

\def\cite#1{....}  .... load database ....

\popmacro\cite

unless of course \cite is part of dbase entries

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: m-bib: passing extra information to \cite
  2001-09-07 10:40     ` Hans Hagen
@ 2001-09-07 12:48       ` Taco Hoekwater
  2001-09-07 14:14         ` Re[2]: " Giuseppe Bilotta
  2001-09-07 15:24         ` Hans Hagen
  0 siblings, 2 replies; 8+ messages in thread
From: Taco Hoekwater @ 2001-09-07 12:48 UTC (permalink / raw)


Hans Hagen wrote:
> 
> \definecomplexorsimple\cite
> 
> now \cite[bla] and \cite{bla} both work (but i favor the [] only approach).

Roughly speaking, this is what happens now. But soon we will probably have
calling conventions like \cite[...][...][..=..] or \cite {..}[..][..]{..}
(more or less the same as for \in), and supporting the latex syntax is
getting problematic. Besides that, there is usually other stuff wrong
with bibtex (latex) databases, like commands that are defined in the
preamble using \newcommand; \text... commands in the text; etc.

Eventually, I plan to phase out bibtex alltogether, and replace it with
an XML input filter (with a formalized DTD).

-- 
groeten,

Taco


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

* Re[2]: m-bib: passing extra information to \cite
  2001-09-07 12:48       ` Taco Hoekwater
@ 2001-09-07 14:14         ` Giuseppe Bilotta
  2001-09-07 15:24         ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Giuseppe Bilotta @ 2001-09-07 14:14 UTC (permalink / raw)
  Cc: ntg-context

Friday, September 07, 2001 Taco Hoekwater wrote:
TH> Eventually, I plan to phase out bibtex alltogether, and replace it with
TH> an XML input filter (with a formalized DTD).

The Extended Object feature I'm developing could turn useful. I
posted the (more or less) current code on the list some time ago.
It's entirely TeX based (since I'm not comfortable as yet with
XML+ConTeXt), though.

--
Giuseppe "Oblomov" Bilotta


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

* Re: m-bib: passing extra information to \cite
  2001-09-07 12:48       ` Taco Hoekwater
  2001-09-07 14:14         ` Re[2]: " Giuseppe Bilotta
@ 2001-09-07 15:24         ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2001-09-07 15:24 UTC (permalink / raw)
  Cc: ConTeXt mailing list

At 02:48 PM 9/7/2001 +0200, Taco Hoekwater wrote:
>Hans Hagen wrote:
> >
> > \definecomplexorsimple\cite
> >
> > now \cite[bla] and \cite{bla} both work (but i favor the [] only approach).
>
>Roughly speaking, this is what happens now. But soon we will probably have
>calling conventions like \cite[...][...][..=..] or \cite {..}[..][..]{..}
>(more or less the same as for \in), and supporting the latex syntax is
>getting problematic. Besides that, there is usually other stuff wrong
>with bibtex (latex) databases, like commands that are defined in the
>preamble using \newcommand; \text... commands in the text; etc.
>
>Eventually, I plan to phase out bibtex alltogether, and replace it with
>an XML input filter (with a formalized DTD).

that's indeed the way to go, [and them write a perl script that converts 
bin databases).

we can discuss this at eurotex

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

end of thread, other threads:[~2001-09-07 15:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-06 20:07 m-bib: passing extra information to \cite Eckhart Guthöhrlein
2001-09-07  8:15 ` Taco Hoekwater
2001-09-07  8:58   ` Eckhart Guthöhrlein
2001-09-07 10:40     ` Hans Hagen
2001-09-07 12:48       ` Taco Hoekwater
2001-09-07 14:14         ` Re[2]: " Giuseppe Bilotta
2001-09-07 15:24         ` Hans Hagen
2001-09-07 10:42   ` Hans Hagen

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