AnswerBun.com

Vertical space at the bottom of nested tabulars

I’m trying to make a macro which typeset a text "accross a vertical line", and I’m using a tabular for that :

documentclass{article}

begin{document}

makeatletter

[email protected]

[email protected][3]{parbox[c][#1][c]{#2}{makebox[#2][c]{#3}}} 

[email protected]@[email protected][1]{%
  settowidth{[email protected]}{$#1$}%
  begin{tabular}{@{hspace{0pt}}[email protected]{hspace{0pt}}}%
    rule{5pt}{8mm}\%
    [email protected]{8mm}{[email protected]}{#1}\%
    rule{5pt}{8mm}\%[-4pt]%
  end{tabular}%
}

begin{tabular}{|c|c|}
  hline
  $1$ & $2$ \
  hline
  [email protected]@[email protected]{0} & 2 \
  hline  
end{tabular}

end{document}

There’s a tiny space at the bottom, which I think is related to arraystretch.

But if I set defarraystretch{0}, the first line is stretched (at the very worst, I could put a strut there), and if I try to uncomment the \[-4pt], the cells are not aligned vertically anymore.

TeX - LaTeX Asked on December 8, 2021

0 Answers

Add your own answers!

Related Questions

Use .sty in IguanaTex

1  Asked on May 20, 2021

 

Genealogytree: “black” edges are not black

2  Asked on May 20, 2021 by astianthus-viminalis

   

How to create a comment in Latex?

1  Asked on May 20, 2021

   

Package for chemistry assemblies

0  Asked on May 19, 2021

 

Change header in bibliography – bibtex

1  Asked on May 19, 2021 by elidor00

     

Incorporate .html plots

0  Asked on May 19, 2021

   

Make node size independent of content?

1  Asked on May 19, 2021 by flawr

 

Texmaker does not edit pdf file

0  Asked on May 19, 2021 by dvtpetrosyan

     

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.