On 11/02/2010 11:41 AM, Pavel Sanda wrote:
Richard Heck wrote:
Log:
Make sure that the members of this enum get the same value on every
platform.
btw on which platform will this enum starts on non zero number?
I don't know for sure. But the file Uwe posted with #7005 had:
\html_math_output -1
which was what was causing the problem. Since we are outputting the enum
value in BufferParams::write(), I am guessing that VC++ is starting it on
-1? The first value is the default, and it is properly set.
i have hard time to believe this. isn't possible that this -1 code was
generated by some crazy code in lyx2lyx?
Possible, but I checked that (and fixed a thinko). Here is the only
place it could be:
def convert_math_output(document):
" Convert \html_use_mathml to \html_math_output "
i = find_token(document.header, "\\html_use_mathml", 0)
if i == -1:
return
rgx = re.compile(r'\\html_use_mathml\s+(\w+)')
m = rgx.match(document.header[i])
newval = "0" # MathML
if m:
val = m.group(1)
if val != "true":
newval = "2" # Images
else:
document.warning("Can't match " + document.header[i])
document.header[i] = "\\html_math_output " + newval
How do you get -1 out of that?
Richard