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 am in the process of replacing the caption package with KOMA-Script in a long document. Where caption allows me to suppress the figure-number at the start of any caption by using \caption*{text}, I see nothing comparable in the KOMA-Script documentation. Can someone enlighten me?

Edit: I would like to suppress the whole "Figure x.y:" marker before the actual caption text, just as caption* does.

share|improve this question
    
But \caption* not only suppresses the number; it also suppresses the label ("Figure" or "Table"). –  Gonzalo Medina Aug 6 '12 at 19:40
    
@GonzaloMedina: That's true, and that's what I would like. I'll edit to make that clear. –  brannerchinese Aug 6 '12 at 19:42
    
Ah, then I'll un-delete my answer ;-) –  Gonzalo Medina Aug 6 '12 at 19:44
add comment

2 Answers

up vote 8 down vote accepted

As far as I could see in the documentation, there's no build-in equivalent to \caption* in the KOMA classes, but KOMA gives you the tools to easily define such a command:

\documentclass{scrartcl}

\makeatletter
\newcommand\WLcaption[1]{%
  \renewcommand*{\figureformat}{}
  \renewcommand*{\tableformat}{}
  \renewcommand*{\captionformat}{}
  \addtocounter{\@captype}{-1}
  \caption{#1}}
\makeatother

\begin{document}

\begin{figure}
\centering
\rule{3cm}{2cm}
\WLcaption{A test caption without label for a figure}
\end{figure}

\begin{figure}
\centering
\rule{3cm}{2cm}
\caption{A test caption with label for a figure}
\end{figure}

\begin{table}
\centering
\rule{3cm}{2cm}
\WLcaption{A test caption without label for a table}
\end{table}

\begin{table}
\centering
\rule{3cm}{2cm}
\caption{A test caption with label for a table}
\end{table}

\end{document}

enter image description here

share|improve this answer
add comment

Assuming that you mean to use a KOMAScript class by "replacing 'caption' with koma" you could simply redefine \figureformat :

\documentclass{scrbook}

\begin{document}

\renewcommand*{\captionformat}{}   
\renewcommand*{\figureformat}{}

\begin{figure}
\caption{x}
\end{figure}

\end{document}

will strip the whole label.

share|improve this answer
    
Thanks. Some authors prefer captions alone to appear with figures, without figure numbers. Go figure. –  brannerchinese Aug 6 '12 at 19:27
    
But this still leaves the separator (: by default.) –  Gonzalo Medina Aug 6 '12 at 23:45
    
yeah i see i removed it accidentally –  bloodworks Aug 7 '12 at 7:10
add comment

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.