16

I would like to use my own classes and packages in all my projects and I wonder if it's possible to do that, working with Overleaf or ShareLatex.

Of course, I don't want to paste my personal .cls and .sty in each project.

Thanks for helping me

damien
  • 161
  • 5
    On Overleaf your custom .cls and .sty files still need to be in each project you want to use them with, either by uploading them to the project directly or by the "Add file from other project" function as a linked file. To make the process easier, you can first create a project that contains all your usual .cls and .sty files, and then use "Open a Copy" from your Overleaf dashboard to create clones from it. Each newly created project like this will then contains the custom .cls and .sty files. – imnothere Sep 18 '16 at 15:00
  • It is a lot easier just to input a .tex file containing all your definitions in the preamble. – John Kormylo Sep 18 '16 at 15:14
  • Lim : do you know if some change in an original .cls will be effective in the cloned .cls ? John : this is not just that simple. I regularly create several types of documents (articles, books...) in differents sizes (a4, a5, a6) and different constraints, thus a single .tex is not the best choice. – damien Sep 18 '16 at 19:33
  • @LianTzeLim Do you want to write up an answer? – Johannes_B Jul 30 '17 at 09:09
  • Thanks @Johannes_B, added an answer with some links to help articles on OL. – imnothere Jul 31 '17 at 07:15

1 Answers1

10

On Overleaf, your custom .cls and .sty files still need to be in each project you want to use them with, either by uploading them to the project directly or by the "Add file from other project" function as a linked file.

Alternatively, you can first create a project that contains all your usual .cls and .sty files, and then use "Open a Copy" from your Overleaf dashboard to create clones from it. Each newly created project like this will then contain the custom .cls and .sty files.

imnothere
  • 14,215