2

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?

1
  • 1
    Welcome to TeX.SX! Can you show us what you have done so far? Commented Oct 2, 2015 at 19:48

1 Answer 1

2

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}

enter image description here

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.