0

I'm using a heavily patched version of verbose-trad2 style for biblatex. I'm new to this package, and I'm struggling to find a way to have author's initials only in first citation, and author's full name in bibliography (picture). enter image description here

I'm possibly looking for a command like citeauthor wich chould affect the way (not properly the style) this and other fields are displayed in a citation, independently of and in parallel to their style in the bibliography.

Disclaimer: In the MWE I used \cite for the sake of brevity and readability. In my document though, I will exclusively use \footcite


MWE:

\documentclass[11pt, twoside, openany]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} 
\usepackage[italian]{babel}
\usepackage{cfr-lm}
\usepackage{geometry}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage{microtype}
\linespread{1.5}       

\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\thepage} 
\fancyhead[CO]{\textsc{\textls[50]{\MakeLowercase{\leftmark}}}}
\fancyhead[CE]{\textsc{\textls[50]{\MakeLowercase{\leftmark}}}}
\renewcommand{\headrulewidth}{0pt}

%%%%%%%%%%%%%%%%%%%% bibliografia %%%%%%%%%%%%%%%%%%%
\usepackage[autostyle,italian=guillemets]{csquotes}
\usepackage{xpatch}
\usepackage[style=verbose-trad2,            
            language=italian,
            useprefix=true,                 
            citepages=omit,                 
            backend=biber,  
            ibidpage=true,
        ]{biblatex} 
\usepackage{biblatex-opcit-booktitle}
%
\begin{filecontents}{\jobname.bib}
@book{viora,
author = {Viora, Mario Enrico},
title =  {Consolidazioni e codificazioni. Contributo alla storia della codificazione}, 
location = {Torino},
date = {1967},
shorttitle = {Consolidazioni}
}

@book{lopez,
author = {Lopez, Roberto Sabatino},
title = {La rivoluzione commerciale del Medioevo},
location = {Torino},
date = {1971},
shorttitle = {La rivoluzione commerciale},
}
\end{filecontents}
\addbibresource{\jobname.bib}
% style
%queste tre linee di codice per la compatibilità del titolo corrente della bib. in sc
\defbibheading{sc-comp}[\bibname]{%
  \chapter*{#1}\markboth{#1}{}%
  \addcontentsline{toc}{chapter}{\bibname} %questo per far venire la bib. nel toc
}

\ExecuteBibliographyOptions{giveninits=false, dashed=false, dateabbrev=false}
\DeclareNameAlias{sortname}{last-first}
\NewBibliographyString{ibidemloccit,ibidemnoloccit}
\DefineBibliographyStrings{italian}{%
  bibliography = {Bibliografia},
  editor           = {a cura di},
  editors          = {a cura di},
  idem           = {\textsc{Id}},
  ibidemloccit   = {\mkbibemph{\autocap{i}bid\adddot}},
  ibidemnoloccit = {Ivi},
}

\renewbibmacro*{publisher+location+date}{%
   \iflistundef{publisher}
    {\setunit*{\addcomma\space}}
    {\setunit*{\addcolon\space}}%
  \printlist{publisher}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\addspace}
  \usebibmacro{date}%
 \printfield{edition}%
  \newunit}

