Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.