2

I was compiling two different files with the exact same preamble. The important thing is that I'm using together scrbook and classicthesis (with also classicthesis-preamble loaded) but when I compile two different things happen.

Small note: I'm on a Fedora 15 SO, with the original TeXLive installation retrieved from tug.org. To compile i use either "TeXWorks" or the pdflatex command from the terminal.

File1 compiles great, no problems at all.

However, file2 gets stuck giving this output:

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

The same output is thrown also by file1 (I later realised this by compiling from Terminal), but file1 does not stuck there, goes on and generates the PDF.

The preamble in both files is loaded by a file0.tex which I wrote to keep the two files clean, so I am sure that the preamble is identical.

I've found on the net (thanks Google!) a package that should fix this problem, but it doesn't seem to work: it's called scrhack.

1st edit: I created another main file, and added just the custom headers I wrote. Everything's fine, so my custom headers are not the problem. I've added random text, with a \chapter{Foo} and \section{Bar}. Still no problems.

So I've added a file with \input{file2.1}. This was originally added also to file2. At this point, compilation freezes, without saying a word about why...

Since I can't understand the mistake, nor I can find and errore in the source of file2.1, I've made a pastebin for you to see.

2nd edit: I've narrowed down the problem, it stucks because I renewed the \vec command. This is a MWE that makes my compiler freeze without giving any feedback or traceback or error messages.

\documentclass{scrbook}
\usepackage[italian]{babel}
\usepackage{classicthesis}
\usepackage{classicthesis-preamble}
\usepackage{amsmath}

\renewcommand{\vec}[1]{\vec{\textbf{#1}}} % vettori
\begin{document}
Let $\vec{F}$ be the force vector...
\end{document}

Although I've found where the problem is, I don't why it happens...

6
  • Welcome to TeX.sx! You don't have to sign with your name since it automatically appears in the lower right corner of your post. Commented Oct 16, 2011 at 14:08
  • 4
    The message is only a warning, so it might not be the cause of the issue. Without a minimal working example (MWE) that illustrates your problem it is basically impossible to help you, IMHO. Try to minimize both files as described in the above linked page. You might even find the issue while doing so. Commented Oct 16, 2011 at 14:10
  • Hi martin. Thanks for the attention and the welcome. :) I'm sorry I haven't provided a MWE, the fact is that I tried to "re-assemble" the code and it works fine, until I add another file that seems fine. So, the MWE would be a 50 or so line of code which seems to be fine. :( I'll add the things i did in the main question, to explain myself better.
    – mmassaro
    Commented Oct 16, 2011 at 15:04
  • 2
    Well you wrote a very fine recursive definition which throws tex in an endless loop trying to execute the \vec. See tex.ac.uk/cgi-bin/texfaq2html?label=patch for better ways to patch a command. Commented Oct 16, 2011 at 16:08
  • Thanks @UlrikeFischer that just solved my problem! Although, if you don't actually answer I can't close the question as "answered". :P
    – mmassaro
    Commented Oct 16, 2011 at 16:19

1 Answer 1

6

I really wish there were another way to close a question than to repeat comments. And after all I didn't do anything, it is the OP who did all the work to boil down the problem into a minimal example. But here it goes:

Well you wrote a very fine recursive definition which throws tex in an endless loop trying to execute the \vec. See https://texfaq.org/FAQ-patch for better ways to patch a command.

1
  • Yes, it's silly, but that's how the system is set. And anyway I just found the "real" problem, I didn't notice at all that I made a recursive function. You gave the real solution, linking that website. ;)
    – mmassaro
    Commented Oct 17, 2011 at 17:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .