I am trying to add a custom 'field' to my bibtex data, and then call that. However, I am getting a very strange scenario: when I call the field mr, then it works; when I call it mrnumber, then it doesn't work. Below is a MWE.
\documentclass[]{article}
\usepackage{filecontents}
\begin{filecontents*}{ext-eprint.dbx}
\ProvidesFile{ext-eprint.dbx}[2016/09/11 extended stand-alone eprint fields]
\DeclareDatamodelFields[type=field,datatype=verbatim]{arxiv,mr}
\DeclareDatamodelEntryfields{arxiv,mr}
\end{filecontents*}
\begin{filecontents*}{\jobname.bib}
@article{AGHH:dynamic-cm,
archivePrefix = {arXiv},
eprinttype = {arxiv},
eprint = {1606.07639},
title = {Mixing Times of Random Walks on Dynamic Configuration Models},
date = {2016-06-24},
author = {Avena, Luca and G{\"u}lda{\c s}, Hakan and van der Hofstad, Remco and den Hollander, Frank},
options = {useprefix=true}
}
@article{FR:giant-mixing,
title = {The Evolution of the Mixing Rate of a Simple Random Walk on the Giant Component of a Random Graph},
volume = {33},
number = {1},
journaltitle = {Random Structures \& Algorithms},
urldate = {2018-03-22},
date = {2008-05-12},
pages = {68-86},
author = {Fountoulakis, Nikolaos and Reed, Bruce A.},
mr = {12}
}
@book{LPW:markov-mixing,
location = {{Providence, RI, USA}},
title = {Markov {{Chains}} and {{Mixing Times}}},
isbn = {978-1-4704-2962-1},
pagetotal = {xvi+447},
publisher = {{American Mathematical Society}},
date = {2017},
author = {Levin, David A. and Peres, Yuval and Wilmer, Elizabeth L.},
mr = {3726904},
}
\end{filecontents*}
\usepackage{csquotes}
\usepackage[doi=false,isbn=false,url=false,
backend=biber,
style=numeric,
datamodel=ext-eprint]{biblatex}
\usepackage{hyperref}
\addbibresource{\jobname.bib}
\makeatletter
\DeclareFieldFormat{arxiv}{%
---HOW DO I CUSTOMISE THIS??---}%\href{https://arxiv.org/abs/#1}}
\makeatother
\DeclareFieldFormat{mr}{%
{\href{http://www.ams.org/mathscinet-getitem?mr=MR#1}{MR#1}}}
\renewbibmacro*{eprint}{%
\printfield{arxiv}%
\newunit\newblock
\printfield{mr}%
\newunit\newblock
\iffieldundef{eprinttype}
{\printfield{eprint}}
{thisdoesappear\printfield[eprint:\strfield{eprinttype}]{eprint}}
}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
This prints out the following.

However, if I replace all five references to mr with mrnumber, then I get the same output just without the MR3726904 appended. I got the majority of the structure from moewe's answer to BibTeX fields for DOI, MR, Zbl and arxiv?.
As you may have noticed in the MWE, I do \DeclareFieldFormat{arxiv}{..., but whatever I put in here does not affect the output, only the thisdoesappear appears, and this is in an \iffieldundef statement. I do want to just use eprint for both arXiv and MR, because each item will have precisely one of these. I'd like to be able to customise the appearance of the arxiv part, as I have done with the MR part.
Remark. I know some of the other formatting isn't very nice, but don't worry about that: I've looked at that separately, and have just tried to put the minimal amount in for the example here.


arxivis an eprinttype, soDeclareFieldFormatwill not really work as you are trying to do it. I'm not sure I get what you want to achieve. As far as I understood, you wantmrto function as aneprinttypethe same way asarxivdoes. Is that it? – gusbrs May 09 '18 at 18:48mrvariable tomrnumber-- MathSciNet automatically outputsmrnumber, notmr, and so I don't want to have to go through all my references changing them from mrnumber to mr. Is that clearer? :) – Sam OT May 09 '18 at 20:00