[tex4ht] [bug #246] \usepackage{cprotect} generate extra strange letters not in text in HTML

2023-10-19 Thread Michal Hoftich
Update of bug #246 (project tex4ht):

 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #246] \usepackage{cprotect} generate extra strange letters not in text in HTML

2023-10-18 Thread Michal Hoftich
Follow-up Comment #2, bug #246 (project tex4ht):

I know this is super old, but I've found a fix for the Cprotect package and
pushed them to the source. We just need to define the \CPT@hat@hat@E@hat@hat@L
command with correct catcodes.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] [bug #246] \usepackage{cprotect} generate extra strange letters not in text in HTML

2015-03-10 Thread William F Hammond
Previously:

> ...
> 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 

This strikes me as a rather compelling example illustrating why
formal LaTeX profiles should be used.

Just saying  :-)

-- Bill



[tex4ht] [bug #246] \usepackage{cprotect} generate extra strange letters not in text in HTML

2015-03-10 Thread Michal Hoftich
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:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #246] \usepackage{cprotect} generate extra strange letters not in text in HTML

2015-03-10 Thread Nasser M. Abbasi
URL:
  

 Summary: \usepackage{cprotect} generate extra strange letters
not in text in HTML
 Project: tex4ht
Submitted by: nma123
Submitted on: Tue 10 Mar 2015 09:57:05 PM EET
Category: None
Priority: 5 - Normal
Severity: 3 - Minor
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any

___

Details:


reference:
http://tex.stackexchange.com/questions/232395/why-tex4ht-generate-funny-looking-extra-characters-when-using-usepackagecprote

this MWE


\documentclass[]{article}
\usepackage{cprotect}
\begin{document}
\cprotect\fbox
{
\begin{minipage}[t]{\textwidth}
  This is a test
\end{minipage}
}
\end{document}
-

compiled with htlatex foo.tex  generates HTML with extra characters not in the
latex file. The HTML generated is

http://www.w3.org/TR/html4/loose.dtd";>  
 
 
 
http://www.tug.org/tex4ht/)"> 
http://www.tug.org/tex4ht/)"> 
 
 
 
 

   This is a test
ˆˆEˆˆL

 

File list is

 *File List*
 article.cls2014/09/29 v1.4h Standard LaTeX document class
  size10.clo2014/09/29 v1.4h Standard LaTeX file (size option)
  tex4ht.sty
cprotect.sty2011/01/27 v1.0e (Bruno Le Floch)
  ifthen.sty2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
  suffix.sty2006/07/15 1.5a Variant command support
 ***

Screen image is in the above post.

texlive 2014






___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/