OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



BibTeX export

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

BibTeX export

Postby soeren » Tue Dec 18, 2007 2:55 pm

For us, proper BibTeX citation export is crucial. The current citationFormats/bibtex/citation.tpl unfortunately had some flaws:

* the bib key contained curly braces, which were not understood by bibtex
* if a journal has only an online ISBN this was omited
* the author names were not formated according to the common firstname lastname convention and separated by "," instead of "and"
* abstract and keywords were not exported

I tried to fix those issues and would be pleased if you could add my changes to the next release:

Code: Select all
<div class="separator"></div>

{literal}
<pre style="font-size: 1.5em;">@article{{/literal}{$journal->getJournalInitials()|escape}{$articleId|escape}{literal},
        author = {{/literal}{assign var=authors value=$article->getAuthors()}{foreach from=$authors item=author name=authors key=i}{assign var=firstName value=$author->getFirstName()}{assign var=authorCount value=$authors|@count}{$firstName|escape} {$author->getLastName()|escape}{if $i<$authorCount-1} and {/if}{/foreach}{literal}},
        title = {{/literal}{$article->getArticleTitle()|strip_unsafe_html}{literal}},
        journal = {{/literal}{$journal->getJournalTitle()|escape}{literal}},
{/literal}{if $issue}{literal}  volume = {{/literal}{$issue->getVolume()|escape}{literal}},
        number = {{/literal}{$issue->getNumber()|escape}{literal}},{/literal}{/if}{literal}
        year = {{/literal}{$article->getDatePublished()|date_format:'%Y'}{literal}},
        keywords = {{/literal}{$article->getArticleSubject()|escape}{literal}},
        abstract = {{/literal}{$article->getArticleAbstract()|escape}{literal}},
{/literal}{assign var=onlineIssn value=$journal->getSetting('onlineIssn')|escape}
{assign var=issn value=$journal->getSetting('issn')|escape}{if $issn}{literal}  issn = {{/literal}{$issn}{literal}},{/literal}
{elseif $onlineIssn}{literal}   issn = {{/literal}{$onlineIssn}{literal}},{/literal}{/if}

{literal}       url = {{/literal}{$articleUrl}{literal}}
}
</pre>
{/literal}
soeren
 
Posts: 5
Joined: Tue Dec 18, 2007 11:08 am

Re: BibTeX export

Postby asmecher » Tue Dec 18, 2007 3:42 pm

Hi soeren,

Thanks for contributing! Would you be able to provide your changes as a unified patch (i.e. using the diff tool with the -u option)?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: BibTeX export

Postby soeren » Wed Dec 19, 2007 7:24 am

Unfortunately, this forum does not allow attachments of type patch. However, you can download the patch from: http://online-journals.org/plugins/cita ... tion.patch
soeren
 
Posts: 5
Joined: Tue Dec 18, 2007 11:08 am

Re: BibTeX export

Postby asmecher » Wed Dec 19, 2007 1:14 pm

Hi soeren,

Thanks -- the bugzilla entry for this is at http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=3199.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Development

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest