0

(190816, 2249 CET, updated according to the comments of "Mensch")

190818, 1332 CET, update regarding error message on articlein

Hi, all,

I'm trying to make my bibliography look like:

at

but for the moment I'm stuck in something that looks like:

Present situation of references

so, in particular, I wonder how I

  1. get rid of the "." after "volume"
  2. get rid of the ", " before pages

Besides that, I think that I have made it look as "it should".

I attach my code below:

\documentclass[english,final,twocolumn]{article}
\usepackage[utf8]{inputenc}%(only for the pdftex engine)
\usepackage[big]{dgruyter}
\usepackage{microtype}
\usepackage{xcolor}
\usepackage[capitalize]{cleveref}
\usepackage[format=hang,singlelinecheck=0,font={sf,small},labelfont=bf]{subfig}
%% format=hang, bra veta om
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.3}
\usepackage[export]{adjustbox}
\usepackage{float}
\usepackage{textgreek}
\usepackage{multirow}
\usepackage{csquotes}

\usepackage[style=authoryear,%ext-authoryear,%authoryear,%nature,%bwl-    FU,%authoryear,
        citestyle=authoryear,
        natbib=true,
        hyperref=true,
        url=false,        
        doi=false,         
        isbn=false, 
        sorting=nyt,
        %bibstyle=authoryear,
        giveninits=true,
        maxcitenames=2,
        uniquelist=false, % denna som gör att man får a) och b) i stället för fler efternamn
        maxbibnames=99,
        uniquename=false,
        dashed=false,
        articlein=false,
        url=false, 
        doi=false, 
        isbn=false, 
        dashed=false,
        backend=biber]{biblatex}
