bugtex4ht - Bugs: bug #616, \downarrow is not centered in...

 
 
Show feedback again

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

bug #616: \downarrow is not centered in table when using tex4ht with column type centered paragraph

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Wed Nov 22 08:45:13 2023  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed Nov 22 10:37:14 2023, comment #1:

I've posted my answer to TeX.sx. Unfortunately, I have only a workaround for this issue, as the column specification for the C column isn't passed down to TeX4ht by the Array package.

Michal Hoftich <michal_h21>
Project Member
Wed Nov 22 08:45:13 2023, original submission:

reference and screen shot at

https://tex.stackexchange.com/questions/701975/downarrow-is-not-centered-in-table-when-using-tex4ht-with-column-type-centered

I am making a table, with one column. The table is centered. The column type is centered paragraph.

I am using \downarrow for annotation between each row to indicate transformation made.

In pdf, everything is centered. But in HTML, the math is centered, but the arrows are not. This happens only when I use column type as centered paragraph. If I use just c, then the arrows are centered.

But I have to use centered paragraph and not c for column type, because I am using displayed math in table, which needs paragraph. I am using displayed math because the math is little larger and easier to read.

Here is an example that works same way in PDF and HTML, which using c. Then below that I show an example which does not work in HTML when I change the column type to centered paragraph

-----------------
\documentclass[12pt,oneside]{book}

%added nov 23, 2023 to enlarge vertical arrow.
%https://tex.stackexchange.com/questions/213811/how-to-elongate-down-arrow
\newcommand{\xdownarrow}[1]{%
{\left\downarrow\vbox to #1{}\right.\kern-\nulldelimiterspace}
}
\usepackage{amsmath}

\begin{document}

\begin{table}
\centering
\begin{tabular}{c}
$\int \frac{e^{x+e^x} \left(e^x+1\right)}{x+e^x} \, dx$\\
$\Big\downarrow$ 7258\\
$\int \frac{e^{x+e^x}}{x+e^x}d\left(x+e^x\right)$\\
$\Big\downarrow$ 2609\\
$\operatorname{ExpIntegralEi}\left(x+e^x\right)$
\end{tabular}
\end{table}
\end{document}
-----------------------

Compiling with lualatex and with tex4ht using

make4ht -ulm default -a debug foo.tex "mathjax,htm,nostyle"

Output is similar. good. arrows are centered as well as table and math.

enter image description here

Now I modified the MWE to using column type centered paragraph so I can use display math

---------------------------
\documentclass[12pt,oneside]{book}
%added nov 23, 2023 to enlarge vertical arrow.
%https://tex.stackexchange.com/questions/213811/how-to-elongate-down-arrow
\newcommand{\xdownarrow}[1]{%
{\left\downarrow\vbox to #1{}\right.\kern-\nulldelimiterspace}
}

\usepackage{array}
%see https://tex.stackexchange.com/questions/12703/how-to-create-fixed-width-table-columns-with-text-raggedright-centered-raggedlef
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\usepackage{amsmath}

\begin{document}

\begin{table}
\centering
\begin{tabular}{C{\textwidth}}
$\displaystyle \int \frac{e^{x+e^x} \left(e^x+1\right)}{x+e^x} \, dx$\\
$\Big\downarrow$ 7258\\
$\displaystyle \int \frac{e^{x+e^x}}{x+e^x}d\left(x+e^x\right)$\\
$\Big\downarrow$ 2609\\
$\displaystyle \operatorname{ExpIntegralEi}\left(x+e^x\right)$
\end{tabular}
\end{table}
\end{document}
---------------------------

Now lualatex gives

enter image description here

But tex4ht gives using same command as above this:

enter image description here

The arrows for some reason no longer are centered like in PDF.

Is there an easy workaround for this?

TL 2023 updated about 2 months 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):

     

     

    1 latest change follows.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Dec 19 11:47:14 2023michal_h21Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray