I am not sure if what I'm envisioning is possible, but I am not referring to the listings package (which is what all of my searches are yielding).
I reuse a lot of my LaTeX code. I recently figured out how to replicate large parts of my preamble (which has over a dozen packages and user-defined commands) by making a single "custom" package which I call in my documents. However, there are parts of my preamble that I also reuse but have change small parts of in each document.
For instance, I have the style of my title page defined, but the title itself, the date, etc. needs to change. Is it possible to do something where I put my code into another document and call it in each document with some parameters? For instance, if I put everything in a class called mytitle and then call that specific package in my document:
\usepackage[title,subtitle,author,date]{mytitle}
where those options are defined in the package itself?
I thought that classes would be the right option, but it's looking like that isn't the right solution.
\usepackage[title={my title}, author={Author), ... ]{mypackage}. There are numerous key value packages around. See A big list of every keyval package. Thekvoptionsandpgfopts(which usespgfkeys) are two choices specifically for processing package/class options. – Alan Munn Jul 29 '20 at 02:52hyperrefdoes it versus howbabeldoes it. Dummy example: Something like\usepackage[a,b,c,d,e]...: if the item/value is unique ([english,french,german]) = true/false = on/off, the value is enough; but for item/value from a list of values ([cat,123,blue,default]), Tex needs to be told what value links to what option and the key/value method does that concisely ([topic=cat,style=123,headingcolour=blue,mathstyle=default]). – Cicada Jul 29 '20 at 09:55