<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir="ltr" data-setdir="false">This bug bit me again and was enough for me to take a look at <a href="https://sourceforge.net/p/xetex/bugs/185/" rel="nofollow" target="_blank" class="enhancr_card_7570941375">XeTeX - Unicode-based TeX / Bugs / #185 Unwanted line break with \raggedleft, \centering or \raggedright</a> <br></div><div><br></div><div id="ydp2b48bbdenhancr_card_7570941375" class="ydp2b48bbdyahoo-link-enhancr-card ydp2b48bbdyahoo-link-enhancr-not-allow-cover ydp2b48bbdymail-preserve-class ydp2b48bbdymail-preserve-style" style="max-width:400px;font-family:"YahooSans VF", YahooSans, "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif" data-url="https://sourceforge.net/p/xetex/bugs/185/" data-type="YENHANCER" data-size="MEDIUM" contenteditable="false"><a href="https://sourceforge.net/p/xetex/bugs/185/" style="text-decoration-line: none !important; text-decoration-style: solid !important; text-decoration-color: currentcolor !important; color: rgb(0, 0, 0) !important;" class="ydp2b48bbdyahoo-enhancr-cardlink" rel="nofollow" target="_blank"><table border="0" class="ydp2b48bbdcard-wrapper ydp2b48bbdyahoo-ignore-table" cellpadding="0" cellspacing="0" style="max-width:400px"><tbody><tr><td width="400"><table border="0" class="ydp2b48bbdcard ydp2b48bbdyahoo-ignore-table" cellpadding="0" cellspacing="0" width="100%" style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224, 228, 233);border-radius:2px"><tbody><tr><td><table border="0" class="ydp2b48bbdcard-info ydp2b48bbdyahoo-ignore-table" cellpadding="0" cellspacing="0" style="background-color: rgb(255, 255, 255); background-repeat: repeat; background-attachment: scroll; background-image: none; background-size: auto; position: relative; z-index: 2; width: 100%; max-width: 400px; border-radius: 0px 0px 2px 2px; border-top: 1px solid rgb(224, 228, 233);"><tbody><tr><td style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px"></td><td style="vertical-align:middle;padding:12px 24px 16px 12px;width:99%;font-family:"YahooSans VF", YahooSans, "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;border-radius:0 0 2px 0"><h2 class="ydp2b48bbdcard-title" style="font-size: 14px; line-height: 19px; margin: 0px 0px 6px; font-family: "YahooSans VF", YahooSans, "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif; color: rgb(29, 34, 40); max-width: 314px;">XeTeX - Unicode-based TeX / Bugs / #185 Unwanted line break with \ragged...</h2><p class="ydp2b48bbdcard-description" style="font-size: 12px; line-height: 16px; margin: 0px; color: rgb(151, 158, 168);"></p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div><br></div><div dir="ltr" data-setdir="false">Looking though the xetex code there is a rounding in D2Fix {double to Fixed} function, which does a (int)(d * 65556.0 + 0.5). It is this rounding which causes the issue and removing the +0.5 fixes the example in the bug report and in my examples. However I don't know what side effects this change has, but having rerun it over document I was originally working on (<a href="https://wormhole.hepazulian.net/public/texworks/dq2020e.pdf" rel="nofollow" target="_blank">https://wormhole.hepazulian.net/public/texworks/dq2020e.pdf</a>) I can't see any immediate problems. I would need to run it though both lualatex and xelatex and compare the results but that is for another day.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Regards,</div><div dir="ltr" data-setdir="false">Ross<br></div><div><br></div><div id="yahoo_quoted_8174793552" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Wednesday, 31 January 2024 at 02:02:15 GMT, Bruno Voisin <bruno.voisin@univ-grenoble-alpes.fr> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div dir="ltr">> Ross Alexander wrote:<br></div><div dir="ltr">> <br></div><div dir="ltr">> Many thanks to everybody who replied and apologies on not finding the outstanding issue. I took at look at using math mode in tabulararry but I think the most straight forward solution is to replace the hyphen with a unicode MINUS SIGN in the tables.<br></div><div dir="ltr"><br></div><div dir="ltr">LaTeX defines a \textminus for the minus sign. When using XeTeX and LuaTeX it's set as "2212 (Unicode minus) in tuenc.def.<br></div><div dir="ltr"><br></div><div dir="ltr">For the inch symbol, wikipedia seems to say the glyph to use is the double prime, "2033. Latin Modern Roman doesn't have it, but Latin Modern Math does, and unicode-math defines a \dprime for it in unicode-math-table.tex. So something like<br></div><div dir="ltr"><br></div><div dir="ltr">\newcommand{\inchsymbol}{\ensuremath{\dprime}}<br></div><div dir="ltr"><br></div><div dir="ltr">after loading unicode-math would do the trick.<br></div><div dir="ltr"><br></div><div dir="ltr">See the attached modified version of your input file.<br></div><div dir="ltr"><br></div><div dir="ltr">Bruno<br></div><div dir="ltr"><br></div></div>
</div>
</div></div></body></html>