我怎样才能在 Biblatex 中将引用样式从 [Abc97] 改为这个 \Abc97\,既可以在文档中引用,也可以在文档末尾的参考文献中引用。
我使用这个代码:
\usepackage[%
natbib = true,
backend = bibtex8, %bibtex, biber
style = alphabetic,
%citestyle = alphabetic,
maxcitenames = 2,
mincitenames = 1,
%bibstyle = alphabetic, %authoryear, %draft, %,
sorting = nyvt,
maxbibnames = 6,
minbibnames = 6,
language = ngerman,
date = long,
backref = false,
backrefstyle = none % none, three, two, two+, three+, all+
]{biblatex}
\usepackage[babel,german=quotes]{csquotes}
\bibliography{input/literatur}
我的围兜看起来像这样
@book{Gug01b,
author = {{Gugel, T., Hupf, W.}},
title = {{Vakuumtechnologie}},
publisher = {Oldenburg, Erkenschwick},
edition = {3},
year = {2001}
}
答案1
为反斜杠定义一个新的包装器
\newrobustcmd{\mkbibbackslashes}[1]{\textbackslash #1\textbackslash}
然后在labelalphawidth
和shorthandwidth
格式中使用它(对于numeric
标签,您还需要labelnumberwidth
)
\DeclareFieldFormat{labelalphawidth}{\mkbibbackslashes{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibbackslashes{#1}}
然后我们必须修改引用命令,定义是从中复制alphabetic.cbx
并\mkbibbrackets
替换为\mkbibbackslashes
\DeclareCiteCommand{\cite}[\mkbibbackslashes]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{postnote}}
平均能量损失
\documentclass[ngerman]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[natbib = true, style = alphabetic]{biblatex}
\addbibresource{biblatex-examples.bib}
\newrobustcmd{\mkbibbackslashes}[1]{\textbackslash #1\textbackslash}
\DeclareFieldFormat{labelalphawidth}{\mkbibbackslashes{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibbackslashes{#1}}
\DeclareCiteCommand{\cite}[\mkbibbackslashes]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{postnote}}
\begin{document}
\cite{sigfridsson}
\printbibliography
\end{document}