Book chapter attribute

Hi everyone! Happy new year from France! I was wondering: how do you deal with Book Chapter category while using Bookends and Tinderbox? Do you create a BookChapter attribute since there is yet no such system attribute? I’d be happy to hear from your suggestions.

Hey there, I don’t understand. Yes, you can create any attribute you want. Is your question about mapping the book chapter field in bookends to a book chapter attribute in Tinderbox? If so, then, yes, yu can do this two, but it will require some action code.

After pulling an item over an item from Bookends.Take at the $ReferenceRIS attribute in Tinderbox on that note. You can then see what pattern bookends maps the book chapter to. You can then create an action code to extract the value from the $ReferenceRIS attribute and populate book chapter. I have a video on doing exactly this for Zotero.

I don’t have bookends installed, so can’t test fo you right now.

1 Like

What about the book chapter do wish to capture? Or is it the reference type? In the latter case, there is often a grey edge between whether a Journal os a book and so journal article is essentially a book chapter. Even so, the value of the RIS code ‘TY’ (type) is placed in system attribute $RefType. Note that $RefType is not included in the Displayed Attributes table for a the built-in Reference prototype.

If the Chapter number is recorded at source (not something I’ve often seen in publisher’s reference data) then you could add a user Number attribute to hold it.

The overall underlying RIS data in the Bookends drag payload is placed in $ReferenceRIS. If desired this too can be added to the Displayed Attributes for the Reference prototype.

Here is random book chapter reference I dragged from Bookends v14.1.5 as seen in the resulting note’s $ReferenceRIS:

TY  - CHAP
AU  - Yankelovich, Nicole 
ED  - Delaney, Paul
ED  - Landow, George P. 
TI  - From Electronic Books to Electronic Libraries: Revisiting “Reading and Writing the Electronic Book” 
T2  - From Electronic Books to Electronic Libraries: Revisiting “Reading and Writing the Electronic Book” 

PY  - 1991 
SP  - 133-141 
VL  - Hypermedia and Literary Studies 

CY  - Cambridge, MA, USA 
PB  - MIT Press 
SN  - 0262041197 
AB  - From electronic books to electronic libraries: revisiting “Reading and Writingthe Electronic Book”. Author: Nicole Yankelovich,

Published in book:
   Hypermedia and literary studies. pp133–141. 
N1  - Times cited: 17 
U1  - yankelovich:1991:febtel
ER  - 

You’ll notice the reference’s ‘type’ is in RIS field TY. sure enough, the note’s $RefType holds the value CHAP. How to get the more human-understandable version of this code (as seen here)?. After all, ‘Book chapter’ is so much more readable than ‘CHAP’.

Using v9.5.0+ this is easily do-able and a demo file is here: clean-ris-code.tbx (318.0 KB).

The file contains 2 specimen ‘Book chapter’ type references dragged from my Bookends and an RIS (test) file (test.ris.zip (1.5 KB)) I created from Bookends reference data and dragged into the TBX.

The heart of the process is this function in library note “TY code lookup” which using the List.lookup() operator:

function fGetTyValue(iStr:string){

	var:list vLookup = "ABST:Abstract;ADVS:Audiovisual material;AGGR:Aggregated Database;ANCIENT:Ancient Text;ART:Art Work;BILL:Bill;BLOG:Blog;BOOK:Whole book;CASE:Case;CHAP:Book chapter;CHART:Chart;CLSWK:Classical Work;COMP:Computer program;CONF:Conference proceeding;CPAPER:Conference paper;CTLG:Catalog;DATA:Data file;DBASE:Online Database;DICT:Dictionary;EBOOK:Electronic Book;ECHAP:Electronic Book Section;EDBOOK:Edited Book;EJOUR:Electronic Article;WEB:Web Page;ENCYC:Encyclopedia;EQUA:Equation;FIGURE:Figure;GEN:Generic;GOVDOC:Government Document;GRANT:Grant;HEAR:Hearing;ICOMM:Internet Communication;INPR:In Press;JFULL:Journal (full);JOUR:Journal;LEGAL:Legal Rule or Regulation;MANSCPT:Manuscript;MAP:Map;MGZN:Magazine article;MPCT:Motion picture;MULTI:Online Multimedia;MUSIC:Music score;NEWS:Newspaper;PAMP:Pamphlet;PAT:Patent;PCOMM:Personal communication;RPRT:Report;SER:Serial publication;SLIDE:Slide;SOUND:Sound recording;STAND:Standard;STAT:Statute;THES:Thesis/Dissertation;UNBILL:Unenacted Bill;UNPB:Unpublished work;VIDEO:Video recording";

	return vLookup.lookup(iStr);


} //// END FUNCTION

