0
Answered

Grouping by year for biblatex format

Dietmar Winkler 3 years ago updated 3 years ago 14

I have  list of bachelor and master theses that I display on my webpage thanks to bibbase. The problem is that if I want to group them by "year" then I need to generate my bib file in bibtex format which actually has the "year" field. Unfortunately the bibtex format has no support for @thesis and then "type=Master's Thesis" but always uses either @phdthesis or @mastersthesis which both get rendered as "Ph.D. Thesis" by bibbase.

Solution would be to switch to biblatex formatted bib file. However that one does not contain the "year" field after which one can group but the "date" field instead.


So my question is, is there a workaround that allows me to use the biblatex format but sill group by year?

Answered

Hi Dietmar,

We actually have proper support for all three types of theses by now, but it seems we haven't yet added that to our documentation.


See this comment in the thread where it was requested to learn more: https://bibbase.userecho.com/en/communities/1/topics/295-add-support-for-bachelors-theses#comment-843. You can see it in action here: https://kbsg.rwth-aachen.de/~hofmann/pages/teaching.html#teaching.

The problem is that Zotero exports "thesis" types as @phdthesis by default when selecting bibtex and as @thesis when using biblatex. So if I want the grouping by year I need to choose bibtex format it seems and hence would need that bibbase still checks the type field also for @phdthesis items. Would this be possible?

It actually already does.

Unfortunately not. I just double checked. It could have to do with Zotero exporting "Master's Thesis" in the type field to

type = {Master's {{Thesis}}}

Which then bibbase does not recognise. Which strings is bibase matching? 

"Master's Thesis" is not an item type in Zotero. I only see Thesis. And yes, I've double checked, too. The following is what I used to verify:

OK slight misunderstanding here. "*Item* Type" in Zotero I always have "Thesis" (which becomes @phdthesis in bibtex and @thesis in biblatex export).  As for the "Type", this is a simple text field in Zotero, so one can define whatever one likes. That's why I asked what the correct strings are that bibbase needs and gets triggered on. So now from your screenshot I guess I need to put "mathesis" or "phdthesis" in there. Are there other strings that bibbase regognises?

I've run a test and as you can see nothing gets recognised by the bibbase rendering :-( 

The next problem now is that Zotero changes "mathesis" to "Mathesis" in the bibtex export. Not sure if bibbase is parsing case sensitive or not.

Searching answer

We are making good progress narrowing this down. The reason why you are seeing different results than me is actually for another reason: Your four publications all have the same bibbaseid (generated from title, year, and author names). What you are seeing is actually just the last one rendered four times. This is a known issue but almost never happens in practice because, well, most people don't publish different papers with the same title in the same year and with the same authors.

And yes, bibbase will not recognize Bathesis, only bathesis. But my test with Zotero shows that setting the type field to 'bathesis' in zotero, results in the same 'bathesis' in the exported bibtex.

So I updated the test but it will still not follow your diagnosis.

In zotero I have now:

which upon export to betterbibtex (normal bibtex does not work since it does not have the type field at all) becomes:

` type = {Mathesis}` so it get's uppercased.

As for the minimal example, I've changed all titles and years in order to make them unique and made the last item of type 'bathesis'. Still every entry (including the last one) is rendered as Ph.D. thesis:

I'm confused about the data flow you want. You seem to be manually exporting bibtex from Zotero. Is that the plan going forward? If so then you can directly change it to @thesis and use type = {bathesis}. If you let BibBase fetch it from Zotero then you should be getting the same result as me.

As we have established in a different thread I don't want bibbase expose my whole Zotero database. Hence I continued to investigate the alternative of hosting a bib file which bibbase renders. Zotero, or rather betterbib(la)tex offers the functionality of auto export. So I've selected the two collections I like to get presented on my webpage and whenever I make a change in Zotero the exported bib files get automatically sychronised. 

That process now seems to have uncovered some problems when it comes to Bibbase's rendering of user-provided public, bibfiles. That is what this thread is basically about. Does this make sense now?

So I don't export or edit the bibfiles manually but are dependent what Zotero's export gives me. And that is what I have described so far.

(ma|ba)thesis gets exported as (Ma|Ba)thesis

and type thesis will become @phdthesis in bibtex files.

Answered

Got it thanks. Yeah, that won't work. We will not be able to support alternative automation pipelines. Unless you want to add some transformations into your synchronization scripts such that these special, non-standard bibtex features we've added to BibBase will be handled the same way, then the result will not look the same.

OK I understand. But the question is what IS supported. Since there seem to be conflicting information of what gets rendered how.

The alternative is switching to biblatex export but here I have to come back to my very first question: Is there a way to group by year when biblatex only contains the date field and not the year field like bibtex.

+1

I finally found a solution that works for me for now and thought to share it. In Zotero if one specifies "Item type" Thesis *and* "Type" `mastersthesis` (mind `mathesis` will not work) then the bibtex export generates `@masterthesis`.

I have not yet found a solution for Bachelor Theses but have currently also no need for those.