Могу ли я указать имя автора или год в тексте при использовании ванкуверского стиля?

Могу ли я указать имя автора или год в тексте при использовании ванкуверского стиля?

Я новичок в этом деле, так что будьте нежны!

Я загрузил 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, которая сохраняет различные параметры спецификации Vancouver (флаг doi, упорядочивание ссылок по внешнему виду и т. д.), одновременно включая следующие команды:

  • \cite{smith77} производит "[1]"
  • \citep{smith77} производит "[1]"
  • \citet{smith77} производит "Смит [1]"
  • \citeauthor{smith77} производит "Смит"
  • \citeyear{smith77} производит "1977"

Например, «В 2013 году Смит описал первое использование многомерной логистической регрессии для оценки смертности после удаления моркови из глаза [1]» выводится кодом; «В \citeyear{Smith2013}, \citeauthor{Smith2013} описал первое использование многомерной логистической регрессии для оценки смертности после удаления моркови из глаза \cite{Smith2013}».

Чтобы включить этот файл в свой проект:

  1. Загрузите измененную версиюvancouver-authoryear.bstи сохраните его вместе с основным документом tex.
  2. Включите пакет natbib в ваш tex-файл: \usepackage[numbers,sort]{natbib}
  3. Включите стиль библиографии vancouver-authoryear в ваш tex-файл: \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

Недавно я создал файл bibstylevancouver-authoryear.bstчто позволяет вам использовать natbibстильauthoryearцитаты со vancouverссылками на стиль.

Это было сделано для соответствия стилю ссылок журнала «Компьютеры и химическая инженерия».

Чтобы включить этот файл в свой проект, следуйте следующим инструкциям:

  1. Загрузить файлvancouver-authoryear.bstи сохраните его вместе с основным документом tex.
  2. Включите пакет natbib в ваш tex-файл:
     \usepackage{natbib}
    
  3. Включите стиль библиографии vancouver-authoryear в ваш tex-файл:
     \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стилей библиографии: plainnat, abbrvnatили unsrtnat. Как указывает Mario SE, natbibне работает со стилем ссылок Ванкувера.

Связанный контент