I downloaded a latex template for Wiley journal articles, and can open the template file but cannot seem to get Texstudio/Miktex to find the .cls file.

The template comes with a latex file which uses the class as an example, and if I open that right in the extracted ZIP folder, all is well; however, if I save-as anywhere else, I get a "cannot locate name.cls file".

I have made sure that I saved the extracted ZIP folder within a directory listed in the MikTex path (have tried two different locations) and I have refreshed the filename database (multiple times) but still the same error occurs. This also happens if I open a blank file and attempt to use the class. I have closed and opened TexStudio a number of times, but I am unsure of what else I can try.

  • you could mention where you did put the class ... then we can perhaps tell you if the path is the right one. Commented Sep 5, 2023 at 17:06
  • I put the entire template folder as I downloaded in into a folder on my desktop called "Latex Templates". I then added this directory to the path in MikTex and updated the filename database. I also added it to another folder on my computer and similarly added the path to MikTex and updated the filename database. I also tried adding this folder to the ..\AppData\Local\MikTeX folder which was already on the path by default. Commented Sep 6, 2023 at 15:54
  • that is wrong. You need to follow the tds-structure, your files should be in similar subfolders as the main files. So put the class into latextemplates/tex/latex/ and then add latextemplates as a new root. Commented Sep 6, 2023 at 16:04
  • Thank you - this resolved my issure Commented Sep 7, 2023 at 2:16


You must log in to answer this question.

Browse other questions tagged .