1

In this example:

\documentclass{article}
\usepackage[frenchlinks=true]{hyperref}

\begin{document}
  {
    \hypersetup{frenchlinks=false}
    \tableofcontents
  }

  \section{Section1}
  \label{sec1}

  \section{Section2}
  \label{sec2}
  \nameref{sec1}
\end{document}

I am able to change the style of links in the table of contents. However, in my actual document (which is too complex to paste here), the table of contents is rendered with frenchlinks=true. In xelatex output, I get the warning:

Package hyperref Warning: Option `frenchlinks' has already been used,
(hyperref)                setting the option has no effect on input line 8.

I also use the option in my minimal example at \usepackage, and it works for \tableofcontents anyway. Why doesn't it work in my actual document? What causes this warning? How can I fix it?

Edit:

I figured out that it doesn't work anymore as soon as I actually load a font for the small caps:

\usepackage{fontspec}
\setmainfont{Equity Text A}[
  SmallCapsFont={Equity Caps A}
]

closed as unclear what you're asking by user31729, Stefan Pinnow, Maarten Dhondt, Zarko, Andrew Aug 8 '16 at 7:35

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    The warning is there also for you minimal document. What is your precise question? Disabling the french link style in ToC? – user31729 Jul 18 '16 at 20:06
  • Yes. In my minimal document, this works. But not in my actual document. Unfortunately I don't know what causes this and I thought it is possible to figure out the cause from the warning I get. – flyx Jul 18 '16 at 20:28
  • Do you load hyperref AFTER the fonts? (It likes to go last.) – John Kormylo Jul 19 '16 at 14:52
  • @JohnKormylo yes, I load it after the fonts. – flyx Jul 19 '16 at 16:00