I do physics and math, and so I have accumulated many different "\newcommand"s that make my life much easier that depend really only on the three packages amsmath, amsthm, and amsfonts.
My question is this:
What is the best way for me to carry them from document to document, other than merely copy and pasting all of the new commands into one huge, disgusting preamble? Ideally, I would like to be able to do something as simple as just having a single text file that I call, but it seems a bit more involved than that.
mypackage.styand use\usepackage{mypackage}in all your documents – David Carlisle Jan 06 '17 at 22:01mypackagewas a name I just made up in the comment, it does not have to be called that. – David Carlisle Jan 06 '17 at 22:05.clsfiles, to make them available to all my.texfiles? – Werner Jan 06 '17 at 22:17amsmathandmath-modesince they are irrelevant for the question itself. – Jan 06 '17 at 22:30$TEXMFHOME/tex/latex/directory (or a sub-…-subdirectory thereof). The correct value ofTEXMFHOMEfor your system can be queried withkpsewhich --var-value TEXMFHOME. You do not need to rebuild thels-Rdatabase. Finally (to the OP), you need not write a package (.sty) file: a normal TeX input (.tex) file should do, if your\newcommands stick to the ordinary syntax. – GuM Jan 07 '17 at 00:16^^^^0086to 14, and it appears to work as expected (with utf-8). Easy for me, an American, to remember that code. Note that^^^^0086is a character, not a macro. – Jan 07 '17 at 03:05TEXMFHOME? – GuM Jan 07 '17 at 03:16