bugtex4ht - Bugs: bug #259, mathtools and starred version of a...

 
 
Show feedback again

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

bug #259: mathtools and starred version of a DeclarePaireDelimiter macro

Submitted by:  Nicolas Richard <youngfrog>
Submitted on:  Mon Jul 20 09:46:33 2015  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri Oct 6 09:51:44 2023, comment #2:

The original code seems to work now.

Michal Hoftich <michal_h21>
Project Member
Mon Aug 3 13:15:38 2015, comment #1:

I dno't really know what is the issue, but it seems that this code is the culprit:

\mathopen{}\mathclose\bgroup ##1 ##2 \aftergroup\egroup ##3
and the parameters are {left(}{expression}{\right)}

The problem is that it is declared as macro at the time of calling \DeclarePairedDelimiter, which is in the preamble in your case. As configurations from .4ht files are included after the preamble, we probably can't configure that. One solution which is possible is to use alternative4ht package from helpers4ht bundle[1], for which I provided some configurations[2].

Modified file which works for me:

\documentclass{article}
\usepackage{alternative4ht}
\altusepackage{mathtools}
\makeatletter
\makeatother
\DeclarePairedDelimiter{\paren}{(}{)}
\begin{document}
Examples:

eq1: $c^{2} \paren{a^{2}+b}$ !

eq2: $c^{2} \paren*{a^{2}+b}$ !
\end{document}

I am curious that there aren't any way to provide configurations for commands in the preamble, at least I don't know about any :(

[1] https://github.com/michal-h21/helpers4ht
[2] https://github.com/michal-h21/helpers4ht/blob/master/alt-packages/mathtools-alt4ht.sty

Michal Hoftich <michal_h21>
Project Member
Mon Jul 20 09:46:33 2015, original submission:

Running htlatex on the sample file below shows that the non-starred version of \paren is rendered ok, but the starred version is made into a subscript.

Trying to run "htlatex xhtml,mathml" on it produces an error. I guess the two problems are related.

\documentclass{article}
\usepackage{mathtools}
\DeclarePairedDelimiter{\paren}{(}{)}
\begin{document}
Examples:

eq1: $c^{2} \paren{a^{2}+b}$ !

eq2: $c^{2} \paren*{a^{2}+b}$ !
\end{document}

Nicolas Richard <youngfrog>

 

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 youngfrog (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
    Fri Oct 6 09:51:44 2023michal_h21Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray