The problem here is that you can't use titlept
as a custom field name. You have to use the fields that are defined by biblatex
. You might use usera
for example. Otherwise biblatex
is not able to recognize your input fields.
Example:
\documentclass{article}
\usepackage[
backend=biber,
]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book {foo,
author = {Foo, Francis},
usera = {My custom title},
title = {All about Foo},
year = {2011},
location = {Footown},
}
@book {bar,
author = {Bar, Bernie},
title = {Barstory},
year = {2000},
location = {Barcity},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\renewbibmacro{maintitle+title}{%
\iffieldundef{usera}{ % if usera is undefined
\iffieldsequal{maintitle}{title}
{\clearfield{maintitle}%
\clearfield{mainsubtitle}%
\clearfield{maintitleaddon}}
{\iffieldundef{maintitle}
{}
{\usebibmacro{maintitle}%
\newunit\newblock
\iffieldundef{volume}
{}
{\printfield{volume}%
\printfield{part}%
\setunit{\addcolon\space}}}}}
{\printfield{usera}\newunit\newblock}%
\usebibmacro{title}%
\newunit}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
For more information about custom fields in biblatex
you should read section 2.2.4 of the manual.
Currently these custom fields are supported:
name[a–c]
list (name)
Custom lists for special bibliography styles. Not used by the standard bibliography
styles.
name[a–c]type
field (key)
Similar to authortype
and editortype
but referring to the fields name[a-c]
. Not used by the standard bibliography styles.
list[a–f]
list (literal)
Custom lists for special bibliography styles. Not used by the standard bibliography styles.
user[a–f]
field (literal)
Custom lists for special bibliography styles. Not used by the standard bibliography styles.
verb[a–c]
field (literal)
Similar to the custom fields above except that these are verbatim fields. Not used by the standard bibliography styles.
titlept
as a name of a field. You have to use the fields that are defined bybiblatex
. You might useusera
for example. Otherwisebiblatex
is not able to recognize your input fields. Other possibilities can be found in section 2.2.4 of the manual. – Thorsten Jan 10 '12 at 13:17