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