1

I am making my own document class called MyClass in overleaf. I would like to move the cls file into its own folder called Style. How do I change the command \documentclass[Path=./Style/]{MyClass} so that it knows where the document class lives?

curry
  • 283
  • 3
    why move it? It is far better to place it in the same directory, but you could set an input path in .latexmkrc (or \documentclass{./Style/MyClass} would work but is not good practice) – David Carlisle Dec 15 '22 at 15:50
  • Please try with \documentclass{./path/MyClass} – GowriSaro Dec 15 '22 at 15:50
  • 1
    Hello there! A tutorial on this is at https://www.overleaf.com/learn/latex/Questions/I_have_a_lot_of_.cls%2C_.sty%2C_.bst_files%2C_and_I_want_to_put_them_in_a_folder_to_keep_my_project_uncluttered._But_my_project_is_not_finding_them_to_compile_correctly which itself is taken from https://tex.stackexchange.com/a/50847/11002 – yo' Dec 15 '22 at 16:05

1 Answers1

1

You can add a file latexmkrc containing the line

ensure_path('TEXINPUTS', './/:');

so all folders are searched

see

https://www.overleaf.com/read/fwygbqshbmjn

David Carlisle
  • 757,742