Omitting shortjournal field if there is no abbreviation in the Journal glossary

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
lyndondrake
Posts: 51
Joined: Sat Jul 04, 2015 3:36 am

Omitting shortjournal field if there is no abbreviation in the Journal glossary

Post by lyndondrake »

Sorry for all the questions at the moment!

If I have a journal article from the Journal named Iraq, there's no abbreviated form of the journal name. In my BibTeX export, I have added:

Code: Select all

shortjournal = {$j}, $
to the exporter, which works very nicely when there is an abbreviation in the glossary. But for the Iraq journal, which does not appear in the glossary, the field is populated with full journal name. That makes sense as a fallback.

The problem for me is it also adds an entry to the BibTeX abbreviations list, and hence shows up in the abbreviations table I put at the start of my book.

Is there any way of having some conditional logic in the BibTeX export to only show the shortjournal field if there is a matching item in the journal glossary?
Jon
Site Admin
Posts: 10066
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Omitting shortjournal field if there is no abbreviation in the Journal glossary

Post by Jon »

j = short journal name
f = full journal name

But I don't understand the problem. If there is no abbreviation for the journal, like there is none for Nature, what do you want to appear in the export?

Jon
Sonny Software
lyndondrake
Posts: 51
Joined: Sat Jul 04, 2015 3:36 am

Re: Omitting shortjournal field if there is no abbreviation in the Journal glossary

Post by lyndondrake »

When using the shortjournal field in humanities publications, the abbreviations are often put into a table at the start of the publication. With BibLaTeX this is nice and easy to do automatically. A map is made between all the entries cited which have a shortjournal field, and their corresponding journal fields. E.g. something like this:

Code: Select all

journal = {Journal of Hellenistic Studies},
shortjournal = {JoHS},
results in this entry in the Abbreviations table:

JoHS Journal of Hellenistic Studies

So when I do my BibTeX export, I include both the shortjournal field and the journal field. This works beautifully when I

The problem I'm running into is that the shortjournal field is included *even if* there's no mapping in the glossary. I realise that's great in most circumstances - the 'long' journal name is a good failsafe. But the problem is that it BibLaTeX expects that shortjournal, if it exists, is an abbreviated journal name and so it always adds the pair to its Abbreviations map. So now my Abbreviations section at the start of my book looks like this:

Iraq Iraq
JoHS Journal of Hellenistic Studies

because the entries for articles in the Iraq journal have something like this:

Code: Select all

journal = {Iraq},
shortjournal = {Iraq},
What BibLaTeX expects in this is more like:

Code: Select all

journal = {Iraq},
That is, with no shortjournal field at all. To put it another way, shortjournal should only appear if it is an actual abbreviation of the full journal name, not if it is identical to the full journal name.

To generate a BibTeX file that corresponds with the BibLaTeX expectations for the shortjournal field, I need conditionality so that the field is only populated if it exists. My guess is that this is unsolvable with the current Bookends format system, because it would need some conditionality or special treatment of the j and f fields in the format manager.
Post Reply