I've been having a random issue recently with dblfnote, where TeX tells me that it's trying to execute \@nil, which is undefined.

Now, I did my research and saw from source2e that \@nil is generally used as a delimiter in list macros. That's exactly what dblfnote uses it for.

Is there any reason that I can't define \@nil as a totally blank token? Something like


It's never supposed to be executed, so is there harm in defining it? At least as a temporary fix?

  • 5
    I would not define it either. Also, it does not solve the problem that there is code that wants to execute \@nil. The faulty code should be fixed instead. Can you generate a minimal working example (MWE)? Sep 6 '17 at 16:39

Most uses of \@nil just use \@nil as a macro argument delimiter so it doesn't matter what the definition is, however this is intentionally undefined. If you have code that is trying to execute \@nil then there is an error earlier and code that should never be evaluated is being evaluated. Defining it to something will just be masking a problem elsewhere.

  • Is it safe temporarily while I hunt down the problem's source?
    – A Gold Man
    Sep 7 '17 at 11:03
  • 1
    @AGoldMan What's the worst that can happen? The document doesn't compile. I think the warning is to not use it in code that gets distributed to others, and to weed it out of your own code, if you are forced to temporarily use it. Another thing that can be done if you must use it is to use only it within a group, so that upon exit from the group, its redefinition remains unknown to the rest of the code. Sep 7 '17 at 11:08
  • 2
    @AGoldMan it's safe to do all kinds of things while debugging, one common technique is to repeatedly delete half the code to narrow down to the code that's generating an error. This might be considered similar: if (somehow) it helps you find the problem then sure that's fine, but once the problem is found discard all such changes that were made for debugging. I wouldn't distribute a package that defined \@nil any more than I'd distribute a package with half its code deleted while tracking down a bug. Sep 9 '17 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.