bugtex4ht - Bugs: bug #453, tex4ht has strange characters at...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #453: tex4ht has strange characters at end of section titles when using cprotect

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Sat 04 Apr 2020 08:46:55 PM EEST  
 
Category: NonePriority: 5 - Normal
Severity: 3 - MinorStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Tue 30 Jun 2020 01:24:41 AM EEST, comment #3:

think there is nothing more to do here, closing.

Karl Berry <karl>
Project Administrator
Sun 19 Apr 2020 03:20:12 AM EEST, comment #2:

Workaround is never to use the cprotect package in tex4ht.

Nasser M. Abbasi <nma123>
Sat 04 Apr 2020 10:02:08 PM EEST, comment #1:

Hi Nasser,

I don't think you need to use the \cprotect command. It just seems that \left and \right commands cause issues when used in sections in the mathjax mode. We need to disable them. I've already fixed the sources and posted a workaround on TeX.sx.

Best,
Michal

Michal Hoftich <michal_h21>
Project Member
Sat 04 Apr 2020 08:46:55 PM EEST, original submission:

reference:

https://tex.stackexchange.com/questions/536808/tex4ht-has-strange-characters-at-end-of-section-titles-when-using-cprotect

I use cprotect package so I can use math in section titles. It works OK in pdf, but tex4ht generates strange characters at end of section title.

If I do not use cprotect, then it will not compile in tex4ht.

Is there a way around this? MWE

-----------------
\documentclass[12pt,notitlepage]{book}
\usepackage{cprotect}
\usepackage{amsmath}
\begin{document}
\title{my book}
\chapter{Listing of integrals}
\cprotect\section{\quad $\int e^x \left(1-x^3+x^4-x^5+x^6\right) \, dx$}

stuff

\cprotect\section{\quad $\int \frac{e^{\frac{x}{2+x^2}} \left(2-x^2\right)}{2 x+x^3} \, dx$}
text
\end{document}
-------------------------

Compiled using

make4ht -ulm default t.tex "htm,3,mathjax,notoc*,p-width"

gives ^^E^^L at end of title.

If I do not use \cprotect then it gives compile error.

Using TL 2019.

Thanks
--Nasser

Nasser M. Abbasi <nma123>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by karl (Posted a comment)
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by nma123 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    1 latest change follows.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 30 Jun 2020 01:24:41 AM EESTkarlOpen/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray