Tue Mar 10 21:47:08 2015, comment #1:
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`\^=7\catcode`\_=8}{}
and full example:
\documentclass[]{article}
\usepackage{cprotect}
\newenvironment{normalcatcodes}{\catcode`\^=7\catcode`\_=8}{}
\begin{document}
\begin{normalcatcodes}
\cprotect\fbox
{
\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
|