LyXLyx: Option clash for package when using template from LaTeX

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Rgandum
Posts: 2
Joined: Tue Feb 27, 2018 6:06 pm

Lyx: Option clash for package when using template from LaTeX

Post by Rgandum »

Hi,

I am new to Lyx and LaTeX, I have tried to search for the answer in other posts but did not find it.

I want to write my thesis in Lyx but the template provided by the university is for for LaTeX.

So, here is what I did:

1. Created a new layout file called "mithesis.layout"
2. Created a class document called "mitheis.cls" in MikTex containing the same code as the cls file provided by the university.
3. Copied the tex file preamble options into lyx documents's preamble.

Everything is working fine, except for figure floats because I get an error saying "There's an option clash for package graphicx":

Code: Select all

The package graphicx has already been loaded with options:
      []
    There has now been an attempt to load it with options
      [pdftex]
    Adding the global options:
      ,pdftex
    to your \documentclass declaration may fix this.
    Try typing  <return>  to proceed.
I have checked the sty and cls files being used and I cannot find anywhere any reference to the package graphicx. The only place where I found the package is being loaded is in the LaTeX preamble of my Lyx document.

Any idea where else can the package be loaded from? Or any idea on how to solve this kind of issue?

Thanks,
Rgandum

Question has also been posted in https://tex.stackexchange.com/questions ... lash-error
Last edited by Rgandum on Thu Mar 15, 2018 1:42 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

Lyx: Option clash for package when using template from LaTeX

Post by Stefan Kottwitz »

Hi Rgandum,

welcome to the forum!

I guess it was figured out on the other site. Anyway, don't use pdftex as option, it's auto-detected.

Stefan
LaTeX.org admin
Rgandum
Posts: 2
Joined: Tue Feb 27, 2018 6:06 pm

Lyx: Option clash for package when using template from LaTeX

Post by Rgandum »

@scottkosty, I have edited and included the link.

@Stefan, I did not know it was auto-detected... Thanks anyway!
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Lyx: Option clash for package when using template from LaTeX

Post by scottkosty »

Rgandum wrote:@scottkosty, I have edited and included the link.
Thanks for including that. I appreciate it!

Scott
Post Reply