Large Algorithm in Lyx

2003-11-27 Thread Aleksandar Donev
Hello,

Please include [EMAIL PROTECTED] on replies.

I tried to make a replacement environment for large (multipage) algorithms in 
LyX. Here is what I put in the preamble:

%_
\newenvironment{Algorithm}[1] {% caption as parameter 
  \stepcounter{algorithm} 
  \hrule \vspace{1ex} 
  \center{\textbf{Algorithm \thealgorithm : }#1}
  \vspace{1ex} \hrule 
} 
{ \vspace{1ex} \hrule }
%_

This uses the same counter as the floating algorithms and tries to mimic their 
look.

The one thing I am missing is the ability to reduce the font to whatever it is 
inside the floating algorithms. How do I do that?

Also, is there a way to reduce the separation \itesep between list items 
globally? I use enumerated lists in my algorithms and want them to appear 
with less separation between items to make them even smaller.

Thanks,
Aleksandar

-- 
__
Aleksandar Donev
Complex Materials Theory Group (http://cherrypit.princeton.edu/)
Princeton Materials Institute &
Program in Applied and Computational Mathematics 
@ Princeton University
Address:
   419 Bowen Hall, 70 Prospect Avenue
   Princeton University
   Princeton, NJ 08540-5211
E-mail: [EMAIL PROTECTED]
WWW: http://atom.princeton.edu/donev
Phone: (609) 258-2775
Fax: (609) 258-6878
__



Large algorithm in LyX

2003-11-22 Thread Aleksandar Donev
Hello,

Please include [EMAIL PROTECTED] on replies.

I am aware one cannot have multipage floats. I have a paper with lots of 
algorithms floating around, a couple of which happen to be longer then a 
page. I would like to continue to use the nice LyX algorithm float, but 
somehow do something special about the long ones. I have found some advice on 
the web, but I am not sure what the best way is. I would appreciate a pointer 
to what the best approach with LyX is.

For example, for long tables
http://www.educat.hu-berlin.de/~voss/LaTeX/floats/nonFloat.phtml
recommended just redefining the meaning of \algorithm. Something modeled 
after:

\newenvironment{myTables}[1] {% caption as parameter 
  \stepcounter{table} 
  \vspace{1ex} 
  \addcontentsline{lot}{section}{\thetable\hspace{0.75em} #1} 
  \center{\textbf{Table \thetable : }#1}% 
} 
{% 
  \vspace{1ex}% 
  \addtocounter{table}{-1}% 
}

And then this piece from some (old?) Lyx documentation:

Algorithms
(from LATEX Configuration) 
The package algorithm is needed by LYX to be able to output 
``algorithm-floats''. These are useful in placing short algorithms across 
page breaks and support an ``index of algorithms'' too. 

Thanks,
Aleksandar
-- 
__________
Aleksandar Donev
Complex Materials Theory Group (http://cherrypit.princeton.edu/)
Princeton Materials Institute &
Program in Applied and Computational Mathematics 
@ Princeton University
Address:
   419 Bowen Hall, 70 Prospect Avenue
   Princeton University
   Princeton, NJ 08540-5211
E-mail: [EMAIL PROTECTED]
WWW: http://atom.princeton.edu/donev
Phone: (609) 258-2775
Fax: (609) 258-1177
__