# What are the pros and cons of packages versus \input for a preamble?

For a some simple cases it seems to me that there would be no important difference between

1. putting some code in a file preamble.tex and having \input{preamble.tex} in the main .tex file
2. putting it in a file preamble.sty (with appropriate modifications such as a \ProvidesPackage)

What are the pros and cons of each?

-
The biggest “contra” for this approach is that one tends to accumulate scores of packages that probably are not needed in a document. –  egreg Oct 16 '13 at 16:18
That's true, but wouldn't it apply to both 1. and 2.? –  Tom Oct 16 '13 at 16:20
–  texenthusiast Oct 16 '13 at 17:55
I'd say that any differences between the two approaches must surely range between trivial and insignificant. E.g., having to remember to use \makeatletter and \makeatother to surround instructions that contain the character @ in the method based on \input preamble is one such difference that hopefully nobody will consider to be major. Far more important would have to be the decisions as to real stuff that should be in the file preamble.tex/preamble.sty. –  Mico Oct 16 '13 at 18:08
@texenthusiast The answer you suggest is related, and helpful, but not a duplicate because I'm not comparing the package approach to having the code in the main file. –  Tom Oct 16 '13 at 18:11

1. You cannot pass package options in usepackage[<options>]{preamble} when using input{preamble} as \input has no optional arguments.
2. For cases in which you need @ as a character in your macros, for example, you don't need \makeatletter and \makeatother when implementing package. But you really need \makeatletter and \makeatother when implementing with \input.