[OS X TeX] Preparing large non-tex text for use in latex

Adam M. Goldstein z_californianus-dated-1309903596.900851 at shiftingbalance.org
Thu Jun 30 18:06:37 EDT 2011

The obvious solution is a shell script. I recommend the z shell. Or perhaps Applescript.

Sorry but I can't help you write one just now.


On Jun 30, 2011, at 5:33 PM, Bobby Cheren wrote:

> I am working on writing a casebook with a law professor. This involves lots and lots of text in the form of cases and articles. This process reveals how achingly painful it is to prep text for use in TeX by adjusting quotation marks, adding \ in fron to $ and &, and replacing section symbols with \S \. Has anyone built utility for cleaning/preparing text? I wrote the following sed code that seems to get the job done:
> s/‘/'/g
> s/'\([a-z]\)/`\1/g
> s/'\([A-Z]\)/`\1/g
> s/“/"/g
> s/”/"/g
> s/"/''/g
> s/''\([a-z]\)/``\1/g
> s/''\([A-Z]\)/``\1/g
> s/```/``\\,`/g
> s/'''/'\\,''/g
> s/§/ \\S \\ /g
> s/&/\\&/g
> s/\$/\\\$/g
> I downloaded the texhelpers sed gui and set this to the default command. The process now requires I create a file, put it in a sed input folder, and then retrieve the text from the file created in the sed output folder. Not exactly a clean process.
> Any thoughts out there on this issue? The ability to batch prepare text would make tasks like LaTeX-ing public domain books and law cases easy.
> -- 
> the tide is coming in...
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex

Adam M. Goldstein PhD, MSLIS
z_californianus at shiftingbalance.org
Associate Editor
Reviews Editor
Evolution: Education & Outreach
Spellman 205
(914) 637-2717 (msg)
Dept of Philosophy
Iona College
715 North Avenue
New Rochelle NY 10801

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1799 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20110630/be13a616/attachment.p7s>

More information about the MacOSX-TeX mailing list