Use an existing field (part
)
If you use the part
field for tome information1, there is not a lot to be done in the standard styles. If you have a non-standard/custom style that moves around the part
information though, you would need to tell us more about it.
These four lines should do what you want. They redefine the string part to be "tomo" and print ", tomo #" after the volume.
\DefineBibliographyStrings{italian}{%
part = {tomo},
}
\DeclareFieldFormat{part}{\addcomma\space\bibstring{part}\space #1}
All the standard styles use the sequence
\printfield{volume}%
\printfield{part}%
to print part
information, so we should be fine.
(Normally, putting \addcomma
and the like in \DeclareFieldFormat
is frowned upon, but the part
field seems to be special insofar that the default format is {.#1}
and that there is no other punctuation inserted between volume
and part
by any of the standard styles.)
Your bib
entry would be
@InProceedings{bertolini:1992,
author = "Francesco Bertolini",
title = "Società di trasmissione orale: mito e folclore",
booktitle = "Lo spazio letterario della Grecia antica",
editor = "G. Cambiano and L. Canfora and D. Lanza",
publisher = "Salerno",
location = "Roma",
year = "1992",
volume = "1",
part = "2",
pages = "47--75",
}
Full MWE
\documentclass[italian]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[]{biblatex}
\usepackage{filecontents}
%\DeclareFieldFormat{part}{.#1}% physical part of a logical volume
\DefineBibliographyStrings{italian}{%
part = {tomo},
}
\DeclareFieldFormat{part}{\addcomma\space\bibstring{part}\space #1}
\begin{filecontents*}{\jobname.bib}
@InProceedings{bertolini:1992,
author = "Francesco Bertolini",
title = "Società di trasmissione orale: mito e folclore",
booktitle = "Lo spazio letterario della Grecia antica",
editor = "G. Cambiano and L. Canfora and D. Lanza",
publisher = "Salerno",
location = "Roma",
year = "1992",
volume = "1",
part = "2",
pages = "47--75",
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\cite{bertolini:1992}
\printbibliography
\end{document}

1 The biblatex
documentation states on page 21, §2.2.2 Data Fields,
part
(field (literal)) The number of a partial volume. This field applies to books only, not
to journals. It may be used when a logical volume consists of two or
more physical ones. In this case the number of the logical volume goes
in the volume
field and the number of the part of that volume in the
part
field.
Map the field to an existing field (part
)
You could also map the field tome
to part
thus creating an alias for input purposes
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=tome]
\step[fieldset=part, origfieldval]
}
}
}
The sample entry might look like this then
@InProceedings{bertolini:1992,
author = "Francesco Bertolini",
title = "Società di trasmissione orale: mito e folclore",
booktitle = "Lo spazio letterario della Grecia antica",
editor = "G. Cambiano and L. Canfora and D. Lanza",
publisher = "Salerno",
location = "Roma",
year = "1992",
volume = "1",
tome = "3",
pages = "47--75",
}
For more general purposes, biblatex
defines the five generic fields usera
to userf
(as well as lista
to listf
for lists fields and namea
to namec
for names). While it might be awkward to use these fields in the input .bib
file, where more useful names are expected, they are useful for internal remapping.
Declare a new field
If you absolutely insist on creating a new data field tome
, create a new datamodel file, tome.dbx
, with the following content and put it somewhere LaTeX can find it (this is necessary since version 2.9, before that it was possible to use datamodel commands directly in the document, but this is not guaranteed to work and therefore strongly discouraged, see Data model macro cannot be used in preamble; LaTeX will be able to find the .dbx
file if you place it in the same folder as your main .tex
document, other options to make the file globally available are discussed in https://texfaq.org/FAQ-inst-wlcf).
\ProvidesFile{tome.dbx}[2019/20/02 add tome field to biblatex data model]
\DeclareDatamodelFields[type=field,datatype=literal]{tome}
\DeclareDatamodelEntryfields{tome}
(In the MWE below this file is created automatically using the filecontents
package.)
We then have to load biblatex
with the option datamodel=tome
in order to get load the correct datamodel where tome
is defined. Alternatively, you can put the above lines into biblatex-dm.cfg
(see How to include price in bibliography?).
Again we use localisation strings
\NewBibliographyString{tome}
\DefineBibliographyStrings{italian}{%
tome = {tomo},
}
\DeclareFieldFormat{tome}{\bibstring{tome}\space #1}
We will then have to patch all the drivers/macros to include tome
information, that is quite a task...
We renew
some macros
\renewbibmacro*{maintitle+title}{%
\iffieldsequal{maintitle}{title}
{\clearfield{maintitle}%
\clearfield{mainsubtitle}%
\clearfield{maintitleaddon}}
{\iffieldundef{maintitle}
{}
{\usebibmacro{maintitle}%
\newunit\newblock
\iffieldundef{volume}
{}
{\printfield{volume}%
\setunit{addcomma\space}%
\printfield{tome}
\printfield{part}%
\setunit{\addcolon\space}}}}%
\usebibmacro{title}%
\newunit}
\renewbibmacro*{maintitle+booktitle}{%
\iffieldundef{maintitle}
{}
{\usebibmacro{maintitle}%
\newunit\newblock
\iffieldundef{volume}
{}
{\printfield{volume}%
\setunit{addcomma\space}%
\printfield{tome}
\printfield{part}%
\setunit{\addcolon\space}}}%
\usebibmacro{booktitle}%
\newunit}
And add tome to the drivers
\newcommand*{\addtometo}[1]{%
\xpatchbibdriver{#1}
{\printfield{volume}}
{\printfield{volume}%
\setunit{\addcomma\space}%
\printfield{tome}}
{}
{\typeout{failed to add tome to #1 driver}}
}
\addtometo{inproceedings}
\addtometo{book}
MWE
\documentclass[italian]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{filecontents}
\begin{filecontents*}{tome.dbx}
\ProvidesFile{tome.dbx}[2019/20/02 add tome field to biblatex data model]
\DeclareDatamodelFields[type=field,datatype=literal]{tome}
\DeclareDatamodelEntryfields{tome}
\end{filecontents*}
\usepackage[backend=biber,datamodel=tome]{biblatex}
%\DeclareFieldFormat{part}{.#1}% physical part of a logical volume
\NewBibliographyString{tome}
\DefineBibliographyStrings{italian}{%
tome = {tomo},
}
\DeclareFieldFormat{tome}{\bibstring{tome}\space #1}
\usepackage{xpatch}
\newcommand*{\addtometo}[1]{%
\xpatchbibdriver{#1}
{\printfield{volume}}
{\printfield{volume}%
\setunit{\addcomma\space}%
\printfield{tome}}
{}
{\typeout{failed to add tome to #1 driver}}
}
\addtometo{proceedings}
\addtometo{inproceedings}
\addtometo{book}
\addtometo{inbook}
\renewbibmacro*{maintitle+title}{%
\iffieldsequal{maintitle}{title}
{\clearfield{maintitle}%
\clearfield{mainsubtitle}%
\clearfield{maintitleaddon}}
{\iffieldundef{maintitle}
{}
{\usebibmacro{maintitle}%
\newunit\newblock
\iffieldundef{volume}
{}
{\printfield{volume}%
\setunit{addcomma\space}%
\printfield{tome}
\printfield{part}%
\setunit{\addcolon\space}}}}%
\usebibmacro{title}%
\newunit}
\renewbibmacro*{maintitle+booktitle}{%
\iffieldundef{maintitle}
{}
{\usebibmacro{maintitle}%
\newunit\newblock
\iffieldundef{volume}
{}
{\printfield{volume}%
\setunit{addcomma\space}%
\printfield{tome}
\printfield{part}%
\setunit{\addcolon\space}}}%
\usebibmacro{booktitle}%
\newunit}
\begin{filecontents*}{\jobname.bib}
@InProceedings{bertolini:1992,
author = "Francesco Bertolini",
title = "Società di trasmissione orale: mito e folclore",
booktitle = "Lo spazio letterario della Grecia antica",
editor = "G. Cambiano and L. Canfora and D. Lanza",
publisher = "Salerno",
location = "Roma",
year = "1992",
volume = "1",
tome = "3",
pages = "47--75",
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\cite{bertolini:1992}
\printbibliography
\end{document}
That much hassle probably is not worth it as we have part
that seems to do what you want rather well.
blx-dm.def
which comes with biblatex..tex
file will not do what you want: Currently it replaces all occurrences of\printfield{tome}
by two calls to that same macro separated by a\newunit\newblock
. But since there is no\printfield{tome}
in any of the drivers this replacement does not do anything. You could try\xpatchbibdriver{#1}{\printfield{volume}}{\printfield{volume}\newunit\newblock\printfield{tome}}{}{}
, though. But then you will have to alterbibmacros
as well.@article
driver and modified that to print tome information, but declared it to be the driver for@books
. Rewriting the entire driver just to include one field seems an unreasonable option - it's a lot of work.