%\setlength\bibhang{2pt} % default value: \parindent
\DeclareFieldFormat*{title}{#1}
%\DeclareFieldFormat*{year}{#1} 
\renewcommand{\labelnamepunct}{\addspace}
\DeclareFieldFormat{journaltitle}{#1} 
%
\renewbibmacro{in:}{%
    \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
%
% removes pagination (p./pp.) before page numbers
\DeclareFieldFormat{pages}{:#1}
%
\DeclareNameAlias{sortname}{last-first}
%
\DeclareFieldFormat*{volume}{#1}
\DeclareFieldFormat*{number}{(#1)}

\addbibresource{mojiref.bib}

\begin{document}

\articletype{}



\maketitle

There is one method, attributed to \citep{wilhelmy1863ueber} that is very simple to use and provides accurate, consistent, and reproducible data especially for rough, heterogeneous, and hygroscopic materials such as wood \citep{lander1993systematic}. 


\printbibliography%[env=bibnumeric]
% ovanstående gör att man får radindraget borttaget. Inte bra här och nu,


\end{document}

And here are the two references:

@article{lander1993systematic,
  title={A systematic comparison of contact angle methods},
  author={Lander, Lorraine M and Siewierski, Lisa M and Brittain, William J and Vogler, Erwin A},
  journal={Langmuir},
  volume={9},
  number={8},
  pages={2237--2239},
  year={1993},
  publisher={ACS Publications}
}

@article{wilhelmy1863ueber,
  title={Ueber die Abh{\"a}ngigkeit der Capillarit{\"a}ts-Constanten des Alkohols von Substanz und Gestalt des benetzten festen K{\"o}rpers},
  author={Wilhelmy, Ludwig},
  journal={Ann. Phys.},%{Annalen der Physik},
  volume={195},
  number={6},
  pages={177--217},
  year={1863},
  publisher={Wiley Online Library}
}

I hope it makes sense, and that someone is able to help me out with this one.

Added 190818:

The articlein=false added from the advice of moewe results this error message in Overleaf.

enter image description here

/Lars

  • 2
    Well, please make your code snippet compilable and add the bib entry for the cited document to your question. Then we do not have to guess what you are doing ... – Mensch Aug 16 at 0:17
  • Sorry. I'll put up more information soon. – Lars Abrahamsson Aug 16 at 19:11
  • Now I have updated the original post. I hope that all necessary information is there this time. Otherwise, just tell me! – Lars Abrahamsson Aug 16 at 21:03
  • 1
    Re your most recent update: As I mentioned in the last comment under my answer, the system on Overleaf is too old to support biblatex-ext and in particular its articlein option. You will get errors if you try to use it. My comment contains a link to alternative code that should work with the outdated Overleaf system (gist.github.com/moewew/e9ae043f49e057abfb344d96cb134f82). – moewe Aug 18 at 11:53
4

If you are preparing a manuscript for submission with a journal, double check that they can accept biblatex submissions. Compared to BibTeX biblatex requires quite a different workflow on the publisher's side and their tools might not be equipped to deal with biblatex as required. Furthermore, publishers aren't generally known to run the most up-to-date LaTeX systems, which means that there is a very real risk of version incompatibilities. See Biblatex: submitting to a journal.

Anyway, if you want to go on with biblatex despite these warnings (for example because the publisher only wants the PDF) or you only want to emulate the style of the journal, this should get you started.

The MWE uses biblatex-ext's ext-authoryear as basis, because it has some simpler tools available to deal with the punctuation between the volume and number fields. The code has also been updated to use less intrusive methods elsewhere. In general field formats should contain no leading or trailing punctuation (as in \DeclareFieldFormat{pages}{:#1})

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=ext-authoryear,
  giveninits=true, uniquename=false,
  maxcitenames=2, maxbibnames=99,
  articlein=false,
  url=false, doi=false, isbn=false, dashed=false,
]{biblatex}

\DeclareNameAlias{sortname}{family-given}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}

\DeclareDelimFormat[bib]{nameyeardelim}{\addspace}
\DeclareDelimFormat[bib]{nametitledelim}{\addspace}

\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{citetitle}{#1}
\DeclareFieldFormat{booktitle}{#1}
\DeclareFieldFormat{issuetitle}{#1}
\DeclareFieldFormat{journaltitle}{#1\isdot}
\DeclareFieldFormat{maintitle}{#1}

\renewcommand*{\volnumdelim}{}
\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}

\renewcommand*{\bibpagespunct}{%
  \ifentrytype{article}
    {\addcolon}
    {\addcomma}%
  \space}

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

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{lande,
  author  = {Stig Lande and Mats Westin and Marc Schneider},
  title   = {Properties of Furfurylated Wood},
  journal = {Scandinavian Journal of Forest Research},
  volume  = {19},
  number  = {suppl~5},
  pages   = {22-30},
  year    = {2004},
  doi     = {10.1080/0282758041001915},
}
\end{filecontents}

\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}


\begin{document}
\cite{sigfridsson,lande}
\printbibliography
\end{document}

Lande, S., Westin, M., Schneider, M. (2004). Properties of Furfurylated Wood. Scandinavian Journal of Forest Research 19(suppl 5): 22–30.

  • Where/how do I get biblatex-ext installed when using overleaf? – Lars Abrahamsson Aug 16 at 19:34
  • I saw some discussion on this discussion regarding overleaf and biblatex-ext. – Lars Abrahamsson Aug 16 at 19:37
  • The publisher says: start quote Alternatively, the biblatex package can be used. Be aware, however, that there is an abundance of options which have not all been tested for compatibility with the dgruyter package. The following seem to work fine for the numeric style: • \usepackage[backend=bibtex]{biblatex} to load the package, • \addbibresource{BIBFILE} to load the .bib-file, • \printbibliography[env=bibnumeric] to output the bibliography. With author-year citation you have to skip the optional argument of \printbibliography end quote. – Lars Abrahamsson Aug 16 at 19:40
  • 1
    @LarsAbrahamsson Ugh, Overleaf are using an outdated LaTeX system that doesn't have biblatex-ext installed. It becomes increasingly frustrating to support the old version on Overleaf, so if possible I would recommend you install an up-to-date TeX system (MikTeX or TeX live 2019) locally. You can also nudge Overleaf support and ask them to provide an option to use a more up-to-date TeX system on their end. If you can't do either of those, try gist.github.com/moewew/e9ae043f49e057abfb344d96cb134f82 – moewe Aug 17 at 11:44
  • 1
    @LarsAbrahamsson It would be nicer to use \DeclareDelimFormat[bib]{nametitledelim}{\addspace}. I updated both the answer and the code at gist.github.com/moewew/e9ae043f49e057abfb344d96cb134f82 accordingly. – moewe Aug 18 at 12:28

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.