1

I had to re-define the sorting (and so the driver) for collection to have:

Title, editors, loc, pub, year.

On the second citation, I get the shortened form:

Auhtor surnames, shorttitle, cit.

When I cite an @incollection with crossref pointing to that @collection, though, I don't get anymore my beloved shortened form for the collection, but I have instead:

Shorttitle. Editor names and surnames. Cit.

I would rather like to have

Auhtor surnames, shorttitle, cit.

In other words, in my MWE I get:

Renata Ago. «Socialità e salotti a Roma tra Sei e Settecento». In: Salotti e ruolo femminile. A cura di Maria Betri - Mario Rossi. Cit., pp. 177–188

But I need:

Renata Ago. «Socialità e salotti a Roma tra Sei e Settecento». In: Betri - Rossi, Salotti e ruolo femminile, cit.

To have a shorttitle here I used Maïeul's package biblatex-opcit-booktitle, but it doesn't seem to work great in this case.

MWE:

% !BIB TS-program = biber
% !BIB program = biber
% !TEX encoding = UTF-8 Unicode
% !TeX TS-program = xelatexmk

\begin{filecontents}{archivio.bib}

@collection{Bet:Sal, Address = {Venezia}, Editor = {Maria Betri AND Mario Rossi}, Publisher = {Marsilio}, Shorttitle = {Salotti e ruolo femminile}, Title = {Salotti e ruolo femminile in Italia, tra fine Seicento e primo Novecento}, Year = {2004}},

