Document Classeselsarticle | Document Class not working

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
zomgbroken
Posts: 6
Joined: Sat Oct 04, 2008 2:06 pm

elsarticle | Document Class not working

Post by zomgbroken »

I've been trying to use the Elsarticle document class, but it doesn't seem to be working.

You can download the document class here (http://www.elsevier.com/wps/find/author ... elsarticle), click "elsarticle.zip" in the "Obtaining elsarticle" section.

After downloading the zip, I unzipped it and compiled the "elsarticle-template-1a-num.tex" file.

Here's the error I get from TeXworks:

Code: Select all

This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)
entering extended mode
(C:\Users\REMOVED\Downloads\elsarticle\elsarticle-template-1a-num.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, 
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese, 
romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
senglishmax, welsh, loaded.
(C:\Users\REMOVED\Downloads\elsarticle\elsarticle.cls
Document Class: elsarticle 2009/09/17, 1.20b: Elsevier Ltd
("C:\Program Files (x86)\LaTeX\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files (x86)\LaTeX\MiKTeX 2.9\tex\latex\base\size12.clo"))
("C:\Program Files (x86)\LaTeX\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
("C:\Program Files (x86)\LaTeX\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
("C:\Program Files (x86)\LaTeX\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
("C:\Program Files (x86)\LaTeX\MiKTeX 2.9\tex\latex\graphics\trig.sty")
("C:\Program Files (x86)\LaTeX\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")
("C:\Program Files (x86)\LaTeX\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"
("C:\Program Files (x86)\LaTeX\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")
("C:\Program Files (x86)\LaTeX\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"))))
 ("C:\Program Files (x86)\LaTeX\MiKTeX 2.9\tex\latex\psnfss\pifont.sty"
("C:\Program Files (x86)\LaTeX\MiKTeX 2.9\tex\latex\psnfss\upzd.fd")
("C:\Program Files (x86)\LaTeX\MiKTeX 2.9\tex\latex\psnfss\upsy.fd")
======================================================================
miktex-pdftex.exe: Cannot start MiKTeX package manager.
miktex-pdftex.exe: Data: Invalid syntax


======================================================================
miktex-maketfm.exe: Cannot start MiKTeX package manager.
miktex-maketfm.exe: Data: Invalid syntax

======================================================================
Running miktex-makemf.exe...
miktex-makemf: The psyr source file could not be found.

Running hbf2gf.exe...


hbf2gf (CJK ver. 4.8.0)



Couldn't find `ps.cfg'

miktex-maketfm: No creation rule for font psyr.
======================================================================

! Font U/psy/m/n/12=psyr at 12.0pt not loadable: Metric (TFM) file not found.
<to be read again> 
                   relax 
l.64 {\Pifont{psy}
                  }
? 
My experience with using document classes is nonexistent (apart from default document classes like article), so am I doing something wrong? Do I have to do more than just compile the tex file?

The part of the error message that says "Cannot start MiKTeX package manager." is curious. Is there some package that I should install?
Last edited by zomgbroken on Sun Nov 13, 2011 1:41 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

elsarticle | Document Class not working

Post by localghost »

Why don't you just install the elsarticle class by the MiKTeX Package Manager (MPM)?


Thorsten
zomgbroken
Posts: 6
Joined: Sat Oct 04, 2008 2:06 pm

elsarticle | Document Class not working

Post by zomgbroken »

localghost wrote:Why don't you just install the elsarticle class by the MiKTeX Package Manager (MPM)?


Thorsten
I just tried installing elsarticle through the MiKTeX Package Manager, and then I compiled the tex code again. Still getting the same error. I also tried adding the lines "\usepackage{elsarticle}", but that doesn't help either.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

elsarticle | Document Class not working

Post by localghost »

This is the moment where you should provide a minimal example that exactly reproduces the error.
zomgbroken
Posts: 6
Joined: Sat Oct 04, 2008 2:06 pm

elsarticle | Document Class not working

Post by zomgbroken »

localghost wrote:This is the moment where you should provide a minimal example that exactly reproduces the error.
There were steps to reproduce the error in the original post. However, here's the tex file from the download link with all the comments (and some other irrelevant stuff) removed. I added the "\documentclass{article}" line. I guess this can be considered a minimal working example.

Code: Select all

\documentclass{article}
%\documentclass[preprint,12pt]{elsarticle}

%\journal{Nuclear Physics B}

\begin{document}
%\begin{frontmatter}
%\title{}
%\author{}
%\address{}
%\begin{abstract}
%\end{abstract}
%\end{frontmatter}

Some text
\end{document}
Switching from document class article to elsarticle causes the error.

The elsarticle.cls file is in the same folder as the above tex file. I've opened it and had a look, but I have no idea what the .cls file is doing.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

elsarticle | Document Class not working

Post by localghost »

Somewhere in the MiKTEX settings you can select whether the compiler should install packages "on the fly". Set this to "Yes". If the problem persists, you might have a major problem with your MiKTeX installation. I don't know why, but I overlooked somehow a large passage in the log file.

Code: Select all

======================================================================
miktex-pdftex.exe: Cannot start MiKTeX package manager.
miktex-pdftex.exe: Data: Invalid syntax


======================================================================
miktex-maketfm.exe: Cannot start MiKTeX package manager.
miktex-maketfm.exe: Data: Invalid syntax

======================================================================
Running miktex-makemf.exe...
miktex-makemf: The psyr source file could not be found.

Running hbf2gf.exe...


hbf2gf (CJK ver. 4.8.0)



Couldn't find `ps.cfg'

miktex-maketfm: No creation rule for font psyr.
======================================================================
Seems so as if the system tries to rebuild some formats. Open a command line a try an initialization.

Code: Select all

initexmf --dump
If that doesn't help, I'm out of the race.
zomgbroken
Posts: 6
Joined: Sat Oct 04, 2008 2:06 pm

Re: elsarticle | Document Class not working

Post by zomgbroken »

I did have install on the fly turned on.

However, I have solved the problem by installing every package in MikTeX. It took a few hours but at least it's working now.
pkosovan
Posts: 1
Joined: Fri Aug 30, 2013 5:30 pm

Re: elsarticle | Document Class not working

Post by pkosovan »

The package that needs to be installed is texlive-symbol which contains the missing font which the elsarticle requires.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

elsarticle | Document Class not working

Post by localghost »

pkosovan wrote:The package that needs to be installed is texlive-symbol which contains the missing font which the elsarticle requires.
How can a TeX Live package have to be installed when the concerned TeX system is MiKTeX?
kkgrandi
Posts: 1
Joined: Mon Jan 20, 2014 2:09 pm

Re: elsarticle | Document Class not working

Post by kkgrandi »

The "symbol" package in MiKTeX seems to remove the error.
Post Reply