5

I have seen this question but I still disable the numbering of algorithms.

I have the following code:

    \begin{algorithm}
        \caption{\textsc{FizzBuzz}}
        \begin{algorithmic}
            \FOR{$i \Leftarrow 1 \ldots 100$}
                \IF{$i$ \emph{mod} $3 = 0 \wedge i$ \emph{mod} $5 = 0$}
                    \item \textsc{Print}(``FizzBuzz")
                \ELSIF{$i$ \emph{mod} $3 = 0$}
                    \item \textsc{Print}(``Fizz")
                \ELSIF{$i$ \emph{mod} $5 = 0$}
                    \item \textsc{Print}(``Buzz")
                \ELSE
                    \item \textsc{Print}($i$)
                \ENDIF
            \ENDFOR
        \end{algorithmic}
    \end{algorithm}

It renders the following:

Algorithm Rendering

I want to get rid of the part that says Algorithm 1. The answer to the question referenced above basically said to change \caption{\textsc{FizzBuzz}} to \caption*{\textsc{FizzBuzz}}, but when I do that the following is rendered:

Algorithm Rendering (No Caption)

This offers different algorithm numbering, but I want to disable numbering altogether and keep my caption. Can anybody help me?

1 Answer 1

8

Load the caption package, then the starred variant of \caption becomes available. The reason a star shows up in the output now is due to a specific implementation of starred commands in LaTeX.

By the way, the caption package will also allow you to customize the format of captions, and you won't need \textsc every time then.

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.