elyxer-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [eLyXer-users] brackets with \left.


From: Alex Fernandez
Subject: Re: [eLyXer-users] brackets with \left.
Date: Sun, 13 Dec 2009 23:46:53 +0100

Hi Jens,

On Sun, Dec 13, 2009 at 9:13 PM, Jens Nöckel <address@hidden> wrote:
> The reason I'm writing is that elyxer gives wrong HTML output for brackets
> such as
> \left. something \right)
> where I use the \left. to balance the right bracket with an invisible
> delimiter. In the HTML output the left delimiter appears as a dot because
> the \left tab is recognized as a "onefunction" and immediately translated by
> inserting the symbol that follows.

That is just a result of my ignorance of how \left and \right work;
without knowing any better I just did the minimal work that produced
acceptable results for the LyX Math manual.

What are they supposed to do? Why is the dot invisible in \left.? Why
the need to balance a \right with a \left?

> I've looked a little at the code and see a Bracket class, but if I
> understand correctly it seems to be used only by the pair [ and ], and it
> also doesn't leave a trace in the HTML output (i.e., there is no surrounding
> <span> in the formula corresponding to the extent of the bracketed content).
> But I'm still trying to learn the logic of the code, so correct me if I'm
> wrong... Ultimately I think the \left and \right tokens should count as
> bracket delimiters, and some way of handling the invisible bracket for
> \left. or \right. is needed.

Actually, the Bracket class is just for {} brackets; there is a
SquareBracket to read [] brackets. Right now none of them have
anything to do with reading \left and \right commands. A different
solution should perhaps be found.

> Right now I can fix this by post-processing the HTML do remove the
> <span class="symbol">.</span>
> But I'm thinking that the Bracket class is probably the place where this
> could be fixed.

Maybe not the Bracket class, but a command is surely the way to go.
Just be sure to download the source code (not the coalesced
everything-in-one-big-file elyxer.py) if you want to actually follow
the code, it is nicely organized in packages:
  http://www.nongnu.org/elyxer/devguide.html
and then run eLyXer directly from the source code: instead of
  $ elyxer.py input.lyx output.html
run it as
  $ src/principal.py input.lyx output.html
I have added an explanation to the developer guide.

Thanks,

Alex.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]