[OS X TeX] Re: html output from bib file (BibDesk)
James Owen
jhgowen at mac.com
Fri Jan 27 07:25:15 CET 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
engines
will know which field is Author, which is Journal, Date etc.
e.g.:
<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.
2005.08.090">10.1016/j.cplett.2005.08.090</a></span>
</li>
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
items"
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">   </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. F.
Leigh, J. H. G. Owen, S. M.
Lee, K. Porfyrakis, A. Ardavan and
G. A. D. Briggs. <span
class="cmti-10">Chem.</span><span
class="cmti-10"> Phys.</span><span
class="cmti-10"> Lett. </span><span
class="cmbx-10">414</span>(4-6) pp. 307–310 (2005)
</p>
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.
Yours,
James
------------------------- 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 macostex-archives
mailing list