Wednesday, August 08, 2007

Broken sections in Elsevier elsart1p, elsart3p, and elsart5p

UPDATE: You should probably add
\def\@seccntformat#1{{\@secnumfont{}\csname the#1\endcsname.}\quad}
around line 128 (i.e., after the \@secnumfont definition) as well. Alternatively, you could add something similar (surrounded by \makeatletter and \makeatother) to your preamble.

Ever notice how section* is broken in elsart1p.cls, elsart3p.cls, and elsart5p.cls from Elsevier? Because of this, the section titles for the acknowledgments (i.e., from \ack) and the references look like normal text. Plus, the references do not show up in the PDF bookmarks. This "feature" is annoying; working with journals generally is.

How to fix this? You have to hack the document class files. In particular, you need to remove (or comment by placing a % on the beginning of the line) a chunk of lines from the document class of interest to you. In particular, remove
  • elsart1p.cls - lines 144--196
  • elsart3p.cls - lines 147--199
  • elsart5p.cls - lines 144--196
These lines redefine the LaTeX internals \@startsection, \@sect, and \@ssect. However, it does not appear there is any good reason why Elsevier has done this, so just stick with the standard ones. This will make your document look much better too.

Until Elsevier does this for you, you should upload your modified document class with your article OR use the elsart document class in the version you send to Elsevier.

1 comment:

Anonymous said...

Thanks much for the post!

I will just add one clarification regarding the the block of text to be commented out (as the line numbers are not exact).

It should start with

\def\@sect#1#2#3#4#5#6[#7]#8{%

and end with

{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}