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 Apr 4 17:46:55 2020  
Category: NonePriority: 5 - Normal
Severity: 3 - MinorStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon Jun 29 22:24:41 2020, comment #3:

think there is nothing more to do here, closing.

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

Workaround is never to use the cprotect package in tex4ht.

Nasser M. Abbasi <nma123>
Sat Apr 4 19:02:08 2020, 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.


Michal Hoftich <michal_h21>
Project Member
Sat Apr 4 17:46:55 2020, original submission:



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

\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$}


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

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.


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
    Mon Jun 29 22:24:41 2020karlOpen/ClosedOpen=>Closed
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup+gray