<div dir="ltr"><div class="gmail_extra">Dear Michal,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Wonderful, thank you! It worked perfectly. Thank you for your help!</div><div class="gmail_extra"><br></div><div class="gmail_extra">Best wishes,</div><div class="gmail_extra">Alex</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 11, 2018 at 1:04 PM, Michal Hoftich <span dir="ltr"><<a href="mailto:michal.h21@gmail.com" target="_blank">michal.h21@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Alex,<br>
<span class=""><br>
<br>
> When I have `\textsuperscript{r}` in my document, tex4ht produces output<br>
> that elevates the "r" not by using Word's "superscript" feature (Format ><br>
> Font... > Effects > Superscript). Instead it seems to decrease the font size<br>
> manually (from 12pt to 9.5pt) and elevate it some other way. (Example input<br>
> and output attached.) The result is unfortunate, because this elevated "r"<br>
> disrupts the document's overall line spacing. I am also concerned that the<br>
> publisher's software won't know what to do with it, so that it will continue<br>
> to look bad.<br>
><br>
<br>
</span>I think this issue is on Word's side. tex4ht creates text styled with<br>
style:text-position="super 80\%" property. LibreOffice can display it<br>
correctly. I also compared code created by LibreOffice when I created<br>
a superscript manually and it seems that the only difference is that<br>
it uses "super 58%" as a value for text-position property. When I<br>
tried to change the tex4ht style to use this value, Word could open it<br>
as well. So it seems that Word has some hard-coded rules that<br>
superscript is only text with "super 58%" text-position.<br>
<br>
Anyway, I don't think that 80% which tex4ht uses has any deep meaning,<br>
so we can use 58% instead. I also found that there was missing for<br>
\textsubscript, which is now part of LaTeX core, so I added the<br>
support for it to both ooffice and HTML formats.<br>
<br>
You can use the following config file until the update gets to TeX Live:<br>
<br>
\Preamble{xhtml}<br>
\Configure{textsuperscript}<br>
{\HCode{<text:span text:style-name="<wbr>textsuperscript">}}<br>
{\HCode{</text:span>}}<br>
\OOstyles{%<br>
<style:style style:name="textsuperscript" style:family="text">\Hnewline<br>
<style:text-properties style:text-position="super 58\%"/>\Hnewline<br>
</style:style>\Hnewline<br>
}<br>
\begin{document}<br>
\EndPreamble<br>
<br>
<br>
Best regards,<br>
Michal<br>
</blockquote></div><br></div></div>