Changing Article Style in Overleaf

TL;DR: Just use generic style files for new projects.

Overleaf is the best tool I have found for collaborating on Latex documents.  It is cloud-based, has a ton of templates, nice text editing features that go beyond TexShop and other desktop editors I know, and the rich text editor (using a GUI, like a word processor) has been robust the times I tested it out.  One area, however, I find unnecessarily difficult: switching article styles.

I started a project using the submission template for a major journal.  Cool!, I thought, an easy method of making my drafts look extra polished.  Feedback from a few colleagues, however, suggested that people may assume one is being presumptuous in using such a template.  I understand that and disagree, but conformity pressures won and I decided to switch to a neutral template.  Switching is where the difficulty began.

There is no easy way to tell Overleaf to change the entire style of your document, so I found two approaches.  The first approach is to create a new project with the new template and paste everything from your old project into the appropriate files in the new project.  Since my project already had an extensive bibliography and figures folder, I did not want to do this.  The second approach, the one I implemented, is to add the appropriate files from the desired template to the current project’s directory.  Unfortunately, this step was not as easy as expected.

There are a couple of tricks I had to learn, however.  First, you could create a series of new documents in the current project and paste the necessary .cls, .bst, and .bib content into the corresponding new files.  Because I tend to misname things in small ways that take forever to figure out, I did not use this approach.  Instead, I used a second approach, which is to navigate to  Files -> Add -> File from other Project.  This other project is the template I want, saved as a new project in my Overleaf account.  I then added the files I wanted and changed the document class in my document preamble.

Problem solved?  Of course not, we’re dealing with computers and old software here!  Because all style files are different, many of the commands I had in the old template needed to be changed and packages added to the front matter.  For example, I had to tell the now updated document to use natbib, booktabs, and various AMS packages, as they were not part of the preamble of the new template.

The most frustrating part, however, was customizing the new .sty file to conform to political science norms.  Customization was not the problem, per se, the problem is how Overleaf handles these documents.  You see, I had only “linked” the new template’s files to my project, so I could not change them in my project.  Instead, I had to go to the project where the files are and change those files directly.  Remember, that project is simply the template I want, created as a project in my account; if you look at that project, it is all template filler.  Once I changed the style file, I then had to refresh the linked file in my active project’s folder.

To summarize: create a new project with the desired new template; link that template’s files to the active project; change the active project’s document class; modify the active project’s preamble as necessary to match the new template; edit the template project’s files as necessary; and refresh the linked files when those edits are made.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: