使用溫哥華風格時,我可以在文本中引用作者姓名或年份嗎?

使用溫哥華風格時,我可以在文本中引用作者姓名或年份嗎?

我是新手,所以請溫柔一點!

我已經在序言中加載了natbib,babel和。url我正在使用 BibTeX 和修改後的vancouver樣式。

當我鍵入時,\cite{Smith2013}它會插入該引用的上標數字。

是否有一個命令可以將作者姓名或論文年份插入文本中,而不是實際的參考號碼?

答案1

我很驚訝你沒有收到這樣的錯誤:

pdflatex> !套件 natbib 錯誤:參考書目與作者年份引用不相容。

風格vancouver與 不相容natbib。現在,你有兩種可能性:

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.bst/vancouver-authoryear.bst 的版本,它保留了各種溫哥華規範選項(doi 標誌、按外觀排序引用等),同時啟用以下命令;

  • \cite{smith77} 產生“[1]”
  • \citep{smith77} 產生“[1]”
  • \citet{smith77} 產生“史密斯 [1]”
  • \citeauthor{smith77} 產生“史密斯”
  • \citeyear{smith77} 產生“1977”

例如,「2013 年,Smith 描述了首次使用多元邏輯回歸來計算從眼睛中取出胡蘿蔔後的死亡率 [1]」是由程式碼產生的; 「在 \citeyear{Smith2013} 中,\citeauthor{Smith2013} 描述了從眼睛中取出胡蘿蔔後首次使用多元邏輯回歸來計算死亡率\cite{Smith2013}」。

要將此文件包含在您的專案中:

  1. 下載修改後的版本溫哥華-authoryear.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 文件溫哥華-authoryear.bst允許您使用natbib樣式authoryear帶有vancouver風格參考的引文。

這樣做是為了配合《電腦與化學工程》雜誌的引用風格。

請按照以下說明將此文件包含在您的專案中:

  1. 下載文件溫哥華-authoryear.bst並將其與主 tex 文件一起儲存。
  2. 將 natbib 套件包含在您的 tex 檔案中:
     \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文件顯示了它的應用方式:

在此輸入影像描述

應該注意的是,您必須使用三種可能的natbib參考書目樣式之一:plainnatabbrvnatunsrtnat。正如 Mario SE 指出的那樣,natbib不適用於溫哥華參考風格。

相關內容