2

After reading several posts in this forum I chose bibulous to create my own bibliography style. I'm already quite happy with the solution in this example here. However, I need to sort the references not only after author year, as in the example above, but because I sometimes don't have an author also after institutions. So I need it to be sorted first alphabetically and then after the year, whereas the author and the institution should be on the same level.

As said above I like this approach quite a lot so I use it as a MWE. I only removed the author in one bib entry so it's easier to test whether it works or not.

Thank you very much for your help in advance!

\documentclass[11pt, a4papter] {scrartcl}
\usepackage{natbib}

\usepackage{filecontents}
\begin{filecontents*}{svenz.bst}
TEMPLATES:
book =  [<au>.] [\textit{\enquote{<title>}}.] [<address> <year>.]
electronic = [<au>.] [\textit{<institution>.}] [<date>.] [\enquote{<title>}.] [<url>.] [<dateofchange>.] [<urldate>.]
oral = [<au>.] [<interviewer>,] [<date>,] [<address>.]
inbook = [<au>.] [\enquote{<title>}.] [In: <booktitle>,] hg. v. [<publisher>.] [<address>] [<place>.] [<pages>.]
article = [<au>.] [\enquote{<title>}.] [\textit{<journal>,] [<year>,] [<number>,}] [<pages>.]

SPECIAL-TEMPLATES:
citelabel = <authorlist.0.last>, <year>
sortkey = <authorlist.0.last><year>

OPTIONS:
namelist_format = last_name_first
use_firstname_initials = False
\end{filecontents*}
\begin{filecontents}{\jobname.bib}
@Electronic{gehalt,
  author      = {Rütti, Nicole},
  institution = {NZZ Online},
  year        = {2017},
  date        = {2017-07-27},
  title       = {Sind Frauen wirklich selber schuld am tieferen Gehalt?},
  url         = {https://www.nzz.ch/wirtschaft/frauen-und-lohnverhandlungen-auf-stoeckelschuhen-rueckwaerts-ueber-ein-minenfeld-laufen-ld.1307984},
  urldate     = {2018-10-14},
}


@Electronic{ackeret,
  author      = {Ackeret, Markus},
  institution = {NZZ Online},
  year        = {2017},
  date        = {2017-05-25},
  title       = {Im Übereifer des politischen Gefechts},
  url         = {https://www.nzz.ch/international/debatte-um-die-bundeswehr-im-uebereifer-des-politischen-gefechts-ld.1296154},
  urldate     = {2018-10-14},
}

@Electronic{Lenz1,
  institution = {Tages-Anzeiger Online},
  year        = {2017},
  date        = {2017-07-04},
  title       = {Rechenspiele der Armee haben politische Folgen},
  url         = {https://www.tagesanzeiger.ch/schweiz/standard/rechenspiele-der-armee-haben-politische-folgen/story/19945957},
  urldate     = {2018-10-16},
}
\end{filecontents}

\begin{document}
Lorem ipsum dolor sit amet, \citet{gehalt} consetetur sadipscing elitr, 
\cite{Lenz1}. Lorem ipsum dolor sit amet. \cite{ackeret}

\bibliographystyle{svenz}
\bibliography{\jobname}
\end{document}

So in the end it should look like:
Ackeret, Markus. [. . .]
Rütti, Nicole. [. . .]
Tages-Anzeiger Online. [. . .]

1
  • The usual BibTeX/biblatex solution would be to write author = {{Tages-Anzeiger Online}},. I'd expect that works here as well, but I can only check later.
    – moewe
    Commented Nov 8, 2018 at 9:51

1 Answer 1

1

The usual approach for cases like this (which also works for BibTeX and biblatex) would be to give Tages-Anzeiger Online as author, i.e.

@Electronic{Lenz1,
  author      = {{Tages-Anzeiger Online}},
  year        = {2017},
  date        = {2017-07-04},
  title       = {Rechenspiele der Armee haben politische Folgen},
  url         = {https://www.tagesanzeiger.ch/schweiz/standard/rechenspiele-der-armee-haben-politische-folgen/story/19945957},
  urldate     = {2018-10-16},
}

(the double braces are needed to avoid parsing the name as consisting of first and last names, see Using a 'corporate author' in the "author" field of a bibliographic entry (spelling out the name in full)). In the comments you mention that you don't like that because the Tages-Anzeiger Online should be in italics.

In that case I suggest you change the sortkey in SPECIAL-TEMPLATES:. Since the citations were also not displaying nicely with missing authors, you should probably change citelabel as well.

SPECIAL-TEMPLATES:
citelabel = [<authorlist.0.last>|<editorlist.0.last>|<institution>](<year>)
sortkey   = [<authorlist.0.last>|<editorlist.0.last>|<institution>]<year>

With that code in the .bst file I get

All citations display nicely as "Ackeret (2017)", "Rütti (2017)", "Tages-Anzeiger Online (2017)" and the bibliography is ordered as expected: "Ackeret", "Rütti" and "Tages-Anzeiger Online"

2
  • I should stop answering Bibulous questions. What's wrong with using biblatex? ;-)
    – moewe
    Commented Nov 8, 2018 at 15:26
  • 1
    When I read how I have to customize a bibliography I found bibulous and found it much easier even if I still don't understand everything. The only problem is that there aren't many explications or answered questions. So I'm extremely thankful that you answer the bibulous questions as one of very few users in this forum. So I hope you don't stop doing this :)
    – yby15001
    Commented Nov 9, 2018 at 5:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .