Re: Lo stile bibliogafico migliore del mondo

#36043
Up
0
Down
::


Ho provato a creare qualcosa che si avvicina allo stile che ha proposto Lorenzo. Io però non conosco il linguaggio di BibTeX quindi mi sono cimentato con biblatex.
Riporto un codice minimale. Come si vede ho solo “ridefinito” la macro author e la lunghezza \bibitemsep. In realtà si tratta di un primo (rozzo) tentativo di ottenere il risultato voluto. La macro originale si trova nel file authoryear.bbx, contenuto nella cartella di biblatex. Probabilmente fare le cose a regola d’arte è molto più complicato. Spero che questo possa essere un utile inizio.

`\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[german,italian]{babel}
\usepackage[%
style=authoryear,
natbib
]{biblatex}

\bibliography{examples}

\makeatletter
\setlength{\bibitemsep}{.5em}

\renewbibmacro*{author}{%
\ifthenelse{\ifuseauthor\AND\NOT\ifnameundef{author}}
{\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND
\NOT\iffirstonpage}
{}
{\savefield{fullhash}{\bbx@lasthash}%
\vskip.5em plus 2pt minus 2pt
\hskip-\bibhang
\printnames{author}%
\par\vskip1em plus 2pt minus 2pt
\hskip-\bibhang
\iffieldundef{authortype}
{}
{\setunit{\addcomma\space}}}%
\iffieldundef{authortype}
{}
{\usebibmacro{authorstrg}%
\setunit{\addspace}}}%
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\setunit*{\addspace}
}%
\usebibmacro{year+labelyear}}
\makeatother

\begin{document}

\citep{Knuth:ct},
\citet{Knuth:ct:a},
\cite{Knuth:ct:b}.

\nocite{*}
\printbibliography
\end{document}`

questo è il file examples.bib:

`@book{knuth:ct,
Annotation = {A five-volume book cited as a whole. This is a \texttt{book} entry, note the \texttt{volumes} field},
Author = {Knuth, Donald E.},
Hyphenation = {american},
Indexsorttitle = {Computers & Typesetting},
Location = {Reading, Mass.},
Publisher = {Addison-Wesley},
Sorttitle = {Computers & Typesetting},
Sortyear = {1984-0},
Title = {Computers \& Typesetting},
Volumes = {5},
Year = {1984–1986}}

@book{knuth:ct:a,
Annotation = {The first volume of a five-volume book. Note the \texttt{sorttitle} and \texttt{sortyear} fields. We want this volume to be listed after the entry referring to the entire five-volume set. Also note the \texttt{indextitle} and \texttt{indexsorttitle} fields},
Author = {Knuth, Donald E.},
Hyphenation = {american},
Indexsorttitle = {The TeXbook},
Indextitle = {\TeX book, The},
Location = {Reading, Mass.},
Maintitle = {Computers \& Typesetting},
Publisher = {Addison-Wesley},
Shorttitle = {\TeX book},
Sorttitle = {Computers & Typesetting A},
Sortyear = {1984-1},
Title = {The \TeX book},
Volume = {A},
Year = {1984}}

@book{knuth:ct:b,
Annotation = {The second volume of a five-volume book. Note the \texttt{sorttitle} and \texttt{sortyear} fields. Also note the \texttt{indexsorttitle} field},
Author = {Knuth, Donald E.},
Hyphenation = {american},
Indexsorttitle = {TeX: The Program},
Location = {Reading, Mass.},
Maintitle = {Computers \& Typesetting},
Publisher = {Addison-Wesley},
Shorttitle = {\TeX},
Sorttitle = {Computers & Typesetting B},
Sortyear = {1984-2},
Title = {\TeX: The Program},
Volume = {B},
Year = {1986}}
`

Ciao
Ivan

Go to top