I have a file I call Packages.tex that I put all the macros I use for a generic document in.

I've found that this file gets rather bloated, and when I do remove elements of it I don't use anymore, it will cause compilation errors on my previous documents. Usually at that point I only care about the .pdf so this isn't an issue, but it'd be nice to have a better option that leaves me with a .tex file that compiles well, without either having a bloated Packages.tex or having to resort to having multiple versions of it (so Packagesv1.tex, Packagesv2.tex, etc).

Does anybody have a good solution for managing an evolving file of macros with past documents?

  • 2
    This is one way. (Off-topic: don't call it Packages.tex. Use the .sty extension, and load it like a regular package with \usepackage.) – jon Nov 22 '16 at 23:51
  • 2
    Related: How do you store all your TeX files long-term? – Werner Nov 23 '16 at 0:18
  • 2
    Perhaps compile and embed your Packages.tex using embedfile. This will keep the existing files that compile into the output PDF as part of a singular package. If you're interested in re-compiling, the files are stored with the PDF. – Werner Nov 23 '16 at 0:19
  • Version control is another option. Not a replacement for the other suggestions, but maybe more or less suitable depending on what you need. (And version control is good anyway, of course.) – cfr Nov 23 '16 at 3:51
  • @cfr I have rudimentary version control, but I was hoping to get something so if someone wants one of my old documents I can just zip it up from my local machine "without thinking" about it/needing to mess with GIT. – Mark Nov 23 '16 at 5:03

Your Answer

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

Browse other questions tagged or ask your own question.