Use specific literature citation style

I've been searching for this topic quite a while in the internet (including here) but could not find a solution to my specific problem.

Nevertheless, this is my problem: I am currently writing my thesis and need to have a specific literature citation style in my bibliography at the end, which has to look like this:

Tsikalas, F., Faleide, J.I., Eldholm, O., Wilson, J., 2005. Late Mesozoic–Cenozoic structural and stratigraphic correlations between the conjugate mid-Norway and NE Greenland continental margins, geological development of the northeast Greenland shelf. In: Dore, A.G., Vining, B.A. (Eds.), Petroleum Geology: North-West Europe and Global Perspectives –– Proceedings of the 6th Petroleum Geology Conference, vol. 2. Geological Society, London, pp. 785-801.

Meaning:

Last Name, First Name, year, title, journal with volume (no comma in between!), pages

I am especially having problems telling LaTeX to implement book chapters as seen in the last example with "In: Dore, A.G., Vining, B.A. etc.". I am using JabRef. Do you have any ideas on that or code examples, so that LaTeX takes the field of JabRef proposed as the @incollection field?

Another problem is that I need to write "LASTNAME et al." in the text as soon as it says three or more authors.

Do you have any ideas?

This is my code so far (neglecting anything else that doesn't take citations into account):

%--------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%--------------------------------------------------------------------------

\documentclass[
12pt, % The default document font size, options: 10pt, 11pt, 12pt
oneside, % Two side (alternating margins) for binding by default, uncomment to switch to one side
english,ngerman % ngerman for German
onehalfspacing, % Single line spacing, alternatives: onehalfspacing or doublespacing
%draft, % Uncomment to enable draft mode (no pictures, no links, overfull hboxes indicated)
nolistspacing, % If the document is onehalfspacing or doublespacing, uncomment this to set spacing in lists to single
%parskip, % Uncomment to add space between paragraphs
nohyperref, % Uncomment to not load the hyperref package
%chapterinoneline, % Uncomment to place the chapter title next to the number on one line
%consistentlayout, % Uncomment to change the layout of the declaration, abstract and acknowledgements pages to match the default layout
]{MastersDoctoralThesis} % The class file specifying the document structure

\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage{datetime}
\usepackage{float}
\usepackage{palatino} % Use the Palatino font by default
%\renewcommand*\rmdefault{ppl}
\usepackage{siunitx}
\usepackage{newunicodechar}
\newunicodechar{°}{\degree}
\usepackage{graphicx,wrapfig}

\usepackage[backend=bibtex,style=authoryear,firstinits=true,
doi=false,isbn=false,url=false,maxbibnames=3,natbib=true]%
{biblatex} % Use the bibtex backend with the authoryear citation style (which resembles APA)

\usepackage[nottoc]{tocbibind}
\DeclareNameAlias{sortname}{last-first}

\newrobustcmd*{\parentexttrack}[1]{%
\begingroup
\blx@blxinit
\blx@setsfcodes
\blx@bibopenparen#1\blx@bibcloseparen
\endgroup}

\AtEveryCite{%
\let\parentext=\parentexttrack%
\let\bibopenparen=\bibopenbracket%
\let\bibcloseparen=\bibclosebracket}

\newdateformat{monthyeardate}{\monthname[\THEMONTH], \THEYEAR}

\addbibresource{jabref.bib} % The filename of the bibliography

\usepackage[autostyle=true]{csquotes} % Required to generate language-dependent quotes in the bibliography

\DeclareFieldFormat[inbook,inproceedings,article,misc]{citetitle}{#1}
\DeclareFieldFormat[inbook,inproceedings,article,misc]{title}{#1}


Thank you very much for your help!

All the best,

Max

• Regarding the et al abbreviation for references with three or more authors, you can use maxbibnames=3. Additionally, please turen your code fragment into a minimal working example with bibliography (MWEB). – leandriis Apr 15 '18 at 12:39
• Please edit your posting to provide the bib code for the three entries . – Mico Apr 15 '18 at 13:28
• The formatting of the author blocks is not uniform across the three examples you provided. In the first, there's space between the first-name initials, and there's an and immediately before the name of the final author. In contrast, in examples 2 and 3, there's no space between the initials, and there's no "and" between the penultimate and the final author. Is this difference deliberate? – Mico Apr 15 '18 at 13:32
• While questions like "how can I get this style <example here>" are not unheard of on this site, they don't make for a great Q&A. A good question would revolve around one specific issue, e.g. 'how can I make biblatex only show one name and et al. in citations', or 'how can I get the editor in @incollection before the booktitle'. You are essentially asking people to write an entire style for you: People may do this, but don't count on it. – moewe Apr 15 '18 at 13:44
• You may want to consider that despite the name "MastersDoctoralThesis" is not considered the pinnacle of creation when it comes to LaTeX document classes. In fact some people, amongst which I definitely count myself, would advise others not to use this class. For a bit of background read github.com/johannesbottcher/templateConfusion and (in German, sorry, maybe you can read German, you load ngerman after all) komascript.de/latexvorlage. For an example why the class is bad, see tex.stackexchange.com/q/383150/35864 (could be about an older version). – moewe Apr 17 '18 at 19:26

The standard styles place the editor after the booktitle in @incollections. You can either use one of the solutions in Move names of editors followed by (Ed./Eds.) and a comma before title in biblatex or you can try one of the styles of my biblatex-ext bundle. biblatex-ext has an option innamebeforetitle that moves the editor name before the booktitle. That style also offers a simple interface to remove the parentheses around the year in the bibliography and for square brackets in citations. Have a look at the documentation of biblatex-ext for more.

The modifications are straightforward to understand if you search for the modified item in the biblatex documentation and the biblatex-ext documentation.

\documentclass[british]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}
\usepackage{babel}
\usepackage[autostyle=true]{csquotes}

\usepackage[backend=biber, style=ext-authoryear,
giveninits=true, uniquename=init, maxbibnames=999, maxcitenames=3,
doi=false, isbn=false, url=false,
innamebeforetitle=true, articlein=false,
natbib=true,
]{biblatex}

\DeclareOuterCiteDelims{parencite}{\bibopenbracket}{\bibclosebracket}

\DeclareNameAlias{default}{family-given}
\DeclareNameAlias{sortname}{default}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}
\renewrobustcmd*{\bibinitdelim}{}

\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareFieldFormat{translatortype}{\mkbibparens{#1}}

\DeclareFieldFormat{biblabeldate}{#1}

\DeclareFieldFormat*{citetitle}{#1}
\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{booktitle}{#1}
\DeclareFieldFormat*{journaltitle}{#1}

\renewbibmacro*{pubinstorg+location+date}[1]{%
\printlist{#1}%
\setunit*{\publocdelim}%
\printlist{location}%
\setunit*{\locdatedelim}%
\usebibmacro{date}%
\newunit}

\DeclareFieldFormat[article,periodical]{pages}{#1}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@inproceedings{tsikalas,
author    = {Tsikalas, F. and Faleide, J. I. and Eldholm, O. and Wilson, J.},
title     = {Late {Mesozoic--Cenozoic} structural and stratigraphic correlations between the conjugate {mid-Norway} and {NE} {Greenland} continental margins},
editor    = {Doré, A. G. and Vining, B. A.},
booktitle = {Petroleum Geology: {North-West} {Europe} and Global Perspectives},
booktitleaddon = {Proceedings of the 6th Petroleum Geology Conference},
volume    = {2},
pages     = {785--801},
year      = {2005},
doi       = {10.1144/0060785},
publisher = {Geological Society},
location  = {London},
}
\end{filecontents}

\begin{document}
\autocite{sigfridsson,westfahl:space,pines,moraux,tsikalas}
\printbibliography
\end{document}


edit: biblatex-ext v0.4 changes the names of a few macros. Use the new names.

• I suspect the author's formatting requirements include not showing the prefix "pp." before the pages field in entries of type @article. – Mico Apr 17 '18 at 16:19
• @Mico Possibly, this is changed now, thanks for the heads-up. The question has been edited multiple times though, and as you noted yourself some of the original desiderata were inconsistent. I didn't expect to get everything right at the first pass with that little information to go by. – moewe Apr 17 '18 at 19:07
• Thank you very much for your response! This is actually exactly what I am looking for. However, I implemented your code and it is not running. I guess the class MasterDoctoralThesis and "usepackage babel" don't like each other. Furthermore, it does not find the biblatex.sty file. The error messages are actually very long (up to 100). – MaxPy Apr 24 '18 at 18:55
• @MaxPy I deliberately did not use MasterDoctoralThesis in my MWE, because I advise people not to use it. Anyway, MasterDoctoralThesis loads babel already so you don't need to load babel as I do in my MWE. It is also not unlikely that you system may be too old and/or does not have biblatex-ext installed. Do you use MikTeX or TeX live? Make an update of your system report back with the first error. – moewe Apr 24 '18 at 19:22
• @MaxPy I would strongly advise you not to use MasterDoctoralThesis, but rather to start with one of the standard or KOMA classes. Unfortunately the modification needed to implement this without biblatex-ext are not going to be minor. I explicitly used that package to allow for a simple solution. It is entirely possible though and I might have a look if I'm bored tomorrow. Since I don't know how outdated your system is, I don't know what commands can be used, so that could be problematic. – moewe Apr 25 '18 at 16:05

If you can make do with a BibTeX/natbib-based solution, the elsarticle-harv bibliography style comes extremely close to your formatting requirements.

The only salient difference I can readily detect between your stated formatting requirements and what's produced by the elsarticle-harv is that elsarticle-harv inserts spaces between adjacent given-name initials. If you wanted to "fix" this minor discrepancy, I suggest you proceed as follows:

• Find the file elsarticle-harv.bst in your TeX distribution. Make a copy of this file and call the copy, say, elsarticle-harv-mod.bst. (Feel free to pick a snazzier name...) Don't edit an original file of the TeX distribution directly.

• Open the file elsarticle-harv-mod.bst in a text editor -- the editor you use to edit your tex files will do fine -- and locate the function format.names. (In my copy of the file, this function starts on line 377.)

• In this function, locate the following line:

      "{vv~}{ll}{, jj}{, f.}" format.name$ Change it to  "{vv~}{ll}{, jj}{, f{.}.}" format.name$


Note the extra {.} particle.

• Optional: If you wish to suppress the issue number in entries of type @article, you should locate the function format.vol.num.pages (it starts on line 799 in my copy of the bst file) and comment out (or just delete...) the following 10 lines of code (lines 809 to 818 in the file):

  number empty$'skip$
{
"~(" number * ")" * *
volume empty${ "there's a number but no volume in " cite$ * warning$} 'skip$
if$} if$

• Save the file elsarticle-harv-mod.bst either in the directory where your main tex file is located or in a directory that's searched by BibTeX. If you choose the latter method, be sure to update the filename database of your TeX distribution suitably.

• In your main tex file, load the natbib package with the option authoryear. Doing so ensures that the citation call-outs will be formatted as "FirstAuthor et al" whenever an entry has three or more authors (or editors).

Here's how entries of type @article and @incollection would look like:

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@incollection{uuu,
author       = "Tsikalas, Filippos and Faleide, Jan Inge
and Eldholm, Olav and Wilson, Jonas",
editor       = "Anthony G. Dor{\'e} and Bernie A. Vining",
title        = "Late {Mesozoic--Cenozoic} structural and
stratigraphic correlations between the
conjugate mid-{Norway} and {NE
Greenland} continental margins,
geological development of the northeast
{Greenland} shelf",
booktitle    = "Petroleum Geology: North-West Europe and
Global Perspectives---Proceedings of
the 6th Petroleum Geology Conference",
year         = 2005,
publisher    = "Geological Society",
volume       = 2,
pages        = "785--801",
}
@article{vvv,
author       = "Anna Maria Author and Brenda Michelle
Buthor and Carla Miranda Cuthor",
title        = "Thoughts",
year         = 3001,
journal      = "Circularity Today",
volume       = 1,
number       = 2,
pages        = "3--4",
}
\end{filecontents}

\documentclass{article}
\usepackage{geometry}
\usepackage{newpxtext,newpxmath} % Palatino text and math font
\usepackage[authoryear]{natbib}
\setlength{\bibhang}{0pt}
\bibliographystyle{elsarticle-harv-mod}

\begin{document}
\citep{uuu}, \citet{vvv}
\bibliography{mybib}
\end{document}