I know one key:value pair contains parentheses (JFULL:Journal (full);) but I’ve tested and that is not a problem for use.

The function is called via the stamp “Make RefType readable”:

$RefType = fGetTyValue($RefType);

As can be seen from the first (processed) reference, the $RefType, which was ‘CHAP’ is now ‘Book chapter’.

Now if you have downloaded the test file, try the stamp on the second reference and the RIS file.

Well, that took me longer than expected. But, useful as we now have a demo file and a few aTbRef articles have been improved (and one new article added!).

†. …and which I just added to aTbRef here.

‡. If usingTinderbox v9.0.x, change the calling line if the function from function fGetTyValue(iStr:string) to function fGetTyValue(iStr) as data-typing of function arguments was only added in v9.5.x+. Functions were added in v9+. If using an older version you could put the guts of the function into a stamp and it ought to work (Note: i’ve not explicitly tested the latter).

3 Likes

Thank you for your answers. I take time to look them carefully and I’ll post my answer.

1 Like

I see what you mean–the Bookends field for chapter is called “Title,” and “ArticleTitle” in Tinderbox.

I can’t speak to the technicalities of adding or changing this field in Tinderbox, but do note that important formatting didn’t get transferred to Tinderbox. Depending on your field/need, this may or may not be an issue.

In Bookends, the reference for a chapter looks like this:

Gelbart, N. R. (1987). The Journal des dames and its Female Editors: Politics, Censorship, and Feminism in the Old Regime Press. In J. R. Censer & J. D. Popkin (Eds.), Press and Politics in Pre-Revolutionary France (pp. 24-74). University of California Press.

Dragged to Tinderbox, all italics disappear–this may or may not take some work to fix (since the italics here don’t apply to the entire field’s text).

You could, of course, format the export of your Tinderbox reference however you want. But, on the whole, I prefer to let Bookends do the formatting.

There’s frustration in looking for too much certainty. Only within a given publisher 's or organization’s output can you expect to see some consistency of usage. The whole point of a reference manager is to deal with the often incompletely specified ‘formats’ demanded by publishers.

I think that is to misunderstand the logic. A reference in Bookends is a database record (the app’s Help file gives more detail of field names). The ‘Title’ is broadly the name of the item being recorded. The type pop-up in Bookends tells the database what sort of item the record is. If you change a record’s type you will notice some of the UI fields change their name—or rather the UI label for the underlying field changes.

As in Tinderbox the title has long meant the title of a note (stored in $Name), having a $Title attribute would confuse user, especially as only a small proportion of Tinderbox contain references. Having $ArticleTitle to hold the ‘title’ of the Bookends-derived data thus makes sense.

Indeed, but the point of dragging a reference, i.e. a Bookends database record into Tinderbox is to pass the record’s fields of data into Tinderbox. What is added to $Text is a plain text [sic] version of the Bookends formatted source.

If you just want the latter you don’t necessarily need the whole reference. You can just show the formatted reference pane in Bookends and then select the styled reference text and either copy/paste or drag/drop into Tinderbox:

As to what needs italics or not, look at Bookends’ menu BiblioFormats Manager…:

The latter is not a task I’d expect to do in Tinderbox.

I’ve run into this before. Ultimately, I’ve defaulted to Pandoc can CSL files to help me with the final output of references. In Tinderbox, I’ve found that I rarely need perfectly formatted references, as the perfectly formatted reference for me has little value. In Tinderbox, I need the names, dates, citation keys, etc. The formatting is unnecessary during the thinking stage and is dealt with automatically at the end of my contribution process.

1 Like

