Okay, I have partly found out myself.  One has to add the field `eprint`
and `archivePrefix` to `categories.article.optional` in the file
base/mkiv/publ-imp-aps.lua.

But I don't want to edit any system files, because this is not portable.
 Also I don't want to have a copy of this file in my project directory,
because this is just redundant.

How can I add the two fields `eprint` and `archivePrefix` to
`categories.article.optional` from the document level?

Cheers,
Henri

N.B.:  In my original post there was a typo.  It should read

\starttexdefinition unexpanded btx:aps:eprint

(It was btx:aps:eprints in the original post)


On 07/18/2016 10:54 AM, Henri Menke wrote:
> Dear list,
> 
> It is common in physics (and probably mathematics) that papers are
> uploaded to an electronic archive prior to publishing them in the
> peer-review literature.  In physical sciences this is https://arxiv.org.
> 
> To cite such articles one usually uses the following format, here on the
> example of the most recent contribution to the Condensed Matter section:
> 
> N.A. Kudryashov, A.A. Kutukov, and E.A. Mazur, Normal State of the
> Metallic Hydrogen Sulfide, arXiv:1607.04624 (2016).
> 
> To reproduce this kind of format I tried to extend the APS rendering
> (see the long example below, sorry).  Unfortunately, this does not work,
> because apparently the `eprint` and `archivePrefix` fields are not read
> in.  The combination `eprint` and `archivePrefix` is used, because this
> is what the LaTeX package `biblatex` expects.
> 
> How do I extend the btx rendering by these additional fields?
> 
> Cheers,
> Henri
> 
> ---
> 
> \startbuffer [references]
>   @article{Kudryashov2016,
>     title = {Normal State of the Metallic Hydrogen Sulfide},
>     author = {Kudryashov, Nikolay A. and Kutukov, Alexander A. and
> Mazur, Evgeny A.},
>     year = {2016},
>     eprint = {1607.04624},
>     archivePrefix = {arxiv}
>   }
> \stopbuffer
> 
> \usebtxdataset[references.buffer]
> \usebtxdefinitions[aps]
> 
> \definebtx[aps:list:eprint][aps:list][style=\tt]
> 
> \starttexdefinition unexpanded btx:aps:eprints
>     \btxdoif {eprint} {
>         \btxstartstyleandcolor [aps:list:eprint]
>             \btxdoif {archivePrefix} {
>                 \btxflush{archivePrefix}:
>             }
>             \btxflush{eprint}
>         \btxstopstyleandcolor
>     }
> \stoptexdefinition
> 
> \startsetups btx:aps:list:article
>     \texdefinition{btx:aps:author}
>     \texdefinition{btx:aps:optional-title}
>     \texdefinition{btx:aps:doi-url}
> {\texdefinition{btx:aps:journal-volume-year}}
>     \texdefinition{btx:aps:eprint}% extension to APS style
>     \texdefinition{btx:aps:note}
> \stopsetups
> 
> \starttext
> 
> \cite{Kudryashov2016}
> \placelistofpublications
> 
> \stoptext
> 

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

Reply via email to