On Sat, Oct 04, 2003 at 06:15:36PM +0200, Georg Baum wrote:
> I am in the process of converting a bigger document with tex2lyx. In order
> to make it work, I had to do the following changes (see attached patch):
> 
> - add \text{] and \fbox{} support to math.C
> - allow parsing of partial documents (for inclusion with \input}
> - steal commandline switch -c from reLyX to support the previous point
> - add support for lengths with comma (4,5cm instead of 4.5cm) to minipage 
> environments
> - add support for some math environments like displaymath
> - add support for \bibliography command

Looks good.

> The document translates already quite well, but a remaining problem is that
> unknown latex commands "\foo" get translated to "\foo " or even "\foo  ".
> This destroys also commands like hspace*{}.

I see...

> This happens because Token::asInput() adds an extra space, and
> parse_text() does this also for unknown tokens.
> 
> Why is the space added in Token::asInput()?

Sort of a hack. If you manage to do the 'round trip' on the UserGuide
without, feel free to remove it.

> Should something else (what?) be > used instead where the space hurts?
 
I'd think we need some 'possibly a space' 'character' that gets
converted to a 'real space if something with catcode=letter follows and
is ingnored otherwise.

Tricky business...

> The patch is work in progress, partly unfinished and contains some ugly
> things like Token::lineno_. I'll send a polished version when everything
> works.

Would be nice.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)

Reply via email to