Discussion:
Hyperref color links
Alberto Escrig Vidal
2014-09-29 06:18:11 UTC
Permalink
When this option is selected, LyX automatically adds:



\usepackage{color}



before babel is loaded.



If a multilingual Italian/Spanish document is involved (Spanish being
the main language), this causes the document to fail to compile (with an
updated MiKTeX distribution), such as the following minimal example:



\documentclass[italian,spanish]{book}



\usepackage{color}

\usepackage{babel}

\usepackage[colorlinks=true]{hyperref}



\begin{document}

foo

\end{document}



The problem is easily solved in LaTeX by loading color after babel is
loaded. In LyX there is also a workaround: providing colorlinks=true as
an additional hyperref option, which is not very elegant, because the
LaTeX translate will look like:



\usepackage[colorlinks=false,colorlinks=true]{hyperref}



Is it possible to influence LyX to load color after babel being loaded?
Scott Kostyshak
2014-10-03 05:11:57 UTC
Permalink
On Mon, Sep 29, 2014 at 2:18 AM, Alberto Escrig Vidal
Post by Alberto Escrig Vidal
\usepackage{color}
before babel is loaded.
If a multilingual Italian/Spanish document is involved (Spanish being the
main language), this causes the document to fail to compile (with an updated
\documentclass[italian,spanish]{book}
\usepackage{color}
\usepackage{babel}
\usepackage[colorlinks=true]{hyperref}
\begin{document}
foo
\end{document}
The problem is easily solved in LaTeX by loading color after babel is
loaded. In LyX there is also a workaround: providing colorlinks=true as an
additional hyperref option, which is not very elegant, because the LaTeX
\usepackage[colorlinks=false,colorlinks=true]{hyperref}
Is it possible to influence LyX to load color after babel being loaded?
Hi Alberto,

I don't know much about this, but you might be able to do something like

Provides color

in local layout.

See Help > Customization for more information.

Please let the list know if you try it and it works.

Best,

Scott
Alberto Escrig Vidal
2014-10-03 06:19:07 UTC
Permalink
It Works!

Thanks so much Scott

Loading...