ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* setupreferenceformat questions
@ 2008-02-15 16:27 Santy, Michael
  2008-02-16  9:19 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Santy, Michael @ 2008-02-15 16:27 UTC (permalink / raw)
  To: ntg-context; +Cc: pragma


[-- Attachment #1.1: Type: text/plain, Size: 1498 bytes --]


Due to some fairly unique customer requirements for bibliography, we're using the simple bibliography discussed in the wiki (http://wiki.contextgarden.net/Simple_Bibliography).  While this approach gives us more flexibility, I'm having trouble with a couple of things... 

1) The code below wraps the reference number in brackets.  How would I make the reference number superscript (like an endnote)?
2) The references in the text are numbered in the order the bibitems are defined in the bibliography, not the order on which they are cited in the text.  How would I order them according to the order in which they occur in the text?

Thanks,
Mike Santy

\setupinteraction[state=start]
\definereferenceformat[cite][left={[},right={]}]
\defineitemgroup [bibliography] [levels=1]
\setupitemgroup  [bibliography] 
                 [symbol=n,
                  left={[},
                  right={]},
                  width=1.5em,
                  stopper=,
                  itemalign=flushright,
                  inbetween={\blank[4pt]}]
\appendtoks
  \let \bibitem \itemgroupitem
\to \itemgroupcommands

\starttext

Now is the time\cite[ref2] for all good men\cite[ref1].  I would like the citations to be numbered based on the order in which they occur in the document, not in the bibliography.

\section{References}

\startbibliography
  \bibitem[ref1] This is my first reference
  \bibitem[ref2] This is the second reference
\stopbibliography

\stoptext
 

[-- Attachment #1.2: Type: text/html, Size: 2710 bytes --]

[-- Attachment #2: 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
___________________________________________________________________________________

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

* Re: setupreferenceformat questions
  2008-02-15 16:27 setupreferenceformat questions Santy, Michael
@ 2008-02-16  9:19 ` Wolfgang Schuster
  2008-02-17 19:20   ` {Spam?} " Mike Santy
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2008-02-16  9:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Feb 15, 2008 at 5:27 PM, Santy, Michael
<Michael.Santy@dynetics.com> wrote:
>
> Due to some fairly unique customer requirements for bibliography, we're
> using the simple bibliography discussed in the wiki
> (http://wiki.contextgarden.net/Simple_Bibliography).  While this approach
> gives us more flexibility, I'm having trouble with a couple of things...
>
>  1) The code below wraps the reference number in brackets.  How would I make
> the reference number superscript (like an endnote)?

\def\startHIGH{\raise.5ex\normalhbox\bgroup\tfx}
\def\stopHIGH{\egroup}

\definereferenceformat[cite][left=\startHIGH,right=\stopHIGH]

>  2) The references in the text are numbered in the order the bibitems are
> defined in the bibliography, not the order on which they are cited in the
> text.  How would I order them according to the order in which they occur in
> the text?

requires more coding.

>  Thanks,
>  Mike Santy
>
>  \setupinteraction[state=start]
>  \definereferenceformat[cite][left={[},right={]}]
>  \defineitemgroup [bibliography] [levels=1]
>  \setupitemgroup  [bibliography]
>                   [symbol=n,
>                    left={[},
>                    right={]},
>                    width=1.5em,
>                    stopper=,
>                    itemalign=flushright,
>                    inbetween={\blank[4pt]}]
>  \appendtoks
>    \let \bibitem \itemgroupitem
>  \to \itemgroupcommands
>
>  \starttext
>
>  Now is the time\cite[ref2] for all good men\cite[ref1].  I would like the
> citations to be numbered based on the order in which they occur in the
> document, not in the bibliography.
>
>  \section{References}
>
>  \startbibliography
>    \bibitem[ref1] This is my first reference
>    \bibitem[ref2] This is the second reference
>  \stopbibliography
>
>  \stoptext

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


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

* {Spam?} Re:  setupreferenceformat questions
  2008-02-16  9:19 ` Wolfgang Schuster
@ 2008-02-17 19:20   ` Mike Santy
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Santy @ 2008-02-17 19:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thanks, Wolfgang!


On 2/16/08 3:19 AM, "Wolfgang Schuster" <schuster.wolfgang@googlemail.com>
wrote:

> On Fri, Feb 15, 2008 at 5:27 PM, Santy, Michael
> <Michael.Santy@dynetics.com> wrote:
>> 
>> Due to some fairly unique customer requirements for bibliography, we're
>> using the simple bibliography discussed in the wiki
>> (http://wiki.contextgarden.net/Simple_Bibliography).  While this approach
>> gives us more flexibility, I'm having trouble with a couple of things...
>> 
>>  1) The code below wraps the reference number in brackets.  How would I make
>> the reference number superscript (like an endnote)?
> 
> \def\startHIGH{\raise.5ex\normalhbox\bgroup\tfx}
> \def\stopHIGH{\egroup}
> 
> \definereferenceformat[cite][left=\startHIGH,right=\stopHIGH]
> 
>>  2) The references in the text are numbered in the order the bibitems are
>> defined in the bibliography, not the order on which they are cited in the
>> text.  How would I order them according to the order in which they occur in
>> the text?
> 
> requires more coding.
> 
>>  Thanks,
>>  Mike Santy
>> 
>>  \setupinteraction[state=start]
>>  \definereferenceformat[cite][left={[},right={]}]
>>  \defineitemgroup [bibliography] [levels=1]
>>  \setupitemgroup  [bibliography]
>>                   [symbol=n,
>>                    left={[},
>>                    right={]},
>>                    width=1.5em,
>>                    stopper=,
>>                    itemalign=flushright,
>>                    inbetween={\blank[4pt]}]
>>  \appendtoks
>>    \let \bibitem \itemgroupitem
>>  \to \itemgroupcommands
>> 
>>  \starttext
>> 
>>  Now is the time\cite[ref2] for all good men\cite[ref1].  I would like the
>> citations to be numbered based on the order in which they occur in the
>> document, not in the bibliography.
>> 
>>  \section{References}
>> 
>>  \startbibliography
>>    \bibitem[ref1] This is my first reference
>>    \bibitem[ref2] This is the second reference
>>  \stopbibliography
>> 
>>  \stoptext
> 
> Wolfgang
> ______________________________________________________________________________
> _____
> 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
> ______________________________________________________________________________
> _____

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


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

end of thread, other threads:[~2008-02-17 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-15 16:27 setupreferenceformat questions Santy, Michael
2008-02-16  9:19 ` Wolfgang Schuster
2008-02-17 19:20   ` {Spam?} " Mike Santy

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