I've been trying LateX and Lyx out for a few days. Lyx is really a help for a new-comer and I had few troubles so far, except for some unknown errors when I was configuring elsarticle documentclass.

I have installed Lyx, MacTex 2012, and already put the elsarticle bundle into /usr/local/texlive/2012/texmf-local and reconfigured Lyx. Then I tried selecting elsarticle in Lyx and the exported TeX code in Texmaker. They both gave error information.

Here is a picture of the error info:


The file in first line is hyperref.sty under texmf-dist/tex/latex/hyperref.

%% LyX 2.0.5 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
 breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.


  • Welcome to TeX.SX. Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. – Claudio Fiandrino Dec 18 '12 at 17:34

On LaTeX-Community.org we had the very same error message in elsarticle | Problem with 'hyperref' Package. There, the OP solved it by using another TeX distribution. Which means, it can possibly fixed by updating.

However, here I can clearly see that the error goes away if you remove the pdfusetitle option. If this is set then hyperref tries to derive the values for pdftitle and pdfauthor from \title and \author. You did not set them, and it seems that it's not compatible to elsarticle, while there's no error with article.

Anyway, you can fix it by removing/replacing pdfusetitle.

  • Yes It was solved. Thank you. And is there a way to remove the pdfusetitle option in directly Lyx? e.g. Writing something in the preamble? – terencezl Dec 18 '12 at 20:36
  • 1
    @Terence Sure, look into Document / Settings / PDF propertiers, Hyperref support / Hyperlinks. – Stefan Kottwitz Dec 18 '12 at 21:13
  • Worked like magic. – terencezl Dec 18 '12 at 21:36
  • To do this with a standard editor, have a look at this post. You can add to hyperref the parameters [pdfusetitle, pdfauthor={Michael Shell, My institution}] as well to cerrect this behaviour. – Clément Jan 16 '15 at 9:11

All you have to do is to actually add a PDF title and author. Go to Document -> Settings -> PDF Properties and type a title/author under "Header Information".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.