I posted a question like this earlier but I'm re-asking because I didn't ask properly before.
I created a
.sty file (
preamble.sty) to help clean up my preamble but I'm having trouble actually using the packages in my document.
Other questions I have followed (in order) without any luck:
-Create a local texmf tree in MiKTeX
My file path to the
.sty file is
C:/Users/me/texmf/TeX/LaTeX/PreambleStuff. I used the MikTeX GUI to add it as a root in the "Settings," then made sure I clicked "Refresh FNDB"
-Where do I place my own .sty or .cls files, to make them available to all my .tex files?
I used the
kpsewhich -var-value=TEXMFHOME command line and the command prompt window did not show any file path, just displayed a new
C:\Users\me> prompt. Does this mean that I don't have a texmf home directory? I also used the command
kpsewhich preamble.sty which shows the correct file path to the file (see file path above).
latex --include-directory=C:/Users/me/texmf/TeX/LaTeX/PreambleStuff preamble.sty and the command window shows
! LaTeX Error: \usepackage before \documentclass.
See the LaTeX manual or LaTeX Companion for explanation.
The last part raises questions of whether or not I actually wrote my
.sty file correctly, but I am mostly concerned with getting MikTeX to find the file and include it properly in each document. What else can I do or what am I doing wrong?