Recognitions:
Gold Member

## Installing .cls file in MikTex

Okay I am at my wit's end here. I need some personal guidance, reading internet information has gotten me nowhere. Sorry if this is the wrong sub forum first of all.

*stay calm stay calm*

I am trying to work on my undergraduate thesis as a latex document. I am using MikTex because that is what my university provides. My university does not seem to provide a document class but other schools do, so I want to pick a random school to use, just to jump start the formatting. So I downloaded a thesis.cls file. First of all, I don't know where to put it. I currently have it in tex/latex/thesis. (If it matters I'm using MikTex portable). I pressed the refresh FNDB button. I also pressed the "update formats" button. But when I try to use the document class, it says it can't find thesis.cls.

I have tried reading every direction on the planet but I am not getting anywhere. I am not experienced with latex, or programming or much advance computer function at all. I really need some patient advice.

 PhysOrg.com science news on PhysOrg.com >> 'Whodunnit' of Irish potato famine solved>> The mammoth's lament: Study shows how cosmic impact sparked devastating climate change>> Curiosity Mars rover drills second rock target

Recognitions:
This isn't a good long term solution, but try putting the .cls file in the same directory as your other .tex files. If it still doesn't work, the problem isn't that MikTeX can't find it, it's something else.

I don't use MikTeX portable, so I don't know if there are any special issues installing packages with it. The "non-portable" version of MikTeX has a "package manager" that will automatically download and install any missing packages that it knows about, the first time you try to use them. Look to see if you have a Package Manager utility in the portable version. If you have it, the database of packages will probably contain 10 or 20 "thesis" formats already, so pick one of those rather than something you found "at random" on the web.

Otherwise, just forget about all this for now. and use with the standard package
\documentclass{book}
which "understands" all the basic document formatting structures like chapters, sections, figures, footnotes, tables of contents, etc. Don't spend a lot of time tweaking the detailed layout of your document untill you have finished writing the content, or you will only have to tweak it again, and again, and again!

 My university does not seem to provide a document class
This seems strange. Most universities have fairly strict rules about how theses should be formatted, and it doesn't make much sense for every PhD candidate to have to reinvent the formatting wheels for themselves. If the uni supplied you with MikTeX portable already installed on a USB drive or whatever, I would ask the people who supplied it what document format you are supposed to use.

 Recognitions: Gold Member omg I just wrote long reply and accidentally closed it. >_< So basically putting thesis.cls in the same place as my document did not help. I agreed to let miktex search for the document class online and download it. It did this and then was able to run my document but I do not know/think that this is the same document class that I was trying to install myself. I went to the package manager and added the {psu-thesis} class. When I tried to use this in my document it could not find it. I had refreshed the FNDB too, that didn't help. Weird thing is I did install a package before, {IEEEtrantools} and am successfully using that. At this point I think your suggestion that I don't bother with random document classes from the web and I stick to one of the included packages is a good idea. So how do I get the package added from the package manager?

Recognitions:
Gold Member

## Installing .cls file in MikTex

And thank you very much for your ideas and help by the way, alephzero.

Recognitions:
 Quote by ArcanaNoir I went to the package manager and added the {psu-thesis} class. When I tried to use this in my document it could not find it. I had refreshed the FNDB too, that didn't help.
Hm... I don't understand what you mean by "added the class" in the package manager. The package manager has a database of all the packages that it knows about (more than 2000 in the "non-portable" version). That is pretty much everything that has been put onto the "official" CTAN TeX archive, is compatible with MikTeX, and doesn't violate the software license restrictions.

If you got the auto-install to work for IEEEtrantools, it should work for other packages!

