The algorithmic sample code that I am using is something like this:
\begin{algorithm}[h]
\caption{Caption Here.} \label{alg:Name}
\begin{algorithmic}[1]
\REQUIRE
\ENSURE
\STATE
\STATE
\STATE
\end{algorithmic}
\end{algorithm}
How can I customize the algorithmic output? for example, when I just entered the \REQUIRE it give me the Setup keyword. BTW, I don't want the numbering along each line, may be I just should not use this package at all :D.
I tried to bypass using such package with some \hrule and \rule defined above and below the text like this:
\rule{\textwidth}{2pt}
Some text goes here for cation of the algorithm
\rule{\textwidth}{2pt}
But the text and everything in between goes to the outside of page margin. I just used the code
\vspace{2pt}
\hrule
\vspace{2pt}
instead of the second \rule
but still not satisfied with the output, esp. the thickness of the \hrule
.
Please ignore the Persian writings, I want the headline of my algorithm like that without using algorithmic, or using algorithmic package and customized texts for '\ENSURE' and '\REQUIRE'.
Edit (New Question): How can I have the same output using ordinary lines? In other words, how can I define the thickness of two consecutive lines such that the text in-between does not fall outside of the page margin?
Best Answer
The (redefinable) definitions of the algorithms package are listed on p. 13 of the documentation. Example:
If you want to change the effects of
\REQUIRE
to, say, Whatever: (typeset in italic), add the following to the preamble of your document: