On Wed, Feb 06, 2002 at 12:14:00PM +0100, Oscar Lopez wrote:
> I have a book-based document and I am using the algorithm floats. The
> document options are boxed and chapter and in this way the look of the
> algorithm is boxed with the caption located at the bottm of the frame
> with the numbering based on chapter number. I have only one long
> algortihm that extents over more than one page. So, I checked the
> amazing help provided by our beloved Herbert and, as usual, I found a
> useful tip
> 
> and it works but the caption is located at the top of the algorithm, the
> text is centered inside the float and there is no framebox. So, please
> could you point me out a way to solve these problems? i.e
> 
> 1. The caption located at the bottom of the algorithm
> 2. The framebox extended over more than one page

Use something like this:

In the preamble:
\usepackage{framed}
\def\xcaption#1{%
  \fs@boxed%
  \def\@captype{algorithm}%
  \caption{#1}%
  \unvbox\@floatcapt\par}

and in the text use:
\begin{framed}
  .....
  .....
\end{framed}
\xcaption{the caption}

PS: If you use the algorithm float for computer language code (C++,java etc.),
then you probably should use listings package.

Reply via email to