I’ve released a new version of bib2html plugin (v.0.7) that includes a number of updates. First of all, I’ve replaced the scriptacolous javascript library with jquery javascript library. I use the toggle function for enabling the user-driven visualization of the bibtex code for a given entry. I have also isolated the main HTML code into a template file that enables easier customization. Finally, I’ve added a little bit of formatting to the bibtex code in order to show better (thanks to Cristiana). Last but not least, now bib2html properly integrates with the new Wordpress Plugin section. I still have a number of modifications to be made.

Posted Monday, April 23rd, 2007 at 8:40 am
Filed Under Category: bib2html, note, wordpress
You can leave a response, or trackback from your own site.

14

Responses to “Round of updates to bib2html”

Nemo

Hi Sergio,

I encountered an issue. I think it depends on the OSBib. When the type of a reference is somewhat other than article/inproceedings/misc/techreport, e.g. webpage, url, the HTML output doesn’t provide anything for “title”, “author”, even if the appropriate fields are present in related bibtex entry.

However, good work!

Nemo

Oh, I forgot, I have a suggestion: a new type of filter, by “keywords”. I always use them and I’ll find such a filter very useful.

Bye bye.

Nemo

I solved another issue. If use the “key” filter and the citekey has a strange value like this:

author1:author2:year

the regexp matching fail and the result is “file not found”.

I solved this replacing

“/\[bibtex\s+file=(.*)\s*((allow|deny|key)=([\w,]+))?\s*\]/U”

with

“/\[bibtex\s+file=(.*)\s*((allow|deny|key)=((.*)+))?\s*\]/U”

I don’t know if this introduce other issues, but works for me.

Marco Loregian

Hi Sergio, I think your plugin is great, and I’d like to point out a couple of features that I’d like it to have :)

1. filter by author
2. possibility to customize the directory from where bib file are taken (e.g., default upload directory)
3. possibility to place the link to the bibtex file after the reference and not only before (at least, this does not seems to work if I edit the template)

Thank you for the great work!

Marco Loregian

I forgot, sorting entries would be a great features! Now they’re in the same order as in the .bib file, but it would be nice to have the possibility to automatically sort them by year or author.

Sergio

Hi Marco,

thanks for appreciating and for suggesting improvements. I actually have yet a number of extensions to be applied to the plugin. Your requests are all clear beside no.3. Can you please give more info?

Thanks, Sergio

Marco Loregian

About suggestion #3: I modified the template, but was only able to insert the link to expand/collapse (hide) the original bibtex entry before the formatted version, and not after.
For example, instead of
(link to bibtex, pdf, …) Formatted version [bibtex entry]
I’d like
Formatted version (links) [bibtex]

Sergio

Marco, got it. This will be fixed in next version (0.9)

Alec Resnick

Hi!

Thanks so much for this plugin–I’m encountering a bit of unexpected behavior I was hoping you could help me with? Rather than just linking to the bibtex, the plugin is also embeddding the text from the .bib file, itself. . .Take a look at http://aresnick.mit.edu/blog/reading/ if yuo’ve a chance.

No big deal, just hoping to fix it. . . Thanks again!

Sergio

Hi Alec,

thanks for appreciating. It seems that there are problems with the add_action (both init and wp_head, see at the end of bib2html.php).

Your HTML head section does not include the tags for jquery.js, bib2html.js and the extra CSS definitions that these actions apply to it when called.

I do not have time now to check, but I suggest to investigate in this area. Let me know if you get it fixed.

- Sergio

Tony A.A.

Great plugin! I am moving my site to WordPress and this plugin is great for my publications page. A few comments:

1. When I unzipped the plugin from wordpress.org, all the files and directories where created with lower case names, while the code expects some things in mixed cases or upper case. I fixed this manually on my system. Either the zip file should be fixed or the filenames should be normalized to all lower case.

2. The bibtex link doesn’t work if the key has ‘&’ in it, such as autho1&author2.

3. If the same entry is included multiple times on the same page, then the bibtex links always expand the first entry.

4. The bibtex text is not well formatted. All the fields are listed on a single line

Note that the changelog says that I’m using version 0.9.3.

Tony A.A.

I’d like to add links to the PDF, PPT and other related files at the end of some entries, similar to the way I have it manually coded at http://tony.abou-assaleh.net/Publications. What would be a good way to accomplish that?

Tony A.A.

It appears that ‘allow=inproceedings’ also includes proceedings, which is wrong. I tried to add ‘disallow=proceedings’ but that didn’t change anything.

Tony A.A.

I corrected the above by replacing the line in bib2html.php:

$pos = strpos($filter, $resourceType);

with:

$match = preg_match(”/\b$resourceType\b/i”, $filter);

and adjusting the if statements accordingly.

Leave a Reply