Python LaTeX codec?

David Eppstein eppstein at ics.uci.edu
Tue Oct 14 13:54:46 EDT 2003


In article <bmhb54$3dae$1 at netnews.upenn.edu>,
 "netnews.upenn.edu" <p.magwene at snet.net> wrote:

> William Park wrote:
> > In <comp.text.tex> David Eppstein <eppstein at ics.uci.edu> wrote:
> > 
> >>Does anyone have an implemented Python codec for converting between 
> >>unicode and LaTeX markup?  E.g. I'd like '?' to be converted to '{\"\i}' 
> >>and vice versa.  Preferably including at least the Latin Extended-A 
> >>characters as well as the basic Latin-1 Supplement.
> >>
> >>If not, anyone with experience writing Python codecs have any advice on 
> >>how to do this?
> > 
> > 
> > For heaven's sake,
> >     man tr
> >     man sed
> >     man awk
> >     man bash
> > 
> 
> 
> Microsoft Windows 2000 [Version 5.00.2195]
> (C) Copyright 1985-2000 Microsoft Corp.

I am using a Mac, so Windows not having these isn't a problem.

But, Park's response doesn't really address my question at all.
For one thing, there was a reason I asked for this as Python code, which 
is that I want to use this as a subroutine of a larger application, and 
don't want the expense of firing up a separate program every time I want 
to use this subroutine.  More importantly, the difficult part is not so 
much actually performing the conversion (whether by one of these 
programs or more cleanly as a pure Python codec), but in coming up with 
the tables of patterns to be converted.

-- 
David Eppstein                      http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science




More information about the Python-list mailing list