AFAIK if you want to install something that is not in the package database, you have to do it manually, i.e. by copying the various files to the correct places in the TeX directory structure - but that's going back to your original problem.

 Recognitions: Gold Member Sorry for my vocabulary. I don't have a good handle on this. I went to the miktex package manager and yes there were like 2167 thingys. I'll call them thingys. I chose the psuthesis thingy. I clicked on add this thingy. So I went and found the manual that came with psuthesis and read the beginning commands, and did them like they said. So the begining of my document looks like this: Then miktex complained about a doublespace package so I read online that that was obsolete and I should use setspace. So I went back to the package manager and added setspace. Problem is I'm not sure how to give the command for "doublespacing" and the readme file didn't say. regardless, i put this in for my document beginning \documentclass{report} \usepackage{setspace} \usepackage{psu-thesis} \usepackage{amsmath} \begin{document} and miktex gave me back this error : ! LaTeX Error: Option clash for package setspace. Don't really know where to go from here.
 Recognitions: Science Advisor OK, here's a TeX debugging demo (I've never used these packages before). If you look in the .log file you will see some messages like Code: ... ("C:\Program Files\MiKTeX 2.9\tex\latex\setspace\setspace.sty" Package: setspace 2011/12/19 v6.7a set line spacing ) ("C:\Program Files\MiKTeX 2.9\tex\latex\psu-thesis\psu-thesis.sty" Package: psu-thesis 2008/9/17 1.1 Contributed and Supported LaTeX2e package Package: psu-thesis' 1.1 <2008/9/17> ! LaTeX Error: Option clash for package setspace. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.146 The package setspace has already been loaded with options: [] There has now been an attempt to load it with options [doublespacing] ... When TeX starts to read a ile, the log file says "(filename", and when it stops reading the file it prints the matching ")" . So, Code: ("C:\Program Files\MiKTeX 2.9\tex\latex\setspace\setspace.sty" Package: setspace 2011/12/19 v6.7a set line spacing ) says TeX processed setspace.sty without complaining about anything. But then psu-thesis.sty tried to read setspace.sty again, with a different incompatible option (and it's a reasonable guess that the "doublespace" option is something to do with double spacing). So the fix is probably to delete the line "\usepackage{setspace}" and just let psu-thesis do whatever it wants to do. Another take-home message: the documentation for packages is often out of date - e.g. the stuff about using "doublespace". This works for me, and the output is double spaced. Code: \documentclass{report} \usepackage{psu-thesis} \usepackage{amsmath} \begin{document} This is a long paragraph. This is a long paragraph. This is a long paragraph. This is a long paragraph. This is a long paragraph. This is a long paragraph. This is a long paragraph. This is a long paragraph. This is a long paragraph. This is a long paragraph. \end{document}`
 Recognitions: Gold Member That's pretty awesome, I was able to run the stuff the way you presented and got the results you did. Then I put the commands into my thesis document and unfortunately the psu-thesis package did something to the margins so I was unable to set my margins properly. Before I put the psu-thesis command in my document set up looked like this: \documentclass[12pt]{report} \usepackage{amssymb,amsmath} \usepackage[retainorgcmds]{IEEEtrantools} \usepackage{setspace} \doublespacing \usepackage[margin=1in]{geometry} \begin{document} And I had 1-inch margins all around. After I put the psu-thesis command in I have this: \documentclass[12pt]{report} \usepackage[margin=1in]{geometry} \usepackage{psu-thesis} \usepackage{amssymb,amsmath} \usepackage[retainorgcmds]{IEEEtrantools} \begin{document} but the left margin is larger than 1 inch. Maybe that's okay, but that's not really the point. The point is if I DID want to change that margin, is it now more difficult? So if the psu-package is going to screw up the more well-known commands, should I really just give up on using a thesis package and just do the formatting myself with standard latex? I thought a thesis package would be a good quick start for formatting but if re-adjusting the formatting is going to be even harder than setting it all up in the first place I guess I should forget about it. Am I seeing the situation correctly?
 Recognitions: Science Advisor The basic point of something like the "thesis" package is that it gives you the format that is mandatory for submitting a thesis at the organization which wrote the package. In other words, you aren't meant to tweak it. Don't ask WHY people make apparently pointless rules like specifying the width of the page margins, but they do. (There is probably somebody in the university adnin office whose offical job title is "thesis page margin measurement executive"...) IMO the best time to worry about details of formatting is AFTER you have a few hundred pages of nearly-complete document to format. Then you know what the real constraints are (e.g. the "best" choice for page margins might depend on the size of some graphics you want to include, or whatever). If you want to have control of every last formatting detail, I suggest you use the "memoir" document class. That has its own built-in versions of a lot of other packages (including "geometry") which tends to minimize compatibilty problems. Even better, it has a very good user guide, which includes a section specifically on formatting theses. The bad news is, the user guide is about 550 pages long, so you might end up learning a lot more than you ever wanted to know about document formatting...

Recognitions:
The "mf" probably stands for "MetaFont", which was the program that Knuth wrote to create the original fonts used be TeX. MetaFont is rarely used now, because it creates fonts in a format that doesn't work well with PDF output files. TeX and MetaFont were written before PDFs had been invented.

In the same place (e.g. the Windows start menu) that gets you to the Package Manager, do you have something like Help - Manual? That contains a description of the MikTeX directory structure, which might not be exactly the same as the TeX version used by the person who wrote the package documentation.

Fair enough - I assumed by "thesis" you meant "PhD Thesis!"

Recognitions:
Gold Member
 Quote by AlephZero Fair enough - I assumed by "thesis" you meant "PhD Thesis!"
some day.....