定义引用的键(链接)

定义引用的键(链接)

我正在尝试使键适应我的参考书目部分,但 Latex 仍然会生成它自己的键。

我的主要文件:

\documentclass[12pt,a4paper, abstract=on, fleqn]{scrreprt}
\usepackage{scrhack}
\usepackage[latin1]{inputenc}
\usepackage{cite}
\bibliographystyle{alpha}
\usepackage[justification=justified,singlelinecheck=false]{caption}
\usepackage[margin=2.5cm]{geometry}
\makeatletter

\begin{document}

This is a quote: 'bla bla!' from \cite{VDI2607}
\bibliography{literature} 
\bibliographystyle{plain}

\end{document}

文献.bib:

@Book{VDI2607,
author    = {Lamport, Leslie},
title     = {\LaTeX: A Document Preparation System},
year      = {1994},
isbn      = {0-021-52983-1},
publisher = {Addison\,\textendash\,Wesley},

}

我希望源链接能够完全按照我在键 (VDI2607) 中定义的方式显示,但 Latex 仍将其显示为 [Ing00]

我该如何解决这个问题?我想自由定义一个键!

答案1

将文件复制alpha.bstmyalpha.bst并修改函数output.bibitem

FUNCTION {output.bibitem}
{ newline$
  "\bibitem[" write$
   cite$ write$
%  label write$
  "]{" write$
  cite$ write$
  "}" write$
  newline$
  ""
  before.all 'output.state :=
}

为了进行测试,请将文件放入myalpha.bst您的文档目录中。然后您将获得密钥作为标签:

\RequirePackage{filecontents}
\begin{filecontents}{myrefs.bib}

@Book{VDI2607,
    author    = {Lamport, Leslie},
    title     = {\LaTeX: A Document Preparation System},
    year      = {1994},
    isbn      = {0-021-52983-1},
    publisher = {Addison\,\textendash\,Wesley},
}
\end{filecontents}

\documentclass{scrreprt}

\usepackage{cite}

\begin{document}

This is a quote: 'bla bla!' from \cite{VDI2607}

\bibliographystyle{myalpha}
\bibliography{myrefs} 

\end{document}

在此处输入图片描述

相关内容