バンクーバースタイルを使用する場合、テキスト内で著者名や年を引用できますか?

バンクーバースタイルを使用する場合、テキスト内で著者名や年を引用できますか?

初心者なので優しくしてください!

natbibbabelおよびをurlプリアンブルに読み込みました。BibTeX と修正されたvancouverスタイルを使用しています。

入力すると、\cite{Smith2013}その参照に上付き数字が挿入されます。

実際の参照番号ではなく、著者名や論文の発行年をテキストに挿入するコマンドはありますか?

答え1

次のようなエラーが発生しなかったことに驚きました:

pdflatex> ! パッケージ natbib エラー: 参考文献が著者-年引用と互換性がありません。

スタイルvancouverは と互換性がありませんnatbib。この場合、2 つの可能性があります。

1)natbib似たような参考文献のスタイルを探してみましょうvancouver

2)\usepackage{natbib}コードを削除するだけで、 を使用できるようになります\bibliographystyle{vancouver}

例2:

\documentclass{article}

\usepackage[english]{babel}
\usepackage{url}
%\usepackage{natbib}

\begin{document}
Hello\cite{mario2013}


\bibliographystyle{vancouver}
\bibliography{refs}

\end{document}

refs.bibファイルは次のようになります:

@article{mario2013,
author={mario},
title={Marito and Friends},
journal={My Journal},
year = {2013},
}

出力は次のようになります。

ここに画像の説明を入力してください

著者年引用を使用する場合は、natbib選択した参考文献スタイルとともにパッケージをロードできます (例IEEEtranSN)。

\documentclass{article}

\usepackage[english]{babel}
\usepackage{url}
\usepackage{natbib}

\begin{document}

According to \citet{mario2013} this is what the IEEEtranSN should look like

\bibliographystyle{IEEEtranSN}
\bibliography{refs}

\end{document}

出力は次のようになります。

ここに画像の説明を入力してください

答え2

これは @gaurav-bhutani のソリューションの単なる修正です。私は、以下のコマンドを有効にしながら、さまざまな Vancouver 仕様オプション (doi フラグ、外観による参照の順序付けなど) を保持する vancouver.bst/vancouver-authoryear.bst のバージョンを作成しました。

  • \cite{smith77}は"[1]"を生成する
  • \citep{smith77}は"[1]"を生成する。
  • \citet{smith77}は「スミス[1]」を生成する。
  • \citeauthor{smith77}は「スミス」を生成する
  • \citeyear{smith77}は「1977」を生成します。

たとえば、「2013 年に、スミスは、目からニンジンを取り除いた後の死亡率について、多変量ロジスティック回帰を初めて使用しました [1]」はコードによって生成されます。「\citeyear{Smith2013} では、\citeauthor{Smith2013} は、目からニンジンを取り除いた後の死亡率について、多変量ロジスティック回帰を初めて使用しました \cite{Smith2013}」。

このファイルをプロジェクトに含めるには:

  1. 修正版をダウンロードバンクーバー著者年.bstメインの Tex ドキュメントと一緒に保存します。
  2. tex ファイルに natbib パッケージを含めます: \usepackage[numbers,sort]{natbib}
  3. tex ファイルに参考文献スタイル vancouver-authoryear を含めます: \bibliographystyle{vancouver-authoryear}

完全に機能する tex ファイルを以下に示します。

\documentclass[a4paper,12pt,twoside]{report}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}
\usepackage[numbers,sort]{natbib}

\begin{document}

\chapter*{Vancouver bibliography style with support for author references (citet)}

I modified a bibliography style produced by gbhutani for producing Vancouver references with support for explicit author references (citet). This version of vancouver-authoryear.bst is a combination of the original vancouver-authoryear.bst released by gbhutani and the official vancouver.bst style. It has been optimised for the Vancouver specification, and includes the following changes: 

\begin{itemize}
\item a) add doi support (restore relevant `\% urlbst' code from vancouver.bst)
\item b) order references by appearance (remove both references to the SORT command)
\item c) restore all code required to produce Vancouver compatible references (restore output.nonnull and reference formatting code from vancouver.bst)
\end{itemize}

This version of vancouver.bst allows the author name to be automatically generated and inserted into the document where necessary (via citet). To invoke the Vancouver numeric referencing system, ensure to add usepackage[numbers,sort]\{natbib\} or usepackage[numbers,sort&compress]\{natbib\} to your tex file. It supports the following set of references;

\begin{itemize}
\item cite\{smith77\} produces ``[1]'' in the text
\item citep\{smith77\} produces ``[1]'' in the text
\item citet\{smith77\} produces ``Smith [1]'' in the text
\item citeauthor\{smith77\} produces ``Smith'' in the text
\end{itemize}

A journal article \cite{ramkrishna2000population} can be cited as normal using the cite command.

The same article by \citet{ramkrishna2000population} can be cited using the citet command.

Note that journal articles are ordered by appearance (rather than alphabetically), e.g. \cite{bhutani2013determination}.

People are welcome to use this code in other styles. Please feel free to improve and contribute.

\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{vancouver-authoryear}
\bibliography{references}

\end{document}

答え3

最近、bibstyleファイルを作成しましたバンクーバー著者年.bstnatbibスタイルを使えるauthoryearvancouverスタイル参照付きの引用。

これは、ジャーナル「Computers and Chemical Engineering」の参照スタイルに合わせるために行われました。

このファイルをプロジェクトに含めるには、次の手順に従ってください。

  1. ファイルをダウンロードするバンクーバー著者年.bstメインの Tex ドキュメントと一緒に保存します。
  2. tex ファイルに natbib パッケージを含めます。
     \usepackage{natbib}
    
  3. tex ファイルに参考文献スタイル vancouver-authoryear を含めます。
     \bibliographystyle{vancouver-authoryear}
    

完全な作業用 tex ファイルを以下に示します。

 
\documentclass[a4paper,12pt,twoside]{report}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}
\usepackage{natbib}
\begin{document}
\chapter*{Vancouver bibliography style with authoryear style citations}
I modified a bibliography style compatible with natbib package to include vancouver style references. 
The motivation behind this was to submit an article for the journal Computers and Chemical Engineering which asks for an \emph{authoryear} citation style in conjunction with vancouver style reference lists.
\\
\\
This is a journal article on drop shapes: \cite{bhutani2013determination}.
\
The same article \citep{bhutani2013determination} can also be cited in parenthesis.
\\
\\
This is an awesome book on population balance modelling by Prof. Ramkrishna: \cite{ramkrishna2000population}.
\\
\\
People are welcome to add conference proceedings, thesis and other references here to test them.
Please feel free to improve and contribute.
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{vancouver-authoryear}
\bibliography{references}
\end{document}

次の出力が生成されます。

ここに画像の説明を入力してください


答え4

natbib標準とは異なる引用コマンドを使用します\cite{}。7ページ目ドキュメントnatbibどのように適用されるかを示します:

ここに画像の説明を入力してください

natbib3 つの参考文献スタイル ( plainnatabbrvnat、 のいずれか)を使用する必要があることに注意してくださいunsrtnat。 Mario SE が指摘しているように、natbibは Vancouver 参照スタイルでは機能しません。

関連情報