2

I need a very specific layout for my university.

My current MWE looks like this:

\documentclass[paper=a4,]{scrreprt} 
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[style=verbose,backend=biber]{biblatex}

\begin{filecontents*}{document.bib}

@book{Belyi.2015,
    year    = {2015},
    title   = {{S}tates and markets in hydrocarbon sectors},
    author  = {Belyi/Andrei/Talus},
}

\end{filecontents*}
\addbibresource{document.bib}

\renewcommand{\mkbibnamelast}[1]{\mkbibemph{#1}\addcomma} 
\DeclareFieldFormat*{title}{#1\addcomma}

\DeclareFieldFormat{parens}{\mkbibparens{#1}}
\renewbibmacro*{date}{\printtext[parens]{\printdate}}

\begin{document}
First Note\footnote{\cite{Belyi.2015}}.

Second note\footnote{\cite{Belyi.2015}}.

\printbibliography
\end{document}

The current output looks like this:

Belyi/Andrei/Talus, States and markets in hydrocarbon sectors, (2015)

Belyi/Andrei/Talus, States and markets in hydrocarbon sectors

Now I want to get rid of the title in the second citation. My guess is it works somehow with ifciteseen but I can't seem to get it right.

  • Bonus: Is there a possibility to end all citations with a dot? My current solution to this is to end the footnote but it would be nice if latex could do it for me.
Vulcano
  • 123

1 Answers1

2

The macro cite:short is used for short (subsequent) citations in the verbose styles. There is no need for an additional \ifciteseen test. That test is already executed to decide whether to call cite:full or cite:short.

You can use the test \ifsingletitle (activated with the option singletitle) to test if the author list is unique, in that case the title will be dropped. If the author list is not unique, i.e. there are several works with the same list of authors, the title is displayed to allow for a disambiguation of the references.

Please note how I modernised and modified some of your code and filled the .bib entry in the appropriate format (authors should always be separated with and and not with /).

The bonus question can be solved by using \autocite (or \footcite).

\documentclass[paper=a4,]{scrreprt} 
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[style=verbose,backend=biber,singletitle]{biblatex}

\renewcommand*{\newunitpunct}{\addcomma\space}

\renewcommand{\mkbibnamefamily}[1]{\mkbibemph{#1}} 
\DeclareDelimFormat*{multinamedelim}{\addslash}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}

\DeclareDelimFormat{nametitledelim}{\addcomma\space}

\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{citetitle}{#1}

\renewbibmacro*{cite:short}{%
  \printnames{labelname}%
  \ifsingletitle
    {}
    {\setunit*{\printdelim{nametitledelim}}%
     \printtext[bibhyperlink]{%
       \printfield[citetitle]{labeltitle}}}}

\DeclareFieldFormat{parens}{\mkbibparens{#1}}
\renewbibmacro*{date}{\printtext[parens]{\printdate}}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@collection{Belyi.2015,
  year      = {2015},
  title     = {States and Markets in Hydrocarbon Sectors},
  editor    = {Belyi, Andrei V. and Talus, Kim},
  publisher = {Palgrave},
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}
First Note\autocite{Belyi.2015}.

Second note\autocite{Belyi.2015}.

\printbibliography
\end{document}

Footnote 1: "Andrei V. Belyi/Kim Talus, eds., States and Markets in Hydrocarbon Sectors, Palgrave, (2015)." Footnote 2: "Belyi/Talus."

Modification for family names in first/full citations

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \printtext[bibhypertarget]{%
    \usedriver
      {\DeclareNameAlias{sortname}{labelname}}
      {\thefield{entrytype}}}%
  \usebibmacro{shorthandintro}}
moewe
  • 175,683
  • first of all thx for the example - it is working now -> solved. The problem though with your "modernised" version is the authorlist in the first citation is now not according to my required citation style (italic: "Bely/Talus"). My "fix" was to just put the authors in the required style :-) – Vulcano Aug 29 '18 at 19:35
  • @Vulcano Please see the edit. – moewe Aug 29 '18 at 19:38
  • Thank you again for your edit. Is there somewhere some kind of a more or less beginner friendly documentation which macros there are or how to use them? All these \DeclareFieldFormat and \renewbibmacro commands which I currently know (meaning copy/pasting) are from various Stackexchange posts which are most of the time nearly what I need but not exactly. And creating a new post for every wrong comma kinda defeats the purpose of learning them how to use them... Google always redirects to these Stackexchange posts – Vulcano Aug 30 '18 at 10:49
  • @Vulcano Unfortunately, I'm not aware of an advanced biblatex tutorial that covers style writing and modification in depth. There are some great beginner's resources at https://tex.stackexchange.com/q/13509/, but if they cover modifications of styles, they only mention a few special cases and don't give an overall introduction into style writing. Paul Stanley's tutorial mentions a few modifications and Dominik Waßenhoven's German article walks you through his biblatex style (note that the article is ten years old now, some things have changed). – moewe Aug 30 '18 at 11:12
  • Then there is https://tex.stackexchange.com/q/12806/, but it only manages to scratch the surface of what is possible. ... I think currently the best way is to learn from understanding the code of the standard styles and from reading questions and answers here and elsewhere (check the age of the answers, things may have changed, for some things there are far elegant tricks now than there were five years ago). – moewe Aug 30 '18 at 11:14