SWP 6.0.27 Creating math underbars

jm's picture

The attached note illustrates an issue with creating underbars to math characters in SWP 6.0.27.

Is the behavior it describes that intended for SWP 6?

SWP6027Underbar.sci65.42 KB

The underline character macro

The underline character macro is \b, and this is a text only macro.  Version 5.5 prevents adding the underscore to a character in math mode.  Version 6 does not, but the rendering is correct.  If you notice the generated LaTeX, it is $\b{s}$ and this typesets as upright. 

jm's picture

I have just checked a

I have just checked a document created in SWP 5.5 where the LaTeX is $\underline{s}\!$. I recall creating this by adding the underscore to the character in math mode. Be that as it may, when I imported it into SWP 6.0.27, it was rendered as in the attached PDF document.

With that rendering, the underbar does not appear on-screen (though it does in PDF), which indicates that SWP 6.0.27 is not showing properly on-screen what will appear in PDF. It would be great if that were fixed so that the screen shows what will actually appear in PDF.

Incidentally, exporting that MathML code to TeX renders it as $\underline{s}\/$, which is slightly different from the original TeX $\underline{s}\!$.

I have reported the problem

I have reported the problem with importing $\underline{x}$ not displaying the underline.  Deleting the <mrow> object around the <mo stretchy="true">̲  in the source view does display the underline without changing what is exported.

I was not able to reproduce your report of the negative thinspace being exported as an italic correction.  Was there something else in the document after what you show? 

jm's picture

Thanks for the explanation. I

Thanks for the explanation.

I attach 3 files that illustrate the imported negative thinspace being exported as an italic correction.
SWP6027UnderbarToImport.tex is a source TeX file
SWP6027UnderbarImport.sci is the file resulting from using Import TeX in SWP 6.0.27
SWP6027UnderbarExport.tex is the TeX file that results from using Export TeX in SWP 6.0.27

Notice that:
1. as already discussed, the imported $\underline{x}$ is not displaying the underline in SWP 6.0.27;
2. "\!" towards the end of the paragraph in SWP6027UnderbarToImport.tex has been replaced by "\/" in SWP6027UnderbarExport.tex.

I hope this helps you locate the source of the discrepancy.