Thanks for your answers and suggestions. The project I’m working on — a timeline with my research activities — implies that I make a clear distinction between article field and book chapter field. In the following screenshot as in the example @mwra provided, as you already know, the article field comes instead of book chapter field.

It’s convenient, since I can drag directly my references from Bookends, but, in Tinderbox, it’s a little bit confusing for me. I could create a user attribute which would be ChapterTitle, but it wouldn’t be coherent with Bookends. There, “Title” means Chapter title.

Bookends

Ideally, I should be able to use a title attribute, but, as Mark Anderson pointed it, it’s not possible. I’m not a computer engineer, so, I don’t have any idea if there’s here a solution. If I want to assign a specific color for each kind of field, there shall be necessary a visual confusion between article and chapter since both will have the same colour, haven’t they?

The solution would be to use action code to parse and pull the value from bookends into the appropriate. I have a video and sample file for doing this with Zotero: Tinderbox Lesson - Working with Tinderbox & Zotero - YouTube. Will be a similar process for bookends.

But, I fear you misunderstand the process. In Bookends the ‘Title’ to which you refer is an _on-screen label that can change according to the article type you select (book, book chapter, proceedings, etc. As it happens, I think all reference types in Bookends use the same field & label for the items name/title.

So in Bookends, if the item is of type ‘book chapter’ the underlying Bookends database field that stores the proximate name of the item in the database’s Title field. You can see this in the Bookends preferences:

If the type is a ‘newspaper article’ the headline of the article goes into … the same Title field:

The (Bookends) database’s job is to provide the discrete parts a reference to the formatting manager. When Bookends loads data into a drag operation, it passes some information in RIS format inside which the database Title field is set as the value of the T1 RIS regardless of the source article type. The article’s type is the value of Bookends’s Type and is passed as the RIS TY value.

So the information Tinderbox gets is a title (RIS field T1) which goes in the Tinderbox attribute $ArticleTitle (so essentially the same as Bookends’s behaviour). RIS field TY data is written to the Tinderbox attribute $RefTitle. This happens regardless of the type of reference being passed. So, if the title of a ‘book chapter’ in Bookends is “XYZ”, this will be the $ArticleTitle in Tinderbox.

So, for a ‘book chapter reference’ what are you expecting to appear in $ArticleTitle, if not the title (i.e. chapter title) of the reference? Having a differently-named attribute for the title of each reference type would be overkill (there are >30 types!). Indeed, Bookends doesn’t have that: it just puts the reference’s title in the Title database field.

This suggests there is a hidden problem here of some information you are expecting but not getting. If so, what is it? How does the name of the chapter differ when referred to as a title?


I’m making an assumption that Tinderbox is setting it’s fields based on the dragged-data’s RIS component, although I’ve not seen this confirmed anywhere. Getting a (plain-text) version of the reference in a particular target format is incidental.

Reference formats are complex and generally poorly/incompletely documented by their ‘owners’. Like make Reference Managers Bookends has 10s (100s) of formats (see the Format Manager in Bookends). Even then I’ve found I need to extend those—because most publishers seem to be unaware of the advent of computers and describe their format only in the context of paper/print. It’s a mess. Lucky is the person who only has to deal with one format/publisher!

I’m not sure if that has helped! :slight_smile:

I’m going to take a look at that video.

Yes, of course it helps! … but, as you can see on the bookends screenshots, there is, — I apologize if I insist on this point — a clear distinction between Title field and Book title field in Bookends and RIS format uses Title 1 and Title 2 to distinguish them.

ris

That’s the reason why I was wondering if it would be possible for Tinderbox to create a specific title — a chapter book system attribute — in order to be congruent with this categorization. If it’s not, and I imagine how complex is must be, I’ll create an ad hoc attribute. That’s what Tinderbox is designed for, isn’t it?

I’ve got a cold, so I’ve just been skimming over this, but I’m not sure I understand the difficulty.

Tinderbox 9.x added LOTS of tools to make it (fairly) easy to adapt RIS parsing to individual needs. In this case, if I follow, you want to grab the value of T2 and put it in a user attribute ChapterTitle. You can do this is several ways:

  1. The old way: do a regex on $ReferenceRIS to extract the T2 line, and save the back reference in $ChapterTitle.

  2. Use $ReferenceRis.extract(“T2. - (.*)”) . This is a little easier and clearer that the old style, but still uses Regex.

  3. Use the streaming methods. $ReferenceRIS.skipTo("T2. - ").captureLine("ChapterTitle"). I think this is both the easiest and clearest approach.

One thing to watch in RIS parsing is that the tag (T2) is followed (if I recall correctly) by exactly two spaces (not a tab), the a hyphen, then exactly one space. It’s easy to get that wrong. The RIS (File Format) Explained | MSK Library Blog

I suspect I’m missing the entire point — this cough is a bother — but I thought it was time to chime in.

Thanks for that clarification. Bookends is placing the contents of its ‘Short Title’ field into RIS T2. Modifying my earlier test RIS file (above) so that T2 now holds the value “A short title”, I can see that RIS T2 maps into $BookTitle. Interestingly, the Bookends ‘Book Title’ field is mapped a ‘v’ in the Bookends fFormat Manager which exported to RIS code V. Tinderbox map the latter, to $Volume … which is not expected.

However, and assuming I’m correct that Tinderbox is using RIS fields for mapping data, then this might need adjustment in Tinderbox. Those mappings are not exposed so I’ve no way of telling if Tinderbox adjust RIS → Tinderbox attribute mapping depending on the article type (RIS TY). One for @eastgate.

That said, which part of reference data goes where is, essentially more fluid than we imagine. Bookends lets you control mapping of Bookends fields to RIS files. Even if not configurable in Tinderbox, it might help to know which RIS code(s) are hardwired to which Tinderbox attributes. The easy one are easy, the less common codes and how many are mapped is less easily guessed. :slight_smile:

I suspect you may be able to resolve some of this by editing your Bookends RIS formats. It looks scary (I remember my first changes in the Format Manager. But there of over in the Bookends forums I’m sure we can help if you can state the problem of “I want Bookends field X to going to RIS code Z” working back from what we know of RIS to Tinderbox mapping. For instance if you were to map the RIS ‘Book Chapter’ in Bookends settings (they are impressively fine grained) for RIS code T2 from ‘$s’ to ‘$v’, then only book-chapter-type references would load the T2 RIS field with the Bookends book title (instead of the current Bookends short title) knowing that T2 maps to $BookTitle.

Just got some useful help from Jon, Bookends’ ever-helpful dev. I’m reminded we can make custom formats and theres are shareable. Yay! I need to experiment but I might be able to make a ‘demo’ so to speak, of the suggestion above.

OK, like this:

with a result like this:

I have to leave now but I’ve a few extra notes (later) for if you mess up with the format - no fear you won’t break Bookends!

1 Like

…and if you do mess up the customisation, Bookends’ devwrites:

It’s even simpler. Just select the bolded title (bold = it’s a custom format) and press the Delete key. Bookends will offer to move it to the Trash. Click Move To Trash and the original format will appear (in plain text). No need to quit and relaunch Bookends.

For instance:
Format: 'RIS.fmt' 2023-01-05 19-33-16

Then:

HTH :slight_smile:

Thank you so much for your suggestions! I adjust my file and show you the result immediately afterwards: dans la foulée in French.

1 Like

Actually, this thread has been really interesting. We like/want formats to be clear and hard-edged. In fact most are ad hoc and incomplete. Plus, the publisher (book , journal, organisation, etc.) holds the power. So what ‘rule’ to follow is only part of the problem with references. So, trying to ‘just’ get references to look like the publishers incomplete example(s) can be problematic.

We’ve talked about Bookends here, but the bridge process is RIS data (as is ‘hidden’ in a reference drag from Bookends). But other reference managers can export RIS (see a partial list) so the issue is potentially wider.

If nothing else, it has been interesting revisiting the internals of Bookends and being reminded that Bookends is another small shop with an attentive developer with a deep knowledge of their subject area.

[edit] Footnote: I was amazed to find the Bookends defines 303 (yes!) discrete formats, and all user editable if necessary. They will all be there for a reason. No wonder referencing is such a mess. :open_mouth:

1 Like