Ignacio García schrieb:

When I check the hyperref support in LyX document setting, the
spanish.ldf user options don't work. babel is loaded before.

However, if I insert manually hyperref in the LyX latex preamble,
spanish user commands work now. babel is loaded after.

This doesn't work for me, see below. Can you send me please an example LyX file?

The problem is that hyperref has to be loaded _after_ babel. Unfortunately Spanish support is a bit different that any other babel language support. I think I read recently that the Spanish babel maintainer will change this or perhaps has already changed it in the latest babel release.

Here is the relevant latex output in both cases:

Hyperref loaded in LyX document setting:

 \documentclass[spanish]{article}
 \usepackage[T1]{fontenc}
 \usepackage[latin9]{inputenc}
 \usepackage{babel}

 \usepackage[unicode=true, pdfusetitle,
  bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
  breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
  {hyperref}

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
 \def\spanishoptions{es-minimal}

 \begin{document}

Hmm, that woks/compiles here.

Hyperref loaded in LyX latex preamble:

 \documentclass[spanish]{article}
 \usepackage[T1]{fontenc}
 \usepackage[latin9]{inputenc}

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
 \def\spanishoptions{es-minimal}
 \usepackage[unicode=true, pdfusetitle,
  bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
  breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
  {hyperref}

 \usepackage{babel}

 \begin{document}

This doesn't compile here, because babel must be loaded _before_ \def\spanishoptions{es-minimal}, because otherwise \spanishoptions is not defined.

regards Uwe

Reply via email to