%%
%% This is file `nwejm.bbx',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% nwejm.dtx  (with options: `bibstyle')
%% -------:| -----------------------------------------------------------------
%%   nwejm:| Class for the journal "North-Western European Journal of Mathematics"
%%  Author:| Denis Bitouze
%%  E-mail:| denis.bitouze@univ-littoral.fr
%% License:| Released under the LaTeX Project Public License v1.3c or later
%%     See:| http://www.latex-project.org/lppl.txt
%% 
\ProvidesFile{nwejm.bbx}
[2016/04/01 v 0.1 nwejm bibliographic style (DB)]

\RequireBibliographyStyle{authoryear-comp}
\DeclareNameFormat{giveninits-last}{%
  \nameparts{#1}
  \usebibmacro{name:given-family}
  {\namepartfamily}
  {\namepartgiveni}
  {\namepartprefix}
  {\namepartsuffix}%
  \usebibmacro{name:andothers}%
}
\renewbibmacro*{doi+eprint+url}{%
  \iftoggle{bbx:doi}%
  {%
    \iffieldundef{doi}%
    {}%
    {%
      \begingroup%
      \edef\URLorDOI{%
        \detokenize{http://dx.doi.org/}%
        \thefield{doi}%
      }%
      \iffieldequals{url}{\URLorDOI}%
      {\endgroup}%
      {%
        \endgroup%
        \printfield{doi}%
      }%
    }%
  }%
  {}%
  \newunit\newblock%
  \iftoggle{bbx:eprint}%
  {\usebibmacro{eprint}}%
  {}%
  \newunit\newblock%
  \iftoggle{bbx:url}%
  {\usebibmacro{url+urldate}}%
  {}%
}
\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}%
}
\renewbibmacro*{journal}{%
  \iffieldundef{shortjournal}%
  {%
    \iffieldundef{journaltitle}%
    {}%
    {%
      \printtext[journaltitle]%
      {%
        \printfield[titlecase]{journaltitle}%
        \setunit{\subtitlepunct}%
        \printfield[titlecase]{journalsubtitle}%
      }%
    }%
  }%
  {\printtext[journaltitle]{\printfield[titlecase]{shortjournal}}}%
}
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit*{\addnbthinspace}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}%
}
\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}}
\DeclareFieldFormat[book]{volume}{\mkbibbold{#1}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\DeclareLabeldate{%
  \field{year}%
  \field{date}%
  \field{eventdate}%
  \field{origdate}%
  \field{urldate}%
  \field{pubstate}%
  \literal{nodate}%
}
\renewcommand*\bibnamedelimc{\addnbspace}
\renewcommand*\bibnamedelimd{\addnbspace}
\DeclareFieldFormat{journaltitle}{\mkbibemph{#1\isdot}}
%% 
%% Copyright (C) 2015-2024 by Denis Bitouze <denis.bitouze@univ-littoral.fr>
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License (LPPL), either
%% version 1.3c of this license or (at your option) any later
%% version.  The latest version of this license is in the file:
%% 
%% http://www.latex-project.org/lppl.txt
%% 
%% This work is "maintained" (as per LPPL maintenance status) by
%% Denis Bitouze.
%% 
%% This work consists of the file nwejm.dtx and a Makefile.
%% Running "make" generates the derived files README, nwejm.pdf and nwejm.cls.
%% Running "make inst" installs the files in the user's TeX tree.
%% Running "make install" installs the files in the local TeX tree.
%% 
%%
%% End of file `nwejm.bbx'.
