#1 Le 15/04/2015, à 20:36
- Lil17
[Résolut]Latex-Hyperref - \ProcessKeyvalOptions
Bonsoir à tous,
Comme le titre de mon post l'indique, j'ai un soucis avec le package hyperref.
Lorsque j'essaye de le charger dans le préambule de mon fichier .tex, j'obtiens
! LaTeX Error: Command \ProcessKeyvalOptions already defined.
J'ai l'impression qu'il y a un conflit avec le .cls que j'utilise mais je ne parviens pas à résoudre le problème.
Je crois que le problème se situe à ce niveau dans le fichier .cls mais pas sûre :
\RequirePackage{ifthen}
\RequirePackage{keyval}
\def\@orsay@language{french}
\def\@orsay@babel@language{frenchb}
\def\@orsay@select@language{%
\expandafter\expandafter\expandafter\selectlanguage\expandafter\expandafter\expandafter{\@orsay@babel@language}%
}
\define@key{orsay-thesis}{mainlanguage}{%
\gdef\@orsay@language{#1}%
\ifthenelse{\equal{#1}{french}}{%
\gdef\@orsay@babel@language{frenchb}%
}{%
\gdef\@orsay@babel@language{#1}%
}%
}
\def\@orsay@languages{english,frenchb}
\define@key{orsay-thesis}{morelanguage}{%
\edef\@orsay@languages{#1,\@orsay@languages}%
}
\newif\if@orsay@parttoc
\@orsay@parttocfalse
\define@key{orsay-thesis}{parttoc}[]{\@orsay@parttoctrue}
\newif\if@orsay@logos
\@orsay@logosfalse
\define@key{orsay-thesis}{logos}[]{\@orsay@logostrue}
\newif\if@orsay@lists
\@orsay@listsfalse
\define@key{orsay-thesis}{lists}[]{\@orsay@liststrue}
\let\@keyval@options@list\@empty
\def\@extract@key#1=#2\@extract@key{#1}
\def\ProcessKeyvalOptions#1{%
\let\@tempa\@empty
\let\@tempb\@empty
\@for\CurrentOption:=\@keyval@options@list\do{%
\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\@key\expandafter\expandafter\expandafter{%
\expandafter\@extract@key\CurrentOption=\@extract@key%
}%
\@ifundefined{KV@#1@\@key}{\edef\@tempa{\@tempa,\CurrentOption,}}{\edef\@tempb{\@tempb,\CurrentOption,}}
}%
\@for\CurrentOption:=\@tempa\do{%
\ifx\CurrentOption\@empty%
\else%
\PassOptionsToClass{\CurrentOption}{article}%
\fi%
}%
\edef\@tempb{%
\noexpand\setkeys{#1}{\@tempb}%
}%
\@tempb%
\AtEndOfPackage{%
\let\@unprocessedoptions\relax%
}%
}
\DeclareOption*{%
\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\@keyval@options@list\expandafter\expandafter\expandafter{%
\expandafter\@keyval@options@list\expandafter,\CurrentOption%
}%
}
\ProcessOptions\relax
\ProcessKeyvalOptions{orsay-thesis}%
Voici un lien vers ce que j'utilise et donc vers le MWE : http://www.math.u-psud.fr/~ecdoct/ecdoc … /latex.php
Mon fichier .tex est le même, j'ai juste rajouté \usepackage{hyperref} dans le préambule.
Merci d'avance pour votre aide.
Dernière modification par Lil17 (Le 15/04/2015, à 21:58)
Hors ligne
#2 Le 15/04/2015, à 21:20
- gigiair
Re : [Résolut]Latex-Hyperref - \ProcessKeyvalOptions
Le mieux serait de se conformer aux consignes données dans l'entête du fichier de classe:
%########################################################################
%
% Filename : orsay-thesis-utf8.cls
% Author : Vincent Feuvrier
% Contact : vincent.feuvrier@normalesup.org
%
% Simple to use LaTeX class for writing thesis in mathematics at
% Paris-Sud university.
%
% See included manual files for usage.
%
%########################################################################
Et si le manuel ne répond pas à la question, à ta place j'essayerai de joindre l'auteur du fichier qui semble le mieux qualifié pour répondre. hyperref est un package réputé chatouilleux.
--
JJR.
Hors ligne
#3 Le 15/04/2015, à 21:58
- Lil17
Re : [Résolut]Latex-Hyperref - \ProcessKeyvalOptions
Bon, finalement j'ai résolu mon propre problème.
En fait il faut modifier le fichier .cls comme suis
\RequirePackage{ifthen}
\RequirePackage{keyval}
\RequirePackage{kvoptions}
\DeclareOption{hyperref}
\def\@orsay@language{french}
\def\@orsay@babel@language{frenchb}
\def\@orsay@select@language{%
\expandafter\expandafter\expandafter\selectlanguage\expandafter\expandafter\expandafter{\@orsay@babel@language}%
}
Résolu donc !
Merci quand même pour ta réponse JJR
Hors ligne