The algorithmic sample code that I am using is something like this:

\caption{Caption Here‎.} \label{alg:Name}  ‎‎   
‎\end{algorithmic}     ‎

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:

Some text goes here for cation of the algorithm  

But the text and everything in between goes to the outside of page margin. I just used the code


‎‎‎‎‎ instead of the second \rule but still not satisfied with the output, esp. the thickness of the \hrule.

alt text

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?

  • I'm not sure what your question is. I guess you want to use rules in some way that is similar in appearance to algorithmic but vastly different in function. You should describe your end goal.
    – TH.
    Commented Dec 4, 2010 at 9:32
  • The first question is answered, but it seems that it could be easier to get the same output if any body can answer the second question. Commented Dec 4, 2010 at 12:38

2 Answers 2


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:


The Answer to the second question can be found at:

I copy and paste the answer:



Hello world
     \begin{question}Item one\end{question}
     \begin{question}Item two\end{question}
     \begin{question}Item three\end{question}


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .