# Tag Info

## Hot answers tagged option-clash

22

Update: moderncv loads the package hyperref by itself with its own hypersetup. From moderncv.cls, Hence, you need not load hyperref again. But load the hypersetup using \AfterPreamble (or \AtBeginDocument) hook as in this code: \documentclass[11pt,a4paper]{moderncv} \moderncvtheme[green]{classic} \usepackage[scale=0.8]{geometry} ...

17

\PassOptionsToPackage{dvipsnames}{xcolor} \documentclass{...} \usepackage[normalem]{ulem} \usepackage[all]{xy} \usepackage{xcolor} However, it looks like that xcolor is already loaded by your documentclass or another package

13

The french language sets the ; as an active character: use \shorthandoff{;} before the picture and \shorthandon{;} after the picture to not have problems. \documentclass{article} \usepackage[frenchb]{babel} \usepackage{pgfplots} \usetikzlibrary{spy} \begin{document} \shorthandoff{;} \begin{tikzpicture}[spy using outlines= {circle, magnification=6, ...

12

The LaTeX2e kernel defines usepackage to be exactly the same as RequirePackage in the ltclass.dtx. \if@compatibility\else\let\usepackage\RequirePackage\fi So the fact that you use RequirePackage makes no difference and you still get an error. If the same package is requested more than once, nothing happens, unless the package has been requested with ...

11

Well, since Herbert provide a general solution for option clash, here is another solution: \usepackage[dvipsnames]{xcolor} \usepackage{tikz} Just put xcolor package before tikz package. Explanation: In LaTeX, you cannot load a package through \usepackage twice or more. If a package has been loaded, another \usepackage without any options will be safely ...

9

TikZ is usually intelligent with regard to active characters and so does not normally need the \shorthandon, \shorthandoff pair. However, the spy library did not include the checks that TikZ uses when matching its command and only defines a variant for whatever catcode semi-colon has at load-time. Since babel shifts its catcode changes to \begin{document}, ...

8

You could pass the option explicitely to the package, which you could do even before \documentclass. Note, we use the full theme package name here: \PassOptionsToPackage{subsection=false}{beamerouterthememiniframes} \documentclass{beamer} \usetheme{Szeged} % implicitely loads miniframes \begin{document} \section{A section} \subsection{A subsection} ...

8

Option processing (From source2e documentation) When the options are processed, they are divided into two types: local and global: For a class, the options in the \documentclass command are local. For a package, the options in the \usepackage command are local, and the options in the \documentclass command are global. The options for \documentclass and ...

6

In this case this can be solved by: \usepackage{hyperref} \hypersetup{ pdfauthor={...}, pdftitle={...}, pdfsubject={...}, urlcolor=blue, } The entries for the PDF information dictionary should be better set after the package is loaded. Also the other entries (urlcolor) can be set afterwards. pdftex is not needed, hyperref detects pdfTeX in PDF ...

5

that should be \RequirePackage{ifpdf} \ifpdf \PassOptionsToPackage{pdfpagelabels}{hyperref} \fi \RequirePackage{hyperref}

5

The option clash error requires that the same package is loaded twice. The second time with at least one new option that was not given at the time, when the package was loaded first (LaTeX loads a package the first time, at subsequent loading requests it only checks the options). Only one package is specified by the example file, thus the second load ...

4

Loading bookmark after hyperref solves the error. See Bookmark-Documentation on page 7.

4

I had to contact the folks at arXiv and they asked me to include authblk.sty setspace.sty, subfig.sty, caption.sty, caption2.sty, caption3.sty, babel.sty with my .tex document and eps figures and .bbl file. Apparently these style files are the only packages that might be mixed versions from what we're running in our environment. This sorted everything out ...

4

You can load natbib (of which bibentry is a subpackage) and change abbrv to abbrvnat: \begin{filecontents*}{\jobname.bib} @book{Goossens1994LaTeX, author = {Michel Goossens and Frank Mittelbach and Alexander Samarin}, title = {The \LaTeX{} Companion, $2^{nd}$ Edition}, publisher = {Addison-Wesley}, year = {1994{.}} } \end{filecontents*} ...

4

Your example includes several packages twice. Usually that is not a good idea and will cause problems. Anyway, to address your specific question, you need to use the mechanisms of the CJK package; your system should include a useful example file CJKutf8.tex under the CJK documentation directory. Additionally, you ought to tell latex which language ...

4

As mentioned in a comment, braces in the class option list will in general cause issues or at least be risky. The way that LaTeX2e processes options does not use keyval methods 'natively': all of the packages for allowing package or class keyval options do so by post-processing options passed by the kernel as key=val. The code used to remove 'used' class ...

4

\PassOptionsToPackage has to be used before the package is loaded: \PassOptionsToPackage{frenchb}{translator} \documentclass{beamer} Or frenchb can be given as global option: \documentclass[frenchb]{beamer}

4

In the above linked question Ahmed Musa quotes the LaTeX error help on an option clash: ? h The package 'xcolor' has already been loaded with options: [cmyk]. There has now been an attempt to load it with no options. Adding the global options: 'cmyk' to your \documentclass declaration may fix this. It solves my problem if I set the options for xcolor ...

4

Change the order of the packages: \documentclass{report} \usepackage{cleveref} \usepackage[retainorgcmds]{IEEEtrantools} \begin{document} \begin{IEEEeqnarray}{rCl} & \begin{array}{rcl} a & = & 3\\ b & = & 4 \end{array} \end{IEEEeqnarray} \end{document} However, it makes more sense to use the amsmath package and then the ...

3

Building on my previous answer, here is a way: \ProvidesClass{akuritsu} \newif\ifaku@sizegiven \DeclareOption{12pt}{\def\aku@ptsize{2}\aku@sizegiventrue} \DeclareOption{11pt}{\def\aku@ptsize{1}\aku@sizegiventrue} \DeclareOption{10pt}{\def\aku@ptsize{0}\aku@sizegiventrue} \DeclareOption{12pt-standard}{\def\aku@ptsize{2}} \ExecuteOptions{12pt-standard} ...

3

It is not completely clear what your problem is. The scrreprt class does not load the graphicx package so \documentclass[draft]{scrreprt} \usepackage[final]{graphicx} \begin{document} \includegraphics{mill.png} \end{document} should work without problems. It is likely that you are loading another package that loads the graphicx package. For example, you ...

3

This is a bug in cleveref that has not taken into account some changes made to IEEEtrantools.sty. In particular, the conditional \if@IEEEissubequation is not any more in the package. The patches made by cleveref refer to version 1.2 of IEEEtrantools, but you probably have version 1.3 (2012/12/27). You can try by adding some code that will avoid the error: ...

2

Use \PassOptionsToPackage{spanish}{babel} \documentclass{...} ... if you cannot do what David suggested.

2

Just to close this one: the problem is loading xy twice with different options. If you really want to load hyperref only with pdflatex, you have to load the ifpdf package: your \newif\ifpdf will do nothing except following the false branch. Avoid passing the pdftex or dvips options to graphicx, hyperref and xy. \documentclass[a4paper]{article}[12pt] ...

2

There is indeed an option clash for xcolor package in your code. It is easy to see that in your two (actually three) loading rounds of xcolor. Here is the error help: ? h The package 'xcolor' has already been loaded with options: [cmyk]. There has now been an attempt to load it with no options. Adding the global options: 'cmyk' to your \documentclass ...

1

Here's something you can play with: \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[paperwidth=9cm, paperheight=10cm, showframe]{geometry} \parindent 0pt% %\usepackage[american, british]{babel} %\usepackage{datetime} \def\germtoday{% Example format: Date Month Year \number\day\space \ifcase\month\or Januar% ...

1

I believe that the problem is in the fact that \foreach does everything inside a group and this, for some reason, conflicts with the card production of flacards; indeed just the last card in each page is actually printed. In order to see if my assertion is right, I ran the following test: \documentclass{minimal} \usepackage{tikz} \begin{document} \foreach ...

1

Running \documentclass[10pt]{article} \usepackage[normalem]{ulem} \usepackage[all]{xy} \usepackage[dvipsnames]{xcolor} \begin{document} abcdefgh \end{document} does not produce any warnings or errors on a current TeXlive 2011 installation. If you are using additional packages (hyperref is one that this problem is seen with, for example) here may well be ...

1

It is possible to delay the loading of catoptions with etoolbox’ \AtEndPreamble but this doesn’t wokr in the real world since I need some functions of catoptions in my1 (i.e. menukeys) \documentclass{scrartcl} \usepackage{filecontents} \begin{filecontents}{my1.sty} \RequirePackage{etoolbox} \RequirePackage{xcolor} ...

1

\documentclass[11pt,table,a4paper]{article} \usepackage[T1,T2A]{fontenc} \usepackage{lmodern} \usepackage[koi8-r,utf8]{inputenc} \usepackage{CJKutf8} \usepackage[russian]{babel} \newenvironment{SChinese}{% \CJKfamily{gbsn}% \CJKtilde \CJKnospace}{} \begin{document} Это мой первый многоязычный докладе. This is my first multilingual report. ...

Only top voted, non community-wiki answers of a minimum length are eligible