I'm trying to create a new environment based on tabularx
. I'd like it to have a \bottomrule
at the end. How do I refer to the table rows on the new environment definition? Right now the bottom line is appearing above the rows instead of below them.
\documentclass{article}
\usepackage{array, booktabs, tabularx}
\newcolumntype{L}[1]{>{\hsize=#1\hsize\raggedright\arraybackslash}X}
\newenvironment{funtab}[1]{%
\tabularx{\textwidth}{@{} L{0.4} L{0.6} L{2.0} @{}}
\toprule
Operation&\multicolumn{2}{l}{#1}\\
\midrule
%Table body location <------------------------
\bottomrule
}{%
\endtabularx
}
\begin{document}
\begin{funtab}{My function name goes here}
item1 & item2 & item 3 \\
item1 & item2 & item 3 which is long and should wrap around around around around \\
\end{funtab}
\end{document}