[tex4ht] [bug #246] \usepackage{cprotect} generate extra strange letters not in text in HTML
Michal Hoftich
puszcza-hackers at gnu.org.ua
Tue Mar 10 22:47:14 CET 2015
Follow-up Comment #1, bug #246 (project tex4ht):
I will repost a workaround from TeX.sx:
-----------
>From cprotext documentation:
Will break if ^ does not have its usual catcode at the beginning and at
the end of the cprotected command. Also, will break if ^^E or ^^L change
catcodes. This choice of symbols can be changed by setting the options
gobbling-escape = hletter i, and gobbling-letter = hletter i. The defaults are
gobbling-escape = E and gobbling-letter = L.
it is well known issue that ^ character has changed catcode with tex4ht, so we
have to set it temporarily to the normal value. we may create environment,
which will have correct catcodes inside, so you can place problematic code
here
newenvironment{normalcatcodes}{catcode`^=7catcode`_=8}{}
and full example:
documentclass[]{article}
usepackage{cprotect}
newenvironment{normalcatcodes}{catcode`^=7catcode`_=8}{}
begin{document}
begin{normalcatcodes}
cprotectfbox
{
begin{minipage}[t]{textwidth}
This is a test
end{minipage}
}
end{normalcatcodes}
end{document}
------------
so this is another example of problems caused by redefined catcodes of `^` and
`_`. incidentally, I've found another one today:
http://tex.stackexchange.com/a/232373/2891
_______________________________________________________
Reply to this item at:
<http://puszcza.gnu.org.ua/bugs/?246>
_______________________________________________
Message sent via/by Puszcza
http://puszcza.gnu.org.ua/
More information about the tex4ht
mailing list