我正在尝试使键适应我的参考书目部分,但 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.bst
到myalpha.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}