2

I am using overleaf to make excercises with my group in our different classes.

We have multiple projects, one for each subject, all with the same preamble. We of course update the preamble from time to time to accommodate for the new commands and functionalties we need. This is very cumbersome given that I have to then also jump into each other project I have to update the preamble in there. Is there a way to call one master preamble in all of ones projects?

3
  • running locally you would just place a shared mypreamble.sty in the local texmf tree and then use \usepackage{mypreamble} but each overleaf project runs as a separate container so I think you will need to upload the shared file separately to each project. It should only be a single file upload in each case. Oct 4, 2021 at 12:42
  • 1
    In overleaf you can add files from another project, so you can write your preamble as a separate file and input it in your other projects. Is not as smooth as the local method suggested by David Carlisle but is the best I can think about. Oct 4, 2021 at 13:35
  • 1
    Hi there, Tom from Overleaf Support here. What Luis wrote is entirely correct and it's the best way forward I'd say. @LuisTurcio Do you wish to make it an answer? :) You can also add a link to overleaf.com/learn/how-to/… for further reading ;)
    – yo'
    Oct 4, 2021 at 14:23

1 Answer 1

4

To be able to have a common preamble for you overleaf documents you can start with this guide to share files from project to project. Then create a file, say, preamble.tex with your common packages and definitions and load it in all the projects you want. Any new definition or change can be done in preamble.tex and loaded in other documents by just refreshing that file.

(Feel free to edit this answer to made it complete and understandable)

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .