## Scripts for OmniOutliner to LaTeX

I use a fairly unusual writing process lately.
1. I do my initial outlining using Omni Outliner (http://www.omnigroup.com), a wonderful outliner for Mac OS X which is really quite scriptable.
2. In the directory /Library/Application Support/OmniOutliner/Scripts/ I've placed this script which lets me dump the outline to BBEdit 6.5 and turns all newlines into CRs. Export text and notes as LaTeX
3. BBEdit 6.5 is a nice text editor for handling all kinds of tasks. I actually prefer Emacs or Alpha for most work, but in terms of scriptability and workhorse-ability, few things can beat BBEdit.
4. I use the attach script (in the /Applications/BBEdit 6.5/BBEdit Support/Scripts folder) to move the file from BBEdit to TeXShop. 03)Open in TeXShop
5. TeXShop is a terrific TeX environment on Mac OS X. That's where I do my actual formatting.

I've packaged both scripts in this SIT: scripts.sit

A disadvantage of this process is that I can't go backwards – changes in BBEdit or TeXshop don't propagate back to OmniOutliner. That works for my process: I use the Outliner to generate the initial draft, and am happy to edit in LaTeX.

Here's the original note that I posted to the MacOSX-TeX list:
```From: Mark Guzdial
Date: Tue Aug 06, 2002  11:26:23  AM US/Eastern
To: "TeX on Mac OS X Mailing List" MacOSX-TeX@email.esm.psu.edu
Subject: Re: [OS X TeX] outlining and TeX
Reply-To: "TeX on Mac OS X Mailing List" MacOSX-TeX@email.esm.psu.edu
```

I use OmniOutliner for my major LaTeX writing now. I tried the emacs outlining mode, but found that it was too rigid in its definition of what was the hierarchy of my document. I sometimes want structure (say, within a section of text, to reflect the argument I'm making) that doesn't map onto sections or environments.

I write in OmniOutliner using the outline hierarchy to be anything I want. Sometimes I just put a %comment in an outline to represent something I'm going to put in that section, or sometimes \section titles. Text I often put in the notes area of the outline.

I've written an AppleScript to walk the outline and flatten into a long text and dump it into BBEdit. I use BBEdit to make all newlines into returns, then I have another AppleScript for dumping the whole BBedit document into TeXshop. Downsides to this process is that it's only one way: If I make changes in BBEdit or TeXshop, they don't copy back to the OmniOutliner version. So far, that's worked okay for my process -- I use outlining mostly in the initial writing, and I don't mind proofing and revising in plain LaTeX.

Mark