# Is using \input{} in a user defined package to partition it into smaller ones a correct way?

I am writing my own package called mylisting.sty to format code inclusion for languanges: LaTeX, PSTricks, C#, and XML.

To maintain mylisting.sty cleaner, I make a separate file for each language:

• LaTeXSettings.tex for LaTeX,
• PSTricksSettings.tex for PSTricks,
• CSharpSettings.tex for CSharp, and
• XMLSettings.tex for XML.

Is it correct to use \input{} within mylisting.sty to import LaTeXSettings.tex, PSTricksSettings.tex, CSharpSettings.tex and XMLSettings.tex?

Or you have a better method to accomplish this objective?

-

It's OK. You can use whatever file name (or extensions) you like. An extensible method is, like many packages use, to use a set of configuration/definition files. For example, in graphics package macro \Gin@driver is the driver file. The code is used as
\DeclareOption{dvips}{\def\Gin@driver{dvips.def}}

Let's use your sample above in our discussion. Do I have to specify ProvideFile{dvips.def} in dvips.def ? –  xport Jan 12 '11 at 5:56
No, you needn't. See clsguide for more information. –  Leo Liu Jan 12 '11 at 6:23