1

Can someone tell me what to do for creating elsarticle.cls by using the docs provided by following link?

I uploaded all the directory into overleaf but that is it. I couldn't get how to install it.

https://ctan.org/tex-archive/macros/latex/contrib/elsarticle

WhoCares
  • 311
  • 2
    Overleaf already has the elsarticle document class, so you don't need to upload the class files. You can go right ahead and write \documentclass{elsarticle} in your .tex file. Or start from https://www.overleaf.com/latex/examples/example-of-elsevier-article-template-with-dummy-text/qfscmwntknmq – imnothere Oct 22 '20 at 09:31

1 Answers1

3

If you want to use custom style or other files stored in a specific directory in your Overleaf project with them recognised when you recompile, you can create a file called latexmkrc to point to this directory, for example:

# Custom locations to include content from

Elsevier journal style

$ENV{'TEXINPUTS'}='./tex/latex/elsevier//:' . $ENV{'TEXINPUTS'};

In the above code snippet, './tex/latex/elsevier' is a series of nested folders where I saved the Elsevier style which I downloaded from CTAN.

Example compilation of an Overleaf file using the downloaded elsarticle style class files

The above is based on directions I found in the Overleaf help library here, which in turn was based on a StackExchange post here.

There are additional directions found in the elsdoc.pdf file in the elsarticle download from CTAN, here.

Regarding the suggestion to use the Overleaf elsarticle template (here) - this may work, however when I downloaded the elsarticle.cls style following Elsevier directions in January 2021, I noted that the files appeared to have been last updated in 2020, which may be more recent than the linked template which contains a rendered preview dated 2019. As a new user on this board, my reputation was too low to reply to the comment directly so added this note to my answer here.

Hope this helps!