bugtex4ht - Bugs: bug #442, Bugs from cmidrule of booktabs

 
 
Show feedback again

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

bug #442: Bugs from cmidrule of booktabs

Submitted by:  Alex Watson <rotprsl2>
Submitted on:  Sun 20 Oct 2019 11:43:11 PM EEST  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Tue 30 Jun 2020 01:26:25 AM EEST, comment #3:

think there is nothing more to do here, closing.

Karl Berry <karl>
Project Administrator
Wed 18 Dec 2019 12:45:45 AM EET, comment #2:

I've finally took a look at this issue, sorry for the delay. There are two issues. The easier one can be fixed in the TeX4ht code. There was just wrong CSS instruction that caused drawing of the line over the whole row that contains the \cmidrule. It should be fixed in the sources now. The fix is also in the attached .cfg file.

The secong issue is worse - it seems that each \cmidrule inserts separate row, so even if the lines have correct width, they are not aligned vertically. I've created Lua filter that should join rows created from one \cmidrule into one.

It seems to work on your sample document.

(file #331, file #332)

Michal Hoftich <michal_h21>
Project Member
Wed 23 Oct 2019 12:11:37 AM EEST, comment #1:

Thanks for the report. I will look at this probably after I release the new make4ht version, as it keeps me quite busy right now.

Michal Hoftich <michal_h21>
Project Member
Sun 20 Oct 2019 11:43:11 PM EEST, original submission:

The attached tex file, and html generated by ` make4ht -uf html5+tidy ht-tabular-book.tex`, illustrates some issues with \cmidrule from booktabs.

(I did not use the build.lua file from bug #441, to avoid complicating matters, but it does not affect this bug.)

The first table is 6 columns wide and contains a single \cmidrule{2-3}. There are two problems:
(1) the cmidrule should be over columns 2-3, but it is over columns 1-3 instead.
(2) the HTML is not valid -- the cmidrule produces a tr containing a td spanning 1 column and a td spanning 2 columns. But the table is 6 columns wide.

I note that 'rule' effect is achieved with a CSS border applied to the tr, not the relevant td, which might explain (1).

The second table contains multiple non-overlapping \cmidrules, not an uncommon use-case for booktabs, which should appear side by side. In addition to the problems above, each \cmidrule gets its own tr, which means that they appear stacked on top of each other.

Finally - this may be more of a feature request than a bug, and it applies to the other rules too - is it the right thing semantically to have separate tr to put rules in? For instance, you would not want a screenreader to read out an extra row in this situation.

Alex Watson <rotprsl2>

 

Attached Files
file #331:  cmidrule.lua added by michal_h21 (3kB - text/x-lua)
file #332:  hej.cfg added by michal_h21 (353B - application/octet-stream)
file #327:  ht-tabular-book.html added by rotprsl2 (4kB - text/html)
file #328:  ht-tabular-book.tex added by rotprsl2 (471B - text/x-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 (Posted a comment)
  • -unavailable- added by rotprsl2 (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):

     

     

    5 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 30 Jun 2020 01:26:25 AM EESTkarlOpen/ClosedOpen=>Closed
    Wed 18 Dec 2019 12:45:45 AM EETmichal_h21Attached File-=>Added cmidrule.lua, #331
      Attached File-=>Added hej.cfg, #332
    Sun 20 Oct 2019 11:43:11 PM EESTrotprsl2Attached File-=>Added ht-tabular-book.html, #327
      Attached File-=>Added ht-tabular-book.tex, #328
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray