The error said, \ttl@savemark is undefined. So I defined it in a way I know that titlesec does in chapter heading commands. Obviously tocloft interferes with that, without that package it works.
I repeated the title so be on the safe side, at least it would not be incorrect.
O boy ! There's no way in this universe I could know this by myself, without asking someone. Thanks for the explanation, Stefan.
I'm trying to debug my preamble, since adding the modifications to the list of listings you gave me in another topic is causing major issues. I suspect there are lots of other problems like the previous one.
I'm begining to despair with this castle made of cards... Everything is starting to fall apart !
Documents with common styles usually work very well in LaTeX. Special requirements or wishes may require some programming. While many tasks can be solved using packages, there are sometimes conflicts between packages, especially when their features overlap.
As everything is open source, most of the time problems can be solved after reading the source code. That's what I often do here. And it's not too hard with some experience. And unexperienced users can get help here.
With MS Word etc. in contrast, I cannot solve problems with crashes or fix formatting issues as there's no source code we can read.
And problems are actually much worst with MS Word (Office, or any usual word processors, actually), when it's about technical writings (maths, figures, etc). That's why I migrated to LaTeX a year ago, after yelling, shooting and crying at M$ crap and other WP.
I must admit that my project may be too ambitious : a very large book on relativity theory. Adding the Mathematica listings is what appears to cause the most problems to my cards castle... O well.
Thanks anyway for all the help, Stefan, it's greatly appreciated.
I may very well add your name to the thanks-list at the beginning of the book, since without your help, this book coulnd't be (almost) a reality by now. I'm almost there !