Elsarticle.cls: Difference between revisions

From STMDocs
Jump to navigation Jump to search
(New page: ==Introduction== <code>elsarticle.cls</code> is a thoroughly re-written document class for formatting LaTeX submissions to Elsevier journals. The class uses the environments and commands ...)
 
No edit summary
Line 40: Line 40:
The package is available at [http://www.elsevier.com/locate/latex author resources page at Elsevier Science].
The package is available at [http://www.elsevier.com/locate/latex author resources page at Elsevier Science].
It can also be found in any of the nodes of the Comprehensive TeX Archive Network (CTAN), one of the primary nodes being [http://www.ctan.org/tex-archive/macros/latex/contrib/elsevier/ http://www.ctan.org]. Please grab the <code>elsarticle.dtx</code> which is the composite class with documentation and  <code>elsarticle.ins</code> which is the LaTeX installer file. When we compile the <code>elsarticle.ins</code> with LaTeX it provides the class file, <code>elsarticle.cls</code> by stripping off all the documentation from the <code>*.dtx</code> file. The class may be moved or copied to a place, usually, <code>$TEXMF/tex/latex/elsevier/</code>, or a folder which will be read by LaTeX during document compilation.  The TeX file database needs updation after moving/copying class file.  Usually, we use commands like <code>mktexlsr</code> or <code>texhash</code> depending upon the distribution and operating system.
It can also be found in any of the nodes of the Comprehensive TeX Archive Network (CTAN), one of the primary nodes being [http://www.ctan.org/tex-archive/macros/latex/contrib/elsevier/ http://www.ctan.org]. Please grab the <code>elsarticle.dtx</code> which is the composite class with documentation and  <code>elsarticle.ins</code> which is the LaTeX installer file. When we compile the <code>elsarticle.ins</code> with LaTeX it provides the class file, <code>elsarticle.cls</code> by stripping off all the documentation from the <code>*.dtx</code> file. The class may be moved or copied to a place, usually, <code>$TEXMF/tex/latex/elsevier/</code>, or a folder which will be read by LaTeX during document compilation.  The TeX file database needs updation after moving/copying class file.  Usually, we use commands like <code>mktexlsr</code> or <code>texhash</code> depending upon the distribution and operating system.
==Usage==
The class should be loaded with the command:
<geshi lang="latex">
\documentclass[<options>]{elsarticle}
</geshi>
where the <code>options</code> can be the following:
; <code>preprint</code>: default options which formats the document for submission to Elsevier journals.
; <code>review</code>: similar to </code>preprint</code> option, but increases the baselineskip to facilitate easier review process.
; <code>1p</code>: formats to the look and feel of the final format of model 1+ journals. This is always single column style.
; <code>3p</code>: formats to the look and feel of the final format of model 3+ journals. If the journal is a two column model use <code>twocolumn</code> option in combination.
; <code>5p</code>: formats for model 5+ journals. This is always two column style.
; <code>authoryear</code>: author-year citation style of <code>natbib.sty</code>. If you want to add extra options of <code>natbib.sty</code>, you may use the options as a comma delimited strings as argument to <code>\biboptions</code> command. An example would be:
<geshi lang="latex">
\biboptions{longnamesfirst,angle,semicolon}
</geshi>
; <code>number</code>: numbered citation style. Extra options can be loaded with <code>\biboptions</code> command.
; <code>longtitle</code>: if front matter is unusually long, use this option to split the title page across pages with correct placing of title and author footnotes in the first page.
; <code>times</code>: loads <code>txfonts.sty</code> if available in  the system to use Times and compatible math fonts.
* All options of <code>article.cls</code> can be used with this  document class.
* The default options loaded are <code>a4paper</code>, <code>10pt</code>, <code>oneside</code>, <code>onecolumn</code> and <code>preprint</code>.

Revision as of 10:39, 31 July 2008

Introduction

elsarticle.cls is a thoroughly re-written document class for formatting LaTeX submissions to Elsevier journals. The class uses the environments and commands defined in LaTeX kernel without change to the signature so that clashes with other contributed LaTeX packages like hyperref.sty, preview-latex.sty, etc., will be minimal. elsarticle.cls is primarily built upon the default article.cls. The class depends on the following packages for its proper functionality:

  1. pifont.sty for openstar in the title footnotes.
  2. natbib.sty for citation processing.
  3. geometry.sty for margin settings.
  4. fleqn.clo for left aligned equations.
  5. graphicx.sty for graphics inclusion.
  6. txfonts.sty optional font package, if document is to be formatted with Times and compatible math fonts.
  7. hyperref.sty optional packages if hyper linking is required in the document.

All the above packages are part of any standard LaTeX installation. Therefore, the users need not be bothered about downloading any extra packages. Further, users are free to make use of \textsc{ams} math packages like, amsmath.sty, amsthm.sty, amssymb.sty, amsfonts.sty, etc., if they want. All these packages work in tandem with elsarticle.cls without any problems.

Major Differences

Following are the major differences between elsarticle.cls and its predecesor package, elsart.cls:

  • elsarticle.cls is built upon article.cls while elsart.cls is not. elsart.cls redefines many of the commands in the LaTeX classes/kernel, which can possibly cause surprising clashes with other contributed LaTeX packages.
  • Provides preprint document formatting by default, and optionally formats the document as per the final style of models 1+, 3+ and 5+ of Elsevier journals.
  • Some easier hooks for formatting list and theorem environments are provided while people can still use amsthm.sty package.
  • natbib.sty is the main citation processing package which can comprehensively handle all kinds of citations and works perfectly with hyperref.sty in combination with hypernat.sty.
  • Long title pages are processed correctly in preprint and final formats.

Installation

The package is available at author resources page at Elsevier Science. It can also be found in any of the nodes of the Comprehensive TeX Archive Network (CTAN), one of the primary nodes being http://www.ctan.org. Please grab the elsarticle.dtx which is the composite class with documentation and elsarticle.ins which is the LaTeX installer file. When we compile the elsarticle.ins with LaTeX it provides the class file, elsarticle.cls by stripping off all the documentation from the *.dtx file. The class may be moved or copied to a place, usually, $TEXMF/tex/latex/elsevier/, or a folder which will be read by LaTeX during document compilation. The TeX file database needs updation after moving/copying class file. Usually, we use commands like mktexlsr or texhash depending upon the distribution and operating system.

Usage

The class should be loaded with the command: <geshi lang="latex">

\documentclass[<options>]{elsarticle}

</geshi> where the options can be the following:

preprint
default options which formats the document for submission to Elsevier journals.
review
similar to preprint option, but increases the baselineskip to facilitate easier review process.
1p
formats to the look and feel of the final format of model 1+ journals. This is always single column style.
3p
formats to the look and feel of the final format of model 3+ journals. If the journal is a two column model use twocolumn option in combination.
5p
formats for model 5+ journals. This is always two column style.
authoryear
author-year citation style of natbib.sty. If you want to add extra options of natbib.sty, you may use the options as a comma delimited strings as argument to \biboptions command. An example would be:

<geshi lang="latex">

\biboptions{longnamesfirst,angle,semicolon}

</geshi>

number
numbered citation style. Extra options can be loaded with \biboptions command.
longtitle
if front matter is unusually long, use this option to split the title page across pages with correct placing of title and author footnotes in the first page.
times
loads txfonts.sty if available in the system to use Times and compatible math fonts.
  • All options of article.cls can be used with this document class.
  • The default options loaded are a4paper, 10pt, oneside, onecolumn and preprint.