Re: [NTG-context] Help regarding IEEE citation style

2011-01-27 Thread Mojca Miklavec
On Wed, Jan 26, 2011 at 16:10, Julius Canute wrote:
 I wan to cite references in my ConTeXt document using IEEE citation style. 
 Specifically for Web URL. How to do that using ConTeXt and BiBTeX?

It is quite possible that nobody has used IEEE citation style in
ConTeXt (I didn't check how it should look like).

However it is reasonably easy to modify the style by yourself (in
contrast to classical BibTeX and LaTeX). If you use pure bibtex
entries (.bib files) it is a bit more difficult to add new types of
bibliography items, but if you create the entries in ConTeXt, you have
almost unlimited capabilities. Take a look at bib module documentation
on http://modules.contextgarden.net/bibman.

Here is an example of how I start the bibilography file ...

% a new field to hold the name of conference
\newbibfield[conference]

% tell ConTeXt how the layout for new types should look like
\setuppublicationlayout[conference]{%
\insertartauthors{}{\unskip. }{}%
\insertarttitle{\bgroup }{\egroup. }{}%
\insertconference{\bgroup \it}{\egroup\insertday{, }{.
}{}\insertmonth{}{\ }{}\insertpubyear{}{}{}. }{}%
}
\setuppublicationlayout[webpage]{%
\inserttitle{\bgroup\it }{\egroup. }{}%
\inserturl{}{}{}%
}

% example of webpage entry
\startpublication
[k=FAIR,
 t=webpage,
 u=http://www.gsi.de/fair/,
]
\biburl{http://www.gsi.de/fair/}
\title{FAIR -- Facility for Antiproton and Ion Research}
\stoppublication

You might need to redefine \setuppublicationlayout[article] and others
to conform to their standard. See the files in tex/context/bib/.

Mojca
___
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] Help regarding IEEE citation style

2011-01-27 Thread Aditya Mahajan

On Fri, 28 Jan 2011, Mojca Miklavec wrote:


On Wed, Jan 26, 2011 at 16:10, Julius Canute wrote:


I wan to cite references in my ConTeXt document using IEEE citation 
style. Specifically for Web URL. How to do that using ConTeXt and 
BiBTeX?


It is quite possible that nobody has used IEEE citation style in
ConTeXt (I didn't check how it should look like).


I am attaching a file that I used a couple of years ago. I haven't checked 
it with the latest version of the bib module.


Aditya%D \module

%D   [   file=bibl-ieee,

%Dversion=2007.06.25,

%D  title=IEEE bibliography style,

%D   subtitle=IEEE Publications,

%D author={Aditya Mahajan},

%D   date=\currentdate,

%D  copyright={Aditya Mahajan}]



\unprotect



%D The default mnemonics are not compatible with IEEE style.



\setuplabeltext [\s!en] [\v!january  :\s!mnem=Jan.]

\setuplabeltext [\s!en] [\v!february :\s!mnem=Feb.]

\setuplabeltext [\s!en] [\v!march:\s!mnem=Mar.]

\setuplabeltext [\s!en] [\v!april:\s!mnem=Apr.]

\setuplabeltext [\s!en] [\v!may  :\s!mnem=May]

\setuplabeltext [\s!en] [\v!june :\s!mnem=Jun.]

\setuplabeltext [\s!en] [\v!july :\s!mnem=Jul.]

\setuplabeltext [\s!en] [\v!august   :\s!mnem=Aug.]

\setuplabeltext [\s!en] [\v!september:\s!mnem=Sep.]

\setuplabeltext [\s!en] [\v!october  :\s!mnem=Oct.]

\setuplabeltext [\s!en] [\v!november :\s!mnem=Nov.]

\setuplabeltext [\s!en] [\v!december :\s!mnem=Dec.]



\setupbibtex  [sort=author]

\setuppublicationlist [maybeyear=off]



\setuplistalternative

  [ieee]

  [\c!distance=1em,

  \c!width=2em,

\c!stretch=0em,

\c!command=,

  ]



\setuppublicationlist 

  [\c!numbercommand=\!!ieee@brackets,

   \c!width=2em,

 \c!alternative=ieee,

  \c!samplesize={99},

  ]





%D This should probably go into the core.



\def\doverysimplebibnumref#1#2%

   {\refsep

\ifcase#1\relax \unknownreference{#1}\else

  \def\tempa{#2}\ifx\empty\tempa#1\else#1\docommaordash{#1}{#2}#2\fi

\fi}%



\def\docommaordash#1#2%

   {\doifelse{\the\numexpr#1+1-#2\relax}{0}%

 {\bibalternative\c!pubsep}%

 {\bibalternative\c!inbetween}}%



\setupcite

   [author,year]

   [\c!andtext={ and },

\c!otherstext={ et al.},

\c!pubsep={, },

\c!lastpubsep={ and },

\c!compress=\v!no,

\c!inbetween={ },

\c!left={(},

\c!right={)}]



\setupcite

   [authoryear]

   [\c!andtext={ and },

\c!otherstext={ et al.},

\c!pubsep={, },

\c!lastpubsep={ and },

\c!compress=\v!no,

\c!inbetween={ },

\c!left={(},

\c!right={)}]



\setupcite

   [authoryears]

   [\c!andtext={ and },

\c!otherstext={ et al.},

\c!pubsep={, },

\c!lastpubsep={ and },

\c!compress=\v!no,

\c!inbetween={, },

\c!left={(},

\c!right={)}]



\setupcite

   [key,serial,authornum,page,short,type,doi,url]

   [\c!andtext={ and },

\c!otherstext={ et al.},

\c!pubsep={, },

\c!lastpubsep={ and },

\c!compress=\v!no,

\c!inbetween={ },

\c!left={[},

\c!right={]}]



\setupcite

   [num]

   [\c!andtext={ and },

\c!otherstext={ et al.},

\c!pubsep={, },

\c!lastpubsep={ and },

\c!compress=\v!yes,

\c!inbetween={]--[},

\c!left={[},

\c!right={]}]



%D This is the ugliest way to make sure that the number is right justified.

%D The trouble is that \filename{core-lst.tex} contains an explicit

%D \type|\hfill|.



\def\!!ieee@brackets#1%

  {\hbox \ifdim\!!widtha\zeropoint to \!!widtha \fi

   {\hss[#1]\hskip 0.5em}}



\setuppublications

   [\c!sorttype=cite,

\c!criterium=,

\c!refcommand=num,

\c!numbering=\v!yes,

\c!numbercommand=\!!ieee@brackets,

monthconversion=month:mnem]



\setuppublicationlist

   [\c!artauthor=\normalshortauthor,

\c!editor=\normalshortauthor,

\c!author=\normalshortauthor,

\c!namesep={, },

\c!lastnamesep={ and },

\c!finalnamesep={, and },

\c!firstnamesep={ },

\c!juniorsep={ },

\c!vonsep={ },

\c!surnamesep={ },

\c!authoretallimit=5,

\c!editoretallimit=5,

\c!artauthoretallimit=5,

\c!authoretaldisplay=5,

\c!editoretaldisplay=5,

\c!artauthoretaldisplay=5,

\c!authoretaltext={ et al.},

\c!editoretaltext={ et al.},

\c!artauthoretaltext={ et al.},

artauthorcommand=\!!ieee@repeatedauthors,

authorcommand=\!!ieee@repeatedauthors,

]



%D Just to be sure



\def\maybeyear#1{}

\def\etalchar#1{#1}



%D Show repeated authors by --



\def\!!ieee@oldauthors{}



\def\!!ieee@repeatedauthors#1#2#3%

{\xdef\!!ieee@newauthors{#3}%

  \ifx\!!ieee@oldauthors\!!ieee@newauthors

  --%

   \else

 \dospecialbibinsert{#1}{#2}{#3}%

 

[NTG-context] Help regarding IEEE citation style

2011-01-26 Thread Julius Canute
I wan to cite references in my ConTeXt document using IEEE citation style. 
Specifically for Web URL. How to do that using ConTeXt and BiBTeX?
Regards
A.Julius Canute
___
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
___