Tinderbox Forum

Displaying Abstracts from RIS Import

I am trying to import from Zotero to Tinderbox via a RIS file

I am using a Command-Option drag

The citations are imported but the abstract does not appear automatically in the lower pane below - I need to copy/paste it. How do I get this to populate automatically with the Abstract?

At this point your first check should be that the source RIS file contains Abstract data.

If unsure how to do this, give the RIS file an a ‘.txt’ file extension and upload it here.

Unless the source RIS file has abstract data (never assume content) Tinderbox can’t use it.

If you are sure the source data has abstract data but isn’t redendering as expected, look at the encoding of data, especially is nor simple/un-accented text.

Yes the abstract data is there - see my screen printout

I can copy paste it to the big pane and it is fine - how do I configure it to do that automatically?

The “big pane” is the $Text of the note. After your drag and drop, the abstract field of the .ris file is going into the $Abstract attribute of the Tinderbox note, which is what you would expect. If you want the abstract in the $Text of the note you could make a stamp or an edict that would copy it there from $Abstract. It is worth getting to know the Tinderbox terminology and representation of attributes.

1 Like

Great idea. Here is an illustration of the stamp.Also, reduce duplicate data, see how I firt moved the $Abstract data to $Text and then told TBX to clear $Abstract.

1 Like

In a related question, is there a way to display other attributes in the same way as $Text? For instance, if I were to use $Abstract for the abstract of a paper and $Text for my own notes, what would be the easiest way to see both simultaneously?

If the OP is going to do a lot of this, then rather than a stamp I would drag the references into a container (let’s say “Imported References”), and have an agent in the note to fix the text of the imported references (lets say the agent is “Fix Text”).

The agent query would be

descendedFrom("Imported References") & $Abstract

and the agent action would be as @satikusala suggested

$Text=$Abstract;$Absract=;

A query such as $Abstract is shorthand for "if there is a value assigned to the attribute $Abstract then the query is TRUE, else it is FALSE".

This agent is self-limiting. The final action in the agent ($Abstract=;) makes sure that a note will not match the query once the text has been moved into $Text.

3 Likes

I would use the Preview pane for this. For example, create a template like this

Text: ^text^ </br>
Authors: ^value(Authors)^ </br>
Abstract: ^value(Abstract)^

When assigned to a note(s) then look into the Preview pane to see the combined info.

It’s a lot messier to keep updating the Text pane with agents or whatever, because then you have do a lot of tests to make sure you’re not overwriting your own notes, etc.

Exported notes will display what you see in Preview.

The HTML </br> tags makes sure there are clean line breaks in the output.

2 Likes

Perfect, thanks.

A small note for people who document Tinderbox. Searching Tinderbox Help for “template” or “preview” gives no useful results, even though “Export Templates” is a header in the Help file.

The Export Templates page in the Help file gives no indication that the “Preview” pane exists (it’s hidden by default), much less what it does. Since I’m in no particular hurry today, I was able to figure it out without too much difficulty, but knowing about this little detail would have saved me hours of grief in the past.

So three key bits of information that a beginning user (me!) might find useful for all things Export-related are:

  • How to create the relationship between an Export Template and an individual note or notes. This might be a useful example to use in discussions of Prototypes and/or the note Properties Inspector, for example.

  • How to turn on the Preview pane/what the “Text Pane Selector” does. Unless a template is assigned, it looks just like the Text pane.

  • Conceptually, the idea that “Export Templates” are useful within Tinderbox, as for instance in the example discussed here, and therefore that the Export command is not a black box.

1 Like

Very interesting - can you clarify why the “value” is in the last two but not the first?

Also if I make a template with only the last two lines and not the first line, then no data is shown - why?

^text^ exports styled text as HTML
^value($Text) exports the text as unstyled text.

if I make a template with only the last two lines and not the first line, then no data is shown - why?

I believe this is not the case, though I believe it would be better to write ^value($Authors) and ^value($Abstract).

1 Like

Tinderbox export code happens to have a ^text^ tag as a shorthand for ^value($Text)^ – should each give the same result. Although the ^text^ tag does provide some additional options.

1 Like

Thanks - what is the difference between the standard “page” vs “item” templates for HTML?

If you look at the two templates, the “HTML Page” template has

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8">
	<title>^title^</title>
</head>
<body>
<!--   ** Standard Tinderbox Template [section page] **  -->

<h1>^title^</h1>
^text^
^children(/Templates/HTML page/HTML item)
</body>
</html>

So, that template is what is assigned to the container (a note that has child notes), and its code exports the children with the ^children(/Templates/HTML page/HTML item) code. This form of the ^children() tag lets one define a template that is used for exporting children.
That leads us to the HTML Item template that is referenced in the ^children() tag:

<h2>^title^</h2>
^text
^children(/Templates/HTML page/HTML item)

The differences between the two templates:

  1. HTML Page sets up the basic HTML structure with the standard <html/>, <head/>, and <body/> HTML wrapper tags and HTML block information.
  2. HTML Page uses the top level <h1/> header tag for that page’s $Title.
  3. HTML Item uses the second level <h2/> header tag for the rest of the pages in the export.

So:

Container <-- HTML Page
Child <-- HTML Item
… …Child <-- HTML Item
Child <-- HTML Item
Child <-- HTML Item

and so on.

This is just a starting point – HTML templates can be modified to provide all the complexities of SGML/HTML export.

1 Like

So this is how you would set things up if you wanted to assemble a page (that is, a single web document) containing each of the Child items as subheads?

Katherine

2 Likes

Yes, and those are the build in templates that are added to your document if you use **File > Built-In Templates > HTML". Just assign the “HTML Page” template to your parent note or the parent note’s prototype.

1 Like