[Tex/LaTex] In-row table page break

longtablepage-breakingtables

I'm stuck on a problem for hours. I'm using the tabularx environment to create a double-column table where the second column takes up several lines. An example of that table is shown here.

Since such a table could not fit in a single page on my document, I've been looking for a way to break it in more pages. Unfortunately, neither the longtable nor the supertabular package can split the table within a row. Could you please help me find a solution?

In particular, if I can't get this result with a table is there a way to obtain it with some working alternative (I've already found the parcolumns and the glossary packages but I would like something that allows me to draw al least a vertical line to separate the two columns.

Best Answer

Here's an attempt that comes close to what you want using the mdframed package. Because mdframed conceives of its frames as single units, I don't know if it's possible to vary the thickness of just the top and bottom lines. Also, since I've used (or abused) the frame title by putting it outside the frame, there's no simple way to get lines to separate the headings. From the sample document you gave it looks like the format is pretty fixed, so I wrapped each part in either a command or an environment.

\documentclass{article}
\usepackage{mdframed}
\usepackage{kantlipsum}
\mdfsetup{frametitlealignment=\hspace{-1in},topline=true, bottomline=false,rightline=false,frametitlebelowskip=-\baselineskip}
\newcommand{\ID}[1]{%
\begin{mdframed}[frametitle={ID}]
\texttt{#1}
\end{mdframed}}
\newcommand{\Name}[1]{%
\begin{mdframed}[frametitle={Name},topline=false]
#1
\end{mdframed}}
\newcommand{\Priority}[1]{%
\begin{mdframed}[frametitle={Priority},topline=false]
#1
\end{mdframed}}
\newenvironment{Description}{%
\begin{mdframed}[frametitle={Description}]}
{\end{mdframed}}
\newenvironment{Comments}{%
\begin{mdframed}[frametitle={Comments}]}
{\end{mdframed}}
\begin{document}
\subsubsection{A command name}
\ID{F\_Req\_01\_03}
\Name{Password Recovery}
\Priority{Must Have}
\begin{Description}
\kant[1]
\end{Description}
\begin{Comments}
\kant[2-4]
\end{Comments}
\end{document}

detail output of code

Related Question