natbibとaaaiという名前の

natbibとaaaiという名前の

使わなければならないスタイルaaai-named

私はそれを Overleaf で使いたいです。その.bstファイルを使用して、次のように統合してみました:

\documentclass{article}

\usepackage[style=authoryear]{natbib}
\bibliographystyle{aaai-named}

\begin{document}

  \citep{latexcompanion}

  \bibliography{references.bib}

\end{document}

これはうまく機能していますが

  1. 使いたくbiblatexないnatbib
  2. \cite()、、\citep{}...を実行すると [著者、年] ではなく (著者) のみが取得されるため、引用は統合されません。

それを統合するのを手伝ってくれる人はいますか? または、Overleaf でサポートされている同様のスタイルを知っている人はいますか?

答え1

biblatexは、BibTeX で使用されるファイルと互換性がありません。したがって、と一緒に.bst使用することはできません。ただし、 は と互換性があるため、次の MWE は問題なく動作します。biblatexaaai-namedaaai-namednatbib

natbibの著者年モードはオプションで入力されますauthoryear それなし style=接頭辞。natbibsquareオプションを使用すると、引用に角括弧を付けることができます。

\documentclass{article}

\usepackage[authoryear,square]{natbib}
\bibliographystyle{aaai-named}

%\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{latexcompanion,
  author    = {Michel Goossens and Frank Mittelbach
               and Alexander Samarin},
  title     = {The \LaTeX\ Companion},
  year      = {1993},
  publisher = {Addison-Wesley},
  location  = {Reading, Massachusetts}
}
\end{filecontents}

\begin{document}
\citep{latexcompanion}
\bibliography{\jobname}
\end{document}

[グーセンスら、1993]

このコマンドは、\bibliographyファイル拡張子なしのファイル名引数を受け取ります。


natbibデフォルトでは、参考文献に著者年ラベルは表示されません (著者年互換の参考文献スタイルでは通常は冗長であるためと思われますが、年が末尾に来ることでaaai-namedラベルがより魅力的になることは認めます)。

natbibの拡張機能が必要ない場合は、\citeコメントで提案されている次の変更を使用できます。aaai-named.bst

\documentclass{article}

\bibliographystyle{aaai-named}

\makeatletter
\let\@internalcite\cite
\def\cite{\def\citename##1{##1}\@internalcite}
\def\shortcite{\def\citename##1{}\@internalcite}
\def\@biblabel#1{\def\citename##1{##1}[#1]\hfill}
\makeatother

%\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{latexcompanion,
  author    = {Michel Goossens and Frank Mittelbach
               and Alexander Samarin},
  title     = {The \LaTeX\ Companion},
  year      = {1993},
  publisher = {Addison-Wesley},
  location  = {Reading, Massachusetts}
}
\end{filecontents}

\begin{document}
\cite{latexcompanion}
\bibliography{\jobname}
\end{document}

関連情報