In one of my report, I need to differentiate several "type" of thesis, which are basically Law PhD thesis and a special one, called "Thèse d'habilitation", which is a pre-requisite to become "full" Law Professor in some Swiss Universities. This is a follow-up from my previous question
The entry should only differ by the bibliography entry, meaning that the type should be :
- Plain thesis : "Author first, Title, Thèse City Year"
- These d'habilitatiom should be : "Author first, Title, Thèse d'habilitation City Year"
My analysis
So I've bumped on the type redefinition of biblatex documentation, page 13 (2.1.2 Type Aliases) and my problem is basically to create new Type alias and link the "type" field to the right entry. That's what "biblatex" does with the "alias type" phdthesis and master thesis, which is : - Link to the thesis entry type - Define the field "type" with a default string
But I'm stuck with what I've identified as being the code used in biblatex.cfg file :
% ------------------------------------------------------------------
% Driver sourcemaps
% ------------------------------------------------------------------
\DeclareDriverSourcemap[datatype=bibtex]{
\map{
\step[fieldset=day, null]
}
\map{
\step[typesource=conference, typetarget=inproceedings]
\step[typesource=electronic, typetarget=online]
\step[typesource=www, typetarget=online]
}
\map{
\step[typesource=mastersthesis, typetarget=thesis, final]
\step[fieldset=type, fieldvalue=mathesis]
}
\map{
\step[typesource=phdthesis, typetarget=thesis, final]
\step[fieldset=type, fieldvalue=phdthesis]
}
\map{
\step[typesource=techreport, typetarget=report, final]
\step[fieldset=type, fieldvalue=techreport]
}
\map{
\step[fieldsource=hyphenation, fieldtarget=langid]
\step[fieldsource=address, fieldtarget=location]
\step[fieldsource=school, fieldtarget=institution]
\step[fieldsource=annote, fieldtarget=annotation]
\step[fieldsource=archiveprefix, fieldtarget=eprinttype]
\step[fieldsource=journal, fieldtarget=journaltitle]
\step[fieldsource=primaryclass, fieldtarget=eprintclass]
\step[fieldsource=key, fieldtarget=sortkey]
\step[fieldsource=pdf, fieldtarget=file]
}
}
First, I've tried to declare some new field in my custom lbx file, as showed in the other question I had. This gave me :
biblatex-xawi.lbx
\DefineBibliographyStrings{french}{typethesis = {Thèse}}
\DefineBibliographyStrings{french}{typethabilitation = {Thèse d'habilitation}}
And I've added a copy-paste of the biblatex source :
biblatex-xawi.bbx
\DeclareDriverSourcemap[datatype=bibtex]{
\map{
\step[typesource=thesedroit, typetarget=thesis, final]
\step[fieldset=type, fieldvalue = typethesis]
}
\map{
\step[typesource=thesehabilitation, typetarget=thesis, final]
\step[fieldset=type, typethabilitation = phdthesis]
}
}
But as before, I'm not really gifted with the Biblatex style creation, as I'm having an error :
Package xkeyval Error: `typethabilitation' undefined in families `blx@sourcemap@step'.
See the xkeyval package documentation for explanation.
Type H <return> for immediate help.
...
l.116 }
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
My questions
Question 1 : in general, how can I create "simple" alias, for example redirecting my entry type "ouvragegeneral" to a "book" type (in order to help by users).
Question 2 : if I need to create alias and do some "piping" how can I create my 2 thesis types ?
Accepted answer & feedback
The error returned was that my custom string being defined but not See other question&answer here

thesisinstead ofmythesis, a sourcemap could be used to make sure that a@thesiswithout a specifictypefield always getstype = {thesis}and you could of course recreate what Biber does for@phdthesisfor@habilthesisas well: https://gist.github.com/moewew/5217d7a0aa8622db971739ad758d4145 – moewe Apr 24 '18 at 19:36mythesisI was trying to illustrate the mechanism on how an arbitrary bibstring, as long as it is defined, is sufficient. And yes, we could have the entrytype with the sourcemap, and this was requested by the OP. But I feel it is unnecessary and would not help the portability of the bib file, thus my recommendation to use plain@thesis. – gusbrs Apr 24 '18 at 19:43thesistypefor thethesisentrytypemay well qualify as a "tongue twister". :) – gusbrs Apr 24 '18 at 19:58\DeclareStyleSourcemapcan only be used with Biber and makes Biber pre-process your.bibfile as desired. – moewe Apr 25 '18 at 07:54\DeclareStyleSourcemapon thebiblatexlevel. That would definitely mean more work, it would be less elegant and it might not behave as expected in all cases. Nowadays everyone should be using Biber as backend anyway (BibTeX is considered a legacy backend, even thebiblatexdocumentation assumes you use Biber). So there is no point to restrict yourself tobiblatex-level commands when Biber can do it for you much quicker. – moewe Apr 25 '18 at 08:37@thesisand populate itstypefield yourself with the appropriate strings (thesis,phdthesis,habilthesis) - this is essentially what the answer here does. – moewe Apr 25 '18 at 08:47