1

I am writing my first document in the Texmaker program and I need to use the jfm (Journal of Fluid Mechanics) class, but I don't know how; even after reading some answers here and videos. I already downloaded the zip file with the document class, but I'm not sure where the sub-directory is and which files I need to place there. Could someone help me, please?

Thanks

marked as duplicate by Johannes_B, Andrew Swann, TeXnician, Stefan Pinnow, user31729 Oct 22 '17 at 11:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    Have you tried copying the .cls file (or basically everything that was in the .zip archive) in the same folder than your .tex document? – ebosi Oct 26 '16 at 12:21
  • I copied to the folder where tex was installed, now I copied there and doesn't give me the error anymore. I can start working now. Thank you very much! – dfel Oct 26 '16 at 12:43
0

Most common classes and packages files are copied (and thus installed) in your TeX install tree when you install a LaTeX distro (MikeTeX, TeXlive, MacTeX, etc.) on your OS. Thus, (La)TeX knows where to find relevant files when you compile your .tex document.

But in some cases (yours, with the jfm class), the class or package is not embedded in the TeX distro you installed. Since "installing" a class or a package is just copying its file (.cls or .sty, respectively) in a folder where (La)TeX will look for it, you have two possibilities (i.e. two loctation where (La)TeX will look for it):

  • Copy the .cls file in your local TeXmf tree (hint for TeXlive, and for MikeTeX). This will make the class/package available for each project you'll create.
  • Or copy the .cls file in the same folder than your .tex document. It is the easiest, but you will have to repeat it for each new project.
  • 2
    It's better to install it in a local TeXMF root, not in the main (distribution) root. Under TeX Live, such a local root is created at installation, but under MiKTeX, you have to create one, and let MiKTeX know it (via MiKTeX Settings (admin)). – Bernard Oct 26 '16 at 12:56
  • 1
    I’m sorry, but this is a bad answer (indeed, it would deserve a downvote): tampering with the installation tree is never a good idea; among other things, future updates will almost surely “hide” the added file, so that it won’t be found any longer. Personal files should be stored either in the local texmf tree or in a user’s personal texmf tree, and actually the answer you are linking to speaks of the latter. Under both of those tree, .cls and .sty file, in particular, should be placed inside tex/latex/, or a sub-(sub-…sub-)directory thereof. – GuM Jun 23 '17 at 23:28
  • @GustavoMezzetti No need to be sorry, as it is factual. Anyway, thanks to your comment I've updated the answer accordingly. – ebosi Jun 24 '17 at 1:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.