bugtex4ht - Bugs: bug #215, package titlesec causes tex4ht to...

 
 
Show feedback again

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

bug #215: package titlesec causes tex4ht to give error when using $[]$ in section title

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Sat Jun 21 16:22:13 2014  
 
Category: NonePriority: 5 - Normal
Severity: 3 - MinorStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Tue Jul 15 00:04:08 2014, comment #2:

Thanks Michal, you are a wizard. Committed to tex4ht + TL.

BTW, it's certainly not required, but thought I'd menion ... it would be an additional help if you could draft the ChangeLog entry to go along with patches.

Karl Berry <karl>
Project Administrator
Mon Jul 14 14:51:35 2014, comment #1:

I posted detailed answer at TeX.sx[1], the issue is not math in section title, but '[]' braces.

Simple fix for this is to enclose second argument in

\ttl:straight@i{#1}[#2]{#3}%

in a group:

\ttl:straight@i{#1}[{#2}]{#3}%

patch for tex4ht literate sources is attached.

[1] http://tex.stackexchange.com/a/185892/2891

(file #175)

Michal Hoftich <michal_h21>
Project Member
Sat Jun 21 16:22:13 2014, original submission:

This MWE fails when using $[B]$ in section title when the package titlesec is loaded

\documentclass[]{article}%
\usepackage{titlesec}
\begin{document}
\section{this is my $[B]$ section}
test
\end{document}

Error is

htlatex foo.tex

(/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)
(/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))
(./foo.aux)
! Extra }, or forgotten $.
<recently read> }

l.4 \section{this is my $[B]$ section}
?

When commenting the titlesec package, it compiles OK. Also, If I load the package, but change the title to $(B)$ instead of $[B]$ then it compiles OK as well. Only when using [] it is not happy.

The above MWE compiles OK with pdflatex and latex.

Version 3.14159265-2.6-1.40.15 (TeX Live 2014)

reference:

http://tex.stackexchange.com/questions/185866/why-package-titlesec-causes-tex4ht-to-give-error-when-using-in-section-titl/185892#185892

Nasser M. Abbasi <nma123>

 

Attached Files
file #175:  titlesec.patch added by michal_h21 (423B - text/x-patch - Patch for tex4ht-4ht.tex)

 

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 (Updated the item)
  • -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):

     

     

    2 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Jul 15 00:04:08 2014karlOpen/ClosedOpen=>Closed
    Mon Jul 14 14:51:35 2014michal_h21Attached File-=>Added titlesec.patch, #175
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray