I am trying to achieve the following:
I have text material which is to be put in verbatim form. This material also has some mathematics, so I am using the alltt
package. This text needs to be in a single column table, which should be framed, for which I am using the mdframed
package.
The MWE is as below
\documentclass{article}
\usepackage{alltt}
\usepackage{mdframed}
\begin{document}
\begin{table}
\begin{mdframed}
\begin{alltt}
\textbf{OOS()}
begin
preprocess the image \emph{m}.
data\_normalize(\emph{data}, \emph{method});
kmeans(data, n);
kmedoid(data, n);
fcmeans(data, n);
validity(result, data, param);
object();
\textbf{OOS()}
begin
preprocess the image \emph{m}.
data\_normalize(\emph{data}, \emph{method});
kmeans(data, n);
kmedoid(data, n);
fcmeans(data, n);
validity(result, data, param);
object();\textbf{OOS()}
begin
preprocess the image \emph{m}.
data\_normalize(\emph{data}, \emph{method});
kmeans(data, n);
kmedoid(data, n);
fcmeans(data, n);
validity(result, data, param);
object();\textbf{OOS()}
begin
preprocess the image \emph{m}.
data\_normalize(\emph{data}, \emph{method});
kmeans(data, n);
kmedoid(data, n);
fcmeans(data, n);
validity(result, data, param);
object();
\textbf{OOS()}
begin
preprocess the image \emph{m}.
data\_normalize(\emph{data}, \emph{method});
kmeans(data, n);
kmedoid(data, n);
fcmeans(data, n);
validity(result, data, param);
object();\textbf{OOS()}
begin
preprocess the image \emph{m}.
data\_normalize(\emph{data}, \emph{method});
kmeans(data, n);
kmedoid(data, n);
fcmeans(data, n);
validity(result, data, param);
object();
\textbf{OOS()}
begin
preprocess the image \emph{m}.
data\_normalize(\emph{data}, \emph{method});
kmeans(data, n);
kmedoid(data, n);
fcmeans(data, n);
validity(result, data, param);
object();\textbf{OOS()}
begin
preprocess the image \emph{m}.
data\_normalize(\emph{data}, \emph{method});
kmeans(data, n);
kmedoid(data, n);
fcmeans(data, n);
validity(result, data, param);
object();
\end{alltt}
\end{mdframed}
\caption{This is the caption}
\end{table}
\end{document}
This produces a table which goes beyond the current page. What is needed is that the table overflows with the outer frame to the next page. I tried to use the longtable
but it seems alltt
does not like it.
Any other method of achieving this alltt
inside a boxed table which can flow across pages would also be okay.