1

The second citation of a work currently looks like this:

enter image description here

It should look like

Babington, 1933, S. 310.

Some journal, 2013, S. 40-41.

Farindon, 1993, S.10.

This style should be used for books, articles and incollections.

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @Article{article,
        organization = {The Minimal Music Organization},
        title   = {Minimal music},
        journal = {Some journal},
        year    = {2013},
        number  = {12},
        pages   = {40-41},
    }


   @book{book,
    author    = {Peter Babington}, 
    title     = {The title of the work},
    year      = 1993,
    pages     ={310},
   }


@incollection{incollection,
    author       = {Peter Farindon}, 
    title        = {The title of the work},
    booktitle    = {The title of the book},
    publisher    = {The name of the publisher},
    year         = 1993,
    pages     ={10},
}


\end{filecontents}

\documentclass{article}
\usepackage[style=verbose]{biblatex}
\usepackage[ngerman]{babel}
\usepackage{csquotes}


  \DeclareSortingTemplate{nty}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{organization}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
}

\DeclareListFormat{organization}{%
  \usebibmacro{list:delim}{#1}%
  \mkbibemph{#1}\isdot
  \usebibmacro{list:andothers}}

\DeclareBibliographyDriver{online}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \printlist{organization}%
  \newunit\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{version}%
  \newunit
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{date}%
  \newunit\newblock
  \iftoggle{bbx:eprint}
  {\usebibmacro{eprint}}
  {}%
  \newunit\newblock
  \usebibmacro{url+urldate}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
  {\usebibmacro{related:init}%
    \usebibmacro{related}}
  {}%
  \usebibmacro{finentry}}

\addbibresource{\jobname.bib}
\begin{document}
    Let's cite! \footcite{article} \footcite{incollection} \footcite{book} \footcite{article} \footcite{incollection} \footcite{book}
    \printbibliography
\end{document}
heidil
  • 171
  • It is possible to get a verbose style with author-year short citations, but in that case it would be more natural to also use the authoryear bibliography layout and sort references by name-year and not by name-title. Care would have to be taken for works by the same author from the same year. Usually in author-year styles they would be disambiguated with a little letter: Smith 1990a, Smith 1990b. But how should that letter show in the first citation? You also mention that this treatment should only apply to @article, @book and @incollection. What about the rest? – moewe Dec 22 '18 at 19:55
  • https://tex.stackexchange.com/q/139158/35864 shows how to get authoryear short citations with style=verbose-ibid. – moewe Dec 22 '18 at 20:01
  • This seems to disrupt other customizations I've made to the bibliography and the citation. Is there a different approach without bibstyle=authortitle (as this has a problem with e.g. articlein=false). I can test tomorrow which part exactely causes the problem and then add it to the MWE if this is of any help. – heidil Dec 23 '18 at 02:56
  • Yes, the link was a shot in the dark. It shows that something similar can be done and has been done before, but given your post history one had to expect that it wouldn't be easy pull things off without modification. If you want to experiment with the solution that is great, but I would be much more interested in replies to my questions and remarks in my comments above. Conceptually there are some rough edges with the desired outcome as I naively understand it now. It would be good if we could clear that up. – moewe Dec 23 '18 at 09:23
  • I've tried to find out which part causes the problems but I didn't suceed. I need the bibliography layout with name-title. I'm not sure if I unterstand your question about the little letter. I would say it's best to add the little letter without a space to the end of the author or the organization in the first citation. However, I don't have any specifications about this issue and I don't know what is usually done so correct me if I'm wrong. – heidil Dec 23 '18 at 10:11
  • Apart from @electronic I don't have any other bibliography classes. There the citation looks like [https://tex.stackexchange.com/questions/466985/change-to-a-shorter-citation-style-in-biblatex] I added some code with regard how the organization is displayed from other questions. If it's unnecesary for this question feel free to delet it again. (and if you already pointed out in another question some of the authors are in the same course, which explains the similar code.) – heidil Dec 23 '18 at 10:11
  • The customization for the organizations comes from [https://tex.stackexchange.com/questions/464166/biblatex-move-organization] and [https://tex.stackexchange.com/questions/464911/sort-authors-and-organizations-alphabetically] – heidil Dec 23 '18 at 10:17
  • Is there any public documentation of the requirements of the style you have to implement? – moewe Dec 23 '18 at 10:40
  • No, it isn't public. Do you ask because of the little letters or is something unclear? – heidil Dec 23 '18 at 10:48
  • I'm just curious. It seems there are at least three different users on this site asking about this (or a very similar) style, and it seems to be a very complex one. I implemented the letters in a way that made sense to me. – moewe Dec 23 '18 at 10:51
  • If you are really interested in the style I could send it to you somehow. – heidil Dec 24 '18 at 14:50

1 Answers1

3

This can be done similarly to Biblatex: First citation as full reference and following citations ibid or - when interrupted - short author-year citation, but since your desired style is slightly different and you already have a lot of additional modifications, some care has to be taken.

I'd like to remark that usually when citations are identified with author-year labels, the year should have a more prominent place in the bibliography (and long citation), so that it can be found easily at first glance. With the current layout one has to search for the year near the end of the entry, while the name is at the beginning. Usually the bibliography would also be sorted by name-year for this citation set-up, but the MWE sorts by name-title.

The relevant modifications for this question in the MWE below are marked with https://tex.stackexchange.com/q/467022/35864. The other code as been collected from the many linked questions.

The main idea is to modify the cite:short macro to print labeldate instead of labeltitle. In order to use labeldate we need to request it with the labeldateparts option. The rest is pretty much straightforward if one copies some code from authoryear.cbx. We only need to make sure that the disambiguation letter also appears in the bibliography, hence the redefinition of the date macro.

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{csquotes}

\usepackage[style=verbose, labeldateparts, autocite=footnote]{biblatex}

%%%%% https://tex.stackexchange.com/q/467022/35864
\newbibmacro*{cite:labeldate+extradate}{%
  \iffieldundef{labelyear}
    {\iffieldundef{label}
       {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
       {\printtext[bibhyperref]{\printfield{label}}}}
    {\printtext[bibhyperref]{\printlabeldateextra}}}

\renewbibmacro*{cite:short}{%
  \ifbibmacroundef{cite:short:\strfield{entrytype}}
    {\printnames{labelname}%
     \setunit*{\printdelim{nametitledelim}}%
     \usebibmacro{cite:labeldate+extradate}}
    {\usebibmacro*{cite:short:\strfield{entrytype}}}}

\renewbibmacro*{date}{%
  \iflabeldateisdate
    {\printdateextra}
    {\iffieldundef{extradate}
       {}
       {\PackageWarning{biblatex}{Nonempty 'extradate' in entry
          \thefield{entrykey}, but labeldate is not date.}}%
     \printdate}}
%%%%% 467022 END


%%%%% https://tex.stackexchange.com/q/466985/35864
\DeclareFieldFormat[online]{shorttitle}{\mkbibquote{#1\dots\isdot}}
\newbibmacro*{cite:short:online}{%
  \printnames{labelname}%
  \setunit{\addcomma\space}%
  \printlist{organization}%
  \setunit{\addcomma\space}%
  \printdate
  \setunit{\addcomma\space}%
  \printtext[bibhyperlink]{%
    \iffieldundef{shorttitle}
      {\printfield[citetitle]{labeltitle}}
      {\printfield{shorttitle}}}}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite=false]{
      \step[fieldsource=title, match=\regexp{\A(\w+\s+){2}(\w+)}, final]
      \step[fieldset=shorttitle, origfieldval, final]
      \step[fieldsource=shorttitle, match=\regexp{\A(\w+\s+)(\w+\s+)(\w+).*}, replace={$1$2$3}]
    }
  }
}
%%%%% 466985 END


%%%%% https://tex.stackexchange.com/q/464205/35864,
%%%%% https://tex.stackexchange.com/q/464166/35864
\DefineBibliographyStrings{english}{
  urlseen = {visited at}
}

\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}

\DeclareListWrapperFormat{organization}{\mkbibemph{#1}}

\DeclareBibliographyDriver{online}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \newunit\newblock
  \printlist{organization}%
  \newunit\newblock
  \usebibmacro{date}%
  \newunit\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{version}%
  \newunit
  \printfield{note}%
  \newunit\newblock
  \iftoggle{bbx:eprint}
    {\usebibmacro{eprint}}
    {}%
  \newunit\newblock
  \usebibmacro{url+urldate}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}
%%%% 464205 & 464166 END

%%%%% https://tex.stackexchange.com/q/464911/35864
\DeclareSortingTemplate{nty}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{organization}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
}
%%%%% 464911 END

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{article,
  author  = {Hans Zimmer},
  title   = {Minimal music},
  journal = {Some journal},
  year    = {2013},
  number  = {12},
  pages   = {40-41},
}
@book{book,
  author = {Peter Babington}, 
  title  = {The title of the work},
  year   = 1993,
}
@incollection{incollection,
  author    = {Peter Farindon}, 
  title     = {The title of the work},
  booktitle = {The title of the book},
  publisher = {The name of the publisher},
  year      = 1993,
  pages     = {10},
}
@online{gates,
  author       = {Bill Gates},
  title        = {Save the world!},
  date         = {2016-05-04},
  url          = {https://www.gatesfoundation.org/de/},
  urldate      = {2018-12-04},
  organization = {Bill {and} Melinda Gates Foundation},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
  Lorem\autocite{article} ipsum\autocite{incollection} dolor\autocite{book}
  sit\autocite{article} amet\autocite{incollection} concesctur\autocite{book}
  aut\autocite{gates} lorem\autocite{gates}.

  Lorem\autocite{knuth:ct:b} ipsum\autocite{knuth:ct:c}
  dolor\autocite{knuth:ct:b} sit\autocite{knuth:ct:c}.

  \printbibliography
\end{document}

Fn 1 Hans Zimmer. „Minimal music“. In: Some journal 12 (2013), S. 40–41.//Fn 2 Peter Farindon. „The title of the work“. In: The title of the book. The name of the publisher, 1993, S. 10.//Fn 3 Peter Babington. The title of the work. 1993.//Fn 4 Zimmer, 2013.//Fn 5 Farindon, 1993.//Fn 6 Babington, 1993.//Fn 7 Bill Gates. Bill and Melinda Gates Foundation. 4. Mai 2016. Save the world! url: https://www.gatesfoundation.org/de/ besucht am 04.12.2018.//Fn 8 Gates, Bill and Melinda Gates Foundation, 4. Mai 2016, „Save the world...“//Fn 9 Donald E. Knuth. Computers & Typesetting. Bd. B: T E X: The Program. Reading, Mass.: Addison-Wesley, 1986a.//Fn 10 Donald E. Knuth. Computers & Typesetting. Bd. C: The METAFONTbook. Reading, Mass.: Addison-Wesley, 1986b.//Fn 11 Knuth, 1986a.//Fn 12 Knuth, 1986b.

moewe
  • 175,683
  • Thanks for your answer! This looks almost perfect, except that after the year there should follow the pages; seperated to the year by a comma.

    Babington, 1933, S. 310.

    How is that achievable?

    – heidil Dec 24 '18 at 14:48
  • 1
    @heidil Usually citations only show page numbers to pinpoint the exact location. You would do that with the optional argument of \autocite: \autocite[310]{book}. – moewe Dec 24 '18 at 14:50
  • 1
    @heidil By the way, that is also the reason why I deleted the pages = {310} in the book entry: The bibliography entry should not refer to pinpoint locations and if you give a @book as source it is usually understood that the entire book is meant, otherwise one would use @inbook or @incollection. For those types it is usually required to give the pages field in the .bib file, though, so I should probably have changed the pages field for the Farindon incollection to something more useful like pages = {10-45}. – moewe Dec 24 '18 at 14:59