3

I would like my citations to look like this:

Unmitigated carbon emissions will lead to global warming of several degrees Celsius by 2100 [STOC13, p. 119].

(Four custom upper case letters (usually author's last name) and two year numbers)

while my bibliography shows:

[STOC13] Stocker T.; Qin D.: IPCC Climate Change 2013: The Physical Science Basis. Cambridge University Press, 2013

(Using the same custom citation tag ([STOC13]) as first entry in the bibliography - you know - the one in the left column, plus: last names first, no use of 'and', no italic article titles......)

I have tried the makebst custom bib but to no avail and my current best bet is this:

sample

with

\documentclass[
,11pt
]{scrartcl}

\usepackage[
backend=bibtex
,citestyle=alphabetic
,bibstyle=alphabetic
]{biblatex}

\bibliography{testbibfile}

\begin{document}    

Unmitigated carbon emissions will lead to global warming of several
degrees Celsius by 2100 \citefield[119]{STOCKER}{[STOC13], }.

\printbibliography
\end{document}

and

@BOOK{STOCKER,
    author = {T. Stocker and D. Qin},
    title = {IPCC Climate Change 2013: The Physical Science Basis},
    year = {2013},
    publisher = {Cambridge University Press},
}

\citefield feels a bit like cheating. plus it makes my custom string bold which I didn't intend to do. also my custom citation obviously does not in the least transfer the left column in the bibliography.

...

So my question is: how can I completely customize my citation and bibliography style?

Thanks

4

With Biber you can fully customise the generation of the label for style=alphabetic.

The options are almost self-explanatory: With the load-time options minalphanames=1, maxalphanames=1 we make sure to only use one name for the label generation. strwidth=4 takes four letters counting from the left (strside=left) of the family name, converts them to all upper case (uppercase=true). noalphaothers=true ignores the fact that the label was truncated from a longer list and does not insert a marker to show this (as is usually done with \labelalphaothers, which would give "STOC+" here).

\documentclass{scrartcl}

\usepackage[backend=biber, style=alphabetic, minalphanames=1, maxalphanames=1]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{STOCKER,
    author = {T. Stocker and D. Qin},
    title = {IPCC Climate Change 2013: The Physical Science Basis},
    year = {2013},
    publisher = {Cambridge University Press},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\DeclareLabelalphaTemplate{
  \labelelement{
    \field[final]{shorthand}
    \field{label}
    \field[strwidth=4,strside=left,uppercase=true,noalphaothers=true]{labelname}
  }
  \labelelement{
    \field[strwidth=2,strside=right]{year}
  }
}

\begin{document}    
Unmitigated carbon emissions will lead to global warming of several
degrees Celsius by 2100 \autocite[119]{STOCKER}.

\printbibliography
\end{document}

enter image description here

See Biblatex with Biber: Configuring my editor to avoid undefined citations for help on how to switch from BibTeX to Biber. See also bibtex vs. biber and biblatex vs. natbib.

  • Thanks a ton for your quick response. However since trying to implement your solution, I am stuck with my \DeclareLabelalphaTemplate command not being recognized. I have re-installed and updated my distribution but nothing changes. Although there are some odd things happening with my miktex, according to the console, my biblatex package is up to date. Any clue why it still won't take the command? – Dolan Jun 28 '18 at 23:21
  • @Dolan What do you mean by not recognised? If you editor (TeXstudio or TeXmaker) says it doesn't know the command you can ignore that as long as the file compiles without an error. Some editors have a database of LaTeX commands and will mark any command not in that database as 'unknown'. – moewe Jun 29 '18 at 4:56
  • indeed, only my editor tells me it's not recognized and the document otherwise compiles, however it a) does not print the bibliography. Almost as if I did not cite anything in my document. and b) doesn't modify the label. I have tried \cite instead of \autocite[page] and I have tried both an external *.bib and one with the filecontents-package, so my only hunch is the \declare... command. – Dolan Jun 29 '18 at 8:32
  • Okay, I just played around with the configuration of the standard bibliography in TeXstudio and now it does work. For some reason picking Biber from the drop down menu didn't do the job, I had to actually pick it from all packages. Now that it works: again, THANK YOU!! – Dolan Jun 29 '18 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.