Hey,
I am currently writing my thesis and I have a problem with my bibliography:
I am using the bibstyle authoryear and the citestyle alphabetic in BibLaTex.
How can I show the citation-code in my bibliography?
Thanks
General ⇒ BibLaTeX Combination of bibstyle=authoryear and citestyle=al
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
BibLaTeX Combination of bibstyle=authoryear and citestyle=al
Welcome, the question is just as unclear as in german.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
BibLaTeX Combination of bibstyle=authoryear and citestyle=al
User Henri gave the answer on TeXwelt.de
Henri wrote:To get an authoryear bibliography including the labels of the
alphabetic style you need to take a closer look at the internals.
In short, the bibliography is a list, whose appearance can be
controlled, for example the label.
biblatex defines a few commands, for example
\DeclareFieldFormat
to control the formatting of a
field; or\defbibenvironment
to control the
appearance of the list.
biblatex loads file authoryear.bbx to achieve an author-year
bibliography. To get the label from alphabetic, the relevant code
is used from alphabetic.bbx. To get the missing bracket, you can
use
\DeclareFieldFormat{labelalphawidth}{\mkbibbrackets{#1}}
.
Code: Select all
\documentclass{article} \usepackage[citestyle=alphabetic,bibstyle=authoryear]{biblatex} \addbibresource{biblatex-examples.bib} % begin: excerpt from `alphabetic.bbx' \DeclareFieldFormat{labelalphawidth}{\mkbibbrackets{#1}} \defbibenvironment{bibliography} {\list {\printtext[labelalphawidth]{% \printfield{prefixnumber}% \printfield{labelalpha}% \printfield{extraalpha}}} {\setlength{\labelwidth}{\labelalphawidth}% \setlength{\leftmargin}{\labelwidth}% \setlength{\labelsep}{\biblabelsep}% \addtolength{\leftmargin}{\labelsep}% \setlength{\itemsep}{\bibitemsep}% \setlength{\parsep}{\bibparsep}}% \renewcommand*{\makelabel}[1]{##1\hss}} {\endlist} {\item} % end: excerpt from `alphabetic.bbx' \begin{document} \cite{glashow,weinberg,salam} \printbibliography \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.