This is a short follow-up article to expand on two issues which I raised in my previous article about references, in the light of the expert help provided by Mark Anderson, in his comment there and by email to me.
Using existing References attributes
I fell foul of a scripting side-effect and became confused!
You can use the attributes listed in the References group, but have to be careful that the $Authors attribute is not text, but a list. My error was in trying to concatenate that list with the other attributes as if they were all text,
$Text=$Authors+" ("+$PublicationYear+") "+$ArticleTitle+". "+$Journal+" "+$Volume+"("+$Issue+"): "+$Pages+"."
If you do that, Storyspace sees the $Authors list first, which comes in standard list format using a semi-colon delimiter, and then concatenates the other attributes to it as a (growing) list. So in formatting that list for the Text, using that rule, it was generating a list like
Adrian A;Brown B;Bloggs ZF;1980;Sharks I have known;Marine Biology;80;1;1-80
So the first step must be to unpack the $Authors list and replace its semi-colons, making it plain text, and everything else then concatenates fine:
$Text=$Authors.format(", ")+" ("+$PublicationYear+") "+$ArticleTitle+". "+$Journal+" "+$Volume+"("+$Issue+"): "+$Pages+"."
The only snag is that the list of authors stored in $Authors must be a list, such as
Adrian A;Brown B;Bloggs ZF
and being really smart and turning that into
Adrian A, Brown B & Bloggs ZF
requires further clever code!
You can of course work around this by using a User (custom) attribute to store the list of authors exactly how you want them to appear, and then using the other References attributes for the rest of the reference.
Getting references to drop you back where you came from
Here is an illustrated example of what Mark has explained, using aliases. I have started with the Storyspace 3 TBX file which I reached at the end of that article, as provided for download there, and again here: notesrefs1
Create two additional parts to the main thread of the text, at the top level of the document, named MainThread2
and MainThread3
. Add some sample text to each which cites the same reference as that cited in MainThread1
. Link these together using plain links, so that you read them in sequence.
Now open the refs
container, and locate the reference which you created there. Select it, and use the Make Alias command in the Edit menu to make an alias of it. The alias will then be placed with the original, but lack link arrows, and its title is shown in italics. Move that alias down, select the original reference again, and make another alias, which you should place below the other two icons.
The top reference remains correctly linked to the MainThread1
writing space. Now repeat the process you used to create its links, connecting MainThread2
with the first alias, and MainThread3
with the lowermost alias. In each case, ensure that a text link takes the reader out to the reference, and a plain link takes them back.
If you make a mistake with a link, there are several ways in which you can edit or remove that incorrect link: my favourite is to Control-click the icon in the Map view to bring up the contextual menu, and select the Browse Links… command from there.
Once you are happy, go back to the top view of the document, switch to Read mode, select MainThread1
and try each reference out.
Here is my updated file for download: notesrefs2
Am I happier now?
Yes. This is not a kludge or workaround, but a sound implementation of scientific-style references. It has two apparent disadvantages: first, it takes time to implement each alias and to link it up, and second that every citation of a reference will require its own original or alias in the list of references.
If you have followed this workthrough, you will have seen that Storyspace 3 (and Tinderbox) have extremely efficient interfaces which make tasks like this – once you know how to do them – quick and accurate. If you are working with dozens or even hundreds of citations, you will need to maintain good order and work systematically, but the tools work excellently.
For simple references as shown here, having an alias for every citation can result in a large number of writing spaces and aliases to represent all the citations.
If you are worried about that, there is another solution which can simplify the whole references issue: rather than linking out and back for every reference, put your list of references in a single writing space and let the reader browse that to see the full details. The main thread only need cite each reference in a suitable way, perhaps using the Adrian A, Brown B & Bloggs ZF (1980) format. In hypertext, this is far easier to use than in print, as the list of references can be left open by the curious reader, for rapid access.
This takes us neatly back to the original question in the previous article, how we design the document in the first place.
Thank you again, Mark, for producing an elegant and simple solution.