1

I would like to change the format in which bibliography entries appear. I have tried redefining macros but since I am also using Estonian with the babel package, it overwrites my definitions. Currently, this entry

@inproceedings{gan,
  author    = {Ian Goodfellow and Jean Pouget-Abadie and Mehdi Mirza and Bing Xu and David Warde-Farley and Sherjil Ozair and Aaron Courville Yoshua Bengio},
  title     = {Generative adversarial networks},
  booktitle = {{NIPS}},
  editor    = {Z. Ghahramani and M. Welling and C. Cortes and N. D. Lawrence and K. Q. Weinberger},
  pages     = {2672--2680},
  year      = {2014},
  publisher = {Curran Associates, Inc.},
  location  = {New York},
}

appears as

Ian Goodfellow, Jean Pouget­-Abadie, Mehdi Mirza, Bing Xu, David Warde­-Farley, Sherjil Ozair ja Aaron Courville Yoshua Bengio. Generative adversarial networks. Teoses: NIPS. Toim. Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence ja K. Q. Weinberger. New York: Curran Associates, Inc., 2014, lk. 2672–2680.

but would like it to appear as

Ian Goodfellow, Jean Pouget­-Abadie, Mehdi Mirza, Bing Xu, David Warde­-Farley, Sherjil Ozair ja Aaron Courville Yoshua Bengio 2014. Generative adversarial networks. - NIPS. Ed. Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence ja K. Q. Weinberger. New York: Curran Associates, Inc., pp. 2672–2680

The booktitle should be in italics.

For example, I have tried redefining the in: bibmacro

\renewbibmacro*{in:}{%
  \setunit{\addperiod\space\textendash\space}}

but due to babel the output does not change.

EDIT, added MWEB

\documentclass{article}

\usepackage[estonian .notilde]{babel}

\usepackage[backend=biber, citestyle=authoryear, maxbibnames=99]{biblatex}
\DeclareFieldFormat{labelnumberwidth}{} % Doesn't print anything in the label
\setlength{\biblabelsep}{0pt} % Eliminates the spacing before the entries
\DeclareFieldFormat*{title}{#1} % No quotation marks

% This redefinition doesn't change anything due to babel
\renewbibmacro*{in:}{%
  \setunit{\addperiod\space\textendash\space}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@inproceedings{gan,
  author    = {Ian Goodfellow and Jean Pouget-Abadie and Mehdi Mirza and Bing Xu and David Warde-Farley and Sherjil Ozair and Aaron Courville Yoshua Bengio},
  title     = {Generative adversarial networks},
  booktitle = {{NIPS}},
  editor    = {Z. Ghahramani and M. Welling and C. Cortes and N. D. Lawrence and K. Q. Weinberger},
  pages     = {2672--2680},
  year      = {2014},
  publisher = {Curran Associates, Inc.},
  location  = {New York},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
    \parencite{gan}
    \printbibliography
\end{document}
1

estonain.lbx redefines the bibmacro in: in \DeclareBibliographyExtras (in a way that goes against the idea of separating style and localisation, but sometimes this was seen as necessary; a similar effect can be seen in English How to get rid of the "Oxford comma" in a listing of three or more authors?, French: Keep lowercase in biblatex, Italian: Custom dash in Biblatex, a much more extreme example is magyar.lbx). If you want to overwrite that definition, you need to make it within \DefineBibliographyExtras{estonian}.

I also changed some bibstrings according to your example entry (I don't know any Estonian, I just took the English strings).

Note that I switched to a full authoryear style with style=authoryear, instead of faking it with citestyle=authoryear, and suppressing the numeric labels.

\documentclass{article}
\usepackage[estonian.notilde]{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=authoryear, maxbibnames=99]{biblatex}

\DeclareFieldFormat*{title}{#1}

\DefineBibliographyExtras{estonian}{%
  \renewbibmacro*{in:}{%
    \setunit{\addperiod\space\textendash\space}}}

\DefineBibliographyStrings{estonian}{
  editor           = {ed\adddot},
  editors          = {ed\adddot},
  byeditor         = {ed\adddot},
  page             = {p\adddot},
  pages            = {pp\adddot},
}

\begin{filecontents}{\jobname.bib}
@inproceedings{gan,
  author    = {Ian Goodfellow and Jean Pouget-Abadie and Mehdi Mirza
               and Bing Xu and David Warde-Farley and Sherjil Ozair
               and Aaron Courville Yoshua Bengio},
  title     = {Generative adversarial networks},
  booktitle = {{NIPS}},
  editor    = {Z. Ghahramani and M. Welling and C. Cortes
               and N. D. Lawrence and K. Q. Weinberger},
  pages     = {2672--2680},
  year      = {2014},
  publisher = {Curran Associates, Inc.},
  location  = {New York},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
  \parencite{gan}
  \printbibliography
\end{document}

Goodfellow, Ian, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair ja Aaron Courville Yoshua Bengio (2014). Generative adversarial networks. – NIPS. Ed. Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence ja K. Q. Weinberger. New York: Curran Associates, Inc., pp. 2672–2680.

| improve this answer | |
  • Thank you! But do you also know how to remove the small indentation after the first line in the bibliography? – jazzboi Dec 1 '19 at 14:19
  • @jazzboi Yes, that would be \setlength{\bibhang}{0pt}, but then I'd strongly suggest to set \bibitemsep to a non-zero value (i.e. at least \setlength{\bibitemsep}{\itemsep} if not \setlength{\bibitemsep}{2\itemsep} or something even larger). – moewe Dec 1 '19 at 14:57

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.