Hi,

I'm trying to export my bib to an RTF file according to the Chicago Manual of Style, based on the publication type. (I know my template is not perfect CMS, but no reason to fix it unless this export is going to work.)

I have created the template below, but really don't understand the Help docs and can't find analogous code in the default distro templates.

Basically, I want a (C-style) 'switch' statement on pubType, I think. But I'm not sure how to form the 'cases'. The template below is my feeble attempt to achieve:

        switch (pubType) {
                case 'article':
<$fields.Author/>. <$fields.Year/>. "<$fields.Title/>." < $fields.Journal/>. <$fields.Volume/>: <$fields.Pages/>.
                /* etc */
                ...
        }

Sorry if this should be obvious to me. Thanks in advance for any help.

======= BEGIN TEMPLATE FILE ==========
<$publications>

<$conditionKey.pubType==article?>

<$fields.Author/>. <$fields.Year/>. "<$fields.Title/>." < $fields.Journal/>. <$fields.Volume/>: <$fields.Pages/>.

<?$conditionKey.pubType==book?>

<$fields.Author/>. <$fields.Year/>. <$fields.Title/>. < $fields.Publisher/>.

<?$conditionKey.pubType==inbook?>

<$fields.Author/>. <$fields.Year/>. <$fields.Title/>. < $fields.Publisher/>.

<?$conditionKey.pubType?>

<$fields.Author/>. <$fields.Year/>. "<$fields.Title/>." < $fields.Journal/>. <$fields.Volume/>. <$fields.Publisher/>. < $fields.Pages/>.

</$conditionKey.pubType?>

</$publications>
======= END TEMPLATE FILE ==========


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

Reply via email to