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
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

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: 9050
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: 9050
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest