Update: that error occurs if you specify the times
option and if txfonts
is not installed. In that case elsarticle tries to load the obsolete times
package, and it does it in the wrong way: \RequirePackage{times}
causes the error. \AtEndOfClass{\RequirePackage{times}}
would work.
Suggested solution: install the txfonts
package. Use your package manager if possible.
It seems to me that you are using a modified elsarticle class, not an original one. According to the log file, you load:
Document Class: elsarticle 2009/09/17, 1.20b: Elsevier Ltd
But the original current version is elsarticle 2009/09/17, 1.2.0
. You can get it from CTAN or use your package manager.
I can't reproduce the error with the code snipset:
\listfiles
\documentclass[12pt, a4paper, twoside]{book}
\usepackage[top=1.50in, bottom=1.50in, left=1.25in, right=1.25in]{geometry}
\usepackage[shortlabels]{enumitem}
\usepackage{pdfpages}
\usepackage{balance}
\usepackage{color}
\begin{document}
Hello World
\end{document}
The file runs without errors or warnings.
The version list:
*File List*
book.cls 2007/10/19 v1.4h Standard LaTeX document class
bk12.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
geometry.sty 2010/09/12 v5.6 Page Geometry
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifvtex.sty 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
geometry.cfg
enumitem.sty 2011/09/28 v3.5.2 Customized lists
pdfpages.sty 2012/04/03 v0.4s Insert pages of external PDF documents (AM)
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
calc.sty 2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
eso-pic.sty 2010/10/06 v2.0c eso-pic (RN)
atbegshi.sty 2011/10/05 v1.16 At begin shipout hook (HO)
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
pppdftex.def 2012/04/03 v0.4s Pdfpages driver for pdfTeX (AM)
balance.sty 1999/02/23 4.3 (PWD)
supp-pdf.mkii
pdftexcmds.sty 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
epstopdf-base.sty 2010/02/09 v2.5 Base part for package epstopdf
grfext.sty 2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Define keys (HO)
kvoptions.sty 2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty 2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
***********
In the comments the OP assumes the following as culprit:
\usepackage{pgfplots}
\pgfmathdeclarefunction{gauss}{2}{%
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-0.5*((x-#1)/#2)^2)}%
}
The function can be found in the French Wikipedia:
![Gauss function](https://i.stack.imgur.com/WuuFq.png)
Then μ and σ are the first and second parameter of your new function gauss
. But there is a third paramter, the function argument x
itself.
\pgfmathdeclarefunction{gauss}{3}{%
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-0.5*((#3-#1)/#2)^2)}%
}
Then the function is called with three arguments: μ, σ, and x.
\pgfmathparse{gauss(0,1,2)}
The function can also be optimized. For example, the calculations with constants can be moved outside:
\pgfmathparse{1/(sqrt(2*pi)}
\let\gaussAux\pgfmathresult
\pgfmathdeclarefunction{gauss}{3}{%
\pgfmathparse{\gaussAux/#2*exp(-0.5*((#3-#1)/#2)^2)}%
}
Best Answer
The package you are loading has
or
(which is the same thing)
after
but before that option has been processed with
That is not allowed.