[Tex/LaTex] How to “install” a .cls file for LaTeX

installingtexlive

I want to install the class found at this git repository: LaTeX homework

I see some questions asked in the past on installing packages in LaTeX but this sounds like a different kind of file than a .cls file. My impression is that packages come in either a .ins or a .dtx file which I would assume you don't use the same way as a .cls file.

I believe I'm using TeXlive, and although I often compile through Sublime Text 2 I also have TeXWorks which can often be simpler to install packages I don't already have. A couple months ago I installed the latest version of TeXlive, though in my local directories (C:/users/Me/...) I have no folder for texlive2015. I have a folder, /.texlive2013 and another one, /TeXWorks. In my shared directories (C:/texlive/...) I do have a folder, 2015. My operating system is Windows 10.

In trying to figure this out on my own I've seen reference to a "texmf" structure, and I've tried googling and learning about it but I'm still not getting a very clear picture of it since my directories don't seem to make a lot of what I see in those pages. What I do have are things like C:/texlive/2015/texmf-dist/ and C:/users/Me/.texlive2013/texmf-config.

So anyway, back to my question, can anyone tell me how I go about installing the class file?

[Update: Due to a recommendation in the comments I followed another question and made the directory C:/Users/Me/texlive/texmf/tex/latex/commonstuff/ and put the .cls file in there. Then I made the minimal example .tex file as follows

\documentclass{homework}
\begin{document}
Text
\end{document}

and in Sublime Text 2 it gave me the error 4: LaTeX Error: Missing \begin{document}. [<]. In TeXWorks it gave basically the same error.]

Best Answer

(This should be a comment, but I don't have enough reputation to leave one.)

I am the author of that class, and your minimal example doesn't work because you haven't used the necessary \name, \course, \term, and \hwnum commands in the preamble of your document, as described in the documentation. The homework class depends on those to automatically typeset the title and headers.

Have you checked if example.tex works on your machine?

Edit. Here is a truly minimal document using homework.cls:

\documentclass{homework}

\name{Artem Mavrin}
\term{Fall 2015}
\course{\TeX\ 101}
\hwnum{1}

\begin{document}

\end{document}