bugtex4ht - Bugs: bug #439, adding \pagestyle{fancy} gives...

 
 
Show feedback again

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

bug #439: adding \pagestyle{fancy} gives compile error with tex4ht

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Tue 08 Oct 2019 12:22:18 AM EEST  
 
Category: NonePriority: 5 - Normal
Severity: 3 - MinorStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Tue 08 Oct 2019 02:14:01 PM EEST, comment #1:

Hi Nasser,

I've posted my answer with more details on TeX.sx. The issue is that Fancyhdr redefines some sectioning commands and it clashes with tex4ht. I've pushed a fix to the sources.

Michal Hoftich <michal_h21>
Project Member
Tue 08 Oct 2019 12:22:18 AM EEST, original submission:

reference:

https://tex.stackexchange.com/questions/511350/why-adding-pagestylefancy-gives-compile-error-with-tex4ht

This MWE

---------------
\documentclass[12pt]{article}%
\usepackage{fancyhdr}
\pagestyle{fancy}

\begin{document}
\section{$\cos \left(x\right)$}
test
\end{document}
-----------------

Gives this error

------------
make4ht foo1.tex
........
(/usr/local/texlive/2019/texmf-dist/tex/generic/tex4ht/html4-math.4ht)
(/usr/local/texlive/2019/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./foo1.aux)
! Argument of \im:g has an extra }.
<inserted text>
\par
l.6 \section{$\cos \left(x\right)$}

?
-----------------

commenting out \pagestyle{fancy} the error goes away.

Also, which is more interesting, changing \section{$\cos \left(x\right)$} to \section{$\cos x$} the error goes away! i.e.

----------------
\documentclass[12pt]{article}%
\usepackage{fancyhdr}
\pagestyle{fancy}

\begin{document}
\section{$\cos x$}
test
\end{document}
----------------

No error. So it looks like it is the use of \left and \right is what caused the problem for text4ht when using fancyhrd

TL 2019 with latest updates as of 2 days ago.

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 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):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray