sorry if this question seems off topic, but I had no place to ask it besides here.
I have a big manual I am building in laTeX using either LuaTeX or XelaTeX, doesn't work on pdflaTeX.
It took a lot of crafting to assemble the packages and modifying the fancyhdr, geometry, and tabular environments to make some decent graphics for the manual.
My question is mostly about design... I want to move all those usepackage to an sty file that would allow me to reuse the files. This way I focus on the content and I could create a set of tutorials with the same styling. With some scripting I could create different sets of manuals (print edition, digital edition, tutorial 1,2,3,...,n and html version for docx compatibility).
What do you think of this? Is there some guideline on how to build a proper sty, I am only using packages to generate my styling right now and my newcommand or renewcommand are fairly simple (rarely I use and if expression).
Now I did find some tutorials on sty files, but they do post some very hardcore page formatting to enforce things. And as far as I could see, they don't seem like the place you plaster your usepackages.