>>>>> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
>> The problem is definitely not that the section is numbered. Abdelrazak> In the LyX context that's definitely the problem. Do you have _one_ good reason to believe that?? Abdelrazak> But as I said in the comments, I can replace this test Abdelrazak> (labeltype == LABEL_COUNTER) with the following: Abdelrazak> latexname() == "section" || latexname() == "subection" || Abdelrazak> ... What frightens me is that it was not friday yet when you wrote that. Abdelrazak> AFAICS testing (labeltype == LABEL_COUNTER) is exactly the Abdelrazak> same. But I will happily move to the more detailled Abdelrazak> version if needed. This fix is just the starting point, Abdelrazak> hence the FIXME and the detailed comment. No the question is to understand _why_ a reference causes a problem there. My understanding was that it was because the argument to \section is a moving argument, and I thus propose to just \protect the \ref. Now Uwe tells us that both Herbert and the hyperref author (who are better LaTeXnicians than I am) say \ref should not be in \section, but we still do not know why, and this does not allow us to make a precise list of the commands that are or are not problematic. >> Actually nobody told me the very reason why it is necessary. I do >> not say this is not true (I trust Herbert and Heiko Oberdiek, but I >> like to know why...). Abdelrazak> "LateX does not compile" is a sufficient reason for me. No. You do not cure a problem without understanding the cause. I did propose a solution for the symptom you describe. >> Why not do it at the time when the latex code is generated? Abdelrazak> That would be fine with me for this case. But that would Abdelrazak> not solve the more general problem. Are you sure that the Abdelrazak> code for doing that at latex export will be simpler than 5 Abdelrazak> line of code? I do not care about simpler. I care about correct. Abdelrazak> You are exaggerating a little bit JMarc. No. I spent a lot of time since LyX 0.7 to try to understand and remove such special code. JMarc
