# using saved format for all other documents [duplicate]

I pre-apologize for any stupid questions here. I'm still very beginner in LaTeX and trying to learn how to use it efficiently.

I have certain commands and basic setup that I use for all the documents I write. It includes ams symbol, tikz-cd setting, font setting and many personal commands that I use (like \Q for rational number). However, I change them sometimes and I wish that change goes into all of my documents uniformly.

So here is what I think, if I write these setup in one document and modify it whenever necessary, can I bring this to other documents using something like \bring{mysetup}? Or do you just copy & paste your format all the time whenever you write a new one?

Create a separate file `mysetup.tex` where you write your definitions, like `\Q` for rational numbers. Then load the file in the preamble of your main tex file with `\input{mysetup.tex}` if mysetup is not in the same folder, make sure to write the correct path to it.
• I would use `.sty` not `.tex` and `\usepackage` not `\input` and put the file in the input path so you never need to use a local path in the document. – David Carlisle Nov 8 '19 at 18:45