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}
The problem is in \automath
of gb4e
, together with the fact that biblatex
uses an internal key with an underscore _
in its name.
This makes TeX enter a loop that ends with the dreaded “TeX capacity exceeded” message.
If you want to use gb4e
and biblatex
together, you need to issue \noautomath
.
Other problems in your preamble are
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{times}
These should be removed and
\usepackage{fontspec}
should be issued. If you want a Times like font, declare
\setmainfont{TeX Gyre Termes}
Here's an updated version of your preamble that fixes the issue.
\begin{filecontents*}{\jobname.bib}
@Book{adams,
title = {Faroese: a language course for beginners},
publisher = {Stiðin},
year = {2014},
author = {Adams, Jonathan and Petersen, Hjalmar P.},
address = {T\'{o}rshavn},
type = {Book}
}
@Book{arnason,
title = {The phonology of Icelandic and Faroese},
publisher = {Oxford University Press},
year = {2011},
author = {\'{A}rnason, Kristj\'{a}n},
address = {Oxford; New York},
type = {Book}
}
\end{filecontents*}
\documentclass{book}
\usepackage[french]{babel}
\usepackage{tipa}
\usepackage{fontspec}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{chngcntr}
\usepackage[
backend=bibtex,
citestyle=authoryear-comp,
maxcitenames=2,
% firstinits=true
]{biblatex}
\usepackage{csquotes}
\usepackage{array}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{multirow}
\usepackage{lscape}
\usepackage{colortbl}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{enumerate}
\usepackage{arydshln}
\usepackage{todonotes}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage{caption}
\usepackage{phonrule}
\usepackage{tikz-qtree-compat}
\usetikzlibrary{decorations.markings, calc, shapes.misc, decorations.pathreplacing}
\usepackage{xr}
\usepackage{float}
\usepackage{gb4e}
\usepackage{hyperref}
\setmainfont{TeX Gyre Termes}
\addbibresource{\jobname.bib}
\noautomath
\begin{document}
\title{Chapitre2}
\date{}
bla bla
This book \autocite{adams} is awesome.
Another awesome book : \textcite{arnason}.
\printbibliography
\end{document}
The filecontents*
environment is just to make the document self-contained. Use your own .bib
database. You should consider using Biber instead of BibTeX.
![enter image description here](https://i.stack.imgur.com/74zH2.png)
If TeX Gyre Termes is not installed as a system font, declare it in the following way:
\setmainfont{texgyretermes}[
Extension=.otf,
UprightFont=*-regular,
ItalicFont=*-italic,
BoldFont=*-bold,
BoldItalicFont=*-bolditalic,
]
Best Answer
This is expected behaviour.
The
biblatex
documentation describes\textcite
as (pp. 97-98, §3.8.2 Style-specific Commands)The pre- and postnote go with the citation label in this case, so that the author/editor names are always the first thing
\textcite
produces.The intended use of
\textcite
seem to be constructions likeHere the author/editors take the subject or object position and the citation label is only a parenthetical hint for the exact source. It is not too unreasonable to have the pre- and postnote attached to the citation label, i.e. the citation part of the output.
Note that I tried hard to have only the author/editor be the subject/object of the sentence and not the work itself. I would argue that uses such as
where the work is the object (or subject), are not guaranteed to give satisfying results. This becomes apparent with
style=verbose
which would produceIf the work should be the subject or object you might be better off with a simple
cite
.In case the default citations should look like
I would probably invest a bit of time to make sure that
\cite
produces output like this so that the pre- and postnotes are in the expected position.