I am working on producing a good-looking floating enumerate. What still needs to be done is to add booktabs' toprule above the first enumerate's item and booktab's bottomrule below the last enumerate's item. Why do I want that? Because that makes it for the reader more evident that this is not an in-text enumerate. A sketch of my request:
Problem: toprule and bottomrule seem to be designed for tabular
Question1: How to do this elegantly for my case? Elegant in end result and elegant in code.
I think the elegance in end results is mainly concerned about
(1) What amount of vertical space between the first item and the toprule? Likewise for last item and bottomrule. Perhaps this should be same amounts as with a table for consistency, perhaps it should be larger because the vertical spaces between enumerate items are larger than the vertical spaces between tabular rows. I am open for design thoughts here.
(2) What amount of vertical space between toprule and the regular text above it? Likewise for bottomrule and the caption below it. My gut feeling says this is not a problem and that it would be the same vertical spaces as with a table. Still, I am not familiar with the intricacies of toprule and bottomrule.
Question2 for bonus points:
I use booktab's toprule and bottomrule for my thesis, but the journal I wish to submit to uses revtex. Revtex again has its own equivalents:
\def\toprule{\hline\hline}%
\def\botrule{\hline\hline}%
If your solution requires tweaking for revtex's toprule and botrule, would you be so kind to show me how?
My current best MWE is:
\documentclass{article}
\usepackage{booktabs}
%For my floating enumerate
\usepackage{trivfloat}
\trivfloat{enum}
\usepackage{enumitem}
\usepackage{calc}
%Allocate several lengths to be used later on
\newlength{\lengtha}
\newlength{\lengthb}
\newlength{\lengthc}
\begin{document}
Some test sentences are written here. Some test sentences are written here. Some test sentences are written here.
%My centered floating enumerate
\setlength{\lengtha}{\widthof{2.} + \labelsep + \widthof{A description of the second step is written here}}
\setlength{\lengthb}{\textwidth-\lengtha}
\setlength{\lengthc}{\lengthb/2}
\begin{enum}[!h]
\begin{enumerate}[leftmargin=*, label={}, labelwidth=0mm, labelindent=\lengthc]
\item 1.\hspace{\labelsep}First step in a procedure\\
A description of the first step is written here
\item 2.\hspace{\labelsep}Second step in a procedure\\
A description of the second step is written here
\item 3.\hspace{\labelsep}Third step in a procedure\\
A description of the third step is written here
\end{enumerate}
\caption{My floating enum}
\end{enum}
Some test sentences are written here. Some test sentences are written here. Some test sentences are written here.
\end{document}