%questa mette l'edizione in apice
\DeclareFieldFormat{edition}{%
  \ifinteger{#1}
    {\textsuperscript{#1}}
    {#1\isdot\setunit{\addcomma\space}}}

%questa per togliere la prima occorrenza del numero di edizione
\newcommand{\replaceedition}[1]{%
  \xpatchbibdriver{#1}
    {\printfield{edition}%
     \newunit}
    {}%
    {}
    {\typeout{failed to patch driver #1}}
}
\replaceedition{book}
\replaceedition{collection}
\replaceedition{inbook}
\replaceedition{incollection}
\replaceedition{manual}

%questa stampa l'anno di edizione originale
\renewbibmacro*{date}{%
  \printdate
  \iffieldundef{origyear}{%
  }{%
    \setunit*{\addspace}%
    \printtext[parens]{ed. or. \printorigdate}%
  }%
}

% sostituisce "e" fra autori con virgola
\AtBeginBibliography{
\renewcommand*{\finalnamedelim}{%
\ifnumgreater{\value{liststop}}{2}{}{}%
\addspace\addcomma\space}%
}

%volumi riviste
\renewbibmacro*{volume+number+eid}{%
 \setunit*{\addcomma\space}% 
  \printfield{volume}%
 %invece di \setunit*{\adddot}% 
  \setunit*{/}% 
  \printfield{number}%
  }

\renewcommand*{\revsdnamepunct}{} %toglie virgola fra cognome e nome aut.
\renewcommand*{\intitlepunct}{\space} %toglie ":" dopo "in" dopo elementi in raccolte (art, inproc, incoll)
\renewcommand*{\newunitpunct}{\addcomma\space} %virgola fra aut. e titolo
\renewcommand*{\mkbibnamegiven}[1]{\textsc{#1}} %nome autore sc
\renewcommand*{\mkbibnameprefix}[1]{\textsc{#1}} %particella autore sc
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}} %cognome autore sc

 %toglie "in" dopo titoli art. (solo art.) in riviste
\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}

\nocite{*} %stampa tutta la bibliografia, anche roba non citata nel testo

\DeclareFieldFormat{journaltitle}{\enquote{#1\isdot}} %nome rivista in tondo fra caporali (=enquote)
\DeclareFieldFormat[article]{title}{\textit{#1}} %titolo art. in corsivo
\DeclareFieldFormat[article]{volume}{\textsc{#1}} %vol. rivista in sc (per num. romani)
\DeclareFieldFormat[incollection]{title}{\textit{#1}} %nome art. in miscell. in corsivo
\DeclareFieldFormat[inproceedings]{title}{\textit{#1}}%come sopra
\DeclareFieldFormat{editortype}{\mkbibparens{#1}} %a cura di fra parentesi

%segue macro per impostare ibidem ivi id in maniera corretta
\xpatchbibmacro{author}
  {\printnames{author}}
  {\iffootnote
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
       {\usebibmacro{cite:idem}}
       {\printnames{author}}}
     {\printnames{author}}}
  {}{}
\xpatchbibmacro{bbx:editor}
  {\printnames{editor}}
  {\iffootnote
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
        {\usebibmacro{cite:idem}}
        {\printnames{editor}}}
     {\printnames{editor}}}
  {}{}
\xpatchbibmacro{bbx:translator}
  {\printnames{translator}}
  {\iffootnote
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
        {\usebibmacro{cite:idem}}
        {\printnames{translator}}}
     {\printnames{translator}}}
  {}{}

\renewbibmacro*{cite:ibid}{%
  \printtext{%
    \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
      \ifloccit
        {\bibstring[\mkibid]{ibidemloccit}%
         \global\toggletrue{cbx:loccit}}
        {\bibstring[\mkibid]{ibidemnoloccit}}}}}


\begin{document}
What I get: \cite{viora}

What I want: {\sc M. E. Viora}, {\it Consolidazioni e codificazioni. Contributo alla storia della codificazione}, Torino 1967

Dummy quote to prevent \emph{ibidem}: \cite{lopez}

Second quote: \cite{viora} (correct)
\printbibliography[heading=sc-comp]

\end{document}
1

In verbose-trad2 the full first citation is produced by the bibmacro cite:full. We can inject some code into that macro to shorten the given name to initials. There are several ways to do this, but one particularly simple way would be to toggle the internal toggle abx@bool@giveninits.

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \global\toggletrue{cbx:fullcite}%
  \printtext[bibhypertarget]{%
    \usedriver
      {\toggletrue{abx@bool@giveninits}%
       \DeclareNameAlias{sortname}{default}}
      {\thefield{entrytype}}}%
  \usebibmacro{shorthandintro}}

In the context of your MWE (slightly streamlined)

\documentclass[11pt, twoside, openany]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} 
\usepackage[italian]{babel}
\usepackage[autostyle,italian=guillemets]{csquotes}
\usepackage{xpatch}
\usepackage[style=verbose-trad2,
            useprefix=true,                 
            citepages=omit,                 
            backend=biber,  
            ibidpage=true,
        ]{biblatex} 
\usepackage{biblatex-opcit-booktitle}

\defbibheading{sc-comp}[\bibname]{%
  \chapter*{#1}\markboth{#1}{}%
  \addcontentsline{toc}{chapter}{\bibname}%
}

\ExecuteBibliographyOptions{giveninits=false, dashed=false, dateabbrev=false}
\DeclareNameAlias{sortname}{family-given}
\NewBibliographyString{ibidemloccit,ibidemnoloccit}
\DefineBibliographyStrings{italian}{%
  bibliography   = {Bibliografia},
  editor         = {a cura di},
  editors        = {a cura di},
  idem           = {\textsc{Id}},
  ibidemloccit   = {\mkbibemph{\autocap{i}bid\adddot}},
  ibidemnoloccit = {Ivi},
}

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \global\toggletrue{cbx:fullcite}%
  \printtext[bibhypertarget]{%
    \usedriver
      {\toggletrue{abx@bool@giveninits}%
       \DeclareNameAlias{sortname}{default}}
      {\thefield{entrytype}}}%
  \usebibmacro{shorthandintro}}

\renewbibmacro*{publisher+location+date}{%
  \iflistundef{publisher}
    {\setunit*{\addcomma\space}}
    {\setunit*{\addcolon\space}}%
  \printlist{publisher}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\addspace}%
  \usebibmacro{date}%
  \printfield{edition}%
  \newunit}

\DeclareFieldFormat{edition}{%
  \ifinteger{#1}
    {\textsuperscript{#1}}
    {#1\isdot\setunit{\addcomma\space}}}

\newcommand{\replaceedition}[1]{%
  \xpatchbibdriver{#1}
    {\printfield{edition}%
     \newunit}
    {}%
    {}
    {\typeout{failed to patch driver #1}}%
}
\replaceedition{book}
\replaceedition{collection}
\replaceedition{inbook}
\replaceedition{incollection}
\replaceedition{manual}

\renewbibmacro*{date}{%
  \printdate
  \iffieldundef{origyear}{%
  }{%
    \setunit*{\addspace}%
    \printtext[parens]{ed. or. \printorigdate}%
  }%
}

\DeclareDelimFormat{finalnamedelim}{%
  \addspace\addcomma\space}

%volumi riviste
\renewbibmacro*{volume+number+eid}{%
 \setunit*{\addcomma\space}% 
  \printfield{volume}%
 %invece di \setunit*{\adddot}% 
  \setunit*{\addslash}% 
  \printfield{number}%
}

\renewcommand*{\revsdnamepunct}{}
\renewcommand*{\intitlepunct}{\space}
\renewcommand*{\newunitpunct}{\addcomma\space}
\renewcommand*{\mkbibcompletename}{\textsc}
\newbibmacro*{in:}{%
  \ifentrytype{article}
    {}
    {\bibstring{in}%
     \printunit{\intitlepunct}}}

\DeclareFieldFormat{journaltitle}{\enquote{#1\isdot}}
\DeclareFieldFormat[article]{title}{\textit{#1}}
\DeclareFieldFormat[article]{volume}{\textsc{#1}}
\DeclareFieldFormat[incollection]{title}{\textit{#1}}
\DeclareFieldFormat[inproceedings]{title}{\textit{#1}}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}

\xpatchbibmacro{author}
  {\printnames{author}}
  {\iffootnote
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
       {\usebibmacro{cite:idem}}
       {\printnames{author}}}
     {\printnames{author}}}
  {}{}
\xpatchbibmacro{bbx:editor}
  {\printnames{editor}}
  {\iffootnote
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
        {\usebibmacro{cite:idem}}
        {\printnames{editor}}}
     {\printnames{editor}}}
  {}{}
\xpatchbibmacro{bbx:translator}
  {\printnames{translator}}
  {\iffootnote
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
        {\usebibmacro{cite:idem}}
        {\printnames{translator}}}
     {\printnames{translator}}}
  {}{}

\renewbibmacro*{cite:ibid}{%
  \printtext{%
    \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
      \ifloccit
        {\bibstring[\mkibid]{ibidemloccit}%
         \global\toggletrue{cbx:loccit}}
        {\bibstring[\mkibid]{ibidemnoloccit}}}}}

\begin{filecontents}{\jobname.bib}
@book{viora,
  author     = {Viora, Mario Enrico},
  title      = {Consolidazioni e codificazioni.
                Contributo alla storia della codificazione}, 
  location   = {Torino},
  date       = {1967},
  shorttitle = {Consolidazioni}
}
@book{lopez,
  author     = {Lopez, Roberto Sabatino},
  title      = {La rivoluzione commerciale del Medioevo},
  location   = {Torino},
  date       = {1971},
  shorttitle = {La rivoluzione commerciale},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
What I get: \cite{viora}

What I want: {\scshape M. E. Viora},
{\itshape Consolidazioni e codificazioni.
 Contributo alla storia della codificazione}, Torino 1967

Dummy quote to prevent \emph{ibidem}: \cite{lopez,sigfridsson}

Second quote: \cite{viora} (correct)
\printbibliography[heading=sc-comp]
\end{document}

What I get: M. E. Viora, Consolidazioni e codificazioni. Contributo alla storia della codificazione, Torino 1967

10
  • Thank you very much for your help. Unfortunately, I can't get your code to work. Compiling your MWE I get: Package biblatex Warning: Delimiter 'finalnamedelim' in context '' already defined, overwriting on input line 83. ! LaTeX Error: \mkbibcompletename undefined; while copy-pasting the first snippet in another document returns: ! Package etoolbox Error: Toggle 'abx@bool@giveninits' undefined. Running on TeXWorks.
    – Mattia
    Apr 29 at 21:07
  • 1
    @Mattia The code works for me on an up-to-date TeX system with biblatex v3.16. The error about \mkbibcompletename being undefined means your system is outdated. Ignore the rest of my answer and only focus on the \renewbibmacro*{cite:full}. In your old version things might work with \toggletrue{blx@giveninits} instead of \toggletrue{abx@bool@giveninits}.
    – moewe
    Apr 29 at 21:20
  • I've update my TeX distribution. Everything works fine now, thank you very much!
    – Mattia
    Apr 30 at 14:12
  • 1
    @Mattia With a current version of biblatex you may want to try \DeclareDelimFormat[bib]{nametitledelim}{\addspace}. With an older version it might be \renewcommand*{\labelnamepunct}{\addspace}. (At least if I understand which comma you mean.) If that's not what you want, please open a new question and explain in more detail which comma you mean.
    – moewe
    May 5 at 20:28
  • 1
    @Mattia Updating questions with new requirements after they have been answered (and especially if an answer was accepted months ago) is usually not recommended. Asking a new question does not cost anything and generally keeps things clearer. Plus more people will see the new question. See also tex.meta.stackexchange.com/q/7162/35864
    – moewe
    Jun 22 at 12:56

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.