# Change citation style from square brackets to backslashes with Biblatex

How can I do the style of citation in Biblatex from [Abc97]to this \Abc97\ in both citing within the document as well as in the references at the end of the document.

I use this code :

\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}


and my bib Looks like that

@book{Gug01b,
author      = {{Gugel, T., Hupf, W.}},
title       = {{Vakuumtechnologie}},
publisher   = {Oldenburg, Erkenschwick},
edition     = {3},
year        = {2001}
}

• Welcome! Please provide a complete example we can compile rather than code fragments as it is much more useful i.e. \documentclass ... \end{document} with minimal packages and content. (Probably just one citation in the body of the document for this question.) Do you mean backslashes rather than forward slashes? – cfr Apr 29 '16 at 15:03
• Note that you should give the author names as author = {Gugel, T. and Hupf, W.}. See also How should I type author names in a bib file?. If you don't like the name format you get then, you can change that easily. (Just have a look at the many questions about that around here.) – moewe Apr 30 '16 at 8:28

## 1 Answer

Define a new wrapper for backslashes

\newrobustcmd{\mkbibbackslashes}[1]{\textbackslash #1\textbackslash}


and then use it in the labelalphawidth and shorthandwidth formats (for numeric labels you'd also need labelnumberwidth)

\DeclareFieldFormat{labelalphawidth}{\mkbibbackslashes{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibbackslashes{#1}}


Then we will have to modify the cite commands, the definition is a copy from alphabetic.cbx with \mkbibbrackets replaced by \mkbibbackslashes

\DeclareCiteCommand{\cite}[\mkbibbackslashes]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{postnote}}


MWE

\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}