I want to make use of a custom field in my bib file, that is not defined in my BibLaTeX data model. I wish to map this field via the usual \DeclareSourcemap construct, as explained in ยง4.5.3, to one defined in my data model, but also already in use.
Specifically, I have a @Patent entry containing the type field, which I have set to the BibLaTeX-defined patrequs bibstring. I additionally use the custom field appnumber, to encode the USPTO application number (I already use number for the USPTO patent number).
Since appnumber is not defined in my data model, and I wish to obviate having to manually do so, I want to map this to be appended to the end of the interpolated bibstring that my type would otherwise expand to.
It seems that this requires two \step commands. The following works, but appends prior to bibstring interpolation, which is perhaps obvious, but not what I wish to accomplish.
\DeclareSourcemap{
\maps[datatype=bibtex, overwrite]{
\map{
\pertype{patent}
\step[fieldsource=appnumber]
\step[fieldset=type, origfieldval, append]
}
}
}
This yields, patrequsNN/XXX,XXX instead of the desired, U.S. patent request NN/XXX,XXX.
Please find a sample @Patent entry (adapted from Sandra Mau's webpage, pretending that the US patent has yet to be granted) and an example of desired output below, as a MWE (and available on Overleaf):
@Patent{EHLINGER:2006:biblatex,
author = {EHLINGER, JR., Philip Charles},
title = {Device for the treatment of hiccups},
year = {2006},
month = {06},
day = {13},
number = {7062320},
kind = {B2},
appnumber = {10/684,114},
type = {patrequs},
url = {http://www.patentlens.net/patentlens/patent/US_7062320/},
IPC_class = {A61N 1/04},
US_class = {607 2},
}
With the above bib file saved as mwe.bib, the following should (depending upon one's style and other configurations) reproduce output similar to the below:
\documentclass{article}
\usepackage[backend=biber, style=biblatex-cse, autopunct, autocite=superscript, doi=false, url=false, isbn=false]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex, overwrite]{
\map{ % clear patent scope, obviating output of redundant info. for US patents
\pertype{patent}
\step[fieldset=location, null]
\step[fieldset=kind, null] % we include the USPTO kind codes, but do not use them
% we use the field "appnumber" to store the USPTO application number
% we simply map it to be appended to the "type" field, in the standard data model
% Adapted from: https://tex.stackexchange.com/q/454008/134641
\step[fieldsource=appnumber]
\step[fieldset=type, origfieldval, append]
}
}
}
\addbibresource{mwe.bib}
\begin{document}
\fullcite{EHLINGER:2006:biblatex}
\end{document}
This yields:
Whereas, I would like something akin to (perhaps also with some better punctuation to demarcate the appnumber from the number):
EHLINGER JR. PC. 2006. Device for the treatment of hiccups. U.S. patent request 10/684,114 7062320.
Might anyone be able to fix this such that (1) the append occurs (or is equivalent to) the result after bibstring interpolation, (2) easily adds a space between the fields (i.e. without my having to modify the underlying style), or (3) suggests some viable alternative to properly encode and typeset the USPTO application number?
