Изменить положение поля года в стиле authoryear biblatex

Изменить положение поля года в стиле authoryear biblatex

Мне предстоит адаптировать этот стиль библиографии для японского журнала JSME-Journal.

введите описание изображения здесь

Я уже authoryearнемного подправил стиль, но две вещи мне не удались:

  1. Поместите(год)всегда впереди, стр.илииздатель, на случай, если все это не будет доступно только в конце
  2. Какой самый простой способ получить первую букву словатом.инет.верхний регистр?

Есть идеи?

Вот до чего я дошел:

\documentclass{article}
\usepackage{filecontents}

\RequirePackage[
    natbib, 
    style=authoryear,           
    maxnames = 99,
    maxcitenames = 1,
    uniquelist=false,
    url=false,
    isbn=false,
    sorting=nyt,                
    abbreviate=true,            
    firstinits=true,            
    backend=biber,              
    bibencoding=utf8,           
]{biblatex}

\renewcommand*{\newunitpunct}{\addcomma\space}

\renewcommand*{\multinamedelim}{\addspace\addcomma\addspace}
\renewcommand*{\finallistdelim}{\addspace\addcomma\addspace}
\renewcommand*{\labelnamepunct}{\addcomma\addspace}
\renewcommand*{\finentrypunct}{}


\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit{\addcomma\space}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}%
}

\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addcomma\space}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addspace}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \newunit}


