<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi All,<div><br></div><div>From the bug report:</div><div><span class="Apple-style-span" style="font-family: sans-serif; "><pre>Description of bug:
LuaTeX's \mathcode is extended to allow for a 21-bit character argument.
This seems to cause errors when using bm.sty with LuaLaTeX.</pre></span><div><div>A 21-bit character argument! That would mean that it is stored in bit field!</div><div>If so, then the manipulation of the bit field could be flawed.</div><div><br></div><div>If it is store in 3 Byte (24-bit), then there could be encoding problems.</div><div>In others one of the highest/lowest byte might contain junk!</div><div><br></div><div>Also, depending on how the values are assigned this could cause problems.</div><div><br></div><div>My assumption is that somebody has either his/her math wrong or the</div><div>algorithm(s) used are flawed. </div><div><br></div><div>regards</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Keith.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><span class="Apple-style-span" style="font-family: sans-serif; "></span></div></div><div><br></div><div><div>Am 09.05.2012 um 03:55 schrieb David Carlisle:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>Thanks for your reply,<br><br><blockquote type="cite">We extend other primitives as well, e.g. \char (XeTeX does, too).<br></blockquote><br>\char is less problematic as it doesn't return a value unlike \mathcode.<br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">IMO, I think we should just extend \mathchardef in a similar way, so<br></blockquote><blockquote type="cite">that \mathchardef\matha\mathcode`a works again.<br></blockquote><br>That would at least make the changes consistent, so would be an improvement but they would still be dreadfully incompatible with TeX.<br><br>It wouldn't for example be enough to fix the latex bug report referenced in my previous mail. It would move the error to somewhere else.<br><br>bm uses \mathchardef\matha\mathcode`a followed by \meaning\matha to get the hex mathcode which it then splits up to extract the components.<br><br>even if the \mathchardef did not generate an error the code will fail completely, and to be honest after reading the luatex reference I couldn't see how to fix it. Perhaps it's just because it is late but....<br><br>with latex<br><br>\mathcode`a gives hex 7161<br><br>so that's mathalpha, letters char 61<br><br>with lualatex I get<br><br> 1E00061<br><br>but apart from the obvious 61 at the end I have no idea where that number comes from?<br><br><br>David<br><br><br><br><br><br><br></div></blockquote></div><br></div></body></html>