davidcarlisle / dpctex

Assorted TeX packages
93 stars 30 forks source link

[Hhline/Colortbl] Move some code from 'colortbl' to 'Hhline' #13

Closed JDMCreator closed 4 years ago

JDMCreator commented 6 years ago

Hi David,

Would it be possible to move some colortbl 's features to hhline ? For example, colortbl allows users to use the >{...} column modifier with hhline. However, I think it should be a default feature for hhline.

Mainly, it would allow users to change the width of the rules inside a \hhline command without having to load colortbl package. Something like this :

\hhline{->{\setlength{\arrayrulewidth}{0.8pt}}-}

I think it is absurd to load colortbl to be able to do this kind of tricks that are not related to color inside tables. As the developper of a LaTeX table generator, I would like to include a feature to control the width of specific rules, but this is an important limitation.

Thank you,

Xavier

davidcarlisle commented 6 years ago

On 16 May 2018 at 20:26, JDMCreator notifications@github.com wrote:

Hi David,

Would it be possible to move some colortbl 's features to hhline ? For example, colortbl allows users to use the >{...} column modifier with hhline. However, I think it should be a default feature for hhline.

Mainly, it would allow users to change the width of the rules inside a \hhline command without having to load colortbl package. Something like this :

\hhline{->{\setlength{\arrayrulewidth}{0.8pt}}-}

I think it is absurd to load colortbl to be able to do this kind of tricks that are not related to color inside tables. As the developper of a LaTeX table generator http://latex-tables.com, I would like to include a feature to control the width of specific rules, but this is an important limitation.

Thank you,

Xavier

Possibly, although there are always costs in changing any code after such a length of time you are bound to break some package that is patching it in some way and relying on a specific form

Also I don't think it really reliably works to change arrayrulewidth mid-line does it? certainly I never tested that, for horizontal rules if later segments of the line are wider than the whole hhline will take up more vertical space and so vertical lines will not touch any "thin" parts of the rule. For vertical rule segments any | or : or # segments would have a width different to the width of the lines in the main part of the table

It would probably be safer if you used a modified/extended version under a different name, it's only 60 or so lines of code, at least that's my initial thought without running any tests

David

JDMCreator commented 6 years ago

Hi David,

You raised some great points and I jumped on LaTeX to run some tests and it seems, in fact, that changing \arrayrulewidth inside \hhline doesn't have any effect, which is kind of sad. I don't know why I had in mind that it was the case.

davidcarlisle commented 4 years ago

closing this, at some point a more sensible table setup that didn't involve colortbl overwriting more or less the entire hhline package should be made, but probably needs to be part of a general tabular over-haul not just by adding individual features.