[tex4ht] Why tex4ht changes apostrophe to Right Single Quotation Mark?

Nasser M. Abbasi nma at 12000.org
Tue Jan 9 06:33:53 CET 2018


In Matlab, a string is something with apostrophe around it:

x='this is string'

Using '  character (the thing below " on standard keyboard).

When I compile this, even inside verbatim, the HTML comes
out looking like

x=’this is string’

This is a problem. Since now when I copy the above from
the HTML page to Matlab, it gives error. Since now it is
no longer a string.

The problem seems to be that ' has unicode ’ but
this is also the same code for Right Single Quotation Mark?

So why does it appear as ’ on the web page, when inside
the plain text file it appears as '   ?

And what should one do to keep '  showing as ' in HTML?

Here is MWE

------------------------------------------
\documentclass[11pt]{article}
\begin{document}

Why make4ht changes ' to  Right Single Quotation Mark \verb’|?
It also does it in \verb|'| and verbatim:

\begin{verbatim}
x='this is string'
\end{verbatim}

\end{document}
---------------------

Compiled using make4ht foo.tex

This is what the HTML looks like

--------------
<?xml version="1.0" encoding="iso-8859-1" ?>
....
x=’this&#x00A0;is&#x00A0;string’
--------------

Even when I compile using

make4ht -u foo.tex

The problem is still there
-----------
<?xml version="1.0" encoding="utf-8" ?>

</p>
    <div class="verbatim" id="verbatim-1">
x=’this is string’
</div>
-----------------

What do I need to do to keep apostrophe as apostrophe
in the HTML?

Using tex4ht 2017 on Linux.

Thanks
--Nasser




More information about the tex4ht mailing list