Re: Formattazione autore con @incollection (biblatex)

#99014
Up
0
Down
::


Ora dovremmo esserci:
`\begin{filecontents}{\jobname.bib}
@inbook{ kuhn:1980,
author = “Thomas Kuhn”,
title = “Logica della scoperta o psicologia della ricerca?”,
crossref = “lakatos:1980”,
}

@book{ kuhn:1981,
author = “Thomas Kuhn”,
title = “La rivoluzione copernicana”,
publisher = “Einaudi”,
location = “Torino”,
year = “1981”,
edition = “3”,
}

@book{ kuhn:1982,
author = “Thomas Kuhn”,
title = “La struttura delle rivoluzioni scientifiche”,
publisher = “Einaudi”,
location = “Torino”,
year = “1978”,
edition = “4”,
}

@book{ kuhn:1985,
author = “Thomas Kuhn”,
title = “La tensione essenziale”,
publisher = “Einaudi”,
location = “Torino”,
year = “1985”,
}

@book{ kuhn:2000,
author = “Thomas Kuhn”,
title = “Dogma contro critica”,
publisher = “Cortina”,
location = “Milano”,
year = “2000”,
}

@book{ kuhn:2008,
author = “Thomas Kuhn”,
title = “Le rivoluzioni scientifiche”,
publisher = “Il Mulino”,
location = “Bologna”,
year = “2008”,
}

@book{ lombardi:1991,
author = “Tiziana Lombardi”,
title = “Thomas Kuhn e la ricerca storiografica relativa alla
rivoluzione copernicana”,
publisher = “Gruppo Editoriale Internazionale”,
location = “Roma”,
year = “1995”,
}

@book{ lakatos:1980,
title = “Critica e crescita della conoscenza”,
editor = “Imre Lakatos and Alan Musgrave”,
publisher = “Feltrinelli”,
location = “Milano”,
year = “1980”,
edition = “3”,
}

@inbook{ masterman:1980,
author = “Mary Masterman”,
title = “La natura di un paradigma”,
crossref = “lakatos:1980”,
pages = “129-163”,
}
\end{filecontents}

\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{csquotes}
\usepackage[
backend=biber,
style=philosophy-verbose,%
firstinits=true,
sorting=nyt]
{biblatex}

\addbibresource{\jobname.bib}

\makeatletter
\newbibmacro*{usedriver:book}{%
\renewbibmacro*{bbx:savehash}{}%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{edition}%
\newunit
\printfield{volumes}%
\newunit\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\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}%
}

\newbibmacro*{usedriver:collection}{%
\renewbibmacro*{bbx:savehash}{}%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{editor+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\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{\addsemicolon\space}\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\newunit\newblock
\usebibmacro{pageref}%
}

\DeclareCiteCommand{\bbx@crossref@inbook}%
{}%
{\ifciteseen{%
\ifthenelse{\value{listtotal}=2}%
{\printnames[][-\value{maxnamesincross}]{labelname}}%
{\printnames[][-\value{minnamesincross}]{labelname}}%
\setunit*{\addcomma\space}\printtext{%
\printfield[citetitle]{labeltitle}%
\iftoggle{cbx:commacit}{\setunit{\addcomma\space}}%
{\setunit{\addspace\midsentence}}%
\bibstring{cited}}}%
{%
\DeclareNameAlias{sortname}{default}%
\usebibmacro{usedriver:book}%
}%
}%
{}%
{}%

\DeclareCiteCommand{\bbx@crossref@incollection}%
{}%
{\ifciteseen{%
\ifthenelse{\value{listtotal}=2}%
{\printnames[][-\value{maxnamesincross}]{labelname}}%
{\printnames[][-\value{minnamesincross}]{labelname}}%
\setunit{\addspace}%
\usebibmacro{editorstrg}%
\setunit*{\addcomma\space}\printtext{%
\printfield[citetitle]{labeltitle}%
\iftoggle{cbx:commacit}{\setunit{\addcomma\space}}%
{\setunit{\addspace\midsentence}}%
\bibstring{cited}}}%
{%
\DeclareNameAlias{sortname}{default}%
\usebibmacro{usedriver:collection}%
}%
}%
{}%
{}%
\makeatother

%%% ridefinisco il formato per usare il numero dell'edizione in apice
\DeclareFieldFormat{edition}{%
\ifinteger{#1}
{\textsuperscript{#1}}
{#1\isdot\setunit{\addcomma\space}}}
%% imposto l'ordine (e i separatori) dei dati
\renewbibmacro*{publisher+location+date}{%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\printlist{location}%
\setunit*{\space}%
\usebibmacro{date}%
\printfield{edition}%
\newunit}
%% elimino la prima occorrenza del campo “edition”
\usepackage{xpatch}
\newcommand{\replaceedition}[1]{%
\xpatchbibdriver{#1}
{\printfield{edition}%
\newunit}
{}%
{}
{\typeout{failed to patch driver #1}}
}
\replaceedition{book}
\replaceedition{collection}
\replaceedition{inbook}
\replaceedition{incollection}
\replaceedition{manual}
%% aggiungo le specifiche per philosophy-verbose
\xpatchbibmacro{incollection:full}
{\printfield{edition}%
\newunit}
{}%
{}
{}
\xpatchbibmacro{inbook:full}
{\printfield{edition}%
\newunit}
{}%
{}
{}
\xpatchbibmacro{usedriver:collection}
{\printfield{edition}%
\newunit}
{}%
{}
{}
\xpatchbibmacro{usedriver:book}
{\printfield{edition}%
\newunit}
{}%
{}
{}
\begin{document}

\nocite{*}

\printbibliography

\end{document}`

Ciao
Ivan

Go to top