[OS X TeX] Re: html output from bib file (BibDesk)

James Owen jhgowen at mac.com
Fri Jan 27 01:25:15 EST 2006

This is partly a feature request for BibDesk, but also a query about  
how other people go about these things.

I want to be able to output a bibliography into non-pdf format, so  
that the font remains editable, and I can make
a bibliography in Pages, for example.

My usual way of doing this is to produce an html version of what I  
want using the BiDesk Export function, with
a custom html export template and then edit the css, so it looks  
right. The html file can then be dropped into
Pages or Word, both of which can cope with the html and read the css  
(although Pages annoyingly reads both
the screen.css and the print.css files to determine formatting).

The html produced this way is semantically very nice, so that search  
will know which field is Author, which is Journal, Date etc.


<li class="Pub">
	<span class="Title">Distinguishing two isomers of Nd at C$_{82}$ by STM  
and DFT</span>
	<br />
	<span class="Author">D. F. Leigh and J. H. G. Owen and S. M. Lee and  
K. Porfyrakis and A. Ardavan and G. A. D. Briggs</span>
	<span class="Journal">Chem. Phys. Lett.</span> 
	<span class="Volume">414</span> 
	<span class="Pages">307-310</span> 
	(<span class="Date">2005</span>) 
	<span class="url"><a href="http://dx.doi.org/10.1016/j.cplett. 

However, there are a number of problems with this method.

1:  All the "and"s between authors from the .bib file are kept, which  
looks bad.
2: the LaTeX formatting in the title is preserved, which has to be  
found and replaced
by html formatting manually.
3: Export Selection does not work, so selection of one file, results  
in the export of the entire .bib file.
4: The exported html bibitems are listed in the order in which they  
appear in the .bib text file, not as sorted
in the BibDesk GUI.

To solve these problems, the alternative way is to produce a LaTeX  
file from BibDesk, by right-clicking and selecting "Copy LaTeX for n  
dropping this into a LaTeX file, and processing through htlatex or  
Tex4ht to produce the html.
This works, the "and"s have gone, the bibitems are in any required  
order and formatting, the <sub> has been put in, but the resulting  
html is not nearly so well-structured; any item in italic will be  
<span class="cmti-10"> and any item in bold will be <span  
class="cmbx-10"> etc.
No information about the title, authors etc. Also the reference label  
number is  hardcoded in, it is not a list item, which will
automatically renumber if necessary.

Here is the same bibitem outputted that way.

<p class="bibitem"><span class="biblabel">
[1]<span class="bibsp">&#x00A0;&#x00A0;&#x00A0;</span></span><a
id="XLeigh2005a"></a>“Distinguishing two isomers of Nd at C<sub><span
class="cmr-7">82</span></sub>  by STM and DFT”.  D.&#x00A0;F.  
Leigh, J.&#x00A0;H.&#x00A0;G. Owen, S.&#x00A0;M.
    Lee, K.&#x00A0;Porfyrakis, A.&#x00A0;Ardavan and  
G.&#x00A0;A.&#x00A0;D. Briggs. <span
class="cmti-10">&#x00A0;Lett. </span><span
class="cmbx-10">414</span>(4-6) pp. 307–310 (2005)

Can someone tell me how to bridge this gap? Is there a program to  
write a bst file that will output html as
well-structured as BibDesk's html output, but with TeX formatting  
included etc.
Or is it in the options of htlatex, to spit out html plus css, with  
meaningful class names?
Or would it be possible to improve the html output of BibDesk, and  
sort the output?
or even another GUI Bibtex program which can do what BibDesk can't.

BibDesk can sort the output, and select the output for export - if  
you select 6 items, after sorting in a different way,
and export as a bib file, the new .bib text file will be sorted as  
the items were sorted in the GUI, and include only those
6 items. It is only the html output which can't cope with this.



------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/

More information about the MacOSX-TeX mailing list