What is the syntax for conditioning on the full name of a journal, in a HTML 
template?

I ask because I’ve been trying to write a custom HTML preview template that 
will, for article entries, condition on the name of the journal so as to 
include a thumbnail image of the journal to the left of the formatted 
reference.  At present, my template includes the following code (surrounding 
HTML omitted, relevant portion boldfaced):

<$pubType=article?><br>
<table width="130%" border=0>
<tr valign=top>
<td width="12%">
<$fields.journal.lowercaseString="advances in applied probability"?>
<img 
src="https://jmckalex.org/graphics/journals/advances_in_applied_probability.jpg";>
<?$fields.journal?>
<img src="https://jmckalex.org/graphics/journals/journal-sm.jpg";>
</$fields.journal?>
</td>
<td 
class="content"><$authors.name.stringByRemovingTeX.@componentsJoinedByCommaAndAnd/>
 (<$fields.month?><$fields.month/> </$fields.month?><$fields.year/>). 
"<$fields.title/>." <em><$fields.journal/></em>,
<$fields.volume?>
<$fields.volume/><$fields.number?>(<$fields.number/>)</$fields.number?>
</$fields.volume?>
<$fields.pages?>: <$fields.pages.stringByConvertingDoubleHyphenToEndash/>.
</$fields.pages?>
</td>
</tr>
<tr></tr>
</table>

<?$pubType=book?>
:
:
</$pubType?>

The conditional template tag, as written, doesn’t work and doesn’t even display 
the default image specified for when no match occurs.

If I change the relevant portion to simply this:

<td width="12%">
<img src="https://jmckalex.org/graphics/journals/journal-sm.jpg”>
</td>

Then the default image appears.

Any suggestions about what I’m doing wrong would be greatly appreciated!

In case anyone is interested, here are some links illustrating how the template 
looks so far.  Notice that embedded HTML tags in the “Annote” field are 
processed so as to allow simple markup, like boldface, italic and lists.  (I 
don’t know the full capabilities of Bibdesk’s HTML rendering engine, but I 
think it’s not proper html5 because a lot of standard markup techniques don’t 
work.)

https://www.dropbox.com/s/w2qd1sebutnfkhm/bibdesk-html-1.png?dl=0
https://www.dropbox.com/s/kcfrjjvdeyjjpm4/bibdesk-html-2.png?dl=0

Many thanks,

Jason

—
Prof. J. McKenzie Alexander
Department of Philosophy, Logic and Scientific Method
London School of Economics and Political Science
Houghton Street, London WC2A 2AE
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

Reply via email to