\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{subtitle}{#1}
\DeclareFieldFormat*{booktitle}{#1}
\DeclareFieldFormat*{booksubtitle}{#1}
\DeclareFieldFormat*{journaltitle}{#1}
\DeclareFieldFormat[periodical]{issuetitle}{#1}
\DeclareFieldFormat*{maintitle}{#1}
\DeclareFieldFormat*{number}{\bibstring{number}\addnbspace#1}
\DeclareFieldFormat*{volume}{\bibstring{jourvol}\addnbspace#1}

\renewcommand*{\labelalphaothers}{}
\renewcommand*{\intitlepunct}{}
\DefineBibliographyStrings{german}{in={}}
\DefineBibliographyStrings{english}{in={}}

\begin{filecontents*}{\jobname.bib}
@ARTICLE{Sun,
author={Yanhua Sun and Yick-Sing Ho and Lie Yu},
journal={IEEE Transactions on Magnetics},
title={Dynamic Stiffnesses of Active Magnetic Thrust Bearing Including Eddy-Current Effects},
year={2009},
month={Jan},
volume={45},
number={1},
pages={42-142},
}
@book{Moon,
  title={Field Theory Handbook},
  author={Moon, P. and Spencer, D.E.},
  year={1961},
  location={Berlin, Heidelberg},
  publisher={Springer}
}
@InProceedings{Kucera,
  author    = {Kucera, Ladislav and Ahrens, Markus},
  title     = {A Model for Axial Magnetic Bearings Including Eddy Currents},
  booktitle = {Third International Symposium on Magnetic Suspension Technology},
  year      = {1996},
  volume    = {45},
  number    = {2},
  month     = {Jul},
  pages     = {421-437},
}
\end{filecontents*}

\bibliography{\jobname.bib} 
\begin{document}
\cite{Sun,Moon,Kucera}
\printbibliography
\end{document}

введите описание изображения здесь

решение1

Вы можете использовать bibstyle=authortitle и citestyle=authoryearкак основу. Тогда год уже будет ближе к концу.

Тогда используйте

\renewbibmacro*{in:}{}

\newbibmacro*{pubinstorg+location+date}[1]{%
  \setunit{\addspace}%
  \usebibmacro{date}%
  \newunit
  \printfield{chapter}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \newunit\newblock
  \printlist{#1}%
  \newunit}

\renewbibmacro*{organization+location+date}{\usebibmacro{pubinstorg+location+date}{organization}}
\renewbibmacro*{institution+location+date}{\usebibmacro{pubinstorg+location+date}{institution}}
\renewbibmacro*{publisher+location+date}{\usebibmacro{pubinstorg+location+date}{publisher}}

\renewbibmacro*{chapter+pages}{}

и

\renewbibmacro*{date}{\printtext[parens]{\printdate}}
\renewbibmacro*{issue+date}{%
  \printtext[parens]{%
    \printfield{issue}%
    \setunit*{\addspace}%
     \printdate}%
  \newunit}

Для написания объема и числа с заглавной буквы используйте

\DeclareFieldFormat*{number}{\bibsentence\bibstring{number}\addnbspace#1}
\DeclareFieldFormat*{volume}{\bibsentence\bibstring{jourvol}\addnbspace#1}

Полный МВЭ

\documentclass{article}
\usepackage{filecontents}

\RequirePackage[
  natbib, 
  citestyle=authoryear,           
  bibstyle=authortitle,
  sorting=nyt,
  maxnames = 99,
  maxcitenames = 1,
  uniquelist=false,
  uniquename=false,
  url=false,
  isbn=false,
  abbreviate=true,            
  giveninits=true,            
  backend=biber,              
]{biblatex}

\renewcommand*{\newunitpunct}{\addcomma\space}

\renewcommand*{\multinamedelim}{\addspace\addcomma\addspace}
\renewcommand*{\finallistdelim}{\multinamedelim}
\renewcommand*{\labelnamepunct}{\newunitpunct}
\renewcommand*{\finentrypunct}{}


\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit{\addcomma\space}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}%
}

\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addcomma\space}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addspace}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \newunit}


\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{subtitle}{#1}
\DeclareFieldFormat*{booktitle}{#1}
\DeclareFieldFormat*{booksubtitle}{#1}
\DeclareFieldFormat*{journaltitle}{#1}
\DeclareFieldFormat[periodical]{issuetitle}{#1}
\DeclareFieldFormat*{maintitle}{#1}
\DeclareFieldFormat*{number}{\bibsentence\bibstring{number}\addnbspace#1}
\DeclareFieldFormat*{volume}{\bibsentence\bibstring{jourvol}\addnbspace#1}

\renewcommand*{\labelalphaothers}{}
\renewcommand*{\intitlepunct}{}

\renewbibmacro*{in:}{}

\newbibmacro*{pubinstorg+location+date}[1]{%
  \setunit{\addspace}%
  \usebibmacro{date}%
  \newunit
  \printfield{chapter}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \newunit\newblock
  \printlist{#1}%
  \newunit}

\renewbibmacro*{organization+location+date}{\usebibmacro{pubinstorg+location+date}{organization}}
\renewbibmacro*{institution+location+date}{\usebibmacro{pubinstorg+location+date}{institution}}
\renewbibmacro*{publisher+location+date}{\usebibmacro{pubinstorg+location+date}{publisher}}

\renewbibmacro*{chapter+pages}{}

\renewbibmacro*{date}{\printtext[parens]{\printdate}}
\renewbibmacro*{issue+date}{%
  \printtext[parens]{%
    \printfield{issue}%
    \setunit*{\addspace}%
     \printdate}%
  \newunit}

\begin{filecontents*}{\jobname.bib}
@ARTICLE{Sun,
author={Yanhua Sun and Yick-Sing Ho and Lie Yu},
journal={IEEE Transactions on Magnetics},
title={Dynamic Stiffnesses of Active Magnetic Thrust Bearing Including Eddy-Current Effects},
year={2009},
month={Jan},
volume={45},
number={1},
pages={42-142},
}
@book{Moon,
  title={Field Theory Handbook},
  author={Moon, P. and Spencer, D.E.},
  year={1961},
  location={Berlin, Heidelberg},
  publisher={Springer}
}
\end{filecontents*}

\addbibresource{\jobname.bib} 
\begin{document}
\cite{Sun,Moon}
\printbibliography
\end{document}

Обратите внимание, что нет необходимости

\DefineBibliographyStrings{german}{in={}}
\DefineBibliographyStrings{english}{in={}}

больше.

Связанный контент