%E3%80%8D%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%20.bst%20%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E4%BF%AE%E6%AD%A3%E3%81%97%E3%81%BE%E3%81%99%E3%81%8B%3F.png)
この質問は、次の質問と非常に関連しています:
natbib および jf.bst では、4 人以上の著者がいる場合にのみ「et al.」を引用します。
その質問に対する回答で、Mico は、jf.str の format.lab.names 関数を置き換えて、エントリに 4 人以上の著者がいる場合は常に .bib エントリが「著者ら (年)」と表示されるようにする方法を示しました。ただし、これは nyu.edu の Web サイトにある jf.str バージョンに対して行われます。ここにある .str ファイルで同じ動作を実現できるようにしたいと考えています。
http://pages.stern.nyu.edu/~dbackus/GE_asset_pricing/BGTZ/jf.bst
同じ名前ですが、Econometrica の参考文献の要件に合わせていくつか変更されています。
質問は、FUNCTION {format.lab.names}を次のように置き換えると、なぜそうなるのかを誰か説明してくれるでしょうか?
FUNCTION {format.lab.names}
{'s :=
"" 't :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr
"{vv~}{ll}" format.name$
't :=
nameptr #1 >
{
nameptr #2 =
numnames #2 > and
{ "others" 't :=
#1 'namesleft := }
'skip$
if$
namesleft #1 >
{ ", " * t * }
{
s nameptr "{ll}" format.name$ duplicate$ "others" =
{ 't := }
{ pop$ }
if$
t "others" =
{ " et~al." * }
{
numnames #2 >
{ "," * }
'skip$
if$
bbl.and
space.word * t *
}
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
.bibエントリに2人以上の著者がいる場合、「著者ら(年)」が表示されません。(これは非常に単純なことかもしれないと気づき、Tame the Beastを読み始めました。http://www.lsv.ens-cachan.fr/~markey/BibTeX/doc/ttb_en.pdf)。 ありがとう。
以下はテスト用の .tex ファイルです:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{abd:2007,
author = "Torben G. Andersen and Tim Bollerslev and Francis X. Diebold",
title = "Roughing it up: {Including} jump components in the
measurement, modeling and forecasting of return volatility",
journal = "Review of Economics and Statistics",
year = 2007,
volume = 89,
number = 4,
month = "November",
pages = "701--720",
}
@article{abde:2001,
author = "Torben G. Andersen and Tim Bollerslev and Francis X. Diebold
and Heiko Ebens",
title = "The distribution of realized stock return volatility",
journal = "Journal of Financial Economics",
year = 2001,
volume = 61,
number = 1,
month = "July",
pages = "43--76",
}
@unpublished{gavazzoni-santacreu-2015,
Author = {Gavazzoni, Federico and Ana Maria Santacreu},
Note = {manuscript, December},
Title = {International R\&D spillovers and Asset prices},
Year = {2015}
}
@article{segal-shaliastovich-yaron-2013,
Author = {Gill, Segal and Ivan Shaliastovich and Amir Yaron},
Journal = {Journal of Financial Economics},
Title = {Good and bad uncertainty: macroeconomic and financial market implications},
Volume={117},
Pages={369-397},
Year = {2015}
}
\end{filecontents*}
\usepackage[round,authoryear,comma]{natbib}
\bibliographystyle{jf_nyu} % or: jf3
\begin{document}
Here's the output \\
\cite{abd:2007}\\
\cite{abde:2001}\\
\cite{gavazzoni-santacreu-2015}\\
\cite{segal-shaliastovich-yaron-2013}\\
\bibliography{\jobname}
\end{document}
答え1
bib
変更する正しいスタイルを教えていただいたので、のより短い置き換えは次のようになりますformat.lab.names
。
FUNCTION {format.lab.names}
{ 's :=
s num.names$ 'numnames :=
s #1 "{vv~}{ll}" format.name$
numnames #1 >
{ s #2 "{vv~}{ll}" format.name$ 't :=
numnames #2 >
t "others" =
or
{ " et~al." * }
{ " and " * t * }
if$
}
'skip$
if$
}
サンプルファイル(少し整理されています。下記参照)では、
この関数は次のように動作します。まず、著者のリストを に格納しますs
。著者の数を に格納しますnumnames
。最初の ( #1
) エントリをフォーマットして出力します。次に、名前が複数ある場合は、次の名前をフォーマットして に割り当てますt
。t
が であった場合"others"
、または実際に著者が 2 人以上いる場合は、 を出力します。et al.
その他は、 の前に 2 番目 (最後) の著者を出力しますand
。
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{abd:2007,
author = "Torben G. Andersen and Tim Bollerslev and Francis X. Diebold",
title = "Roughing it up: {Including} jump components in the
measurement, modeling and forecasting of return volatility",
journal = "Review of Economics and Statistics",
year = 2007,
volume = 89,
number = 4,
month = "November",
pages = "701--720",
}
@article{abde:2001,
author = "Torben G. Andersen and Tim Bollerslev and Francis X. Diebold
and Heiko Ebens",
title = "The distribution of realized stock return volatility",
journal = "Journal of Financial Economics",
year = 2001,
volume = 61,
number = 1,
month = "July",
pages = "43--76",
}
@unpublished{gavazzoni-santacreu-2015,
Author = {Gavazzoni, Federico and Ana Maria Santacreu},
Note = {manuscript, December},
Title = {International R\&D spillovers and Asset prices},
Year = {2015}
}
@article{segal-shaliastovich-yaron-2013,
Author = {Gill, Segal and Ivan Shaliastovich and Amir Yaron},
Journal = {Journal of Financial Economics},
Title = {Good and bad uncertainty: macroeconomic and financial market implications},
Volume={117},
Pages={369-397},
Year = {2015}
}
\end{filecontents*}
\usepackage[round,authoryear,comma]{natbib}
\bibliographystyle{jf1} % or: jf3
\begin{document}
Here's the output
\cite{abd:2007}
\cite{abde:2001}
\cite{gavazzoni-santacreu-2015}
\cite{segal-shaliastovich-yaron-2013}
\bibliography{\jobname}
\end{document}