My algorithms takes up too much space in the document. I would like to do 2 things:
- set the width bigger, so the lines which does not fit to a single line would do
- remove lines with
endkeywords (i.e. closing tags or whatever they are called)
Are these things possible?
Sorry if these question are lame, but I'm pretty new to TeX, I use LaTeX only for algorithms, I'm writing my document in another format.
UPDATE: Example:
Complete document:
\documentclass{article}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{amsmath}
\begin{document}
\begin{algorithm}
\begin{algorithmic}[1]
\Function {NMS3D}{$T : array[1..w, 1..h, 1..d], n: int$}
\State \Comment $(2 n +1) \times (2 n +1) \times (2 n +1)$ szomsz\'eds\'gban keress\"uk a lok\'alis maximumokat
\State label \textbf{mainloop:}
\ForAll {$(i, j, k) \in \{ n, 2n+1, ... \}^3 \cap [1..w - n] \times [1..h - n] \times [1..d - n] $}
\State \textbf{initialize:} $(i_{max}, j_{max}, k_{max}) \gets (i, j, k)$
\ForAll {$(i_2, j_2, k_2) \in [i, i+n] \times [j, j+n] times [k, k+n]$}
\If {$T[i_2, j_2, k_2] > T[i_{max}, j_{max}, k_{max}]$}
\State $(i_{max}, j_{max}, k_{max}) \gets (i_2, j_2, k_2)$
\EndIf
\EndFor
\ForAll {$(i_2, j_2, k_2) \in [i_{max}-n, i_{max}+n] \times [j_{max}-n, j_{max}+n] \times [k_{max}-n, k_{max}+n]
- [i, i+n] \times [j, j+n] \times [k, k+n]$}
\If {$T[i_2, j_2, k_2] > T[i_{max}, j_{max}, k_{max}]$}
\State \textbf{continue} mainloop
\State \Comment a maximum jel\"olt t\'ul k\"ozel van egy m\'asik maximumhoz, elvetj\"uk
\EndIf
\EndFor
\State $list_{max} \stackrel{add}{\longleftarrow} (i_{max}, j_{max}, k_{max})$
\EndFor
\State \textbf{return} $list_{max}$
\EndFunction
\end{algorithmic}
\end{algorithm}
\end{document}
Here is the result, corrected with red, on what I would like to be changed (with MS Paint, yeah I do have some epic Paint skillz right?):

Comments are in Hungarian, don't mind that