First thing to do is to add a field for the journal abbreviation to the article entrytype, journalabbr
in the MWE. Therefore you need to declare a datamodel (an extra file; in the MWE I've used filecontents to simulate that) and you have to tell biblatex/biber to use it in the package options.
Then you have to modify the cite command, so it fits your needs. \citep
from the authoryear-style (your citestyle) uses the \cite
command. There you just have to add a switch, which checks if the field journalabbr
is empty or not, and prints it out or not.
Last but not least you have to add the abbreviation fields to the entries.
MWE:
\begin{filecontents}{min.bib}
@article{boisson2003unexpected,
title={Unexpected protein families including cell defense components feature in the N-myristoylome of a higher eukaryote},
author={Boisson, B. and Giglione, Carmela and Meinnel, Thierry},
journal={Journal of Biological Chemistry},
journalabbr={JBC},
year={2003},
publisher={ASBMB}
}
\end{filecontents}
\begin{filecontents}{authorjabbryear.dbx}
\ProvidesFile{authorjabbryear.dbx}
\DeclareDatamodelFields[type=field,datatype=literal]{journalabbr}
\DeclareDatamodelEntryfields[article]{journalabbr}
\end{filecontents}
\documentclass[fontsize=11pt, paper=a4, ngerman, DIV=calc]{scrartcl}
\usepackage[scaled]{helvet}
\renewcommand*\familydefault{\sfdefault}
\usepackage{fixltx2e}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage[german=quotes]{csquotes}
\usepackage[style=authoryear-comp,sortcites=true,sorting=nyt,isbn=false,natbib=true, citestyle=authoryear,bibstyle=authoryear,backend=biber,maxnames=1,maxcitenames=1,
,datamodel=authorjabbryear%added!
] {biblatex}
\DefineBibliographyStrings{ngerman}{ andothers = {{et\,al\adddot}} }
\renewbibmacro*{cite}{%from authoryear.cbx
\iffieldundef{shorthand}
{\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
{\usebibmacro{cite:label}%
\setunit{\addspace}}
{\printnames{labelname}%
\setunit{\nameyeardelim}}%
\iffieldundef{journalabbr}{}{%
\printfield{journalabbr}%
\setunit{\nameyeardelim}%
}%
\usebibmacro{cite:labelyear+extrayear}}
{\usebibmacro{cite:shorthand}}}
\addbibresource{min.bib}
\begin{document}
\citep{boisson2003unexpected}
How it should look like:
(Boisson et al., JBC, 2003)
\printbibliography
\end{document}
Without changing anything in cleanthesis.sty
, add the following lines in your document, just before \begin{document}
\makeatletter
\pretocmd{\Hy@org@chapter}{\KOMAoptions{parskip=full}}{}{}
\pretocmd{\H@old@schapter}{\KOMAoptions{parskip=full}}{}{}
\pretocmd{\cleanchapterquote}{\KOMAoptions{parskip=full}}{}{}
\apptocmd{\Hy@org@chapter}{\KOMAoptions{parskip=false}}{}{}
\apptocmd{\H@old@schapter}{\KOMAoptions{parskip=false}}{}{}
\apptocmd{\cleanchapterquote}{\KOMAoptions{parskip=false}\vspace*{\baselineskip}}{}{}
\makeatother
Output:
Best Answer
The cleanthesis.sty uses
biblatex
to manage citations. Whilebiblatex
itself offers a broad variety ofcitationstyles
,cleanthesis
offers only three of them:alphabetic
,numeric
andauthoryear
to choose from using thestyle=...
option fromcleanthesis
.In order to use citationstyles other than the above mentioned, one can edit a local copy of
cleanthesis.sty
in the following two ways:1. fixed citestyle, not customizable via option
The first customization option is to directly pass the desired citationstyle as an option to biblatex. Consider the following code, which is a copy of line 284-300 from
cleanthesis.sty
.Replacing
style=\cthesis@bibstyle
bycitestyle=numeric-copm
(or every other citestylebiblatex
offers) and not usingclearthesis
'sbibstyle=...
option in the preamble of the document should work.2. flexible citestyle, customizable via option
A better and more flexible approach is the following. The following code is again copied from
cleanthesis.sty
(line 92).To customize this one could add the
numeric-comp
style (or any other) as follows:Now the added style can be chosen in the preamble of the .tex file using something like: