Tag Archives: LaTeX

Installing Gerd Neu­ge­bauer’s Bibtool on OS X

I struggled for more hours than I would like to say trying to compile Gerd Neugebauer’s BibTool utility on my mac (OS 10.9.2). I kept running into problems with the kpathsea libraries. Not surprisingly, an old thread on the Mac OS-TeX mailing list provided the necessary insight. I’m reposting it here so that it might get better exposure on the Internet for those trying to do the same thing. Of course, someone who wasn’t shamelessly hacking away at it probably wouldn’t have had any problem at all . . .

BibTool is an amazing utility that does all those things we all wished BibDesk would do, but doesn’t: command line tools for removing fields, rewriting fields, grabbing references based on various criteria including regular expressions, pretty printing.

On Nov 23, 2009, at 1:49 PM, Jan Erik Moström wrote:

> I’m a bit slow (in all kind of ways 😉 and I’m just trying to figure out the MacTeX distribution … one thing that that I would like to do is to install “bibtool” (not bibtools) but I can’t figure out how to do this in a simple way. Using Gerbens TeX distribution it was possible to use the i-installer but now I’m at a loss how to do it.

You can download the source and compile it yourself from http://www.ctan.org/tex-archive/biblio/bibtex/utils/bibtool/
(Get the *.gz) file.
Once you have expanded the tar archive, copy the makefile.unx file to makefile, then run
sudo make install
sudo make install.man
This will place a working copy and manual pages in the /usr/local tree.
As long as you have /usr/local/bin in your path, things should work.

Of course, you have to have the developer tools to do this.
There are many options to set specific details during the compilation process, but I just did a vanilla “make” and
./bibtool -h
gave me the typical “usage” statement.

I’ve never used bibtool, don’t know how to use it, and don’t have any test files to ensure that it works in a real-life situation.
Otherwise, I now have a seemingly-functional version of “bibtool” that runs on X86_64 Snow Leopard.
I don’t guess that really helps you, but if you want it, send me a message off-list.

BibDesk 1.5.2 released

A new version of BibDesk, the bibliographic reference manager for users of BibTeX on OS X with extensions for use with word processing software, is now available. Visit http://bibdesk.sourceforge.net/, or use the “Check for updates” menu item from within BibDesk itself.

Many thanks to contributors to the bibtex-users mailing list, who, as usual, tested nightly builds, proposed and tested new features, and identified and help kill bugs. Those wanting to join the mailing list are invited to visit the BibDesk home page for more information. Scroll down to “Helping” and “Information” for links.

Release notes are as follows:

Continue reading

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.