I have been using LaTeX for some years now, but I've only recently noticed its scripting features. Although, I find it hard to grasp many of the concepts. For example, I want to have a command \docTitle{My Paper Title} which I can call and then this will produce some variable that I can use in my .sty template file.
So in my .tex file, I will call \docTitle{My Paper Title} and then the .sty file should somehow call \title{\docTitle}. How to do this?