Tell me more ×
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.

When trying to do what is described here, I tried to compile the code given there:

\documentclass{article}
\usepackage{caption}

\DeclareCaptionType{mytype}[Typename][List of mytype]
\newenvironment{myenv}{}{}

\begin{document}
\listofmytypes

\section{abc}

\begin{myenv}
\captionof{mytype}{blub} something in my type
\end{myenv}

\end{document}

But I get the error message \DeclareCaptionType Undefined control sequence . I'm running on Fedora. What might be the source of this problem?

share|improve this question
3  
You have an outdated version of the »caption« package. Hence you need an update. – Thorsten Donig Apr 23 '12 at 8:05
@ThorstenDonig can do that through yum? – yohbs Apr 23 '12 at 8:13
does yum use repositories? I appreciate it's probably a little different than Ubuntu, but still have a look at best-way-to-install-packages-for-texlive-in-ubuntu – cmhughes Apr 23 '12 at 9:02
@yohbs: I'm not familiar with Fedora because my system is openSUSE. Perhaps it's better not to use the provided packages from the repositories of your distribution and install the original TeX Live instead. – Thorsten Donig Apr 23 '12 at 17:28
\DeclareCaptionType is available since late 2007, so one need at least TeXlive 2008 for using this command without updating the caption package manually. – Axel Sommerfeldt Apr 23 '12 at 19:25

closed as too localized by lockstep, Marco Daniel, Thorsten, Stefan Kottwitz Apr 28 '12 at 11:08

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.