Adding Custom Templates to a Self-Hosted Overleaf (fka ShareLaTeX) Instance
Self-hosting Overleaf, formerly known as ShareLaTeX, allows you to have greater control over your LaTeX environment, including adding custom templates. This article will guide you through the process of adding a custom template to your self-hosted Overleaf instance.
Locating the Data Directory
The first step in adding a custom template to your self-hosted Overleaf instance is to locate the data directory. This directory is where Overleaf stores all of its configuration files, including templates. The location of the data directory may vary depending on your operating system and how you installed Overleaf. If you are having trouble finding the data directory, consult the Overleaf documentation or reach out to their support team for assistance.
Adding a Custom Template
Once you have located the data directory, you can add a custom template by creating a new directory within the templates directory. The name of this directory will be the name of your template. For example, if you are creating a template for a research paper, you might name the directory research-paper.
Within the template directory, you will need to create a number of files, including a .tex file for the LaTeX source code, a .sty file for any custom styles, and a .png or .jpg file for a thumbnail image. You can also include any other files that are necessary for your template, such as images or data files.
Compiling the Paper
Once you have added your custom template to the data directory, you can compile a paper using that template by selecting it from the list of templates in the Overleaf interface. The paper will be compiled using the LaTeX source code in the .tex file, and any custom styles or other files in the template directory will be included as well.
Adding custom templates to a self-hosted Overleaf instance is a relatively simple process that allows you to have greater control over your LaTeX environment. By following the steps outlined in this article, you can create and use your own custom templates for a variety of purposes, from research papers to presentations and beyond.
References
- Overleaf. (n.d.). Documentation. Retrieved from https://www.overleaf.com/learn
- Overleaf. (n.d.). Support. Retrieved from https://www.overleaf.com/contact