Comments (10)
related problems with vertical spaces (the second one can also be seen with tabularx instead of tabu):
https://tex.stackexchange.com/q/429272/87678
https://tex.stackexchange.com/questions/429307/problem-with-new-array-sty-colortbl-sty-and-tabu-sty
from latex2e.
Fix for the issues is most likely
\def\@xargarraycr#1{\unskip\gdef\do@row@strut
{\@tempdima #1\advance\@tempdima \dp\@arstrutbox
\vrule \@depth\@tempdima \@width\z@\global\let\do@row@strut\relax}%
\ifnum\@multicnt >\z@ \do@row@strut \fi\cr}
though that needs a bit more testing.
The colortbl patch as suggested by David in a rush may not be quite right but once done probably also fixes the other two mentioned cases (though not 100% sure of the tabu case yet)
from latex2e.
In addition to what @davidcarlisle already suggested as a patch to colortbl it needs a few more lines:
\def\@classz{\@classx
\@tempcnta \count@
\prepnext@tok
\expandafter\CT@extract\the\toks\@tempcnta\columncolor!\@nil
\@addtopreamble{%
\setbox\z@\hbox\bgroup\bgroup
\CT@everycr{}%
\ifcase \@chnum
\hskip\stretch{.5}\kern\z@
\d@llarbegin
\insert@column
\d@llarend\do@row@strut\hskip\stretch{.5}\or
\d@llarbegin \insert@column \d@llarend\do@row@strut \hfill \or
\hfill\kern\z@ \d@llarbegin \insert@column \d@llarend\do@row@strut \or
%% FMi: replace
\setbox\ar@mcellbox\vbox
\@startpbox{\@nextchar}\insert@column \@endpbox
\ar@align@mcell
\do@row@strut \or
% $\vcenter
% \@startpbox{\@nextchar}\insert@column \@endpbox $\or
\vtop \@startpbox{\@nextchar}\insert@column \@endpbox
%% FMi add
\do@row@strut
\or
\vbox \@startpbox{\@nextchar}\insert@column \@endpbox
%% FMi add
\do@row@strut
\fi
\egroup\egroup
\begingroup
\CT@setup
\CT@column@color
\CT@row@color
\CT@cell@color
\CT@do@color
\endgroup
\@tempdima\ht\z@
\advance\@tempdima\minrowclearance
\vrule\@height\@tempdima\@width\z@
\unhbox\z@}%
\prepnext@tok}
after that the examples on SX run for me.
from latex2e.
I still get slightly different output for this tabu
example:
\documentclass{article}
\usepackage{colortbl}
\usepackage{tabu}
\pagestyle{empty}
\begin{document}
\begin{tabu}{|l|X|}
\hline
Row 1 & \\
\hline
Row 2 & \\[5mm]
\hline
Row 3 & \\[5mm]
\hline
Row 4 & \\[5mm]
\hline
\end{tabu}
\end{document}
With array 2016/10/06 v2.4d
and colortbl 2012/02/13 v1.0a
I get:
With array 2018/04/07 v2.4g
including the patch in this thread and colortbl
from https://tex.stackexchange.com/q/429272/87678 with the patch from this thread added I get:
from latex2e.
This looks as if the new code corrects a bug in tabu. In your first output tabu added 10mm instead of 5mm.
from latex2e.
@dcpurton I think @u-fischer is right: looking into the generated page one sees a rule of with a depth of roughly twice of what is requested (plus roughly a baselineskip). With the new version (including the patches) that is gone. Replacing tabu with tabularx doesn't show that behavior (ie fine in both versions).
from latex2e.
@u-fischer and @FrankMittelbach, I agree, the old behaviour of tabu
does seem wrong (and I've even wondered about it before). It's a pity it will break old documents, but maybe that can't be helped. Thanks for dealing with this.
from latex2e.
I just fixed the array
part of the problem and will upload that the moment the internet connection is a bit more stable over here. I also arranged for the package to rollback to the 2017 behavior if there is a rollback request so that older documents should still show the wrong (but probably used) behavior with tabu
and the like.
In addition colortbl needs changing (as outlined above) so I pass that on to @davidcarlisle.
from latex2e.
I have updated colortbl, hopefully in a version that works with old or new array package code
from latex2e.
fixed with the recent updates
from latex2e.
Related Issues (20)
- fpeval expands past its argument HOT 2
- New command: \__kernel_set_arg_to_keyvalue:Nnn HOT 4
- amsmath: `{align}` inherits line-depth of above `{gather}`, results in incorrect vertical placement tags HOT 3
- `\disable@package@load` ready to be used by third-party classes? HOT 1
- \if@reversemargin wrongly documented in source code HOT 1
- expansion of key-value package options differ on the first and second call HOT 2
- \IfInstanceExistTF unavailable in 2024-06-01 pre-release 1 HOT 9
- Adding a .dir-locals.el to the project root directory HOT 5
- \afterpage from afterpage package broken with recent distribution HOT 3
- Changes in horizontal spacing in some equations HOT 3
- CamelCase or Pascal case? HOT 3
- array package exhibits a surprising spacing difference when math cells end in explicit spaces
- `flushright` isn't right in rtl paragraphs HOT 13
- Loading `textcomp` turns `LaTeX Info` messages into `Package textcomp Info` messages HOT 22
- Rollback declarations should be improved in several files HOT 2
- \textcircled and TS1 missing circle. HOT 2
- \resizebox* mentioned but unexplained in grfguide? HOT 6
- Error in multicolumn environment with footnotes per page HOT 1
- Incorrect numbering and positioning of footnotes with multicols environment. HOT 5
- \overrightarrow and \overleftarrow paragraph start + documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from latex2e.