% This is a slightly modified version of the namedplus style, which fully conforms
% with the Journal of Physiology citation style.
% Last modified 2009 Jan 28 by Matthias Hennig (mhhennig@gmail.com)
%
% version = 1.00 of jphysiol.bst 2009 Jan 28
%
% Use the following citation macros:
% \cite, \citeauthor, \citeyear, \citenoparens, and \citetext \citenoparens
%
% The references are created as a full list of authors (year) and then 
% the standard rest of the stuff, e.g:
%
% Hubel DH & Wiesel TN (1962). Receptive Fields, binocular interaction, and
% functional architecture in the cat's visual cortex. J Physiol 160, 106-154.
%
% Koch C (1999). Biophysics of Computation: Information Processing in Single
% Neurons. Oxford University Press.
%
% Ódor G (2004). Universality classes in nonequilibrium lattice systems.
% Rev Mod Phys 76, 663-724.
%
% The journal/book title is in itaclics, and the journal volume in boldface, 
% as required. This has not been fully checked, let me know if you find errors.
%
%
% This is a modified version of the namedplus style by:
% -----------------------------------------------------
% A. David Redish		adr@nsma.arizona.edu
% Post-doc		http://www.cs.cmu.edu/~dredish
% Neural Systems, Memory and Aging, Univ of AZ, Tucson AZ
% -----------------------------------------------------
%
% The ``named'' bibliography style creates citations with labels like
%	\citeauthoryear{author-info}{year}
% these labels are processed by the following commands:
%	\cite{key}
%		which produces citations with both author and year,
%		enclosed in parens.
%	\shortcite{key}
%		which produces citations with year only,
%		enclosed in parens
%	\citeauthor{key}
%		which produces the author information only
%	\citeyear{key}
%		which produces the year information only
%	\citetext{key}
%		which produces Author (Year)
%	\citenoparens{key}
%		which produces Author, Year

\def\@biblabel#1{}

\let\@internalcite\cite

\def\cite{\def\@citeseppen{-1000}%
 \def\@cite##1##2{(\nobreak\hskip 0in{##1\if@tempswa , ##2\fi})}%
 \def\citeauthoryear##1##2{##1, ##2}\@internalcite}

\def\citetext{\def\@citeseppen{-1000}%
 \def\@cite##1##2{\nobreak\hskip 0in{##1\if@tempswa , ##2\fi}}%
 \def\citeauthoryear##1##2{##1~(##2)}\@internalcite}

\def\citenoparens{\def\@citeseppen{-1000}%
 \def\@cite##1##2{\nobreak\hskip 0in{##1\if@tempswa , ##2\fi}}%
 \def\citeauthoryear##1##2{##1, ##2}\@internalcite}

\def\shortcite{\def\@citeseppen{1000}%
 \def\@cite##1##2{({##1\if@tempswa , ##2\fi})}%
 \def\citeauthoryear##1##2{##2}\@internalcite}

\def\citeauthor#1{\def\@cite##1##2{{##1\if@tempswa , ##2\fi}}%
 \def\citeauthoryear##1##2{##1}\@citedata{#1}}

\def\citeyear#1{\def\@cite##1##2{{##1\if@tempswa , ##2\fi}}%
 \def\citeauthoryear##1##2{##2}\@citedata{#1}}

\def\@citedata#1{\@tempswafalse%
 \if@filesw\immediate\write\@auxout{\string\citation{#1}}\fi
  \def\@citea{}\@cite{\@for\@citeb:=#1\do
    {\@citea\def\@citea{;\penalty\@citeseppen\ }\@ifundefined
       {b@\@citeb}{{\bf ?}\@warning
       {Citation `\@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}}}{}}

% don't box citations, separate with ; and a space
% also, make the penalty between citations negative: a good place to break
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  \def\@citea{}\@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{;\penalty\@citeseppen\ }\@ifundefined
       {b@\@citeb}{{\bf ?}\@warning
       {Citation `\@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}}}{#1}}

