Tag Archives: Interoperability

Files for Pratt LIS 663

Tonight I am guest lecturing at Pratt Institute School of Information and Library Science. The topic is ontology. This post is mainly for the students; they will be able to find the lecture notes and the “Make your own ontology” worksheet here.

The worksheet is HERE.

The lecture notes are HERE.

OmniOutliner Pro = OmniExporter Pro

The institution at which I teach requires faculty to submit copies of our syllabi at the start of each semester. Let me put the ethics and utility of requiring that to one side so that I can share a little about how I’ve produced documents which comply with that request. Omnioutliner Pro has proved invaluable. It took me a long time—longer than I’d expect, given that Omnioutliner Pro is reasonably lightweight and well-designed—and I hope this post will save someone else the trouble.

I always find the process of creating the table in HMTL containing links to the syllabus, course readings, etc., etc. to be agonizing. OmniOutliner Pro is good for this, too.

WhenI have a little more time, I’ll post some samples of what I came up with. I’d also like to fill in some more links on this page.

OmniOutliner to Latex & .docx

I use LaTeX for my syllabi (as well as any other writing I do), and the administration provides us with a template in MS Word format, more precisely, .doc format. That sets a high bar for compliance with the College requirements, because as is well-known, exchange between Word and LaTeX formats is notoriously difficult. The LaTeX community relies on the late Eitan M. Gurari‘s TeX4ht utilities for converting LaTeX to HTML and other formats, including the OpenDocument format used by the OpenOffice.org office suite. This creates a clear pathway.

  1. Write the syllabus as usual in LaTeX.
  2. Process the typeset syllabus with TeX4ht, set to output to the OpenDocument format. Those that don’t like the command line can use SimpleTeX4ht.
  3. Open the resulting document in OpenOffice.org.
  4. Cut and paste the text into the template. I use Pages for the template, which is a .doc document.

I followed this pathway to convert most of each of my syllabi into a format I which could be inserted directly into a document in the .doc format. Nonetheless, the syllabus has to have more than just the list of requirements, policies, etc., etc. There is a complicated table with the schedule of readings and assignments. The first semester in which I had to turn in the syllabus in the .doc format, I took a screen shot of a PDF copy of my syllabus and dropped it into the template. I didn’t want to do this a second time around. The screen shots were an odd size, and it was difficult to maintain the placement of the text. Why I care about the layout of this copy of the syllabus is anyone’s guess; most probably, it will be used primarily to document the College’s compliance with accreditation requirements, rather than being an object of serious study. I suppose it may as well look good for that. In any case, this is where OmniOutliner Professional came in handy. There were two conversions it performed, together with another useful command-line tool, csv2latex.

I found csv2latex by way of Google.com. It seems that there are two scripts of that name.

  1. An older csv2latex, the latest version of which seems to be 0.16, at http://herewe.servebeer.com/csv2latex/. This is the script I used. I had to build it; the source code is available at http://herewe.servebeer.com/csv2latex/releases/?M=D. On OS 10.6 (Snow Leopard), it compiled without a hitch after invoking make csv2latex at the command line.
  2. A newer csv2latex, on CTAN, at http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=csv2latex. It’s maintained by a frequent contributor to the tex-on-osx mailing list, Alan Munn. The documentation for this at CTAN reads as follows:

The package provides a Ruby script–Applescript combination that allows the user to cut and paste spreadsheet tables (e.g., from Excel, OpenOffice Calc, iWork, Numbers, etc.) into a LaTeX source file in various popular LaTeX table formats: plain tables, booktabs, longtable, and raw cells.  The package is designed to work with TeXShop, and can be used with other Mac editors that support Applescript.

I used the first of these two scripts.

[I take this moment to acknowledge the cute domain name http://herewe.servebeer, where there are some other interesting software projects.]

Note that you can definitely spend hours getting absolutely nothing done and becoming, well, frustrated, if you repeatedly enter


when you should be typing


Nothing like that happened to me, of course.

OmniOutliner to LaTeX

  1. Create a table in OmniOutliner with the following columns: week number, date of each week, readings and assignments. OmniOutliner exports csv in a peculiar way. The contents of each cell are enclosed in double quotes, precisely the kind that LaTeX doesn’t like. Likewise, there is a “Note” column in OmniOutliner which apparently cannot be deleted. When I get the time I will write a “de-OmniOutliner” script to remove these “extra” bits.
  2. Export the table as csv from OmniOutliner.
  3. Process the resulting file with csv2latex.
  4. A LaTeX article class document will result, containing the table only.
  5. Cut and paste away. . .

Some people might ask, Why not just use OmniOutliner Pro’s option to export to LaTeX? The answer is that this exports your table as an article-class document, not as a LaTeX table. Only the leftmost column is output into LaTeX. This is useful if you are using OmniOutliner to create a draft of a document or an outline. Rows can be output as section headings, body text, etc.

OmniOutliner to .docx

  1. Create a table in OmniOutliner as described above.
  2. Export to .docx format. [OmniOutliner Pro does not export to .doc format.]
  3. Open the new document in OpenOffice.org or Pages.
  4. Cut and paste away . . .

OmniOutliner to HTML

This was not as straightforward as I had thought it would be. The HTML export option created HTML code for a table only containing the leftmost column of my OmniOutliner table. The export option entitled “HTML (active)” output the full table. According to the OmniOutliner documentation, this is supposed to produce a table in which the rows can be hidden and expanded. It also created widgets such as triangles and squares which were to be used as “bullets.” All I got was HTML code for a static table with no bullets, although it did have every cell in the table I had created in OmniOutliner. I opened it in Amaya, which verified it as compliant. So I expect I will be cutting-and-pasting this into my course web page, which I will probably end up composing entirely using Amaya.