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.

Lately I've noticed the following warning from KOMA when I compile my documents:

Class scrreprt Warning: \float@addtolists detected!
(scrreprt)              You should use the features of package `tocbasic'
(scrreprt)              instead of \float@addtolists.
(scrreprt)              Support for \float@addtolists may be removed from
(scrreprt)              `scrreprt' soon .

The documentation for KOMA makes a brief mention of package \tocbasic but none of the examples there mention anything about \float@addtolists, unless this information is in the German documentation and hasn't been translated to English yet.

What does the warning mean, and can anyone suggest what changes I can make to silence it?

share|improve this question
1  
Can you please make a MWE? –  Thorsten Apr 14 '12 at 7:03
    
If you are using the »float« package to create new floats, replace it by the mentioned »tocbasic« package which is part of the KOMA-Script bundle. Its relevant features are described in Section 11.2.3 of the English user guide. –  Thorsten Donig Apr 14 '12 at 7:47
1  
See also: texdoc scrhack –  Axel Sommerfeldt Apr 14 '12 at 8:01
add comment

1 Answer

KOMA uses his own algorithm to create float environments provided by tocbasic.

So packages like float or listings uses an old version and produce this warning. However Markus Kohm wrote a small package named scrhack fixing this issue.

Example 1 without scrhack:

\documentclass{scrartcl}

\usepackage{listings}
\begin{document}
\lstlistoflistings 


\begin{lstlisting}[caption={example}]
 for i=1 by 1 to 10 do
   i++
 od:
\end{lstlisting}
\end{document}

Warning:

Class scrartcl Warning: Usage of deprecated \float@listhead!
(scrartcl)              You should use the features of package `tocbasic'
(scrartcl)              instead of \float@listhead.
(scrartcl)              Definition of \float@listhead my be removed from
(scrartcl)              `scrartcl' soon, so it should not be used  on input lin
e 5.

Example 2 with scrhack

\documentclass{scrartcl}
\usepackage{scrhack}
\usepackage{listings}
\begin{document}
\lstlistoflistings 


\begin{lstlisting}[caption={example}]
 for i=1 by 1 to 10 do
   i++
 od:
\end{lstlisting}
\end{document}

0 warnings

share|improve this answer
    
Wait, so this occurs if you've got any floats at all in the document? –  zoqaeski Apr 22 '12 at 18:58
    
@zoqaeski: It's related ot \listof... –  Marco Daniel Apr 22 '12 at 19:28
    
I tried adding \usepackage{scrhack} and \usepackage{listings} (though I'm not sure if I need that) and I still get that warning. –  zoqaeski Apr 27 '12 at 12:08
    
@zoqaeski: Which version do you use? –  Marco Daniel Apr 27 '12 at 12:29
    
KOMA 2011/06/16 v3.09a. The other packages are here: gist.github.com/2619654 - maybe I've got conflicts or older versions of something else? –  zoqaeski May 6 '12 at 6:04
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.