1

Before switch to biblatex, I was using bibtex like this:

\usepackage[round, semicolon, authoryear]{natbib}
\bibliographystyle{plainnat}

I'd like to get the very same style with biblatex (without usage of natbib backward compatibility).

In the text, in case of two authors, I wish only "Smith and Jones (2017)" (as \citet) or "(Smith and Jones 2017)" (as \citep). I don't mind if there is "et" or "&" instead of "and". In case of 3 and more authors, I wish only "Smith et al. (2017)" (as \citet) or "(Smith et al., 2017)" (as \citep).

In the bibliography listing, I wish all authors, and I'd prefer the title to be bold and not in quotes, but I can live without it.

All this was very straightforward with natbib above and citet/citep, but I can't figure out how to reach it in with biblatex/biber. My main reason to switch to biblatex was basically no reasonable way how to sort accented characters with bibtex.

Simply, in the best case, it should look like following picture:

References

Some settings (like back referenes) I managed to set, but for the above I really do struggle...

I also must say I like more some features of biblatex, like clickable DOI or back references "(cit. on p. XX)".

Problematic working example is

\documentclass{article}
\usepackage{xltxtra}
\usepackage{fontspec}
\usepackage{realscripts}
\usepackage{metalogo}
\usepackage{xunicode}
\usepackage[autostyle=true, english=british]{csquotes}
\usepackage{polyglossia}
\setdefaultlanguage[variant=british]{english}
\usepackage{filecontents}
\usepackage[x11names]{xcolor}
\usepackage[
backend=biber,
bibstyle=authortitle,
citestyle=authoryear-comp,
autocite=inline,
sorting=ynt,
sortcase=true,
sortcites=true,
maxbibnames=100,
mincitenames=1,
maxcitenames=2,
hyperref=true,
backref=true,
backrefstyle=none,
maxalphanames=1
]{biblatex}
\usepackage[
breaklinks=true,
colorlinks=true,
linkcolor={Firebrick4},
anchorcolor={Blue4},
citecolor={Green4},
filecolor={DeepPink4},
menucolor={Chocolate4},
urlcolor={DodgerBlue4},
bookmarks=true,
pdfencoding=auto,
unicode=true,
xetex
]{hyperref}
\addbibresource{references.bib}
\begin{document}
\begin{filecontents}{references.bib}
@article{Shaw2005,
author={Shaw, Joey and Lickey, Edgar B and Beck, John T and Farmer, Susan B and Liu, Wusheng and Miller, Jermey and Siripun, K C and Winder, Charles T and Schilling, Edward E and Small, Ramdall L},
doi={10.3732/ajb.92.1.142},
issn={0002-9122},
journal={American Journal of Botany},
month={01},
number={1},
pages={142--166},
title={{The tortoise and the hare II: relative utility of 21 noncoding chloroplast DNA sequences for phylogenetic analysis}},
url={https://onlinelibrary.wiley.com/doi/full/10.3732/ajb.92.1.142},
volume={92},
year={2005}
}
@article{Shaw2007,
author={Shaw, Joey and Lickey, Edgar B and Schilling, Edward E and Small, Ramdall L},
doi={10.3732/ajb.94.3.275},
issn={0002-9122},
journal={American Journal of Botany},
month={03},
number={3},
pages={275--288},
title={{Comparison of whole chloroplast genome sequences to choose noncoding regions for phylogenetic studies in angiosperms: the tortoise and the hare III}},
url={https://onlinelibrary.wiley.com/doi/full/10.3732/ajb.94.3.275},
volume={94},
year={2007}
}
\end{filecontents}
XXX \textcite{Shaw2005} XXX \textcite{Shaw2007} XXX \textcite{Shaw2005,Shaw2007}, XXX \parencite{Shaw2005} XXX \parencite{Shaw2007} XXX  \parencite{Shaw2005,Shaw2007} XXX.
\printbibliography
\end{document}

It renders as:

Wrong format of references.

There should be only "Shaw et al (2005)" and so on. Only one name before "et al", no more.

Tilia
  • 311
  • While it is possible to emulate plainnat (at least in theory - I have never done it), doing that in full detail is going to be a lot of work. But if you can live with small differences it should be doable. Many bits and pieces of the puzzle are already answered elsewhere on this site. Just search and you'll find it. – moewe May 18 '18 at 14:50
  • 4
    I think several questions each asking about one specific thing you have trouble with would be more valuable to this site than just one big question that essentially is: Please emulate this style. In any way, please add an MWE/MWEB that shows what you have so far to your question. An MWE makes sure we are all talking about the same thing and helps us to get started helping you more quickly. – moewe May 18 '18 at 14:54
  • 2
    This is intended behaviour: biblatex normally does not abbreviate author lists in a way that they could get ambiguous. You can turn off that feature with uniquelist=false,, see https://tex.stackexchange.com/q/69028/35864 – moewe May 19 '18 at 20:28
  • 2
    It is not really clear, but if your only problem is the "... et al." name lists, see: https://tex.stackexchange.com/q/69028/105447. – gusbrs May 19 '18 at 20:29
  • 2
    A few other things: bibstyle=authortitle, citestyle=authoryear-comp, is a slightly unusual combination. Normally author-year citation styles are combined with author-year bibliography styles. With the author-title style that is currently used the year is not very prominent and is harder to find in the bibliography making it difficult to find the correct entry for a particular citation. sorting=ynt, adds another layer of difficulty: It sorts by year, name and title. But one would normally expect name, year, title with those citations ... – moewe May 19 '18 at 20:31
  • 2
    sortcase=true, is the default (normally I wouldn't dream of changing the value of the sortcase option, whatever the default value). sortcites=true, is already issued by citestyle=authoryear-comp,. hyperref=true, is no better than the default hyperref=auto, (they only differ in their behaviour if hyperref is not loaded: true displays a warning in that case, auto does nothing - if hyperref is not loaded neither of the two actually turns on links). maxalphanames=1 is not used by the style you use, it is only relevant for alphabetic styles. – moewe May 19 '18 at 20:35
  • Thank You, @moeve for Your comments pointing me to the right places. I can now solve everything. – Tilia May 20 '18 at 07:56

1 Answers1

1

With the help and good point by @moeve, I can solve it like this:

\documentclass{article}
\usepackage[british]{babel} % Languages
\usepackage{filecontents} % Included exemplary file
\usepackage[x11names]{xcolor} % Color names
\usepackage[ % Bibliography settings
backend=biber,
bibstyle=authoryear,
citestyle=authoryear-comp,
autocite=inline,
maxbibnames=100,
mincitenames=1,
maxcitenames=2,
hyperref=true,
backref=true,
backrefstyle=none,
uniquelist=false
]{biblatex}
\DeclareFieldFormat[article]{title}{\mkbibbold{#1}} % Bold article title
\addbibresource{test.bib}
\usepackage[ % Links settings
breaklinks=true,
colorlinks=true,
linkcolor={Firebrick4},
anchorcolor={Blue4},
citecolor={Green4},
filecolor={DeepPink4},
menucolor={Chocolate4},
urlcolor={DodgerBlue4},
bookmarks=true,
pdfencoding=auto,
unicode=true,
xetex
]{hyperref}
\begin{document}
% Exemplary bibliography
\begin{filecontents}{test.bib}
@article{Shaw2005,
author={Shaw, Joey and Lickey, Edgar B and Beck, John T and Farmer, Susan B and Liu, Wusheng and Miller, Jermey and Siripun, K C and Winder, Charles T and Schilling, Edward E and Small, Ramdall L},
doi={10.3732/ajb.92.1.142},
issn={0002-9122},
journal={American Journal of Botany},
month={01},
number={1},
pages={142--166},
title={{The tortoise and the hare II: relative utility of 21 noncoding chloroplast DNA sequences for phylogenetic analysis}},
url={https://onlinelibrary.wiley.com/doi/full/10.3732/ajb.92.1.142},
volume={92},
year={2005}
}
@article{Shaw2007,
author={Shaw, Joey and Lickey, Edgar B and Schilling, Edward E and Small, Ramdall L},
doi={10.3732/ajb.94.3.275},
issn={0002-9122},
journal={American Journal of Botany},
month={03},
number={3},
pages={275--288},
title={{Comparison of whole chloroplast genome sequences to choose noncoding regions for phylogenetic studies in angiosperms: the tortoise and the hare III}},
url={https://onlinelibrary.wiley.com/doi/full/10.3732/ajb.94.3.275},
volume={94},
year={2007}
}
\end{filecontents}
% The document
XXX \textcite{Shaw2005} XXX \textcite{Shaw2007} XXX \textcite{Shaw2007,Shaw2005}, XXX \parencite{Shaw2005} XXX \parencite{Shaw2007} XXX  \parencite{Shaw2007,Shaw2005} XXX.
\printbibliography
\end{document}

Result of the above code.

Tilia
  • 311
  • Try with \DeclareFieldFormat[article]{title}{\mkbibbold{#1}}, i.e. \mkbibbold instead of \textbf. – moewe May 20 '18 at 08:07
  • @moeve I did, but I don't see any difference. What is the purpose here? – Tilia May 20 '18 at 09:40
  • 1
    \mkbibbold is the biblatex wrapper around \textbf that can interface with the punctfont option of biblatex. In the context of biblatex styles it is good practice to use the wrappers provided by biblatex even if there is no change in the output. – moewe May 20 '18 at 09:43
  • 1
    AFAIK xlextra and xunicode should not be loaded any more, see https://tex.stackexchange.com/a/347618/35864 and https://tex.stackexchange.com/q/117508/35864. I doubt you really need metalogo. polyglossia does not work entirely smoothly with biblatex and has not been properly developed in a while (there is a release from April 2018, but that does not address many open bugs), see https://tex.stackexchange.com/q/432347/35864. If you mainly write in languages with an (extended) Latin alphabet, you don't need polyglossia, babel is fine. – moewe May 20 '18 at 13:11
  • Indeed, xunicode is not required. I'm not sure about xlxtra, thought (it also loads 3 following characters - fontspec, realscripts and metalogo). Currently, I'm unable to compile my document without it. It will require deeper exploration. polyglossia seems to work fine for me now (I need bilingual content), but I'll try how it works with babel. – Tilia May 20 '18 at 15:02
  • You already load fontspec and realscript separately, so xltxtra doesn't really add anything in that regard. I also have a hard time imagining why you would need metalogo: Do you write \LaTeX and \XeLaTeX a lot in your document? polyglossia works fine until it does not, if you stick to European languages (and even in other cases, but I assume that already has you covered) babel is definitely the better choice because it is more mature and actively maintained. https://tex.stackexchange.com/q/432347/35864 explains why polyglossia and biblatex don't really work well together – moewe May 20 '18 at 15:19
  • ... even if it seems to work fine. – moewe May 20 '18 at 15:19
  • polyglossia to babel was easy switch. It works well. And thank You, @moeve the link describes it well. As xltxtra loads the other packages automatically, I prefer to list them explicitly to see it. Also, I don't really see what is wrong with is usage, especially as without it I can't compile whole documents (problems with graphics, font sizes, etc.). I agree it doesn't have to be part of MWE here. – Tilia May 20 '18 at 16:07
  • I don't know explicit details, but I trust egreg's judgement when he says that xltxtra should not be used. In fact I rarely see documents using it any more. I also think that if you load fontspec and realscripts xltxtra does not really do a lot of things an average document would need. I don't think that loading packages explicitly that are already loaded by other packages is a particularly prudent practice. You could end up with option clashes and it makes the preamble unnecessarily long. – moewe May 20 '18 at 16:46
  • @moewe I edited the MWE to drop the xltxtra etc. It is unneeded here. Regarding my usage it in full document, it does require more work and it is definitely topic for another question. Thank You for all Your help. – Tilia May 20 '18 at 17:15