I need to set minimal table (one-row table) height, and valign content inside it. For this prupose i wrap tabular
in parbox
in tabular i have correct valign
, and parbox gives me min height.
My question is - how to valign table in parbox (or to make it with me minipage, but then - how to make a min height)?
Here is the example code (it's the same in prev question :) ) : how to valign table (here it's in the header)
\documentclass{book}
\usepackage{fancybox,fancyhdr}
\usepackage[T1]{fontenc}
\usepackage[dvipsnames]{xcolor}
\usepackage[left=72pt,right=72pt,
headheight=124pt,
top=\dimexpr124pt+\headsep\relax,% <- added
textheight =540pt
]{geometry}
\usepackage{array}
\newcolumntype{L}[2]{>{\raggedright\arraybackslash}{#2}{#1}}
\fancyhf{}
\fancyhead[C]{%
\sbox{0}{\parbox{\textwidth}{\begin{tabular}{@{}L{\textwidth}{p}@{}}Non-disclosure agreement (NDA)\end{tabular}}}%
\ifdim\dimexpr\ht0+\dp0<124pt \dp0\dimexpr124pt-\ht0\fi
\makebox{\usebox{0}}%
}
\usepackage{lipsum}
\usepackage{showframe}
\begin{document}
\pagestyle{fancy}
\lipsum
\end{document}
Due to comments: common task is to make a table with one raw and several columns and valign-halign and fixed minimal height. In my example i use only one column to make task less complicated
Non-disclosure agreement
) but also the setting of the depth of the box afterwards. perhaps you just want\fancyhead[C]{\rule{0pt}{124pt}Non-disclosure agreement (NDA)}
but I really can not guess. – David Carlisle Apr 27 '17 at 10:14