GeneralAlgorithm environment

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ralphey
Posts: 9
Joined: Wed Feb 03, 2010 8:35 pm

Algorithm environment

Post by ralphey »

I'm including both the algorithm and algorithmic packages, and trying to figure out how to condense some of the vertical space between the line numbers. What I would like is, for example, to have the effect of \vspace{-1mm} beteween each line, so as to compress the algorithm a bit more. I want to the algorithm to take as little space as possible (I'm already using the [noend] option).

So my question is, is there a way to do this with the algorithm package? Maybe something to do with \itemsep?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

ralphey
Posts: 9
Joined: Wed Feb 03, 2010 8:35 pm

Algorithm environment

Post by ralphey »

Found that the \fontsize{}{} command works when encapsulating the »algorithmic« environment, e.g.:

Code: Select all

{\fontsize{10}{15}
\begin{algorithmic}
%SOME ALGORITHMIC CODE
\end{algorithmic}
}
where the first parameter is the font's size, the second parameter gives the line spacing, and the 10 and 15 specify the pt unit by default.

Credit goes to gmedina at {TEX} SE for the help.
Post Reply