![特定のスタイルに合わせてbiblatexを編集する](https://rvso.com/image/461884/%E7%89%B9%E5%AE%9A%E3%81%AE%E3%82%B9%E3%82%BF%E3%82%A4%E3%83%AB%E3%81%AB%E5%90%88%E3%82%8F%E3%81%9B%E3%81%A6biblatex%E3%82%92%E7%B7%A8%E9%9B%86%E3%81%99%E3%82%8B.png)
私が実現しようとしているスタイルは次のとおりです。
スミス J、ジョーンズ M Jr、ホートン L 他 (1999) 健康保険の将来。N Engl J Med 965:325–329
私が理解できない変更があと 2 つ必要です:
- ジャーナル名の後のカンマを削除します
- 著者の と を削除し、すべての著者の姓のイニシャルの順序を強制します。
私のコードを提供します:
\documentclass[12pt]{article}
\usepackage[dashed=false,style=authoryear,backend=biber,giveninits=true]{biblatex}
\DeclareNameAlias{default}{last-first}
\renewcommand*{\revsdnamepunct}{}
\renewbibmacro{in:}{%
\ifboolexpr{%
test {\ifentrytype{article}}%
or
test {\ifentrytype{inproceedings}}%
}{}{\printtext{\bibstring{in}\intitlepunct}}%
}
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,unpublished]
{title}{#1\isdot}
\DeclareFieldFormat{title}{#1}
\DeclareFieldFormat{pages}{:#1}
\DeclareFieldFormat{journaltitle}{#1\isdot}
\renewcommand{\labelnamepunct}{\addspace}
\addbibresource{\jobname.bib}
\begin{filecontents}{\jobname.bib}
@book{Andeweg2011,
title={Puzzles of Government Formation: Coalition Theory and Deviant Cases},
author={Andeweg, Rudy W. and De Winter, Lieven and Dumont, Patrick},
year={2011},
publisher={Taylor \& Francis}
}
@article{ansolabehere2005voting,
title={Voting weights and formateur advantages in the formation of coalition governments},
author={Ansolabehere, Stephen and Snyder Jr., James M. and Strauss, Aaron B. and Ting, Michael M.},
journal={American Journal of Political Science},
volume={49},
number={3},
pages={550--563},
year={2005},
publisher={Wiley Online Library}
}
\end{filecontents}
\begin{document}
\section{Section}
text
\textcite{Andeweg2011, ansolabehere2005voting}
\printbibliography
\end{document}
答え1
解決策を投稿します。皆さんに感謝します
\documentclass[12pt]{article}
\usepackage[dashed=false,style=authoryear,backend=biber,giveninits=true]{biblatex}
\DeclareNameAlias{sortname}{family-given}
\renewcommand*{\revsdnamepunct}{}
\renewbibmacro{in:}{%
\ifboolexpr{%
test {\ifentrytype{article}}%
or
test {\ifentrytype{inproceedings}}%
}{}{\printtext{\bibstring{in}\intitlepunct}}%
}
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,unpublished]
{title}{#1\isdot}
\DeclareFieldFormat{title}{#1}
\DeclareFieldFormat{pages}{#1}
\renewcommand*{\bibpagespunct}{\addcolon}
\DeclareFieldFormat{journaltitle}{#1\isdot}
\renewcommand{\labelnamepunct}{\addspace}
\renewrobustcmd*{\bibinitperiod}{}
\renewrobustcmd*{\bibinitdelim}{}
\renewrobustcmd*{\bibinithyphendelim}{}
\addbibresource{\jobname.bib}
\DefineBibliographyExtras{english}{%
\renewcommand*{\finalnamedelim}{\addcomma\addspace}%
}
\begin{filecontents}{\jobname.bib}
@book{Andeweg2011,
title={Puzzles of Government Formation: Coalition Theory and Deviant Cases},
author={Andeweg, Rudy W. and De Winter, Lieven and Dumont, Patrick},
year={2011},
publisher={Taylor \& Francis}
}
@article{ansolabehere2005voting,
title={Voting weights and formateur advantages in the formation of coalition governments},
author={Ansolabehere, Stephen and Snyder Jr., James M. and Strauss, Aaron B. and Ting, Michael M.},
journal={American Journal of Political Science},
volume={49},
number={3},
pages={550--563},
year={2005},
publisher={Wiley Online Library}
}
\end{filecontents}
\begin{document}
\section{Section}
text
\textcite{Andeweg2011, ansolabehere2005voting}
\printbibliography
\end{document}