I have a fancy table in the following MWE, and for the life of me I cannot remove the cell in the lower left corner, and I cannot split lines within cells (I want to split "Ovulation date" and "Poor barrier" in two lines). Check the Beamer MWE below:



\mode<presentation> {


    \begin{tabular}{@{}A|B|A|B|A}%remove indent
        \arraycolor{White}\bfseries {\tiny Subject} & \arraycolor{White}\bfseries {\tiny Dry} & \arraycolor{White}\bfseries {\tiny Ovulation date} & \arraycolor{White}\bfseries {\tiny Oiliest} & \arraycolor{White}\bfseries {\tiny Poor barrier}\\
        \bfseries {\tiny 2007} & {\tiny 8, 36} & {\tiny 14} & {\tiny 22} & {\tiny 26}\\
        & \bfseries {\tiny I - DR} & \bfseries {\tiny II - OP} & \bfseries {\tiny III - OL} & \bfseries {\tiny IV - PB}



With this kind of table, I would need to learn how to:

  • Remove cells

  • Split lines within cells


Something like this? (Note that I've removed all \tiny directives.)

enter image description here

(Insert the instruction \renewcommand{\tabularxcolumn}[1]{m{#1}} after loading tabularx if the header cells need to be centered vertically rather than top-aligned.)




        \arraycolor{White}\bfseries Subject &
        \arraycolor{White}\bfseries Dry & 
        \arraycolor{White}\bfseries Ovulation date &
        \arraycolor{White}\bfseries Oiliest &
        \arraycolor{White}\bfseries Poor barrier \\
        \bfseries 2007 &  8, 36 & 14 & 22 & 26 \\
        \multicolumn{1}{c}{\cellcolor{white}} % for a "blank" cell
        & \bfseries I - DR 
        & \bfseries II - OP 
        & \bfseries III - OL 
        & \bfseries IV - PB \\
  • Thanks it works awesome! But I don't really understand how the line breaks work... for cases with longer texts in a cell, is there a way to specify the breaks wherever I want? – DaniCee Dec 5 '17 at 8:36
  • @DaniCee - The X column type performs automatic line breaking — if needed. (For the example at hand, line breaking was needed in 2 of the 5 header cells.) The table you’ve designed isn’t really suitable for longer blocks of text, is it? Selecting the optimal linebreak points in a longer block of text will likely require some fine-tuning by hand. – Mico Dec 5 '17 at 9:04
  • 1
    Aside: I just noticed that this answer was the 4,500th answer I've posted on TeX.SE since joining the site in mid-2011. It's a great community, for sure. I feel privileged to be able to make some contributions. :-) – Mico Dec 5 '17 at 9:19
  • 3
    Congrats on your 4,500th answer!! – DaniCee Dec 5 '17 at 9:21
  • 2
    @DaniCee: To break the contents of a X or p cell at a specific point, just tyst type \newline (or define a shortcut like \nl). – Bernard Dec 5 '17 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.