## LaTeX forum ⇒ Text Formatting ⇒ Place text between algorithms and adjust

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
rumi
Posts: 2
Joined: Tue Dec 27, 2016 9:00 am

### Place text between algorithms and adjust

Hi,
I am having issue with adjusting my text beneath specific algorithm, how should i make it work? I am using this code:
\begin{algorithm}[h]\caption\begin{algorithmic}\Procedure...\EndProcedure\end{algorithmic}\end{algorithm}

My text which i need to add beneath it and then next algo..
Last edited by Stefan Kottwitz on Thu Dec 29, 2016 12:09 pm, edited 1 time in total.

Tags:

Stefan Kottwitz
Posts: 8457
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Hi Rumi,

welcome to the forum! What exactly is the issue with the adjustment? Not left aligned? Indented? Not fully justified? Centered?

Stefan

rumi
Posts: 2
Joined: Tue Dec 27, 2016 9:00 am
Thank u Stefan.. My problem is that I have a two column paper and I want description of each algorithm beneath it i.e rigth after the algorithm. In my case what's happening is, that description of two algorithms gets combined.

Stefan Kottwitz
Posts: 8457
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Algorithms are intended to float, so LaTeX places them for optimal page breaks and column breaks, to avoid much undesired whitespace when the algorithm doesn't fit to the end of page or column and is moved to the next one.

If you would like to place the algorithm at an exact position in the text, simply use H instead of h, that forces it:

\begin{algorithm}[H]...\end{algorithm}

Btw. next time it would be great if you would post a compilable small example. With the code snippet above, we don't know the document class, or what packages are used, there are algorithm, algorithmic, algorithmicx, algpseudocode, and more.

Stefan