I use tabu to easily specify colors for different parts of my table. Also the X column makes life easier. I have some problems regarding vertical placement:
In the linked figure you can see many defects:
- First Row: Text not vertically-aligned
- Multiple line in the last column is not well placed. Although single line is good (Operand A)
- Item lists have no space above, and plenty below!
If I replaced the "X[8,m]" from the fourth column to "X[8,l]", problem 2 and 3 are fixed. But this breaks the middle alignment of the first three columns to top.
What am I missing?
\documentclass{article}
\usepackage{tabu}
\usepackage{xcolor,colortbl}
\usepackage{enumitem}
\begin{document}
Test this
\vspace*{1cm}
\tabulinestyle{1pt blue}
\begin{tabu}[m]{
|[1pt blue] X[2.2,m]
|[1pt gray] X[m]
|[1pt gray] X[m]
|[1pt gray] X[8,m]
|[1pt blue] } \everyrow{\tabucline[1pt gray]-}
\rowfont[C]{\bf\large\color{white}} \rowcolor{blue} Port & Width & Type & Description \\
OperandA & Mode & Input &
Operand A \\
OperandB & Mode & Input &
Operand B in IEEE format and some constraints \\
Mode & 3 & Input &
\begin{itemize}[nolistsep,noitemsep,leftmargin=1em]
\item 000 Round to
\item 001 Round away
\item 010 Round toward
\item 011 Round toward minus
\item 100 Round Toward
\item 101 Round to nearest
\item 110 Round to nearest
\item 111 Reserved
\end{itemize} \\
Precision & 1 & Input &
\begin{itemize}[nolistsep,noitemsep,leftmargin=1em]
\item 1 Enable 64 operand
\item 0 Enable 128 operand
\end{itemize} \\
Oper & 1 & Input & \textit{Operation selector}:
\begin{itemize}[nolistsep,noitemsep,leftmargin=1em]
\item 100 bla
\item 101 blaaa
\item 000
\item 110
\item 111
\item 001
\item 010
\item 011
\end{itemize} \\
Condition & 5 & Input &
\textit{Comparison condition selector}:
The valid combination are seen in standard-defined Comparisons \\
\multicolumn{4}{|c|}{Clock, Reset, and Enable are relevant only to pipelined designs} \\
Clock & 1 & Input & System Clock (relevant only to pipelined designs) \\
Reset & 1 & Input & System Asynchronous Reset, active low \\
Enable & 1 & Input & \textit{System Enable}. When Enable = 0, the Clock and Reset inputs are held \\ \tabucline[1pt blue]-\end{tabu}
\end{document}