1

I want to write an article using smjour.cls class for this journal in ShareLatex because we are three authors and we want to work together, however after uploading the class to ShareLatex and add \documentclass{SMJOUR} at the top of my file, I got the following error:

LaTeX Error: File `SMJOUR.cls' not found.

Any help would be appreciated! I think it is related to the file path but the class is uploaded into the root directory where the main.tex file is, as follow:

my ShareLatex structure, document, and teh error

Schweinebacke
  • 26,336
Mohammad
  • 111

2 Answers2

1

If Windows users upload their files to a service like ShareLaTeX or share their files with, e.g., Linux users they are sometimes astonished by error messages about files, that cannot be found. This is, because not only TeX is case-sensitive but the filesystems of most operating systems in opposite to Windows are also case-sensitive. So if you upload a file smjour.cls to such a service, you have to use \documentclass{smjour} and not \documentclass{SMJOUR}. Note also, that LaTeX will not search for smjour.CLS or SMJOUR.CLS. The extension of a class file has to be .cls in lowers case.

Similar things often happen with graphics files, e.g., package mwe provides example-image-a. So \includegraphics{Example-Image-A} cannot be found on case-sensitive filesystems.

Schweinebacke
  • 26,336
0

OK, I found the answer:

I create a new file with the ShareLatex IDE and then copy/paste all the content of my class to the new file and finally delete the old file and rename the new file to the name of the class and it works!

Hope to help others with the same problem.

Mohammad
  • 111