tex4ht unix installation and running
well, almost...
Wednesday, July 11 2007:
After installing tex4ht as a debian package to suntzu, surprisingly it ran on Ray's tex file without error. Opening that tex file crashed openoffice in both windows and linux though.
I converted simple tex document containing simple math, and it got converted properly, and opened without errors.
I converted simple tex document containing .eps image, and after successfull convertions, there was no image in openoffice file. I opened .odt file with archive manager, and I verified that image file is there, but for some reasons it is not displayed.
After that I have player around with Ray's latex, which is quite complicated. It was successfully converetd without errors(!). The only thing was that at some points latex required input, and I had to press 'return' key. When I tried to open the generated .odt file, openoffice crashed though. It crashed both in linux and in windows, so it was because of the .odt file.
I started playing around with Ray's latex file in order to make it not crash openoffice. I first converted documentstyle from ieeeconf to article, and removed commands associated with ieee document style. After that, I removed table* structure, which is table inside table, and after that openoffice managed to open the document, but it had neither tables nor images displayed.
After that, i have tried to import generated openoffice document with OpenOffice importer to connexions. Surprisingly, it gave error telling that generated CNXML is not valid. I figured out that it is because of style of bibtek references, which did not manage to get converted to CNXML. When I removed those references, document was imported quite well, with math, sections and subsections properly placed. There were few errors with math though, for example improper notation of square-root. Currently I am trying to play around with content.xml inside of generated .odt file, in order to change the style of bibliography references, and make it be imported to Connexions.
Currently image importing is also one of the big gaps.
Thursday, July 12 2007:
I finally managed to change content.xml in .odt file, so that references would be displayed as plain text. It appeared to be not that hard, so simple XSLT transformation would be possible. After this step, generated openoffice file was successfully imported. I also spotted that footnotes were also properly imported to CNXML, thus converted to tag <note> with type 'footnote'
What I did was removing tags that were associated with bibtex references.
More precisely, i changed the following text in the end of content.xml :
<!--OLD CONTENT.XML START-->
<text:bibliography text:name="bib-1"> <text:bibliography-source>
<text:index-title-template>References</text:index-title-template>
<text:bibliography-entry-template text:bibliography-type="custom1" text:style-name="Bibliography11">
<text:index-entry-bibliography text:bibliography-data-field="identifier"/>
<text:index-entry-span>: </text:index-entry-span>
<text:index-entry-bibliography text:bibliography-data-field="author"/>
<text:index-entry-span>, </text:index-entry-span>
<text:index-entry-bibliography text:bibliography-data-field="title"/>
<text:index-entry-span>, </text:index-entry-span>
<text:index-entry-bibliography text:bibliography-data-field="year"/>
</text:bibliography-entry-template>
</text:bibliography-source>
<text:index-body>
<text:p text:style-name="p-bibitem">
[1]<!--bibitem Xganesan04--> D.<text:s/>Ganesan, S.<text:s/>Ratnasamy, H.<text:s/>Wang, and D.<text:s/>Estrin,
“Coping with irregular spatio-temporal sampling in sensor networks,”
SIGCOMM Comput. Commun. Rev., vol. 34, no. 1, pp. 125–130, 2004.
</text:p><text:p text:style-name="p-bibitem">
[2]<!--bibitem Xwagner06a--> R.<text:s/>Wagner, R.<text:s/>Baraniuk, S.<text:s/>Du, D.B. Johnson, and
A.<text:s/>Cohen, “An architecture for distributed wavelet analysis and processing
in sensor networks,” in Proc. Int. Symp. Inf. Proc. in Sensor Networks
(IPSN), 2006, to appear.
</text:p><text:p text:style-name="p-bibitem">
[3]<!--bibitem Xbaraniuk06--> R.<text:s/>Baraniuk, A.<text:s/>Cohen, and R.<text:s/>Wagner, “Approximation
and compression of scattered data by meshless multiscale decompositions,”
App. and Comp. Harmonic Analysis, in preparation.
</text:p><text:p text:style-name="p-bibitem">
[4]<!--bibitem Xdon:soft--> D.L. Donoho, “De-noising via soft-thresholding,” IEEE
Transactions on Information Theory, vol. 41, pp. 613–627, 1995.
</text:p><text:p text:style-name="p-bibitem">
[5]<!--bibitem Xjohnstone05--> I.M. Johnstone and B.W. Silverman, “Empirical bayes
selection of wavelet thresholds,” The Ann. of Stat., vol. 33, no. 4, pp.
1700–1752, 2005.
</text:p><text:p text:style-name="p-bibitem">
[6]<!--bibitem Xxiao06--> J.-J. Xiao, A.<text:s/>Ribeiro, Z.-Q. Luo, and G.B. Giannakis,
“Distributed compression-estimation using wireless sensor networks,” IEEE
Sig. Proc. Mag., vol. 23, no. 4, pp. 27–41, Jul. 2006.
</text:p><text:p text:style-name="p-bibitem">
[7]<!--bibitem Xguestrin04--> C.<text:s/>Guestrin, P.<text:s/>Bodik, R.<text:s/>Thibaux, M.<text:s/>Paskin, and
S.<text:s/>Madden, “Distributed regression: an efficient framework for modeling
sensor network data,” in Proc. Int. Symp. Inf. Proc. in Sensor Networks
(IPSN), 2004, pp. 1–10.
</text:p><text:p text:style-name="p-bibitem">
[8]<!--bibitem Xsweldens98--> W.<text:s/>Sweldens, “The lifting scheme: A construction of second
generation wavelets,” SIAM J. Math. Anal., vol. 29, no. 2, pp. 511–546,
Mar. 1998.
</text:p><text:p text:style-name="p-bibitem">
[9]<!--bibitem Xhu04--> L.<text:s/>Hu and D.<text:s/>Evans, “Localization for mobile sensor networks,” in
Proc. Int. Conf. on Mobile Comp. and Net. (MobiCom), 2004, pp. 45–57.
</text:p><text:p text:style-name="p-bibitem">
[10]<!--bibitem Xdon:adapt--> D.L. Donoho and I.M. Johnstone, “Adapting to unknown
smoothness via wavelet shrinking.,” J. Am. Statist. Assoc., vol. 90, pp.
1200–1224, 1995.
</text:p><text:p text:style-name="p-bibitem">
[11]<!--bibitem Xpatt-shamir04--> B.<text:s/>Patt-Shamir, “A note on efficient aggregate queries in
sensor networks,” in Proc. ACM Symp. on Dist. Comp., 2004, pp. 283–289.
</text:p><text:p text:style-name="p-bibitem">
[12]<!--bibitem Xdimakis06--> A.G. Dimakis, A.D. Sarwate, and M.J. Wainwright,
“Geographic gossip: Efficient aggregation for sensor networks,” in Proc.
Int. Symp. Inf. Proc. in Sensor Networks (IPSN), 2006, pp. 69–76.
</text:p><text:p text:style-name="p-bibitem">
[13]<!--bibitem Xrabbat06--> M.<text:s/>Rabbat and R.<text:s/>Nowak, “Distributed optimization in sensor
networks,” in Proc. Int. Symp. Inf. Proc. in Sensor Networks (IPSN), 2006,
pp. 20–27.
</text:p></text:index-body></text:bibliography>
<!--end of section*--><!--end of section--></office:text></office:body>
</office:document-content>
<!--OLD CONTENT.XML END-->
to the following one:
<!--NEW CONTENT.XML START-->
<text:p text:style-name="Text-body">
[1]<!--bibitem Xganesan04--> D.<text:s/>Ganesan, S.<text:s/>Ratnasamy, H.<text:s/>Wang, and D.<text:s/>Estrin,
“Coping with irregular spatio-temporal sampling in sensor networks,”
SIGCOMM Comput. Commun. Rev., vol. 34, no. 1, pp. 125–130, 2004.
[2]<!--bibitem Xwagner06a--> R.<text:s/>Wagner, R.<text:s/>Baraniuk, S.<text:s/>Du, D.B. Johnson, and
A.<text:s/>Cohen, “An architecture for distributed wavelet analysis and processing
in sensor networks,” in Proc. Int. Symp. Inf. Proc. in Sensor Networks
(IPSN), 2006, to appear.
[3]<!--bibitem Xbaraniuk06--> R.<text:s/>Baraniuk, A.<text:s/>Cohen, and R.<text:s/>Wagner, “Approximation
and compression of scattered data by meshless multiscale decompositions,”
App. and Comp. Harmonic Analysis, in preparation.
[4]<!--bibitem Xdon:soft--> D.L. Donoho, “De-noising via soft-thresholding,” IEEE
Transactions on Information Theory, vol. 41, pp. 613–627, 1995.
[5]<!--bibitem Xjohnstone05--> I.M. Johnstone and B.W. Silverman, “Empirical bayes
selection of wavelet thresholds,” The Ann. of Stat., vol. 33, no. 4, pp.
1700–1752, 2005.
[6]<!--bibitem Xxiao06--> J.-J. Xiao, A.<text:s/>Ribeiro, Z.-Q. Luo, and G.B. Giannakis,
“Distributed compression-estimation using wireless sensor networks,” IEEE
Sig. Proc. Mag., vol. 23, no. 4, pp. 27–41, Jul. 2006.
[7]<!--bibitem Xguestrin04--> C.<text:s/>Guestrin, P.<text:s/>Bodik, R.<text:s/>Thibaux, M.<text:s/>Paskin, and
S.<text:s/>Madden, “Distributed regression: an efficient framework for modeling
sensor network data,” in Proc. Int. Symp. Inf. Proc. in Sensor Networks
(IPSN), 2004, pp. 1–10.
[8]<!--bibitem Xsweldens98--> W.<text:s/>Sweldens, “The lifting scheme: A construction of second
generation wavelets,” SIAM J. Math. Anal., vol. 29, no. 2, pp. 511–546,
Mar. 1998.
[9]<!--bibitem Xhu04--> L.<text:s/>Hu and D.<text:s/>Evans, “Localization for mobile sensor networks,” in
Proc. Int. Conf. on Mobile Comp. and Net. (MobiCom), 2004, pp. 45–57.
[10]<!--bibitem Xdon:adapt--> D.L. Donoho and I.M. Johnstone, “Adapting to unknown
smoothness via wavelet shrinking.,” J. Am. Statist. Assoc., vol. 90, pp.
1200–1224, 1995.
[11]<!--bibitem Xpatt-shamir04--> B.<text:s/>Patt-Shamir, “A note on efficient aggregate queries in
sensor networks,” in Proc. ACM Symp. on Dist. Comp., 2004, pp. 283–289.
[12]<!--bibitem Xdimakis06--> A.G. Dimakis, A.D. Sarwate, and M.J. Wainwright,
“Geographic gossip: Efficient aggregation for sensor networks,” in Proc.
Int. Symp. Inf. Proc. in Sensor Networks (IPSN), 2006, pp. 69–76.
[13]<!--bibitem Xrabbat06--> M.<text:s/>Rabbat and R.<text:s/>Nowak, “Distributed optimization in sensor
networks,” in Proc. Int. Symp. Inf. Proc. in Sensor Networks (IPSN), 2006,
pp. 20–27.
</text:p>
<!--end of section*--><!--end of section--></office:text></office:body>
</office:document-content>
<!--NEW CONTENT.XML END-->
Strange thing that I observed was that when I edited file with OpenOffice ro remove references, and later when I opened .odt as archive, content.xml file was only 2 lines, and second line contained all of it (it was BIG).
So far, main gap is images and tables, which i believe is possible to include manually. Also we will need to make xslt tranform to bibtex tags. We also need to do something with the structures that made OpenOffice crash.
