How can I insert a framed box inside a table?
- The optional argument of
\tabular
orarray
isn't a placement option. The optional argument set the vertical alignment oftabular
. Working parameters areb
,t
andc
. fbox
works like ahbox
and you can use vertical space inside a singlehbox
. You can combine two rules for specifying the width and height.\fbox{\rule{2cm}{0pt}\rule{0pt}{5cm}}
You can also set a single
minipage
insidefbox
with a width and length.
Here is one possibility:
\documentclass{scrartcl}
\usepackage{array}
\begin{document}
\begin{tabular}{cm{5cm}m{5cm}c}
fingerprint & & & fingerprint \\
\smash{\fbox{\rule{2cm}{0pt}\rule[-3cm]{0pt}{3cm}}} & Signature 1 & \rule{5cm}{.5pt} & \smash{\fbox{\rule{2cm}{0pt}\rule[-3cm]{0pt}{3cm}}} \\[1cm]
& Signature2 & \rule{5cm}{.5pt} & \\
\end{tabular}
\end{document}
Or use TikZ directly
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[minimum height=2.9cm,draw,minimum width=2.1cm,label={[inner sep=3mm]90:\textsf{fingerprint 1}}] {};
\node[minimum height=2.9cm,draw,minimum width=2.1cm,label={[inner sep=3mm]90:\textsf{fingerprint 2}}] at (10cm,0) {};
\node (sig1) at (3,0.8) {\textsf{signature 1}};\draw (sig1.east) -- ++(3.7cm,0);
\node (sig2) at (3,-.5) {\textsf{signature 2}};\draw (sig2.east) -- ++(3.7cm,0);
\end{tikzpicture}
\end{document}
You can use \framebox
with its optional width argument and then inside of it a \rule{0pt}{<height>}
as follows:
\framebox[<width>]{\rule{0pt}{<height>}}
Note that the amount of \fboxsep
is added to all sides.