I'm asking this because the package lineno has a thing that leaves a lot of commands in the .aux file (see here)... and I'm not sure if I should \newcommand these to empty or if I should just load the package and forget about it.

I know the answer is very case dependent, as stated by David Carlisle:

it depends. If the package is tikz then it loads 100 files and takes half an hour doing stuff, if it is indentfirst then it doesn't. Conversely loading tikz probably doesn't have an effect other than taking time if no tikz commands are used, whereas loading indentfirst in itself changes the document layout.

But I would like to know some other point of views, specially regarding best practices and if there is any approach that should be used for specific cases or with delicate packages.

  • lineno is not a spotless package. What are you after? (this is likely unrelated to the question, but it might be related to your problem, that's why I ask)
    – yo'
    Oct 31, 2013 at 14:40
  • @tohecz it was similar to the question pointed out in the text. I've decided to just load the package whether the line number option is set or not to avoid any problems, but I'm not sure if this should be done or if "asking" should be the way to go Oct 31, 2013 at 16:47
  • Well, I more meant that you shouldn't rely on lineno package at all. There're other ways how to number lines, but this depends on the usage of this feature
    – yo'
    Oct 31, 2013 at 17:10
  • The only time I notice a delay loading a package is when I don't have it installed yet. Nov 4, 2013 at 5:18

1 Answer 1


From my understanding of the lineno package, loading the package patches a number of low level things (e.g., \vspace, \pagebreak, \nopagebreak, and possible even \\) even if line numbering is never used. For this reason, it is probably best not to simply load the package and forget about it. I would also not \newcommand or \def your way around the crude in the aux file. When you remove the lineno package, I would simple delete the aux file.

You must log in to answer this question.

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