@incollection{Ago:Soc, Author = {Renata Ago}, Crossref = {Bet:Sal}, Pages = {177-188}, Title = {Socialit{`a} e salotti a Roma tra Sei e Settecento}}

\end{filecontents}

\documentclass[A4, 11pt, twoside, openright]{book} \usepackage{fontspec} \usepackage{polyglossia}
\setmainlanguage{italian}

\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}

\NewBibliographyString{ibidemloccit,ibidemnoloccit} \DefineBibliographyStrings{italian}{% editor = {a cura di}, editors = {a cura di} }

\renewcommand{\multinamedelim}{\space\hyphen\space} \renewcommand{\finalnamedelim}{\space\hyphen\space}

\renewbibmacro*{cite:title}{% Ciò che segue è per avere lo shorttitle alla seconda citazione (funge solo in trad2) \printtext[bibhyperlink]{% \printfield[citetitle]{labeltitle}% \setunit{\addspace}% \bibstring[\mkibid]{opcit}}}

%%%%%%%%%%%%%% RIDEFINISCO IL DRIVER COLLECTION%%%%%%%%%%%%

\DeclareBibliographyDriver{collection}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{maintitle+title}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{byeditor+others}% \newunit\newblock \usebibmacro{editor+others}% \newunit \printlist{language}% \newunit\newblock \printfield{edition}% \newunit \iffieldundef{maintitle} {\printfield{volume}% \printfield{part}} {}% \newunit \printfield{volumes}% \newunit\newblock \usebibmacro{series+number}% \newunit\newblock \printfield{note}% \newunit\newblock \usebibmacro{publisher+location+date}% \newunit\newblock \usebibmacro{chapter+pages}% \newunit \printfield{pagetotal}% \newunit\newblock \iftoggle{bbx:isbn} {\printfield{isbn}} {}% \newunit\newblock \usebibmacro{doi+eprint+url}% \newunit\newblock \usebibmacro{addendum+pubstate}% \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% \newunit\newblock \iftoggle{bbx:related} {\usebibmacro{related:init}% \usebibmacro{related}} {}% \usebibmacro{finentry}}

\addbibresource{archivio.bib}

\begin{document}

I first cite a collection:\

\cite{Bet:Sal} \

Then in this incollection (with crossref) I would like to get the shorttitle of the collection:

\cite{Ago:Soc}\

In other words I would like to have that shortened form:

\cite{Bet:Sal} \

\end{document}

moewe
  • 175,683
Teodoro
  • 587
  • 2
  • 9
  • I found a couple of thread approaching the issue with two different methods (namely re-defining a driver and re-defining cite): https://tex.stackexchange.com/questions/377933/how-to-print-only-editor-and-title-of-parent-entry-in-a-child-entry-in-the-bibli and https://tex.stackexchange.com/questions/172669/biblatex-avoid-redundant-information . I have been able to get my result just re - defining the driver, but I have no idea how to make it switch from the original driver to the one for the second citation..... :( – Teodoro Apr 21 '20 at 09:42
  • Mhh, what I don't get in what you describe is how a change to the @collection driver would affect @incollection citations. Indeed in the example the citation to the @incollection Ago:Soc does not change at all if I remove the new definition for the @collection driver. So on first glance I fail to see what the modified driver for @collection would have to do with this... I'm probably missing something fundamental. – moewe Apr 25 '20 at 14:18
  • Also: Do you have a bibliography at the end? What would you like to see there? What should happen if you first cite the @incollection and then the @collection entry? (Should the first citation to the @incollection use the short form in that case? Should the subsequent citation to the @collection use the short form?) – moewe Apr 25 '20 at 14:25
  • There are several possible cases. The problematic ones are (1) first citation of incollection where the collection alone has already been cited; (2) second cite of an Incollection with collection already cited. In the former case I want the long cite for the Incollection and the short for the collection; for the latter just the shortcite for the Incollection alone. – Teodoro Apr 27 '20 at 19:43

2 Answers2

0

This is an idea, but it's not really working in every case.

Moreover, it's not a very clean code and I would appreciate very much any suggestion to make it... smoother.

% !BIB TS-program = biber
% !BIB program = biber
% !TEX encoding = UTF-8 Unicode
% !TeX TS-program = xelatexmk

\begin{filecontents}{archivio.bib}

@collection{Bet:Sal,
    Address = {Venezia},
    Editor = {Maria Betri AND Mario Rossi},
    Publisher = {Marsilio},
    Shorttitle = {Salotti e ruolo femminile},
    Title = {Salotti e ruolo femminile in Italia, tra fine Seicento e primo Novecento},
    Year = {2004}}

@incollection{Ago:Soc,
    Author = {Renata Ago},
    Crossref = {Bet:Sal},
    Pages = {177-188},
    Title = {Socialitas e salotti a Roma tra Sei e Settecento}}

\end{filecontents}


\documentclass[A4, 11pt, twoside, openright]{book}%openany

\usepackage{fontspec}
\newfontfamily\russianfont[]{Garamond Premier Pro}

\usepackage{comment}                        % Per poter commentare ampie sezioni di testo con \begincomment

\usepackage{polyglossia}                        % Per le sillabazioni
    \setmainlanguage{italian}
    \setotherlanguages{english, latin, french}

%%%%%%%%%%%%%%%%%%%COMANDI DI BILIOGRAFIA%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[autostyle,italian=guillemets]{csquotes}
\usepackage{Stile_dottorato_prova3}
\addbibresource{archivio.bib}  

\begin{document}

\textbf{Collection}:\\

\cite{Bet:Sal} \\

\textbf{Then Incollection with crossref to a Collection}:\\

\cite{Ago:Soc}\\

For the Collection (after the firt citation) I need just:

\cite{Bet:Sal} \\
\end{document}

Here is the .sty:

\usepackage[autostyle,italian=guillemets]{csquotes}
\usepackage{xpatch}     
\usepackage[style=verbose-trad2,            
            language=italian,
            useprefix=true,                 
     %    giveninits=true,      nomi per esteso    
            indexing=true,
        maxbibnames=7, 
        maxcitenames=2,
            citepages=omit, 
            backend=biber,  
            ibidpage=true
        ]{biblatex} 

%\usepackage{biblatex-opcit-booktitle}      % per avere cit. nelle citazioni di book in book con crosserf o simili

\NewBibliographyString{ibidemloccit,ibidemnoloccit}
\DefineBibliographyStrings{italian}{%
     idem   = {Id\adddot},
    idemsm = {Id\adddot},
    idemsf = {Ead\adddot},
    idemsn = {Id\adddot},
    idempm = {Id\adddot},
    idempf = {Id\adddot},
    idempn = {Id\adddot},
    idempp = {Id\adddot},
  ibidemloccit   = {Ibidem}, % tolto \mkbibemph perché ho già che tutte le latinitates sono enfatiche; \autocap{i} non funziona!
  ibidemnoloccit = {Ivi},
  editor           = {a cura di},
  editors          = {a cura di}
}

\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}}}}}

\DeclareFieldFormat[article, inbook, incollection, inproceedings]{title}{\mkbibemph{#1}}    % Titolo in corsivo
\DeclareFieldFormat[article]{journaltitle}{\mkbibquote{#1}}                         % Titolo rivista tra virgolette a caporale
\DeclareFieldFormat[book, inbook, incollection, inproceedings]{volume}{#1}          % Elimina "vol."

\DefineBibliographyStrings{ngerman}{pages={p\adddot}}               % p. invece di pp. su pagine multiple
\DefineBibliographyStrings{italian}{pages={p\adddot}}
\DefineBibliographyStrings{french}{pages={p\adddot}}
\DefineBibliographyStrings{english}{pages={p\adddot}}
\DefineBibliographyStrings{italian}{volumes={vol\adddot}}               % vol. invece di voll. su volumi multipli
\DefineBibliographyStrings{ngerman}{volumes={vol\adddot}}
\DefineBibliographyStrings{french}{volumes={vol\adddot}}
\DefineBibliographyStrings{english}{volumes={vol\adddot}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%


\renewcommand*{\newunitpunct}{\addcomma\space}                              % Virgola tra le unità
\renewcommand*{\mkibid}{\emph}                                          % ibid, op cit e latinitates in enfatico
\renewcommand{\multinamedelim}{\space\hyphen\space}                         % delimitatore tra nomi. era \textendash
\renewcommand{\finalnamedelim}{\space\hyphen\space}                         % ultimo delimitatore tra nomi
\renewcommand{\bibinitdelim}{}                                              % annulla lo ~ di default tra le iniziali dei nomi

\renewbibmacro{in:}{\bibstring{in}\space}                                           % rimuove i due punti dopo "in"         
\renewbibmacro{in:}{%                                                   % rimuove "in" dagli Article
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}          


% Virgola prima e dopo Il numero della rivista in Article
\renewbibmacro*{volume+number+eid}{%
  \setunit*{\addcomma\space}% NEW
  \printfield{volume}%
% \setunit*{\adddot}% DELETED
  \setunit*{\addcomma\space}% NEW
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}  


\xpatchbibmacro{publisher+location+date}{\addcolon}{\addcomma}{}{}  % virgola tra pub, loc e date

\renewbibmacro*{cite:title}{%                           Ciò che segue è per avere lo shorttitle alla seconda citazione (funge solo in trad2)
  \printtext[bibhyperlink]{%
    \printfield[citetitle]{labeltitle}%
    \setunit{\addspace}%
    \bibstring[\mkibid]{opcit}}}

    \DeclareFieldFormat[article, inbook, incollection, inproceedings]{citetitle}{\mkbibemph{#1}}        % e che resti in corsivo


\renewbibmacro*{series+number}{%                            % Questa è la macro usata da @book per trattare le serie:
\iffieldundef{series}{}{%
  \printtext[parens]{\printfield{series}\addcomma%
  \setunit*{\addspace}%
  \printfield{number}}}%
  \newunit}                     % 


\DeclareSourcemap{                                          % Ma alla fine vedi che la SERIE la elimino proprio!!!
  \maps[datatype=bibtex]{
    \map{
       \step[fieldset=series, null]
    }
  }
}


\DeclareBibliographyDriver{book}{%                          % Il driver @book è modificato per avere prima pub+loc+year e dopo ser+num
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{maintitle+title}%
    \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{edition}%
  \newunit
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\addsemicolon\space}\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \newunit\newblock 
  \usebibmacro{pageref}%
  \newblock%\nopunct%               %%% MODIFICA MIA!tolto il \nopunct per avere virgola prima della pagina
    \usebibmacro{series+number}%
  \newunit\newblock
  \usebibmacro{finentry}}

  \renewbibmacro*{cite:title}{%                 "cit" in tondo              
  \printtext[bibhyperlink]{%
    \printfield[citetitle]{labeltitle}%
    \setunit{\addspace}%
    \bibstring{opcit}}}    

%%%%%%%%%%%%%% RIDEFINISCO IL DRIVER COLLECTION%%%%%%%%%%%%

\DeclareBibliographyDriver{collection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{maintitle+title}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \usebibmacro{editor+others}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \printfield{edition}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit
  \printfield{volumes}%
   \newunit\newblock
  \usebibmacro{series+number}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}




%%%%%%%%%% ADDENDA x risolvere la seconda citazione di una collection con crossref a incollection

\newbibmacro*{cite:seen:related}{%
 {\xifinlistcs{\thefield{crossref}}{blx@bsee@\the\c@refsection}
   {}
   {\listcsxadd{blx@bsee@\the\c@refsection}{\thefield{crossref}}}}}

\newcommand{\ifrelatedunseen}[2]{%
  \xifinlistcs{\thefield{crossref}}{blx@bsee@\the\c@refsection}
   {#2}
   {#1}}


\renewbibmacro*{cite}{%
  \usebibmacro{cite:citepages}%
  \global\togglefalse{cbx:fullcite}%
  \global\togglefalse{cbx:loccit}%
  \bibhypertarget{cite\the\value{instcount}}{%
    \ifciteseen
      {\iffieldundef{shorthand}
         {\ifciteibid
            {\usebibmacro{cite:ibid}}
            {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
         {\usebibmacro{cite:idem}}
               {\usebibmacro{cite:name}}%           author della Collection da solo (in 2a cit?)
             \usebibmacro{cite:title}}%
          \usebibmacro{cite:save}}
         {\usebibmacro{cite:shorthand}}}
      {\ifboolexpr {
         test {\iffieldundef{crossref}}
         or not ( test {\ifentrytype{inbook}}
               or test {\ifentrytype{incollection}} ) }
       {\usebibmacro{cite:full}%
        \usebibmacro{cite:save}}
       {\ifrelatedunseen
        {\usebibmacro{cite:seen:related}%
         \usebibmacro{cite:full}%
         \usebibmacro{cite:save}}
        {\usebibmacro{related:info}}}}}}

\newbibmacro*{related:info}{%
  \usedriver{}{inbook:rel}}

\newbibmacro*{author_Inc_short}{%       Definisco la macro per l'autore dell'incollection corta
{\DeclareNameAlias{author}{given-family}%
    {\printnames{author}%
       {\setunit{\printdelim{authortypedelim}}%
        \usebibmacro{authorstrg}}}
    {}}}


\DeclareBibliographyDriver{inbook:rel}{%   questo si riferisce all'incollection
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author_Inc_short}  %                     autore dell' Incollection
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
   \iffieldundef{crossref}                  % Righe aggiunte per evocare la macro di crossref
    {\usebibmacro{crossref:full}}           %       
    {\usebibmacro{crossref:label}}          %
  \newunit%
  \bibstring{opcit}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

%%%% aggiungo le macro per crossref

\newbibmacro{crossref:full}{%
    \usebibmacro{maintitle+booktitle}%
  \newunit\newblock
  \usebibmacro{event+venue+date}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit
  \printfield{volumes}%
  \newunit\newblock
  \usebibmacro{series+number}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \printlist{organization}%
  \newunit
  \usebibmacro{publisher+location+date}}

\newbibmacro{crossref:label}{%              Questo si attiva per la shortcite di una collection
  \entrydata{\strfield{crossref}}               
     {\printnames{labelname}%                   stampa autore (o curatore) dell' Incollection 
      \setunit*{\addspace}%
      \setunit*{\addcomma\space}%
      \printfield[title]{labeltitle}}}
Teodoro
  • 587
  • 2
  • 9
0

This is a workaround.

If I get rid of all that (ugly) coding of my firt answer, I still have a problem with the first citation of an incollection, if I already cited the collection alone. In this case I would like to have the long form for the incollection and the short for the collection. I managed to do it with a new cite command \citecc (it's for crossref collections)

\DeclareCiteCommand*{\citetitle}            % ridefinisco il tracking per avere la seconda citazione corretta
  { %                                       Qui c'era \boolfalse{citetracker}%   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexfield{indextitle}}
     {}%
   \printfield[citetitle]{title}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\citela}        % id est cite long author - anche qui come sopra ho tolto boolfalse x tracking
  {\usebibmacro{prenote}}               % usa il valore nel campo prenote se presente
  {\ifciteindex
    {\DeclareNameAlias{labelname}{given-family}% Ridefinisco la labelname per avere il nome lungo
    \indexnames{labelname}}         % andrà nell'indice?? verifica
     {}%
   \printnames{labelname}}          % stampa la labelname
  {\multicitedelim}                 % dividi i nomi multipli di autore con il modo definito 
  {\usebibmacro{postnote}}          % scrivi le postnote se presenti


\newbibmacro*{postnotenew}{%            Definisco una nuova macro secondo cui
  \ifnameundef{labelname}       %       Se non è specificato autore o editore
    {\hspace*{-1ex}}                %       Non voglio la virgola e compenso lo spazio vuoto lasciato dal nome
    {\printtext{\addcomma}}}        %       Se invece è specificato voglio la virgola

\DeclareCiteCommand{\citeauthornew} % normale citeauthor ma che alla fine evoca la macro \postnotenew per la virgola condizionale
  {%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   \printnames{labelname}}
  {\multicitedelim}
  {\usebibmacro{postnotenew}}


%Definisco un nuovo comando \citecc (collection-crossref) a due argomenti, la Incollection, poi la Collection di provenienza e come argomento opzionale il numero di pagina, con condizionale

\newcommand\citecc[3][]{%           Definisco comando con tre argomenti e uno opzionale
  \ifstrempty{#1}%                  Se quello opzionale è vuoto (no pagina indicata)
    {\citela{#2}, \citetitle*{#2}, in \citeauthornew{#3}  \citetitle{#3}, cit., p.~\citefield{#2}{pages}}%  succede questo
    {\citela{#2}, \citetitle*{#2}, in \citeauthornew{#3}  \citetitle{#3}, p.~{#1}, cit.}}   % altrimenti questo

Good points: it works

Bad points: (1) it's a workaraound that just produces what I need in this "exception"; (2) it needs two arguments instead of one

Again, any help would be appreciated, albeit I managed to tackle the issue... somehow.

Teodoro
  • 587
  • 2
  • 9