I am using the Latex presentation package and would like to mold the following algorithm (I had to remove the text due to publication reasons) onto one slide – how can I do that?
\underline{Algorithm Example} \\
\begin{tabbing}
%%%%%%%%%%%%%%%
% set tabs here
\hspace*{0.5cm}\=\hspace*{0.5cm}\=\hspace*{0.5cm}\=\hspace*{0.1cm}\=\kill
%%%%%%%%%%%%%%%
1. Set rrrrrrrrrrrrrrr \\
2. \>(a) Grow rrrrrrrrrrrrrrrr \\
\>(b) Reduce rrrrrrrrrrrrrrrrrr$
\\[5 pt] while $r \geq 1$ \\[5 pt]
\> 3. Decide rrrrrrrrrrrrrrrrrrrrrr \\
\> \> if (xxxxx) \\
\> \> \>(a) aaaaaaaaaaaaaaa \\
\> \> \>(b) bbbbbbbbbbbbbbbbbbbbbbbbbbb \\
\> 4. If aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \\
\> \> if (ccccccc) \\
\> \> \> (a) ddddddddddddd\\
\> \> \> (b) ddddddddddddddddddddddddddddddddd \\
\> \> \> \> ddddddddddddd\\
\> \> eeeeeeeeeeeeeeeeeeeeeee\\
\> \> \>(a) Ddddddddddddddddddddddddddddddddddddddddddd \\
\> \> \> \>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
\> \> \> \>bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb \\
\> \> \>(b) teeeeeeeeeeeeeeeeeeeeeesst \\
\> \> \> \>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \\
\> \> end if \\
[5 pt] end while \\[2 pt]
\end{tabbing}
Best Answer
You have, at least, three possibilities: you can use
\resizebox
, you can reduce the font size, or you can use the evilshrink
option:As a side note, perhaps you could use one of the dedicated packages to write your algorithms:
algorithmicx
orlistings
, for example.