I am using the algorithms package, but am not being properly able to convert "Require" to say, something like "Parameters", using the \renewcommand macro. Can anyone please show how and in which part of the program to implement the \renewcommand to make this simple change?
-
1Welcome to TeX.SX! Can you show us what you have done so far?user31729– user317292015-10-02 19:48:33 +00:00Commented Oct 2, 2015 at 19:48
Add a comment
|
1 Answer
The algorithmic package does
\newcommand{\REQUIRE}{\item[\algorithmicrequire]}
\newcommand{\algorithmicrequire}{\textbf{Require:}}
so you can redefine \algorithmicrequire:
\documentclass{article}
\usepackage{algorithmic}
\renewcommand{\algorithmicrequire}{\textbf{Parameters:}}
\begin{document}
\begin{algorithmic}
\REQUIRE $x \neq 0$ and $n \geq 0$
\end{algorithmic}
\end{document}
